我对垃圾的断绝能力一直很低 导致我在现实中经常很不爽 要是拒绝可以更坚决一点,就没那么多伤害了 —————————————— 喜剧之王 一点都不好看 —————————————— 构建一套系统真的没那么容易 比如 找工作APP 如何构建一个诚信机制,既能让没有任何认证的人找到工作,又不让企业吃亏 (淘宝是怎么做的?让人数少的想赚钱的商家交保证金,人数多的消费者不交钱; 当把这一套逻辑放在程序员身上,各种问题: 万一公司想空手套白狼招人免费干活怎么办? 万一有一些傻逼啥都不会恶意给企业差评怎么办? 万一有企业派人刷好评洗白怎么办? 这些都是问题) —————————————— http://www.americanrhetoric.com/speeches/ronaldreaganchallenger.htm 我国领导人才不会在出事后讲这些话呢 多半都是success success cover it up, cover it up, close people's mouth and so on —————————————— 讲的都是谎言 看看审查制度就知道了 —————————————— 艹 "从严治党"你倒是给党员讲啊 干嘛折磨我一个穷学生 思政课真受不了 —————————————— 我只是隐隐觉得,在现实生活中,很多人,你跟他说再多话也不会有提升、一起做的事通常是浪费时间。 而在国际网上,我做的事基本就是传播知识,做实际的事情,每天解锁一点新技能。 没准这才是某国落后的根本原因:封闭。 —————————————— On the very bottom, all you need to do is: do things with one way! After you can do many things, you'll then think about how you could do one thing with different way based on different circumstances. If you, at the beginning, only has been taught or struggled in solving one thing in different way, then, I could say, you are useless! Because all you got or all you can do is solving 1 problem which maybe 1 + 1 = 2, while others could solve 20 times problem than you do. That's why we encourage people to start from little, go far with much. (E-language->C++->Python->JavaScript->Kotlin->Golang->AI(ML)) (Windows->Deepin->Ubuntu->Popos->Kali->Lubuntu) Don't be silly that think you could learn all those stuff from scratch easily. Just say no to those details, start from the main ideas, start from what's essential. With that, you'll be good at learning everything! —————————————— 对思政课讲台独问题的反思 1. 抨击民主制度 (自己的民主制度不行,就说民主不好) 2. 抨击贫穷 (用专制的强权、金钱压制自由的种子) (专制赢得了一时,维持不了一世,总有一天,人们会意识到自由的抉择有多么重要) 3. 抨击市场自由竞争原则 (本来那些只会考试的人就不应该作为优胜者出现在人的视野里) (台湾老师在中国过得好只能说明中国教育落后 (垃圾老师总不能在美国骚得起飞,毕竟美帝科研top1) ) —————————————— 头等舱的早已收拾金银细软弃船了。 二等舱的说:“不好,这船有问题!” 三等舱的依然在吃喝玩乐,谈养生或艳遇。 下等舱的却不知自己即将与船一道沉入海底。 在底层大舱里一帮傻逼还在瞎自豪:厉害了,我的船! —————————————— https://youtu.be/6lnkpuUbjyA —————————————— 美元真是一种特别形象的符号:之前付出过的努力可以在新领域上开出一条直道! —————————————— 在中国,越是公立大学,越是教得垃圾 语言能力都还没成熟的情况下被教授高深的东西 长大后也无法用人能听懂的语言正常传授知识 —————————————— 没有什么比看到心仪的女孩 却由于能力不够,无法追到 更让人产生动力的了 所以人才要努力奋斗啊 —————————————— www.americanrhetoric.com/speeches/fdrpearlharbor.htm 要是我以前的历史课是学这些就好了 —————————————— http://m.kdnet.net/content-1-11977382.html —————————————— 不管做得好不好 能用就行,率先进入就有的赚 这叫行业红利期 做得好就赚,这叫行业壮年期 做得再好也难赚钱,这叫夕阳产业(夕阳无限好,只是近黄昏) —————————————— The thing that really killing me is being normal, being ordinary. Those shit will never understood what I'm looking for, what I'm dieing to achieve. They are just live in their stupid numb life without knowing anything behind the lights. —————————————— Is that brave make him king! Now, he just wanna say, you don't have brave for freedom. Even if you have, that was the brave for king, for country, for the country ruled by king. —————————————— 这是天马行空群 —————————————— 开源的本质是: 开源者不需要从这个项目得到 Money,但他希望这个行业能够持续快速地发展。 —————————————— http://blog.sina.cn/dpool/blog/s/blog_6764558f0100i2lq.html —————————————— 没有市场竞争谈创新是空想,根本没动力:这个可以用,继续用,反正没人和我抢饭碗(垄断),为什么要大费周折搞创新? 你党就是没竞争,你党控制下不可能有创新 你党言论审查的重点就是扼杀一切可能和党管控的一切形成竞争的势力 —————————————— 死人 —————————————— 你要问我理想主义者与现实主义者的区别 在我看来,即是理想主义者更易与远方的人成为朋友 而现实主义者更易与近身者成为朋友 如果理想主义者在近身处有坚固的朋友,他们一定很优秀 而现实主义者在远方有牢固的友情,他们也一定很优秀 远近平衡,平庸者 朋友与自身,优秀程度相近 牢固的朋友越多,个体实际的能力越强 所以最优秀的人,在大世界、大局面上要尽可能展示理想主义光辉 而在小群体,要尽可能显示现实主义为群体谋利益的心机 通过提升自我,改变朋友的质量、增加朋友的数量 —————————————— 我十分了解我的心理状态 当我插上耳机,说明我不想和任何人说话 此时耳机 is a symbol, cut me from the normal world (进行某种深入的思考或进行某项艰巨的任务) 从现实的角度讲,插上耳机确实听不见别人讲什么 如果你看见别人用入耳式耳机,还要硬给他搭无关紧要的话,那只能说明你情商不高 —————————————— https://www.pornhub.com/view_video.php?viewkey=ph5ad4c41dbea9e I've never expected VR could so attract like this VR + sex toy should be good —————————————— 未来的学校,学生为校园事务主导: 学生多数同意,可辞退老师 学生参与学校建设(工程建设拼多多模式,二分之一学生同意即建设;先付钱(工程总费用÷学生数的一半),再根据最终学生支持人数平坦工程款) 优秀双语程序员组成学校领导层,议会制 —————————————— I won't be the first Non be the last one To break through the little self. —————————————— 说也奇怪 我死命逃开文科 shit 结果大学还要上思修 只有思修才用卖菜的喇叭扩音 什么东西别人不想听,才会吵 如果讲课现场吵炸天, 1是演讲者没能力 2是演讲主题没价值 Conclusion: 只有思修课(政治宣传)是你交了钱不想听硬给你塞过来的东西 shit 文科 :(不可证伪、没有真实,历史总是一部分人的历史 (你不可能找1000个世界各地的历史学家,从他们各执一词的讲解中,找出重叠部分) ) —————————————— 看了《冰肤传说》 我觉得法国也可能成为文化强国(电影大国) 对比中国,一个连说话都要考虑再三以免有牢狱之灾的国家 输出什么给外国人看?专制主义共产党统领一切思想? 我觉得外国人会逃离电影院,除非你倒贴,给观众钱 —————————————— 文字狱 —————————————— 对 所以我买了好几样男性枕边伴侣 —————————————— 但是 除了make love 我真想不出有什么好玩的 —————————————— 太厉害了没人陪你玩 太弱了也没人陪你玩 然而历史的进程多半是由那些最顶尖的人推动的 最强的人顶尖,最弱的人是另一方面的顶尖 —————————————— 我觉得中国的防火墙 主要的目的,是为了便于一小部分特权阶级,抄袭国外的创新成果,从而压榨墙内无知的民众 —————————————— 虽然我很想说人体艺术 实际上不如夏天在大学里看小姐姐的腿 —————————————— 最近喜欢看一些让人体发热但又不会过热的东西 ,猜一艺术门类? —————————————— https://xw.qq.com/iphone/m/story/585b8220051cf4bdb650199bb1ac05a5.html?_u_u_u=0.5391307123862723 我觉得这些人爱好吃鸡是一种必然现象 连玩具枪都买不到了,犯法… —————————————— http://www.bilibili.com/video/av23383257?share_medium=android&share_source=copy_link&bbid=E0626135-9650-438C-9974-1B8315ED7B0613493infoc&ts=1526199451778 —————————————— 大师是那些可以把复杂的事变得简单、枯燥的事变得有趣的人😁👍 —————————————— 怪不得我可以得罪那么多人… —————————————— 权比钱更肮脏、原始: 金钱交易必须建立在双方承认一般等价物协议并愿意交易的前提之下;而权力斗争不管你愿不愿意,打赢甚至打死你之后你的东西都归我,充分说明其原始性。 马克思说资本主义必然会变为共产主义是不科学的,因为共产主义是最原始、最落后的氏族时代,整个制度都建立在权力之上 真实情况是资本主义会逐渐与社会主义融合,即从考虑社会长久健康发展的角度治理国家 —————————————— 崇洋媚外是21世纪的主流 所以化妆要模拟西方人的轮廓与面部特征 越西白化, 越受女性欢迎 —————————————— 女性或者人的天性就是爱权爱钱,从取名就可以看出来了 所以要在平时的生活中尽量表现出高贵、有教养、有礼仪 另外,人只有在慢节奏的舒适中,才会表现出强烈的性欲 太急躁就会显得在工作,工作无性欲 —————————————— 女性的思想果然是很情绪化 那意味着我只能当个gay? 不,到底应该用何种心境、何种思想来面对女性? 我应该好好想想 —————————————— 未完待续 —————————————— 我觉得大家都是色狼…装什么矜持😂 —————————————— 为了彻底地研究女性的内心 我决定读一本女性专区的小说 —————————————— 因为光头在人群中显眼 所以和尚用剃光头来约束自己 —————————————— 有人说要与人为善, 我想是这个道理, 人生已如此艰难, 何必为难彼此, 所以我剃了光头, 不再与人争执, just keep it quite, 从此六根清净。 —————————————— 在现代社会 不管多大的厂,都逃不过现代科技的淘汰,除非时时更新 比如usb蚊香 pk 传统盘式蚊香 by the way, usb蚊香还救活了蚊香片厂 —————————————— 这个耳机可以用来坐车 完全无视噪音 —————————————— 世界上SB太多 杀不完的 —————————————— Hey guys, you really should try this: 入耳式隔音侧睡不压耳耳机https://m.intl.taobao.com/detail/detail.html?id=533705764675&spm=a2141.7631730.0.i1&ttid=212200%40htao_android_4.1.3#&modal=share In the one hand, you can never heard your roommates voice, on the other hand, you can have a nice sleep For the quality of voice, 和 120 yuan 的小米耳机一样,just OK for daily music playing. The best benefits you can get from this 耳机 is: 你可以在疲惫的午间或下午放学后无视SB室友,通过睡眠补充精力,并由此开启高效脑力活动的一天。 😘 —————————————— 这场自我救赎的旅途 就算灵魂在颤抖 就算对脑力的要求远远超出了我的想象 我也必须坚持下去 不然之前的努力算什么? —————————————— 吃鸡只是一个名号 对于商家来说 这只是方便他们找到潜在的无脑客户 —————————————— 2.2倍速看了《大世界》 社会 https://baike.baidu.com/tashuo/browse/content?id=b7a9e6fb3b85cbbb98f1fe68&fr=qingtian&lemmaId=22150319 —————————————— 你的意思是明白了有些事必然发生,只要了解了前因后果 —————————————— 你昨天干了什么? —————————————— 年轻人性格太急躁就容易做错事 只有多经历几次挫折才会稳重吧! —————————————— 65.无法量化为计算机可处理的逻辑的教学,毫无意义。 —————————————— 好玩的定义是什么? 我觉得是 reaction 如果一个固定不动的正方体和一个可以四处滚的球,你肯定会觉得球更好玩,因为 it will react quickly if you keep touching it. —————————————— 我为什么英语学得比中文好? 很大原因是英语从来是用来学知识 而不像语文,一会儿要用来做这道题、一会儿又要用来那样做那道题,然后你知道的,(语文或文科)考试卷对提升语文毫无帮助 更像是考八股文,格式不对、固定句子不对,0分 —————————————— 我们所做的事 无非是用技术对权力和财产进行重新分配 也就是用个人奋斗突破血缘亲族的枷锁 —————————————— http://music.163.com/song/506747016/?userid=280429778 —————————————— 我觉得解决方法只有一个: 1. 游戏商强制插上耳机才能玩 2. 过程当中检测是否有脏话喷出来,有就封禁一小时 —————————————— 他们不光打游戏,还在打游戏的过程中大吼大叫,并且句句草泥马 青年尚且如此,老了更是不顾廉耻 这样下去是要亡党亡国的😒 —————————————— 必须得歧视 整天一有空就打游戏 能不能有点追求 —————————————— 工欲善其事, 必先利其器 想学AI,就得在平时零碎时间(没有图书馆、教室,需要面对只会打游戏傻逼室友时)用百词斩背单词 —————————————— 你我他 我是偏执狂 追求极致 所谓 geek —————————————— Too bottom to nothing. 太底层以至于做不出什么东西来。 别国早已实现物联网、中枢控制,你国还在用51单片机 —————————————— I don't need to learn anything right now Just leave me alone, give me a quiet place 盲目的学习犹如吃东西分不清食与屎 —————————————— 《1993聊斋艳谭之灯草和尚》 可以说是中国(如果香港属于中国)史上最好的色情片 既展现了中国传统文化(服饰、装潢、鬼神说),又集中体现了性爱文化的方方面面(比如男女、女女、自慰、强奸) 不仅剧情设计精美,演员自身素质也高(颜值、身材) 1.5、2倍速切换观看 —————————————— http://www.bilibili.com/video/av1727778?share_medium=android&share_source=copy_link&bbid=E0626135-9650-438C-9974-1B8315ED7B0613493infoc&ts=1522994375977 人性 —————————————— 成就越大 影响力越大 反过来理解,你的能力可以通过影响力反映出来 —————————————— 然后我们学校 注意!是大学! 竟然强制每天晚自习看新闻联播! 整体看漂白的新闻有意思吗? 天赋人权啊!小伙伴们!我为什么一定要看?我有不看的权利啊… 所以我决定带耳罩去上晚自习… —————————————— 如果我是学校楼梯设计者 我就会把上下行的空间分别压缩为只能容纳一人的宽度 这样就不会有混乱的拥挤 —————————————— 大学政治类课程创始人:(对于28原则中8那部分,)同样都是洗脑,被敌人洗脑还不如被我洗脑 —————————————— 难是省略太多步骤 复杂是有太多步骤 —————————————— 数学和英语完全是给程序员准备的。 要是没有大量的 coding, 你怎么会熟悉字母代数和逻辑分支分析? 要是没有大量的 document reading, 你怎么会 master English? 要是没有独立开发一套系统,你又怎会知世事艰辛? —————————————— 有基础只是为了能学到更多东西,并不代表你就很厉害 —————————————— 结论只帮你解决一个问题 而思维过程可以帮你连接新知识,解决一堆问题 —————————————— Every night, every day, dreaming about that. Be the one that everyone admitted. —————————————— 我只是感叹同类太少 比较孤独 你想,有几个人在其他方面特别厉害 在高考上是个失败者啊? —————————————— 人多是一件坏事 大家都把心思放在了怎么出难题和怎么应试上面去 没有人真正踏踏实实地锻炼自己解决实际问题的能力 —————————————— 只要你发现你的孩子从小不一样(比如其他孩子从小嘴就甜,就他谁都不叫,连爸妈都不叫) 立马进行反传统贵族式精英教育 因为他有很大几率是创新性人才 传统教育不适合他,他也不适应传统权威式教育 —————————————— I'm not worry about where I'm gonna go. I'm worry about if I can't reach that level, what my life would be! —————————————— 建立一个“白送网络平台” 当我国每个人都可以从中得到所需要的生活物资时 共产主义就可以开始实施了 —————————————— 不能说成本贵就不搞创新了 哪一种改变世界的产品一开始生产成本不高? —————————————— 食物是吃一次,精力增强一分 而射精是射一次,精力下降一分 没精力还能做什么大事 —————————————— 对于把AI说成炼丹的傻逼我是不屑一顾的 炼丹是没有科学依据的空想,AI不是 —————————————— 个人控制力的增强直接体现在对性欲的控制上。 —————————————— 每天都过着苦逼的写笔记生活: https://yingshaoxo.gitbooks.io/university-notes/content/dc-stable-source-circuit-de-fen-xi-yu-ying-yong/zheng-liu-lv-bo-dian-lu-de-fen-xi-yu-ying-yong/rectifier-circuit.html —————————————— 我的择偶标准: 智商(知识面得广;得喜欢解决问题) > 英语(第二语言者可以证明你有毅力做到你想做的事;包容性强、视野开阔、反传统、追求自由) > 外表(洁净、对称、白与嫩) —————————————— 然后疯狂地说资本主义的坏处 与负面新闻 不说社会主义的负面新闻 另一方面,完全没意识到在制度建立的初级阶段,犯错是难免的 失败后学到的,都是经验 —————————————— 学校的sx老师在讲毛概时 主要就是疯狂地保毛、保斯大林 垃圾思政 —————————————— 人到一定年龄就不想撸了 因为没有意义 他已经找到了比撸更能让他保持长久兴奋的事业 —————————————— 之所以中文不适合做详细的文档 是因为中文太具有概括性,容易在极短的文字内让读者迷茫 —————————————— 可上九天揽月,可下五洋捉鳖 —————————————— 突然想到了 虽然大家的大脑储存都差不多 但不同人的内存与CPU是不同的,那可能就是人与人之间智力的差别吧(储存也还有固态与机械之分呢) 不过,别人用一天能训练出的模型,你用十天、一个月也可以啊👍 —————————————— 喜欢坐火车时靠窗的少女是我的菜 因为她们自视清高、曲高和寡,一般都有一定的知识储备和文化涵养 —————————————— 这个好 —————————————— 政治没学好的根源在于你没把宪法给被背了 用宪法答题没人敢说你是错的 —————————————— 《实力搭讪(发生关系)》:  http://music.163.com/video/43C3FD202E4EA7D1901A28E04DA2521B/?userid=280429778 程序员每天只需要抽出10分钟时间去和妹子聊天 一年后肯定能找到女朋友 只是我太懒 —————————————— 成为大人 越来越觉得除了食物、水、房子、电、网以外的东西都没有意义 越来越不在乎别人的感受 精神世界越来越小 不,我不能成为那样的大人 —————————————— You be what you wanna be 现实是虚幻(随时间流逝变为不稳定的记忆、变成政客篡改的历史),而虚幻长期指导你工作,它会变成现实 —————————————— 你是不是傻 最后都会变成老大妈 关键在于你想和哪种老大妈一起生活 —————————————— 回想起我的学校生活 那些不同阶段的同学 我只是觉得没必要再聚到一起 大家的人生早就出现了差异 不同的世界怎能相互融合,链接各个世界的东西只有一般等价物 —————————————— 那些人应该开发一套反吹牛逼机制 —————————————— 经过我不断的观察 中文最适合吹牛逼(夸大标题党) 而不是传道授业解惑 —————————————— 遇到挫折不放手是一种态度 —————————————— 在我眼里,那个叫胡英杰的人格100%是个傻逼 一事无成 而我,虽然不傻,但处于智力阶层的底端 —————————————— 火锅底料家庭使用指南: 一定按使用说明来,一定要阻止父母加乱七八糟的东西进去,一定要阻止父母不按说明书操作 这样你才能吃到正常的火锅 😂 —————————————— 其实很早以前我就领悟到了 弱者才需要群居 强者是能学会享受孤独的,至少那是它以个体名义得到力量的代价 —————————————— 难道 喜欢巨乳 和 婴儿时期长期吸吮妈妈的乳头从而得到充足的营养 有关? 我个人对乳房大小是不感兴趣的,因为我没有过母乳喂养的经历。 —————————————— 突然发现 | I guess 真心喜欢英语的人 | those who really fall in love with English QQ昵称是英文 | their nickname is English —————————————— 墙最主要的目的,不是阻挡你 而是瓦解你的斗志 把你与亲人、朋友隔开 体验无限的孤独的痛苦 即使你有你远方的朋友 但越是这样,越是要充满斗志、不畏艰难,同时向你远方的朋友问好 并说一句:“阿里嘎多” —————————————— 自己开的坑要自己填 人就是这样,不做就不累,不累就没收获 —————————————— 喝酒太难看的根源应该是酒太便宜 如果一瓶一万,他们大概会慢慢品酒吧... —————————————— 墙国人用AI完全是个灾难 他们的智能推荐算法实际上做的事是:阻碍你的视野,缩小你的世界,一时底层、终身底层,让你永远无法看到真实的世界 —————————————— http://h5.17k.com/book/12505.html 这本书的作者,初写书时应该是大学生;才有闲工夫写 理科生毕业;才有这么烂的文笔 会写代码;2007年就把AI描写进了小说,并且里面还写到了电影特效渲染 死了;不然不会突然停更 —————————————— 祖先留下的选配偶或传宗接代的基因被人利用了,被用来夺取目光和疯狂敛财。 —————————————— 64. 越是无法使人得到提升的东西,在网上传播越是广泛、迅速。 —————————————— 成名很重要吗? —————————————— 我的脑子也会计算,成天看B站、抖音、直播,我的智商又不会增加 还不如看动漫,至少还可以有冒险的感觉 宅一代应该都有冒险的愿望 但很少人有财力、能力做到 —————————————— 马的,一寻思,忽然就明白bgm是什么意思了 BackGround Music —————————————— https://m.bilibili.com/audio/au214360 http://www.bilibili.com/video/av18996822?share_medium=android&share_source=copy_link&bbid=23F7F87E-66F6-4C1D-9917-533D6870E76B31056infoc&ts=1517514807140 —————————————— 大部分人从来没有【明确】地设定自己的发展目标,每天都是得过且过。等到几年过去了,才发现自己这些年啥也没学会,还是老样子,然后就感叹时光飞逝、岁月如梭。 —————————————— 人生就像写小说 如果每次都能用上以前埋下的伏笔,就能荡气回肠、绝处逢生 可是很多人都是走一步算一步,从来不思考这一步对以后的影响 或 以前做过的事有什么现在能用得上 —————————————— 长大后人出现的两个明显变化: 1. 思维能力的降低 2. 迫于生活需要,凡事偏向物质利益,即向钱看 —————————————— 一眼望去,普速火车站里堆满了贫穷的女大学生。 —————————————— 整天聊男女之事的寝室一般都很弱鸡😏 —————————————— 文科无法证伪? 不,如果能从文物得到某思想发展过程的证据,就行 如果以后有时光机,我们就能发现以前我们是有多蠢,明明都是随着自然时间的过去而慢慢进化的东西,非被我们说得很高大上。 —————————————— 下学期应该上床帘了 免得大家看见我压力大,从而做出一些让我压力大的事。 顺便防个光,我在黑暗中生产效率最高。 —————————————— 大学就是一个垃圾聚集场 但这里也是社会模拟场 这里有的只是不择手段,达成目的罢了(作弊、摇尾讨好) 所以我努力的重心还应该是不在意垃圾们的目光,去出其不意地想出解决方法,提升自己 随波逐流还不如现在就去跳河 —————————————— 为什么BT下载多年没速度? 根源在于人之自私。 素质太低,不能正确认识到“我为人人,人人为我”的利益关系。 简单讲,就是一群乌合之众,活该被奴役、被压榨! —————————————— https://www.washingtonpost.com/news/world/wp/2018/01/07/feature/in-china-facial-recognition-is-sharp-end-of-a-drive-for-total-surveillance/?utm_term=.36d9c0f83474 技术是把双刃剑,看来以前电影中所说的天眼监控,就快成为现实了 —————————————— 不管是李阳的 don't be afraid of failure 还是马云的 我们不能保证一定会成功,但我们一定会失败,只有去学习别人是如何失败的,我们才能避免失败 还是 AI 中的 强化学习 都强调了,我们必须不断尝试、不断失败,才能学到正确的 pattern (模式) —————————————— Girlfriend could be your best friend, even if you and she didn't share a same interesting. When you feel sad, she's there waiting for you When you get tired, she's there waiting for you When your faith almost crash down, she's there waiting for you It's not about what she can do for you, it's about what you and she can do for each other. When you get inside a relationship, you are not just being alone anymore, you and she's fate probably already been connected. —————————————— 新年快乐~ —————————————— When you failed, dried, tired, and can't figure out the answer of a problem, all you need to do is: sleep. Try to do it again after you waken up. If still can't find the answer, maybe Google or your friends will help you. —————————————— 另外,训练神经网络需要大量的时间 要想节省时间就得基于别人现有的模块训练 由此得出:Learning is a time consuming progress. 那些SB说别人天赋高、学得快其实是一叶樟木,没看到别人的基础 —————————————— Learning is a time consuming progress. —————————————— 就是这种智力训练的不确定性 导致人们把智力说得玄乎其玄 什么智力先天论, CaoNiMa, 都是放屁 —————————————— 然后还应知道 过多关注琐碎的细节会造成 over fit 只看表面又会有 data 不足,训练出垃圾的后果 —————————————— 类比深度学习和我个人实际学习 学习好坏主要取决于数据的选取和训练策略的不同 容器大脑(tensorflow)大家都一样 拿英语来说,疯狂英语是非常好的data set,准确的包含了应用英语的本质,所以能有比较好的训练效果 —————————————— 我们喜欢Python的首要原因不是因为它简单 而是因为它拥有更多的文科思维、大众思维在里面 它不像其他的SB理科思维语言一样,没有生僻的不接地气、不与主要交流语言接轨的词汇和“句子” 如果有人认为经典不是给普通人用的、傻瓜式操作,那你就别用苹果或其他智能手机了 😏心疼你们的智商,这点问题都想不明白 —————————————— http://www.bilibili.com/video/av17456296 —————————————— https://youtu.be/9_KMVu0ePOM 1.5倍速合适,俞敏洪对战SB官僚主义学校领导,北大也不是个好地方啊 —————————————— http://www.bilibili.com/video/av17298476 这腿卖得好 话说舞蹈早就变成了一门卖腿的艺术 —————————————— 话说中国的APP 能进世界排行前几名的也就WPS和扫描全能王了 我们要向他们致敬 虽然其他应用中国和世界文化完全不同,但追求办公效率这一点,大家都是一样的(因为中国近代办公那一套全是从美国过来的😂) —————————————— 我是乐于助人的好孩子😁 —————————————— 图书馆才是学习睡觉写代码的好地方 没有傻逼的干扰,学得好睡得着 —————————————— How about you? —————————————— 写书(或教育)成功的关键在于以文科生的语言风格(或思维能力)写理科生的内容。——— (喜闻乐见又有意义) —————————————— 每次都感觉在学校编程能力会急速下降 似乎总有傻逼在旁边打游戏并发出噪音 —————————————— http://www.jianshu.com/p/493dc2f30d40 —————————————— 极客的首要标准是: 为了更高的效率,不怕麻烦。 —————————————— 所谓非理性就是一套利益决策系统developed by natural 所谓理性就是一套利益决策系统 nature designed, but you have to develop —————————————— https://kg2.qq.com/node/play?s=gV8sYzgVExbMFg3D&shareuid=609b9b8620283382&topsource=a0_pn201001006_z11_u26635549_l0_t1512821627__ 所谓装逼,大概就像我现在做的事一样 —————————————— 那是第三世界的工厂 —————————————— 我有说它们很伟大吗? —————————————— 突然发现比尔盖茨真的捐过钱😁 —————————————— 我觉得比尔盖茨就是装逼 把钱捐给 Khan Academy 和 维基百科 多好 —————————————— You got YouTube, you got most of everything. —————————————— 学到的一点: 当朋友说出了他的困难,不要同情他,而是想出解决方法 —————————————— 但难吃与好吃直接影响了我的吃法 没毛病啊 —————————————— 一听就是文科生 —————————————— 对于“光吃饭”这种小孩的行为我是深有体会 以前在家,我是倾向于吃饭的 但在学校就不一样了 通过观察,我发现: 1. 如果菜非常好吃,我会把菜吃完再吃饭 2. 如果菜和饭一样好吃,平淡无奇,我会把饭菜同时吃完 3. 如果菜很难吃,提不上胃口,我会在吃完饭后再慢慢吃菜(但如果在家里没人给你定额饭菜,通常吃完饭了事,不吃菜) —————————————— 推荐这部电影给你 超验骇客(Transcendace) —————————————— 你怎么能以一己之力对抗全球计算机的计算能力呢? —————————————— 老师 你得有梦想才行啊 现在AI这么火,你去研究一下 那里藏着人类智慧的秘密,也是解决一切终极问题的武器 —————————————— 别的不管,从英语的角度讲 做那几道题是完全不能提升你的英语能力的 还不如跟读一篇十几二十分钟的英语演讲 或者每天坚持念并搞懂一篇文章 —————————————— 其实我以为高考之后功利性学习就到头了 结果发现不但没有,反而愈演愈烈 到了大学不仅是填鸭式教育,还是流水线作业,老师们拿着一根计分棒:“学分不够,你给我滚”😒 —————————————— 为什么马云数学总考不及格? 因为他学好了英语 然后发现中文“文档”狗屁不通 —————————————— 人类科技进化的过程就是不断地让 机器做人做不到的事 和 让机器做人能做到的事。 —————————————— 不管我们思政老师的思想再怎么奇葩,都是为党国服务 拿谁工资,为谁办事 —————————————— 老师好 —————————————— 如果一个女生数学不好,就不是真男人性格。 —————————————— http://music.163.com/song/168091/?userid=280429778 没有什么能够阻挡,你对自由的向往 —————————————— 装什么B 闷声发大财,然后抛开尘世做自己的事才是救赎之道 —————————————— 我不爱看那些年轻人的照片只是因为我不愿看到他们以后苍老的容颜(形成对比)。 不去想,就不害怕 —————————————— 在社会经济快速发展时期 各种不择手段谋取暴利的丑恶现象都会出现 但经过一段时间的社会自调整,会逐步出现一些法律规范(比如美国的信用体系) 因为人们会逐步认识到,规范后,社会运行效率会更高 —————————————— There are no one career is easy. —————————————— 在外国讲假话的代价大;在中国则是讲真话代价大。 —————————————— 乌合之众: 一个周期性的事件,大家都要做,你早点去做。 一个突发新事件,大家都要去做,你晚点去做。 一个突发新事件,大家都不做,你早点去做。 这实际上是在考验群体的智慧,我认为群体不可能在事件一开始就正确判定是否真对他们有利。 —————————————— 除了提升自我,活着没什么意思 —————————————— http://music.163.com/video/751C85D364917CC115FFF330E821B53A/?userid=280429778 止不住的看腿 —————————————— 权贵们的文化水平比较低,然后你翻墙后眼界变高了,那谁去买那些SB的服务和产品、谁去服从那些SB的领导指令? —————————————— “如果有一天你的立场和伦理相悖” http://music.163.com/song/514543271/?userid=280429778 差不多许嵩可以娶花粥了,世界观开始趋同 —————————————— “不是自己选的菜,打死也不吃” 我们还可以交流 —————————————— 被墙了 喝杯茶,然后告诉你自己:我是中国人 继续生活 —————————————— 为什么没聊天对象? 我习惯用脑子,因为不用脑子被淘汰得快;你习惯和别人瞎侃,不用脑子;所以你和我聊天一用脑子就难受;这就是我们的差别,we are different. —————————————— http://music.163.com/song/470772280/?userid=280429778 —————————————— 我不想、我不想,不想起床 我宁愿 永远都 这样懒洋洋 我不想、我不想,不想起床 强行起床 会让人 精神失常 …… 深爱我的床、我深爱的床 怎么能,变得空荡荡? —————————————— 努力总比偷懒费劲 —————————————— 事实上我现在对女人、(男人、)影视、游戏都不感兴趣,而我头上又好像有一座大山阻挡我想出问题的答案。时光还在继续将我变得衰老。 —————————————— 土嗨,不好听 —————————————— 出身于草莽,敢媲美大神 非我类人,不会理解 —————————————— 分享Steven Cooper的单曲《Chasing Fame》: http://music.163.com/song/458013650/?userid=606184040 (来自@网易云音乐) —————————————— 文科的精髓在于骗人,即如何行动能让人以为 我在为他谋福利,实际上是为自己汲取利益。 —————————————— 国产经典电视剧(95后男性): 仙剑奇侠传 武林外传 士兵突击 爱情公寓 —————————————— 哈哈,微信登录需要上个登录设备做扫描,然而上个设备被我扔了,所以登不上微信,所以可以放弃微信这个垃圾产品了。 —————————————— Fuck you, aloneness! —————————————— 为什么每天都累到眼睛睁不开 Everyday is just reading books, coding, solving problems, and in the end, sleeping. —————————————— 每天早上我七点起床 迷迷糊糊就出了宿舍 没有时间去吃顿早饭 因为我还得去上那些傻逼的课 听这些大学的老师 面无表情的读着课本 我低着头我还玩着手机 不知不觉就做了个梦 太阳当空他找学校 我背着书包装炸药 花儿知道了他对我笑 小鸟也说我牛逼了 同学少年都不贱 你说到底是谁贱 让我坐到教室不来你就扣分这就是中国的大学 话说这不上课你就得挂科 挂了科你就要重修 重修还他妈得交钱 一门课就是二百多 你问他这是为什么 我学的都没用处 他说你就认命吧 这就是中国的大学 小花同学 小花同学 你的思想态度及其的不端正 小花同学小花同学 你就回家吧 你别来上学 —————————————— 道不同不相为谋咯 —————————————— 没用过坑爹的校园网,你就不算是中国特色社会主义大学生 —————————————— 风骚的室友,室外温度19°,非要把空调开到16° 要是我不用付电费该多好 —————————————— 关于智力,我又有了新的理解: 面对同一个问题,高手可以有个解法,普通人只有一个或无法解答。 智力越高,解决问题的方案越多,选择越多,路越宽。 —————————————— 我这人天生不合群(那是不可能的) 只要一开启天才(其实是努力学习模式),身边就没朋友(啥朋友啊?酒肉而已) —————————————— 1. 你觉得高考学的东西没用 2. 觉得没用就不想学 3. 你不知道它用在哪里,你就不知道怎么学 4. 所以你成绩不好 —————————————— 你要享受那个动脑的过程,而不是你学到了什么,因为你学到的东西都会过时。 —————————————— 整理下群论: 关于小集体稳定性的思考: 假设一个寝室有6人,则有下列分布: 6 3、3 2、4 2、2、2 1、1、1、1、1、1 —————————————— 我估计学校超市很贵,量也少 —————————————— 新生洗漱一箩筐,淘宝花100多,心疼 —————————————— 我的执迷不悟感动了我自己,可你还是一样遥不可及。 —— 花粥 —————————————— 为什么主角即是正义?就没有一个以坏人视角描述故事的吗? 因为他们怕坏人描述起来像好人。 —————————————— 没人帮你就要保持平衡,有人赏识你就可以发挥特长,但别人赏识你是因为你有特长,所以生活中除了保持平衡还要发展自己的长处,到时就能对应一句话:机会只留给有准备的人。 —————————————— Once I read a sentence: somebody's life ends in college entrance exam, and somebody's life is just about to start. —————————————— 接受独裁,享受无脑生活 接受自由,享受斗智斗勇的生活 你选啥?世界上聪明勇敢的人总是少数,享受自由者自然也少。 —————————————— 我必须要努力寻找虚拟与现实的契合点,这样才能最大程度地发挥我的潜能。 —————————————— 突然明白为何 naruto 被称为火影忍者了 因为九尾查克拉是红色的,加上他爆发时速度很快 —————————————— 到底是无法超越的智商还是无法克服的懒惰? —————————————— 不知道为什么,我的手总是在游戏界面点个不停 明明都是极其简单的重复动作,为什么喜欢没日没夜的干个不停? 可能这就是傻瓜思维吧!(贪图享受,不愿思考) —————————————— 就算读了大学也不能逃脱落后的命运。 You can fight, but you definitely can't be a winner forever. —————————————— 如何从独特的品位到没品位? 多听。 —————————————— 从苹果的盈利模式中我们只总结出一个道理:傻瓜的钱好挣。 —————————————— 一个没有良好理念、体制和机制的公司,做大了都会变得腐朽。 所以小米现在不行了,一加手机性价比更高。 —————————————— 就连公司管理形态也是体制 —————————————— 被人思念不应该觉得很幸运吗? —————————————— 百度的AI技术只用来精准投放广告 而谷歌的AI还知道从亿万资源中找到最好的、你所需要的东西 (这就是差别 —————————————— 你们不觉得体制就是牢笼? —————————————— 人生就是从一个牢笼到另一个牢笼的过程。 —————————————— So do you? —————————————— 3 —————————————— 我是一只特立独行的失眠者 —————————————— 你在我枕头旁,种下一朵莲花 一个夏天多一点,莲花已经风干啦 —————————————— 为啥国内大多是网游占据排行榜,而单机游戏几乎都是国外的? 因为国内游戏,坑钱为主,游戏为辅 国外游戏,娱乐放松为主,赚钱为辅,本来生活竞争压力就大,玩游戏还要被人民币玩家气,去你妈比,不买账 —————————————— 网络化已成常态 人们已经离不开互联网 —————————————— 作为一个文科生 为了扩展在百度的搜索词条 我应该多答知乎,吹牛逼可比写小说给劲儿多了😂 —————————————— 世界上所有的战争都是自由对抗专制。 —————————————— 传说程序员都是害羞综合症患者 在网上活跃,在现实连妹子都不敢勾搭 —————————————— 你仔细想想你不充钱能变得更强吗? —————————————— 传销人员可能认为程序员单纯好骗 但他们忽略了程序员的天性:好学 吃一堑长一智,你还想骗?考过雅思再说吧 —————————————— 找工作是一个骑驴找马的过程 面包要有,梦想也要有 但如果你吃上了面包后不想实现你的梦想,那说明你根本没有梦想,以前的想法是幻想 —————————————— 便利的同时也会付出一些代价 比如被党媒鼓吹的银联卡 你做坏事转账分分钟给你揪出来 —————————————— 为什么有人觉得中文编程书很垃圾? 实际情况是这样的,本来外国人创造语言时选的关键字都是老外常用词,但翻译成中文之后就变了味,不光生僻,有些甚至在原汉语中根本就没有,只能硬编一个词出来,那词自然是毫无意义、极难理解的。 —————————————— 网络服务商为国家做监控需要耗费大量资金 国家不给,就说你可以投广告嘛! 所以就有了中国特色http网络劫持 —————————————— 是那种深深的无聊 以及telegram上群组的死气沉沉把我们聚在了一起 —————————————— https://github.com/xioxin?tab=repositories 前端 —————————————— 解散前就想问一件事 请问 @xioxin 是何方神圣? —————————————— 我不是精神病可不可以解散这个群? —————————————— 我多想和你搞一搞基 让全世界的美女都失去意义 —————————————— 市场经济是靠本事 国有经济是靠权术 两个还是有点区别的 —————————————— 中国有一项消减计划 任何住院做手术的人都要提前登记 谁与国家统治阶级意志不符就会被下命令使医生在手术中做手脚 比如面对精通计算机编程的反党分子,麻醉师会在手术中故意造成患者腰间盘突出,使其再也不能正常工作 —————————————— http://music.163.com/song/247160/?userid=280429778 —————————————— 个人感受是一种很主观的东西 —————————————— 关于撸这个问题,我们已经讨论了无数次 最后达成了一致共识 戒不掉 —————————————— 把希望寄托在下一代不如寄托于自己 因为下一代要20年后才看得到成果 自己目前就可以改变 —————————————— 然后一直都想给下一代更好的教育 殊不知给自己更好的教育,下一代顺理成章拥有更好的教育 —————————————— 又或者 别人问你年轻时干什么去了 你答道:“挣钱养小孩” 感觉还是那么别扭 世世代代没有青春期 —————————————— 最后当别人问你青春时干什么去了 你答道:“追女生” 不是很搞笑吗,你可只有一个青春 —————————————— 那些青春不付出 也会过去的不是? —————————————— 我为你付出的青春,这么多年 你却以一句抱歉当作成全 —————————————— 数学的真谛在于让人养成享受动脑的习惯,而不是恶心到让人再也不想用脑。 这就是英文数学和中文数学的差别。 —————————————— 人人都想成为主角 —————————————— 只要998,基佬带回家 —————————————— 你饿不饿? 我下面给你吃好不好? —————————————— 我真是觉得女生要开博客认真更新的一般都是研究生及以上水平 不然不会有非社交网络的闲话可说 不然不会有一种深深的孤独感驱使她去写一些东西 —————————————— 我已经决定好做结扎手术了😭 —————————————— 太TM伤心了,我就是那个群主 —————————————— 也许做爱本身并不美好 看看国产视频和国外免费的视频就知道了 美好的感觉都是用钱砸出来的 —————————————— 至少全世界的“啊”都念ah —————————————— When you have that opportunity, grasp it, fly higher. —————————————— 走哪儿都有吴亦凡😒 —————————————— Beyond生前不出名的根本原因是取了个英文名 那个年代诶 —————————————— 做大神不易,需要承受相当大的痛苦,面对大量数据的冲击,忍受繁重的任务,应对失眠与焦虑。 —————————————— 你看看中国的家居 客厅一般都是3个大椅子围成一个团 这是典型的封闭思想 不光没用,还占空间 少一个椅子就能多很大一片地方,想干嘛干嘛 你要是说家里人来得多不够坐 我就两句话扔过去: 1. 家里一年365天,2天来人,2/365,有363天都看着堵心 2. 人来得多没关系啊,家里有的是便携式靠椅 —————————————— 但是最要紧的是在句子中找不认识的单词记;在段落中找不认识的句子记;在文章中找不认识的段落记 记啥?记英文一一对应的中文意思呗! 中英转换(中文含义赋值到英文)是最快的语言学习方式。 —————————————— 其实我们人生中大部分时间都在说服别人相信自己 —————————————— 你有什么病? —————————————— 你谁呀 —————————————— 食谱中说的适量都是凭感觉 —————————————— 学英语越深入,你就会发现当年白话文是仿英式词性结构制作而成的 用英文思维常常能发现许多语文词性结构上的病句 —————————————— 作为一个精神病人 你们应该多说话 —————————————— “激烈的批评被消灭了,他们再来消灭温和的批评,等到温和的批评都没有的时候,他们就消灭那些保持独立不​赞美人了,到最后,如果鼓掌不起劲,都会被消灭。”——《动物庄园》 ​​​ —————————————— 报纸越干净,社会则越肮脏; 电台越和谐,世道则越可怕; 电视越美好,生活则越难过; 电影越高尚,真实则越虚伪。 —————————————— 绝世武功秘籍,10块一本。 —————————————— 百度那个傻逼 搜索引擎连谁是原创谁是盗版都搞不清 还搞什么self-driving 本职工作都忘了 —————————————— 当然,外文流行歌描述的大多是一群不想穿衣服的原始人。 —————————————— 听许嵩的中文歌和别人的中文歌的区别是 别人永远停在小学生、初中生的水平 许嵩却一路从小学生成长到初中生到高中生,最后到大学生… 我指歌中的世界观 —————————————— 做音乐还是要基于现实,高于现实 —————————————— 首先他们阻止你访问敏感网站 接着他们干扰你访问主流网站 然后他们屏蔽你访问用的VPN 再来他们降低你出国网络速度 最后他们干掉你加速用的跳板 《局域网是如何炼成的》 —————————————— 分享金玟岐的单曲《爱呀》: http://music.163.com/song/28285912/?userid=280429778 (来自@网易云音乐) —————————————— 不过可以确定的是 不爱听歌的妹子不要娶,没情调 —————————————— 听我父母讲话智商会变低 —————————————— http://chinadigitaltimes.net/chinese/2017/07/%E8%88%AA%E8%BF%90%E6%BC%AB%E7%94%BB%E5%AE%B6k%E8%80%81%E5%B8%88%EF%BC%9A%E4%BD%A0%E4%BB%A5%E4%B8%BA%E5%85%BB%E8%80%81%E9%87%91%E8%B4%A6%E6%88%B7%E6%98%AF%E7%A9%BA%E8%B4%A6%E7%AE%97%E6%98%AF%E5%BE%88/ 原来如此 —————————————— http://chinadigitaltimes.net/chinese/2017/07/%E5%B9%BF%E7%94%B5%E6%97%B6%E8%AF%84%EF%BD%9C%E6%80%BB%E5%B1%80%EF%BC%9A%E9%87%8D%E8%A6%81%E5%AE%A3%E4%BC%A0%E6%9C%9F%E7%A6%81%E6%92%AD%E5%8F%A4%E8%A3%85%E3%80%81%E5%81%B6%E5%83%8F%E7%AD%89%E5%A8%B1/ 叫你不要看电视 —————————————— 你适合这里: @EasyProgrammingLanguage —————————————— 为什么手机内存加一G就增加很多钱? —————————————— 英雄怕情长气短 而我们已靠岸 —————————————— https://youtu.be/ghugLrMmlM0 —————————————— 我这个人最大的特点就是说到做不到。 —————————————— http://blog.sina.com.cn/s/blog_93509ca2010124eu.html —————————————— 老乡,开门,我们是八路军,我们不拿老百姓一针一线,快开门啊老乡,再不开门我们就开枪了!老乡,你总算是开门了!同志们,除了针和线,其他的统统搬走。哟!老乡,你还有个闺女呐 —————————————— 麻醉后看鸡鸡的走向就能知道该人的生活习惯 向左=平时右手撸 向右=平时左手撸 向上=平时真人撸 向下=平时不撸 —————————————— I mean Chinese, the language. —————————————— No —————————————— Let me tell you what's benefit you can get from getting out of theGFW: 1. high quality sextual videos 2. stupid anti-Communist chinese 3. English documents, which make some people feeling headache —————————————— 人为财死,鸟为食亡。 —————————————— Nothing happens.. —————————————— /list@zh_groups_bot —————————————— 哦 —————————————— 几年以前,我曾经嘲笑过某科技界大佬。当时他说:也许90后、95后会慢慢不知道谷·歌是什么网站。   那一年,这对于我来说简直就是世界上最好笑的笑话。谷·歌,全世界最卓越的互联网公司,活在互联网的一代中~国人,会不知道他们的网站? 今天,我收回这句嘲笑。因为这件不可能的事,它慢慢变成了现实。 没有人再关注什么谷~歌不谷~歌。对他们来说,百度也蛮好用的,反正他们几乎没用过谷·歌。没有谷·歌又怎样?大家还是开心的看微博,刷朋友圈,聊微信,听歌,看娱乐节目。对于从来就不知道谷·歌的人来说,少了谷·歌又有什么影响? 慢慢的,它们就没有了,就像从未存在过 多年前,我们也是可以登陆Facebook的。其实这个网站和校内一样,也挺蠢的。可在上面你能看到老外们的生活,可以轻易的跟一万公里以外的人互相拜访,可以看到很多根本不会开到校内上的主页。你用汉语回复,下面给你聊起来的可能是香港仔,可能是台湾人。你用英语回复,说不定有比你英语用的更蹩脚的寂寞的北欧人来跟你搭讪。你感觉地球真的变成了地球村,你还没拉门走出去,别人就推门走了进来。 然后,它就没有了。起初,它的失踪激起了很大的声音,后来,声音就消失了。 多年前,我们也是可以登陆Twitter的。其实这个网站和微博一样,也不过是些信息流,刷上一整天,也不见得有什么用处。但至少,你可以以最快速度获取你想知道的任何新事,你会真正了解什么事情在全世界是流行的,而不是经过各种截图、翻译、转发,甚至曲解、断章取义、黑白颠倒的东西。你知道的是真相,赤裸裸的,也许有点太短的真相。但至少中间不会有无数人的加工与再加工,偏激、片面,就在这个过程中产生了,不管后来者有意还是无意。 然后,它就没有了。首先是它的本体没有了,然后它的模仿者也没有了,模仿者的模仿者也没有了。只剩一个模仿者的模仿者的模仿者,现在你每天能在上面看到无数广告。 多年前,我们也是可以登陆YouTube的。对于有的人来说,这个网站就是个大型优酷,当年有人信誓旦旦的说,没有YouTube,我们中国人会很快让优酷超过YouTube。可这么多年过去了,视频还是那么卡,内容还是那么垃圾,原创还是那么容易被盗窃,视频丰富度还是那么的可怜。在YouTube上,你能看到全世界最棒的手艺人,最逗乐的笑话,最天马行空的创意,最激荡人心的音乐,最美好的完美瞬间,可在优酷上,你想看一分钟视频,请先看半分钟广告。 哦,对了。Instagram,有些人可能感觉它和QQ空间也差不多。可我在上面关注了六百多个摄影师,它们都是顶好顶好的影像记录者,每天看他们的作品,我感觉到很幸福,那种即使没有到那里去,也身临其境的幸福。我还在上面认识了一个日本的爱自拍的帅小伙,一个爱喝酒的韩国大叔,一个十年前到过中国今天会在每张我发的紫禁城照片下点赞的美国大爷,一个美丽无比的俄罗斯妹子,我和他们基本上都难以交流,语言是很大的障碍,但几个简单的单词,心意也就到了,这种感觉,有时候比多年老友相聚还兴奋。因为这是人类不同族群自由交流互相沟通的过程,这种过程很神奇,真的很神奇。 可现在,它没有了,它之所以没有就因为在某个特定的时间你在搜~索~特定的词汇时,会搜出来特定的照片。虽然这么搜的人并不多,虽然看到的人也不会大惊小怪,也不会觉得天黑了,天亮了,天要塌了,天要变了。可它就是没了,Instagram,就这么没了。谷~歌也是这么没的,Twitter也是这么没的,Facebook也是这么没的。不知道是什么人,在什么场合,说了什么话,下了什么决定。就要有超过十亿人像陷于哥谭市的孤岛里一样,看着一座又一座桥梁被炸掉,又被炸掉,又被炸掉,然后,就什么都没了。 我时常觉得悲哀,真的好悲哀,一个我根本不认识也不知道是谁的人,也许是一个群体,在不断抢走我身边的东西,而我却无能为力。我抱怨一声,他听不到,任何人都听不到。我怒吼一句,身边的大多数人却像看疯子一样的看着我。我哀嚎一声,这声音被阻碍在黑黑的幕墙以里。我发出尖锐的嘶吼,这声音传不了多远,就和我那被抢走的东西一样,消失了,不见了,就像从来没存在过一样。 对于本来就没存在过的东西,有谁又会觉得在意呢?那些本来拥有又被掠夺的人的哀愁,后来的人又怎么懂呢?我曾经是拥有一切的,我曾经是拥有世界的,我站在这片土地上,呼吸的是自由的空气,饮下的是自由的琼浆玉液。就在长的无法计数的时间里,我自由生命的一部分又一部分就这么被杀死了,突然就杀死了。可我还始终觉得,它们还奄奄一息的活着,就像它们是慢慢的死去的一样。 可它们终归是死了,而且随着它们的死,愈来愈多的事情慢慢的发生了,很慢很慢,几乎不被人察觉,可还是发生了。 没有谷·歌,我可以用百度呀。可某些结果被越挪越后,越挪越后,最后就不见了。就像本来就不该搜出这个结果一样。 没有Facebook,我可以用校内呀。可你想发只有在Facebook上能发的文章,很快在校内上就失踪了。接着,校内变成了人人,话题变成了人人都关心的话题。大家都在抢着看星座、明星、八卦、娱乐。没有人会关心什么消失了,反正它们本来也没多少存在感。 没有YouTube,我可以用优酷呀。可你却经常只能在优酷上看到抄袭别人的作品,而且还不署名,而且还洋洋得意,而且还自我陶醉,就好像那个idea本来属于他自己一样。你看了还要惊呼,他是如此的有创意!好一个抄袭的创意,可你却不知道,因为你不知道这个世界上有个网站叫YouTube。 没有Twitter,我还可以用微博呀。可你想知道最近发生了什么,你搜的越勤快,越能看到越明显的“根据相关法律法规,相关搜索结果不予显示”。时间长了,你想,反正知道了也没什么用,不如不看了。 慢慢的,一扇又一扇的门关上了。今天你打开世界上最大的博客网站,发现它没了。明天你一看,世界上最好的设计师分享网站没了,一开始是刷新的很慢很慢,后来它就没了。过两天再一看,平常每天都会读两篇文章的媒体网站没了,那里的文章缤纷多彩,最后都变成了该页无法显示几个字。再过几个月,大学的网站不让上了,摄影师的网站不让上了,就连百度日本这种自家网站,也没了。 接着,漫画看不了了,接着,动画看不成了。接着,美剧英剧失踪了。下载美剧英剧的网站又又又失踪了。尊重正版,保护权益,行吧,然后字幕网站也没了。 游戏没了,你习惯性登陆的游戏网站,发现下载栏正在整治中。论坛关了,天天都在看的论坛,突然接到相关部门的电话,因为“报备问题”不让办了。个人网站,私人博客,对不起,说没就没有,你在上面存了多少多年辛勤耕耘的东西都没用。 你关注的人,有一天你登陆微博,发现他怎么好久都没说话了,然后你搜索了一下,发现他的账号不存在了,而且你搜他的名字,他的名字未予显示。 一盏一盏的灯,灭了。四面八方的光源,消失了。我们生活的五光十色的世界,变成了一片黑色。 天黑了,那么睡觉吧,但愿长醉不复醒。 最后,我们变成了一群做梦的人,这个梦的名字,叫根·据·相关·法·律·法·规,相关搜·索结·果·不·予·显·示·梦。 —————————————— 随着时间的增长,我变得越来越屌,怎么办呢? Over time, I became a geek. —————————————— 不管什么时候通往上层的通道都是关闭的 —————————————— 我要做西餐 —————————————— 饼 Frikadellen 鸡蓉蘑菇汤 Chicken Mushroom Soup 德式洋葱汤 German Onion Soup 炸春卷 Spring Rolls 香草猪排 Pan Fried Pork Loin with Herbs 中式面条 Chinese Noddles 曼哈顿海鲜汤 American Seafood Soup 香辣烤鸡翅 BBQ Chicken Wings 卡真鸡排 Cajun Chicken Breast 滨豆汤 Lentil Soup 维也纳煎乳牛排 Wienner Schnitzel 白菜花 Cauli Flower 咖喱鸡肉串 Chicken Skewer with Curry 米兰鸡 Millanese Chicken Piccate 曼哈顿蛤蛎汤 Clam Chowder Soup 烤鸡腿 BBQ Chicken Leg 金枪鱼三明治 Tuna Sandwich 烤土豆 Grilled Potato 维也纳香肠 Wienner Sauages 牛肉炒饭 Fried Rice withBeef 香草奶油斜切面 Penne Carbonara 水果鸡肉串 Fruit Chicken Skewer 意大利蔬菜汤 Minestrone 培根炒蛋 Fried Egg with Bacon 法式洋葱汤 French Onion Soup 青豆汤 Green Bean Soup 泰式肉松炒饭 Fried Rice of Thai Style 炒什锦蔬菜 Fried Mixed Vegetable 猪肉饼 Meat Ball 腰果鸡丁 Sauted Chicken Breast with CashewNuts 牛肉串 Beef Skewer 鸡胸片 Chicken Breast 鸡肉串 Chickem Skewer 火腿奶酪三明治 Ham &Cheese Sandwich 奶油土豆汤 Potato Cream Soup 中式点心 Dim Sum 香草鸡排 Pan Fried Chicken withHerb —————————————— (一)早餐类:Breakfast 1)法式煎吐司 French toast 2)蛋卷 Omelet 3)炒蛋 Scrambled egg 4)煎培根 Fried bacon 5)水果麦片粥 Oatmeal with fruit (二)三明治类:Sandwich A:吐司类:Toast 1)火腿奶酪三明治 Ham and cheese sandwich 2)总汇三明治 Club sandwich 3)吞拿鱼三明治 Tuna fish sandwich B:法国面包/法棒类:Baquelte 1)鸡肉/牛肉三明治 Chicken/beef sandwich 2)培根菠萝三明治 Bacon and pineapple sandwich 3)时蔬三明治 Seasonal vegetable sandwich (三) 汉堡类:Hamburger 1)牛肉汉堡 Beef hamburger 2)鸡香汉堡 Chicken hamburger 3)鱼排汉堡 Fish hamburger (四)意大利面类:Italian pasta 1)意大利肉酱面 Bolognaise spaghetti 2)蝴蝶面配番茄汁 Farfalle with tomato sauce 3)蛋黄培根空心粉Macaroni carbonara 4)奶油蘑菇宽粉 Tagliaelle with mushroom cream sauce (五)沙拉类:Salads A:冷汁制作 Dressing 1)蛋黄酱/美乃滋 mayonnaise 2)意大利油醋汁 Vinaigrette dressing 3)法国汁 French dressing 4)千岛沙拉酱 Thousand Island dressing 5)凯撒沙拉酱 Caesar dressing 6)它它沙拉酱 Tartar dressing B:沙拉/色拉/沙律 制作 salads 1)凯撒沙拉 Caesar salad 2)薯仔/土豆沙拉 Potato salad 3)鸡肉沙拉 Chicken salad 4)蔬菜沙拉 Vegetable salad 5)什锦水果沙拉 Fruit salad (六) 汤类:Soups 1) 法式洋葱汤 French onion soup 2) 薯茸/土豆奶油汤 Potato cream soup 3) 法式蘑菇汤 Mushroom soup 4)意大利蔬菜汤 Minestrone 5)匈牙利牛肉汤 Gulash soup (七) 批萨类:Pizzas (手抛批萨 Handy pizza ;方形批萨 Square pizza) 一、批萨番茄酱制作:Making tomato sauce 1)自制意大利风味番茄酱 Italian style tomato sauce 2)自制美国风味番茄酱 American style tomato sauce 二、批萨的制作:Making pizza A:意大利式批萨类 Italian style pizzas 1)意大利香肠批萨 Salami pizza 2)培根蘑菇批萨 Mushroom&bacon pizza 3)四色奶酪批萨 Four cheese pizza 4)意大利蔬菜批萨 Vegetable pizza B:美式批萨类:American pizzas 什锦批萨 Mixed pizza 1)至尊牛肉批萨 Perfect beef pizza 2)什锦海鲜批萨 Seafood pizza 3)经典鸡肉批萨 Classical chicken pizza (八)牛排类:Beef steak 一、牛排酱汁的制作:Making sauce for beef steak 1)烧汁/布朗汁 Dime-glace/Brown sauce 2)香草酱汁 Herbs sauce 3)黑胡椒酱汁 Black pepper sauce 4)蘑菇酱汁 Mushroom sauce 5)红酒酱汁 Red wine sauce 二、牛排的制作:Making beef steak A:煎牛柳/牛菲力配上述任何汁 Grilled beef tenderloin with any sauce B:煎西冷/牛外脊配上述任何汁 Grilled beef sirloin steak with any sauce 三、牛排成熟度的掌握 How do cooking beef steak? 1~2成熟 Rare ; 3~4成熟 Medium rare ; 5~6成熟 Medium ; 7~8成熟 Medium well 9~10成熟 Well done 四、牛排的主食与配菜 Served with 1)薯泥/土豆泥 Mashed potato 2)炒薯仔/土豆 Pan fried potato 3)炒混合蔬菜 Pan fried mixed vegetable (九)开胃菜:Appetizers 1)法式蘑菇烩蜗牛 Stewed snails with mushroom and cream sauce 2)法国勃垦地烤蜗牛 Baked snails “Burgundy style” (十)主菜类:Main course 1)煎鲈鱼配米饭伴意大利黑醋汁 Grilled seabass served with French rice and balsamico sauce 2)蘑菇奶油烩鸡 Stewed chicken leg with mushroom and cream sauce 3)匈牙利烩牛肉 Beef Gulash 4)法国蓝带煎鸡 Cordon Bleu chicken breast 5)烤鸭胸配香橙浓味汁 Baked duck fillet served with orange sauce (十一)甜品类:Desserts 1) 奶油泡夫 Puff with wipping cream 2) 巧克力蛋糕 Chocolate cake 3) 巧克力/ 草莓慕斯 Chocolate/strawberry mousse 4) 法式苹果挞 Apple tart 5) 自制巧克力酱 Home made chocolate sauce 6) 甜品类装饰 Dessert decoration 菠菜汤 Spinach Soup 烩牛肉 Beef Goulash 炒土豆 Fried Potato 酸辣汤 Hot &Sour Soup 咖喱海鲜汤 Seafood Curry Soup 香煎茄子 Pan Fried Eggplant 俄式烩牛肉 Stronganoff Beef Goulash 维也纳香肠 Wienner Sauages 黑椒牛排 Beef Steak with Black Pepper Suuce 墨西哥鸡肉饼 Mexican Quesadillas 炸鸡腿 Deep Fried Chicken wings 酿焰猪排 Stuffed Pork Chop 金枪鱼意大利面 Spaghetti with Tuna 墨西哥牛肉丸子汤 Mexican Beef Ball Soup 蔬菜炒饭 Fried Rice with Vegetable 螺旋面 Fussili Pasta 西兰花 Broccoli 香草西红柿汤 Tomato Basil Soup 西红柿角Tomato wages 米兰式西兰花 Fried Broccoli 奶油南瓜汤 Pumpkin Cream Soup 蓝芝士菠菜汤 Spinach Soup with Blue Cheese 米兰式猪排 Pork Milannaise 煎土豆 Roasted Potato 蘑菇鸡排 Pan Fried Chicken with Mushroom 香酪猪排 Pork Cordon bleu 香酪鸡排 Chicken Corden Bleu 洋葱圈 Onion Rings 奶油烩猪柳 Pork Ragout 培根牛肉串 Bacon and Beef Skewer 印尼炒饭 Nasi Goreng 黑椒牛柳粒 Sauted Beef Tenderloin with BlackPepper 奶油烩鸡 Chicken Ragoat 扬州炒饭 Fried Rice of Yangzhou Style 红烧牛腩 Beef Stew 地中海茄子汤 Mediterranean Eggplant Soup 蘑菇猪排 Pan Fried Pork Steak with Mushroom withMushroom 香辣猪肉丝 Sauted Pork Slice of SichuanStyle 地中海青椒汤 Mediterranean Bell Pepper Soup 奶油西兰花汤 Broccoli Cream Soup 土豆泥 Mashed Potato 蜜汁胡萝卜 Fried Carrot 煎乳牛排 Jager Schnitzel 炸猪排 Prk Schnitzel 肉面包 Meat Loaf 扒蔬菜 Grilled Vegetable 西红柿意大利面 Spaghetti with Tomato Sauce 香炒凤尾虾 Pan Fried Shrimp 鸡肉卷 Chicken Rolls 猪肉卷 Pork Rolls 奶油西葫芦汤 Eucchini Cream Soup 红菜头片 Red Cabbage 奶油胡萝卜汤 carrot Cream Soup 鸡蛋卷 Omelet 甜玉米汤 Sweet Corn Soup 匈牙利牛肉汤 Beef Goulash Soup 柠檬土豆汤 Lemon Potato Soup 德式小香肠 Small Sauages 奶油炬土豆 Gratin Potato 马来西亚炒面 Malasier Fried Noddles 牛肉 —————————————— 整天处于欲求不满的状态,好烦 —————————————— What's the meaning of life? Movie, coding, or hard work? —————————————— (yamete)=不要,一般音译为“亚美爹”,正确发音是:“亚灭贴 ” (kimochiii)=爽死了,一般音译为“可莫其”,正确发音是:“克一莫其一一” (itai)=疼,一般音译为“以太” (iku)=要出来了,一般音译为“一库” (soko dame)=那里……不可以 一般音译:“锁扩,打灭” (hanaxitie)=放开我 音译:“哈那西贴” (hatsukashi)=羞死人了,音译:“哈次卡西” (atashinookuni)=到人家的身体里了,音译:“啊她西诺喔库你” (mottto mottto)=还要,还要,再大力点的意思 音译:“毛掏 毛掏!” 呀大/呀~(yada)——不要 打麦(damai)——不行 奥内该(oneigai)——拜托 斯该(sigai)——好厉害 给木基(gimuji)——好舒服 伊呦(yiyou)——很好 噢金金(oujinjin)——小弟弟 偶那噶西(ounagaxi)——小妹妹 克类(kelv)——出来了 可一达(kida)——来了 以古(yigu)——要去了 啊兰假耐(alanjianai)——会怀孕的 八金(bajin)——处女 以修妮(yixiuni)——一起吧 以各(yige)——高潮了 —————————————— 日本AV无码系列 BTSYNC密钥地址:BKESIRXAOLROZTSFTRUCCHNA32622LKEZ —————————————— news.ifeng.com/shendu/ndzk/detail_2012_01/19/12077538_0.shtml 韩国的网络十分发达,为什么要实行网络实名制? “很多网民认为,这项政策的推出是政治博弈的结果,韩国执政党大国家党是为了控制网上舆论。”韩国专栏作家金宰贤说。 这个说法,与李成贤的分析比较一致。他认为,这和韩国的上层权力机构有关,韩国总统的权力非常大,而且总统所属的大国家党在内阁中占有巨大优势,反对党的声音非常小。而韩国的网络实名制正是在大国家党执政时期得到了极大强化。 而在外界看来,如中国媒体人士安替认为,实名制真正的诱惑是:打通虚拟治理和地上政府管理,让政府拥有虚拟世界的绝对权威,或者让网站拥有地上的政府权力。 —————————————— 我说可以 又没说必须 —————————————— 你们如果有谁在中共上班,可以举报他 —————————————— 一个内陆激进分子 —————————————— 你一定是男的 —————————————— 为什么夏天会有蝴蝶? 不是春天吗? —————————————— 不对,只有你一个活人 —————————————— 学会了电动摩托 —————————————— 人有多大产,地有多大胆。不对,我是说,能力越大责任越大。不对,我是说有多大的能力做多大的事。 —————————————— NO —————————————— I shitted on my crotch —————————————— @Shinohara_Rin —————————————— And I know who you are —————————————— I like it too —————————————— Why you insist to understand me? —————————————— Because that's my mind. —————————————— Only electronic music will take me flying away. —————————————— 关键在于影视剧都把底噪给拿掉了 不真实 实际上在丛林噪音非常大,人们对话时周围超过5个人就可能非常吵。 —————————————— 不写、不看日记的话,很多时候还是在走老路。 ——————————————  在美国听名人演讲也是如此。名人孤单地来,孤单地去。并不因他有名,台下问问题的人便显出胆怯。在美国,自由的含义之一便是尊重每个个体,哪怕他是多么默默无闻。相反,在中国做个孤独的普通人,是最危险和最寂寞的。一个人稍微在某件事上与众不同一点,便可引祸上身。我们老祖宗的智慧,便是尽量消灭自己的个性,多往人多的地方站。中国近代史上运动来运动去,一大原因便是大家因恐惧而跟着形势走。在中国做学问,也要依附成理;大学各系里的老师往往都是本校本系毕业的同门,学术上以校为派。在美国学界,年轻人总想独树一帜,弄一套自己的理论体系来玩玩。留校教书被当做“近亲结婚”而被人不齿。热爱自由的人说起话来,当然少有顾忌而充满个性,即使说的是科学上的术语。  在美国听名人演讲也是如此。名人孤单地来,孤单地去。并不因他有名,台下问问题的人便显出胆怯。在美国,自由的含义之一便是尊重每个个体,哪怕他是多么默默无闻。相反,在中国做个孤独的普通人,是最危险和最寂寞的。一个人稍微在某件事上与众不同一点,便可引祸上身。我们老祖宗的智慧,便是尽量消灭自己的个性,多往人多的地方站。中国近代史上运动来运动去,一大原因便是大家因恐惧而跟着形势走。在中国做学问,也要依附成理;大学各系里的老师往往都是本校本系毕业的同门,学术上以校为派。在美国学界,年轻人总想独树一帜,弄一套自己的理论体系来玩玩。留校教书被当做“近亲结婚”而被人不齿。热爱自由的人说起话来,当然少有顾忌而充满个性,即使说的是科学上的术语。 想来上的最近几次math class并没有一开始就给我公式让我去背,反倒是给了很多data,让我们从中推出规律 —————————————— Thank you for your listening. —————————————— I got many problems in the past 19 years. That's fine, and I normally choose to forgive what I have done. So every time bad things came and gone as they come, they don't really hurt me. Now I want to tell you a story, it's about me, the real me. When I was 10 years old, I got a habit, which was playing my little cock. That was really fun, you know, to a 10 years old boy. Generally, I would rotate it over and over again. Imagine that, lying on a big soft bed, doing this in the night, you must gonna love it. And yes, I know that's not cool, but who cares! As long as we get fun. It's time to go to primary school. Haha, just in the first year of primary school, I came across bullying. Bad luck, isn't it? Don't worry. I got my older sister. She will protect me. So after chasing the bully around the playground several times, she gave up. And we came back to the home together. Oh, yes! There has another thing I got clear memories. One day in the dusk, I was playing at school with my sister and girl-next-door. It's holiday, so there got few people. One thing is for sure, that is I shitted in my crotch. What a horrible story, I guess. But it's true, absolutely true. Fortunately, since then I never did it again. OK, all those things just happened in my childhood. For more, there has another thing vivid in my mind, my cat. I used to have a white cat, it's maybe my best friend in childhood, even though It may not think so. —————————————— 他们是参与镇压的吗? 只要他敢公开承认,工资就不低 —————————————— 辛亥革命不是革命党人的起义 实际上好多地方政府换了快牌子就算革命了 —————————————— 再说了,那些都是清华北大的学生,人家比你高几个阶级 还有那些参与镇压的官兵,现在退休金至少是你工资的两倍 你瞎闹腾反倒是做了一小撮特权阶级的工具 —————————————— 中国每小时平均5个人死于黑社会 不用在意那些细节,是人都会犯错,国家也是 —————————————— 32:15亿 有意思吗 —————————————— 谈到高考,除了紧张到睡不着之外并没有其他感想 —————————————— 研究普通人看电视 一般人请客时,电视会一直开着,但实际上没一个人看 至少说明这家人没效用观念,同时也不太注重噪音污染 —————————————— 时间是个好东西 —————————————— 其实他哪里知道 除了这几个TG群以外 我在QQ群的逗逼奋斗史呢 —————————————— 唉,可能除了这个群以外,我留下的足迹真的很吸引人 —————————————— @Shinohara_Rin 昨天告诉了我他的电话号码 —————————————— 还有英语这些 —————————————— github等 —————————————— 但有趣的是,我告诉他那些东西,他一直在用… —————————————— 我以前还带过一个13岁的小孩进TG 结果它接受不了以前无知的事实(我向他介绍了主流编程宇宙),离开了TG群 —————————————— 想来在TG上混这几年,就只有豌豆这一个朋友总是available —————————————— And by the way, true friend will not leave... As you can see. —————————————— bye —————————————— But recently, I am not have too much to say in this group. I'd like to focus on programming skills. —————————————— I don't know, whatever you want —————————————— It's the darkest side of me. —————————————— .. —————————————— Oh my god, why you come to here? —————————————— 有个外国人问我为什么喜欢孙悟空。我回答他:超人,钢铁侠,美国队长为你们维护正义七八十年。而孙悟空,为我们斩妖除魔,五百年。你们有很多英雄。我们只有他一个。 —————————————— 可是我怎么还拿着手机? —————————————— 天天都在玩的日子该到头了 —————————————— 对不起我自己 —————————————— 感觉每天都在蹉跎岁月 对不起爸妈 对不起人民 —————————————— 江山只指中国内陆 人类指整个地球 —————————————— 中国影视剧一般是以“肩负江山重任”为依托 而美国影视剧主要是以“肩负人类命运”为依托 —————————————— 长大意味着孤独和成为超现实主义者 —————————————— 分享陈旭的单曲《东北特产不是黑社会》: http://music.163.com/song/69702/?userid=280429778 (来自@网易云音乐) 中国hi-pa的骄傲 —————————————— 爱情是一个人与另一个人的磨合中逐渐过渡到对物质的纯粹的需要的过程当中消失的东西。 —————————————— 刚刚偷偷瞄了一眼QQ空间 我们不是一路人,哈哈 —————————————— 时差调整不过来,真囧 —————————————— 事实上,如果你自己不活跃,别人是不会替你活跃的 所以我们经常看到群主在讲话 —————————————— 所以你们中的大多数人都是加了很多死群 —————————————— 悲观的人,先被自己打败,然后才被生活打败;乐观的人,先战胜自己,然后才战胜生活。悲观的人,所受的痛苦有限,前途也有限;乐观的人,所受的磨难无量,前途也无量。在悲观的人眼里,原来可能的事也能变成不可能;在乐观的人眼里,原来不可能的事也能变成可能。悲观只能产生平庸,乐观才能造就卓绝。从卓绝的人那里,我们不难发现乐观的精神;从平庸的人那里,我们很容易找到阴郁的影子。 —————————————— 分明就是一人演两个角色 —————————————— 那个人妖是逗逼吗 上大学还带哥哥 —————————————— 没准他哥嫉妒我的才华😏 —————————————— 额…那就没办法了 —————————————— 她这个年龄和你一样,都对世界非常好奇 但明明是学习能力最强的时候 —————————————— 从初中毕业就去某个学校读5年 然后得到大专文凭 —————————————— 从她的年龄以及提供的信息 她是读的5年式中专 —————————————— 能重要的是,加个群干嘛把她哥给带上 很明显这是依赖嘛 —————————————— 难道我答错了什么吗? —————————————— Did you hear about a movie which named split? For more, It's maybe a scam. —————————————— 嫉妒我干嘛? 难道是想上他妹妹? —————————————— 我根本就没有图 拿什么斗😂 —————————————— 看来又有希望了😂 —————————————— every one can contact me on internet. —————————————— online —————————————— 就老去吧 I'm always online —————————————— 估计程序员只能孤独终老 —————————————— 官方给的镜像死活会出错 —————————————— 真TM SB —————————————— 人家有男朋友了,好烦 —————————————— 本来我活在网络这么多年,都忘了样貌是什么东西 被这个女的一问照片,就蒙蔽了 —————————————— 或者在大学锻炼身体,变成肌肉男 —————————————— 唉,我好不容易的跨国恋就这么完结了 —————————————— 他们国家的男性除了 IT guy ,基本就是膀大腰粗 —————————————— 是不是感觉很悲凉,身材太小,就上不了外国女性… —————————————— 这几句话挺美 —————————————— https://blog.netsh.org/about 诡异的图片,不能下载,但能看 —————————————— 就几个人玩… —————————————— 中文群组不靠谱 —————————————— reply: 信不信我艹了你,in my mind —————————————— 他们不怎么骂 —————————————— 高考症候群 —————————————— 我就是啊 —————————————— 我喜欢 上你 时 的内心独白 —————————————— 分享了#名家散文#的节目《山本文绪:孤僻》: http://music.163.com/program/904895754/96721794/?userid=280429778 (来自@网易云音乐) 我觉得这种女孩很适合我😂 —————————————— 看完那么多科幻 就觉得社会学的专家不流弊 还是工程师会魔法 —————————————— 分享了#名家散文#的节目《胡适:柴米油盐的日子就算过了一生吗》: http://music.163.com/program/904937362/96721794/?userid=280429778 (来自@网易云音乐) —————————————— 然后就不知道看什么了 —————————————— 我把豆瓣上,万评以上的,科幻8星作品,刷完了❤️ —————————————— 欧! 我把豆瓣上万评以上的科幻8星作品刷完了❤️ —————————————— 《PREDESTINATION》看了这个你才知道什么叫脑洞大开。 —————————————— 我居然做了梦中梦中梦 我醒来看手机,15点了,该起床了,继续睡;发现前面是个梦;接着又醒来看手机,11点了,该起床了,继续睡;结果还是梦。 不过刚刚我醒来看手机,竟然才9点多,哈哈,这就是时差的恢复正常所要经历的吧。🙈 —————————————— 我评价社会,就两个字:浮躁 在社会上继续学习是比较困难的 所以别在最适合学习的时候放弃学习 —————————————— I don't think it's good at all. You know, one man can't rely on one point to support the whole building. —————————————— 123moviesfree.com/watch/supergirl-s02-2015-i.2-online-free-123movies.html —————————————— 突然想到卡通,那些配音演员、那些制作者,其实也是在延续他们的童年梦。 —————————————— 刻意做小众,必然会大众 刻意做大众,必然会小众 —————————————— stbos.bj.bcebos.com/cvTyrael.html 原来全民K歌的开发长这样😂 —————————————— 分享LE_CHAT创建的歌单「【被施过魔法】适合大开脑洞/做白日梦的BGM」: http://music.163.com/playlist/151202235/41991812/?userid=280429778 (来自@网易云音乐) —————————————— 突然想到,政治意识形态催生的一堵墙隔绝出了两个世界。 东方用这堵墙免费享受西方作品,同时隔绝了科技。 西方想打破这堵墙卖版权和科技。 —————————————— 分享阿肆/林宥嘉的单曲《致姗姗来迟的你 》: http://music.163.com/song/432506809/?userid=280429778 (来自@网易云音乐) —————————————— 好看不? —————————————— 不知道,不过我SS又看不了YouTube了 防火墙真坏,我得去检查一下 —————————————— 只要点TG YouTube链接的图片就可以弹出视频窗口 点右上角就悬浮了 —————————————— Wow,这种小窗口好省时间 —————————————— 我这里有个哑巴,娶了个漂亮媳妇,然后漂亮媳妇成了别人的小三,别人把哑巴给做掉了,从此别人和小三过着幸福快乐的生活。 —————————————— 老司机最痛苦的地方不是控制不了性欲 而是抑制不了失眠和神经衰弱 如果上天再给我一次机会,我再也不装逼复读了 —————————————— /start@zh_groups_bot —————————————— /update@zh_groups_bot —————————————— 看久了真的会被影响的 —————————————— https://youtu.be/MhdumNmXA74 小图,这个群你不该进的 这是精神病人的世界 —————————————— 恩 —————————————— 昨天没睡觉,今天再加两片褪黑素看效果如何 —————————————— 为什么别有一番风味 —————————————— 分享许嵩的单曲《看不见的风景》: http://music.163.com/song/168005/?userid=280429778 (来自@网易云音乐) —————————————— [https://m.bilibili.com/video/av9937776.html] [洛天依 原创《上下上下》_VOCALOID·UTAU_音乐_哔哩哔哩] is good,have a look at it! —————————————— 告诉你一个测试机器人的好地方 —————————————— 为什么 —————————————— 像我这样的年轻人,从不为自己打算 —————————————— From this talk, we know twree things: 1.中国的选举是水的,不代表人民 2.中国的司法不独立,人治严重 3.中国的政府行事不公开,媒体被管控,人民不能很好监督政府 https://www.youtube.com/watch?v=ZmTKkIQ8EgE&t=409sv —————————————— 我妈竟然当着面说我很神 真是应了这个群标题 —————————————— 阴谋阳谋自古以来就是文科生义不容辞的责任。 那些厌恶官场黑暗的人就是些SB,连文科生的宗旨和宿命都不知道,靠着语文好就当了官,最终也只能靠写一些小骚文度过余生。 —————————————— 我是个奇怪的反革命 到国外社区爱国 在国内社区卖国 🙈 —————————————— 我们应该崇拜毛泽东,只因其智谋无人能及。 We should admire chair Mao, just because his wisdom which no one can compare. —————————————— 对了,还是自己混合的乱七八糟的东西,重新压制的垃圾 加了特别多香剂 90是实打实的硬梆梆,这个一瓣就碎 —————————————— 这东西根本就是90干粮的盗版,90直接以桶卖,便宜多了 这东西给加个外包装就以10为单位卖… —————————————— 我觉得,政府无限的权力,都是大部分人自己放弃的。假货坑爹,让政府审核。孩子管不好,让政府关网吧。有人在微博骂我,让政府去删。房价太高,让政府去限购。我们的文化实在太独特,创造出了家长式威权政府,GFW 正是在这种背景下产生的,一个社会矛盾的终极调和器,最终生活不能自理的你每天做的每一件事情都要给政府审查一遍,以免伤害到其他同样生活不能自理的人。这是一个零和游戏,越和这样的用户打交道,越对未来持悲观态度,觉得 GFW 可能永远也不会消失,而墙内的这个局域网看起来还似乎生机勃勃的自成一体,真是让人绝望。 —————————————— 明明是在家,也紧张得睡不着… 高考害人 —————————————— 人生没有版本控制,但有容错和检测机制,你总可以从log中知道你接下来要做的事。 —————————————— https://pan.baidu.com/wap/share/home?uk=3963875283&third=0 我很愿意和这样看过无数中外电影的妹子结合 —————————————— 要我说,达到平衡就好 这些是小概率事件 —————————————— 这里我想探讨一个很有意思的话题,有很多人,把直视社会阴暗面当做是一种“负能量”,但他们却忽略了一个事实:无论是聂树斌案,还是强拆案、山东辱母案、太伏中学坠楼案,这些刷爆了朋友圈与网络的新闻,并不是某人刻意去搜寻的,而是它就赤裸裸地摆在你的面前,就差顶到你眼睛上了,难道要“视而不见”才算是正能量?难道看到了却当做什么都没有发生才算是正能量?难道看到二十岁少年蒙冤而死一朝昭雪,你内心却毫无波澜平静如水才是正能量?难道看到儿子刺死辱母者却被判无期徒刑,你丝毫不义愤填膺相反还呵呵一笑才算是正能量? 要有一颗多么麻木不仁的心,才配拥有如此的正能量啊。 有很多人,身为底层,却像高高在上的统治者一样,只想听赞美,不想听批评。但他们却忘了一句话,“若批评不自由,则赞美无意义”。如果监督政府,监督官员,揭露社会不公算是负能量的话,那所谓的正能量就是让人闭嘴,让人看到却不能说,让人把自己的言论和思想掐死在萌生之初。 —————————————— I guess you don't know English. We are different. —————————————— 垃圾,非字母的语言都是专制的工具 —————————————— 其实有时候,我觉得毛泽东是个好人 他推崇英语,曾提议把中文变为字母语言 相反那些鼓励文言文的人最为可恶 —————————————— 但高考是白天 得赶紧调整时差 —————————————— 我晚上不睡觉只是为了成为我理想中的人物——夜魔侠 —————————————— 那几本书的内容 —————————————— 要是我16岁知道这些 人生可能不同 可恶的信息封闭 —————————————— 新加坡打工,有推荐门路吗? 我想去看看 —————————————— 回去看一眼QQ空间,瞬间有了自信 他们都是活在局域网的渣渣😂 —————————————— 好吧,睡眠空间 —————————————— 干嘛睡啊?! 我一般7点睡 —————————————— 我Python是学完了的啊~ —————————————— 你以前认识我吗? —————————————— 你怎么可能知道我半途而废 —————————————— 你会编程吗? —————————————— 能不能讲点实在的 —————————————— 就是这点让我很伤心 我自己又不能控制自己去好好学习 —————————————— 因为我妈就每天工作12小时,昼夜不分的在黑工厂 因为她除了体力劳动外不会其他的 —————————————— 你怎么想? 我总觉得我会进入黑工厂、黑煤矿,反正就是带黑的东西 —————————————— 可是 —————————————— 可以我大脑残存有理性主义 他们告诉我人们都是由利益驱动 一旦我个人找不到工作,没饭吃就完了 —————————————— 就差演说能力 然后可以闹革命了😁 —————————————— 感觉你读了好多书 比我好多了 —————————————— 连自己都控制不了 f*ck —————————————— 对 —————————————— 是的,就不该选文科 要是不选文科,没准我现在就成发明家了 —————————————— 我还是有发现问题: 想法太多,做得太少 就像编程“no demo, no use” —————————————— Nothing 可能这个群就你在看 —————————————— 我知道你 看过你博客 mudkid —————————————— 在哪儿读 沿海和内地是不同的 —————————————— 什么专 —————————————— 你读本科当然不觉得 —————————————— 我要是读大学就不会这么郁闷了 就是因为快高考了,静不下心 —————————————— 这么闲 —————————————— 你读大学? —————————————— 你这时间应该不是在中国 —————————————— 你是偷渡走的? —————————————— 因为心累 好像只有我有病一样 —————————————— 我想解散本群,有人支持否? —————————————— 越牛的工具,上手的门槛越高,通常也就越"小众"。 —————————————— 中国的很多事,官方都不敢说具体,一说具体全是违法的,但是官方偏偏都打着依法治国的幌子。 —————————————— 知道的真相越多,我越痛苦 而后,也越坚强 —————————————— 自从逃离了QQ,神清气爽,再也没有被监视的感觉了 —————————————— 终于找到唱歌的秘诀了 就是不看歌词,听唱 如果闭上眼就能唱出完整的歌,基本就很好听了 唱不好只是不熟的缘故 —————————————— Good enough —————————————— 在幻梦之后,我们还剩什么 —————————————— 社会是个金字塔 人员会流动,但阶层是固定的,forever. —————————————— 举个例子:信息是被加密的。 在一个语言系统中,基础语言(母语)是大家喜闻乐见的大众语言。但由于太多人懂它,不适合把知识或是其他有用的、关乎统治者命门的东西用它来分享、保存。 所以我们要“加密”。加密过程中要保证群体的小范围、精英化,所以我们多用另一种语言来代替。 在中国,英语、古汉语、学科专业术语都有可能被用作加密的工具。 —————————————— 今天来谈谈少数原则 它是指少数人的能力与多数人的能力相等,但由于它更为集中,常常使得少数在较长时间左右多数人。 这是个周期,少数人会被推翻,但在一个极短的时间内。大部分时间还是少数压榨、奴役多数。 —————————————— 年轻人不要老是上网,搞对象你就去书店。书店都帮你们分好类了。想找爱学习的去四六级,想找有气质的你去乐谱区,想找文艺的就去散文旅游区,想找时尚漂亮的你去美容杂志区,想找顾家的去菜谱美食区,想找聪颖的去经济金融区,想找年纪小的去教参区,连年级都分出来了![大笑][大笑] —————————————— 他们说是农民工拉低了国内音乐的品位… —————————————— 了解到口才、销售、计算机是找工作的王牌技能 可以超越学历,靠非正规学校的学习经历 —————————————— 我现在脑袋里都是阶层、阻隔、文化… —————————————— 别傻了,认为自己什么都不行 能力有高低之分是客观事实 并不是每一个人都能成为高手,真实世界也不是只需要高手 打杂的、下苦力的,在各行各业都有,并且都是在时代背景下必不可少的 所以,找到一个你认为能实现自身价值的工种,从小工做起,并不丢人 —————————————— 感觉不看书,18年白活了 可恶的底层环境 —————————————— 真正的爱情,没有暧昧,只是她想给你好心情,你想告诉她你很高兴。 —————————————— 并且许嵩还爱看谷阿莫的电影解说😂 —————————————— 许嵩竟然在本群 —————————————— 你不这样做,别人就把你做了。 —————————————— 1.《骆驼样子》(看知乎才知道,表现农民生活贫苦 却没奋斗精神的被删除。。) 2.《八十年代访谈录》(港版繁体竖排可能会吃力 但绝对值得一看) 3 《七十年代》 (同上 更是) 4 《打工女孩》 (大陆版与港台版是薄与厚的差异……梁文道開卷八分鐘推薦) 5 《袁氏当国》 6 《乡关何处》 (台版是《江上的母亲》 7 唐德刚作品集多数被阉被斩 此处不一一列举 8 北岛、阿城 种种 9.《邓小平时代》(台版叫《邓小平改变中国》) 10.《中国近代史 1600-2000,中国的奋斗》(这个被阉得很多 所以很出名了 徐中约教授该作何感想) 11.《苏菲的世界》 12 《国家的常识》(很不错的一本书!关于“中国”那一章连根拔起删除掉了) 13.《废都》 14 《朱元璋传》 15 《挪威森林》 16 《巨流河》 17 《寻路中国》 18 《江城》(台版叫《消失的江城》) 19 何伟的三部曲之一《甲骨文》大陆压根没上~ 20 《极权主义的起源》(这部书奠定了阿伦特政治思想家的基础!!!) 21《金瓶梅》人民文学出版社删了n多据说 22 《目送》(删除了一篇“国家”;详见http://book.douban.com/review/2517205/) 23 《野火集》 24 《上海生死劫》(88年程乃珊译版亦有删节 现被列为禁!此书绝对是你了解文革时代的残酷斗争的不二选择! 此书和巫宁坤的《一滴泪》成为西方了解中国文革的窗口和路径) 25 《剑桥中国史》 26 《今生今世》 27 《山河岁月》 28 《社会心理学》(删掉了国家和社会...) 29 《爱的地下教育》 30 《全球通史》(关于苏联的被删...) 31 《蒋介石与现代中国的奋斗》 32 《往事并不如烟》(港《最后的贵族》 几年前出的内地节本刚问世不久也被列为十大违规出版物之一了) 33. 张爱玲全集什么的大陆版都是不全的(有名的《赤地之恋》属于禁忌。。) 34 《全世界人民都知道》 35 《七日谈》 36 《钢铁是怎样炼成的》 37 《罗马人的故事》 38 《洗脑》(!!!删了第九章 相信不可能的事) 39 《我的故乡在八十年代》 40. 《午夜北平》(港版被梁文道推荐!) 41 《初刻拍案惊奇》 42. 《国史六十年》 里面对毛的意见全除去 43 《蒋介石与现代中国》 44.《南渡北归》 45.《米沃尔词典》 46. 桑德尔的《公正》(台版叫《正义》,第五章 “universal human rights” 很容易理解的一个词 台版翻译的很好叫 普世人权, 中文版被改成:普遍人权。 尼倒是告诉我人权怎么个普遍法!!!!) 47 《中国现代国家的起源》孔飞力 48 《中 国 教 父 习xx》 49 《伪满洲国》迟子建 (台版居然叫《满洲国》) 50. 广西师大《讲谈社-中国的历史》整整两卷不能出版 51. 《现代化的陷阱》(台版叫《中guo的陷阱》此书绝对震撼,网上有电子版) 52. 《追代现代中国》史景迁( 英文版《The Search for Modern China》里面有关于60+4 的图片 不妨一看) 53. 《改革中guo》 史景迁 54.《 寻找家园》(此豆瓣分9.0) 55. (马克思著作等 另外,也要区分马克思主义和社会主义国家之间的具体关系。虽然绝大多数社会主义国家都声称以马克思主义为最高信仰,但有不少西方学者认为他们信仰的根本不是马克思主义,或者说不是真正的马克思主义,而是列宁主义,甚至于斯大林主义,这也是苏式社会主义这一名称的由来。实际上,这也不是毫无根据的,以中华人民共和国为例,翻译的马克思的著作只有60多卷,且全由俄文版翻译,而公认最全的法文版有100多卷,即各国对马克思主义的理解有可能存在很大偏差。from 维基百科) 56. 《想象的共同体》 57. 《燃灯者》 (删了很多……) 58. ≪巫术的兴衰≫ 59. 《动物庄园》 (台版收录了奥威尔的一篇文稿附在末尾 大陸版則沒有) 60.《废都》贾平凹著(被禁17年后在部分内容删减的情况下,已经出版。) 61.《金瓶梅》兰陵笑笑生著,删除性描写相关内容的《金瓶梅》“洁本”已正常出版。 62.《1984》 (台版是英社党,陆版是英社。 台版和英文原版均有附录。陆版则没有) 63.《天空的一半》 普利策新闻奖得住讲述女性的绝望与希望(第5、9、12、18、22、85、119、154、156、218、219、232页以及原版第九章等处,有删改) 64.《亲爱的安德烈》 龙应台 (其中删除的一封儿子写给妈妈的信“政府的手能伸多长”看后久久不能平静……) 65.《荆棘鸟》(没错,就是这部名著,也被删改了。删改了什么? 其实也无关紧要,就是些性虐待之类的…… lz一直觉得一个理性人可以有自己的判断,这个选择不应由别人来替你做,哪怕你是zf,哪怕你是国家。然而就算你已成年,在我国,你也不能有这种自由的选择。所以,学英语吧。。说直接读原著!) 66. 《常识》梁文道 (很多是时评 也逃不过删减命 网友直呼读来生硬) 67.《喇嘛王国的覆灭》 (被政治入侵了的学术翻译 —————————————— 下午5:30开始,世界变得喧闹 —————————————— 刚起床是一个人意志最坚定、头脑最清晰可用的时刻 如果这时不把你一天必须做的脑力活动做完,其他时间就别想做了 —————————————— 最重要的是,电影、音乐似乎也知道,除了满足人类的社会心理,人们最需要的,还是两性心理。 恒久不变的歌颂爱情,也就是两性结合 虽然也有同性恋,但那只是消除孤独的手段 —————————————— 然后电影、音乐也是让你不孤独地做个旁观(听)者 —————————————— 各个平台也都如此 不管是微信还是Twitter 所有的联系都是这样 —————————————— 你为什么会存在?为了让我不感到孤独。 (在这个群) —————————————— 公众人物的存在就是为了让人不感到孤独。 —————————————— 小明是个画家 —————————————— 艹,本兮竟然死了 看来不成为文综高手、博览群书,娱乐圈是混不下去的 混乱的世界只需要清晰的头脑 —————————————— 不能好了,可能 —————————————— 无聊的生活 —————————————— one by one concurrent and right time doing right thing —————————————— 当你想做某件事,千万不要告诉别人,只管去做。 —————————————— 不看老毛私人医生回忆录,就不知道中国国情 —————————————— 不要说它不值钱 只要还需要人去做,它就值钱。 —————————————— 1、 面对法医的鉴定报告,王警官陷入沉默,思考了很久才开口对法医说:“你写的啥几把字?” 2、 审讯室里,犯罪嫌疑人赵某对自己的罪行供认不讳。而经验丰富的王警官却觉得还没吓唬犯罪嫌疑人,他自己就招了,一定事有蹊跷。于是,他瞥了一眼赵某,突然大吼一声:“橙汁儿!!” 3、 看完尸检报告,王警官表情凝重,深深吸了一口烟说道:“看来想要找到真凶不是 一件容易的事…因为死者已经隆胸有二十多年了…” 4、 王警官像往常一样加班到深夜独自回家,半路被突然窜出来的一群人团团围住,并威胁他以后不要再掺手眼前这起由他负责的凶杀案。 而经验丰富的王警官对这种情况早就习以为常,他沉着冷静,呵呵一笑,还是毅然决然地拒绝了同事们的请求。 5、 面对着眼前这个复杂的凶杀案卷宗,经验丰富的王警官深深吸了几口烟,突然间眉 头紧锁,然后熟练地用眉头把烟头夹灭。 6、 经过一整晚的审讯,经验丰富的王警官收获颇丰,终于从犯罪嫌疑人郝某的口中得之,他有三颗蛀牙和一处口腔溃疡。 7、 王警官来到犯罪嫌疑人家中的时候已经是人去楼空。但经验丰富的他没有立即出去追赶,而是走到床边,摸了摸被子,发现被子还是热的。这才会心一笑,放心地钻进被窝,愉快的睡了起来。 8、 虽然为了尽早破获这起棘手的案件,刑警大队已经几天几夜没有合眼,但还是没有什么进展。这时,幸好经验丰富的王警官及时出马,用他精彩的推理,使得大家睡了一个好觉。 9、 王警官与犯罪嫌疑人进行了长达两个多小时的周旋,最终,二人都被管理员赶下旋转木马。 10、案发现场惨不忍睹,杀人凶手的手法极其残暴。经验不丰富的实习警员小李已经是双腿发软,因为第一次前来执行任务的他万万没有想到,还要负责背着吓晕的王警官。 11、经验丰富的王警官咬了一口粽子,便立刻发觉味道不对!办案多年的他深知自己已与黑道势力结下怨恨,所以第一反应就是大事不妙,一定是自家的粽子会被人做了手脚。但他沉着冷静,仔细揣摩粽子味道的异常,终于发现其中的蹊跷,原来是吃的太着急忘了剥粽子叶。 12、刑警大队的会议上,经验丰富的王警官对案件分析十分详尽,配合他自己精心制作的PPT,分别从犯罪嫌疑人的作案手法、作案动机以及犯罪现场的盘查取证与法医鉴定报告等多个方面,阐述了自己为什么破不了这个案子。 13、起初,新来的年轻警员都不太理解,王警官去犯罪现场执行任务前为何总是会让助手帮他带上两个崭新的塑料袋。而经过几次合作以后才终于发现其中的端倪,原来是因为王警官晕车。 14、为了能尽早得知凶手是谁,经验丰富的王警官加班后回到回家,都没顾得上休息一会儿,就又独自把自己关在书房里,迫不及待地看完了后半集的剧场版柯南。 15、王警官第一时间赶到犯罪现场,但是经过仔细盘查,并没见到报案电话中群众所说的尸体。莫非是有人毁尸灭迹?王警官沉思片刻,便会心一笑,对同行的警员下令说:“给我追!尸体一定跑不远!” 16、面对复杂的卷宗,经验丰富的王警官表情凝重,一连抽了几包烟,不时咳嗽。经验不丰富的实习警员小李看不过去前去劝阻。王警官解释道:“放心我没事,多年破案的老毛病…不抽烟就没有灵感…” 小李听后说:“虽然我经验没您丰富,但如果您真把我当朋友,就听我一句劝,别抽我的烟了行不?” 17、经过了与犯罪嫌疑人长达一个晚上的审问,王警官说出了刑警大队所有的秘密。 18、王警官与他饲养多年的警犬大壮配合十分默契,仅用半个小时不到,就把食堂的酱肘子吃的连骨头都不剩。 19、王警官带领队员闯入犯罪嫌疑人家中,经验丰富的他直奔卧室,摸了摸被子对大说:“被窝还是热的!罪犯一定还没跑远!” 话音刚落,就吓得罪犯钻出了窝。 20、面对歹徒手中的水果刀,经验丰富的王警官早有准备,从容地拿出了水果。 21、面对法医的鉴定报告,王警官会心一笑:呵呵,果然和自己之前料想的一样,还是看不懂。 22、正当案件一筹莫展之时,法医的鉴定报告及时送到。看过以后,经验丰富的王警官顿时觉得这起难解的凶杀案变得简单了不少,因为他认为,破案可起码比他妈的认出法医的字容易多了。 23、王警官的儿子问他,老师让用成语坐井观天造句老师让用成语坐井观天造句,怎么造?他 笑答:“这还不简单么?爸爸做警官天天都很开心。 24、闻听歹徒穷凶极恶,王警官坚持要带枪行动。但同行警员纷纷劝说他这样做容易暴露踪,最终王警官也只好作罢,不得不把祖传的红缨枪留办公室里。 25、王警官接到一个非常棘手的案子,已经用光了三瓶护手霜。 26、早晨,王警官来到刑警大队,发现门口墙上有人用红油漆写着:“王警官,我要弄你!”而他深知自己办案多年,早与黑道势力结怨,便习以为常。也拿着油漆在墙上写上了“你个大傻逼!”五个字。于是,墙上变成了:“王警官,你个大傻逼我要弄死你!” 27、经验丰富的王警官与经验不丰富的实习警员小李,虽然合作时间不长,但二人的 配合已经相当默契。就拿最近的这起凶杀案来说,他们仅用了不到两天时间,就同时选择了放弃。 28、为了能尽快查出这起凶杀案的真凶,经验丰富的王警官考虑再三,决定赶紧退出不再掺手此案。 29、经验丰富的王警官观察一番后说道:“门和窗都是从里面反锁的,而死者头破血流伤痕累累,显然不是自杀,所以,这无疑是一桩典型的密室杀人案!” 同行的几名年轻警员听完他的分析也是目瞪口呆,最后忍不住将他带离了车祸现场。 30、经验丰富的王警官在执行任务时不幸腿部中枪。而当穷凶极恶的歹徒被捕时,他自己多年的职业素养告诉他,不要去记恨歹徒,谁让自己枪法不准打腿上了呢? 31、向来配合默契的经验丰富的王警官与经验不丰富的实习警员小李却因观点不同发起了争执。王警官认为:死者虽然处于密闭环境,但身上缠有绷带,显然不是常规的密室杀人案,应该是受重伤之后又被人放置于密室之中。而小李却认为,王警官不应该在单位组织去埃及金字塔旅游时说这些有的没的。 32、虽然罪犯显然是对案发现场进行过处理,但经过一番仔细勘察,经验丰富的王警官还是从一些蛛丝马迹上判断出,自己又去错了案发现场。 33、火锅店杀人案现场,经验不丰富的实习警员小李在死者身上发现蒜泥的痕迹,他立即通知经验丰富的王警官,但王警官并没在意。小李深知北方火锅店吃蒜泥小料的人并不多,所以再次重申:“我说!蒜泥痕…”王警官一愣!似乎想到了什么,接道:“善…善用无辜的眼神,谎话说了两句你就当真?” 34、我市刑警大队有两人离奇失踪,机智的王警官将单位改名为“刑警一阝”企图瞒天过海,令人佩服。 35、王警官经过对凶案现场的盘查后说:“你们有没有发现,这个案子与两个月前朝阳区ktv包厢密室杀人案和一周前东城区电子厂跳楼案以及三天前的海淀区出租房碎尸案有个惊人的共同点?” 年轻警员恍然大悟:“您的意思是说这是一个连环杀人案?” 王警官说:“不是,我的意思是说我都破不了。” —————————————— 我是神 —————————————— 去繁从简,是任何进步运动所必须包含的东西。 —————————————— 人不乐意我,我不乐意人。 —————————————— 根据某英语大神的思想 事情做成前不要大肆宣扬,那样会破环事情完成时的成就感。 就我看来,提前宣扬要做的事就是提前预支快乐。 —————————————— 按照传统理论 早上是一个人意志力最好的时候 —————————————— 刚刚无意间看了大鹏的回忆录 发现事无巨细,若回忆录不是假的,就是他有超强的记忆力 这样看来,想成功还是得靠脑力 —————————————— 分享了#ASMR の 老司机专场#的节目《【百香果花姐姐ASMR】深耳快口的声音,舌头轻弹,分层》: http://163.fm/DAkTfMUB  (来自@网易云音乐) —————————————— 听了几个小时的我一定很孤独 —————————————— 分享Alan Walker的单曲《Alone (Restrung)》: http://music.163.com/song/458439871/?userid=280429778 (来自@网易云音乐) —————————————— 真实的我,早已死去 —————————————— 迷者的天堂 —————————————— 这是患者的世界 —————————————— 我是孤独的使者 —————————————— 你们会不会迷失自我 —————————————— 分享Young Rising Sons的单曲《Turnin'》: http://music.163.com/song/28859948/?userid=280429778 (来自@网易云音乐) —————————————— 现代营销应该是这样的: 某人卖艺(淫)、耍帅等等,在公众号或博客上积累上万人气。 然后发广告、引流到淘宝等网商平台。 —————————————— 现在想起来,以前高中三年都是被各种东西误了 始终没找到重点 就像人去做事,有人一击致胜,以小力成大事。 而另一些人,吃力不讨好,有力不知往哪儿使。 一方面,是自身视野、学识所限。 另一方面,又是身边人视野、学识所限。 可打铁还需自身热,自身不优秀,也不能有优秀的朋友。 最后只能说,你努力得太晚或先代人太懒。 —————————————— 有诗云,爱学习和爱萝莉并不矛盾。 —————————————— 时间就像海绵里的水,不学习还真不知道做什么了。 —————————————— 成人的世界不好玩,一个几乎残废的脑袋还要维持生计。 —————————————— 在短时间内(几天或几星期),人总会深深懊悔自己做了错误的选择,做了不该做的事。 可是经过长时间之后(几年),人反而会比较后悔自己“错失良机”,后悔当初怎么没有做自己该做或想做的事。 —————————————— 上帝不会亏待那些为事业而努力的人。 —————————————— 十六年前,所有人都认为马云是骗子。 —————————————— 成功并不在于这一次机会,阿里巴巴的创始人马云和新东方的创始人俞敏洪都曾经历过两次落榜。马云第一次高考时的数学成绩是1分,俞敏洪 第一次高考时的英语成绩是33分。他们都来自教育条件并不好的地区,他们都历经人生的坎坷,但他们都靠不变的信念及不懈的努力实现了自己的目标……高考只是人生中一个小小的门槛,迈过去之前,不妨让心灵先休息一下,放下压力,也许会考得更好。 第一次高考——数学分:1分 从小学开始,各门功课中最让马云感到头疼的,非数学莫属。那可不是一般的头疼,简直糟糕得一塌糊涂。初中毕业那年,颇有自知之明的他想考个退而求其次的二流高中。结果,连考两次都名落孙山,最大的原因就是数学太差。明知如此,马云却非常阿Q地在报考志愿表上填了让自己 无比自豪的四个大字:北京大学。几个月后,在父母的期望、老师的怀疑下,马云第一次走进了考场,那是1982年。结果,那一年他的数学考1 分。这个成绩,说是全国倒数第一未免太过武断,但在整个浙江省是“榜下有名”的。 落榜后的马云,垂头丧气,他觉得自己根本不是上大学的料,也没那个好命,便准备去做个临时工以贴补家用。在一位表弟的引领下,他先去西湖边一家宾馆应聘,想做个端盘子、洗碗的服务生。结果,陪他一块去的表弟被顺利录用了,而他自己却遭无情拒绝。理由很简单:表弟又高又帅,马云又矮又瘦。马云无语,只能暗叹:长得不好,也是我的错。无奈之下,马云只好去寻找那些不要求长相好看,只要求有力气就行的活儿干。通过父亲的关系,他为一些杂志社打零工。于是,在那炎炎烈日之下,在那狂风暴雨之中,杭州城里又多一个18岁的打工少年。 第二次高考——数学分:19分 有一天,在给一家文化单位运书时,他蹬着三轮车来到了数十里之外的金华。在金华火车站,他捡到一本让自己从此之后爱不释手的书——路遥写的《人生》。《人生》中的主人公高加林,是一个很有才华的知识青年,他对理想有着执著的追求,但在他追求理想的过程中,往往在他向理想靠近一步的时候,定会有一种东西横在他眼前,使他得不到真正施展才华的机会,甚至又不得不面对重新跌落到原点的局面…… 渐渐地,马云明白了一个深刻的人生哲理:人生之路,不仅是漫长的,更是充满坎坷、曲折的,若要有所成就,必将经历一番磨炼。读完这部作品,经历一番灵魂深处“闹革命”般的反思之后,马云开始下定决心:再战高考! 于是,在他19岁那年,信心十足的马云终于再次走进高考的考场。那一次,他的数学考了19分。拿到成绩单以后,父母这回再也不对这个“不争 气的孩子”抱任何希望了,他们无奈地摇摇头,“没治了,没一点希望了”。这一回,父母都劝他 :“你就彻底死了这条心,安安稳稳做个临时工 ,学点手艺吧”。 第三次高考——数学分:79分 然而,马云却不 甘心,连续两次高考失利,反 而让他越战越勇。由于无法说服父母让他继续复读,马云只得一边打工,一边复习。于是,为了工作学习两不误,马云白天打工,晚上念夜校。为了找一个好的学习环境,也为了鼓励自己一下,每到星期日,他就早早起床,赶到离家有一个多小时路程的浙江大学图书馆去复习。 20岁那年,马云准备参加第三次高考。在走进考场前的一天,一位姓余的数学老师对他说:“马 云,你的数学真是一塌糊涂,如果你能考及格,我的‘余’倒着写!” 考数学的那天早上,马云一直在背10个基本的数学公式。考试时,马云就用这10个公式一个一个套。从考场出来,马云和同学对数学题的答案后,很自信地说:“这次肯定能及格了!”成绩单出来后,他的数学考了79分(当时数学一科满分是120分)。这一次,他终于上了大学。 对马云而言,人生路上的三次高考,已成为他生命旅程中最宝贵的财富。 —————————————— 所有有意义的脑力活动,都是建立在头脑清醒的基础上的。 如果现在头脑不清楚,还是算了吧! 还是先睡吧,弥补一下这几天我憔悴的心神。 —————————————— Fuck! —————————————— Fuck all of you who smarter than me. —————————————— Fuck this competition —————————————— 其实我想说, Fuck this GaoKao —————————————— 就像考纲要求4000个词汇 实际要7000多的词汇才能应付高考 给你的是一点点,但希望你有更多,不管从何而来,解了这道题,你就是英雄。 —————————————— 其实做了这么多天题,还是有发现的 教科书和试卷没多大关系,就算有也是故意为之的零星半点。 —————————————— 要分类,心理学包括心声放这里 —————————————— 大家交给学校同样的钱养老师,但收获却不一样。 有的同学学得好,有的学得差。 那些学得好的实际上是抢取了你交那份钱,转移到他身上。 这本就是一场博弈,大家约定共同分担教育支出,然后谁受益多少就不管了。 你要做的就是尽量吸收并转化老师传递给你的东西,把它变成一种实际能力。(解题也是一种能力) 把这个原理推理到社会,大家交的入场费都一样,有人穷,有人富,不过都是从别人那儿夺取罢了,总量是不变的。 那为什么有人生下来就富,有的生来就穷? 我只能说你没有早几百年入场,不然你就知道为什么了。 另外,别人忙着学习,你忙着打游戏,你志不在此也有可能。 —————————————— 食饱饭足,你会想堕落;每天一块压缩饼干,你反而想上进。 正常起宿,你活得浑浑噩噩;昼夜颠倒,你倒看得更清楚。 怪,怪。 —————————————— 不懂 —————————————— 不合群 —————————————— Not everyone speaks English well in this world. —————————————— http://c.open.163.com/mob/video.htm?plid=MCA74D6UO&mid=MCC0I19F2&lan=en#share-mob&lan=en#share-mob —————————————— 许多人都把对手视为心腹大患,恨不得除之而后快,却不知一个强劲的对手会让你时刻都有危机感,会激发你更加旺盛的精神和斗志。因为对手的存在,你才会永远做一只威风凛凛的“美洲虎”。 —————————————— 世界上的许多事情并不是因为难我们不敢做,而是因为我们不敢做事情才难的。 人的心理状态是很复杂的,心理暗示的影响力是很大的。它既可以摧毁一个人,也可以拯救一个人,就看人们是抱着消极的心态还是抱着积极的心态。 “这恐怕不行吧?”“我哪有那么厉害?”……诸如此类的不自信的语言经常传入我们耳中。从心理学的角度来说,其实这是一种自我暗示,悄悄提醒自己不能胜任,不能完成。久而久之,你也就真的不行了。 消极的心理暗示是人们前进道路上的巨大障碍,也许你还没有意识到它的严重性,但这确实是事实。 胸怀信念,并坚信自己可以达到目标的人,其内心会因此而形成一股为成功而奋斗的无穷动力。不管遇到什么困难,他们既不退缩也不恐惧。即使看到了自己和别人的差距也不会长久的不安和焦躁,差距反倒成为了他们自己超越自己的目标。 积极的心理暗示也从一个新的角度告诉人们,成功与“劳其筋骨,饿其体肤”“三更灯火五更鸡”“头悬梁,锥刺股”没有必然的联系。只要你对某一事情感兴趣,并长久地坚持下去就会成功,因为上帝赋予你的时间和智慧足够你圆满地完成大多数事情。 —————————————— 对大多数人来说,做事情的时候都容易陷入两个极端: 一个是驱动力过弱,拖拖拉拉永远无法彻底地完成一件事情,总是在做这件事情的同时还去做另一件事情;另一个是过分强迫,非得一口气把事情做完不可。一日不把事情完结,一日便不得解脱,甚至偏执地将其他事物置身事外。 这两种人都需要在心理上调整他们的完成驱动力。 如果你经常走到过弱的一端,那么你一定是一个做事容易半途而废的人。心理医生为有这样心理的人提出了一个简单的解决方法:“如果你精力集中的时间限度是10分钟,而工作需要1小时才能做完,那么,当精力集中的10分钟一过,脑筋开始散漫时,你就要停止工作,用3分钟时间活动筋骨,比如跳几下,或者去倒一杯水,等等;活动过后,再把另一个10分钟花在工作上。” 如果你经常走到过强的一端, 那么你很有可能是一个十足的工作狂。过分强烈的“完成内驱力”使你每天都处在忙于完成任务的紧张劳碌之中,它很有可能正在渐渐主宰你的消遣活动,导致你的生活没有规律、太狭窄、太单调。你不妨试着缓和一下,在做事情的同时也享受一下人生乐趣。比如下班跟同事一起去看看电影,周末和朋友去郊外游玩等。 此外,一个非把每件事都做完不可的人为了避免半途而废,很可能会把自己的精力浪费在一件“得不偿失”,不值得继续做下去的事情上,或者把自己封死在一份没有前途的工作上。所以,对于某些事情,我们真的不应该害怕半途而废。正所谓拿得起,也要放得下。放下不必要的心理抱负,从而使自己步入柳暗花明的新天地,做出另一种有意义的选择,我们又有什么可惆怅或遗憾的呢? —————————————— 人生最大的效率在于:真正有勇气来改变可以改变的事情,有度量接受不可改变的事情,有智慧来分辨两者的不同。 —————————————— 改变先从睡觉开始 —————————————— 停止追求不能拥有的东西 脚踏实地 —————————————— 有时候,人会情不自禁的发呆 希望找一个发呆也会有价值的方法 或者想找一件事做出成绩给别人看 但却一直没预料到,任何一件事,专注,持久,就能取得成绩 —————————————— 今天去超市,一熊孩纸问我要钱,我一看就知道是坑人的,就不给。熊孩纸:好,那你等着。我心想大白天你一小逼孩能怎样?去叫人?我就盯着他看,熊孩纸快走几步到一穿裙子的妹纸那二话不说撩起来回头对我喊“二叔,白色的”!卧槽尼玛 😡 —————————————— 硅谷的程序员 No.1 —————————————— 果然程序员也有高低之分 你看某垃圾群内那些程序员有一句说的是有涵养的话吗? —————————————— 哈哈,明天开始背考研词汇了 —————————————— 妈B,我以后也要朝这个方向发展 —————————————— 太可恶了,你 —————————————— 你又知道了 —————————————— 这位兄台,上过大学吗 —————————————— 屌丝的人物特性 没看过首相 —————————————— 不管是周星驰、黄渤还是白客,都是饰演小人物 脱离了小人物、大众,喜剧不会成功 —————————————— 如果你这样想说明你是个实在人 两轮电动车足够用了 —————————————— 汽车就像大人的玩具。 有车的边玩玩具边向没玩具的小伙伴炫耀 没车的看见别人的玩具羡慕 实际上玩玩具和事业成功没太大关系 再说了,有钱人家的小孩的玩具比你的高档,你有玩具又怎样? —————————————— 回顾十几年的成长历程,我发现我与其他同龄人最大的不同是喜欢观察,万事万物,即使是不说一句话我也想看看那些东西,就觉得看着爽,不管是人还是动物、机械还是植物。那一幕幕的场景配合着人物就像一出戏,而我,只是个看客。 —————————————— 年龄一大,失去了精气神,万古皆空。 —————————————— 他接着说起自己创办亚马逊的经历。那年他30岁,结婚一年,见到网络以每年2300%的增长速度在迅速发展。他准备辞掉工作,去做一件疯狂的事。贝佐斯也将这个想法告诉了自己的上司,他要在网络上卖书。但他不确定是否会成功,因为很多创业公司都失败了。 那位上司倾听了很久,最后说道:“那听起来是一个很棒的想法。但是,对那些没有一份好工作的人来说,这个想法更棒。” 怪不得上10年搞网络的人容易赚 几千倍增长速度 —————————————— 我女神竟然有tumblr —————————————— Check it out http://lindaliukas.tumblr.com —————————————— 唉,编程好累 —————————————— http://blog.topspeedsnail.com/archives/10921 —————————————— 长这么大第一次看见这个 新年新气象,希望2017能遇见一个 —————————————— http://mobile.rr.tv/pages/videoShare?id=90756&share=11458302 —————————————— 祝你鸡年小吉吧! —————————————— 有一次,当你回忆到你为什么没做到,你会发现,你根本就没做。 —————————————— Be a life-long learner 的一个最大好处是,你永远不用担心因知识缺乏而无能为力。 —————————————— 18岁,距上次遗精已过去4年 既兴奋又沮丧,兴奋的是,春梦确实很爽,沮丧的是,早射。 唉,才放进去!! —————————————— http://blog.sina.cn/dpool/blog/s/blog_492811e70102vxeu.html?vt=4 这人和我的思想差不多 —————————————— SB才做作业,高手只做任务。 —————————————— 我们学过质量守恒定律,如果老师无法考满分,那么他传出的“能量”必定不如标准答案那样纯正。 事实是他们经常找不到重点,大水漫灌、胡乱填鸭。 —————————————— 听老师讲,不管懂不懂,都是你失去。懂,失去了独立思考能力和思维锻炼机会;不懂,浪费时间和青春,做无用功。 —————————————— 对于老师,他们只知道为你低效的填充知识,却不为你指一条切实可行的提升自己的明路。 他们拿着公务员薪水却不好好服务,有时甚至侮辱、谩骂学生。 —————————————— 当我们回顾诸如贝多芬、爱因斯坦、爱迪生、毛泽东等伟人的成名史,发现他们无一不是靠着自学、靠着勤奋获得超于常人的能力。 而学校,只是一个点缀,为他们的学习提供一个相对安适、相对与浮华社会隔离的环境。如果学校没有这个功能,那它也就没有存在的价值了。 —————————————— 说得通俗一点,就是你妈没有告诉你,世界上所有伟人都是自学成才,从一次工业革命到三次科技革命,从未改变。 —————————————— 事实上,我在月光博客没看到这个 —————————————— 爱因斯坦曾经说过:宇宙最不可理解之处是它是可理解的。科学规律的简洁普适的令人感叹,万物运转竟满足人类创造的数学关系,本身就是一件十分不可思议的事情。然而更不可思议的是,人类智能本身,却难以被数学所解释——即使它可以解释万物。 阿狗的诞生终于为我们解开了这个悖论,数学工具终于开始对人类智慧本身拥有了解释力。人类智能走下神坛也许令人伤感,但改造世界首先便需要理解世界。从这个角度而言,当代棋手们仍是幸运的,有生之年,也许能目睹终极之美,见证围棋之神的诞生。 月光博客: 世界围棋界这两天都在谈论一个叫做“Master”的神秘账号。 几天来,它在弈城、野狐等围棋对战平台上轮番挑战各大围棋高手,目前已取得不可思议的47连胜。 其战胜的对手,不乏柯洁、古力、朴廷桓、陈耀烨、芈昱廷、唐韦星、范廷钰这样的顶级职业棋手。 人民以雷鸣般的呼声询问:“那人是谁?” (某韩国棋迷): 2016年12月是人类最高手被没有 BUG 的围棋人工智能全面压制的里程碑式的悲哀的月份。 现代围棋棋院诞生九十二年、职业围棋头衔战开赛七十七年后,人类的智能在这一月,被技术的发展所摧毁了。 —————————————— 我要去北大! —————————————— 分享Phildel的单曲《Dragonfly Keeper》: http://163.fm/BKqrphtJ  (来自@网易云音乐) —————————————— 这些人还真指望过节的祝福群发提高友谊。 It's useless, truly speaking. —————————————— 我答应了老师明年英语考130 我很清楚不这么做很难考上一本 但那需要付出以前用在英语身上的一半工夫, Actually, 2个月做一年的事 —————————————— 我坚信 I Firmly Believe 我坚信,我会成功。 I firmly believe, I will succeed. 我坚信,我会有为。 I firmly believe, I will make it. 我坚信,任何磨难都不能使我退却。 I strongly believe, any hardships can't make me stop. 我坚信,所有的付出将在最后得到回报。 I firmly believe, all the efforts will get paid in the end. 我坚信,成功者只是少数。 I firmly believe, success belongs to few people. 我坚信,世间有永恒的真理。 I truly believe, the world has its own rules. 我坚信,我坚信。 I firmly believe, I believe. —————————————— 宅男的日常 https://touko.moe/blog/whispers-my-way-to-developer —————————————— A B C D 爱逼射弟 D A C B 弟爱射逼 —————————————— 这个世界我最想感谢的,一曰我的父母,二是李阳和 Programming, 三是各位朋友。 Parents gave me life and brought me up. LiYang and Programming taught me what is persistence. You gave me strength to face failure. —————————————— 男人两大爱好: 1、拉良家妇女下水; 2、劝风尘女子从良。 女人两大爱好: 1、和穷人谈钱; 2、和富人谈感情。 —————————————— 学校好烦,快递都不让人领 简直有病 就好像不用快递,学校就高大上了一样 整个一SB —————————————— Check it out http://bengchacha.tumblr.com/image/152068736244 —————————————— Check it out http://illustrated-interracial.tumblr.com —————————————— 可以分,那是标准问题。引入人妖,这个问题就难了。) 定义与标准涉及社会语言、社会思想等契约。 导论4.世界是一个动态的过程 世界上的事物本质上是动态的,是一个过程。 人们认识这些过程时,总要将它拆分开,认识越深,拆分越细。 拆分的过程,本质上是对比的过程。一个过程被拆分为很多方面,每个方面都相对于其它方面而存在。(拆分比较那一瞬间是静止的) 这一过程的每个方面或环节都由我们自己去定义,这个环节相对于上面、下面环节是怎样的。 对于哪个环节最重要,随个人所好。反正哪个环节没做好,过程就会出问题或不再是原过程。 如地球绕日公转图,为了更好理解,我们把不断公转的地球分为春夏秋冬四个环节(状态)。 又如“鸡生蛋,蛋生鸡”这个过程,本是个循环,我们为了认识它,把它拆分成了两个方面—鸡与蛋。 这容易造成事物只有一个片面的假象。事实上,蛋相对于鸡为蛋,鸡相对于蛋为鸡。随便取走哪一个方面或环节这个过程就不存在了。 导论5.实践是检验真理的唯一标准 无论生物的认知及产生的思想、理论多么不同,最终都要服务于行动,使行动做出符合生物需要的结果。 哲学总例: 假设一个物体发出噪音,但我不想听。 把耳朵捂上、或切断听觉神经,就听不见噪音了。(这是唯心主义) 把这个物体破坏掉,让它发不出噪音,从源头去噪。(这是唯物主义) 这两种做法都是在同一个过程的某个方面或环节做出的行动。(过程指的是从噪音产生到传到大脑这个过程) 生物认知相对,上述例子的唯物、唯心区别不是绝对的,它取决于具体的对比概念定义,即对比的方式、主体与对象。 我这里是用汉语契约说的这个问题。评判它涉及到某些团体的利益。故它无需评论。 总结:哲学总是一定时代的产物,基于当时的社会发展状况。它在不断发展。我们能做的也只是站在前人的肩膀,应用当代知识去考核、研究与发展。 特辑:数学、推理与逻辑 逻辑推理有两个方面,归纳(特殊推普遍)和演绎(普遍推特殊) 归纳是我们在一系列外部世界给我们带来的感觉中寻找规律的一个过程。 演绎是我们用我们找到的规律来预测接下来所发生事件的一个过程。 归纳和演绎就像一个硬币的正反面,是我们认识世界的一种方法。 特辑:解析经济、社会 货币是商品交换发展到一定阶段的产物。 它的产生过程为: 偶然的物物交换⇒扩大的物物交换⇒一般等价物⇒一般等价物固定在金银上⇒货币产生 货币的本质是一般等价物,充当需求交换的媒介。(但并不是说货币可以交换一切需求) 需求增加,供给减少,商品价值提升。 需求减少,供给增加,商品价值降低。 概括为“物以稀为贵,货多不值钱”。 社会发展的实质是需求交换的不断加快(体现在货币上就是交易数额不断增加、交易速度不断加快)。 世界运动发展总规律是物质或能量的流动和交换不断加快(竞争是需求作用的具体表现,它能促进世界发展,所以不必排斥)。 所有的生物历史无非是在适应需求交换的需要。 像国家这种集中利益体系,如果不能适应社会多数人需求交换的需要,就会被改变(如社会制度阻碍经济发展导致的革命)。 终极猜想:由宇宙大爆炸可知,我们正处在一个烟花爆炸的过程。微缩到地球,需求就像烟花爆炸后的小火星,迫不及待想燃尽。殊不知,结果是灰飞烟灭。 特辑:我对文学、影视、音乐等作品的看法 在欣赏这些时,我们总要将自己与其中某个角色挂钩。 那个角色获利,我们跟着高兴。 那个角色失利,我们跟着伤心。 仿佛那个角色就代表自己一样。 如果不这样,我们将无法体会这些作品。 又或者,这些作品表现出对观赏者极大的好处(如爱意、使适应伤感等观赏者需要的东西),那这种作品我们都爱。 —————————————— 《物质与思想》 著者:胡英杰 传播者:请附上您的大名~^_^ 版权所有:每一个创造语言的人 前言: 请先欣赏一部电影——《超验骇客》 不管什么语言,什么形式,不过让人明白那道理罢了,不必纠结于表面那些东西,着重去理解、去感悟才是真的。我希望本书能让人工智能得以实现。 我写书,就是用主观方式阐述客观道理。研究中,不拘束于学科分别,只要是实践得出的证据,都可以使用。 为了让自己不受束缚的研究,我时常将自己处于人之外,即不把自己当人看。 你第一次看本书会恼怒,可以理解,因为这不符合你平时所接受的教育。但是,我想说,因为悟到这些,我恼怒了很久。 由于本书由文字所成,必然有一些词义脱离其原本含义,从而包含我的一些认识。读者可以将难理解的词句告诉我,以便更改。 如觉得本书有错误之处,请以书面形式,附上对应证明一并发给我。 QQ:1576570260 QQ群号:208408255 博客地址(每月更新,不跟则无):http://yingshaoxo.blog.tianya.cn 序 我生于20世纪末,时值国泰民安之季,从小被社会主义所熏陶。 随着时间流逝,少年终究会变成大人,困惑与忧虑如期而至… 随着近百年自然科学的发展,蒙昧与无知逐渐被驱散,人们开始认识到世界真正的样子。 但是,这历史进程在我看来太慢,我迫不及待想看到这世界最后会变成怎样。 于是我踏上一条寻找真理的不归路…… 结果发现,人类社会虽然发展到了较高层次,那些最原始、最基本的东西依然存在于人世。 总括: 能量守恒并转化定律 关于生物性: 环境引导需求,需求产生行动,行动改变环境。 需求是生物间的唯一联系。 个人、国家等的利益等于个人、国家等的需求。 从远古时期捕食与被捕食的需求关系,发展到现代人类的合作与伙伴关系。 ———————————————— 关于认知: 生物的认知=事物差异信息=极端认知1+…+极端认知2 对比事物→极端认知→矛盾(或平衡)感 生物的认知在不断细化、扩大与加深。 详解: 生物的认知是相对的,在对两事物的对比过程中会产生两个极端认知,这将给生物带来矛盾(或平衡)感。 在认知过程中,参照物改变,得到的对比差异信息就不同。 大圆和小圆,大圆以小圆为参照物感觉大,小圆以大圆为参照物感觉小。将大、小圆合起来看,大与小就是我们对这两个圆的极端认识,也叫差异信息。 大与小在我们看来是“矛盾”的。大与小就像矛与盾一样给了我们一种既矛盾又平衡的感觉——即相互对立又相互统一。 从辨别食物到使用语言文字,生物的认知渐趋复杂。 ———————————————— 关于人工智能: 纯物理解释人脑→人工智能就能实现 ———————————————— 关于智能生命: 智能生命=能认知+有需求+会行动的东西。 ———————————————— 第一章,世界观 第一节,我们所处的空间(详情请看纪录片:跟随斯蒂芬·霍金进入宇宙) 我们在地球,地球在太阳系,太阳系又在银河系,而所有的这一切,都属于宇宙。 宇宙通过宇宙大爆炸形成。恒星的产生与爆炸创造出了组成我们身边物质的所有元素(如:氖、氧、铁、金、铂、铅等)。 大爆炸后的三亿年后,早期的恒星开始组成星系。每个星系中心有个超大质量黑洞,该星系内的恒星围绕这个黑洞旋转。 我们的星系---银河系,是其中一个比较老的星系,它的直径大约六万亿英里。 太阳系又属于银河系,太阳系距离银河系的中心约26000光年。 地球位于太阳系内,并且和水星、金星、地球、火星、木星、土星、天王星和海王星一起绕太阳公转。 月球绕地球转动,同时地球还要自转。 宇宙之大,不做探究,一般来说,我们在地球。 第二节, 生命的起源(详情请看纪录片:生命起源) 我们是谁?不言而喻,我们是人类。 那人类是什么?人类是一种生物。 这种生物是怎样产生的?产生于地球自身的演化过程,由C、H、O、N等元素逐步演变而成。 最初,小分子机缘巧合下随机的互相碰撞,然后,一种结合形式使之能够自我复制,就开始了缓慢的进化、变革过程,进而产生了世界生物的多种多样。 生命好像理所当然会出现,只要有适当的条件和足够的时间。 在生物之间存在着生存斗争,适应者生存下来,不适者则被淘汰,这叫做自然选择。生物正是通过遗传、变异和自然选择,从低级到高级,从简单到复杂,种类由少到多地进化着、发展着。 第三节,人类发展史(详情请看纪录片:人类,我们的故事) 历史。 第四节,知识:对事物差异的认识 人类的知识多以语言文字的形式记录。 各种语言的结构、内容大同小异,我们只需将其中相同的部分提取出来,并且以人类进化顺序为依托进行研究,就可以较准确的解释知识与语言、认知等之间的关系。 语言中每个较高级词语(的含义)都需用一系列较低级词语(的含义)来解释。这样较高级词语就包含了一系列较低级词语的含义,却只需少量字来表示。 最底层词语含义直接由实物差异(五感)信息组成。词语高级化,虽方便了使用,但使其灵活度降低,且易不准确。 具体发展过程: 首先,每个单词都是一个差异信息。随着人们交流时单词数增加,就成了句子(这时为口头语言)。 然后人们从结绳记事开始,渐渐出现了图案,接着由繁到简,文字就产生了(这时为文字语言)。 不难理解,最初的象形图案,就包含了它与其它事物的差异信息(画个人,就是一个人的意思)。当图案简化到字,那字就代表了那副图案的意思。 “一棵”+“大”+“树”=“一棵大树”,对某概念或定义加字是为了使其表达的差异信息更准确。 由此可知一句话包含多个差异信息,每个差异信息都有对应的参照物(或对比物)。如果改变其中某个参照物,这句话含义就变了。如白马非马这个诡辩,参照物分别是所有非马物和不同颜色之马。 事物的规律(如定理公式),是人们通过对事物发展情况的观察而概括产生的结论。 这种结论的正确性,取决于人们使用它能否成功预测结果、能否达到自身的目的。这种成功的实现越多,这种结论对人们来说越正确。(比如1+1=2,怎么证明?它是公理) 概括总结规律从根本上符合人们简化认知、方便生活的进化模式。 我们的知识像一个圆,圆内的知识越多,圆外的未知就越多。 第二章,人生观 第一节,从“性”开始 人类需要繁衍后代,在漫长的进化中,产生了性欲,促使人们去交配。 在男女的性爱中,男性将精子射入女性阴道,女性排出卵子使其与精子结合形成受精卵。 受精卵回流到女性子宫,受精卵就在那里着床生长。 受精卵在女性子宫不断分裂、生长,直到变成成熟的婴儿。 然后,通过剖腹或分娩,婴儿出生。 第二节,第一次认识世界 我就是那个婴儿,我的眼感到了光、耳听到了声、鼻闻到了气,一切感觉信息都传入我的大脑。一时我难以接受,于是嚎啕大哭。 我用大脑分析我所处的空间,"对比"这些感觉信息,这个事物相对于那个事物是怎样的。一切事物都被我以对比的形式记下来。 比如我每看到一个人,就会把他与其他人比较,记住他与别人的不同、差异。 经历了漫长的过程,这些差异形成了我对于我所处空间的认识。接着,随着父母的引导,牙牙学语,认识更多事物。 妈妈可能会说:"这是一个苹果"。于是我观察它与周围景物的不同、与记忆中其它事物的不同。然后,将这苹果与其它事物的不同等价到"这是一个苹果"上来。(事实上,就连这句话也与其它声音不同,我记的也是一种差异信息。) 基本上,从出生开始,对比就开始了,一切事物在我脑中都基于对比。 第二节,开始上学 特辑:什么是哲学? 哲学就是用语言解释(或模拟)思想。 具体来说就是用语言文字将人们对世界的认识,对事物的态度、看法等表达出来。 比如马克思主义哲学,就是在那个时代,由于自然科学突飞猛进,而产生的新认识、新看法。 马克思用语言归纳、概括、总结,就形成了他的哲学。 马克思哲学之所以出名,是因为它与政治挂钩,而政治又是人民利益的集中体现。 历史的主线是政治、经济,故整个历史都在体现利益变化。 导论1:唯物与唯心合二为一、整体看待才为真理 物质通过生物的感觉器官被感知,在生物的脑中形成相应的映像,这种映像的基本构成是物质的,如神经元。这是唯物者的证据。(补充:这种观点只看到世界是物质的,却没看到生物是如何认识物质的) 如果有种物质,生物无法通过感觉器官或没有感觉器官去认识它,那么这种物质对生物来说不存在,这是唯心者的证据。(补充:“心外无物”,这里的心指脑,没有感觉器官的信息传入,任物质如何,生物都当它不存在。一个极端例子就是“一个人死了,这个世界对他来说不存在”) 唯物和唯心都只看到了同一过程的某一方面。但这过程是一个整体,不能片面看待。 导论2.辩证法的实质与核心 生物认知相对,在认知时会产生两个极端认知。 这两个极端认知就像矛与盾一样,所以人们又称它为矛盾。 具体体现如逻辑上的“p”与“非p”等。 辩证法的实质是相对论。其中的重点论本质为绝对论(实践后才能知重点)。 故辩证法伪造了一个过程,但它这个过程是仅限于讨论的空话,即对一件事物既不肯定也不否定,不带任何利益立场。(假辩证法当然会带利益立场) 绝对论建立在按某一极端认知去行动能让人获利的基础之上。(比如我说“做吧,这事绝对没错”,那这事肯定对我有好处,你好我也好) 导论3.量变与质变、部分与整体——事物评判的标准 定义一种标准,划分事物发展到什么程度为质变,而没达到这个程度就为量变。(就像做“木块受力”这个物理实验,木块受力,移动为质变,不动为量变) 描述量变与质变的过程更像描述混沌理论。 定义一个整体,其中的组成部分相对于这个整体为部分。(定义人类为一个整体,那么男人和女人就是组成人类这个整体的两部分。因为男女的不同,所以分为两类,至于哪些不同 —————————————— https://github.com/citizenlab/chat-censorship/blob/master/livestream/livestream_keywords_10_15_09_16.csv —————————————— http://umr.igge.ga/?i=1 —————————————— 开免流下AV,也是没谁了😳 —————————————— Get up, and go on. —————————————— 任何困难都只是上天给我的考验 —————————————— Everyone, all is good time. —————————————— 分享Panda Eyes的单曲《Nostalgia 64》: http://163.fm/CfvhjNO  (来自@网易云音乐) —————————————— 你的曲不激情 —————————————— 分享Tobu的单曲《Desert Voices》: http://163.fm/RzdTkH1  (来自@网易云音乐) —————————————— 人之初,*** ***, 我好闲 —————————————— 果然他受不了走了 —————————————— 你好,神经病😂 一般人应该会生气 —————————————— 程序员的尊严,岂容你践踏?! —————————————— 我们为什么不能随便和人上床? 因为上床意味着责任,理智的头脑不允许随便这样做 —————————————— 突然明白为什么我长这么丑 洗完澡总是先擦身体再擦脸 螨虫、细菌都跑脸上去了… —————————————— want to —————————————— I want be the king of programmers. —————————————— 没人与我说话 没人与我交流 甚至没人叫我做事 这就是成长吧 —————————————— 没了团体的人 譬如我 —————————————— 某天我突然发现,听自己唱歌也是一种享受 —————————————— nice music —————————————— What makes you uncomfortable? Get knowledge? —————————————— 《夕甲甲:孔乙己之 C++ 版》 作者:水石头stone 「欧欧匹代码的格局,是和别的编程模式不同的:首先要有一个构造函数;基类里只定义了函数的形式,可以随时通过派生增加不同的实现。那些程序员们,每每学会了继承和多态,便可以接一个项目,——这是十年前的事,现在至少要懂得设计模式,——靠柜台外站着,写些代码换一个鸡蛋灌饼吃;倘若懂一些多线程的知识,便可以在鸡蛋灌饼里加火腿肠,或者里脊了,如果懂得语言的实现原理,那就能做一些底层代码的优化,换一盘炒菜。但这些程序员,多是初级水平,大抵没有这样深入。只有懂得内存模型的,才能接一些底层的项目,打开调试器和剖析器,慢慢的坐着优化代码。 我从十二岁起,便在村口的 githoverflow 工厂里当学徒,师傅说,我逻辑思维太差,怕学不会静态类型语言,就写些 shell 脚本吧。shell 脚本虽然容易写,但语法容易含混不清的地方也不少。字符串和数组的功能很弱,条件判断的语法也很奇特,有时要对特殊字符手动做两重转义,然后通过。在这种情况下,写脚本也很为难。所以过了几天,师傅又说我干不了这事。幸亏荐头的情面大,辞退不得,便改为专管测试的一种无聊职务了。 我从此便整天的站在测试机前,专管运行测试脚本。虽然没有什么失职,但总觉得有些单调,有些无聊。师傅是一副凶脸孔,程序员也没有好声气,教人活泼不得;只有夕甲甲到厂里,才可以笑几声,所以至今还记得。 夕甲甲是站着编程而手动管理内存的唯一的程序员。他用的开发语言语法臃肿;结构杂乱,代码间时常夹些 #ifdef;一堆乱蓬蓬的充当接口的 .h 文件。虽然是手动管理内存,可是经常出现野指针,要么忘了初始化,要么释放后没有设置成 NULL。他写的代码,总是满屏的奇技淫巧,叫人半懂不懂的。因为他姓夕,又总觉得自己的技术天下第一,别人便用『甲乙丙丁』的第一个字,替他取下一个绰号,叫做夕甲甲。夕甲甲一到厂,所有的程序员便都看着他笑,有的叫道,『夕甲甲,你的代码又出新bug了!』他不作答,对柜里说,『来两个鸡蛋灌饼,一杯豆浆。』便把 Thinkpad 摆好。他们又故意的高声嚷道,『你一定又把人家的内存搞泄漏了!』夕甲甲睁大眼睛说,『你怎么这样凭空污人清白……』『什么清白?我前天亲眼见你搞崩了 Windows 的内存,吊着打。』夕甲甲便涨红了脸,额上的青筋条条绽出,争辩道,『内存没释放不能算泄漏……没释放!……程序员的事,能算泄漏么?』接连便是难懂的话,什么『new/delete 配对使用』,什么『谁申请谁释放』之类,引得众人都哄笑起来:厂内外充满了快活的空气。 听人家背地里谈论,夕甲甲原来也读过 CS 博士,但终于没有去做学术,又不会营生;于是愈过愈穷,弄到将要讨饭了。幸而还会写点代码,便替人家做几个游戏,换一碗饭吃。可惜他又有一样坏毛病,便是内存泄漏。运行不到几秒,便连程序带数据,一齐崩掉。如是几次,叫他写游戏的人也没有了。夕甲甲没有法,便只好做些最简单的外包项目。但他在我们厂里,品行却比别人都好,就是从不留 bug;虽然间或一时不能解决,暂时记在 wiki 上,但不出一月,定然修复,从 wiki 上删去了夕甲甲的名字。 夕甲甲写过半页代码,涨红的脸色渐渐复了原,旁人便又问道,『夕甲甲,你当真会写代码么?』夕甲甲看着问他的人,显出不屑置辩的神气。他们便接着说道,『你怎的连半行代码也没有贡献给 linux 内核呢?』夕甲甲立刻显出颓唐不安模样,脸上笼上了一层灰色,嘴里说些话;这回可是全是『狗屎 Linus 』之类,一些不懂了。在这时候,众人也都哄笑起来:店内外充满了快活的空气。 在这些时候,我可以附和着笑,师傅是决不责备的。而且师傅见了夕甲甲,也每每这样问他,引人发笑。夕甲甲自己知道不能和他们谈天,便只好向孩子说话。有一回对我说道,『你学过编程么?』我略略点一点头。他说,『学过编程,……我便考你一考。const int * 和 int const *,有什么区别?』我想,讨饭一样的人,也配考我么?便回过脸去,不再理会。夕甲甲等了许久,很恳切的说道,『不知道罢?……我教给你,记着!这些语法应该记着。将来做程序员的时候,写代码要用。』我暗想我和程序员的等级还很远呢,而且我们师傅也从不用裸指针;又好笑,又不耐烦,懒懒的答他道,『谁要你教,两个没区别,都是指向常量的指针。如果你想用指针常量,要写int * const。』夕甲甲显出极高兴的样子,将手里的破鼠标敲着电脑桌,点头说,『对呀对呀!……const 有四种用法,你知道么?』我愈不耐烦了,努着嘴走远。夕甲甲刚在 Visual Studio 里新建一个空文件,想在里面写代码,见我毫不热心,便又叹一口气,显出极惋惜的样子。 有几回,邻居孩子听得笑声,也赶热闹,围住了夕甲甲。他便给他们一人写了一个 Hello World。孩子看完,仍然不散,眼睛都望着屏幕。夕甲甲着了慌,伸开五指将屏幕罩住,弯腰下去说道,『error 了,编译器报 error 了。』直起身又看一看屏幕,自己摇头说,『error error!哀乎哉?error 也。』于是这一群孩子都在笑声里走散了。 夕甲甲是这样的使人快活,可是没有他,别人也便这么过。 有一天,大约是程序员节前的两三天,师傅正在慢慢的 release 代码,打开 wiki,忽然说,『夕甲甲长久没有来了。还有十九个 bug 没修复呢!』我才也觉得他的确长久没有来了。一个喝酒的人说道,『他怎么会来?……他打折了腿了。』师傅说,『哦!』『他总仍旧是搞崩内存。这一回,是自己发昏,竟搞崩了 GFW 的内存。他家的内存,搞得的吗?』『后来怎么样?』『怎么样?先是去喝茶,后来是打,打了大半夜,再打折了腿。』『后来呢?』『后来打折了腿了。』『打折了怎样呢?』『怎样?……谁晓得?许是死了。』师傅也不再问,仍然慢慢的做他的 release。 程序员节过后,函数式编程是一天比一天热门,看看连 Java 都开始支持 lambda 表达式;我整天的做测试,也须了解什么是闭包了。一天的下半天,没有一个要测试的项目,我正合了眼坐着。忽然间听得一个声音,『来一个鸡蛋灌饼。』这声音虽然极低,却很耳熟。看时又全没有人。站起来向外一望,那夕甲甲便在柜台下对了门槛坐着。他脸上黑而且瘦,已经不成样子;带一本破 Thinkpad ,盘着两腿,下面垫一个电脑包,用草绳在肩上挂住;见了我,又说道,『来一个鸡蛋灌饼。』师傅也伸出头去,一面说,『夕甲甲么?你还有十九个 bug 没修呢!』夕甲甲很颓唐的仰面答道,『这……下回修罢。这一回是现场通过,鸡蛋要好。』师傅仍然同平常一样,笑着对他说,『夕甲甲,你又内存泄漏了!』但他这回却不十分分辩,单说了一句『不要取笑!』『取笑?要是不泄漏,怎么会打断腿?』夕甲甲低声说道,『跌断,跌,跌……』他的眼色,很像恳求师傅,不要再提。此时已经聚集了几个人,便和师傅都笑了。我煎了鸡蛋灌饼,拿出去,放在门槛上。他打开电脑开始写代码,见他满手是泥,原来他便用这手走来的。不一会,他提交代码,通过了测试和 review ,便又在旁人的说笑声中,坐着用这手慢慢走去了。 自此以后,又长久没有看见夕甲甲。到了 Rust 1.0 发布的时候,师傅打开 wiki 说,『夕甲甲还有十九个 bug 呢!』到 Golang 2.0 发布的时候,又说『夕甲甲还有十九个 bug 呢!』到 Scala 3.0 发布的时候可是没有说,再到 Rust 又演进了一个版本也没有看见他。 我到现在终于没有见——大约夕甲甲的确死了。 写于二零一五年夏」 —————————————— 鉴于这种情况,我决定一周不说人话 —————————————— 11.4 You may have seen the old I Love Lucy television episode in which Lucy and Ethel worked in a chocolate factory (it’s a classic). The duo fell behind as the conveyor belt that supplied the confections for them to process began operating at an ever-faster rate. Write a simulation that pushes different types of chocolates to a Redis list, and Lucy is a client doing blocking pops of this list. She needs 0.5 seconds to handle a piece of chocolate. Print the time and type of each chocolate as Lucy gets it, and how many remain to be handled. —————————————— 一长串英文看不懂 —————————————— 不开心 —————————————— 有个广东爹叫广药,他有个儿子叫王老吉,他觉得自己养不活这孩子,就给一个叫鸿道且膝下无子的香港人说,我把儿子给你当十年儿子,你给我点钱吧,香港人同意了。 然后香港人花了大把的钱把这孩子养大,这孩子长大了成了万人喜欢的高帅富,突然亲爹广药跳出来说,这是我儿子,十年期到了,该还给我了。 养父道鸿到法院跟亲爹广药争夺抚养权失败,就自己人工受孕生了个儿子叫加多宝,给他穿一样的衣服,也一样的花大钱养他,就是想让亲儿子比曾经的养子更高帅富。 —————————————— Gods know why you so ugly😄 —————————————— 今天的任务也只完成了一点点 —————————————— 你去看现在QQ wifi在线的人,多是清闲的人 爱隐身的多是有心机的人 —————————————— 🤘 刚才突然明白这个是什么意思了 你把手倒过来,中间两指向90°微曲,前后自动就知道是怎么回事了。 —————————————— 没人跟我聊都不知道说什么好了 —————————————— 我深夜随便访问一个人的主页 几分钟不到,她就会回访… —————————————— 突然发现身边好多人玩全民K歌 只是他们都潜水 —————————————— 我要死了,就是不去学习 就是不去工作 尼玛,我在发呆看手机 还有,与你们聊天 —————————————— 草了,明明知道只剩一点任务没做 硬是不去做 这是懒汉思想吗? —————————————— 虽然知道自己是一条咸鱼。 但是我还是想要去做一些事情。 —————————————— 你想语音多方便啊! —————————————— 其实讯飞语音输入法还是不错的。 —————————————— 这里本来就是吐话的地方 一个人压抑久了,不管是天才还是其它什么都会疯掉的 —————————————— 反正你们都不说话,那我说好了 —————————————— 我测试了下,如果不往这儿吐废话,其它群就会充满废话。。😁 —————————————— 有一日我终于明白怎样保持群的知识性和严肃性 那就是把废话向这里说 —————————————— 😊Good morning😊  😁☁😁☁☁😁☁😁  ☁😁☁😁😁☁😁☁  😁☁😁☀☀😁☁😁  ☁😁☀🌻🌻☀😁☁  ☁😁☀🌻🌻☀😁☁  😁☁😁☀☀😁☁😁  ☁😁☁😁😁☁😁☁  😁☁😁☁☁😁☁😁 —————————————— https://program-think.blogspot.com/2016/05/share-books.html?m=1 —————————————— 高中生视野下的知识体系 —————————————— 近视就是好,看谁都是美女😄 —————————————— http://game.gtimg.cn/images/dnf/act/a20160720literature/videos/bg.mp3 —————————————— Powerful god —————————————— 第一章 外星来客 紧张的期末考来了,我对考试 already 麻木了,反正怎么考都是个倒数,在别人心急如焚答着题,或想尽办法作弊时,我却趴在那里 sleeping。 考试 time 眨眼间过去了,我的成绩 have a 进步,排在了 the 57名,倒数第5了。 Then 就是 correct 试卷了,接着开散学典礼,我高一的学习生活 in this way over。收拾好东西,几件衣服和一条薄毯,慢悠悠的骑着辆2手自行车回到了我乡下的小屋。对我来说, 放假和不放假都差不多,一样的混日子,一样是我自个儿过。 夜深人静,我趴在窗台上,望着遥不可及的星, with 月亮半遮半掩的躲在云里。 前后左右的房子都熄了灯,望着 the outside 一片黑压压的村庄,突然 find 自己是那么的孤独,那么的与这个世界格格不入,我找不到活着的意义。这个世界没有人值得我眷恋,也不会有人眷恋我,这种感觉是那么的可怜。举目无亲,就是我这种吧, even one friend haven't !也对,谁会跟我这样的人做朋友? 再次抬头 look through the 有点悲凉的夜空,发现这个夜空好象有什么地方不同, like 东边多了一颗与众不同的星星,那星星比其他的亮了好多。啊??还会动?我脑袋有点短路,这颗星星还真是奇怪啊,居然会移动。流星吗?我马上否决了这个想法,流星移动的速度可比这个快多了。 When 我乱猜时,那颗星星突然一闪,然后出现在了我头上的夜空中。还是那样亮,不过呆的地方却不一样了。 I can't help 目瞪口呆,这也太夸张了吧。UFO??我有点怀疑的擦了擦眼睛,再看,晕啊,没看花啊! 突然,有股吸力拉着我飞上天去,我心一紧,不要吧,外星人要抓我去研究了, suddenly, 我脑袋浮出了这样一张 picture,我被绑在手术床上,几个奇形怪状的外星人围着我。我一阵恶寒,脑袋也在这时候一阵眩晕. Before 昏迷,最后一个念头就是这下完了。 在我昏迷过去后,我的身体也凭空消失在窗台,那颗很亮的星也消失了, out of the sky,好象从来没出现过似的—— 分割—— 不知过了多久,我迷迷糊糊的醒来,睁开眼睛, find out that 自己躺在一张奇怪的床上,四周都是一些奇怪的仪器,我突然 remembered 我是被外星人抓来的. 他们对我做了什么? 我紧张的坐起,焦急的检查着自己的身体,发现还没被解剖,松了一口气,不过隐约 feel my body is some different。 “嘀”的一声,就在我刚松一口气的时候,对面一圆形门开了。开门的声音吓了我一跳,我紧张的注视着门口,见走进一个银色头发,银色皮肤,甚至连眼睛都是银色的身高近2米的男人。我看着这个人,楞在那里,外星人是这样的吗?怎么和我想的差那么多啊? 看起来跟地球人也差不多啊,除了发色和肤色。 “你醒了,地球人,你应该知道我是什么了吧?”那个看起来 like 银做的外星人对我说,居然用的是中文。 “你…你会说我们这里的话?”我楞楞的看着他,可话一问出我就觉得自己发傻了,人家一看上去就很牛B的样子,会说我们的话也是 normal 的啊。 “会说你们的话有什么好奇怪的,我在这个破星球呆了快一百年了,如果连你们的话都不会说那才奇怪呢!”外星人说完向我旁边的一堆仪器走去。 “什么,你在地球呆了1百年?不会吧?”我有点发傻了,那外星人见我惊讶的样子,开始为我慢慢讲解起来。 我也终于明白了 the 外星人的来历。这个外星人叫萨克,来自很遥远很遥远的艾美星系,那个星系的科技很发达,据萨克说, 至少比地球的科技先进几万年,那里的人差不多可以活5000 years,而萨克是那个星系派出的搜寻者, to look for 外星的生命,并帮助一些落后的星球发展科技. After a 漫长岁月的搜寻,萨克也很幸运的 found 一个有生命居住的星球。却不想正要回艾美星系时,碰到 a 星球爆炸,被“流弹”砸坏了动力系统,无法远航,只好在地球降落,隐藏在百幕大三角. Those 神秘事件也正是萨克这家伙搞出来的。 现在修好了动力系统,准备离开。不过在他离开前想找一位地球人,把他培养成艾美星系在这个遥远星球的“代言人”, 帮助 location 发展科技. (ps: 地球 and 艾美星系实在太遥远,一来回至少要几千年) 我居然在几百亿中选一的大抽奖中中奖了,被萨克选中,5555,真是太感动了,从小倒霉的我,居然一下子RP暴发,哈哈,真是太棒了! “你在想什么,脸上表情好奇怪啊?”外星人萨克的一句话打断了我的美好YY。 “啊?没什么没什么,哈哈,你什么时候给我你们那里的 high 科技啊?”我尴尬的挠挠头。 “恩,这个不急,等会再说,现在我先给你检查下身体吧。”外星人边操作着仪器边对我说,“好了,你躺下,别乱动,放轻松。” 我依他说的躺下后,身体上方 had been fixed by a 伸下的触手。萨克仔细的操作着仪器,好一会,他才把盯着屏幕看的眼睛转到我身上,对我说:“恩,实验很成功,一切都很正常,你们地球人的潜力还真大。” 我一听他的话差点昏过去,焦急的问:“不会吧,你在我身上做什么实验?不会把我弄变异了吧?以后会不会变成怪物啊?”可千万别把我弄成怪物了啊!我才18岁,变怪物了以后谁嫁给我啊? “怪物??哈哈,你怎么会想到 that 方面去,我把你变成怪物干什么?你真有趣!”萨克站在那里哈哈大笑,“你身体改变了,但不会变成怪物的,这你可以放心。” 听他这么一说,我总算松了一口气. 哎~ Truly, 跟外星人打交道不怎么让人放心啊。 “你说我身体有改变,是什么地方改变了?”我疑惑的看看自己的身体,手还是手,脚还是脚,没什么变化啊。 “你现在变化可大了,不仅身体表面 have a little change,身体内部也变了好多,严格的说,你现在的身体已不是普通地球人所有,你先下床,现在可以自由 move 了。”萨克说完示意我下床。 —————————————— 2015中国杰出青年奖/2015年青少年科技大赛一等奖/第六届高等数学全球锦标赛亚洲赛区冠军 以上奖项均未获得 —————————————— http://weibo.com/sheva34331?is_hot=1#_0 —————————————— Look at this when you tired. http://www.foxebook.net/category/computers-internet/ —————————————— http://www.coolapk.com/album/1709739?&lan=en&lan=en&lan=en —————————————— www.xda-developers.com —————————————— 云计算不是孤立的,它连接着从硬件生产、数据中心,到资源的抽象,到平台层服务和应用层服务的整个产业体系。 —————————————— 我上大学时,老师教诲我们说,搞现代史要牢记两个原则,一是治史的原则,二是 党性的原则。这就是说,让历史事实按党性的原则来发生。凭良心说,这节课我没听懂。在文史方面,我搞不清的东西很多。不过我也能体会到学者的苦心。 —————————————— 我和李银河从一九八九年开始一项社会学研究,首次发现了中国存在着广泛的同性恋人群,并且有同性恋文化。当时以为这个发现很有意义,就把它报道出来,结果不但自己倒了霉,还带累得一家社会学专业刊物受到本市有关部门的警告。这还不算,还惊动了该刊的一位顾问,连夜表示要不当顾问。此时我们才体会到这个发现是不受欢迎的,读者可以体会到我们此时是多么的惭愧和内疚。假设禁止我们出书,封闭有关社会学杂志,就可以使中国不再出现同性恋问题,这些措施就有道理。但同性恋倾向是遗传的,封刊物解决不了问题,所以这些措施一点道理都没有。 —————————————— 我有位世伯,“文革”前是工读学校的校长,总拿二十四孝为教本,教学生说,百善孝为先,从老莱娱亲、郭解埋儿,一路讲到卧冰求鱼。学生听得毛骨悚然,他还自以为得计。忽一日,来了“文化革命”,学生把他驱到冰上,说道:我们打听清楚了,你爸今儿病了,要吃鱼——脱了衣服,趴下吧,给我们表演一下卧冰求鱼——我世伯就此落下病根,健康全毁了。当然,学生都是混蛋,但我世伯也懊悔当初讲得太肉麻。假如不讲那些肉麻故事,挨揍也是免不 了,但学生怎么也想不出这么绝的方法来作践他。他倒愿意在头上挨皮带,但岂可得乎……我总是说笑话来安慰他:你没给他们讲“割股疗亲”,就该说是不幸之中的大幸,要不然,学生片了你,岂不更坏?但他听了不觉得可笑。时至今日,一听到二十四孝,他就浑身起鸡皮疙瘩。 —————————————— 时隔十年,再来考虑信仰问题,我忽然发现,任何一种信仰,包括我的信仰在内,如果被滥用,都可以成为打人的棍子、迫害别人的工具。渎神是罪名,反民族反传统、目无祖宗都是罪名。只要你能举出一种可以狂信而无丧失理智危险的信仰,无须再说它有其他的好处,我马上就皈依它 —————————————— 我也有一个问题,是这样的:什么是知识分子最害怕的事?而且我也有答案,自以为经得起全球知识分子的质疑,那就是:“知识分子最怕活在不理智的年代。”所谓不理智的年代,就是伽利略低头认罪,承认地球不转的年代,也是拉瓦锡上断头台的年代;是茨威格服毒自杀的年代,也是老舍跳进太平湖的年代。 —————————————— 现在的知识分子都学乖了,只管呼吁不管干,并且善用一种无主句:“要如何如何”。 —————————————— 我们国家总以受过某种程度的教育尺度来界定知识分子,外国人却不是这样想的。 我在美国留学时,和老美交流过,他们认为工程师,牙医之类的人,只能算是专业人员,不 算知识分子,知识分子应该是在大学或者研究部门供职,不坐班也不挣大钱的那些人。 —————————————— 我们这个民族总是有很多的理由封锁知识、钳制思想、灌输善良,因此有许多才智之士在其一生中丧失了学习、交流、建树的机会,没有得到思想的乐趣就死掉了。 —————————————— 愚蠢是一种极大的痛苦:降低人类的智能,乃是一种最大的罪孽。 —————————————— 假设我相信上帝(其实我是不信的),并且 正在为善恶不分而苦恼,我就会请求上帝让我聪明到足以明辨是非的程度,而绝不会请他让我愚蠢到让人家给我灌输善恶标准的程度。 —————————————— 我认为自己体验到最大快乐的时期是初进大学时,因为科学对我来说是新奇的,而且它总是逻辑完备,无懈可击,这是这个平凡的尘世上罕见的东西。与此同时,也得以了解先辈科学家的杰出智力。这就如和一位高明的棋手下棋,虽然自己总被击败,但也有机会领略妙招。在我的同学里,凡和我同等年龄、有同等经历的人,也和我有同样的体验。某些单调机械的行为,比如吃、排泄、性交,也能带来快感,但因为过于简单,不能和这样的快乐相比。艺术也能带来这样 的快乐,但是必须产生于真正的大师,象牛顿、莱布尼兹、爱因斯坦那样级别的人物,时下中国的艺术家,尚没有一位达到这样的级别。恕我直言,能够带来思想快乐的东西,只能是人类智慧至高的产物。比这再低一档的东西,只会给人带来痛苦;而这种低档货,就是出于功利的种种想法。 —————————————— 在我们生活的这个世界上,最大的不幸就是有些人完全拒绝新奇。 —————————————— 因为没事干而下棋,性质和手淫差不太多。 —————————————— 七八年前,我在海外留学,遇上一位老一辈的华人教授。聊天的时候他问:你们把太太叫作“爱人”──那么,把lover叫做什么?我呆了一下说道:叫作“第三者”罢。他朝我哈哈大笑了一阵,使我感觉受到了暗算,很不是滋味。 —————————————— 事实上,人家商业区和住宅区是分开的 —————————————— 在落后的小镇,几乎相当于贫民窟 这里污染遍布(尤其是噪声污染,人们几乎忽略) 要知道在大城市,夜间开发电机,向城管投诉是会被关停的 并且伴随线路老化,规划不合理,时常停水停电 这个大城市是短暂且有计划的 上海几乎不会停电,即使某个地段检修,会提前告知而且时间很短,尤其不会影响夜间居民用电,这点上海做的非常好。 —————————————— 你也可以是另一种人,不寻求主动的改变 环境(形势)推你做什么,你就做什么 以上两种都是做人的方法,不同之处在于,第一种生活趋向合你意,第二种生活充满不确定性。 —————————————— 我保留的不只是童真,而是一种自认为完美的自我状态。 这可能包含一种对专业素养的期待、对高尚道德情操的期待、对清新简洁脱俗生活的期待,如此种种,皆是完美主义的体现。 正是这种对完美的追求、对自我的合理约束,才使我们不断前进、不断通过微小而具体的行动改变周遭的环境、改变自身。 最终,达到一个心灵的和谐,安详的离开。 —————————————— 我的意思是学会飞机就不用考驾照了😁 —————————————— www.yesxian.com/wenzhang/gushi/29389.html —————————————— http://mm.eastday.com Which girl you want?😀 —————————————— If you really want to learn, and you want to learn more quickly and more deeply, pay attention to how you pay attention. Think about how you think. Learn how you learn. —————————————— 我喜欢整理知识,整理的过程中,自己也学到了东西 —————————————— In my mind, I could never fancy how ten second of life could change a person's view for his whole existence.  考查名词。second 意为“秒”时是可数名词,ten 表示数量,应用 second 的复数形式。故正确答案为将 second 替换为 seconds。 考查介词。句意:我不能够想像生命中的10秒钟是怎样改变一个人对于整个生命过程的观点的,用介词 on 或者 about 表示“关于…的观点”。故正确答案为将 for 替换为 on/about。 In my mind, I could never fancy how ten seconds of life could change a person's view about his whole existence. —————————————— A few years ago I experience the worst moment in my life.  考查动词时态。结合 A few years ago 可知 experience 这个动作发生在过去,应该用一般过去时。故正确答案为将 experience 替换为 experienced。 A few years ago I experienced the worst moment in my life. —————————————— I was driving home that afternoon.  —————————————— Unfortunately, I didn't make it home as usually because I had a car accident.  考查固定搭配。as usual 是固定搭配,意为“像往常一样”。故正确答案为将 usually 替换为 usual。 Unfortunately, I didn't make it home as usual because I had a car accident. —————————————— While I was driving, all of a sudden, but the car in front of me stopped.  考查连词。While I was driving 是时间状语从句,all of a sudden 是插入语,the car 是主句主语,stop 是谓语,句子结构完整,也不存在转折关系,所以不需要添加 but。故正确答案为将 but 删除。 While I was driving, all of a sudden, the car in front of me stopped. —————————————— My car immediately ran into it.  —————————————— Luckily, I wasn't serious hurt.  考查副词。修饰动词 hurt 应用副词,故正确答案为将 serious 替换为 seriously。 Luckily, I wasn't seriously hurt. —————————————— That accident changed way I drive and they taught me a valuable lesson.  考查定冠词。定冠词 the 用来限定这个冠词后面的名词是某个特定的事物,此处特指作者之前的驾车方式,要加定冠词 the。故正确答案为在 way 之前添加 the。 考查主谓一致。主句主语是 That accident,and 表示并列,and 后的句子的主语指代的是 that accident,应用代词 it。或者 and 起并列两个动词的作用,即:那场意外改变了“我”驾驶的方式并给“我”上了有价值的一课,将 they 删除。故正确答案为将 they 替换为 it 或将 they 删除。 That accident changed the way I drive and taught me a valuable lesson. —————————————— I also came to the conclusion which life needs to be treasuring. 考查连词。引导同位语从句的连词应该用 that,且 that 只起到语法作用,在句中不作任何成分,而 which 引导的是定语从句。故正确答案为将 which 替换为 that。 考查被动语态。need 和 treasure 之间存在被动关系,且 treasure 之前有 be 动词,所以要用 treasure 的被动语态。故正确答案为将 treasuring 替换为 treasured。 I also came to the conclusion that life needs to be treasured. —————————————— In my mind, I could never fancy how ten seconds of life could change a person's view about his whole existence. A few years ago I experienced the worst moment in my life. I was driving home that afternoon. Unfortunately, I didn't make it home as usual because I had a car accident. While I was driving, all of a sudden, the car in front of me stopped. My car immediately ran into it. Luckily, I wasn't seriously hurt. That accident changed the way I drive and taught me a valuable lesson. I also came to the conclusion that life needs to be treasured. —————————————— 或者 一个男人盯着女人的下面 一个女人盯着男人的下面 —————————————— 囍 一个男人趴着舔女人的下面 一个女人趴着舔男人的下面 —————————————— 夏天最烦的就是蚊子 —————————————— What the fuck, this determined your future! —————————————— I have no Chinese input program... —————————————— Everything won't kill me makes me feel alive. —————————————— 😂 —————————————— In my life, I hate two kinds of people, SB and garbage. Oh, I forgot, I hate myself! —————————————— 两只老虎  两只老虎 真奇怪 真奇怪 一只没有耳朵 一只没有尾巴 ... —————————————— Heart tired. —————————————— I remember an important theory, a great learner always learns by themselves. —————————————— http://zs.hncst.edu.cn/info-9799.html —————————————— 我承认我玩DNF.游戏充满了套路与心机.没有书.并不适合我.游戏不如学习.跳舞不如学习.谈恋爱不如学习.一言不合就学习.我喜欢学习.学习使我快乐.优秀是一种习惯.我徜徉在知识的海洋里.吮吸着知识的雨露.妈妈叫我吃饭.我充耳不闻.爸爸喊我喝水.我无动于衷.奶奶喊我睡觉.我百般推辞. 世界上只有一种稳赚不赔的投资.那就是学习.我只想告诉你们.烟可以抽.酒可以喝.容可以整.架可以打.逼可以装.但你要是不爱学习.对不起.我们做不了朋友!我爱读书.我爱学习.学习使我快乐. —————————————— [【马云RAP】成功和幸福的秘诀_鬼畜调教_鬼畜_bilibili_哔哩哔哩弹幕视频网] is good,have a look at it! http://www.bilibili.com/mobile/video/av4980917.html —————————————— 《物质与思想(简)》 不管什么语言,什么形式,不过让人明白那道理罢了,不必纠结于表面那些东西,着重去理解、去感悟才是真的。 其实,最原始、最基本的东西依然存在于我们人类世界: 能量守恒并转化定律→世界运动本质为物质与能量的不断加速流动、转换。 环境引导需求,需求产生行动,行动改变环境。 需求=利益=生物间唯一联系∈{x|x∈(经济,政权,…)}。 对比→生物认知=事物差异信息={x|x∈(极端认知1,极端认知2)}→矛盾∈{是非,强弱,对抗,竞争,…}=平衡。 注:→表示“产生”或思维过程。 每个人的人生经历,所带给他的不同感觉,共同绘成了他脑中的世界。 一人一世界,世界到底是什么样的? 我不知道,但我知道:理解了人脑,就理解了一切。 Super AI will work out all these problems. —————————————— 日复一日的忙碌不堪 学习上班无限循环 生活变得越来越平淡 很想找一个人来陪伴 但遇到喜欢的人说话也不敢 每天夜里辗转不安 好想找个妹子来陪伴 但是想想又觉得麻烦 工作学习压力不断 少年时的梦想已经碎成两半 当初的热情渐渐不在 只好靠动漫忘记现实中的不快 每天回家后一个人宅 想做点什么把自己找回来 然而还是不停对着电脑屏幕发呆 抬头朝窗外看云彩变幻 问自己是否还有爱 每天不停的做着无限循环 然而幸福还在遥不可及的另一端 不要放弃希望 只要有梦想 爱永远存在 夜深人静从梦中醒来 躺在床上思考着未来 想来想去却没有答案 心中反而越来越迷乱 于是继续做着循环 日复一日的百无聊赖 天天像齿轮一般旋转 却找不到通往幸福的答案 下定决心一定要脱宅 至少要改变颓废的状态 但到后来还是觉得麻烦 反正努力也不会有人喜欢 这社会残酷地令人无奈 想逃避却没想象中=的简单 继续在虚拟中徘徊 想找回那份被遗失的爱 然而还是不停迷茫地在原地打转 回头看当初梦想那么灿烂 事到如今只有感慨 每天不停的做着无限循环 已经无法确定自己是否真的还存在 不要放弃梦想 只要有希望 幸福会到来! 想做点什么摆脱无限循环 要为自己找到通往幸福的答案 就算现实是多么的艰难 也要对着命运呐喊 其实这世界也做着无限循环 只要坚持到底幸福就一定会到来 不要放弃希望 只要有梦想 人生会精彩 —————————————— ... —————————————— ╭━━━━━━━━━━━━━╮ ┃╱╱╱╱╱╱╱╱┏┓╱╱╱┃ ┃╱╱╱┏┓╱╱┏╯┃╱╱╱┃ ┃╱╱┏┛┗┓╱┗┓┃╱╱╱┃ ┃╱╱┗┓┏┛╱╱┃┃╱╱╱┃ ┃╱╱╱┗┛╱╱╱┃┃╱╱╱┃ ┃╱╱╱╱╱╱╱╱┗┛╱╱╱┃ ╰━━━━━━━━━━━━━╯ —————————————— GIF Graphics Interchange Format —————————————— 不知什么时候码农成为了程序员的另一个代名词,虽然略含贬义,被大多数程序员用来自嘲,但如果被别人称为码农,我想大多数程序员心里必然不爽。然而对大多数处境不太好的程序员,码农却是他们生活和工作状态最真实的写照,用来形容他们也是十分恰当的。我想之所以称为码农应该和农民或是民工有一定的联系,两者都是处于金字塔的最底层,一个是从事体力劳动,一个是从事脑力劳动,工作存在重复性,缺乏创造力,对工作缺乏激情,被金字塔上一层的人压榨着。 码农的养成主要有两方面的因素:一是程序员的自我意识;另一个是公司的环境。 自我意识 容易成为码农的人一般都是比较听话的,缺乏主见和独立思考的能力,不思进取。这些人一般都是逆来顺受,对公司或领导安排的工作都是无条件去执行的,即便不合理也不会提出异议,不敢站出来反抗的。他们从来不会想着如何提高工作效率,如何提升自己的技术,甘愿在公司混着日子,做一个代码的搬运工,任劳任怨。可能对他们来讲这只是一个工作而已,并非真的喜欢计算机这个行业。他们之所以选择这个工作,可能是因为听别人说这个行业工资高。这样的人用码农称呼他们最合适不过了。其实这样的人无论在哪个行业都是在最底层,都会被叫做X农。 公司环境 相对而言我觉得公司环境更为重要。 一般程序员所在的公司可以简单分为两类:技术驱动型和营销驱动型的。技术驱动型的公司都是非常重视技术和技术人员的,他们愿意花高薪聘请行业里面的牛人,牛人做事的效率和质量自然要比一般人高出一大截,公司做出来的产品自然也是一流的,公司的效益也会因此受益。并且牛人多了会形成一定的效应,会吸引其他牛人,吸引潜力优质的新人,如果管理和培养新人的方式没有问题,新人会逐渐成长起来,形成一个良性的循环。这些公司一般是互联网公司,无论是一线互联网公司还是初创的公司都是对技术非常重视的,和公司差儿不差儿钱没有多大关系。 而大部分营销驱动型的公司则缺少对技术的足够的尊重,大部分码农存在于这些公司。这些公司的盈利方式大部分靠市场关系拿项目赚钱,这种方式下产品做得好或不好显得不是特别重要,只要关系足够硬,只要市场人员拿的到项目就能赚钱,公司就能盈利。这种情况下,公司要想盈利更多,无非是营销上拿更多项目或是严格控制成本。控制成本可能就是缩短研发时间,削减用人成本。一旦缩短研发时间时,项目的计划安排就不再是根据工作量和研发人员的能力制定的,而是根据这个项目成本要控制在什么范围内或是营销人员拍着胸脯给客户承诺的时间节点。所以当项目经理告诉你这个项目要一个月要做完时,可能的原因就是一旦这个项目用了两个月时间公司可能就赚不到什么钱了,或者就是营销人员在客户面前牛逼吹破了,所以就苦了这些程序员要加班加点的赶进度,为这些人吹的牛逼买单。 在这种性质的项目研发中,工作计划安排不合理,时间过于紧张。并且一般情况公司都有类似项目的代码,你不再是代码的创造者而是代码的搬运工,大部分是copy其他项目的代码过来,做一些修改满足现在的需求,“能用就行”是他们经常说的一句话。紧张的时间没有给你进行设计和思考的余地,为了追赶进度你只能用最快的实现方式而不是最优的实现方式。长此以往会扼杀程序员的创新能力和思考能力,变成机器一样的代码工。最终在经历无数个日日夜夜的奋战项目按时实现完成了,大家皆大欢喜。你可以给项目经理一个交代,项目经理可以给公司一个交代,营销人员可以给客户一个交代。而你可能还在惦记着项目某个功能实现的方式不是特别好,当时由于时间关系没有采用最好的方式,然后考虑要不做一次优化,但是对于公司而言做项目重构或是代码优化不会直接产生任何价值,所以公司是不会给你时间做这些的。而这时候可能项目经理会告诉你有另一个项目,非常着急,要一个月完成.....。这样虽然你做了很多项目,但其实只有一个项目的经验,并且还是1.0的经验。虽然你工作了很多年,实际的工作经验只有一年。这样的程序员就可以称他为码农了。 在这种公司里面,程序员就好像流水线上的工人一样,只要成本低能干活就行。公司只要留住几个核心员工,能够带领研发即可。铁打营盘,流水的兵,你走了很快会有其他成本更低的人顶替你,只要公司的项目能按时交付即可。如果你初入这个行业,代码量不够可以考虑去这些公司积累一下代码量,因为他们要求相对低一些。但如果你对技术有一定的追求,是一个不愿意的将近的人,这样的公司就不适合长待,除非你甘愿做一个码农。 牛逼的人可能用码农自嘲,但大部分人更多是心里的无奈,有时候我们可能改变不了环境,但我们可以换个环境。如果你不愿意将就下去,是时候做出改变了,不要对自己的工作不满,却还不愿意去努力改善。多利用自己的业余时间提高自己的技术,早日脱离码农这个阶层。 —————————————— SIM Subscriber Identity Module —————————————— 压力的缓解措施 生存压力: 不考虑天灾人祸食物短缺等,这类压力主要源于身体健康状况不佳。因此调节方式也很简单,培养并维持良好的生活习惯即可。 合理作息 加强运动 注意饮食 保证睡眠 其中特别要强调保持睡眠。现代人很少会面临生存压力,却常常会遇到睡眠问题。有时候会觉得,睡眠质量不佳其实是一种很特殊的生存压力吧。引发条件极为简单,熬夜不睡即可;影响迅速而明显,内部精神压力剧增,反应力和判断力下降并极易导致失误,进而影响外部评价,产生外部压力。相对破坏,睡眠质量的恢复却要花费更久的时间。此外,长期轻度睡眠问题带来的影响并不亚于短期熬夜。无论如何,确保高质量的睡眠是释放压力的第一要务。 内部压力: 通过习惯来缓解强迫症。习惯的力量十分强大,借助习惯可以事半功倍。例如,担心出门时没有锁门,可以培养锁门后拍照记录或只是简单捏一下自己。有意识地让肌肉参与,比眼看脑记更加深刻。这些习惯以简单有效为宜,一旦养成,就值得信赖 建立正确期望。合适的期望对人有激励作用,过高的期望只能徒增压力与失望与不自信。建立期望,应该以过往的经验为基础,如果过去从未实现,有什么理由相信自己下次一定可以成功呢?即使求成心切,也应根据实际情况多次迭代更新期望,而不是一蹴而就在毫无基础的时候就建立不切实际的期望。上一次得了60,这次就改进方法,或增加努力,期望得到65——而不是这次决意已定,信心满满,肯定能得100 过度的欲望。思考自己真正想要的是什么,欲望的来源是什么。这个问题本身就能长篇大论。重要的是,努力成为一个真正独立的人,不要让自己的欲望成为社会舆论宣传的镜子 接受变化与不确定。这个世界上唯一不变的就是不断的变化。大部分人无法准确预测自己两年后的状态。既然变化与不确定是这个世界的常态,是事物发展的法则,又何必为此恐惧和焦虑呢。为变化制定多套不同方案,借助经验预测未知,先尽人事,后听天命 社会压力: 正确评价他人。由于信息不对称,他人展现的、媒体宣传的,都不一定是实际情况,或者说不一定能准确反映整体情况。一位成功的商人可能不是一个尽责的父亲,拥趸众多的意见领袖不一定过着自己梦想的生活,学术爱情事业三丰收的长者或许每时每刻都要应对常人想象不到的艰难。因此,不必妄自菲薄,特别是不应自行想象他人不为人知的一面 影响他人的评价但不在意他人的评价。外部评价可以被影响,但不可控。不能期望所有人都满意自己,如果这些评价难以对自己造成实际影响,可以忽略不计。做好自己,影响可以影响的人,影响需要影响的人,即可。当自己能创造价值时,被需要与被信任也将随之获得 双向选择。寻找自己认同的,有归属感的集体。自我提高,让自己具备选择的资本 宁缺勿滥。这一点很难做到。如果追求的东西成本极高,人往往就很难顶住压力。例如,坚守道德通常需要付出极高的精神和物质成本。不乱扔垃圾不乱穿马路等功德,要对抗人性的懒惰和自私;互联网商业公司不助纣为虐利用国内垄断地位把害人性命的骗子医院的广告夹杂在搜索引擎结果里,要对抗金钱的诱惑与外部资本的压力。不过对于个人来讲,或许静下心来,好好想一想自己到底追求的是什么,可以帮助自己找到一些答案。如果明天就是你生命的最后一天,你是否还会纠结于这些难以割舍的东西?你希望得到他人怎样的评价?缺乏公德的人,抑或是丧尽天良的商人?当然,如果这些不会成为你的压力,现在自然也不会成为一个问题 理解历史的进程。每个人都能选择自己的行为,但能与历史进程对抗的毕竟是少数。以史为鉴,可以知兴替。人类文明如何受生产力发展的影响,如果受经济模式的影响,如何受人性的影响,必然遵循一定的规律。如果能了解到一些这样的规律,或许能对这个世界的运行法则有更深的认识吧。一国的制度演化,民众素养与社会风气等,发展成当前的状态大多是众多历史条件叠加的必然结果。为什么会产生农耕文明?为什么会有殖民扩张?为什么会有王朝兴衰?为什么会有革命?为什么会爆发战争?为什么会有经济危机?为什么会有郁金香/普洱茶/房地产的泡沫?……越看清这个社会运行的本质,越能对这个纷扰的世界保持平静吧。就好象人不会因为苹果会掉落地面、水能载舟火能取暖之类的现象感到压力一样,如果知道了在特定的资本与经济条件下某些社会现象几乎是物理定律般的必然,或许也就不会过分患得患失了。《人类简史》是一本通俗易懂的好书,可以帮助自己对人类文明的进程有一个新的认识,值得一读 维护健康的人际关系。人际关系其实和个人与群体的关系类似,只不过此时对方是一个个具体的人。相互认可、相互信任、相互尊重、相互需要,保持合适的距离,紧密而自由,或许是最佳的人际关系 —————————————— 压力的作用与危害 作用 危机意识。穷则思变。压力也许是改变与进步的契机 集中注意力。适当的压力可以迫使人专注于重要的问题 危害 精神疲劳/肉体疲劳的加速。长时间处于压力之下会积累精神疲劳,精神疲劳又将导致肉体疲劳 疲劳将造成效率下降,错误增加 产生焦虑心情,无法正常工作生活,浪费大量时间 恶性循环。疲劳的肉体会发过来影响心智。人在劳累时往往难以意识到自己处于不良状态,越陷越深 情绪消极。对他人产生消极影响,破坏关系。如果能够遇到情绪积极的人帮助还好,仅靠自己很容易钻入牛角尖 短视/无法做出最佳决策。迫于压力,人往往会选择解决眼前的紧迫问题,而这不一定是长期的最佳选择 —————————————— 外部对自己的认可 需要与被需要。认识到自己需要依赖整个社会才能更好地生活,并且相信自己具有足够的能力提供社会需要的价值。前者通常成立,后者则不然。如果认为自己不被社会需要,便可能产生一定的心理负担,担心自己能否长久地在社会中生存 信任与被信任。信任社会有助于减少不必要的脑力消耗与精神负担。被信任的人更容易建立起足够的自信。或许存在精神特别强大的人不需要外界的反馈也能认清自己,自信而坚定。不过这种情况下,他很可能缺乏对所属社会群体的认同感与归属感。不过,如果把握不当,被信任也可能转为过度的期望而产生压力 认同感与归属感的缺乏。认同感与归属感指认同自己所属的群体,为自己属于该群体而感到自豪与安心。认同感与归属感能够使人放松,排解压力。这两项却并非总能实现。出于各种原因,人并不总是有能力选择自己所属的群体。后进学校里努力学习的学生可能在班集体里找不到归属感,混吃等死的机构里有雄心的员工可能既不认同也不认为自己属于这个环境。不过,如果信念坚定,相信自己可以改变,改变环境,或是改变环境,由于认同感与归属感确实造成的压力或许也有正面作用 没有选择的自由。能够自由选择,显然胜过枷锁重重 内部压力与外部压力存在联系,在一定条件下能够相互转化。 —————————————— 外部压力 撇开生存压力,此处的外部压力也许能大致等同于社会压力。外部压力可以由个人或群体造成,甚至只是舆论或媒体渲染。 外部展现的状态。成绩优秀的同学、外貌出众的朋友、能力拔群的同事、多才多艺的同龄人……荣誉、幸福、清闲、权力、富裕……新买的奢侈品、小清新的出国旅游、丰富而频繁的文娱活动……本来,与自己过分遥远的人不会成为问题。人们通常不会因为明星富商生活条件优越而感到不平,而只会关心身边看得到的例子。然而,网络普及之后,社交网络的流行使情况发生了变化。你会发现,你身边默默无闻的同事周末的生活简直丰富得难以想象;你各方面平平的朋友似乎始终乐观积极毫无烦恼;你泯然众人的高中同学和千里无一的美女结为连理;原本和你一辈子打不了几次交道的远房亲戚在特大城市的富人区购置了房产。做到清心寡欲并非易事。没有比较就没有伤害,外部展现的状态,无论虚实,都会影响自己的心境。尤其是当你发现自己无法达到“社会的普遍标准”时,你必然会有意识或无意识地感受到压力。例如,你以为三十岁前大家都结婚了;你以为大家结婚时都添置了新房;你以为昂贵的钻石戒指是唯一可以表明真爱的信物——如果这不是钻石公司几十年营销得到的成果 外部对自己的评价。无论你与他人相同还是不同,不如还是超越,你都有可能收到指指点点。这些指指点点或许并不会对你有直接的伤害,但你却总担心它们终将转变为实际的影响。也可能,这些不公甚至不实的评价,本身就能让你感到不快,即使它们几乎没有可能对你造成实在的损失 外部对自己的期望与要求。如果说外部展现的状态不明确针对某个目标,外部对自己的评价不直接要求回应,那外部对自己的期望与要求则更加明确与直接。父母期望子女成才;老师要求学生学习,期望他们考取高分;领导要求员工努力工作,期望他们获得好业绩。期望会带来评价,进而转为压力,要求更是很可能会改变今后的处境,形成直接压力 —————————————— 内部压力 一个完全与社会隔绝的人是否会有压力?如果他能够自己自作健康而自由地生活,且不用担心外部威胁,他是否还会有压力?这类压力或许可以归为来自内部的压力。有些压力的根因很可能依然源自外界,但其形成与个人的性格或思维方式等息息相关。内部压力包括以下这些: 强迫症。必须反复确认检查才能安心,常见的有出门时检查是否关门等 过分完美主义或脱离实际的期望。对自己或外界的行为及其结果要求过高,一旦存在偏差便产生负面情绪 过度的欲望。强烈的物欲、权利欲或控制欲等 —————————————— 压力源 此处主要讨论的是相对长期的精神压力,短期的应激性压力或肉体压力不做展开。由缺乏食物、饮水、睡眠、温度或身体疾病导致的压力成因与解决方法都较为显然,也不多深入。 —————————————— 聊聊压力 这篇文字根据自己前几年在记事帐里随手记下的随感整理而成。这些没有成文、不成系统的只言片语安静地躺了两三年,趁此机会稍作梳理,固仍有疏漏与偏颇,也算是做个了结。因没有任何专业基础,完全基于经验得出感受,难免有不少幼稚与谬误之处,仅作备考。 下面依次谈谈自己对压力的来源,压力的效果和压力的释放等话题的理解和思考。 —————————————— https://vimeo.com/ —————————————— Fack these courses in Chinese, I'll learn Android on its offical website. —————————————— We use this (singular) and these (plural) for people or things near us: We have lived in this house for twenty years. Have you read all of these books? … and that and those for people or things that are not near us: Who lives in that house? Who are those people? —————————————— No matter I spent 3 years learning at high school or not, I also can't master a certain skills. —————————————— 曾有一个段子说:一个妹子问一个程序猿如何让一帮不爱说话的程序猿活跃起来,那个程序猿说了一句PHP是最好的语言。。。很多程序猿都喜欢站队,所谓站队就是自己在玩某某语言的时候,就会觉得这个语言很强大,自然而然的就站了队了。 我们的身边充斥着写java的看不上写.net的,写c的看不上一切,node异军突起,python批评ruby垃圾性能,高富帅swift从天而降,PHP是最强语言等等。。。 十二年前,我刚工作的时候,写医疗软件,用VB写界面,用VC写功能封装dll,当时觉得VB,VC太强了,结果现在它们基本都死了。 同样的还有: 我写过Dephi,死了。。 我写过asp,死了。。 我写过塞班,死了。。 我们更应当做的是跳出语言的框框,编程注重的是思想,而非语言。 —————————————— 总有人会说你不是一个真正的程序员。 看看这些说法吧! “HTML不是真正的编程语言。” “如果你不用vi,你就不是真正的程序员。” “真正的程序员得懂C语言。” “有些人就是不适合编程。” “有些人就是学不会。” “你根本就不是真正的程序员,我才是。” 要我说,编程对于不同的人有不同的含义。同时,编程的含义随着时间的流逝也在变化。 有趣的是,那些能让初学者,甚至是编程老鸟,更快上手,更省事的工具,包,框架等往往会被贴上 “真正的程序员不该使用” 这样的标签。 这种贴标签行为背后是一种恐惧:如果任何人都能称自己为程序员,那这个头衔就将毫无意义。不过,我认为这种闭关自守的行为是有害的。 去用那些让写程序变得容易的工具吧。如果那意味着你用 Stencyl 或者 GameMaker 来写游戏,而不是从零开始写一个新的,没事,只管去做。 如果你第一次尝试编程是从HTML或者Excel宏开始,没事,只管去做。哪个(编程方式)你能坚持下去,你就用哪个。 随着你技术不断提升,你就会发现那些便利工具对你的限制大于对你的帮助。那时,你就会去寻找更强大的编程工具。 但大多数时候,很少有人会看你的代码,或者问你用什么编程工具。你的程序到底好不好用才是真正重要的。 —————————————— 哈哈 易语言让你一分钟理解中文编程 Python让你理解国际性编程 C++让你理解低层编程 —————————————— https://imjad.cn/test/unicode.html 名字穿透,亲测TG、QQ可用 —————————————— 这傻逼终于走了 —————————————— 软件开发是一个极其特殊的行业,这里的从业者无一例外都要有超强的自学能力。 学习的知识是开放的(美国主导),并不像初高中那样,学习的东西是教育部闭环垄断的,书是它的,试卷也是它的。 本业实践性较强,就算出算法题也是叫你写出能运行的代码。 同时本业粗浅知识更新换代较快,而难的、底层的理论知识更新较慢。 这正应了一句话:简单得来的东西失效快。 —————————————— The following things are written in either C++ or C (we'll pretend C is a subset of C++, which is kind of true): All the major operating systems (Linux, Mac OS X, Windows) All the Blizzard games (World of Warcraft, Diablo series, StarCraft series...) Nearly all the other AAA games too (Unreal Engine & Unity are both C++. Valve and CryTek are also C++) Most console games (Wii series, PlayStation series, and most XBox games--except the indie arcade titles) Most interpreted programming languages have VMs written in C or C++ (Java, Python, Ruby, Perl, PHP, Lua) Many development environments and compilers (GNU C++, Visual Studio, KDevelop, but not Eclipse) Most productivity software (MS Office, Photoshop, Maya/3ds, SolidWorks, Inventor, AutoCAD) Major web browsers (Chrome, IE, Firefox, Opera... Safari might use substantial amounts of Objective C, though) Many iOS apps Many of these have other scripting languages embedded to do some of the work (World of Warcraft embeds Lua, for example), but compiled C++ usually forms the base layer that runs everything else even in these cases. C is the foundational language of modern computing. C++ is itself usually written in C. When you make a new operating system or new computing hardware, your first task is usually to write a simple C compiler. Once you have that, you use it to create/compile a powerful C compiler, and you use that to build a C++ compiler. From there, you can do anything--the other languages are built on top of this foundation. You could come up with other systems languages that do the same thing. Practically speaking, however, no one does. —————————————— I just want to know what I can do with C++. —————————————— Hi Jello, I am a 22 year old who was really into computers when I was your age. Sadly, I never followed up my desire to really learn C++ when I looked into it at that age. If you want to get into programming, C++ is definitely an important language to learn. C++ is used to create computer programs! Anything from art applications, music players and even video games. Yes, many video games have been made in C++. Keep in mind though, just like you wouldn't be able to write a book in Spanish after taking a few classes, you won't be making any serious video games right off the bat. Programming, like many skills, takes time. This is something I'm sure many people your age (including me at that age) sadly learn every day. There are many tutorials out there to teach you C++. The problem is, C++ is not exactly an easy language to learn. You can definitely give it a try, but I'm pretty sure unless you have worked with some other programming language before, it will probably be over your head. I am not trying to talk down to you, but at the age of 12 C++ was a bit over my head. Who knows, you may be the smartest 12 year old ever. Search around google or this site for tutorials. The best way to learn is to read, read, read and program, program, program. Read the forums on this site and see what other people are trying to do. Think of something you want to program, and see if you can figure out how to do it. Start simple and take more chances, this is the way to become a good programmer. The only way I could really see you getting into C++ at your age would be to find someone who could walk you through the basics and really break it down to you in simple terms. A lot of the people that write programming tutorials seem to forget that not everyone reading is a genius or completely familiar with a lot of programming terms. Either that, or buy a copy of C++ for Dummies. Hope that helps, if you have any more questions or need me to explain anything, just repost here and I'll answer. Unfortunately, I can't walk you through actually learning C++. Check the forums for that. Anything else, I'll do my best to answer. Don't be discouraged! Learn programming any way you can! You are never too young to start! In fact, I wish I had started seriously programming at your age and stuck with it. I have a lot of time to make up for! :D Good luck! —————————————— If I'm going to learn it, I need to know what it's for :O! And, are there any way a 12 year old can learn this? Thanks! —————————————— What exactly can I use C++ for? —————————————— 它们从不和人争,只靠实力发声 它们也不强暴着向用户要钱,更像一个值得信赖的伙伴。 —————————————— 我发现好多事人生中只做一件就无憾了 比如像许嵩现在出一首歌、创建互动百科、写出ES文件浏览器 还有很多, —————————————— every months —————————————— yes —————————————— https://raw.githubusercontent.com/racaljk/hosts/master/hosts —————————————— change dns —————————————— Depression —————————————— upset —————————————— all —————————————— both are ok. —————————————— creazy people group —————————————— M A A Y Y B B E E Y Y O O U U J J U U S S T T N N E E E E D D A A V V . —————————————— No —————————————— Y I N G S H A O X O I I N N G G S S H H A A O O X X O O —————————————— G T O O O B D O R —————————————— Y E S , T R Y I T E S , T R Y I T —————————————— how to get that? —————————————— cool —————————————— 5555 2222 000 5 2 0 0 5555 2222 0 0 5 2 0 0 5555 2222 000 —————————————— Gaokao is coming... —————————————— What are you talking about? —————————————— I don't believe —————————————— 人生毕竟短暂,与其花力气不屑别人、花时间舔舐自己伤口,不如趁早与生活握手言和,与内心所抗拒的这些那些全面和解,专心去活出属于自己的那一份跌宕起伏。 “心中的偏见一旦消弭,即便戴上有色眼镜,世界仍然能够大同” —————————————— Preprocessing – getting data into shape Raw data rarely comes in the form and shape that is necessary for the optimal performance of a learning algorithm. Thus, the preprocessing of the data is one of the most crucial steps in any machine learning application. If we take the Iris flower dataset from the previous section as an example, we could think of the raw data as a series of flower images from which we want to extract meaningful features. Useful features could be the color, the hue, the intensity of the flowers, the height, and the flower lengths and widths. Many machine learning algorithms also require that the selected features are on the same scale for optimal performance, which is often achieved by transforming the features in the range [0, 1] or a standard normal distribution with zero mean and unit variance, as we will see in the later chapters. Some of the selected features may be highly correlated and therefore redundant to a certain degree. In those cases, dimensionality reduction techniques are useful for compressing the features onto a lower dimensional subspace. Reducing the dimensionality of our feature space has the advantage that less storage space is required, and the learning algorithm can run much faster. To determine whether our machine learning algorithm not only performs well on the training set but also generalizes well to new data, we also want to randomly divide the dataset into a separate training and test set. We use the training set to train and optimize our machine learning model, while we keep the test set until the very end to evaluate the final model. —————————————— A roadmap for building machine learning systems In the previous sections, we discussed the basic concepts of machine learning and the three different types of learning. In this section, we will discuss other important parts of a machine learning system accompanying the learning algorithm. The diagram below shows a typical workflow diagram for using machine learning in predictive modeling, which we will discuss in the following subsections: —————————————— To keep the notation and implementation simple yet efficient, we will make use of some of the basics of linear algebra. In the following chapters, we will use a matrix and vector notation to refer to our data. We will follow the common convention to represent each sample as separate row in a feature matrix X , where each feature is stored as a separate column. The Iris dataset, consisting of 150 samples and 4 features: —————————————— An introduction to the basic terminology and notations Now that we have discussed the three broad categories of machine learning—supervised, unsupervised, and reinforcement learning—let us have a look at the basic terminology that we will be using in the next chapters. The following table depicts an excerpt of the Iris dataset, which is a classic example in the field of machine learning. The Iris dataset contains the measurements of 150 iris flowers from three different species: Setosa, Versicolor, and Viriginica. Here, each flower sample represents one row in our data set, and the flower measurements in centimeters are stored as columns, which we also call the features of the dataset: —————————————— Dimensionality reduction for data compression Another subfield of unsupervised learning is dimensionality reduction. Often we are working with data of high dimensionality—each observation comes with a high number of measurements—that can present a challenge for limited storage space and the computational performance of machine learning algorithms. Unsupervised dimensionality reduction is a commonly used approach in feature preprocessing to remove noise from data, which can also degrade the predictive performance of certain algorithms, and compress the data onto a smaller dimensional subspace while retaining most of the relevant information. Sometimes, dimensionality reduction can also be useful for visualizing data—for example, a high-dimensional feature set can be projected onto one-, two-, or three-dimensional feature spaces in order to visualize it via 3D- or 2D-scatterplots or histograms. The figure below shows an example where non-linear dimensionality reduction was applied to compress a 3D Swiss Roll onto a new 2D feature subspace: —————————————— Finding subgroups with clustering Clustering is an exploratory data analysis technique that allows us to organize a pile of information into meaningful subgroups (clusters) without having any prior knowledge of their group memberships. Each cluster that may arise during the analysis defines a group of objects that share a certain degree of similarity but are more dissimilar to objects in other clusters, which is why clustering is also sometimes called "unsupervised classification." Clustering is a great technique for structuring information and deriving meaningful relationships among data, For example, it allows marketers to discover customer groups based on their interests in order to develop distinct marketing programs. The figure below illustrates how clustering can be applied to organizing unlabeled data into three distinct groups based on the similarity of their features 1x and 2x : —————————————— Discovering hidden structures with unsupervised learning In supervised learning, we know the right answer beforehand when we train our model, and in reinforcement learning, we define a measure of reward for particular actions by the agent. In unsupervised learning, however, we are dealing with unlabeled data or data of unknown structure. Using unsupervised learning techniques, we are able to explore the structure of our data to extract meaningful information without the guidance of a known outcome variable or reward function. —————————————— Solving interactive problems with reinforcement learning Another type of machine learning is reinforcement learning. In reinforcement learning, the goal is to develop a system (agent) that improves its performance based on interactions with the environment. Since the information about the current state of the environment typically also includes a so-called reward signal, we can think of reinforcement learning as a field related to supervised learning. However, in reinforcement learning this feedback is not the correct ground truth label or value, but a measure of how well the action was measured by a reward function. Through the interaction with the environment, an agent can then use reinforcement learning to learn a series of actions that maximizes this reward via an exploratory trial-and-error approach or deliberative planning. A popular example of reinforcement learning is a chess engine. Here, the agent decides upon a series of moves depending on the state of the board (the environment), and the reward can be defined as win or lose at the end of the game. —————————————— Regression for predicting continuous outcomes We learned in the previous section that the task of classification is to assign categorical, unordered labels to instances. A second type of supervised learning is the prediction of continuous outcomes, which is also called regression analysis. In regression analysis, we are given a number of predictor (explanatory) variables and a continuous response variable (outcome), and we try to find a relationship between those variables that allows us to predict an outcome. For example, let's assume that we are interested in predicting the Math SAT scores of our students. If there is a relationship between the time spent studying for the test and the final scores, we could use it as training data to learn a model that uses the study time to predict the test scores of future students who are planning to take this test. The following figure illustrates the concept of linear regression. Given a predictor variable x and a response variable y, we fit a straight line to this data that minimizes the distance—most commonly the average squared distance—between the sample points and the fitted line. We can now use the intercept and slope learned from this data to predict the outcome variable of new data. —————————————— Making predictions about the future with supervised learning The main goal in supervised learning is to learn a model from labeled training data that allows us to make predictions about unseen or future data. Here, the term supervised refers to a set of samples where the desired output signals (labels) are already known. Considering the example of e-mail spam filtering, we can train a model using a supervised machine learning algorithm on a corpus of labeled e-mail, e-mail that are correctly marked as spam or not-spam, to predict whether a new e-mail belongs to either of the two categories. A supervised learning task with discrete class labels, such as in the previous e-mail spam-filtering example, is also called a classification task. Another subcategory of supervised learning is regression, where the outcome signal is a continuous value. Classification for predicting class labels Classification is a subcategory of supervised learning where the goal is to predict the categorical class labels of new instances based on past observations. Those class labels are discrete, unordered values that can be understood as the group memberships of the instances. The previously mentioned example of e-mail-spam detection represents a typical example of a binary classification task, where the machine learning algorithm learns a set of rules in order to distinguish between two possible classes: spam and non-spam e-mail. However, the set of class labels does not have to be of a binary nature. The predictive model learned by a supervised learning algorithm can assign any class label that was presented in the training dataset to a new, unlabeled instance. A typical example of a multi-class classification task is handwritten character recognition. Here, we could collect a training dataset that consists of multiple handwritten examples of each letter in the alphabet. Now, if a user provides a new handwritten character via an input device, our predictive model will be able to predict the correct letter in the alphabet with certain accuracy. However, our machine learning system would be unable to correctly recognize any of the digits zero to nine, for example, if they were not part of our training dataset. The following figure illustrates the concept of a binary classification task given 30 training samples: 15 training samples are labeled as negative class (circles) and 15 training samples are labeled as positive class (plus signs). In this scenario, our dataset is two-dimensional, which means that each sample has two values associated with it: 1x and 2x. Now, we can use a supervised machine learning algorithm to learn a rule—the decision boundary represented as a black dashed line—that can separate those two classes and classify new data into each of those two categories given its 1x and 2x values. —————————————— The three different types of machine learning In this section, we will take a look at the three types of machine learning: supervised learning, unsupervised learning, and reinforcement learning. We will learn about the fundamental differences between the three different learning types and, using conceptual examples, we will develop an intuition for the practical problem domains where these can be applied. —————————————— 8. 计量单位 cent 美分 penny 一美分硬币 nickel 5美分硬币 dime 一角硬币 dozen 打(12个) score 廿(20个) Centigrade 摄氏 Fahrenheit 华氏 quart 夸脱 gallon 加仑(1 gallon = 4 quart) yard 码 meter 米 micron 微米 inch 英寸 foot 英尺 minute 分(角度的度量单位,60分=1度) square measure 平方单位制 cubic meter 立方米 pint 品脱(干量或液量的单位) —————————————— 代数 ALGEBRA 1. 数论 natural number 自然数 positive number 正数 negative number 负数 odd integer, odd number 奇数 even integer, even number 偶数 integer, whole number 整数 positive whole number 正整数 negative whole number 负整数 consecutive number 连续整数 real number, rational number 实数,有理数 irrational(number) 无理数 inverse 倒数 composite number 合数 e.g. 4,6,8,9,10,12,14,15… prime number 质数 e.g. 2,3,5,7,11,13,15… reciprocal 倒数 common divisor 公约数 multiple 倍数 (minimum) common multiple (最小)公倍数 (prime) factor (质)因子 common factor 公因子 ordinary scale, decimal scale 十进制 nonnegative 非负的 tens 十位 units 个位 mode 众数 mean 平均数 median 中值 common ratio 公比 2. 基本数学概念 arithmetic mean 算术平均值 weighted average 加权平均值 geometric mean 几何平均数 exponent指数,幂 base 乘幂的底数,底边 cube 立方数,立方体 square root 平方根 cube root 立方根 common logarithm 常用对数 digit 数字 constant 常数 variable 变量 inverse function 反函数 complementary function 余函数 linear 一次的,线性的 factorization 因式分解 absolute value 绝对值,e.g. |-32|=32 round off 四舍五入数学 3. 基本运算 add,plus 加 subtract 减 difference 差 multiply, times 乘 product 积 divide 除 divisible 可被整除的 divided evenly 被整除 dividend 被除数,红利 divisor 因子,除数,公约数 quotient 商 remainder 余数 factorial 阶乘 power 乘方 radical sign, root sign 根号 round to, to the nearest 四舍五入 4. 代数式,方程,不等式 algebraic term 代数项 like terms, similar terms 同类项 numerical coefficient 数字系数 literal coefficient 字母系数 inequality 不等式 triangle inequality 三角不等式 range 值域 original equation 原方程 equivalent equation 同解方程,等价方程 linear equation 线性方程(e.g. 5x+6=22) 5. 分数,小数 proper fraction 真分数 improper fraction 假分数 mixed number 带分数 vulgar fraction,common fraction 普通分数 simple fraction 简分数 complex fraction 繁分数 numerator 分子 denominator 分母 (least) common denominator (最小)公分母 quarter 四分之一 decimal fraction 纯小数 infinite decimal 无穷小数 recurring decimal 循环小数 tenths unit 十分位 6. 集合 union 并集 proper subset 真子集 solution set 解集 7. 数列 arithmetic progression(sequence) 等差数列 geometric progression(sequence) 等比数列 8. 其它 approximate 近似 (anti)clockwise (逆) 顺时针方向 cardinal 基数 ordinal 序数 direct proportion 正比 distinct 不同的 estimation 估计,近似 parentheses 括号 proportion 比例 permutation 排列 combination 组合 table 表格 trigonometric function 三角函数 unit 单位,位 几何 GEOMETRY 1. 角 alternate angle 内错角 corresponding angle 同位角 vertical angle 对顶角 central angle 圆心角 interior angle 内角 exterior angle 外角 supplementary angles 补角 complementary angle 余角 adjacent angle 邻角 acute angle 锐角 obtuse angle 钝角 right angle 直角 round angle 周角 straight angle 平角 included angle 夹角 2. 三角形 equilateral triangle 等边三角形 scalene triangle 不等边三角形 isosceles triangle 等腰三角形 right triangle 直角三角形 oblique 斜三角形 inscribed triangle 内接三角形 3. 收敛的平面图形,除三角形外 semicircle 半圆 concentric circles 同心圆 quadrilateral 四边形 pentagon 五边形 hexagon 六边形 heptagon 七边形 octagon 八边形 nonagon 九边形 decagon 十边形 polygon 多边形 parallelogram 平行四边形 equilateral 等边形 plane 平面 square 正方形,平方 rectangle 长方形 regular polygon 正多边形 rhombus 菱形 trapezoid 梯形 4. 其它平面图形 arc 弧 line, straight line 直线 line segment 线段 parallel lines 平行线 segment of a circle 弧形 5. 立体图形 cube 立方体,立方数 rectangular solid 长方体 regular solid/regular polyhedron 正多面体 circular cylinder 圆柱体 cone 圆锥 sphere 球体 solid 立体的 6. 图形的附属概念 plane geometry 平面几何 trigonometry 三角学 bisect 平分 circumscribe 外切 inscribe 内切 intersect 相交 perpendicular 垂直 Pythagorean theorem 勾股定理(毕达哥拉斯定理) congruent 全等的 multilateral 多边的 altitude 高 depth 深度 side 边长 circumference, perimeter 周长 radian 弧度 surface area 表面积 volume 体积 arm 直角三角形的股 cross section 横截面 center of a circle 圆心 chord 弦 diameter 直径 radius 半径 angle bisector 角平分线 diagonal 对角线化 edge 棱 face of a solid 立体的面 hypotenuse 斜边 included side 夹边 leg 三角形的直角边 median (三角形的)中线 base 底边,底数(e.g. 2的5次方,2就是底数) opposite 直角三角形中的对边 midpoint 中点 endpoint 端点 vertex (复数形式vertices) 顶点 tangent 切线的 transversal 截线 intercept 截距 7. 坐标 coordinate system 坐标系 rectangular coordinate 直角坐标系 origin 原点 abscissa 横坐标 ordinate 纵坐标 number line 数轴 quadrant 象限 slope 斜率 complex plane 复平面 —————————————— Chapter 1, Giving Computers the Ability to Learn from Data In my opinion, machine learning, the application and science of algorithms that makes sense of data, is the most exciting field of all the computer sciences! We are living in an age where data comes in abundance; using the self-learning algorithms from the field of machine learning, we can turn this data into knowledge. Thanks to the many powerful open source libraries that have been developed in recent years, there has probably never been a better time to break into the machine learning field and learn how to utilize powerful algorithms to spot patterns in data and make predictions about future events. In this chapter, we will learn about the main concepts and different types of machine learning. Together with a basic introduction to the relevant terminology, we will lay the groundwork for successfully using machine learning techniques for practical problem solving. In this chapter, we will cover the following topics: • The general concepts of machine learning • The three types of learning and basic terminology • The building blocks for successfully designing machine learning systems • Installing and setting up Python for data analysis and machine learning Building intelligent machines to transform data into knowledge In this age of modern technology, there is one resource that we have in abundance: a large amount of structured and unstructured data. In the second half of the twentieth century, machine learning evolved as a subfield of artificial intelligence that involved the development of self-learning algorithms to gain knowledge from that data in order to make predictions. Instead of requiring humans to manually derive rules and build models from analyzing large amounts of data, machine learning offers a more efficient alternative for capturing the knowledge in data to gradually improve the performance of predictive models, and make data-driven decisions. Not only is machine learning becoming increasingly important in computer science research but it also plays an ever greater role in our everyday life. Thanks to machine learning, we enjoy robust e-mail spam filters, convenient text and voice recognition software, reliable Web search engines, challenging chess players, and, hopefully soon, safe and efficient self-driving cars. —————————————— What you need for this book The execution of the code examples provided in this book requires an installation of Python 3.4.3 or newer on Mac OS X, Linux, or Microsoft Windows. We will make frequent use of Python's essential libraries for scientific computing throughout this book, including SciPy, NumPy, scikit-learn, matplotlib, and pandas. The first chapter will provide you with instructions and useful tips to set up your Python environment and these core libraries. We will add additional libraries to our repertoire and installation instructions are provided in the respective chapters: the NLTK library for natural language processing (Chapter 8, Applying Machine Learning to Sentiment Analysis), the Flask web framework (Chapter 9, Embedding a Machine Learning Algorithm into a Web Application), the seaborn library for statistical data visualization (Chapter 10, Predicting Continuous Target Variables with Regression Analysis), and Theano for efficient neural network training on graphical processing units (Chapter 13, Parallelizing Neural Network Training with Theano). —————————————— Chapter 10, Predicting Continuous Target Variables with Regression Analysis, discusses the essential techniques for modeling linear relationships between target and response variables to make predictions on a continuous scale. After introducing different linear models, it also talks about polynomial regression and tree-based approaches. Chapter 11, Working with Unlabeled Data – Clustering Analysis, shifts the focus to a different subarea of machine learning, unsupervised learning. We apply algorithms from three fundamental families of clustering algorithms to find groups of objects that share a certain degree of similarity. Chapter 12, Training Artificial Neural Networks for Image Recognition, extends the concept of gradient-based optimization, which we first introduced in Chapter 2, Training Machine Learning Algorithms for Classification, to build powerful, multilayer neural networks based on the popular backpropagation algorithm. Chapter 13, Parallelizing Neural Network Training with Theano, builds upon the knowledge from the previous chapter to provide you with a practical guide for training neural networks more efficiently. The focus of this chapter is on Theano, an open source Python library that allows us to utilize multiple cores of modern GPUs. —————————————— Chapter 8, Applying Machine Learning to Sentiment Analysis, discusses the essential steps to transform textual data into meaningful representations for machine learning algorithms to predict the opinions of people based on their writing. Chapter 9, Embedding a Machine Learning Model into a Web Application, continues with the predictive model from the previous chapter and walks you through the essential steps of developing web applications with embedded machine learning models. Chapter 10, Predicting Continuous Target Variables with Regression Analysis, discusses the essential techniques for modeling linear relationships between target and response variables to make predictions on a continuous scale. After introducing different linear models, it also talks about polynomial regression and tree-based approaches. —————————————— http://www.runoob.com/ —————————————— Chapter 4, Building Good Training Sets – Data Preprocessing, discusses how to deal with the most common problems in unprocessed datasets, such as missing data. It also discusses several approaches to identify the most informative features in datasets and teaches you how to prepare variables of different types as proper inputs for machine learning algorithms. Chapter 5, Compressing Data via Dimensionality Reduction, describes the essential techniques to reduce the number of features in a dataset to smaller sets while retaining most of their useful and discriminatory information. It discusses the standard approach to dimensionality reduction via principal component analysis and compares it to supervised and nonlinear transformation techniques. Chapter 6, Learning Best Practices for Model Evaluation and Hyperparameter Tuning, discusses the do's and don'ts for estimating the performances of predictive models. Moreover, it discusses different metrics for measuring the performance of our models and techniques to fine-tune machine learning algorithms. Chapter 7, Combining Different Models for Ensemble Learning, introduces you to the different concepts of combining multiple learning algorithms effectively. It teaches you how to build ensembles of experts to overcome the weaknesses of individual learners, resulting in more accurate and reliable predictions. —————————————— What this book covers Chapter 1, Giving Computers the Ability to Learn from Data, introduces you to the main subareas of machine learning to tackle various problem tasks. In addition, it discusses the essential steps for creating a typical machine learning model building pipeline that will guide us through the following chapters. Chapter 2, Training Machine Learning Algorithms for Classification, goes back to the origin of machine learning and introduces binary perceptron classifiers and adaptive linear neurons. This chapter is a gentle introduction to the fundamentals of pattern classification and focuses on the interplay of optimization algorithms and machine learning. Chapter 3, A Tour of Machine Learning Classifirs Using Scikit-learn, describes the essential machine learning algorithms for classification and provides practical examples using one of the most popular and comprehensive open source machine learning libraries, scikit-learn. —————————————— Reflecting on my personal journey, I can truly say that the study of machine learning made me a better scientist, thinker, and problem solver. In this book, I want to share this knowledge with you. Knowledge is gained by learning, the key is our enthusiasm, and the true mastery of skills can only be achieved by practice. The road ahead may be bumpy on occasions, and some topics may be more challenging than others, but I hope that you will embrace this opportunity and focus on the reward. Remember that we are on this journey together, and throughout this book, we will add many powerful techniques to your arsenal that will help us solve even the toughest problems the data-driven way. —————————————— f you have already studied machine learning theory in detail, this book will show you how to put your knowledge into practice. If you have used machine learning techniques before and want to gain more insight into how machine learning really works, this book is for you! Don't worry if you are completely new to the machine learning field; you have even more reason to be excited. I promise you that machine learning will change the way you think about the problems you want to solve and will show you how to tackle them by unlocking the power of data. Before we dive deeper into the machine learning field, let me answer your most important question, "why Python?" The answer is simple: it is powerful yet very accessible. Python has become the most popular programming language for data science because it allows us to forget about the tedious parts of programming and offers us an environment where we can quickly jot down our ideas and put concepts directly into action. —————————————— + plus 加号;正号 - minus 减号;负号 ± plus or minus 正负号 × is multiplied by 乘号 ÷ is divided by 除号 = is equal to 等于号 ≠ is not equal to 不等于号 ≡ is equivalent to 全等于号 ≌ is equal to orapproximately equal to 等于或约等于号 ≈ is approximately equal to 约等于号 < is less than 小于号 > is more than 大于号 ≮ is not less than 不小于号 ≯ is not more than 不大于号 ≤ is less than or equal to 小于或等于号 ≥ is more than or equal to 大于或等于号 % per cent 百分之... ‰ per mill 千分之... ∞ infinity 无限大号 ∝ varies as 与...成比例 √ (square) root 平方根 ∵ since; because 因为 ∴ hence 所以 ∷ equals, as(proportion) 等于,成比例 ∠ angle 角 ⌒ semicircle 半圆 ⊙ circle 圆 ○ circumference 圆周 π pi 圆周率 △ triangle 三角形 ⊥ perpendicular to 垂直于 ∪ union of 并,合集 ∩ intersection of 交,通集 ∫ the integral of ...的积分 ∑ (sigma) summation of 总和 ° degree 度 ′ minute 分 ″ second 秒 ℃ Celsius system 摄氏度 { open brace, open curly 左花括号 } close brace, close curly 右花括号 ( open parenthesis, open paren 左圆括号 ) close parenthesis, close paren 右圆括号 () brakets/ parentheses 括号 [ open bracket 左方括号 ] close bracket 右方括号 [] square brackets 方括号 . period, dot 句号,点 | vertical bar, vertical virgule 竖线 & ampersand, and,reference, ref 和,引用 * asterisk, multiply, star, pointer 星号,乘号,星,指针 / slash, divide, oblique 斜线,斜杠,除号 // slash-slash, comment 双斜线,注释符 # pound 井号 backslash, sometimes escape 反斜线转义符,有时表示转义符或续行符 ~ tilde 波浪符 . full stop 句号 , comma 逗号 : colon 冒号 ; semicolon 分号 ? question mark 问号 ! exclamation mark (英式英语) exclamation point (美式英语) ' apostrophe 撇号 - hyphen 连字号 -- dash 破折号 ... dots/ ellipsis 省略号 " single quotationmarks 单引号 "" double quotation marks 双引号 ‖ parallel 双线号 & ampersand = and ~ swung dash 代字号 § section; division 分节号 → arrow 箭号;参见号 —————————————— If you type "machine learning" as a search term in Google Scholar, it returns an overwhelmingly large number-1,800,000 publications. Of course, we cannot discuss all the nitty-gritty details about all the different algorithms and applications that have emerged in the last 60 years. However, in this book, we will embark on an exciting journey that covers all the essential topics and concepts to give you a head start in this field. If you find that your thirst for knowledge is not satisfied, there are many useful resources that can be used to follow up on the essential breakthroughs in this field. —————————————— If you want to become a machine learning practitioner, a better problem solver, or maybe even consider a career in machine learning research, then this book is for you! However, for a novice, the theoretical concepts behind machine learning can be quite overwhelming. Yet, many practical books that have been published in recent years will help you get started in machine learning by implementing powerful learning algorithms. In my opinion, the use of practical code examples serve an important purpose. They illustrate the concepts by putting the learned material directly into action. However, remember that with great power comes great responsibility! The concepts behind machine learning are too beautiful and important to be hidden in a black box. Thus, my personal mission is to provide you with a different book; a book that discusses the necessary details regarding machine learning concepts, offers intuitive yet informative explanations on how machine learning algorithms work, how to use them, and most importantly, how to avoid the most common pitfalls. —————————————— I probably don't need to tell you that machine learning has become one of the most exciting technologies of our time and age. Big companies, such as Google, Facebook, Apple, Amazon, IBM, and many more, heavily invest in machine learning research and applications for good reasons. Although it may seem that machine learning has become the buzzword of our time and age, it is certainly not a hype. This exciting field opens the way to new possibilities and has become indispensable to our daily lives. Talking to the voice assistant on our smart phones, recommending the right product for our customers, stopping credit card fraud, filtering out spam from our e-mail inboxes, detecting and diagnosing medical diseases, the list goes on and on. —————————————— friends —————————————— https://www.anotherhome.net/link —————————————— 这几天铺天盖地的都是阿尔法狗对阵李世石的新闻。无论李世石最终能否战胜AI,一个显而易见的事实是,我等围棋零段选手倘若对阵阿尔法狗,肯定被虐成渣。 现在阿尔法狗引发了一轮机器学习的新高潮,我估计大家的手机都被刷屏了。反复讨论的几个问题无非是:电脑到底会不会有真正的智能?电脑最终会不会毁灭掉人类文明然后由机器人统治地球? 讨论这种问题跟讨论哲学问题一样,包括霍金在内的智商最高的一群科学家都无法达成共识。 我个人的看法是,假设宇宙中诞生过很多文明,其实他们的发展过程和人类文明都是一样的:首先诞生生命,然后进化出智能物种,智能物种创造了计算机并致力于发展AI,AI最终超越了智能物种并自己统治了行星。由于AI进化实在太快,他们开始试图直接获取恒星的能量,但宇宙定律不会因为AI太聪明而改变。AI能力再强也无法100%模拟亚原子级别的核物理实验。在真正的亚原子实验中,恒星爆炸了,整个星系连同AI文明一同被摧毁。 你看,文明的发展就是这么简单:单细胞生物,多细胞生物,智能生命,AI,智能生命被AI毁灭,然后AI毁灭了星系,一个文明结束了。 你问我有什么证据,愚蠢的人类啊,过去若干年人类观测到的每一次超新星爆炸都是一个AI文明的结束,这就是为什么外星人无法到访地球的原因了:他们早把自己搞死了。 以上胡扯结束,下面开始做广告。 话说阿尔法狗的机器学习超能力也不是搞着玩的,毕竟要大把大把地砸钱啊。有可靠的谣言称Google对自己招聘的机器学习专家开出了200多万美金这种惨无人道的天价年薪。不要忘了Google也是资本家在管理,怎么会投资只赔不赚的事情?下一步,他们就要用机器学习来大把大把地赚钱了。怎么赚?凡是机器学习可以解决的问题,人就可以下岗了,毕竟是机器,不拿工资不上保险,不吃不喝只费电,在中国也就网费稍贵点,也不是大问题。 现在大问题来了:未来的若干年内,哪些人的工作会被有机器学习能力的电脑取代? 其实简单思考一下就会明白,凡是不用动脑子,整天干重复性劳动的岗位就会消失。 打个比方,假如你是一个小编,每天负责在网上收集段子然后发到公众号,这个工作就很危险,因为给用户定向推送的机器学习程度都不需要达到阿尔法狗的水平。但是段子手这个工作就不会被机器取代,类似不会被机器取代的还有搞绘画的艺术家,电影导演等等,简单地概括就是,从事创造性工作的岗位永远不用担心被机器抢了工作。 软件工程师也不用担心,因为写程序也是一种创造性的工作。有人担心将来机器学习发展成电脑会自己写程序了怎么办,这实在是杞人忧天。如果你仔细阅读了上文,就会发现,当软件工程师的工作被电脑取代时,地球就即将被AI统治,太阳系离毁灭也不远了。所以说,写程序将是世界上最后一个消失的工作。 从事一种地球上最后一个消失的行业绝对是一个明智的选择。如果你想以小白的身份进入这个行业,不妨从小白的Python新手教程开始,零基础起步,将来成为机器学习的专家。 —————————————— OReilly 免费电子书打包 http://pan.baidu.com/s/1gfvxKiR —————————————— If I'm SX, SX, SX, SX, SX~ —————————————— 不知道你的朋友圈里有没有这种人。 他们是朋友圈里的尖子生,学什么都比别人快,做什么事都比别人好,哪怕是玩也能玩出花样,简直优秀到欠揍。如果你就是这种人,请直接跳到文末点赞。 这篇文章是写给另一种人的,也就是看到这里的你。除了看莫二的文章的以外,你还喜欢看屁股。工作时你追着老板的屁股跑,学习时你追着学霸的屁股跑,休息时你追着朋友屁股跑,其他时候你都追着时间的屁股跑。 你比很多人都要勤奋,至少看起来是这样。得到的却并不比人多,一个屁股也没追到,还差点把自己熏死。你很困惑,甚至开始怀疑人生。解开这个困惑,不难,你需要明白“少即是多”的道理。 1.少即是多 “少即是多”——这是很多鸡汤文学惯用的句式,似乎只要把两个反义词放进同一个句子里,瞬间就镀金镶钻,逼格满满。比如:你的优势就是你的弱点;愚蠢是最大的聪明;孤独是一个人的狂欢。这样的句子多半都是扯淡,但也不乏一些深刻的哲理。 抱着这种期待,我尝试去理解“少即是多”背后的意义。 “less is more”最早是由德国建筑大师密斯·凡德罗提出,主张去繁从简。在建筑的设计中,追求从整体到细部的极简主义。去除杂乱无章的装饰、无中生有的变化、奇形怪状的摆设,空余轻灵通透的流动空间。 细思之下,其实这个理念古已有之,而且无处不在。国画讲究惜墨如金,简洁的笔触、大片的留白,为想象预留出驰骋的空间。文学创作中,越是朴素的语言越能描绘出真挚的情感。服装设计中,那些经久不衰的流行元素无不诠释着简洁的内涵。 《小王子》的作者圣埃克苏佩里也说过同样的道理——至臻完美之时,不是加无可加,而是减无可减。 “少即是多”的意思,就是删去那些无意义的附缀,只保留真正有价值,重要的部分。可是我们又该如何评判哪些才算是无意义,哪些又是有价值的部分呢? 2.明确目标 几十年前,人们最大的痛苦就是没有选择,而现在选择太多似乎也变成了一种痛苦。 起初我认为,这是因为人天生就惧怕选择。我曾在文章中多次提到人脑是认知“吝啬鬼”,怎么省力怎么来。做选择又很费脑力,这个解释合情合理。比如买手机时,很多人宁愿把选择权直接交付给苹果,也不愿自己陷入纠结。 后来我发现痛苦的根源并不是选择太多,这一点可以通过经典的“沙堆悖论”来证明。 如果1颗沙粒不叫沙堆,那么2颗沙粒也不叫沙堆。如果2颗沙粒不叫沙堆,那么3颗沙粒也不是沙堆。以此类推,即使1万个沙粒也不是沙堆。 要破解“沙堆悖论”必须规定一个界限。只要超过界限,量变就发生质变,沙粒就变成沙堆。也就是说,一旦选项的数量超出了某个界限,就触发了选择困难症。现实中我却找不到这样的界限,即使只有两个选项,依然有人无法抉择。难道只有一个选项时,我们才知道如何选择吗?这未免太扯。 我逐渐意识到了一个更深层次的原因,那就是我们根本不知道自己需要什么。可如何才能确定自己需要什么呢?问题似乎又回到了原点。 我是个对信息极度饥渴的人,关注了很多公众号,经常看的却只有那么几个。那些不看的公众号右上角都有个小红点,像一只只哭红的眼。眼里是一个数字,记录着我们分居的日子。数字与日俱增,我却始终不忍心与它们彻底决裂,毕竟爱过。 前段时间公众号开通了置顶功能,我置顶了5个,瞬间感觉解脱了。也突然明白了,原来每个人都知道自己需要什么,只是没有意识到。这种需求或者埋藏在潜意识里,或者被过多的选项所蒙蔽。 微信用置顶服务为你搬了一次家,搬进了一个更小的房间。这个房间里放不下太多东西,这时你突然意识到原来你买了那么多没用的东西,甚至觉得自己的男朋友都变成了身外之物。 我们又该如何为自己搬一次家呢?不需要搬家公司,只需要一个清晰的目标,重音落在“清晰”,清晰的就像已经发生在你的眼前。 我想提高自己!我想考个好大学!我想找个好工作!这些都算不上清晰。怎样才算是提高自己?好大学的具体定义是什么?工作好坏的标准又是什么?太过抽象的目标只会导致一连串的疑问,没有任何指导意义。 这个目标要绝对的清晰,比如像这样:我想找个20岁,身高165,体重45公斤,长发,颜值85分,D罩杯,性格开朗,爱看美剧的妹子。你要在大脑中清晰的勾勒出她的音容笑貌。 有了这个目标之后就够了吗?当然不够,你还要剔除那些与目标无关的干扰。 3.剔除干扰 干扰是泛滥在你朋友圈里的微商,充斥在淘宝里的假货,常年占据百度搜索结果前几名的虚假广告。 有些干扰显而易见,有些却难以盖棺定论,它们和主题有关,关系又不是很紧密,食之无味,弃之可惜。 微信聊天里的表情功能算不算干扰呢?删了表情天也照样可以聊。 文学创作中所用的修辞手法算不算干扰呢?不用修辞文章也照样可以写。 如何判定一个信息是可剔除的干扰,是否有一个统一的标准?这个标准就是我们所说的效率。 人是追求效率的动物,我们生活中的一切发明基本上都是为提高效率而生。比如汽车是为了提高空间移动的效率,网络是为了提高信息流通的效率,简书是为了提高你写作的效率。 讽刺的是,现实中有很多人却沉湎于低效的事而不自知。如果你去问一个低头族,他为什么连走路都要玩手机,他会告诉你他是在合理利用时间,抓住一切机会上网、学习或者撩妹。 别被他唬住了,他之所以看起来这么勤奋只是因为他效率低。为了弥补自己效率低的事实,他投入更多的精力去关注很多无用的干扰,而这些干扰又降低了他的效率,从而进入恶性循环。 小孩才讲究勤奋,大人只追求效率。用行动上的勤奋弥补思想上的懒惰,并不能提高效率,只能让你自我安慰罢了。 想要提高效率,你首先要知道什么才是效率,效率=回报/时间,效率高说明同样的成本,得到的回报越多。这个道理说出来大家都懂,却又经常忽略了一个最基本事实——成本并不是金钱,不是面子,不是其他的任何东西。 成本有且仅有一个,那就是你的时间。 多少次你为了节省钱,买了一堆并不怎么喜欢的衣服,它们已经占领了你的衣柜,它们的领土还在急剧的扩张。它们守卫森严,机关重重。每次你至少要花上10分钟才能解救出那条心爱的裙子。 多少次你为了节省粮食,即使吃饱了也要硬着头皮和肚皮吃完。却从没意识到,它们就这样变成了你脂肪。为了甩掉它们你办了一张年费5000的健身卡,虽然很少去,但是为了心安理得,每个周末你都要在健身房耗上一下午。 多少次你为了节省一张电影票、一顿饭,或者你那薄如蝉翼的面子,不愿邀请你暗恋已久的同事。你在手机里下载了微信、陌陌、探探、抱抱。奋斗了三个月,你到是约出来一次炮,最后哭着打完,打完后手机还丢了。 上学时,老师都会这样给我们洗脑,时间就是金钱,一寸光阴一寸金。当时没人相信,现在就更不信了。时间可比金钱贵重多了,我们可以挽回失去的钱,却永远无法挽回失去的时间。 我想你应该可以回答先前提出的问题了。微信聊天功能中的表情是不能删除的,事实也证明了这一点。几乎所有的社交软件都有表情功能,因为在表达特定的情感或想法时,表情显然更有效率,一个表情可以让你少打不少字。比如像这样: 同理,文学创作中的修辞也是必不可少的。先不说一些修辞手法在心理学层面上顺应了大脑的认知规律(如生动性效应、汤姆索亚效应),修辞可以让读者更好的领会你所要表达的意境,让语言更加立体丰满。这个层面上它是高效且必须的。当然太丰满了也不好,过度的堆砌华丽辞藻,反而会给读者的理解造成干扰。 4.开始改变 “少”并不是一种损失,也不是让你做出牺牲,而是剔除那些无关的,低效的干扰。让你有更“多”的时间和精力,专注去做那些你真正想做的事。 起初你可能会有点不舍,毕竟它们已经陪伴了你很久,已经成为了你身体的一部分,你的赘肉,你的肚腩。 也正因为如此,不要以为看完这篇文章,懂得了“少即是多”的道理,你就能轻易的甩掉他们,改变是一个过程,重要的是你要开始改变。 那些长年不穿的衣服就捐了吧;那些很久不看的公众号就删了吧;那些没那么喜欢的人就别撩了吧。 生活不是监狱,爱情也不是围城,先把身上枷锁卸了吧。 —————————————— But maybe you should look at this: http://www.itingwa.com/u/126943/tingshuo/ —————————————— Good music about a girl. http://www.itingwa.com/u/126943/music/ —————————————— God GA God GA GA GA GA GA —————————————— e... Here you can exercise your typing skill: https://www.typingclub.com —————————————— That will error. 2.9 is ok. —————————————— 来,今天给你不一样的充“电”方式!: http://pan.baidu.com/s/1i4N33H7 音乐间谍V2.9: http://pan.baidu.com/s/1pLmtHQ7 —————————————— http://www.williamlong.info/archives/4579.html —————————————— Trust me, nothing can compared with copying others available codes, can make a man happy. —————————————— here it is: 链接: http://pan.baidu.com/s/1slUUJjZ 密码: jpe6 —————————————— But youtube is a safe place. Yeah, right there. —————————————— I'm fear the law. —————————————— What I should do? —————————————— Should —————————————— I made a video by premiere. But it's so sex. It's about my female classmate. Now, I'm wandering if I could send it to YouTube or Bilibili. —————————————— Bulit a wordpress is so easy, I think —————————————— Papapa —————————————— Link! —————————————— I'm lazy at everything. That's stupid to me. But I can't help. —————————————— Hey guys, am… I totally think I'm an asshole. —————————————— 你想啊,没精力能做什么啊 —————————————— 做结扎手术才是脱贫致富的唯一手段。 哈哈哈哈 —————————————— 现在我的脑子不断冒出色情画面 想要催使我去撸 但我不能,我要把最近锻炼身体产生的精力留给学习、留给高考 但我知道我不会抵抗太长时间 以前无数次的失败告诉我最后一定会禁不住诱惑,下载xx,边看边撸,最后一秒激情,赢来无尽的虚弱与疲惫与孤独 😔没救了 —————————————— 星爷说:做人如果没梦想(不折腾),和一条咸鱼(死鱼)有什么区别 —————————————— 问: 背单词软件有大概多少人注册第一天都没有背完嘛? 答:68.15% 问:有多少人是在坚持或者曾经坚持过背单词呢?(假设100天以上算的上是背单词的话) 答:保守估计,不足3.4% 问:有多少梦想,毁于不能坚持? 答:不妨干了这碗鸡汤,歌唱青春一去不复返. 问:背单词的人们学习的量,是不是符合正太分布呢? 答:不是,简直就是反比例函数. 抛出一个结论: 以绝大部分人努力之低,根本就用不着拼天赋. 赠给你我,共勉. http://python.jobbole.com/84526/ —————————————— 妈蛋,决心做个程序员。 方便面矿泉水已备好!学校不支持...辍学...盆友不支持...友尽...老婆不支持...离婚...小孩不支持...已送孤儿院...备用电源百兆光纤4g无线,永不断电断网!门口已埋雷,无人打扰。 —————————————— 恭喜 —————————————— all of you —————————————— mental —————————————— 你们都不是精神病 加进来干嘛 —————————————— #!/usr/bin/python3 # -*- codeing : UTF-8 -*- import requests#调用requests from bs4 import BeautifulSoup#调用BeautifulSoup import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030')#改变本地标准输出的默认编码;p.s:易语言就是这么干的,支持多数中文,避免乱码(使用IDE就不用以上三行) def from_web_get_html(goal_website, from_website): true_host = from_website.replace('https://','').replace('http://','')#得到没有http的网址 headers = {'Host':true_host,'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8','User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36','Accept-Encoding':'gzip, deflate, sdch','Accept-Language':'zh-CN,zh;q=0.8'}#伪装成浏览器 html = requests.get(from_website, headers)#从原始地址, old_cookie = html.cookies#得到cookie html = requests.get(goal_website, headers=headers, cookies=old_cookie, allow_redirects=False)#用旧的cookie访问新地址 html.encoding = 'utf-8'#转换下编码 result = html.text return result#返回网页源码 html_text=from_web_get_html('https://www.baidu.com/s?wd=hello&gpc=stf%3D1428837022%2C1460459421%7Cstftype%3D1', 'https://www.baidu.com')#通过给目标地址,和老的跳转地址得到源码 soup = BeautifulSoup(html_text, "html.parser")#调用强大的BeautifulSoup进行网页源码处理 #print (soup.title.text)#得到标题 #print (soup.prettify())#得到整理后美观的源码 print (soup.body.text)#得到网页主体内容 #参考资料: #https://jecvay.com/category/smtech/python3-webbug #https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html #http://blog.csdn.net/jim7424994/article/details/22675759 #https://www.google.com —————————————— 软件需求分析: 1.首先,设定搜索关键词 2.然后,从搜索引擎第10页往后遍历 3.如果页面检测到网页同时包含百度盘链接与关键字密码 就将该链接与密码记录并有序写入txt文本 4.假设限定采集到7条信息后停止采集 5.输出给用户 改进第3点: 必须只含一个百度盘链接和一个关键词密码。取关键词密码后4位,不满4位遇空格则舍弃该页。 改进第3点: 同时提取网页标题 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 原理分析: 1.需要寻找文本中的某个特定字符,得到它出现的次数,得到它本身或其后字符;可考虑使用正则表达式或核心字符操作库 2.需要得到一个网址的源代码;考虑用自带网络库或requests中的GET函数 3.需要了解搜索引擎的翻页方式,以便正确得到10页后的网址 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 模块分解: 一、得到网页源码 import requests #导入某网络模块 html = requests.get('http://www.dydog.org/star.php') #填入某网址 html.encoding = 'utf-8' #转码 print(html.text) #输出网页源码 ************************ import requests def from_web_get_html(website): headers = {'Host':'www.baidu.com','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8','User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36','Accept-Encoding':'gzip, deflate, sdch','Accept-Language':'zh-CN,zh;q=0.8'} html = requests.get(website, headers) html.encoding = 'utf-8' result = html.text return result ~~~~~~~~~~~~~~~~~~~ 二、判断一段文本中是否含有一个http://yunpan.cn/和“码” A_text = '''' http://pan.baidu.com/s/1dDnqRdB 访问码l20i'''#只有一个百度盘地址 B_text = ''' http://pan.baidu.com/s/1dDnqRdB 访问码l20i http://pan.baidu.com/s/1dDnqRdB 访问码l20i'''#有多个百度盘地址 test_text = B_text#测试哪个文本 web_number =test_text.count('http://pan.baidu.com/s/')#百度盘链接个数 pass_number = test_text.count('码')#“密码”出现的次数 if (web_number == 1 and pass_number == 1): print ('true')#满足条件则输出ture else: print ('false') ************************ def include_i_want_or_not(text): web_number = text.count('http://pan.baidu.com/s/') pass_number = text.count('码') if (web_number == 1 and pass_number == 1): return True else: return False 三、提取该网页的标题,百度盘链接以及密码 import re #导入正则表达式库 title=re.search('',html_text,re.S).group(1)#用正则表达式取第一个标题 先用find()找到http://pan.baidu.com/s/第一次出现的位置, 然后该位置+22,得到22到30的字符 密码同理 text=''' 456456http://pan.baidu.com/s/1bnF6G0n465453密码:6fme罚款或控股卡怪''' first_num = text.find('http://pan.baidu.com/s/')#得到这个链接第一次出现的位置 goal_num = first_num+23#将这个位置加上它本身的字符数23 print (text[goal_num:goal_num+8])#然后取得从目标位置到其后8位的字符(独一无二的字符,我们只需要它,貌似是短链接) print ('\n')#换个行再说 first_num = text.find('码') goal_num = first_num+2#将这个位置加上它本身的字符数2 print (text[goal_num:goal_num+6])#然后取得从目标位置到其后6位的字符(也就是访问码啦?) ************************ import re def get_title(html_text): title=re.search('',html_text,re.S).group(1) return title def get_words_after_special_words(txt,words,number): words_len = len(words) first_num = txt.find(words) goal_num = first_num+words_len return txt[goal_num:goal_num+number] 四、研究如何利用搜索词爬取搜索引擎,得到无尽的网页地址 https://www.baidu.com/s?wd=hello 发现不管怎么伪装,都会被百度跳到首页,求大神解答 —————————————— 问一下,为什么我用python伪装了heards后 Get百度搜索,仍然会跳到首页? —————————————— 得好好看看大神的笔记 http://digitalman.blog.163.com/blog/#m=0&t=1&c=fks_085067085084086066084094094095086085089068080080086070082 —————————————— 突然发现好多模型啊 太兴奋了 http://hackadoll.com/mmd —————————————— http://www.nicovideo.jp/watch/sm27867085 有没有日文大师,帮忙下载模型... —————————————— 学C4D不要走错路 B站就有教程 http://www.bilibili.com/sp/CINEMA%204D —————————————— 看到那些妹妹好眼馋,可惜一个都不能用 —————————————— http://il0venaughtyfins.deviantart.com/art/Project-Diva-Arcade-Megurine-Luka-DOWNLOAD-373342553 这里发布的好像是贴图文件什么的 —————————————— http://tf3dm.com/3d-model/sentinel-lingerie-61135.html 没有C4D的,好可惜 —————————————— 看完第三遍觉得自己没救了 —————————————— 海上钢琴师传递的消极信息太强了 我差点招架不住 —————————————— 压力大就睡不着, 睡不着状态就不好, 状态不好就做不好事, 做不好事压力就更大, …一直恶性循环… 不要让这事发生,学会平静,安然入眠。 —————————————— 领域不同,完全不同 —————————————— 就算是程序员 也不是互相了解 —————————————— 也不能在php服务器上运行 —————————————— 也不能在unix上运行 —————————————— 讨厌编程,太烦了 windows上写的不能在ios上、Android上运行 —————————————— http://m.jb51.net/article/36447.htm —————————————— ①使用Windows API函数Load Library或者MFC提供的AfxLoadLibrary将DLL模块映像到进程的内存空间,对DLL模块进行动态加载。 ②使用GetProcAddress函数得到要调用DLL中的函数的指针。 ③不用DLL时,用Free Library函数或者AfxFreeLibrary函数从进程的地址空间显式卸载DLL  —————————————— 显式调用 —————————————— 这绝对降低学习难度 —————————————— 我想我可以不学这些,只需要知道c++怎么调用dll 然后其他事交给易语言 —————————————— c++不好玩,到现在都不知道窗口怎么建 不过如果只是命令行(控制台),然后能用GET取网页源码的话 还是可以考虑用c++的 —————————————— 求大神天天发干货 —————————————— 要死了,telegram没活力了 —————————————— 我觉得我还是喜欢花UI —————————————— 想读心理学,发现要求分数挺高 —————————————— python —————————————— ss+bot+php 不知道有没有可能 —————————————— 准备买个vps了 —————————————— 我已放弃国内 —————————————— 官方的 —————————————— git上有什么关于人工智能、深度学习、大数据分析的开源项目吗?最好python —————————————— 5:30起 6:30街灯关,回 —————————————— #!/usr/bin/python3 # -*- codeing : UTF-8 -*- import telepot #引入机器人模块;如果没有,请在命令行写入pip install telepot 和pip install telepot import time #引入时间模块;如果没有,请在命令行写入pip install time #如出错,请在python的安装目录下寻找pip.exe,将其拖入cmd窗口,再加上空格+install+空格+模块名 bot = telepot.Bot('121899714:AAFyTKIRyn3u3MCi_7DUBIDHFoABcahPM-Y') #设置密匙(访问令牌) #print (bot.getMe()) #得到这个机器人的信息 def handle_message(msg): #这个函数用来接收新信息 content_type, chat_type, chat_id = telepot.glance(msg) #分别得到消息类型、聊天场所、聊天id print(content_type, chat_type, chat_id) print(msg[u'chat'][u'id']) #输出聊天id print(msg[u'text']) #输出消息内容 bot.sendMessage(msg[u'chat'][u'id'], msg[u'text']) #回复发送同样的内容 #f = open('C:\\YS.png', 'rb') #打开某个本地文件,并取得字节集 #bot.sendPhoto(msg[u'chat'][u'id'], f) #然后发给别人,同理还有sendAudio(), sendDocument(), sendSticker(), sendVideo(), and sendVoice() bot.notifyOnMessage(handle_message) #关联上面那个def函数用到的代码 while 1: #为了保持程序运转,十秒一次 time.sleep(10) —————————————— 深入py就发现很多以前从未听说过的词语 —————————————— 额,这群没有小雅 罢了,等功能完善与稳定后再加进来 —————————————— go 1 —————————————— 哈哈,其实有人做出q群与q群之间的聊天工具了 —————————————— 跑步6点半起来暗了,路上已全是车,灰尘大,对身体反不好 明天5:30起来 —————————————— 早上好 —————————————— 不牛,痛苦死了,高考都搞不定 估计还要用"我要当学霸"来约束自己 —————————————— clam down, 睡觉是保持头脑清醒的最好方法。 —————————————— 我竟然把它看完了 https://read.douban.com/ebook/3069929/ —————————————— In anyway, master maths and English is the only way for becoming a greatest programmer. —————————————— http://www.pdfshu.org/?fenlei/20 —————————————— 我认为那是个历史学名词 —————————————— 命运共同体的构建,确实能解决一些一个人做不下来的事。 —————————————— 但坏人成本太高 http://bookdl.com/ —————————————— 真想做坏人 http://it-ebooks.flygon.net/ —————————————— 我也希望最后100天有个聪明美丽的同龄妹子陪着我, 可现实确是,my mon.😒 —————————————— but i had baiduyun. —————————————— no money —————————————— 有道理 —————————————— 昨天在网上找了下中国黑客网站 好失望,没一个有用 —————————————— 但你们有几个没结婚的能说自己不孤独? —————————————— 精神病人是很孤独的 —————————————— 无情人 —————————————— 每次看到都会有点伤心 —————————————— 要是能把离群的消息屏蔽就好了 —————————————— ok, the spirit world.😊😃 —————————————— 原来任何相对势力都是对抗的 技术升级还是对抗 没有哪方会真正胜利 只是暂时的高低 正是这种相互的对抗,赋予了这个世界丰富多彩以及无穷的活力 😉 free世界真的不完全存在 —————————————— oh, —————————————— 加进来的全叫returned 真以为我认不到英语😂 —————————————— 会不会游戏才是理想主义者的归属? http://bestcbooks.com/categories/you-xi/ —————————————— 于是就有了这个群 —————————————— 我说既然都这样了,干脆建个群来疯 —————————————— I always do something that normal people don't want to do. —————————————— 我老早就被人说有强迫症 —————————————— 想说中文就中文,想说英文就英文 —————————————— 我随意 —————————————— you can speak chinese —————————————— no —————————————— want change this world —————————————— mad —————————————— https://github.com/yu4u/age-gender-estimation#usage It works pretty well —————————————— 还有就是 社会出了事不能怪政府 是人民自己无能,没有自主意识—>去设计一套解决问题的系统 —————————————— 我突然觉得大学的考试是个笑话(一个努力学习一个学期的人和努力作弊2、3天的人 没差几分) 以后谁也别让我考 60 Plugins -> Browse Repositories and search for IdeaVim. —————————————— 我突然觉得学历不是什么问题 真正屌的人可以去参加各个学校的自主招生(清华北大啥的) —————————————— 沉迷于正确的django使用方法无法自拔 以前跟着官方教程和 stackoverflow 的回答走了好多弯路 —————————————— https://youtu.be/Dhkd_bAwwMc 人人有模型都可以做3D动漫的时代到了 —————————————— 对了,现在可以在lubuntu上躺着边看pdf边写代码(Alt tab 切换得起飞,多亏了lubuntu上的默认pdf reader,既可以自动保存进度,又可以vim控制翻页) 前提是所有单词都认识 就不用依赖安卓多看阅读查词了 不过 LyingDown 还是有局限,有时会莫名卡住,,,需要 figure out where goes wrong —————————————— heroku真好玩 https://evening-shelf-47934.herokuapp.com —————————————— 就让我乘着 django 的风 混合着 vue 与 tensorflow.js 的香味 带着 100% yingshaoxo special thoughts 飞向远方吧! —————————————— 刚刚看了一下 E_Python的实现逻辑已经很完美(年轻就是好) 我再改反而显得臃肿 另外我把 auto_everything 稍微地适配了一下 Windows 如果易语言的各种吊炸天的模块可以handle it, why we are insisted using python? 所以不写了 顺手更新了 Lyingdown 现在可以在 Windows 上躺着写代码了,虽然体验极差 —————————————— 虽然看不懂 https://blog.just4fun.site/jupyter-notebook-architecture.html 但 Jupiter 应该实现了我想实现的东西 —————————————— Use popen to communicate with python interpreter is indeed much harder than I expected. —————————————— 啥时候你当HR了 加我一个呗 我对工资没要求 —————————————— 我得多关注下推上的包工头HR 以后考研了随便进一个公司 转正程序员😁 —————————————— 我只是隐隐觉得,在现实生活中,很多人,你跟他说再多话也不会有提升、一起做的事通常是浪费时间。 而在国际网上,我做的事基本就是传播知识,做实际的事情,每天解锁一点新技能。 没准这才是某国落后的根本原因:封闭。 —————————————— sudo add-apt-repository ppa:kivy-team/kivy no longer useable · Issue #5824 · kivy/kivy https://github.com/kivy/kivy/issues/5824#issuecomment-399724049 搞得我想回到 kivy 的怀抱 —————————————— 感觉实体 Windows 游戏要凉了 刚刚试了一下一款名叫 腾讯手游助手 的安卓模拟器 键盘玩 手机QQ飞车 很流畅 没准我们可以在更新 E_Python(auto_everything与Windows的连接) 的同时训练一个自动开车的 driver 主要是想在手机储存不足的情况下用懒人支架配合电脑键盘玩QQ飞车…😂 真实的含义是:如果Windows不直接集成Android和IOS,以后肯定会凉 —————————————— sudo apt install tree tree 真是好用,这样复杂的结构也可以变得很清晰 另外再入门一次 django 也感觉不错呢! ( Lubuntu 上半屏自带pdf阅读器(竟然支持vim语法翻页) ,下半屏 terminator写代码 ) —————————————— https://machinelearningmastery.com/use-word-embedding-layers-deep-learning-keras/ The more I think about it, the more I feel I can't live without keras —————————————— https://vgpena.github.io/classifying-tweets-with-keras-and-tensorflow/#language-and-machines 如果 one-hot matric 需要把每个词都 index 并且 每表示一个词时都需要把整个 index 都带上 的话 当处理中英文混合 text 的时候,岂不是得把内存占满? 不行,我估计咱们处理 text 的时候还是得用 vector embedding —————————————— 也不一定 为了把 auto_everything 扩展到Windows平台 没准我会把 auto_everything 作为 E_Python 的底层包使用 继续开发 E_Python,如果一切顺利,我们会无缝链接 Windows 和 Linux desktop with one package —————————————— 技术只是一种手段 我们有时候更看重如何把你独特的想法用技术转换出来 并以一种生产环境的高效率展示给世人 —————————————— https://github.com/yingshaoxo/ML/tree/master/6.image_style_transfer 我原本以为风格转换是一件高效的事情,没想到要 iterate 800 次 我的2G GPU肯定是要等几个小时的 不知道8G GPU会不会好一点 没想到机器学习的瓶颈真的是计算能力 计算力到了,什么乱七八糟的数据一顿乱试,总有一个有用 —————————————— So, now, we need to move to next project Text handling or photo style transferring? We'll see! —————————————— This is what I did: https://github.com/yingshaoxo/ML/tree/master/5.image_classification —————————————— But I have to say GPU version does indeed 10 times faster than CPU version So I guess something was wrong with deepfake, after all, tensorflow models folder's program works fine. —————————————— The lower the loss, the better a model (unless the model has over-fitted to the training data). —————————————— 500-600次基本就达到极限了 然后我发现,真的是数据越多、越高质量、越好(当然,我这次的训练是失败的,原图不高清,不流畅统一) Deep learning 确实是数据主导型 coding Data scientist 是必须的一个人物属性 —————————————— On the very bottom, all you need to do is: do things with one way! After you can do many things, you'll then think about how you could do one thing with different way based on different circumstances. If you, at the beginning, only has been taught or struggled in solving one thing in different way, then, I could say, you are useless! Because all you got or all you can do is solving 1 problem which maybe 1 + 1 = 2, while others could solve 20 times problem than you do. That's why we encourage people to start from little, go far with much. (E_language->C++->Python->JavaScript->Kotlin->Golang->AI(ML)) (Windows->Deepin->Ubuntu->Kali->Popos->Lubuntu) Don't be silly that think you could learn all those stuff from scratch easily. Just say no to those details, start from the main ideas, start from what's essential. With that, you'll be good at learning everything! —————————————— 想象一种带摄影头、麦克风、微型喇叭的眼镜 颈上带上一圈锂电池,眼镜后方垂两条电线连接项圈 眼镜可与手机Wi-Fi连接,手机作为大脑App可控制眼镜 一个应用场景:手机控制眼镜摄影或录音,手机分析眼前人的喜怒哀乐,并通过眼镜的微型喇叭告诉主人 Another circumstance: 眼镜只听主人的指令(语音识别),然后做很多事 但我觉得眼镜本身最好有屏幕,那样可以做更多交互,比如钢铁侠 —————————————— 这是训练到400次达到的效果(花了一上午) 不好 没有眼睛,没有灵魂 —————————————— 1.5倍速 再看了一遍 少林足球 我怀疑幕后还有超级屌的制作人(应该是老美) 因为整个套路非常好(特效、小人物逆袭、突破传统、符合逻辑与现实;专制中国是抵制底层人自我提升与突破的) —————————————— 还真是 露脸的AV是这个世界上最容易得到的有大量露脸的脸库 —————————————— 看了 《头号玩家》 What a cool shit! —————————————— fuck, just want to drop 2G GPU, it was useless when I go to the final step, it always shows this error: Resource exhausted: OOM Then I just uninstalled tensorflow-gpu, install tensorflow instead Now, it works fine —————————————— Vegas 在视频剪辑上比 premiere 好多了 简单的剪一下就不用再训练分类模型了 因为从始至终就只有一个人出现在视频里 —————————————— https://www.tensorflow.org/tutorials/image_retraining 虽然这个很好用 但我的数据集太少了,60多个,正确率20% 去TMD,去找一段视频,分分钟几百张图片 好的,去找star视频 —————————————— 不行 自己训练的准确率太低(我竟然没意识到 test folder 与 training folder 的文件都不能用于最终测试) 要想只用200张图出效果 只能考虑下用tensorflow的inception —————————————— 我还在想 超短裤美女 的事情 没准我们真不需要什么复杂的目标检测 就简简单单的一个 binary classification 就好了 有美女出现,录像;没有美女,停止录像;至于帧数,应该不需要每帧都检测,应该有从一系列动态模糊图取一张清晰的图的opencv算法,拿来用之,每秒检测一张图片就好了 —————————————— It was not that difficult as it seems like I made it with steps_per_epoch = 200, epochs = 1 and this helps too: https://machinelearningmastery.com/save-load-keras-deep-learning-models/ —————————————— 原来在行首插字符这么简单 以前我还得 ^ 再 i —————————————— I'll use this to achieve it: https://becominghuman.ai/building-an-image-classifier-using-deep-learning-in-python-totally-from-a-beginners-perspective-be8dbaf22dd8 Before the end of this week. —————————————— 改变想法,去杂质这个过程用Ann classification会比较好 —————————————— 等会儿 9:20可以开个QQ远程吗 不行就和我私聊解决 —————————————— 对思政课讲台独问题的反思 1. 抨击民主制度 (自己的民主制度不行,就说民主不好) 2. 抨击贫穷 (用专制的强权、金钱压制自由的种子) (专制赢得了一时,维持不了一世,总有一天,人们会意识到自由的抉择有多么重要) 3. 抨击市场自由竞争原则 (本来那些只会考试的人就不应该作为优胜者出现在人的视野里) (台湾老师在中国过得好只能说明中国教育落后 (垃圾老师总不能在美国骚得起飞,毕竟美帝科研top1) ) —————————————— 服务器ip被墙了 看来我以后要更hacker一点 敌在暗,我在明 —————————————— 我现在大约有3000张某明星的图片 但里面有很多杂质 首先,我需要把所有人脸提取出来 然后缩放到一个合适的像素矩阵 接着,通过聚类算法把小群体删掉 最后,我才能使用 deepfake —————————————— 所以a、b向量的 dot product 只是 a measure about a 的 shdow 映射到 b ,有多长 —————————————— 如此想来 树莓派又有用了 服务器配置不是问题,用户客户端配置才关键、、、、合理的照顾了不同用户群,高端玩家享受极致体验 —————————————— https://github.com/deepfakes/faceswap 竟然没有人 fake Chinese porn I'm gonna make one If I have the time. —————————————— 这本书写得是真的好 原理和图都到位 例题贴近我的中文教材且答案不用找,就在题后面 并且语言标准,不像有些傻屌,专写人看不懂的东西(就像语言学考零分的那种人) —————————————— opencv的人物检测很快但不精准(容易检测不到) 我可是想自动从视频里扣出人来,做美女超短裤 classification 的 😞 —————————————— 为什么同样的mobile coco模型 2G内存手机上就很流畅,8G内存电脑上就慢死了(感觉10几秒一帧) —————————————— GeForce GTX 1050 Mobile —————————————— 凭借学校60M的网速成功在lubuntu上配置好了gpu版tensorflow 2G显卡内存并没有什么优势,还是慢,和intel内核速度差不多 —————————————— That was quite straightforward. https://www.youtube.com/watc.h?v=Bc8UC_m7M_Y —————————————— https://modeldepot.github.io/tfjs-yolo-tiny-demo/ This is fast. 这个检测效率高多了 学什么Python啊 直接转JavaScript —————————————— 如果 tensorflow.js 可以不用安装垃圾的1个多G的nvidia显卡包的而实现gpu加速的话,还是挺好的(https://js.tensorflow.org/tutorials/core-concepts.html) 因为那个显卡包不光安装成功率低,还容易搞坏系统 妈的,我的Lubuntu又崩溃了,就是因为安装了该死的nvidia cuda包 —————————————— Here is the drum: https://github.com/ComcastWizard/KeyDrum —————————————— https://github.com/gustavklopp/pypiano.git This is the best python piano than ever! —————————————— 用 superpads 在安卓上畅快的玩音乐 —————————————— 装台湾腔😁 —————————————— Did you want this? https://www.youtube.com/watch?v=z410eauCnHc —————————————— 因为淘宝的名片特别便宜,所以我定了1000张,正在给自己做名片。。。 —————————————— https://github.com/yingshaoxo/E_Python 又补了一个坑 —————————————— 不过从追求效率上来看 咱们都是一样的 只不过有点冷罢了,就和我们大多数同类一样 那就只能找冰山美人了 —————————————— How to let all of your files back to normal permissions: sudo chown -R username * sudo chmod -R 775 * —————————————— 今天和学姐稍微交流了一下 没戏 太成熟了 相比哥你来说,你怎么保持年轻的? 程序员很单纯? —————————————— 树莓派 —————————————— 被老师引荐去帮大二大三的做什么 全国大学生创新比赛(或者是电子比赛) 我一看,又是小车 果然是墙国机器小车 开发板还被限定为3V电源的垃圾(烧录还需要个usb adopter) 暑假可能会被我妈逼去打工,挣来的钱我打算买新电脑… —————————————— Me: You know, I have never see someone like you, staying cool and beautiful at the same time Her: 你想拽英文吗? Me: No, I just want to express my thoughts Her: 你可以和我讲中文 Me: But some times, 我觉得英文更能表达一些事情 ... silence ... Her: (Laughed out) Anyway, this was the first time in my life. —————————————— 表白了 那小姐姐学霸还在思考当中 我准备下学期再去见她 先复习 那小姐姐大我一级 —————————————— 今天向一个图书馆小姐姐面对面表白了 我发现学校同学很不靠谱啊,基本都没有教授能力、老师也是很不负责任的、填鸭式大水漫灌式教育(肯定没有世界级网课那么高质量啦) 既然感觉上完课什么都没得到 要想不挂科就全靠自己啦 所以最后一个月,暂时放下Programming,投身到无尽的学习之中 —————————————— 果然所有的高中公式的证明都很简单 上一代中国老师把它搞得太复杂,把我的老师搞糊涂了 我的老师不会,就没教 背公式… 草泥马,要是背完公式就能做题还考什么试 什么原理都不知道就瞎鸡巴乱搞 —————————————— 美元真是一种特别形象的符号:之前付出过的努力可以在新领域上开出一条直道! —————————————— 老朋友现在和我不是一个层次的 这事儿也烦 —————————————— 经过我初步观测 keras是比较简单的那种框架 不过我要先玩透 sklearn , 然后再选一个支持安卓的深度学习框架 —————————————— 感觉融汇贯通 一切都能看懂、都变得明晰 —————————————— Multi-layer Perceptron (MLP)  http://scikit-learn.org/stable/modules/neural_networks_supervised.html —————————————— https://github.com/automl/auto-sklearn/ OK,It's definitely good for applying without any thinking. —————————————— 看完了 —————————————— Deep learning is also just a sexy term for Artificial Neural Networks (ANN) —————————————— 牛逼 —————————————— http://scikit-learn.org/stable/modules/model_persistence.html#persistence-example Yes, as I said, it's simple enough All you have to do is change to a different model to see if all your data fits right —————————————— https://github.com/yingshaoxo/ML/blob/master/2.play-regression.py —————————————— import matplotlib.pyplot as plt from sklearn import datasets, svm, metrics digits = datasets.load_digits() """ images_and_labels = list(zip(digits.images, digits.target)) for index, (image, label) in enumerate(images_and_labels[:4]): plt.subplot(2, 4, index + 1) plt.axis('off') plt.imshow(image, cmap=plt.cm.gray_r, interpolation='nearest') plt.title('Training:%i' % label) plt.show() """ n_samples = len(digits.images) data = digits.images.reshape((n_samples, -1)) classifier = svm.SVC(gamma=0.001) classifier.fit(data[:n_samples//2], digits.target[:n_samples//2]) expected = digits.target[n_samples//2:] predicted = classifier.predict(data[n_samples//2:]) print(expected[:20]) print(predicted[:20]) Can you believe Machine Learning could be achieved so easily? —————————————— I can smell the knowledge from it. It's a great book for sure. —————————————— http://www.americanrhetoric.com/speeches/barbarajordan1976dnc.html This man's speaking is very attractive, it maybe the best one I'v ever heard. By learning this, reading English book will be much easier.(with a nice inner voice) —————————————— China可以说是很出名了 —————————————— 没有什么比看到心仪的女孩 却由于能力不够,无法追到 更让人产生动力的了 所以人才要努力奋斗啊 —————————————— 确实卡 只能拿来正常录一下屏 一加特效就卡,face_changer? 不可能的,以后试一下更先进的face_detector —————————————— 兄弟我们是要入门ML的节奏 请减少对传统编程方法的依赖 —————————————— Sorry for giving the wrong link —————————————— 这样看来电影特效可以直接由风格转换得到 —————————————— Check out @liu_mingyu’s Tweet: https://twitter.com/liu_mingyu/status/965960674470871041?s=09 —————————————— University Vector 基于高中的向量基础不断扩大维度、增加运算 —————————————— 最近几天都是在coding中睡着的 因为有lyingdown 累了一闭眼就是第二天,不累继续敲键盘;想事情放松闭眼,自由放飞思维 还不用担心腰间盘突出、颈椎病 我应该再加一个30分钟后无操作自动休眠(或者直接进行系统设置) —————————————— 这是v2ray CDN ip 匿名后的速度 —————————————— https://www.youtube.com/watch?v=WCEXYvv-T5Q&t=0s&index=14&list=WL I'm actually not expected that scikit-learn could do those things. —————————————— www.americanrhetoric.com/speeches/fdrpearlharbor.htm 要是我以前的历史课是学这些就好了 —————————————— 没注意看,scikit-learn也可以做 classification 我就很奇怪了,为什么不用 deep learning 也可以做颜值检测 —————————————— 腾讯这个做得不错 —————————————— https://github.com/wangshub/Douyin-Bot 我真是服了 —————————————— 恋爱之道 - 艾跃进 一、总体要求 注意事项: 0.想清楚爱一个人的哪些地方(你了解对方多少) 1.找与自己价值观相近的人(有共同志趣) 2.遵守法律,不可强求 3.符合道德,有责任意识,忠一 具体要求: 1.人品高尚 2.学识相当 3.长相端庄 4.家教相当 5.性格相符 6.气味相投(闻香识*人(吸引你)) 结论:此事古难全,(有3条就好),仅供参考 二、择偶方式 自己结识 公开征婚(研究婚恋节目,从中学习) 委托介绍(对硬件要求高) 媒人介绍(有夸大之嫌) 三、示爱艺术 直接法(痛快一点、面对面挑明,前提是有交往、有好感) 渐进法(占座、打饭、送粥、写东西、开车…) 暗示法(没好感的情况下可能无效) 情书法(实话、有文采、能被公开、能被看出志向、可信赖) 委托法(让人带话,不建议) 结论:艺术使人幸福、艺术“不可复制”、艺术需要创造 @system357 —————————————— 1. what we have learned still useful 2. I'm not very familiar with scipy and librosa —————————————— 不管做得好不好 能用就行,率先进入就有的赚 这叫行业红利期 做得好就赚,这叫行业壮年期 做得再好也难赚钱,这叫夕阳产业(夕阳无限好,只是近黄昏) —————————————— from __future__ import print_function import torch x = torch.rand(5, 3) print(x) print('-' * 10) print(x[1:, 2]) # is actually x[row, column] print(x[1:, 2:3]) print(x[1:, 2:3][0:, 0]) print('-' * 10) print(x[0, :2]) # is actually x[row, column] print(x[0:1, 0:2]) print(x[0:1, 0:2][0]) print(x[0:1, 0:2][0, 0:]) 花了我好长时间才理解 —————————————— So, fuck tensorflow and other shit frameworks Just focus on pytorch, I don't know other things, but I know python is for human-being, those people in python community are kind. https://pytorch.org/ —————————————— Yes! I wish I could know it from the beginning! —————————————— https://medium.com/@julsimon/10-steps-on-the-road-to-deep-learning-part-1-f9e4b5c0a459 Basically, yes —————————————— then, keep learning —————————————— First, this could solve a problem showed in pop_os https://extensions.gnome.org/extension/15/alternatetab/ —————————————— http://simplecv.org/2014/02/21/gsoc.html http://tutorial.simplecv.org/en/latest/examples/image-math.html#chroma-key-green-screen This could be the best, but sadly it's dead. —————————————— 悲伤地发现该课程是用 MATLAB or octave 做的 —————————————— 刚才从课程里学到 ML竟然可以直接从嘈杂的环境中提取人声或背景音乐 这下监听是得有多容易啊… —————————————— When I saw those programmers, I'm not seeing some ordinary individuals, but instead, many great man who dare to fight the fate, who dare to fight the wrongs, who never easily give up, who we can say that they are pioneers. —————————————— The thing that really killing me is being normal, being ordinary. Those shit will never understood what I'm looking for, what I'm dieing to achieve. They are just live in their stupid numb life without knowing anything behind the lights. —————————————— en I still got one half year, hope I'll make it Or I'll die —————————————— Where is your future? I already see peas, in abroad. —————————————— 看了 《小丑回魂》 What an wonderful experience! —————————————— https://electronjs.org/ 看起来 js 或者说 npm 大有统领一切夕阳产业的势头 根据 计算机->互联网->触屏智能手机->人工智能 法则 代表互联网的js会取代桌面软件 代表人工智能的算法 会 取代手机上大部分硬编码程序 —————————————— SB kivy, can't run python3 version on my Lubuntu: [INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored) [CRITICAL] [Window ] Unable to find any valuable Window provider at all! egl_rpi - ImportError: cannot import name 'bcm' File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib fromlist=[modulename], level=0) File "/usr/lib/python3/dist-packages/kivy/core/window/window_egl_rpi.py", line 12, in from kivy.lib.vidcore_lite import bcm, egl sdl2 - TypeError: expected bytes, str found File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 67, in core_select_lib cls = cls() File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 138, in __init__ super(WindowSDL, self).__init__() File "/usr/lib/python3/dist-packages/kivy/core/window/__init__.py", line 722, in __init__ self.create_window() File "/usr/lib/python3/dist-packages/kivy/core/window/window_sdl2.py", line 237, in create_window self.fullscreen, resizable, state) File "kivy/core/window/_window_sdl2.pyx", line 94, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:2204) x11 - ModuleNotFoundError: No module named 'kivy.core.window.window_x11' File "/usr/lib/python3/dist-packages/kivy/core/__init__.py", line 59, in core_select_lib fromlist=[modulename], level=0) [CRITICAL] [App ] Unable to get a Window, abort. python2 could, apt install python-kivy —————————————— https://class.coursera.org/ml-005 try it out, this would be benefit —————————————— 新版pop_os可以说是非常屌了 120Hz刷新率,使得桌面异常流畅 还可以自由切换 nvidia 与 Intel 显卡 —————————————— 有没有可能上本科啊? —————————————— @PeaShooterR @Hex11 考完了开不开心?😁 —————————————— 下午被 另一队程序员 叫去帮忙,学会了 STC89C52 单片机 #include sbit pin1_0 = P1^0; //define pin 1.0 void main() { pin1_0 = 1; //write or read, it depends on you } —————————————— 越来越倾向于用绿色linux软件了 昨天晚上发现pop_os desktop environment崩溃了 怎么都修不好,重装后,android-studio, arduino, gitbook, v2ray等绿色软件可以直接移植 其他的就不行了 —————————————— 不说这个了 对硬件我还是没多大兴趣 入门AI,才是我这一年的任务 我应该熟悉各种ML框架的用法,并且知道怎么融合使用 by the way, 我记得 我连最基本的把训练model保存在本地 都不会 —————————————— 代码80%是我的 底层API全是我写的 另一队程序员一开始只会使用图形编程 —————————————— 我拖后腿?No 是我队友的硬件不行 —————————————— What are you saying? —————————————— 第二次比赛我没去 第一次比赛,我准备比赛的那个月教会了另一队的程序员写C 然后他靠着我的80%代码得了一等奖 接着有后补赛我没去,他代替我 和我的队友去了,用了他那组的硬件,得了一等奖,挂的我的名字(我全程不知道 until today) —————————————— http://music.163.com/song/522429774/?userid=280429778 —————————————— 突然得了个一等奖,看来以后要善待朋友啊 —————————————— 把键盘控制鼠标部分写完之后 发现 screen image grab won't be able to show mouse cursor 所以我还得得到 mouse position,在image 里自绘… —————————————— 听到github被微软收购了我是痛心欲绝啊 这必须得换啊! 要不然谁知道这流氓会变成怎样 —————————————— 把直播流图片格式改成PNG 感觉世界都清晰了 —————————————— from pynput import keyboard def on_press(key): try: k = key.char except: k = key.name print(k) lis = keyboard.Listener(on_press=on_press) lis.start() lis.join() I think this is the best thing I can get from python community. —————————————— https://github.com/yingshaoxo/LyingDown 现在采用双半屏的方式显示(两张图片组成一半屏幕,既可以写代码又可以浏览网页) 可以自由上下屏滑动,点击即全屏 总之这个操作把我室友都惊呆了 —————————————— 半夜失眠起来看 《英伦对决》,除了成龙老了以外,还不错 —————————————— @AAAAB3N @PeaShooterR @Hex11 祝高考顺利,不紧张,充分发挥自己所学 灵活应对考题 —————————————— 看来以后可以大幅度提升战斗力了 —————————————— 想学vue 自己建网站或者论坛 然后贴自己转卖的淘宝商品广告 挣合法的钱 年纪大了,再不找个专业领域混混确实是不行 AI领域,具体网站的形式还有待研究(创新需要灵感) 主要是研究一个制衡的机制或者生态,让低端和高端者各得其所 —————————————— 1.5倍速看大杂烩 十万个冷笑话2电影 还不错 —————————————— Fine What are you doing in those days? —————————————— Can you use musically? I can't, and don't know why. —————————————— No, I haven't —————————————— 噪声抑制(Noise Suppression) 回声消除(Acoustic EchoCanceller) 自动增益控制(Auto Gain Control) 静音检测(Voice ActivityDetection) http://www.52im.net/thread-825-1-1.html 大概这就是主要的难题,需要一个个克服 —————————————— 开源的本质是: 开源者不需要从这个项目得到 Money,但他希望这个行业能够持续快速地发展。 —————————————— 我觉得对于普通人来讲,音频处理几乎是个噩梦 资料好少啊 别说降噪了 就连实时 EQ 都没有 我通信专业好像也要搞这个,早搞晚搞都要搞,不如现在搞 —————————————— 看了《马戏之王》 The greatest art in this world means to make others happy —————————————— You can somehow try it out by yourself: https://github.com/yingshaoxo/MovingDetector/tree/master/example/WebLive —————————————— 我以后应该可以躺着写代码了 用以前的方法截取1/4的屏幕(一个完整的terminator),转发到局域网用手机浏览器看 手机挂在懒人支架上,支架上挂伞,有线键盘接笔记本 我需要去买个廉价的有线机械键盘 —————————————— 刚刚查了一下枪支 就没人想过3D gun printing? I'll buy one 3d printer when I get rich. —————————————— 测试成功 可以直接调用camera上的录音器录音 如果音质实在不行,我可以把以前废弃的耳机麦克焊接到camera上面 不知道多麦克会不会增加录音的灵敏性 —————————————— 通过所有cmake参数为off把opencv成功编译在无GUI的树莓派上 运行下列script成功在浏览器看到webcam的图像 https://github.com/log0/video_streaming_with_flask_example 我离成功近了那么一点点 —————————————— So if a vector value has a hat on it, it means unit vector —————————————— https://youtu.be/qaPzlIJ57dk Interesting if it can import any python package, for example, flask numpy, opencv, and so on —————————————— https://segmentfault.com/a/1190000013854294 竟然还不能直接录音 我还必须得承认,买树莓派是因为我放不下Python 思来想去,结合IP webcam Android App,还是觉得把 video 与 audio 分开处理比较好 video 用 flask + opencv audio 用 flask + pyaudio —————————————— https://www.jianshu.com/p/76c1be068170 大力支持 —————————————— https://edmondfrank.github.io/blog/2018/02/08/tan-tan-googlezi-dong-bian-cheng-kuang-jia-automl/ https://www.customvision.ai/ 微软好像在搞事情 —————————————— https://edmondfrank.github.io/blog/2018/02/12/shi-yong-shu-mei-pai-shi-xian-24xiao-shi-bu-jian-duan-zhi-bo/ 还得接着搞 —————————————— 他们对于视频推流的态度是:完全不在乎有没有音频 似乎视频监控领域没有音频一样 —————————————— 还是看设备基数 民用软件的趋势随设备占有量而变化 哪个平台设备占有量大,就开发什么平台的软件,比如安卓 但我一直没搞清楚安卓是怎么调用其他编程语言的 一个不能和其他编程语言交互的语言,不可能变得强大 —————————————— 没有市场竞争谈创新是空想,根本没动力:这个可以用,继续用,反正没人和我抢饭碗(垄断),为什么要大费周折搞创新? 你党就是没竞争,你党控制下不可能有创新 你党言论审查的重点就是扼杀一切可能和党管控的一切形成竞争的势力 —————————————— 我们是否可以理解为机器学习里 向量拐来拐去最终指向一个结果 —————————————— https://motion-project.github.io/index.html This is worth for playing. —————————————— Play music in raspberry: sudo apt install mpg123 mpg123 *.mp3 h —————————————— 一下午硬是没搞出来 —————————————— Turn vim syntax highlighting on :syntax on —————————————— 突然发现 笔记本上编译的 go 树莓派上无法执行 … 突然体会到编译语言的局限性,arm和amd不同,处理器不同,就需要重新编译 —————————————— 我经常觉得 1. 可汗要讲10节课以上的内容学校老师只讲一节课(可汗技高一筹,非死记) 2. 不把可汗学院的高数部分看完,很多时候都看不懂专业书籍 —————————————— 我必须压制我的头脑去记忆新东西 不然很快把学校的东西忘完后就得挂科 这样对身心很不健康,没法体验巅峰(快速学习)状态 —————————————— https://blog.lemberg.co.uk/how-process-live-video-stream-using-ffmpeg-and-opencv 可以,这样一开始就不用自己来处理音频了 —————————————— HTTP 可以做音频直播? —————————————— http://music.163.com/song/19572271/?userid=280429778 我有时也觉得脑袋装了太多东西,快要宕机 这个事情发生在PM7:00之后,可能晚自习应该拿来睡觉 —————————————— 额… 手机也比树莓派贵 所以我打算用web做树莓派的屏幕 省一笔显示器的钱 —————————————— 让它跑c++试试、或者tensorflow 反正不卡我主机就好了 —————————————— 做机器人视觉 录制视频、美化、后期、直播 做服务器,手机web浏览、操作 —————————————— 小小的,很贴心 —————————————— 树莓派3B+到了 —————————————— 这就是倒着从结果计算 bais w 的方法了 —————————————— So what is intelligence? 正确的学习算法 + 足够且有效的数据资源 + 长时间勤奋地训练 + 一个可记忆的容器 + 可再次获得数据的传感器 + 可自由执行决策的身体 —————————————— 还有比如红点那个地方 list slice 里面一个逗号十分费解 怎么搜索都不知道 —————————————— 还有一些,翻着文档看很多遍也不知道什么意思 这些在作者看来是你理所应当知道的 —————————————— 像这个,不会 matrix 根本无法理解 —————————————— 我以前觉得小学、初中是基础教育 现在我觉得大学是基础教育,光学高数、高英是没有用的 还要用它们来学更专业的知识(那些大量用到数学原理和English based knowledge) —————————————— 每次录完视频都要花几个小时降噪、标准化、调EQ、TV compression、加速无声片段 再加上中间不同视频、音频无尽的渲染 我感觉完全是在浪费时间啊 我必须得做点什么了 这一套自动化处理必须得弄出来 不然没法学了 —————————————— https://addons.mozilla.org/en-US/firefox/addon/%E7%BF%BB%E8%AF%91%E4%BE%A0-translate-man/?src=search Good translator for auto pronunciation —————————————— Train a model 去预测一个人的行为 类似于 if you were him, what you would do 当这种预测的准确率达到99%,我们就说我们已经成功地copy了一个人的大脑 —————————————— 你要问我理想主义者与现实主义者的区别 在我看来,即是理想主义者更易与远方的人成为朋友 而现实主义者更易与近身者成为朋友 如果理想主义者在近身处有坚固的朋友,他们一定很优秀 而现实主义者在远方有牢固的友情,他们也一定很优秀 远近平衡,平庸者 朋友与自身,优秀程度相近 牢固的朋友越多,个体实际的能力越强 所以最优秀的人,在大世界、大局面上要尽可能展示理想主义光辉 而在小群体,要尽可能显示现实主义为群体谋利益的心机 通过提升自我,改变朋友的质量、增加朋友的数量 —————————————— 看了 《消失的西德尼》 伟人也是人,只不过他们对人(生)的思考更为深入 —————————————— 增加了upload功能 随时可以上传东西到服务器了 我想 AI learning 得从0开始了 发现Firefox对pdf支持较好,又可以直接网页翻译、又可以保存位置 慢慢地想起李阳说过的话:不怕慢,就怕什么都学不会,浪费青春,做无用功 有时候我想,等我学完AI 就大概是我生命的尽头吧 —————————————— 因为有了好的储存卡,我的偷拍器也可以用了 虽然我很想自己做一个 —————————————— 京东买的闪迪tf卡,虽然贵点,13M/s的写入速度 而淘宝垃圾700k/s —————————————— 以后再也不能随随便便写代码了 我会死的 累死 改一个bug返回10个bug 还要花费很长时间搞清楚哪儿出了错 像模块制作,必须要有一个测试脚本,每写一个api function就要写一段程序测试它 这样不仅保证了程序的质量、节省了时间,还便于跨平台、系统测试 —————————————— Decorators with Arguments class decorator_with_arguments(object): def __init__(self, arg1, arg2, arg3): """ If there are decorator arguments, the function to be decorated is not passed to the constructor! """ print("Inside __init__()") self.arg1 = arg1 self.arg2 = arg2 self.arg3 = arg3 def __call__(self, f): """ If there are decorator arguments, __call__() is only called once, as part of the decoration process! You can only give it a single argument, which is the function object. """ print("Inside __call__()") def wrapped_f(*args): print("Inside wrapped_f()") print("Decorator arguments:", self.arg1, self.arg2, self.arg3) f(*args) print("After f(*args)") return wrapped_f @decorator_with_arguments("hello", "world", 42) def sayHello(a1, a2, a3, a4): print('sayHello arguments:', a1, a2, a3, a4) print("After decoration") print("Preparing to call sayHello()") sayHello("say", "hello", "argument", "list") print("after first sayHello() call") sayHello("a", "different", "set of", "arguments") print("after second sayHello() call") —————————————— https://github.com/yingshaoxo/Local_Show/blob/master/app/app.py#L41 Finished! Golang help python at file serving Python慢?不可能的 Python单线程?屁!现在是异步多核心高并发 —————————————— Alt key Alternate key —————————————— Terminal hotkey Go forward by a char: Ctrl + F Go back by a char: Ctrl + B Go forward by word: Alt + F Go back by word: Alt + B —————————————— 卸了垃圾淘宝和拼多多 全是假货,TF卡一买一个假,虚标速度+质量差 购物,网页上不能完成,APP就是流氓软件 —————————————— 看了 雪国列车 发现 作者由《阿修罗》 出发,融合了对国家制度 、尤其是社会主义的思考 另外对秩序与自由之间辩证的思考尤为突出 而自由,就是 have more chances to take control —————————————— God damn it! It's still too hard for me! https://medium.com/deep-math-machine-learning-ai —————————————— Clustering: This is a type of problem where we group similar things together. —————————————— http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/ I have a limited brain, which is a shame. —————————————— 照这个水平 就算我投1000元到某个公司 几个月之后也才涨10%,也就是100 —————————————— https://www.pornhub.com/view_video.php?viewkey=ph5ad4c41dbea9e I've never expected VR could so attract like this VR + sex toy should be good —————————————— 未来的学校,学生为校园事务主导: 学生多数同意,可辞退老师 学生参与学校建设(工程建设拼多多模式,二分之一学生同意即建设;先付钱(工程总费用÷学生数的一半),再根据最终学生支持人数平坦工程款) 优秀双语程序员组成学校领导层,议会制 —————————————— Does anyone could train an ML module which could take previous 2 pictures and predict which direction an object is about to going? 想了一节课,发现,如果发现目标就缩小搜索范围就会遇到一个尴尬的局面:你不知道这个物体向哪移动的 另一方面,对抗视野移动对检测的干扰也非常重要 Very problematic anyway —————————————— 本来修好原来的耳机打算退货的 感觉小米的东西确实不错 考虑下一个手机依旧小米 毕竟不是花自己的钱 用父母的血汗钱充值谷歌信仰感觉有点 naive —————————————— I won't be the first Non be the last one To break through the little self. —————————————— 台上一分钟,台下十年功 通过这些天的演讲 我越发觉得交流是一件容易的事,而表达可以变得 handleable 跟读 English Speech also helps too I can feel my mind in English http://www.americanrhetoric.com/top100speechesall.html —————————————— https://youtu.be/mdZo_keUoEs 厉害了,枪原来如此好做 —————————————— 我不知道级数求和可以这么简单 不知道可不可以用在高考的通项数列求和上 —————————————— JavaScript for website C++ for hardware Kotlin for Android Golang for fixing the low speed of Python at serving But most importantly, use Python everywhere as you can. —————————————— https://youtu.be/lT3vGaOLWqE 他真是厉害,娱乐电子 我的意思是花了半辈子学电子 然后用不怎么聪明的头脑用坚持告诉人们 智商不是唯一的成功要素 同时继续发光发热,为全世界人民电子水平的提升做出自己的贡献 —————————————— 我看完了 其实那个小米降噪耳机在拼多多上只要200 我在淘宝300买贵了 —————————————— 为啥? —————————————— 今天第一次用自己的焊接器与502修好了自己的耳机 我对硬件能力没什么要求 能独立做出来主动降噪装置就好了 比如降噪魔盒(一打开前方0.5平方米的区域无声) —————————————— 按理来说,loop应该自己做,systemctl老是重启不太好 但我可以通过 decorator 帮助人们快速实现一个 while loop —————————————— https://github.com/yingshaoxo/auto_everything#create-a-systemd-serviece Now I probably could say, I've just finished a great function which could make python developing much easier. —————————————— https://youtu.be/gRzqsW9Rj3E Just admire him, full-time job for python. —————————————— 我只是对可能性进行思考 最近要进入到极限学习状态了 没有朋友,只有学习 配合之前的全天计划表 应对快要到的考试周(虽然我觉得要想大学有突破,这样是必须的) 今天中午念了 马丁路德金的 I have a dream 我发现他讲得真烂,竟然还排名演讲世界第一 —————————————— 我觉得大学才是高科技作弊工具使用的地方 一般的大学考试都不会检测金属 —————————————— [Unit] Description=test deamon After=re-local.service [Service] Type=simple User=yingshaoxo #User=root WorkingDirectory=/home/yingshaoxo Environment=DISPLAY=:0.0 ExecStart=/usr/bin/python3 test.py Restart=always RestartSec=5 StartLimitBurst=3 StartLimitInterval=1s [Install] WantedBy=multi-user.target Yes, we can, somehow write a module to help people create their own service without much pain —————————————— Ubuntu provides an easy way to install the NVIDIA proprietary drivers. If you open the 'Software & Updates' Application and navigate to the 'Additional Drivers' tab you can install the Ubuntu provided proprietary driver. ubuntu就是好 —————————————— 又没学历 又没参加过开源项目 又没有1000star 国外找工作是不可能的 —————————————— No, now I guarantee it will work https://yingshaoxo.xyz/post/Using%20Python%20to%20install%20YouCompleteMe.html —————————————— 看了 刀剑神域*序列之争 原来是在讲AR —————————————— 试了一下这个,用不了 然后我把 auto_everything 的super自启功能去掉了( crontab需要人工操作,不然没用) 看以后能不能想到一个好办法加上 —————————————— wget https://raw.githubusercontent.com/yingshaoxo/auto_everything/master/demo/install_YouCompleteMe.py python3 install_YouCompleteMe.py No guaranty it will work I just tried my best to let it work —————————————— Found an important function which can totally change all stuff in my auto_everything package def run(self, c, cwd=None, wait=False): """ c: shell command cwd: current working directory wait: True may running forever """ if cwd == None: cwd = self.current_dir args_list = shlex.split(c) p = subprocess.Popen(args_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, cwd=cwd) if wait == True: while p.poll() == None: line = p.stdout.readline().strip(' \n') print(line) —————————————— Vundle.vim, YouCompleteMe and vim-autopep8 has been installed. Now, I'm preparing to make an automate python script for installing all of those things. —————————————— 在固态硬盘配置 lubuntu no docker no chrome no Android Studio no Arduino no Virtual box no Java no Golang no npm no Chinese no nvidia only python and vim We will fight —————————————— 看了《冰肤传说》 我觉得法国也可能成为文化强国(电影大国) 对比中国,一个连说话都要考虑再三以免有牢狱之灾的国家 输出什么给外国人看?专制主义共产党统领一切思想? 我觉得外国人会逃离电影院,除非你倒贴,给观众钱 —————————————— 用虚拟机试了一下 archlinux 安装不上,还是 pop_os 好用 另外 terminator 挺好用的,在 pop_os 上可以莫名其妙的成为默认终端 —————————————— 但如果能和我之前推荐的那个双耳帽降噪橡胶耳机融合起来就很好了 那就是100%无噪音 —————————————— 第一次见到需要充电的耳机 然后试用了一下 发现对中低频噪音的去除率是95% —————————————— 文字狱 —————————————— 看了电影 《非凡》 There has not much to say, just cool —————————————— mathlab越做越傻逼 —————————————— 太厉害了没人陪你玩 太弱了也没人陪你玩 然而历史的进程多半是由那些最顶尖的人推动的 最强的人顶尖,最弱的人是另一方面的顶尖 —————————————— 买了一个小米主动降噪耳机。(今天耳机莫名其妙的掉了) —————————————— https://youtu.be/ZUX9Fx8Rwzg —————————————— 找工作还要看简历… 我还得去做个简历出来😒 —————————————— https://realpython.com/python-data-classes/ As I thinking through programming, I found programming is just a kind of way converting logic thinking to computer executable things, A better way to represent decision process. @加一个单词对function进行操作的 package 制作方法是值得我们去学习的 —————————————— https://wiki.archlinux.org/index.php/Terminator I'm gonna try this in this weekend later Split terminal at one screen is a definite good idea —————————————— 要是做不到,录像打脸 —————————————— v2ray 的 VMESS+WS+TLS+Website 模式也无法突破这堵墙 以后只能拿校园网下迅雷了 —————————————— It's time to say goodbye to SSR 我的学校网已经全面封禁SSR —————————————— 一个有趣的事实是 用linux不用sh or script一键化 还不如不用 —————————————— http://www.bilibili.com/video/av23383257?share_medium=android&share_source=copy_link&bbid=E0626135-9650-438C-9974-1B8315ED7B0613493infoc&ts=1526199451778 —————————————— 提升了稳定性,检测脸比眼睛容易 然后加了美白、磨皮 —————————————— 气死我了 我以为改变肤色有多难,结果忽然灵机一动就是叠加一个白色的透明图层 竟然花了我2个小时搜资料、还搜不到 —————————————— https://www.learnopencv.com/facial-landmark-detection/ https://www.learnopencv.com/face-swap-using-opencv-c-python/ Oh my godless, this is good China is garbage, I spent 5 hours searching with Chinese and got nothing 至少现在我知道换脸鬼畜怎么做的了 —————————————— https://github.com/yingshaoxo/face_changer Suddenly, I knew how to change my face with opencv —————————————— 刚刚试了试掉帧法 掉帧后就找不到谁在动了 结合生活实际,我们观察事物必须持续地凝视 这个凝视会因为发现目标而逐渐缩小搜索范围,慢慢跟随目标(中心随目标移动),忽略掉周围事物 而一旦失去目标,我们又会重新扩大视野,慢速又粗略地做整体观察 —————————————— 初步来看,运动检测把视频速度放慢了5倍 这种效率肯定是无法实时监测的 —————————————— 搞了一下午 破Windows,python3 opencv 打不开摄影头 想用c++写,发现在win上没有 VS 好像什么都做不了(mingw 配合 visual code studio 没搞出来) 现在没辙了,只能先把GTA5的画面录下来,再去ubuntu写代码 (也好,这样电脑不会卡飞了) —————————————— 我在思考怎样利用 moving detector 快速 label figures from video 比如做gta5的自瞄, 快速label出所有360度、远近高低各不同的人物 这是接下来几周的任务 —————————————— comma-separated values (CSV) —————————————— 看了 《黑豹》 我觉得尖端视觉科技出自漫威 Means great 另外有一个好消息,后期硬件比赛不用去了(和普通成员闹僵了,以前的事) 于是我们可以安安心心利用晚自习把书上的复习题做一遍,争取来一次高绩点 顺便弥补一下 学完高数却做不了高考理数最后一题 的我的 受伤的心灵 —————————————— 任务达成 发现编码一旦变得复杂,mathlab就不是人用的了 python是唯一的解决方案 —————————————— central processing units (CPU) —————————————— 大师是那些可以把复杂的事变得简单、枯燥的事变得有趣的人😁👍 —————————————— 我通信老师叫我用mathlab把 AMI编码 做出来 这周的任务 用mathlab的人说白了就是懒 整个语法照搬python 就是整合了numpy和mathplot库 —————————————— 怪不得我可以得罪那么多人… —————————————— 厉害了,成功解释了国内死记公式的公式的由来 —————————————— 简单讲就是无设备的3D动漫制作 —————————————— 或者各种人物场景3D模型还原 —————————————— 虽然也可以用在各种无人体育教学上 比如武术、跆拳道什么的 这些老师可以下岗了 —————————————— https://storage.googleapis.com/tfjs-models/demos/posenet/camera.html 只有我一个想到终于可以给自己疯狂的加特效了? —————————————— It's just wonderful —————————————— https://medium.com/waymo/google-i-o-recap-turning-self-driving-cars-from-science-fiction-into-reality-with-the-help-of-ai-89dded40c63 —————————————— 所谓“分母分裂法”原来是这么来的 我国的SB数学老师从来没讲过 —————————————— https://yingshaoxo.xyz/book/notes/series.html 心累,一天要整理这么多笔记 这还只是一个学科的 —————————————— 崇洋媚外是21世纪的主流 所以化妆要模拟西方人的轮廓与面部特征 越西白化, 越受女性欢迎 —————————————— 女性或者人的天性就是爱权爱钱,从取名就可以看出来了 所以要在平时的生活中尽量表现出高贵、有教养、有礼仪 另外,人只有在慢节奏的舒适中,才会表现出强烈的性欲 太急躁就会显得在工作,工作无性欲 —————————————— 女性的思想果然是很情绪化 那意味着我只能当个gay? 不,到底应该用何种心境、何种思想来面对女性? 我应该好好想想 —————————————— 未完待续 —————————————— 我觉得大家都是色狼…装什么矜持😂 —————————————— 为了彻底地研究女性的内心 我决定读一本女性专区的小说 —————————————— 无穷等比数列的和 —————————————— 结果是这玩意儿对硬件要求超级高 比如麦克不能在外部没声音时收集电流声,但很不幸,到目前为止,我没用过自身没噪音的麦克 另一方面,为什么它们不用软件来做这个东西?是因为这东西对延时敏感,数字电路的速度达不到 —————————————— https://github.com/yingshaoxo/rattlesnake 效果目前还不敢说 需要多测试... —————————————— https://github.com/loehnertz/rattlesnake I think we are almost there —————————————— https://blog.csdn.net/iTaacy/article/details/60141849 我觉得 Python 暂时死不了 它仍然是科学研究的强大武器 It's about math, not the language itself If something matters, that will be the language 是否对人类友好 —————————————— 主动降噪依赖于电路对噪声信号的预测,以便能够提前(或者说几乎同时)产生一个反相的信号去抵消噪声。既然需要预测,那就要求噪声信号是有规律的信号。生活中常见的噪声通常是机械噪声,由于机械转动产生的噪声本质上都是低频正弦波及其谐波的叠加,所以比较容易预测。人声在短时间内(约30ms)是稳定的声音,但是宏观上看可以认为是随机的,无法预测。 我觉得解决这个问题的关键在于把AI融合进去 如果是“没有必要”屏蔽人声,那为什么不能弄个开关呢?毕竟绝大多数宿舍的噪音就是人声啊,厂家会傻到放弃这么大的市场吗? 这个事情有待深入 —————————————— 原理上,主动降噪是麦克风听到噪声后,由控制电路分析,最终使扬声器产生一个和噪声大小相等、相位差180度的声波,与噪声叠加使两者正好抵消干净。 经过我之前的实验,发现Kotlin或者Android上是可以叠加声音的 比如我可以同时开多个Media Player,或者我单开一个player和网易music 一起放 同时,我们插上耳机后,麦克检测到的声音全是噪音 我觉得这个软件可以做 并且是刚需 —————————————— https://www.beatsbydre.com/cn/support/info/noise-canceling-isolating 接下来研究主动降噪 —————————————— take limitation of the sum of series, 如果infinite, 发散 —————————————— So series is actually the sum of some array (list) —————————————— 用 1.5 倍速看完 《妖猫传》 除了全是玄幻外,还行 —————————————— 用 sudo chmod -R 777 * 对 ~/.local 进行操作,从而配置好了 linux 下的 visual studio code 这下不用费心费力的自己排版代码了,一键标准化 还有,用ide打开当前目录只需 code . —————————————— 既然有这个,他们怎么还没制造出隔空交互界面... 只要有距离检测,这个肯定可以做 —————————————— 用懒人支架看了 《忌日快乐》 懒人生活真好 Happy lazy day! —————————————— 或者换一种使用方式 如果我懂音频处理 我可以将音、视频统一分析,加速或去掉 视频中的无效部分 比如 没动作 and 没声音 = 无效部分 —————————————— 我用在屏幕上效果烂透了:鼠标自身的移动以及视觉场景的变化会对它造成干扰 所以这个目前只能是摄影头与子弹发射器分离(在现实世界里,摄影头固定,枪在下方且不能出现在摄影头视野里) —————————————— 当然现实生活中拿来瞄人也是可以的 所谓全自动化击杀 就是这么一回事 —————————————— https://github.com/yingshaoxo/MovingDetector 这东西真正的价值在于:做外挂! 3D 枪战游戏自瞄 —————————————— Tracking 太费内存,又卡又慢 所以最后我还是只采取了运动物体检测基本原理 —————————————— https://www.jianshu.com/p/12533816eddf 这个厉害! 要是我能给它加上object tracking就更好了 —————————————— Windows 在下面这个命令之后用不了,Linux 就可以 pip install opencv-contrib-python 虽然上面给的tracking codes挺好玩,但是我还是需要自己写一个只检测运动物体的script —————————————— https://www.google.com/amp/s/www.learnopencv.com/object-tracking-using-opencv-cpp-python/amp/ Those two links are definitely different 英文版介绍的方法更多 通过刚才的搜寻,我甚至了解到有人通过object的颜色配合moving检测,从而达到精准 —————————————— https://blog.csdn.net/abc8730866/article/details/70170267 检测移动物体我们是可以做到的 —————————————— 编程成了一项不每天花8小时无法进步的人生必修课 —————————————— 模电成了分析固定电路的东西 —————————————— 数学成了套固定解题模式的东西 公式、定理、解题思路 —————————————— 数电 已经变成了学习不同 数字电路元件 或 集成芯片 的课 从考试的角度讲,要记忆 从实用的角度讲,网上都有 所幸这些东西起源于 America, we have thousands of resources😊 —————————————— Hey guys, you really should try this: 入耳式隔音侧睡不压耳耳机https://m.intl.taobao.com/detail/detail.html?id=533705764675&spm=a2141.7631730.0.i1&ttid=212200%40htao_android_4.1.3#&modal=share In the one hand, you can never heard your roommates voice, on the other hand, you can have a nice sleep For the quality of voice, 和 120 yuan 的小米耳机一样,just OK for daily music playing. The best benefits you can get from this 耳机 is: 你可以在疲惫的午间或下午放学后无视SB室友,通过睡眠补充精力,并由此开启高效脑力活动的一天。 😘 —————————————— 这场自我救赎的旅途 就算灵魂在颤抖 就算对脑力的要求远远超出了我的想象 我也必须坚持下去 不然之前的努力算什么? —————————————— """ import pyaudio import numpy as np CHUNK = 4096 # number of data points to read at a time RATE = 44100 # time resolution of the recording device (Hz) p = pyaudio.PyAudio() # start the PyAudio class stream = p.open(format=pyaudio.paInt16, channels=1, rate=RATE, input=True, frames_per_buffer=CHUNK) # uses default input device # create a numpy array holding a single read of audio data for i in range(10): # to it a few times just to see data = np.fromstring(stream.read(CHUNK), dtype=np.int16) print(data, len(data)) # close the stream gracefully stream.stop_stream() stream.close() p.terminate() """ import pyaudio import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation import time RATE = 44100 CHUNK = int(RATE/20) # RATE / number of updates per second def soundplot(stream): fig = plt.gcf() fig.show() fig.canvas.draw() while 1: data = np.fromstring(stream.read(CHUNK), dtype=np.int16) plt.plot(data) plt.xlim([0, len(data)]) plt.ylim([-2**16/2, 2**16/2]) fig.canvas.draw() plt.pause(0.01) fig.clear() if __name__ == "__main__": p = pyaudio.PyAudio() stream = p.open(format=pyaudio.paInt16, channels=1, rate=RATE, input=True, frames_per_buffer=CHUNK) soundplot(stream) stream.stop_stream() stream.close() p.terminate() 人生中第一次自己绘制音波 下次争取彻底理解音频,为py audio live发展尽一份绵薄之力 —————————————— # https://github.com/jokermonn/-Api/blob/master/CenterWeather.md import requests import json """ r = requests.get("http://tj.nineton.cn/Heart/index/all?city=CHJS000000") j = r.json() """ t = """{"status":"OK","weather":[{"city_name":"南京","city_id":"CHJS000000","last_update":"2018-05-02T10:45:00+08:00","now":{"text":"多云","code":"4","temperature":"24","feels_like":"23","wind_direction":"北","wind_speed":"20.16","wind_scale":"4","humidity":"68","visibility":"2.00","pressure":"1010","pressure_rising":"未知","air_quality":{"city":{"aqi":"84","pm25":"62","pm10":"83","so2":"9","no2":"23","co":"0.911","o3":"106","last_update":"2018-05-02T09:00:00+08:00","quality":"良"},"stations":null},"alarms":[]},"today":{"sunrise":"05:20 AM","sunset":"06:45 PM","suggestion":{"dressing":{"brief":"舒适","details":"建议着长袖T恤、衬衫加单裤等服装。年老体弱者宜着针织长袖衬衫、马甲和长裤。"},"uv":{"brief":"最弱","details":"属弱紫外线辐射天气,无需特别防护。若长期在户外,建议涂擦SPF在8-12之间的防晒护肤品。"},"car_washing":{"brief":"较不宜","details":"较不宜洗车,未来一天无雨,风力较大,如果执意擦洗汽车,要做好蒙上污垢的心理准备。"},"travel":{"brief":"适宜","details":"天气较好,风稍大,但温度适宜,总体来说还是好天气。这样的天气适宜旅游,您可以尽情享受大自然的风光。"},"flu":{"brief":"易发","details":"相对于今天将会出现大幅度降温,风力较强,易发生感冒,请注意适当增加衣服。"},"sport":{"brief":"较适宜","details":"阴天,较适宜进行各种户内外运动。"}}},"future":[{"date":"2018-05-02","high":"25","low":"14","day":"周三","text":"阴\/多云","code1":"9","code2":"4","cop":"","wind":"风力4级"},{"date":"2018-05-03","high":"26","low":"14","day":"周四","text":"晴\/晴","code1":"0","code2":"1","cop":"","wind":"风力3级"},{"date":"2018-05-04","high":"26","low":"17","day":"周五","text":"多云\/雷阵雨","code1":"4","code2":"11","cop":"","wind":"风力2级"},{"date":"2018-05-05","high":"20","low":"17","day":"周六","text":"阵雨\/中雨","code1":"10","code2":"14","cop":"","wind":"风力3级"},{"date":"2018-05-06","high":"21","low":"16","day":"周日","text":"大雨\/中雨","code1":"15","code2":"14","cop":"","wind":"风力3级"},{"date":"2018-05-07","high":"22","low":"16","day":"周一","text":"阵雨\/阴","code1":"10","code2":"9","cop":"","wind":"风力4级"},{"date":"2018-05-08","high":"22","low":"17","day":"周二","text":"阴\/大雨","code1":"9","code2":"15","cop":"","wind":"风力4级"},{"date":"2018-05-09","high":"21","low":"16","day":"周三","text":"阴\/阴","code1":"9","code2":"9","cop":"","wind":"风力3级"},{"date":"2018-05-10","high":"20","low":"14","day":"周四","text":"阴\/阴","code1":"9","code2":"9","cop":"","wind":"风力3级"},{"date":"2018-05-11","high":"25","low":"15","day":"周五","text":"小雨\/多云","code1":"13","code2":"4","cop":"","wind":"风力2级"}]}]}""" j = json.loads(t) city = j["weather"][0]["city_name"] all = [] for one in j["weather"][0]["future"]: all.append("{date}({day})\n{low}~{high}\n{text}".format(date=one["date"], day=one["day"], low=one["low"], high=one["high"], text=one["text"])) for one in all: print(one) print("\n" * 2) suggestion = j["weather"][0]["today"]["suggestion"]["dressing"]["details"] + "\n" + j["weather"][0]["today"]["suggestion"]["flu"]["details"] print(all[0]) print(suggestion) —————————————— VSC是真的屌,加上vim扩展很好用 果然用多了linux,还是想回到Windows傻瓜界面透透气 —————————————— 看晃眼了,这是2D 没用 —————————————— 不过搜了一下午 关于通信原理的知识 一堆公式,感觉什么都没学到 …这个怕不是给人学的,比编程难 —————————————— 所以我选对了专业? —————————————— https://www.youtube.com/watch?v=YJmUkNTBa8s 干脆以后的小学科笔记全部发 English keywords (关键字) or links 得了,听中文老师讲太恼火了、中文书也看不懂 —————————————— 闭源垃圾(s —————————————— https://github.com/cocos2d/cocos2d-x 真正游戏开发还是得学这个 这是我能想到得 除了 嵌入式开发外 C++ 唯一能做的事了... —————————————— 可以(跨平台),开源我的最爱 Here has a saying: be your own god —————————————— 正在玩Godot的机器人例程 它采用的是一种混合python、JavaScript的语言 蛮好玩的 要是可以生成安卓游戏就完美了 —————————————— 看了 《缩小人生》,无感那是不可能的 作者肯定给我灌输了什么思想😳 —————————————— 看了 《Suicide Squad》动画版 cool —————————————— https://www.youtube.com/watch?v=DIw02CaEusY windows 开发向来都是初始设置繁琐 虽然 debug 看起来挺好用,但是应该无法用于单片机 —————————————— https://www.geeksforgeeks.org/c-classes-and-objects/ 感觉 C++ 的特性蛮多的 还是要在具体的写复杂程序的过程中才能掌握 不过还是要避免使用一些与主流语言不同的特性,比如 swich —————————————— https://playground.arduino.cc/Code/Library#What 原来C++在写class的时候,用 :: 来标明是哪个 class 的 function (To define a function outside a class.) —————————————— https://pythonprogramming.net/gpio-input-raspberry-pi-tutorials/ 看完后,我感觉Raspberry Pi比arduino更繁琐 —————————————— Great then —————————————— What's your plan if python 凉了? —————————————— 真无聊,和3D建模差不多 内建JavaScript接口 —————————————— 这个对技术要求好像很高 除非用 再生龙 —————————————— http://lengly.top/archives/85 这些人真是吊 我也想修改一个linux系统专门使用 Python 系列软件,只含有 kivy 等py系界面库 制作的 桌面程序 —————————————— 不行,unity2018无法破解 2017可以 —————————————— 正在安装 unity 2018 准备玩一波 —————————————— 换言之,就是没有我找不到的软件… —————————————— 同一种功能的替代品 —————————————— 人是不是到了一定年龄就会觉得软件开发没意思啊? 我的意思是都有代替品了 —————————————— 刚刚试用了一下 Visual Studio Code 还行,代码美观 —————————————— 好像行不通 1. 两个摄影头测距的方法很复杂,还是硬性编码,基于opencv 2. 用tensorflow需要有大量的robot图片,万一下次比赛那些人把机器人外貌变了… 3. 我懒,上次自动开枪的图片我都懒得label —————————————— bilibili直播软件,摄像头属性里竟然还可以美颜、加特技……… 白录了好多视频 —————————————— 我才看懂 stack overflow 是什么意思 堆栈溢出,典型的错误,于是就明白这个网站是干什么的了 —————————————— 我这边创新学院的院长想让我做自动化的搏击机器人 方案一,用距离传感器 方案二,python物体检测 我比较倾向于2,所以我得先做实验,确认是否可行 —————————————— 2.2倍速看了《大世界》 社会 https://baike.baidu.com/tashuo/browse/content?id=b7a9e6fb3b85cbbb98f1fe68&fr=qingtian&lemmaId=22150319 —————————————— 当然,还享受了几天地质大学的高级迎宾馆 —————————————— 不过这次去武汉还是有收获的 至少知道全中国除了上海 都是 多平民窟+少城市化 模式 —————————————— 我那个机器人小队有个特点:我说什么,它们反对什么 下次如果还和他们一组,我就反着说 —————————————— 我还发现 成为真正的程序员之后 一切不在自己掌控范围的东西都无法保证质量 因为普通人永远无法像程序员一样突破人类极限、追求完美 —————————————— Programmer Hardware master Teacher-maybe 为什么这么厉害 Twitter 上关注的不多 你是怎么来到这儿的? —————————————— https://github.com/yingshaoxo/driver —————————————— 等会儿整理一下 全部开源,让他们下次没法比 —————————————— 还是做软件吧 —————————————— 我的算法几乎超越了场上4/5的人 但车走不直、机动性不强我也没办法啊… —————————————— 硬件上有问题 软件上是没法突破的 —————————————— 以后再也不参加硬件比赛了 —————————————— 被人宠惯了 脾气就大 我组就有这样一位(但我坚决不让他上场😁 —————————————— 这确实是一场对心理成熟度的考验 谁候场谁知道 —————————————— 今天下午就是参加这个赛 —————————————— 一个人走路才回想起来自己19岁了 —————————————— 年轻人性格太急躁就容易做错事 只有多经历几次挫折才会稳重吧! —————————————— 主要是调用三方win api —————————————— 甚至连跑出轨后退都没有 —————————————— 到了现场才知道 他们根本没人搞出来高科技节点跑路法 —————————————— 不,比小镇还大 —————————————— 中国地质大学就像一个小镇一样… —————————————— 一方面我睡不着,还想写代码 另一方面,没硬件给我运行 也许这就叫有心无力吧 —————————————— 妄我自命程序员 连一个小车程序都做不好 —————————————— 我现在有点心得了 写小车程序这种需要高动态处理的东西 最重要的成功因素是: 在 main loop 里少加 delay,越少越好,0就最好了! —————————————— 不好意思,我的朋友们,这几天我可能会忙得见上帝 所以没有过多时间进行自我提升和知识分享 I'm sorry —————————————— 买了个德胜牌头戴麦克 以为效果会好点 结果发现还不如我的小米耳机自带的麦克 所以20块白花了,还不如用几毛钱买一个防噪棉套在小米耳机上对音质有提升 —————————————— 上午录(直播)了两小时的AI learning 说了2小时的英语,真爽! 这才感觉是个人(living) —————————————— https://kg2.qq.com/node/play?s=A4mqQGAm-r_HzAOn&shareuid=609b9b8620283382&topsource=a0_pn201001006_z11_u26635549_l0_t1524235138__ —————————————— 寻迹小车 寻迹部分完成 目前需要用超声波传感器通过测距提前检测障碍物,然后关掉寻迹 再恢复寻迹 https://github.com/yingshaoxo/driver/blob/current/driver.ino 24号去武汉比赛,要是做不好,就浪费了一个月的时间 —————————————— 我决定再也不劳累自己 一回寝室就睡觉 运气好早上自然醒就做正事,要不然就算了 如果我时间不够,只能说明我效率太低 —————————————— 感觉毛概课再上下去,我就废了 本来该拿来做笔记、写作业的时间 就这样没了,还考什么试、毕什么业、上什么岗 —————————————— 宿命 Destiny —————————————— I don't want to learn those shit unless I can lay on bed, typing. —————————————— 我感觉学模电或通信原理时 我前面有一个真空黑洞,大量的知识,好的坏的,全在里面 如果我不仔仔细细地搭好逻辑桥,下一节课我就会被撕得粉碎,以前学过的东西全线崩塌( 最后的结果大概就是再也听不懂老师在说什么,是一种由心而发的疲乏) —————————————— 你把 system357 小哥哥屏蔽之后 就失去了一个大神的信息来源 所以就让他继续笑吧😄 —————————————— 65.无法量化为计算机可处理的逻辑的教学,毫无意义。 —————————————— Find peace when I listen to this I wonder why these applications could keep in free It's the benefit of Ad? —————————————— 只是要怎样做得像 pornhub github 或vultr 一样,让用户心甘情愿的花钱 让它们觉得花得值 —————————————— 我只是知道一个项目不盈利肯定会死 只是早和晚的问题 —————————————— 如果让你想一个可以盈利的互联网项目 你能想到什么? —————————————— 好玩的定义是什么? 我觉得是 reaction 如果一个固定不动的正方体和一个可以四处滚的球,你肯定会觉得球更好玩,因为 it will react quickly if you keep touching it. —————————————— 已入自考本科学历怪圈 —————————————— 再这样消沉下去肯定不行 必须得在每个周末录一段才能进步 https://developers.google.com/machine-learning/crash-course/first-steps-with-tensorflow/programming-exercises —————————————— By the way 当我把所有数学知识都转成 English based 之后,我感觉高数超简单,有的是资源 —————————————— 学了9节课 sentdex 的 pygame tutorial 发现好无聊 本来还想做个小车模拟程序以便一次性解决硬件条件不足的问题(不能疯狂地debug) —————————————— https://yingshaoxo.xyz/book/notes/multiplexer.html 搞定 —————————————— 我们所做的事 无非是用技术对权力和财产进行重新分配 也就是用个人奋斗突破血缘亲族的枷锁 —————————————— 因为再不赚点钱连耳麦都买不起了 你看音质那么差 —————————————— https://youtu.be/-f8tts4WRRk 实在不行就只能做点 sex website 维持生活了 —————————————— 我不是要创业吗 总得做点什么 您看做什么好? —————————————— 在github做网站连服务器都省了 用户通过github提交url —————————————— 你说我去创建一个全国性的社团怎么样?(网站、app、用户贴url,评论用第三方) 极客公社 然后我以后发的所有视频都贴上它的名字 —————————————— http://music.163.com/song/506747016/?userid=280429778 —————————————— 我们实验室的3D打印机 —————————————— 我已经掌握了如何批量加速无声片段 等我把上上次的视频用这个方法处理完 发视频教程 —————————————— https://drive.google.com/file/d/1sHJzkMX5XQxVI6btFiCOTthXlEGS2oIc/view?usp=sharing 测试通过,就是不知道怎么通过 marked regions 批量加速没人声的部分 现在只能自动删除没声音的音频和视频 —————————————— 看完 《The shape of water》 没什么感想,又过了一个周末 —————————————— 工欲善其事, 必先利其器 想学AI,就得在平时零碎时间(没有图书馆、教室,需要面对只会打游戏傻逼室友时)用百词斩背单词 —————————————— 暂时写好了 但个人觉得没有numpy好用 numpy可以直接处理数据,sympy只能做点书上的符号运算 —————————————— from sympy import * x, y, z = symbols('x y z') init_printing(use_unicode=True) r = simplify(1/(1 + ((y**2)/x)) * (y * ((-1)*(x**(-2))))) r = latex(r) print(r) 我想把数学工具写进 auto_everything 的数学模块里 这样以后就不需要手算 anything 了,同时也方便程序自身调用 —————————————— 翻了一圈 发现国外论坛一个问题可以讨论几年 顺着看下去就有解决方案了 http://vegasaur.com/silence-detector —————————————— 我想实现这个功能,从而自动加速视频。然而没找到例程。 —————————————— 不管了 反正我自己掏钱淘宝24买了块uno增强板 学校自己又花80买了块 准备做测试 我已经不报希望了 我们还是回到正常开发吧 —————————————— 那只是usb接口 我们所有板都是DC电源接口插入不亮 我觉得它有病,usb有保险丝,DC直流没有 明明usb不容易烧 —————————————— https://yingshaoxo.xyz/book/notes/number_system.html 摆脱线上活动的感觉大概就是这样了 —————————————— https://github.com/GitbookIO/editor-legacy#how-to-install-it-on-linux 以后就离线写笔记吧 顺便把 它 搞到 github webpage 上去 —————————————— 现在我是彻底理解软件开发的好处了 抽象才是王道 可迭代、永不损坏才是最重要的 (Happy(find where you are good at) is the most important thing in life😁) —————————————— 烧了两块板(所有板) 不打算玩了😡 垃圾主板没有类似保险丝的东西 —————————————— 今天数电老师讲这个,我已经懵了 这玩意儿笔记怎么做啊? —————————————— Too bottom to nothing. 太底层以至于做不出什么东西来。 哇,我现在的课程全部在学底层硬件 受不了了 直接用微型计算机,比如树莓派会死啊… —————————————— 确定了 26号以后 不管是继续参加比赛还是不参与一切活动 都把星期六、天空出来,录视频+做笔记 (也就是我的学习之道了) 比赛啥的太费时间了,老是不学习,停在原地也不是一件好事,要是完不成今年的任务,我怕是会后悔一辈子 —————————————— https://yingshaoxo.xyz/post/How%20to%20use%20gitbook%20right%20in%20local.html npm挺好用的 —————————————— http://www.manythings.org/voa/scripts/ Read it loudly if you feel sad! —————————————— 看起来被人算计了 —————————————— https://yingshaoxo.xyz/post/Use%20Platformio%20to%20take%20the%20place%20of%20Arduino.html —————————————— 我知道 mux 是什么意思了 多信号转一信号、用一根线 —————————————— Those new friends don't know what they will face But I knew it very well The real world is complicated, you have to be very careful. Because if you don't do so, maybe the biggest chance of your life would come across you And you won't meet it again —————————————— I don't need to learn anything right now Just leave me alone, give me a quiet place 盲目的学习犹如吃东西分不清食与屎 —————————————— 我之前被官方比赛培训的文档给误导了 所谓灰度传感器并不能发出红光,所以它不是红外传感器 小车寻线这个事,通过搜索,还是红外线比较靠谱 —————————————— https://blog.csdn.net/qq_16775293/article/details/77836020 马的,明天晚上试一下4个传感器,不行就不玩了 —————————————— 小车没法做了 物理世界和程序世界不一样 传感器不像纯数学那样没有误差 整天一股恶心的不可预测因素围绕着我😱 感觉灵魂被掏空 —————————————— 模电到了 Bipolar Junction Transistor Biasing English book 是基本上看不懂了😞 —————————————— 无奈 为啥读中职呢? 失败的实验性教育 —————————————— 到时候考到上海来呗 —————————————— 你是大学吗? —————————————— 从此知道怎么用非delay方法,进行时钟控制 —————————————— 知道就可以用这个控制上传了… —————————————— 现在我知道学校买的那块板是仿造的谁了 —————————————— 好,到时我看看 —————————————— 最后吐槽一下 C没有class的概念 项目大了写着好困难 同时垃圾 Arduino 还不支持在一个文件夹放n个c文件互相调用 想专业化重构工程都不行😒 —————————————— https://github.com/yingshaoxo/driver/blob/current/driver.ino 1. 为了做这个我快拼了老命 2. 这个配套的传感器是垃圾,还不如淘宝几块钱的东西 3. 官方一个灰度传感器卖200(垃圾比赛不允许用三方零件) 4. 学校还不太愿意批钱 5. 傻逼吧,传感器都不够还敢参加比赛(本来要3个灰度传感器才能识别黑线,现在两组平分下来只有2个「黑脸」) —————————————— https://colab.research.google.com/notebooks/mlcc/first_steps_with_tensor_flow.ipynb?hl=en#scrollTo=941nclxbzqGH 直播完成 —————————————— 不 B站可以边直播、边录视频 并且B站自带降噪 —————————————— 打算用 twitch 初略地看了一下 Open Broadcaster Software 发现B站的win直播软件就是直接拿它改的😏  http://music.163.com/song/477320018/?userid=280429778 —————————————— 唯一的缺点就是B站直播一晃就过去了 留不下宝贵的学习经历 —————————————— https://colab.research.google.com/notebooks/mlcc/intro_to_pandas.ipynb?hl=en#scrollTo=yBdkucKCwy4x 我通过 B 站直播学完了这一个网页 注意!是在寝室!克服了干扰! 果然直播有用 —————————————— 《1993聊斋艳谭之灯草和尚》 可以说是中国(如果香港属于中国)史上最好的色情片 既展现了中国传统文化(服饰、装潢、鬼神说),又集中体现了性爱文化的方方面面(比如男女、女女、自慰、强奸) 不仅剧情设计精美,演员自身素质也高(颜值、身材) 1.5、2倍速切换观看 —————————————— https://join.baicizhan.com/ 以后去百词斩(看看)也不错 别人旅游看风景,我旅游看公司 —————————————— 我知道我以后的星期六、星期天怎么过了 B站 直播 学习 包括AI、写代码、写作业、写笔记 这样又可以装逼,又不耽误学习和未来,一举三得,何乐而不为? —————————————— The problem is how —————————————— The more touches on other fields, the more I'd like to begin my journey on tensorflow(or real ML project) —————————————— #include #include #define RESOLUTION 65536 // Timer1 is 16 bit class TimerOne { public: // properties unsigned int pwmPeriod; unsigned char clockSelectBits; // methods void initialize(long microseconds=1000000); void start(); void stop(); void restart(); void pwm(char pin, int duty, long microseconds=-1); void disablePwm(char pin); void attachInterrupt(void (*isr)(), long microseconds=-1); void detachInterrupt(); void setPeriod(long microseconds); void setPwmDuty(char pin, int duty); void (*isrCallback)(); }; extern TimerOne Timer1; —————————————— 你说这是给人看的吗? /* Interrupt and PWM utilities for 16 bit Timer1 on ATmega168/328 */ #include "TimerOne.h" TimerOne Timer1; // preinstatiate ISR(TIMER1_OVF_vect) // interrupt service routine that wraps a user defined function supplied by attachInterrupt { Timer1.isrCallback(); } void TimerOne::initialize(long microseconds) { TCCR1A = 0; // clear control register A TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer setPeriod(microseconds); } void TimerOne::setPeriod(long microseconds) { long cycles = (F_CPU * microseconds) / 2000000; // the counter runs backwards after TOP, interrupt is at BOTTOM so divide microseconds by 2 if(cycles < RESOLUTION) clockSelectBits = _BV(CS10); // no prescale, full xtal else if((cycles >>= 3) < RESOLUTION) clockSelectBits = _BV(CS11); // prescale by /8 else if((cycles >>= 3) < RESOLUTION) clockSelectBits = _BV(CS11) | _BV(CS10); // prescale by /64 else if((cycles >>= 2) < RESOLUTION) clockSelectBits = _BV(CS12); // prescale by /256 else if((cycles >>= 2) < RESOLUTION) clockSelectBits = _BV(CS12) | _BV(CS10); // prescale by /1024 else cycles = RESOLUTION - 1, clockSelectBits = _BV(CS12) | _BV(CS10); // request was out of bounds, set as maximum ICR1 = pwmPeriod = cycles; // ICR1 is TOP in p & f correct pwm mode TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); TCCR1B |= clockSelectBits; // reset clock select register } void TimerOne::setPwmDuty(char pin, int duty) { unsigned long dutyCycle = pwmPeriod; dutyCycle *= duty; dutyCycle >>= 10; if(pin == 1 || pin == 9) OCR1A = dutyCycle; else if(pin == 2 || pin == 10) OCR1B = dutyCycle; } void TimerOne::pwm(char pin, int duty, long microseconds) // expects duty cycle to be 10 bit (1024) { if(microseconds > 0) setPeriod(microseconds); if(pin == 1 || pin == 9) { DDRB |= _BV(PORTB1); // sets data direction register for pwm output pin TCCR1A |= _BV(COM1A1); // activates the output pin } else if(pin == 2 || pin == 10) { DDRB |= _BV(PORTB2); TCCR1A |= _BV(COM1B1); } setPwmDuty(pin, duty); start(); } void TimerOne::disablePwm(char pin) { if(pin == 1 || pin == 9) TCCR1A &= ~_BV(COM1A1); // clear the bit that enables pwm on PB1 else if(pin == 2 || pin == 10) TCCR1A &= ~_BV(COM1B1); // clear the bit that enables pwm on PB2 } void TimerOne::attachInterrupt(void (*isr)(), long microseconds) { if(microseconds > 0) setPeriod(microseconds); isrCallback = isr; // register the user's callback with the real ISR TIMSK1 = _BV(TOIE1); // sets the timer overflow interrupt enable bit sei(); // ensures that interrupts are globally enabled start(); } void TimerOne::detachInterrupt() { TIMSK1 &= ~_BV(TOIE1); // clears the timer overflow interrupt enable bit } void TimerOne::start() { TCCR1B |= clockSelectBits; } void TimerOne::stop() { TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); // clears all clock selects bits } void TimerOne::restart() { TCNT1 = 0; } —————————————— #include This variant is used for system header files. It searches for a file named file in a standard list of system directories. #include "file" This variant is used for header files of your own program. It searches for a file named file first in the directory containing the current file, then in the same directories used for . —————————————— 看完了 房客(The Lodgers 2017) ,一脸蒙逼 没看懂结局 并且翻不到影评 —————————————— AI 是凡人杀手 所以能活过 AI 时代的,都是超人 —————————————— 玩游戏 —————————————— 游戏背景制作 —————————————— ​​FlappyLearning 使用进化算法机器学习玩 Flappy Bird。 语言:#JavaScript 分类:#机器学习 —————————————— ​​WaveFunctionCollapse 使用机器学习生成相似的图片。 语言:#csharp 分类:#机器学习 —————————————— 感觉整个人都不好了 小车的传感器不咋地 神烦,传感器接口也只能用4个,3个灰标、一个超声波就没了 要是可以同时用更多传感器我也不会这么烦 晚上睡实验室 —————————————— Chrome 就两点不好: 1. 看pdf不能滑词翻译 2. 滑词翻译不能自动发音 —————————————— 不过说实话 把 C 写成 Python 感觉挺好玩的 万物皆 Py😂 —————————————— 累 把寻黑色路线部分写完了 明天测试一下应该可以上数组记nodes了 —————————————— 换新实验室了 —————————————— 那些老师就知道硬件 编程好的,比如我班主任教单片机,绘图用mathlab,你说能有多厉害?。。。 好了,我知道了,用 struct 效果比较好,就怕到时候内存不够用 struct dict { int key; int value; } nodes[30] = { {0, 4}, {1, 5}, {2, 6}, {3, 7}, {4, 8}, }; 目前我写的代码: #include // /* void analogWrite(int pin, int value) { printf("%d: ", pin); printf("%d\n", value); } // */ struct dict { int key; int value; } nodes[30] = { {0, 4}, {1, 5}, {2, 6}, {3, 7}, {4, 8}, }; void set_left_wheels(int go_or_back, int value) { if (go_or_back == 1) { analogWrite(9, value); } else if (go_or_back == -1) { analogWrite(10, value); } else if (go_or_back == 0) { analogWrite(9, 0); analogWrite(10, 0); } } void set_right_wheels(int go_or_back, int value) { if (go_or_back == 1) { analogWrite(5, value); } else if (go_or_back == -1) { analogWrite(6, value); } else if (go_or_back == 0) { analogWrite(5, 0); analogWrite(6, 0); } } void go_straight(int value) { set_left_wheels(1, value); set_right_wheels(1, value); } void go_back(int value) { set_left_wheels(-1, value); set_right_wheels(-1, value); } void stop() { set_left_wheels(0, 0); set_right_wheels(0, 0); } void turn_left() { set_left_wheels(1, 100); set_right_wheels(1, 255); } void turn_right() { set_left_wheels(1, 255); set_right_wheels(1, 100); } int main() { printf("%d\n", nodes[1].key); printf("%d", nodes[1].value); } void setup() { } void loop() { } —————————————— ~/.vimrc setting au FileType c map :w:!gcc % && ./a.out % au FileType python map :w:!python3.6 % au FileType go map :w:!go run % au FileType sh map :w:!bash % " means a Enter key. "For :w, I don't know its means. au BufNewFile,BufRead * \ set tabstop=4 | \ set softtabstop=4 | \ set shiftwidth=4 | \ set expandtab | "\ set autoindent | \ set fileformat=unix " autoindent may cause bad behavior when you paste in vim —————————————— @system357 要是你来做指导老师 岂不是每次都能获奖😂 —————————————— 我知道了 —————————————— 主要是没有 int list 只有 char *[] —————————————— 然后我的 c 应该想办法记录十字或转弯节点并记录是否转弯的int number 类似dict —————————————— 我的主板只能接这个 —————————————— 什么意思? 没有… —————————————— 等会儿我跑完步(学校强制) 给你一张高清图 —————————————— 是可以 —————————————— 水货,诶 —————————————— 今天晚自习捣鼓了半天,没用起来 platformio 也没用起来,不知道板子型号 最后还是依靠 arduino Linux version settings 里面的 依靠外部编辑器 每次 vim 保存文件后, arduino 自动重载代码 —————————————— Arduino那个 uno 板 怕是 upload 不了c++ 我试了一下报错 —————————————— You Complete Me 好坑爹啊 花了几个小时把它安装好并可以补全c 然后想写教程,发现写的东西不能用… 怪不得我以前老是装不好😢 —————————————— 成就越大 影响力越大 反过来理解,你的能力可以通过影响力反映出来 —————————————— 一开始认真写 c 思维就僵化 发现我能力好低 比如用c写个 dict结构 怀恋c++ —————————————— 由于 cloudflare 有强制转发这个功能 Let's encrypt 初始设置时就不需要强制转https,于是就没有了相关 ProxyPassReverse 的 Bug 于是就有了完美的小绿锁 于是 Apache 搞坏了就把对应的 Apache config folder 删掉, apt purge 再 reinstall 于是你就可以乱搞了 —————————————— 这才是设置 github https 的正确方式 https://gist.github.com/cvan/8630f847f579f90e0c014dc5199c337b —————————————— 如果我是学校楼梯设计者 我就会把上下行的空间分别压缩为只能容纳一人的宽度 这样就不会有混乱的拥挤 —————————————— 大学政治类课程创始人:(对于28原则中8那部分,)同样都是洗脑,被敌人洗脑还不如被我洗脑 —————————————— 你到底是软件工程师还是硬件工程师啊 看不懂 string [0] 和 string[-1] 两个词 —————————————— https://playground.arduino.cc/Interfacing/Python 有空看看如何用python和vim控制烧录 —————————————— 今天测试了直流电机和碰撞传感器 尝试了烧录 感觉挺简单的 setup() 定义管脚或 series信息回传 loop() 每循环一次,读取传感器的信息 或 回传msg 只是觉得在 Arduino 敲代码效率低下,想在 Linux 下用它,配合 Vim 与 Git —————————————— 如果用颜色识别 瞬间感觉又是份苦力活 回到原始的刀耕火种按键精灵脚本时代 —————————————— 看起来,你们说得对 32k内存的东西不可能用到摄像头 —————————————— 很奇怪吗? —————————————— 我个人还是很奇怪,不知道他把 调用 OpenCV 的代码 与 Arduino的代码 分开是做什么 可能是想让我们这些参赛者自己去写一下代码吧。。。 —————————————— 把例程和管脚之间的联系、socket 的详细逻辑理解后 下个星期,我就要开始用 opencv(c++) 做传统人工智能跨障碍小车了 为期 26 天 —————————————— 今天实际接触了 探索者 的开发板 和例程 发现它是用的 opencv 的 C++ 调用,识色、灰度图或框架 然后摄像头与Wi-Fi发射器连一起,主板与摄像头用 局域网 socks 连接 —————————————— 什么鬼 阴蒂? —————————————— https://brain-surface-viewer.herokuapp.com/ 厉害了,我的 America —————————————— 这简直就是大数据实时监控利器 C++可以去死了 无敌的运维、让老板看得见、摸得着的东西… —————————————— https://dash.plot.ly/getting-started 看着这些精美的图渲染在我的浏览器,我在想,学什么 Javascript 啊。。。 —————————————— http://music.163.com/song/474932965/?userid=280429778 —————————————— https://www.programiz.com/c-programming 看完了,这样的话,学校的探索者机器人项目编程就有基础了 不管了,原来 C 就那么点内容 —————————————— https://github.com/madscheme/resume/blob/master/resume10.pdf 很明显,我没有达到它2016-2018年的高度 如果我达到了,现在就应该能写出同时为百万用户提供服务的程序 —————————————— 看来以后只能用 比特币 了 —————————————— 填不了😭 —————————————— 人长大了还需要学着投资,买买股票啥的 http://www.bilibili.com/video/av21355570?share_medium=android&share_source=copy_link&bbid=E0626135-9650-438C-9974-1B8315ED7B0613493infoc&ts=1522364251277 有谷歌手机号就是好 —————————————— 完成了,以后再做爬虫就用AI方式破解各种变态验证了,传统方式正处于消亡中 from auto_everything.web import Selenium from time import sleep my_selenium = Selenium("https://www.google.com") d = my_selenium.driver # get input box xpath = '//*[@id="lst-ib"]' element = my_selenium.wait_until_exists(xpath) # text inputing element.send_keys('\b' * 20, "yingshaoxo") # click search button element = my_selenium.wait_until_exists('//*[@id="tsf"]/div[2]/div[3]/center/input[1]') element.click() # d.execute_script("arguments[0].click();", element) # exit sleep(3) d.quit() https://pypi.python.org/pypi/auto-everything 0.8版发布,还是__filename.py隐藏方式好用 —————————————— 算了,没什么实际的用处 vim还是把所有东西都拉出来了… —————————————— https://github.com/SeleniumHQ/selenium/tree/master/py/selenium/webdriver —————————————— 比我想像的要高级,它是用文件夹分割的主框架,然后用 init.py 来导入那些需要提供给用户的模块 —————————————— 随着开发的深入 我会把 AI technology 用在 auto_everything 里面 —————————————— 通过对照 selenium 的模块 突然发现我写 auto_everything 的方式是错误的 init.py 里面什么都不应该放 这样才会让用户从 module 文件用点导入,而不是直接出子类 —————————————— http://yingshaoxo.xyz/post/Running_Jupyter_on_server.html 重写了教程,以后可以在下课的时候看代码了 —————————————— https://docs.scipy.org/doc/numpy/reference/generated/numpy.r_.html 踏踏实实,勤勤恳恳,以后numpy就是我的好朋友了 —————————————— 难是省略太多步骤 复杂是有太多步骤 —————————————— 在保修期,但是发票不见了 😕😁 —————————————— https://fordroid.com/huawei-honor-pad-2-huawei-mediapad-t2-8-pro-jdn-l01-jordan/ 垃圾华为,我也是醉了,全是升级包,没有一个 full-OTA 这样的话就没办法修复我的平板了 —————————————— task 1: AI learning, read book and do experiences task 2: 三端融合 (Android, Web, Server) yingshaoxo'app | Kotlin 做原生才能做到的事,APP框架 WebMathChat | JavaScript 在 web view 里配合 Kotlin 做离线界面与普通运算 KingChat | Python 在后端负责 API, database, AI 等复杂运算,为 web view 有网状态提供服务 Useful Golang | Golang 在后端负责 serve static files 与 替换 Apache 的功能 task 3: School knowledge, including English, Mathematics task 4: Robot match 4个任务并行,由前到后重要性递减 —————————————— fuck that 以后安卓界面都用JS写吧 https://developer.android.com/guide/webapps/webview.html#BindingJavaScript —————————————— 差不多安卓原生界面开发大势已去 同样的一个特性,JS写起来特别简单,安卓就算用kotlin也想吐血 —————————————— 垃圾华为荣耀平板2被我搞坏了 fastboot可以进、twrp可以进 就是进不了系统,几个所谓的官方固件都试了,不行 可能是之前我手动 flash boot.img 和 system.img 出的问题 —————————————— 我之前讲程序员 god 化是有依据的 因为学的东西越来越多 不断突破一人代替多人的实用智力极限 —————————————— 受不了垃圾中文混乱的逻辑 必须得全英文化 —————————————— 用 bitpay 创建了一个 wallet 发现不实名制就无法买币… 有啥用? —————————————— 星期天在空无一人的教室 6M/s 下电影还是蛮快的 这样的话,在教室待一天应该就能下载任意一个美剧、日漫 —————————————— OK, now I'm finished doing this project https://github.com/yingshaoxo/No_More_Chinese/releases/tag/1.0 —————————————— http://yingshaoxo.xyz/post/How%20to%20create%20an%20chrome%20extension.html 可能我还是缺乏耐心 —————————————— Back to reality. Did you notice that 计算机科学家写的东西有系统性,同时一个外行写的书用的语言更容易让人理解? 遇到一个好作者真难 —————————————— 得了,下午也不“回去”了,吃完饭就拎上笔记本,去图书馆,没准还可以在空楼层练习英语 —————————————— 下次我吃完午饭也不回寝室了 垃圾室友 毁我时间 中午的零碎时间看看书还是好的 —————————————— 诶 我怀疑 JavaScript 是不是又革新了 游览器中运行AI倒是挺省服务器的 关键是技术会被盗取 —————————————— ​​Tesseract OCR 支持超过100种语言的文字识别,支持输出为各种文档格式。还有纯js实现的版本Tesseract.js 可以运行在浏览器或者 node.js 中。 语言:#cpp 分类:#图像识别 #文字识别 —————————————— I'm not worry about where I'm gonna go. I'm worry about if I can't reach that level, what my life would be! —————————————— https://elitedatascience.com/keras-tutorial-deep-learning-in-python My mom(pretend to be) told me never give up, so I won't. —————————————— But seems like it still got its own difficulties for me to understand, —————————————— This may be the greatest tutorial about tensorflow in the world! https://www.tensorflow.org/tutorials/layers —————————————— 我想了想,还是自己强 才能抓得住机会 不然机会再多都是泡沫,继续我们的 AI learning 吧 学校的人靠不住,一群SB,害怕创新、害怕投资、互相对抗、暗箱操作、不按常理出牌、体制僵化 —————————————— override fun onUserLeaveHint(){} 从此以后知道用户什么时候点了 home key —————————————— 这个作者为什么这么屌? 我感觉完全没思路在安卓上这么深度与自由的运行 Python codes —————————————— 考四级,我竟然要听电台😐 —————————————— Kotlin asynchronous still in experimental Java 那一套又很麻烦 —————————————— But by default, a service runs in the same process as the main thread of the application Therefore, you need to use asynchronous processing in the service to perform resource intensive tasks in the background —————————————— 感觉很奇怪,如果是以前,我肯定会很高兴,但我现在很平静 —————————————— https://github.com/ageitgey/face_recognition I think this is the simplest way to detect different person's face. —————————————— @system357 哥,你觉得这个有价值吗 —————————————— 我想了想 凭我的技术,最多用树莓派 另外,我的另一个项目关于 探索者机械组件(http://www.robottime.cn/h-col-116.html) —————————————— 正在和学校科协讨论 比赛事项 我要去搜索,探寻 用安卓开发板做人脸识别开锁 的可行性 能就搞 —————————————— http://yingshaoxo.xyz/post/Make%20a%20always%20running%20service%20in%20android%20based%20on%20kotlin.html —————————————— 安卓 service 真可怕 会在允许范围内不断重复启动你的代码… 等会我把教程post写好 并把 实际项目发出来 —————————————— https://www.bilibili.com/video/av6679048/?spm_id_from=333.334.bili_music.12 今天在教室撸了一把 —————————————— 好好复习 考个只有4人寝室的学校 面对的傻逼少、噪音小,学习生活就舒坦了 —————————————— 感觉我的耳机弱爆了,收音差,噪音还多 有必要换一个好的,不然不适用于学校录音环境 —————————————— I would like to give you a talk: https://youtu.be/laTyZz9eepA —————————————— Just believe it English will give us the power to reach our dream —————————————— 没有 你上次离我而去不就是因为我颓废了吗 —————————————— 今天体验了一波计算机办公4级模拟考试 我只想说 用 markdown + latex + python 会死吗 —————————————— https://www168.lunapic.com/editor/?action=transparent Really powerful! —————————————— 我觉得自动音量这个东西 应该考虑两方面, 1是基础噪声,需要在声音开始时检测 2是设备自身发出的噪音;这个需要提前检测设备将发出的声音,这个声音需要在录音时过滤掉(难度较大) —————————————— from auto_everything import Base from urllib.request import urlopen from pydub import AudioSegment from pydub.playback import play from pulsectl import Pulse import csv b = Base() def detect(): r = b.run_command("soundmeter --collect --seconds 60", timeout=70) if 'error' in r: command = """sudo apt-get install python3-pyaudio sudo -H pip install soundmeter --allow-all-external --allow-unverified pyaudio""" b.run_command(command) r = b.run_command("soundmeter --collect --seconds 60", timeout=70) if 'error' in r: print("You have to make sure env is OK") exit() return r.split('avg:')[-1].strip(' ') def play_mp3(): mp3file = urlopen("http://localhost:2018/music/demo.mp3") with open('test.mp3','wb') as output: output.write(mp3file.read()) song = AudioSegment.from_file("test.mp3", format="mp3") # song += 10 play(song) def get_volume(): with Pulse('volume-example') as pulse: sink_input = pulse.sink_list()[0] # first random sink-input stream volume = sink_input.volume #print(volume.values) # list of per-channel values (floats) #print(volume.value_flat) # average level across channels (float) return volume.value_flat def set_volume(num): with Pulse('volume-example') as pulse: sink_input = pulse.sink_list()[0] # first random sink-input stream volume = sink_input.volume volume.value_flat = num # sets all volume.values pulse.volume_set(sink_input, volume) # applies the change def write_csv(name, list_): with open(name, 'a', newline='') as fout: csvout = csv.writer(fout) csvout.writerows(list_) while True: noise = detect() play_mp3() volume = get_volume() write_csv('training.csv', [[noise, volume]]) 现在开始收集数据 —————————————— 好了,现在我可以得到两个参数,一个是每放完一首歌花一分钟检测周围环境音量得到的数字平均值,另一个是每首歌播放结束时我的手动调节音量(用pulsectl) from pulsectl import Pulse def get_volume(): with Pulse('volume-example') as pulse: sink_input = pulse.sink_list()[0] # first random sink-input stream volume = sink_input.volume #print(volume.values) # list of per-channel values (floats) #print(volume.value_flat) # average level across channels (float) return volume.value_flat def set_volume(): with Pulse('volume-example') as pulse: sink_input = pulse.sink_list()[0] # first random sink-input stream volume = sink_input.volume volume.value_flat = 0.3 # sets all volume.values to 0.3 pulse.volume_set(sink_input, volume) # applies the change 我得试一试前面我能训练的最简单的AI模型 这样的话,我们这周的视频就有了 —————————————— https://pypi.python.org/pypi/soundmeter sudo apt-get install python3-pyaudio sudo -H pip install soundmeter --allow-all-external --allow-unverified pyaudio soundmeter --collect --seconds 10 Look! We can make that program with auto_everything. —————————————— How to get user touch position, then move a widget val handleTouch = View.OnTouchListener { v, event -> val x = event.x.toInt() val y = event.y.toInt() when (event.action) { //MotionEvent.ACTION_DOWN -> Log.i("TAG", "touched down") //MotionEvent.ACTION_MOVE -> Log.i("TAG", "moving: ($x, $y)") MotionEvent.ACTION_UP -> { your_widget.x = x.toFloat() your_widget.y = y.toFloat() } } true } your_base_view.setOnTouchListener(handleTouch) —————————————— Exactly, 确实可以自己写 但现在我发现,就目前而言,想让产品有市场 1. website,介绍你的产品并让人下载 2. Mobile Software,let users use your Software everyday with convenience 3. Windows平台,附加产品,方便办公使用 —————————————— 我发现凡是几年前最后更新过的 Android模块 ,基本无法直接用 compile 直接导入,因为谷歌dl.com上 已经没有它了 所以选依赖时要看 github的最后更新时间 —————————————— 傻逼室友最近玩吃鸡了 我的意思就是当傻逼们声音变大时 自动加大音量 让 English 漫布整个寝室 —————————————— 当然,也许是我自己太乱了 东一榔头西一棒子,完全没有规律和计划 这样不好 —————————————— 我说,既然屏幕亮度都感光自动调节了 音量为什么不通过检测环境音量自动调节呢? —————————————— 原来 telegram 有招聘 —————————————— 不过谁说专科的东西不难啊? 我都快头疼死了 1 是需要记忆的东西太多 2 是需要学的东西太杂 3 是星期4这天 通信原理、数电、高数 这一套下来我快要疯了 东西太多完全不知所措,笔记都不知道该怎么写了 —————————————— http://yingshaoxo.xyz/post/Running_Jupter_on_server.html 绕一圈又回到 jupyter 真心不想敲重复的感觉没啥用的代码 —————————————— 我们应该分工合作 网络编程、 AI stuff 应该在 opps_os 完成 逆向、脚本、辅助、外挂应该在 Kali 完成 艺术创造应该在 Windows 完成 —————————————— 真简单 —————————————— 每天都过着苦逼的写笔记生活: https://yingshaoxo.gitbooks.io/university-notes/content/dc-stable-source-circuit-de-fen-xi-yu-ying-yong/zheng-liu-lv-bo-dian-lu-de-fen-xi-yu-ying-yong/rectifier-circuit.html —————————————— 今天下午有个妹子跑来找我整理系统 我完美地完成了任务 看来可以继续发展 —————————————— 要post就得学会抓包 要抓包就得会 wireshark —————————————— 下次提前写代码 仓促写,心好累 —————————————— 哦? —————————————— 另外,selenium一定要用那种出现元素才能选择的方式,不然在垃圾学校网站各种炸😡 —————————————— 从学校抢选修课我知道了 selenium根本不够用 妈的,下次直接每隔一分钟发post包 管你响应不响应(学校选课可以卡几个小时😡) —————————————— 恭喜这位帅哥,把我教得一头雾水 —————————————— 真不敢相信 人类在处理图片信息时,竟然经历了这么多处理 —————————————— 为什么要把它叫做卷积神经网络 只是因为它在添加新内容的同时,“卷”了旧的东西 这样可以紧密的把各个部分连接起来 也就达到了形状识别的目的 也相当于背文章,一次是背不下来的,你应该每次讲一点,每次再把前面的背出来 —————————————— 而那个术语 activation function 类似的,相当于给人的神经网络节点供电的东西 一般是一条平滑的倒下的S曲线,据说是为了随着x的变化取到任意的y值 —————————————— Remember how we are using our images, all pixels flattened into a single vector ? That was a really bad idea. Handwritten digits are made of shapes and we discarded the shape information when we flattened the pixels. However, there is a type of neural network that can take advantage of shape information: convolutional networks. Let us try them. 看到这里,我不禁在想:我之前看的都是什么 networks? —————————————— 人们常说的看英文书不要查每个词的意思,而是慢慢去领悟 可能就是讲的就是 unsupervised learning 但那种“意义聚类”,个人感觉很低效 不如 supervised learning 直接给意思记忆得快 —————————————— 我的择偶标准: 智商(知识面得广;得喜欢解决问题) > 英语(第二语言者可以证明你有毅力做到你想做的事;包容性强、视野开阔、反传统、追求自由) > 文明(遵守社会文明公约,比如噪声控制:与别人在一起时不用外放、不喧哗) > 外表(洁净、对称、白与嫩) —————————————— 我发4 等我学会了AI 我一定把代码写得尽可能易懂 —————————————— -1表示每次只处理一张图片 中间两个代表图片长宽 最后代表图片色素,黑白图就写1 —————————————— 图片右下角 —————————————— 分数指数还可以这么算,我以前都是笨办法 —————————————— Good night, buddy. —————————————— https://github.com/tflearn/tflearn/blob/master/examples/images/convnet_mnist.py Hope you can find something useful —————————————— https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist/#5 个人觉得应该多看实例代码 理论已经看不懂了 或者说看再多也写不出东西 😃我笨啊 —————————————— Good 有外网一切都舒畅 —————————————— https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist/#0 决定了,这周1到5的空余时间就拿来做这个实验 —————————————— 夏天穿感觉还可以 —————————————— 从这段文字中,我们可以看出 确实可以把image当成input data But how? that's the question we gonna think in the next days —————————————— 突然就能编译了 😁 —————————————— 看了电影 mute 竟说不出话来 https://file.yingshaoxo.xyz/download/_dl/Mute.2018.WEBRip.x264-FGT/Mute.2018.WEBRip.x264-FGT.mp4 —————————————— 真屌,让人看不懂的教程 https://www.katacoda.com/courses/traefik/deploy-load-balancer —————————————— http://shanhe.me/2015/07/07/moving-completed-downloads-to-a-different-directory-in-aria2 等有空把 Local_show 的静态serve核心用 golang 换掉,然后和aria2 做一个集成放在一个 docker 镜像里 —————————————— ffmpeg就是吊,premiere直接导入 —————————————— http://yingshaoxo.xyz/post/Master%20FFmpeg.html —————————————— 相当于二代社工、或者大数据社工库分析 二代爬虫 —————————————— 然后就是黑客技术革新 从暴力到智能 根据用户喜好、文化背景与知识水平预测用户的密码 破解验证码等等 —————————————— 我认为艺术的市场很大 所以AI会优先革新那个市场 —————————————— 额~ —————————————— AI definitely will change the art creating process. https://youtu.be/6KHSPiYlZ-U So stop doing art creating, learning ML instead. —————————————— https://drive.google.com/open?id=1rKoDqLHG5BBBWJz4Z52mWmENyng1-feN https://support.portswigger.net/customer/portal/articles/1964020-using-burp-to-brute-force-a-login-page It should work in theory, but I only got 1 Payload sets. So I'd better use Python to crack website in the future. —————————————— https://www.jianshu.com/p/3bbd70d2890d 哪天我也来一次 —————————————— https://github.com/daimajia/AndroidSwipeLayout 我只是看着这些特效很相似 —————————————— 这样明天就可以录视频了 教室里没人 —————————————— 来呀,快活啊~ 总算不用借助第三方录屏软件了 —————————————— Done sudo apt-get install v4l-utils ffmpeg -hide_banner -loglevel info -thread_queue_size 512 -y -f alsa -i hw:0 -thread_queue_size 512 -f x11grab -video_size 1920x1080 -i ":0.0" -thread_queue_size 512 -f v4l2 -video_size 320x240 -i "/dev/video0" -c:v libx264 -crf 30 -preset ultrafast -filter_complex 'overlay=main_w-overlay_w-10:main_h-overlay_h-10' -threads 0 ~/Videos/doing/$(date +%F_%A_at_%H:%M:%S).mp4 —————————————— https://github.com/cytopia/ffscreencast Great! —————————————— import pyscreenshot as ImageGrab # from PIL import import ImageGrab import numpy as np import cv2 import time Cam_Device = 0 Screen_Width = 800 Screen_Hight = 600 Cam_Width = 320 Cam_Hight = 240 Delay = 0.2 cam = cv2.VideoCapture(Cam_Device) while(True): # capture screen screen_img = ImageGrab.grab(bbox=(0, 0, Screen_Width, Screen_Hight)) img_np = np.array(screen_img) screen_img = cv2.cvtColor(img_np, cv2.COLOR_BGR2RGB) # capture camera _, cam_img = cam.read() cam_img = cv2.resize(cam_img, (Cam_Width, Cam_Hight)) num_rows, num_cols = cam_img.shape[:2] # rotate 90 degree rotation_matrix = cv2.getRotationMatrix2D((num_cols/2, num_rows/2), -90, 1) cam_img = cv2.warpAffine(cam_img, rotation_matrix, (num_cols, num_rows)) # horizontal flip cam_img = cv2.flip(cam_img, 1) # combination screen_img[Screen_Hight - Cam_Hight:Screen_Hight, Screen_Width - Cam_Width:Screen_Width] = cam_img cv2.imshow("test", screen_img) if cv2.waitKey(25) & 0xFF == ord('q'): cv2.destroyAllWindows() break else: time.sleep(Delay) Finished, but no audio Need to use an audio python package may be —————————————— 吓到我了 —————————————— 感觉你是做视频处理的 —————————————— 如果能把camera叠加上去 就很好了 —————————————— I only found this, but no camera gnome-terminal -x ffmpeg -y -f alsa -i hw:0 -f x11grab -framerate 30 -video_size 1920x1080 -i :0.0+0,0 -c:v libx264 -pix_fmt yuv420p -qp 0 -preset ultrafast ~/Videos/doing/$(date +%F_%A_at_%H:%M:%S).mp4 —————————————— 有现成的代码吗 我查了半小时没什么收获 —————————————— Gnome的录屏坏了,无法读取我的 USB camera 现在只能安装opencv自己做一个录屏+camera 的东西了 😢果然自己做的东西最好用(vokoscreen还行,就是只能让声音通过USB camera传进来,不然声音和图像不匹配,一个快一个慢,,,那要求你的camera拾音效果非常好,,可惜我的是垃圾) —————————————— https://codelabs.developers.google.com/codelabs/tensorflow-for-poets-2-tflite/index.html#4 Fail to import: SSL peer shut down incorrectly —————————————— 一开始我以为安卓的那些界面设计很难 后面发现除了telegram全都自己做比较难 像TIM、QQ全是用的别人的库 —————————————— https://github.com/pwittchen/swipe https://github.com/pwittchen/swipe/blob/RxJava2.x/app-kotlin/src/main/kotlin/com/github/pwittchen/swipe/kotlinapp/SwipeActivity.kt Thanks to those guys, I make it right now! —————————————— 安卓上实现滑动检测比我想象的难 —————————————— What's challenging, what's useful —————————————— 从这本书得到三个链接 http://dataportals.org/ http://opendatamonitor.eu/ http://quandl.com/ —————————————— 轻车熟路后能做的事就变多了 一个人顶10个,还是不同行业的 https://yingshaoxo.gitbooks.io/university-notes/content/dc-stable-source-circuit-de-fen-xi-yu-ying-yong/er-ji-guan-de-te-xing-yu-ying-yong/diode.html —————————————— 加了这个群,不知有啥用 —————————————— Kotlin编程三板斧: 1. Google Java codes 2. 找 on_create,理解运行逻辑 3. 复制粘贴到AS,自动转成 kotlin codes —————————————— https://github.com/yingshaoxo/import_ffmpeg_test https://github.com/yingshaoxo/import_ffmpeg_test 好,依靠这些完成了我 kotlin 的第一次外部库的调用 —————————————— 留恋一张图书馆的coding好环境 —————————————— 前面讲了,差异是人类认识的基础 所以机器学习中首先就要选择、收集Data,而这个 data 不是随便选择的,而是要有代表性,要表现出事物的差异 —————————————— 谷歌的ML课程是这个套路: 先给一个视频作为总括和更人性化的讲解 然后用 documents 做细致的分讲 最后再出几道选择题叫你选择 —————————————— 学校的基础课程 通信那些 越来越难了 平时哪有时间学习ML啊 我尽量挤吧,在保证睡眠充足的情况下 https://yingshaoxo.gitbooks.io/university-notes/content/dc-stable-source-circuit-de-fen-xi-yu-ying-yong/er-ji-guan-de-te-xing-yu-ying-yong/ban-dao-ti.html —————————————— 我发现DNS tunnel连不上了 —————————————— @system357 —————————————— 果然只有谷歌才发福利 其他都是要收费的 —————————————— 系统整理完毕 网络配置完毕 明天开始继续 ML 的学习 —————————————— 信息错误,可能是上次有网,自动更新了驱动 不过这条命令是真好用: echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf —————————————— 用 Clonezilla恢复龙 系统成功复制整个系统盘 然后用上面的修复方法成功修复引导 最后发现把系统装在机械盘只是开机慢很多而已 —————————————— Best way to fix grub (linux引导): Try the following grub rescue > ls grub rescue > ls (hd0,msdos2) # let's assume this is the linux partition grub rescue > set root=(hd0,msdos2) grub rescue > set prefix=(hd0,msdos2)/boot/grub # or wherever grub is installed grub rescue > insmod normal # if this produced an error, reset root and prefix to something else .. grub rescue > normal Run the following after you successfully boot: sudo update-grub sudo grub-install /dev/sdX # where /dev/sdX is your boot drive. —————————————— 之所以中文不适合做详细的文档 是因为中文太具有概括性,容易在极短的文字内让读者迷茫 —————————————— 你说我会不会死掉 还是每科都好好学吧 —————————————— 不,想到就应该做到,那样我就可以在linux上用tensorflow 会方便很多 我应该只需要对盘拷 把Opps烤到机械盘上 —————————————— 下次把Kali放固态 Win10和Opps OS 各300G放在机械硬盘,剩下机械盘200G作为数据保存盘 —————————————— 还有,你登录时选择gnome 是可以直接进的,无需闭源显卡驱动 —————————————— 我知道怎么在一个小分区安装kali了 只需要一个ex4的分区挂载/,一个几G的swap分区即可 对了,我还得告诉你,kali2018出来了 —————————————— 买啥手机啊? 不买了 攒钱买 Google Pixel —————————————— 突然想到了 虽然大家的大脑储存都差不多 但不同人的内存与CPU是不同的,那可能就是人与人之间智力的差别吧(储存也还有固态与机械之分呢) 不过,别人用一天能训练出的模型,你用十天、一个月也可以啊👍 —————————————— 最后她又讲了 应该拿一小部分知识试学一下,以判定你该用多大的力度 (这让我想起了:试学一月,不收任何费用😂😁) —————————————— 最后得到 不同的学习速率有不同的steps得到最终目的 而得到合适的学习速率只能靠暴力(算每种速率的最优step),机器处理 人就算了,人是经验动物,很少有人能每次都用对力气在不同的可学物上 —————————————— 最后得出结论 Learning rate 过快不好,过慢也不好 和人类学习真的好相似 —————————————— 不对,这东西怎么越來密集? —————————————— 而 learning rate 就是指的每次前进多少x去得到最小误差 —————————————— 原来 gradient loss 就是一种通过寻找最小误差来画函数图的方法 —————————————— I like this explanation it's so vivid! —————————————— This course was so great! Loss is the penalty for a bad prediction. That is, loss is a number indicating how bad the model's prediction was on a single example. If the model's prediction is perfect, the loss is zero; otherwise, the loss is greater. The goal of training a model is to find a set of weights and biases that have low loss, on average, across all examples. —————————————— 看起来机器学习就像自动解方程机 —————————————— Fuck it again —————————————— Fuck you, mathematics! —————————————— https://ai.google/education#?modal_active=none Let's go —————————————— I don't know, maybe just try all different thing and find the better one. https://developers.google.com/machine-learning/crash-course/ml-intro —————————————— 买到假货,退货ing —————————————— 第二节学完 —————————————— 有个专业背枕真爽 这下可以减轻腰部压力了😄 —————————————— 睡袋到了,再也不用折什么东西 卷起来就跑😜 —————————————— 我买的乐视pro3手机到了 感觉非常划算,700元,双摄、双卡、64G储存、4G内存、可刷机、全面屏、指纹传感器 唯一不好的是你要和传统音频插口说再见了, type-c或蓝牙才是你能用的 —————————————— 还是没能逃过B站的魔爪 http://www.bilibili.com/video/av20093472?share_medium=android&share_source=copy_link&bbid=4C7690A1-D112-4E0A-9995-6B13786AEDB012230infoc&ts=1520004977237 —————————————— 感觉又回到了原始社会 隔壁一群傻逼的感觉 深夜玩游戏扰民 —————————————— 有时候想想服务器算几个钱啊,给自己剪一次头发 一个月的租金就有了 左黄右黑,左深右浅,左亮右暗 —————————————— 那你就是少男了 二等座 —————————————— 刚才在地铁 我说免费给后面几位买票 因为没法找零 结果一人塞给我10块😁 —————————————— 看到图片处理就不懂了 —————————————— 喜欢坐火车时靠窗的少女是我的菜 因为她们自视清高、曲高和寡,一般都有一定的知识储备和文化涵养 —————————————— placeholder and variables in tensorflow 充分体现了运算过程与data分离的思想 不过,直接建立function不好吗,非要封装一层 —————————————— 第一章看完了 —————————————— 越来越有趣了 正在介绍各种dataset Birth weight data, Boston Housing data, MNIST handwriting data, Spam-ham text data, Movie review data, and so on —————————————— 这样看起来 tensorflow 像 numpy —————————————— 很快就看到了我看不懂的词汇 Eigen decomposition of a matrix —————————————— 哈哈 —————————————— 正在火车上看 tensorflow machine learning cookbook —————————————— Tensorflow 应该改名叫 Listflow —————————————— 收拾行囊 明日启程 —————————————— http://5sing.kugou.com/yc/2273644.html 成品 5年之约 经历了太多事 —————————————— Wow Waves plugin MaxxVolume (TV Compression) is wonderful for master track compression. —————————————— http://conw.net/archives/74/ 我插,他们已经这么屌了吗 —————————————— 每30秒查询一次 选了最屌的课😂 —————————————— 花了2个小时写学校抢课的脚本 只能说 chrome 可复制xpath真是太爽了 —————————————— As for music You can't write a song at once You have to record your music voice as many as possible Then you can compose a song gracefully —————————————— 决定了,在(系统学习AI)维护服务器时,慢慢学会用 traefik 替代 apache https://docs.traefik.io/ 这样就兑现了 use Golang 的承诺 同时,维护那些 web service project,我们也用了 Javascript 和 Python 学习 Tensorflow 向 AI 的同时,我们会用到 Kotlin 做安卓 AI Application 最后完成任务的同时,我们也收获了快乐 最终,2018的任务会圆满完成! —————————————— https://github.com/lk-geimfari/awesomo/blob/master/languages/GOLANG.md 看得我TM想直接投入Golang的怀抱 —————————————— 让我猜一下,第三个时代应该就是程序AI化,用户傻瓜化,程序员上帝化 https://youtu.be/fCEHdyLkjNE —————————————— 讲到这里,我们要讲两个时代 1是石器时代:数据在内存和本地文件中交换,典型C++ 2是现代:数据以网络协议为媒介交换,典型Golang python 是把1和2结合起来的失败作品(不够反普通人类(不够严密)),也可以说是尝试之作 在两个时代中,设备不断在发生改变,人们围绕那两个时代的技术不停地为不同的设备制造软件 —————————————— OK I will look for it later Next time, 我应该在学新东西前调查一下它该不该学 In the early days of the Web, the name “Apache” was synonymous with “web server”. But NGINX was developed in the early 2000s and is steadily gaining in popularity; it’s already the #1 web server at the 1,000, 10,000, and 100,000 busiest websites in the world. —————————————— https://gist.github.com/paulmach/7271283 https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/install-and-run-go.html 经测试,go也可达到 apache 的速度 怪不得人们喜欢用 go 代替 python 的网络编程部分 —————————————— welcome back —————————————— 又搞砸了 升级 let's encrypt 的 bot 后 强制转到HTTPS,并不能访问了 最后干脆恢复原来的 000-default.conf 并删除新增的 ssl.conf 修复问题,现在不强制跳转HTTPS,虽然可能有广告劫持 —————————————— 不行,视频在线能让 MX Player 播放的还是只有 apache sanic 或 flask的静态 serving 都不行,只有 Apache可以让下载达到最大值,python的server只能达到几十k —————————————— So forget about others, just use wave tune, it could export midi file, too. —————————————— But if you can't see any waves plugins, make sure to re-scan it in manager https://support.native-instruments.com/hc/en-us/articles/210292945-Plug-in-Administration-in-FL-Studio-12 —————————————— https://www.youtube.com/watch?v=BBRDvCp2N1w Now, you would able to add effects to your audio tracks —————————————— https://www.youtube.com/watch?v=GBzLmfmkgtA Finally, now I know how to record voice in FL Studio. —————————————— 这个好 —————————————— 政治没学好的根源在于你没把宪法给被背了 用宪法答题没人敢说你是错的 —————————————— 后天就走了,买了睡袋、背靠、床帘、电脑钢化膜、乐视pro3全网通样本机 今天下订单,我去学校全到货就爽了,2号到,5号开学 两天搞定所有事 理床、装床帘、贴膜、刷机、配置网络 —————————————— https://vuejs.org/v2/examples/index.html vue 可以学,学会了可以和 sanic 一起做一些 bootstrap 做不到的动态 web app (sanic 生下来就是为了高并发的网络 API ) 至于 Golang,py可以做到的,何必用其他的,更多时候高级程序员遇到的不是语法错误,而是本身的逻辑错误 —————————————— 我一直觉得很奇怪 npm有什么用? 感觉安装了模块也没法用,不能提供 static service (或者说我真不知道怎么用) —————————————— 这些人把超人转化为有欲望的成人,还是不错 http://127.0.0.1:43110/15xit2EiY7mpnQAj482BB4TjFynAJYLuj5/?Post:612:DCPU字幕組(欧美成人中文字幕翻译)专题帖2018.01.17更新 —————————————— 25倍引擎动力 在山上飙摩托 于是想到,驾驶AI的 dataset 有现成的:高度 为了到达更高的地方,摩托只能选择它自己能跑的相对平坦的地方(同时避开大石头与树),绕弯实现目标 整个决策过程,完好地模拟了在任何时候摩托思考的问题(选能前进的路,避开其他车子与人) —————————————— 唉,别提了 玩了一晚上的 GTA 5 (用了 enhanced trainer 和 nice fly 两个基础script),主要是 make love,但我发现如果车辆不透明就没意思了。没找到透明车辆的方法 OpenIV 不想用,垃圾不绿色,太麻烦了 —————————————— 《实力搭讪(发生关系)》:  http://music.163.com/video/43C3FD202E4EA7D1901A28E04DA2521B/?userid=280429778 程序员每天只需要抽出10分钟时间去和妹子聊天 一年后肯定能找到女朋友 只是我太懒 —————————————— Bigger研究所的视频《一千块的矿泉水和两元的农夫山泉有什么区别?》: http://music.163.com/video/1EFCC4ACE1148AABAE7FEAE0BA3AC240/?userid=280429778 (来自@网易云音乐) 1. 这个视频确实做得专业,切镜、词汇啥的都没谁了 2. 为了一个视频,创建一个那么大的工作室,? —————————————— 成为大人 越来越觉得除了食物、水、房子、电、网以外的东西都没有意义 越来越不在乎别人的感受 精神世界越来越小 不,我不能成为那样的大人 —————————————— https://yingshaoxo.xyz/post/Sanic%20could%20take%20the%20place%20of%20Flask.html 我刚才把 Local_Show 用 sanic 把 flask 部分重写了一遍 也就是换成了 sanic 现在切换视频不会卡了 —————————————— 事实上我靠直播念了两个小时的 Crazy English —————————————— https://writingminds.github.io/ffmpeg-android-java/ Just learn how to train a tensorflow model is not enough, we also have to know how to use that model on a mobile phone, because that's the only way to make your work worth, letting people use it in daily life. —————————————— 等会儿想玩玩 B 站的直播 实名制😒 —————————————— 😢 我是bug小王子 已修复 —————————————— https://youtu.be/ZTeVZIZUVvE —————————————— https://youtu.be/Gj0iyo265bc 我竟然看懂了 然而第八课又看不懂了 https://youtu.be/LDRbO9a6XPU —————————————— I have heard 世界科技潮流是这样的: 计算机⇉网络⇉智能手机⇉AI(人工智能) —————————————— 这可能是唯一一次站在世界潮流之巅的机会了 上次智能手机的潮流我没赶上😭 —————————————— https://youtu.be/I74ymkoNTnw 决定了 在保证服务器程序运行的情况下 专心学习ML在接下来的一个学期 —————————————— 用易语言写了一个ffmpeg批量转换工具 看部电影后没准就把制作它的教程转好了 个人的感受是,易语言遍历数组真是太恶心了,字符串不支持\转义也是恶心 —————————————— good night —————————————— 我还在夜晚奋斗录视频 学习 tensorflow 新知识 —————————————— 写好了没人讲中文 本来还想测试下行不行的😆 —————————————— 感觉自己时间不多了 3月1号去学校 最多再多学一点tensorflow 为了保证在学校大脑退化得不那么快 创建一个英文群组是必要的 我马上写一个自动 踢 说非英语的人的 bot —————————————— Brain 这个软件还可以 —————————————— https://youtu.be/gpXpvRCuzFs —————————————— 对于垃圾麦克(耳麦),单声道录制比双声道采音效果差 —————————————— 好吧,确实是我搞错了,你的标签数据0123记得和 Species数组对上,数组从0开始 不然得到的结果就是错的 恩,我马上去录一期实作视频 —————————————— 笑死我了 用自己做的csv datasets训练识别正负数的模型 结果出来的结果与实际值完全相反,一点不差,我给正数它说是负的,我给负数它说是正数 不是我哪里搞错了就是tensorflow在逗我😂 —————————————— 遇到挫折不放手是一种态度 —————————————— Hi, guys This is what you gonna need to write your own csv file: import csv villains = [ ['hi', 'everyone'], ['but', 'you'], ['have', 'to'], ['keep', 'going'] ] with open('demo.csv', 'wt', newline='') as fout: csvout = csv.writer(fout) csvout.writerows(villains) —————————————— 如果说通过 一个人的身体对称度、皮肤光滑度、身高与体重的比、胸围、臀围、学历、资产减去社会平均个人资产 还可以判定这个人漂亮与否 在网上只能找到别人的身高,有什么用 初级阶段,好的输入数据太难找了 —————————————— 虽然不太想承认 机器学习就是一种人类学习 具体来讲就是学习一种相关关系 给你输入,得到输出 初级阶段,可能输入就是一两种简单的属性值高低,it is number But after that, 研究人员发现了把图片或音乐变成数字属性的方法,然后把它当成输入 而那种训练方法,它借助了神经网络的原理,有了 layer 的概念,甚至还能看到反向feedback的影子 只要这个训练的容器够大,计算力足够,把欲望或野心作为奖励反馈机制,超级机器人是肯定能做出来的,只不过需要一个正常人的成长时间(以年为单位) —————————————— Brainstorming! Can not think any of relationships that is formed by the number attributes, but an AI model need that datasets It could be my first project of deep learning —————————————— 绞尽脑汁也想不出有什么相关关系是由number属性构成的 还要有趣 —————————————— 我真想找个简单的csv数据库 自己训练一次 tensorflow model 不然感觉不会入门 —————————————— 看了 The walking dead season 8 Nothing has changed —————————————— 佩小姐的奇幻城堡.Miss.Peregrines.Home.for.Peculiar.Children.2016 完整的看了一遍,这脑洞应该不会有第二集了 —————————————— 基本满足需要,不知为何,latex不加载。。。当我没说 https://yingshaoxo.xyz/post/Basic%20git%20commands.html —————————————— 在我眼里,那个叫胡英杰的人格100%是个傻逼 一事无成 而我,虽然不傻,但处于智力阶层的底端 —————————————— Markdown 是按 github 风格渲染的,完美兼容 latex math notation 唯一不好的是我生成的文章列表特别丑 —————————————— https://github.com/yingshaoxo/ysblogger/blob/master/article/Basic%20terminal%20shotcuts.md 这下可以用了 —————————————— @system357 I still don't understand why this lambda has no argument, why it just give it a function? # Train the Model. classifier.train( input_fn=lambda:iris_data.train_input_fn(train_x, train_y, args.batch_size), steps=args.train_steps) https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions —————————————— http://nanshu.wang/post/2018-01-17/ 大姐姐真是鼓舞人心 —————————————— https://m.bilibili.com/video/av19756667.html https://m.bilibili.com/video/av19762051.html —————————————— https://www.ted.com/talks/michael_anti_behind_the_great_firewall_of_china?utm_campaign=tedspread&utm_medium=referral&utm_source=tedcomshare —————————————— 讲解完这篇文章 全程无废话 我占用了2.6个G —————————————— Also This woman is very optimistic I could learn many expressions from her. https://youtu.be/FTN_93Px-Qc —————————————— https://youtu.be/-mu3TYZ_udM —————————————— 如果口译,我相信我会有一个完整坚实的理解 在不熟的情况下分段没有意义 幸好录屏可以暂停 唯一缺的就是口语的感觉,需要再看一点别人的YouTube —————————————— 在思考下一步的计划 应不应该把这个口译出来 https://www.tensorflow.org/get_started/get_started_for_beginners 或者应不应该分段讲 —————————————— 我花了45分钟不含下载时间安装了 tensorflow gpu version on win10 最后输出的视频高达一个G —————————————— https://youtu.be/BMT7FMwOIKc —————————————— 今天下午和老同学在中学跑步10圈,感觉干劲十足 我们还可以再干十年! —————————————— 我觉得用第三方摄像头 从低侧面拍我 会好看很多 并且拍片要注意对光,光射向哪方,摄像头就要对向哪方 这和3D模型摄影原理类似,因为必须有光的反射,我们才能看清事物 —————————————— 我后期的稳定套路是 音量标准化 物理有损降噪 动态高精度降噪 mastering按频谱调高低音的音量 平滑压限 动态360°化声音 —————————————— 这是用上了waves 的360扩大音像效果器的视频 这样的话你可以只录制单声道的更稳定的声音,而后转成立体声 https://www.bilibili.com/video/av19705589/ 这事waves的下载链接:https://drive.google.com/file/d/1xBKBfpMMdwvnfhDejmQRFra_N3BJ2frl/view?usp=sharing —————————————— 音频算法工程师 2. 熟悉数字音频信号处理,熟悉模式识别和深度学习开源框架; 3. 音效算法开发或移动、音频内容分析、听歌识曲和哼唱识别实际项目经验者优先; 4. 编程基础扎实,熟悉算法和数据结构,熟练运用c\c++、python等开发语言; 5. 喜欢音乐,对音乐和音频技术的结合感兴趣者优先。 要不以这个为蓝本前进好不好? —————————————— https://hr.163.com/position/detail.do?id=526 说白了,我不喜欢这个东西 —————————————— 但我感觉后端运维技能是慢慢磨出来的 配合前端的需求,后端也会做相应的变化 而涉及到Python的后端开发,主要是 AI researcher,要求熟悉各种 AI 框架 要是我能看懂那些东西就好了 —————————————— 以后还要留心收集信息 把不需要学历的要求汇集起来,看看市场走向... 高级游戏运维工程师 工作地点 上海 工作职责 1. 负责B站游戏及平台的日常安全运维工作,保障业务的可用性 2. 负责对大型故障追踪定位,分析和解决问题,并制定后续的改进和规避方案 3. 负责制定运维规范和业务标准,梳理和优化工作流程,提升跨部门的沟通效率和服务质量 4. 参与平台或系统的架构设计和改造、容灾方案、瓶颈分析、性能优化、风险管控等 5. 打造技术驱动的团队氛围 职位要求 1. 5年以上互联网运维经验(Linux环境,1000台主机以上) 2. 精通Linux系统管理和内核优化,权限分级管理和安全审计,熟悉TCP/IP协议原理 3. 精通nginx、php、tomcat、elk、lvs等主流开源软件的配置、维护、调优 4. 熟悉mysql、redis、mongodb等数据库配置、备份恢复、性能监控和调优、以及高可用方案 5. 熟悉公有云VPC/ECS/RDS/EIP/SLB/OSS/IAM,以及CDN/ DNS等产品和服务,并有线上业务的实际操作和运维经验 6. 熟悉shell、python等至少一门脚本语言 7. 了解运维高容量、大流量、大并发Web系统的业务知识以及解决方案 有大、中型网站维护实战经验者优先 8. 有良好的文档撰写习惯,有一定的文档设计和排版基础 9. 有良好的语言表达能力,工作主动性强,具有团队合作和创新精神 —————————————— Great then, I would like to get further education on basic knowledge while doing useless work. Night! —————————————— As far as I see, if you want to learn English right, you should find an environment to give you a good place to release the power of English. https://www.khanacademy.org/humanities/grammar/parts-of-speech-the-noun —————————————— https://www.jianshu.com/p/fcad44753f38 https://file.yingshaoxo.xyz/ 这样的话,adm下载就可以有8个流畅的连接了 —————————————— 好伤心啊,服务器有8个G的东西并拿不下来 老是下到一半就挂掉 —————————————— 反正没人用我的项目,做那么独立干什么 不如让今后我经手的每一个项目都有 auto_everything 的影子 这样不仅能节省我大量的时间,同时也能激励我不断以实用为标准更新 auto_everything —————————————— 火锅底料家庭使用指南: 一定按使用说明来,一定要阻止父母加乱七八糟的东西进去,一定要阻止父母不按说明书操作 这样你才能吃到正常的火锅 😂 —————————————— 抱歉,由于我的无能,只能做到每次访问主页刷新一次 用了gunicorn,视频确实可以做到流畅切换了 —————————————— 唱吧可以免费创 全民k歌垃圾要收费 —————————————— 不知道多人在线k歌(k歌房)的原理是什么 准备做个调查 如果市场上没有,就自己做一个 —————————————— docker run -d --name aria2-with-webui -p 6800:6800 -p 6880:80 -p 6888:8080 -v /root/download:/data -v /root/config:/conf xujinkai/aria2-with-webui aria2 配合 local show 应该可以发挥其作用 那么 local show 需要做2点修改: 1. 每5分钟刷新扫描一次文件 2. 与 gunicorn 做集成 —————————————— Just look at this speed! It's wonderful —————————————— waves 音频套餐真是好用 等会儿我整理完看能不能发出来 —————————————— 快20岁了 心寒,还没什么建树 —————————————— 不过还是原本的物理引擎渲染出来的东西效果最好 —————————————— night have a nice dream —————————————— http://www.doyoudo.com/p/5001226.html 看完第一节,做出来这个: —————————————— Panning in C4D 平移 渲染框右上角有个十字架,拉动平移 —————————————— 然后活捉Windows上的ispring cam免费录屏软件 —————————————— pyautogui对DNF无效 —————————————— Sitting all day in front of Linux is kind of boring So my resting is to keep all day in front of Windows, play some games, do some designs, and in the end, sleep earlier. —————————————— 似乎只差 三方包导入 和 activity切换 我就学会安卓开发了 —————————————— 那个小圆圈好丑,挡住发射键了 —————————————— https://youtu.be/rqX8PFcOpxA 这待遇大概比网易云好吧 —————————————— 竟然没生气 —————————————— Good night, みんな don't forget we are in rest. —————————————— https://youtu.be/lfTwqw_gyKs 你们都应该臣服在她的石榴裙下😁 —————————————— 我觉得我会被打😂😅 —————————————— Great talks https://youtu.be/U8pBOsx--d0 There is only one way to go to Soft Engineering: follow your passions! —————————————— http://lesterbanks.com/2017/05/2-ways-cut-object-segments-c4d/ 大神们录视频和我等鼠辈完全不同 —————————————— 按照他们的说法,用 gunicorn 感觉 python 变麻烦了 不过还好以前用过 —————————————— 我说过我要做无用功,我就要做 跟着潮流走只会让人越来越迷失 相反,历史属于那些善于做无用功的人 —————————————— 思考 吓了我一跳,我以为可以直接把人声转成midi呢 but,如果它已经能实现这一步了,扒音会便利许多 meanwhile, 同样的原理,只针对特定的人声进行训练,人声转midi效果应该非常好吧 —————————————— 1. 关于 kotlin 的教程,谷歌上文字竟没有youtube视频多 2. 看完阿三的教程,写出来加载 math.yingshaoxo.xyz 竟然还是一片白... https://www.youtube.com/watch?v=Ag9paBWHU2I —————————————— https://github.com/channelcat/sanic flask 有个致命的缺点, 在客户端,如果上个视频请求没断开下个视频请求一上去,就会卡住... 不知道这个会不会好一点 —————————————— https://github.com/lk-geimfari/awesomo/blob/master/languages/PYTHON.md 感觉如获至宝,一次根本看不完😂 我大 Python 果然是无敌的 因为其他语言牛逼的包没我们的多 我们自带军火库 —————————————— http://click.pocoo.org/5/ This was also cool —————————————— https://github.com/bokeh/bokeh 这个是真的屌,直接生成动态数据html —————————————— TensorFlow (@TensorFlow) Tweeted: ⚙️🎹📝 Automatic piano music transcription, with Magenta! Check out the new project (w/ source code & model) 👇 https://t.co/kRpUJgzg6K https://twitter.com/TensorFlow/status/963186566867898374?ref_src=twcamp%5Eshare%7Ctwsrc%5Em5%7Ctwgr%5Eemail%7Ctwcon%5E7046%7Ctwterm%5E1 —————————————— 15天看完火影,把心智提升到了17岁 —————————————— For example, this guy is really cool —————————————— 有时候觉得别人的博客比官方教程更通俗易懂 https://www.lylinux.net/article/2018/1/24/38.html 他们的博客就是我的财富(不知你懂了什么) 我从来不记博客人的名字 但我能记住他们的真人头像,毕竟人记图快于记文字 那意味着在未来几周,我应该想方设法搞一张能让人眼前一亮的,又能一眼标识出是我的,头像 并且把他放在任何有我参与的地方 就像大神一样,就像政治领袖一样,就像... —————————————— https://www.youtube.com/watch?v=tYHBiNsEyxs nice 没鼠标建模真是费劲 —————————————— 看了 王牌特工之黄金圈, 发现没有 科幻和超能力 两大元素,真是看不下去 —————————————— https://youtu.be/tzLZkhLmacM 行,搞完自动运行,接下来就是写 Kotlin APK,用来封装我们的服务 不过在那之前,我必须看看火影 感冒好了😊 —————————————— https://music.yingshaoxo.xyz 我现在特别开心 突然发现启动程序根本不需要pkill python 因为端口被占用会自动退出😂 —————————————— https://www.jianshu.com/p/440fb300c2c6 本地 与 用Apache不一样 在apache里可以不设置 ws ip,直接转发后缀是 /ws/ 的网址到local ws server 另外,未知原因,docker 用不了,所以只能用最原始的方法...直接运行 —————————————— 搞定 https://math.yingshaoxo.xyz/ —————————————— 这东西花了我半年时间 我不应该放弃,这就是我以前说的全栈 做完了它我就可以毫无牵挂的做无用功 我就可以玩了,我就不用每天紧绷着神经跟随永远跟不上的互联网潮流了 —————————————— 看了接近80多个网页,改了近30多次 还是不行,我是菜鸟 —————————————— 感冒 头晕流鼻涕,当初没写 ws and wss 与Apache的笔记 现在搞不出来,头疼欲裂中 —————————————— 墙最主要的目的,不是阻挡你 而是瓦解你的斗志 把你与亲人、朋友隔开 体验无限的孤独的痛苦 即使你有你远方的朋友 但越是这样,越是要充满斗志、不畏艰难,同时向你远方的朋友问好 并说一句:“阿里嘎多” —————————————— 好像渐渐明白了点什么 火影中的每个人都是偏执狂 —————————————— Blog 被我弄坏了,不过测试成功! http://blog.yingshaoxo.xyz http://math.yingshaoxo.xyz https://www.digitalocean.com/community/tutorials/how-to-use-apache-as-a-reverse-proxy-with-mod_proxy-on-ubuntu-16-04 —————————————— 成为伟大的人物,克服的就是大人心理 你不能像大人一样畏首畏尾,没有一件事是蜻蜓点水能出成绩的 不下定决心在某一职业深耕,怎能有所建树? 怕付出是没用的,不能因为想保存以前付出得到的东西就停止付出 物质守恒定律规定了必须有付出才有回报 哪怕赌上变老的代价,(你不付出也会变老,时光不能倒流 这时小孩心理就出来帮你了:你还年轻就什么也不怕 —————————————— 我这个年纪,是决定方向的时候 需要从能做的事中选一个出来,成为未来的方向 急躁、不知所措、自不量力都会出现在这个时刻 最终哪项事业能让你踏实做下去,那就是你的路 Keep confidence in yourself. —————————————— 所以我也用上了 无限流量卡 WiFi 随便开,20G 开始限速 —————————————— 虽然理想很美 但看了看在线解析,对于内容收费 完全可以一人开vip,百万人共享 视频可以直链、倒录(录屏),文章可以复制粘贴 最后的结论是:没有怕麻烦的小偷,只有怕麻烦的用户 这样的话,卖用户隐私应该能赚得多一点(考虑到到处都是实名制,价值已经降低,况且用户的信息总有卖完的一天) 要不作游戏吧?坑到一个算一个,只要用户不开挂,就是各种永久、稀有、抽奖向它们兜售,用户会自己送钱来的 赚一两年就跑路,应该还不错... —————————————— 服务器仍是与用户隔离赚钱的必须物品,后端不灭 —————————————— https://github.com/rovo89/XposedBridge/wiki/Development-tutorial 完整地看了一遍 如果是账号制,从服务端讲,你不给我钱就不把你账号归入VIP 非vip就不提供服务 xposed作用不是特别大,只能利用一些既有漏洞修改本地的东西,比如 kill 广告 —————————————— 表示特别勉强地利用 crontab 与 export DISPLAY=:0; /usr/bin/python3.6 xxx.py 完成了任务 下一步是实战测试,one namespace --> many virtual host —————————————— 大概 in Python, __var 与 _var 的区别是前者只能被它存在的类调用,后者可以被同一文件的其他类调用 —————————————— he has never I have 似乎无数个成熟的老人的声音在我耳边回响,忘记坑爹的语法吧,记忆会帮助你做出正确的选择 语言的本质就是 复制+粘贴 ,别人说过的话,在同一情境下表达同一意图,拿过来就可以用 —————————————— 想利用一下Python的简洁来操作系统怎么这么难 —————————————— Through in this way, you could run a program with a normal user permission, 看起来还是无法正常操作gui程序 —————————————— Sorry 没经过测试的言论都是垃圾 似乎没用 —————————————— 漫威 has never let me down 看了雷神 three —————————————— 用 python 的坏处可能就是:写得太快而不注意跳了许多逻辑, 并由此产生非语法错误的bug 头疼失败,正在挽救中,要不看场电影再继续? —————————————— \opt\ usually describes as for optional add-on software packages source. —————————————— control + m or control + p 从virtual box切换到host 也算很方便了,我现在是里外一个opps_os,需要反复开关机的测试,还是virtual box好用 —————————————— 今天要把 auto_evrything的自启管理和keep_running写完 那样从此python script就可以直接从库上得到 super management 的功能 —————————————— 解决问题的七步法 —————————————— 创业与就业的老师的老公是专为商业公司开发管理程序的程序员,所以老师知道了我的事后给我打了高分;英语老师嫉妒我的才华,打了低分;铁道概括没交作业,低分;数学努力学习后能力太低,低分。 —————————————— 对于华为荣耀这种垃圾平板, 绿化无效 只有阻止运行才hold得住 —————————————— 墙国人用AI完全是个灾难 他们的智能推荐算法实际上做的事是:阻碍你的视野,缩小你的世界,一时底层、终身底层,让你永远无法看到真实的世界 —————————————— 那时依然出现了社会等级秩序 政治权力体现为控制能源、智力、稀缺金属 国家元首就是超级计算机与前任总统的融合体 由于变革是总体性的,所以没有特定的群体从中获得好处,大家的智力在原有基础上加了250,智力还是有高有低,智力差不变 只能说比上一代聪明了不少 —————————————— 到时人们终于面对一个两难的抉择 be man,or be super man(机械化人类) 前一种,人类开始出现异能,发现AI无用,有能量就有一切 后一种,发现自己就是机器人,还是要想方设法的去找能量,变相的劳动 可见AI社会不劳动就是一个空想 —————————————— 我们应该是最后一批被淘汰的职业 那时环境污染严重,可能只能承载几十个人 那几十个可能还是最聪明的人类 —————————————— 来来来,开始空想 我说以后的程序员会分成两派 1. 做自动化,用AI帮人们做现实世界的工作 2. 做娱乐,用创意帮人们制造各种各样虚幻的精神世界,以满足他们的工作都被AI做了的空虚 —————————————— 发现你的语文能力一点都没降低 厉害 —————————————— 看火影那么多集 感想就是:学过的不顶用的东西不要扔,和其他老东西或新东西融合,这样你就又多了一个新技能,同时变相的在不辜负自己以前努力的情况下舍弃了旧东西 这和今天一口气考完三科创新与批判网课期末考的思想一致 —————————————— 应该先把坚不可摧的 virtual host 弄好 再写客户端 —————————————— 任务达成 —————————————— https://stackoverflow.com/questions/13837978/apache-multiple-sub-domains-with-one-ip-address https://httpd.apache.org/docs/2.4/vhosts/examples.html#page-header 这样我心里的石头就落地了,可以节约一大笔服务器开支 —————————————— 我认识的几个国内外大佬(别人不认识我) github 上都是真人头像 你说是不是成为能找工作的大佬都得那样做 —————————————— Root permission sudo chmod -R 777 your_folder Normal permission sudo chmod -R 755 your_folder —————————————— https://codepen.io/vsync/pen/czgrf 用这个配合 jquery 特有的 $('xx 组件').css(key, value) 实现了良好的动态 css 我指解决了 inputbox 随文字伸缩的特性 —————————————— 似乎是这样 —————————————— 问题一用property()解决 —————————————— 还是他的代码最能让人看懂 —————————————— About Programming First, a few notes about programming, based on personal experience. My original career path was science, and I taught myself programming to analyze and display experimental data. I expected computer programming to be like my impression of accounting—precise but dull. I was surprised to find that I enjoyed it. Part of the fun was its logical aspects—like solving puzzles—but part was creative. You had to write your program correctly to get the right results, but you had the freedom to write it any way you wanted. It was an unusual balance of right-brain and left-brain thinking. After I wandered off into a career in programming, I also learned that the field had many niches, with very different tasks and types of people. You could delve into computer graphics, operating systems, business applications—even science. If you’re a programmer, you might have had a similar experience yourself. If you’re not, you might try programming a bit to see if it fits your personality, or at least helps you to get something done. As I may have mentioned much earlier in this book, math skills are not so important. It seems that the ability to think logically is most important, and that an aptitude for languages seems to help. Finally, patience helps, especially when you’re tracking down an elusive bug in your code. I like the way that man speaking. —————————————— https://rszalski.github.io/magicmethods/#access https://docs.python.org/3/reference/datamodel.html#implementing-descriptors Python 的这个特性看起来好强大,我有点晕 —————————————— 64. 越是无法使人得到提升的东西,在网上(或实际生活中)传播越是广泛、迅速。 祖先留下的选配偶或传宗接代的基因被人利用了,被用来夺取目光和疯狂敛财。 Genius is less, so useless mass is big. They filled in our life. —————————————— 把kotlin上的音乐按钮 结合 local show 结合 webview 结合 math_chat 再加上永不停止服务的python docker 自启 script 应该会生成一个比较好的 android app 但谁能让我动起来? —————————————— 让Local_Show显示普通文件列表,这样我又少了一个ftp项目 —————————————— 要想让math chat(https://hub.docker.com/r/yingshaoxo/mathchat/)真正实用,我应该解决两个问题 1. 把最新的18条消息存在硬盘而不是内存,这样服务器宕机后消息还在 2. 输入框自动伸缩 —————————————— 我的脑子也会计算,成天看B站、抖音、直播,我的智商又不会增加 还不如看动漫,至少还可以有冒险的感觉 宅一代应该都有冒险的愿望 但很少人有财力、能力做到 —————————————— 你看美国的影视,会偏向于物质、利益,贴近生活的东西。 你看日本的动漫,会有梦想、励志的成分。 而你看中国的影视,既不励志,也不贴近现实。 今天一气看了约100集火影忍者,3倍速 —————————————— 目的很简单,以后linux上的设置、操作 全用Python一键完成 —————————————— 给 auto_everything 加了新特性,现在可以批量转 ffmpeg 的视频了 https://github.com/yingshaoxo/auto_everything/blob/master/demo.py 并且用上了 nohup 只不过一次性开太多子进程你的电脑可能会受不了 —————————————— 行,我觉得我需要更脚踏实地一点 get current directory: os.getcwd() —————————————— 最后一版视频就讲讲我如何再次失败学习AI好了 一定得紧抱 Google 大腿 完事后去看看服务器,域名荒废,mathchat荒废,酷安不收我的应用 老虎不发威,还真当我是病猫😡 —————————————— 第三方教程全都失效了 只有谷歌自己的东西能看,现在… —————————————— @system357 原来 /etc/systemd/system/syncthing@user.service 里的 @** 是用来指明谁来运行服务(比如@root, @yingshaoxo),那这样的话,我们的全自动 Python 脚本就可以对我们的 GUI 程序进行操作了 https://yingshaoxo.blogspot.com/2017/11/how-to-set-syncthing-on-server-correctly.html —————————————— 像android sudio, v2ray, ss这些东西,只要放在 /opt 里 除了/opt 备份好对应的主页文件夹 换完系统直接拖进来就可以用,有绿色软件的感觉 —————————————— virtual box的文件夹共享死活开不起来 所以只能按照 kali CookBook 的方法设置好 host-only 和 Nat 网络(后者没外网,只能两个机器间访问) 现在需要想办法自动本地同步文件,虚拟机是opp_system普通user,syncthing 应该没问题 —————————————— 主要是Kali不稳定,同时vim python没有代码颜色,一片白心里难受 —————————————— set apt http proxy vim /etc/apt/apt.conf add this Acquire::http::Proxy "http://127.0.0.1:8080"; v2ray 更适合拿来当 http proxy 下东西,给浏览器用会经常卡住 —————————————— http://www.bilibili.com/video/av18996822?share_medium=android&share_source=copy_link&bbid=23F7F87E-66F6-4C1D-9917-533D6870E76B31056infoc&ts=1517468635497 —————————————— 用AU自带的加速算法做的,我觉得加了音乐毁视频 https://youtu.be/GQCfeGf45w4 —————————————— ffmpeg -i in.mp4 -crf 18 -pix_fmt yuv420p -c:a copy out.mp4 可以用这个把任何不支持Windows Video Editor的视频 转成 受支持的视频,-crf 越小越清晰,0为无损但无法播放,1可以 —————————————— https://github.com/yingshaoxo/auto_everything 人生第一个 Python Package!!! —————————————— Solved this problem, just put that script in 系统UI菜单自带的自启管理即可 —————————————— In normal user crontab -e add this to last line: */1 * * * * /usr/bin/python3 /home/yingshaoxo/Codes/Python/auto_everything/test.py The python script will be running every 1 minute. You can use it to run any non-UI program, like v2ray But when it comes chrome, you'll see this error: (google-chrome:4097): Gtk-WARNING **: cannot open display: As for systemctl, forget about it, it even can't run v2ray so how to manage current GUI program with python? it a critical problem! —————————————— 忘了我玩侠盗飞车会头晕想吐 …看来我只适合4399小游戏(创世兵魂) —————————————— 激动得我一晚没睡 gta也下好了 —————————————— I also notice if you work at midnight, China GFW won't limit the speed of Ubuntu mirrors. —————————————— jedi-vim works well VirtualBox works well! Nvidia works well Chrome works well Kali style screen record and capture works well Even self-contained Chinse input method!!! —————————————— Kali UI + Ubuntu server Just amazing combination! —————————————— https://system76.com/pop I can tell you how well it is! —————————————— 3. Basic condition is very important fast internet, stable system, healthy body take it slow and make it right —————————————— 2. Practice makes perfect, not talking or imaging Open that damn air conditioner, not staying on bed —————————————— 1. A person's ability is limited within a certain period of time I can not wish to dominate the world —————————————— I need to calm down —————————————— https://fossbytes.com/most-beautiful-linux-distros/ 浪费时间ing —————————————— gnome3好丑 看来kali基于它做了很多优化 —————————————— https://ubuntugnome.org/ 他们两个相遇应该会迸发出无穷的生命力 http://clonezilla.org/ 原来主机系统也是可以备份还原的,直接备份整个硬盘 所以我在淘宝买了两个 16G U盘 —————————————— 仔细一思考 kali真不适合当主系统,太多bug了 搞了一上午,既没声音,又无法使用virtual box 我应该去找个gnome linux试用一下 —————————————— https://program-think.blogspot.com/2018/01/nine-years-blogging.html?m=1 为什么他的思维能力一直没下降过?难道这就是传说中的专业程序员? https://program-think.blogspot.com/2009/01/1.html?m=1 大部分人从来没有【明确】地设定自己的发展目标,每天都是得过且过。等到几年过去了,才发现自己这些年啥也没学会,还是老样子,然后就感叹时光飞逝、岁月如梭。 —————————————— 花了两个小时写自动化systemctl service Python script 结果发现 ExecStart 里填 /usr/bin/python3 无法执行程序,不加3就可以 但是 Python2 的 subprocess 没有 .run() 这不是坑人吗?写好的模块又重新想思路? 不玩了,回到win10继续下gta —————————————— https://www.sunnyhoi.com/how-to-crack-wpawpa2-wi-fi-passwords-using-aircrack-ng-in-kali/ 正在跑邻居家的WiFi密码,用 kali 自带的 rockyou.txt passwdlist 要跑37分钟 网上还有7G和33G的密码库,我觉得这个东西还是要考虑收益的,如果邻居家是百兆网,这样跑是可以的。但很明显,这不可能 果然邻居家的密码很偏,没跑出来 —————————————— 做事倾注灵魂系列: http://www.bilibili.com/video/av11694484?share_medium=android&share_source=copy_link&bbid=23F7F87E-66F6-4C1D-9917-533D6870E76B31056infoc&ts=1517139138050 可以说是非常厉害了 http://www.bilibili.com/video/av15758576?share_medium=android&share_source=copy_link&bbid=23F7F87E-66F6-4C1D-9917-533D6870E76B31056infoc&ts=1517140137954 —————————————— 人生就像写小说 如果每次都能用上以前埋下的伏笔,就能荡气回肠、绝处逢生 —————————————— https://m.bilibili.com/audio/au214360 —————————————— 我知道我垃圾,各方面能力尤其是逻辑思维能力急速下降 但是不说明原因就离去我是很心痛的啊 —————————————— 一个大神走了,伤心 大概当我独当一面的时候,就只剩我一个人吧 —————————————— 想做的事好多 1. 把应用上传到酷安 2. 给服务器防御(ddos的)能力 3. 研究下破解 wpa2加密 WiFi 4. 用Python实现电脑自动化 5. … 但我的电脑被win上的磁力下载霸占着,什么也做不了😳 —————————————— 准备下载gta5养老 玩腻了就学JavaScript👍 magnet:?xt=urn:btih:52afb643744cd57030763420d7d2b45bf4d8d2d3&dn=GTA%20Grand%20Theft%20Auto%20V.iso&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969 海盗湾的种子,不知道要下多久。 —————————————— update again —————————————— v2ray 自带 http proxy 我真是老糊涂了 —————————————— 几句话就被我说服了😁 主要是家里来了亲戚,太吵了 —————————————— login with normal user apt download polipo get .deb file for offline installation —————————————— https://github.com/v2ray/V2Ray.sh OK, turn to v2ray successfully. —————————————— run tweaks on kali, you can change the desktop theme to dark feel comfortable now... —————————————— https://gist.github.com/yingshaoxo/4b367731bffb2a1efb006d11fac5fd00 update instruction. Put your mouse on Kali screen left-up corner, has a surprise! —————————————— https://www.kali.org/news/kali-linux-repository-https-support/ apt 也要 HTTPS —————————————— 幻觉 应该是中病毒了 1. 清华镜像 2. nvidia 驱动 3. 垃圾软件 4. root权限的chrome 所以我重装了系统并用cd live chroot 做了这件事: echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf 问题解决,不打算装驱动,也不打算装更多东西 除了翻墙必需品和Android Studio 其他都放 virtual box 好了 —————————————— 等会儿加个判断,任何带字母的信息都不翻译。 —————————————— C 可能是我的另一门语言,看情况,如果学校计算机考试不允许单报 Python 的话 只能硬着头皮上 虽然感觉如今 c 除了3d游戏没什么用 —————————————— Java 注定会被 kotlin 淘汰,我不学垃圾 —————————————— 注意看这张表,出现两次的必学 成为高手每个都要会 —————————————— 谷歌翻译 无限制版 —————————————— 我的超级小雅又回来了 这一次可以好好学英语了 —————————————— 你好 —————————————— Set python3.6 as default python: echo "alias python=python3.6" >> ~/.bashrc source ~/.bashrc —————————————— https://www.learn2crack.com/2014/08/capture-screenshot-record-screen-using-adb.html https://www.pyimagesearch.com/2015/03/09/capturing-mouse-click-events-with-python-and-opencv/ OK, based on these two things, we may create a android screen on computer, then you can control your phone with it. 突然发现 vysor 不清真,要收费... —————————————— 还有,录视频最大的功用不是装逼 而且直观的展示github或其他项目 —————————————— You can use the adb shell ( > 2.3.5) to tap your android screen: adb shell input tap x y —————————————— 否定掉 无法做到后台常驻,一切就失去了意义 再说我也不想玩QQ飞车 —————————————— 看了卓百林的 摩登时代 不知道是一个悲伤的故事还是happy thing —————————————— https://thehacktoday.com/installing-nvidia-driver-and-fix-boot-loading-and-freezing-issue-in-kali-linux/ 自从刚才装了 nvidia 驱动 和 apt remove lightdm 后, Kali 再也不无缘无故闪退了,画质也提高了 —————————————— 对, 垃圾QQ —————————————— 1. 自从有了 Kotlin, 你可以这么绑定一个按钮事件: button.setOnClickListener({ view -> doSomething() }) 2. 这样申请一个权限并delay wating for user // import android.Manifest if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.WRITE_EXTERNAL_STORAGE), 999) Thread.sleep(7 * 1000) } —————————————— Solved, after open a ticket —————————————— https://groups.google.com/forum/#!topic/kivy-users/I47UKutCViU 看起来我可以用 kivy 解决这个问题 —————————————— 我还以为可以逃过实名shit呢! —————————————— 怎么弄?我是中国人诶 —————————————— https://youtu.be/-0N3Q0T7Hqk 这是先剪辑,后加速音频,再替换音频的效果 还行,就是太麻烦 —————————————— 垃圾premiere ffmpeg的变速音质比他好多了 所以有两种方法解决 1. 先ffmpeg加速,再剪辑 2. 先剪辑,后加速(淘汰,突然发现ffmpeg加速不是万能的,视频清晰度损失太大,只能用来加速声音) —————————————— https://youtu.be/4FB36OQcMXY 接下来需思考是用 手机按键精灵 还是 adb + python 做安卓的识图部分程序 我的目的是玩手机QQ飞车时自动播放网易音乐 —————————————— 这域名白买了 —————————————— 我好烦,网站因为红色的字无法访问 不明原因 —————————————— How to set global variable in kotlin 1. put this on top: object GlobalVariable { var mp = MediaPlayer() } 2. use it everywhere GlobalVariable.mp 3. so you won't have to worry about open too many MediaPlayer at a same time —————————————— http://sapandiwakar.in/android-media-player-lock-screen/ 我想吐了 —————————————— 然后还不回我话😢 —————————————— 这孩子 删了账号后又开了新号 被我找到后又把头像删了(并设置为别人无法看到他是否看了消息) 不知道在想什么 —————————————— 牙关颤抖 搞不懂该死的 intend 与 某个点击事件 与 android notification 之间的关系 —————————————— 不发言就和白拿人家东西一样 —————————————— 卧槽 You can see 10.0.2.2 as host 127.0.0.1 in Android emulator 浪费我时间 https://developer.android.com/studio/run/emulator-networking.html —————————————— https://www.jianshu.com/p/621faba56ba5 —————————————— 我用 adb sideload 把 lineageos 刷上去了 等会把教程写出来 —————————————— 我给我妈买了个米4 回来root+xposed+多删了点东西 卡米 充电等待蛋疼中... 还好之前刷了三方recovery 不过我不确定手机有没有解锁 —————————————— 3倍优酷无广告火影就是爽 —————————————— https://youtu.be/zqa2aBHTMHg 个人有先天的缺陷,若是女生,吸引力会大增吧 https://youtu.be/6hXL713d_cw —————————————— https://drive.google.com/open?id=1XKhdo7GbvHwfEV2Hsl9kmVZUPClUTt5a 这么好用的东西,给你们一份 我就不拿网盘存随处可得的系统镜像了,破解软件才是刚需 —————————————— 算了,既然不熟悉,还是专注于声音处理吧,我把头像变小就行了 https://m.bilibili.com/video/av4444053.html —————————————— 还有,我发现老美不热衷于美颜 以至于我连关键词都找不到 或者说,老外偏重于后期处理,而不是傻瓜式的美白 http://www.doyoudo.com —————————————— https://github.com/tingxins/520Linkee http://www.tk4479.net/joee33/article/details/52187292 http://www.it610.com/article/4848562.htm 竟然没有一个可以直接在 windows 上美颜拍片的东西,全是该死的安卓软件 —————————————— https://www.youtube.com/watch?v=wgxJ9dTjL0c 原 kali 自带的 cam record looks like a shit, I mean you even can't add effects to it. 所以我得试试手动加头像到视频 (You can't record directly into Premiere. You can record from your webcam into something like OBS though and then just import the file) —————————————— http://blog.csdn.net/lvshaorong/article/details/52470012 这玩意儿回学校前一定得测试一下 搞不好就有无限流量用了😂 —————————————— 请各位放心,我自有分寸 我做的每一步,都是为下一步做铺垫 我们一定能做出伟大的项目,我们一定能成为超级大神(super man) —————————————— 花了4个小时想搞明白如何让kotlin得到一个给定范围的随机整数 结果放弃,直接 copy + paste ,用 Java 现存代码 —————————————— 破解版格式工厂挺好用的 2333 —————————————— 有了上面的招数,视频质量提升了好几个档次 —————————————— https://youtu.be/aWQC_Z7JAWs I love you guys! —————————————— http://creativedroplets.com/audio-tracks-premiere-audition-cc/ Just watch that youtube tutorial, it's very useful! —————————————— 这样看来多核心,大内存,大SSD还是有好处的 你可以给一个虚拟机很多核心,然后给虚拟机里再装虚拟机,你才不用担心任何系统问题,快照多,看谁不爽就删谁 —————————————— 走了一轮,没解决 不过插上耳机又有声音 这下我得小心了,以后每录一段视频,都得检查有没有声音 没有就需要立刻补录,烦死个人了 —————————————— 有种想把电脑砸了的冲动 kali没声音,各种fix教程都没用 —————————————— 札心了老铁 录了几个小时没声音 白说了一口流利的英语,讨厌后配 —————————————— Oh my godness, I have spend 3 hours to just write a txt file to android sdcard with Kotlin. 😂 Very impressive —————————————— http://music.163.com/song/406475394/?userid=280429778 这首歌竟然没有把呼吸声去掉,我一直没注意到 —————————————— http://music.163.com/song/3406918/?userid=280429778 —————————————— 长大后人出现的两个明显变化: 1. 思维能力的降低 2. 迫于生活,凡事偏向物质利益,即向钱看 —————————————— 幻想代表梦想 音乐代表激情 技术代表道路 —————————————— 我主要是想把幻想、音乐、技术结合在一起 —————————————— https://youtu.be/btnuUUHjKBw 拍片不易,且行且珍惜 搞了一天 —————————————— 还是要看 你的选择,如果平均比特率,几分钟就导完了 —————————————— http://www.phoenixos.com/ 你想给老式机装一个Android System吗? —————————————— 真吓人 一分多钟的1080p视频剪辑完,渲染导出要2个小时🙊 —————————————— 接下来得看剪辑师有多牛逼了 —————————————— 录视频 花了两个小时做基于易语言的mp3播放器… —————————————— 通过 格式工厂 解决了这个问题 转一下,所有东西都正常了😳 不管了,现在开始给 Kali 装虚拟机,再安装 Win10 😋 —————————————— 怎么可能知道时间 我做一个任务要20分钟 —————————————— 反正 Windows 越来越恶心了😳 —————————————— 感觉非常奇怪,那样的话 premiere 一加载 kali录的视频就闪退 —————————————— 不行,参数无法调对 Kali 只提供了 h264 编码 这玩意儿就是无法在win10播放 没准试试Windows升级? —————————————— https://youtu.be/B1A1UoXC5kI 我跟你说 一点都不方便,就算我参数调对了,我还是得重复开关机往返与 win 与 Kali 就为了一个破视频,不值得 等会儿试试新电脑开 虚拟机 win10 卡不卡 —————————————— 最后还是用 ffmpeg 合并降噪后的音频。。。 —————————————— 先不说这个 Kali录频出来的东西除了Kali,其他都无法打开 上传后可以看 但我要用Adobe系列降噪啊 —————————————— 突然看了看 海尔兄弟 觉得比现在垃圾国产动画好太多了 新一代人自由、科学的思想被压抑成啥样了? —————————————— https://www.jianshu.com/p/1f094c970042 —————————————— 看到搜索引擎上类似的东西一大堆,一点兴趣都没有了… —————————————— http://blog.csdn.net/lj402159806/article/details/53967339 本来打算昨天晚上起来搞事情,结果睡过头了 白天吵啊 —————————————— 太久没写代码了 怀念什么都不懂的时候,随心所欲,想到什么就写什么 —————————————— 好像是什么cpu虚拟化 可以在主板设置里开启的 —————————————— 活生生把我憋回Linux , 感受美好和我的世界我做主的感觉😂 —————————————— 今天花了一整天装 Win 上的软件,不得不说 win 是非常的垃圾了,,,, 各种破解,各种破解软件找不到,基本全部用垃圾百度云,就连谷歌上的英文网站也是各种坑,骗你下病毒推广软件 目前为止我就找到了一个好用的win破解下载站,需要翻墙 但见于群里有位 zd423 的大佬,我还是不发出来为好 —————————————— 向着 kotlin 进军 —————————————— https://www.jianshu.com/p/afc3069d8904 —————————————— 我是 kali + 固态 + 8G内存 + 4核CPU + 2G 独显 —————————————— 恩 —————————————— 总算可以用独立显卡运行emulator了。。。快得一逼。。。 —————————————— 家里的旧机器用上了 Tampermonkey + IDM , 百度云下载速度快得起飞😀 —————————————— 我买了一套男性化妆品,还没收到 但我已按耐不住心中的激情😘😄😄 —————————————— https://www.youtube.com/watch?v=uSKMrcBqRj0&index=7&list=PLGXfJorQS7_PTQe8wt4ZMMx1oLPDuPAJ7 —————————————— 我深深地感到 如果我们想让 linux 或 Python 发光发亮 GUI web 化是必须的 举个例子,如果我们要做一个支持latex的思维导图工具 除了web渲染最方便快捷外还有其他选择吗?Definitely not —————————————— 还是被窝里舒适😄 —————————————— The main idea of this shit is: you have to 用虚拟机同时开n个系统,并把它们的网络以某种特定的方式连接起来,这需要n个CPU内核和一堆内存。(在你构建的系统中,需要有一台是 Kali,其他都是受害者) —————————————— Clearly, the greedy strategy doesn’t give you the optimal solution here. But it gets you pretty close. In the next chapter, I’ll explain how to calculate the correct solution. But if you’re a thief in a shopping center, you don’t care about perfect. “Pretty good” is good enough. Here’s the takeaway from this second example: sometimes, perfect is the enemy of good. Sometimes all you need is an algorithm that solves the problem pretty well. And that’s where greedy algorithms shine, because they’re simple to write and usually get pretty close. —————————————— You can choose subnet you like. Just similar to iodine. —————————————— What is host-only network The host-only network can only talk within the host and among other devices connected to the host-only network. It cannot communicate through your Ethernet or wireless networks. This setup is extremely critical to our testing environment, as we do not ever want to expose our testing hosts to the outside world, as they are very vulnerable and will be hacked rather quickly. —————————————— 要是我以后 大概会这样想:飞机都嫌贵,还回去干什么? —————————————— 看来是做不完了 超疲惫下,脑袋可利用率为0 20小时还不能睡觉,因为不是结伴而行。要是我的新电脑消失了,我还是挺不开心的。 —————————————— 无聊的旅途需要这个,我想 —————————————— 刚刚对着我车桌对面的女孩写了两句话在 Adobe 画板 (并给她看了) 1. You looks great! 2. Nothing else. —————————————— 明天下午5点要开始体验贫民火车20小时的脏乱差环境 希望我能活下来并做完该死的网络选修课 —————————————— 抖音在过度消耗音乐的力量 缺失完整性的音乐终究不完美 —————————————— @system357 的确,歌会听腻 我指我的网易歌单 —————————————— 我们这一代有人在大学才开始化妆,而现在,新一代从小学就开始了,我自愧不如啊 —————————————— 男士化妆指南 0. 洗面奶洗面,去除多余油脂(可忽略) 1. 把防晒霜或保湿霜均匀抹于脸上 2. 用手指或大粉刷,把粉底 点抹于缺陷处或均匀地刷在全脸 3. 把 透明碎粉 刷脸上,如果有的话(避免油腻的感觉) 4. 刷顺眉毛后,用灰色眉笔把眉形 由中心线向两边扩散勾勒出来,再刷均(最好能提前去掉明显的边缘杂毛) 5. 鼻顶一条线如不够亮白就用手指推画一条高光粉直线,两边 鼻翼和其他阴影部分 则用暗一点的中间色与最深色相混合的粉作为阴影(所谓不整形产生的轮廓当然是利用人们对光与影的感觉制造出幻觉啦!) 6. 弄好发型,喷好香水,let's go! https://youtu.be/rwKgNH4jaAM (如果宅在家咱们还是用美颜相机吧,别瞎折腾了) —————————————— 完蛋了,看了一会儿抖音,觉得化妆技能挺重要 化腐朽为神奇 —————————————— やめて! 压灭的 (会)压灭的 一群原始人钻木取火,火才刚好升起来,一群人就凑过去取暖,发火人大叫到:“(会)压灭的!”;或者欲火、激情才上来,请不要把它压灭,也用这句话。因为我们在警告对方,这种生命的激情会被压灭;后来随着这个词在紧急时刻的频繁使用,变成了“不要啊”恳求的意思。 —————————————— がんばって! 干吧,爹! 有两种含义,干活或干人,看你怎么理解,反正都是叫你加油干。 —————————————— ありがとう 啊,你,给 duo (捅的方言是 duo) 啊,(对于)你(呀),给操(我的权利) 谢谢你,为了报答你,只能给你操了 —————————————— That's what we need —————————————— 你不懂,安卓上 Chrome 也会自动断线,ADM就不会 —————————————— Chrome的下载真是弱爆了,国内各种网盘,动不动就下载暂停 Win下用 idm,感觉好多了 —————————————— 下学期应该上床帘了 免得大家看见我压力大,从而做出一些让我压力大的事。 顺便防个光,我在黑暗中生产效率最高。 —————————————— 大学就是一个垃圾聚集场 但这里也是社会模拟场 这里有的只是不择手段,达成目的罢了(作弊、摇尾讨好) 所以我努力的重心还应该是不在意垃圾们的目光,去出其不意地想出解决方法,提升自己 随波逐流还不如现在就去跳河 —————————————— 看了《我的英雄学院》,感觉很不错,很燃 —————————————— 为什么BT下载多年没速度? 根源在于人之自私。 素质太低,不能正确认识到“我为人人,人人为我”的利益关系。 简单讲,就是一群乌合之众,活该被奴役、被压榨! —————————————— This time, finnaly I make it right: https://gist.github.com/yingshaoxo/1d5cb8c239cf5b9982751122b023d1d7 —————————————— Text to Speech in python2: # apt install espeak # pip2 install pyttsx # Just for python2 import pyttsx engine = pyttsx.init() engine.say('Hello, yingshaoxo!') engine.runAndWait() —————————————— 室友的电脑在我指导下安装上 deepin 结果 store 打开闪退 解决方式比我的简单多了,直接在deepin设备管理器安装 nvidia 和 Intel 驱动 —————————————— 总算考完了 接下来唯一让我不爽的是 要坐20多个小时的普通硬座火车 ® —————————————— Javascript 画图可以这么优雅 —————————————— 思考人生 —————————————— 如果真能和某所学校取得联系 并免费学习,还是不错的 先不讲学没学到技术,能锻炼口语是肯定的 —————————————— Seems like I fucked it up. —————————————— I don't know what I have done... —————————————— Select a Subject: Computer Engineering Computer Science Information Technology Network Administration Network Security Software Engineering Web Development It's a difficult choice. —————————————— 自从 ssh .rsb 复制到新电脑 和 set up polipo 后,我觉得工作环境已经架好了 我个人最大的缺陷应该是执行力不够强,不够专注,容易开多线程 这样是很难做大事的 —————————————— 其实也就是感到心寒而已 https://www.staticgen.com/ —————————————— 如果我现在要做博客 那肯定是玩真的 譬如防ddos攻击,那是必须的 不过在那之前,我得选个好的博客模板,最好基于Python的 实在不行自己来一遍(造轮子) —————————————— https://www.typingclub.com/sportal/team-18748/program-left-hand-typing-2.game 一口气做了78节左手课 —————————————— Practice makes perfect. —————————————— If you wanna increase your speed, first you should focus on your accuracy. —————————————— 这一点真的是严重阻止了我流畅地工作😒 —————————————— I just watched this: https://www.youtube.com/watch?v=sZWMPYIkNd8 —————————————— OK, as you can see, it didn't add python to back end web. —————————————— https://www.jianshu.com/p/0fa301d892ab 简书除了不被搜索引擎收录外还好 可以直接在编辑框上粘贴图片数据,自动上传 —————————————— 看那些东西如此蛋疼,其实我只需要知道怎样在安卓开发中调用三方SDK或别人的项目 我脑袋是一片空白,如果稍微知道一点,我们还可以继续玩安卓开发 —————————————— 不能用 pyautogui 就很伤心了 —————————————— 最近出了这个,我在想能不能弄个 auto py https://www.coolapk.com/apk/com.stardust.scriptdroid —————————————— https://www.washingtonpost.com/news/world/wp/2018/01/07/feature/in-china-facial-recognition-is-sharp-end-of-a-drive-for-total-surveillance/?utm_term=.36d9c0f83474 技术是把双刃剑,看来以前电影中所说的天眼监控,就快成为现实了 —————————————— - Logout : Just like locking your smartphone. - Shutdown : Completely power off your system viz. PC, laptop. - Restart : Power off and then start again. - Suspend/sleep : Pur your computer at very low power state, screen off but everything else is on but at very low power so that you can resume your work where you left off but if battery die you loose all your unsaved data. - Hibernate: suspend to disk; includes power-off, looks like shutdown. Basically, everything in the Ram is copied to swap memory and system shutdown completely. when you start your computer back everything copies back to Ram and you continue where you left off. —————————————— 心情不好 proxychains 在 kali 上用 apt 报错 这样我怎么能流畅的免费上网呢? —————————————— 所以我又回到 chrome 大家庭了 因为火狐对插件支持太差,grammly 出错, vimff 谷歌双开窗口bug 等等 简直不能用,没 chrome 稳定 —————————————— https://gist.github.com/yingshaoxo/4b367731bffb2a1efb006d11fac5fd00 —————————————— 突然发现用 alt + 1 or 2 or 3 就可以切换 terminal tab —————————————— 惠普笔记本的唯一不好之处在于 pg up and pg down 在最右边 然而 kali 的 terminal tab 切换只能用 ctrl + pg up or down 虽然我不想用 terminal tab, 想直接 alt + tab 切换, 然而 kali 不允许,它把所有 terminal 窗口放到一个 tab 标签,需要用方向键选择 —————————————— Kali's iodined is very good, won't auto stop if you don't use net. —————————————— For example: https://extensions.gnome.org/extension/1112/screenshot-tool/ —————————————— Gnome is great, you can even use it on kali. https://extensions.gnome.org/ —————————————— https://www.jianshu.com/p/64befa59414c update —————————————— 我去 黑客也有竞赛 http://blog.rookiehacker.org/2017/07/01/fourteenth-day-in-Beijing/ —————————————— 我主要想基于这个域名 不同前缀用不同服务器做不同的功能 —————————————— 买好了 —————————————— 不管是李阳的 don't be afraid of failure 还是马云的 我们不能保证一定会成功,但我们一定会失败,只有去学习别人是如何失败的,我们才能避免失败 还是 AI 中的 强化学习 都强调了,我们必须不断尝试、不断失败,才能学到正确的 pattern (模式) —————————————— 上次最多开了70多个页面 —————————————— 我挂的日本ssr 换成美国的就好了 —————————————— 你是推荐我买xyz 但目前它搜索不了 —————————————— https://gen.xyz/register 无法搜索域名 —————————————— 这么便宜吗? —————————————— https://gist.github.com/yingshaoxo/9b027ace63cf9982fe22320539bb6c95 接着可以开始买域名了(先复习,不挂科要紧) —————————————— 我操! 我被学校办了信用卡!!! http://bank.jrj.com.cn/2017/07/05070422698196.shtml —————————————— 感觉无线键鼠就是一个失败的设计 别人都是把东西越做越集成,比如触摸屏 —————————————— 我跟你讲,只做节奏鬼畜是不够的 必须有歌词、要rap 然后把音轨导出来修音+调整 实在不行你可以把音轨传给我,我来处理 —————————————— http://www.bilibili.com/video/av3958416 1.5倍看完一次,vegas 调音真心方便 —————————————— 我就是不装 archlinux 因为上次下了一个,一进去就是黑框框,不友好😂 —————————————— Fixed! You don't have to do so many things, just: apt-get update && apt-get dist-upgrade —————————————— 目前的问题是 reboot or shutdown now 会卡住 绝对是 nvidia 显卡太新的缘故 —————————————— 至于修复win10的引导: 0. 全基于 BIOS 1. PE 用 DISM 恢复某个盘的win10引导 1/2. 去那个win10玩玩 EasyBCD 也可以 2. 去你安装好的另一个盘的linux,用 update-grub —————————————— 刚才晃了晃电脑,发现kali屏幕旋转了 不可思议!一个笔记本要啥重力感应 —————————————— 没有更好的了 —————————————— kali才是人用的系统 way to fix: 1. ctrl+alt+F1 to terminal 2. apt-get install lightdm (choice lightdm) 3. reboot —————————————— https://forums.kali.org/showthread.php?31763-Grey-screen-with-working-mouse-after-login 看起来是显卡太高级(奇葩)了 —————————————— 但不好用 —————————————— Linux mint的界面几乎和lubuntu一样 —————————————— You can use DISM to mount and service Windows images, including Windows image files and virtual hard disks. The DISM tool comes with Windows and is also distributed as part of the Windows Assessment and Deployment Kit. In addition to configuring Windows features and settings, you can use DISM to repair a Windows image, both offline and online. 类似于 chroot 在实在没办法修复Windows引导时,用它 —————————————— 我需要一个支持新电脑的 linux —————————————— lubuntu也是各种异常卡 —————————————— 试了下安装kali到固态,不行,登录进去一片灰 —————————————— 我搞的双系统,lubuntu 装固态硬盘,win10 pro 装1T机械硬盘 从此以后我要开始飞一般的体验了😂 —————————————— 给固态硬盘装上lubuntu 1秒启动😂 —————————————— 好吧,等我挂科了再去找找资料 明天下午我的新笔记本可能就到了 买的这个,普通套餐2 http://m.tb.cn/h.A7wf9i —————————————— 人生如此多娇,专业课学得想吐,关键是没英文资料(资源) https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/response/yi-jie-dian-lu-de-quan-xiang-ying.html —————————————— 便宜,一个月才6元 —————————————— 看了 《天才枪手》 国语版 没加速,可以说是非常好了 —————————————— 没用,开放WiFi自带免疫 —————————————— 再也不拿那台垃圾电脑搞安卓了 可把我愁死了,一个操作要等10分钟 —————————————— 很好奇怎样用别人的包 https://github.com/Scalified/fab/blob/master/README.md —————————————— Android studio install SDK failed? Going to /opt/ and using chmod -R 777 on all the android directories. —————————————— 玩了一晚的手机版QQ飞车 毒瘤 —————————————— http://music.163.com/song/514765154/?userid=280429778 看MV,发现郭采洁有一种病态的美 —————————————— 凡事都问个为什么,你会成为哲学家 凡事都说个是什么,你会成为政治家 凡事都思考怎么办,你会成为实干家 我是哲学家😁 —————————————— n=-1 times = 0 while True: if (4*n+7) <200: times += 1 n += 1 else: break print(times) —————————————— 大学真累,还不能强制控制住自己利用空余时间继续学习 Programming or AI stuff —————————————— 作为一名伪程序员 学得快,忘得也快 几乎每隔几天就觉得学校的东西都忘得差不多了 要不是有自己做的电子笔记看,早玩儿完了 —————————————— 多开几个tab,在 Kali system 上照样卡得要死 换电脑是必须的 —————————————— https://github.com/wifiphisher/wifiphisher/blob/master/README.md Very useful if you know how to build a fake login page I'm gonna use it to get some accounts in the near future —————————————— https://github.com/gfwlist/gfwlist 还是不要抵制现有的东西比较好 —————————————— 机器学习的大训练策略叫做 总 中间过程的 data 叫做 分 最后结果 叫做 总 但两个 总 是不同的,前一个是表面的总,后一个是难以理解的混合了太多细节的 总 所以语文上的 总-分-总 构架恰恰勾勒出了人类学习的基本模式 —————————————— 由 deep learning 的训练过程又可知,我们光有智力容器是不够的,需要有个更高智慧去指导你,教你训练策略和收集合适的 data 这个更高级智慧在当代,往远了说是社会,往近了讲是父母 如果没有这个更高级的智慧做指导,结局就像“狼孩”,有智力容器也没用 —————————————— だいじょうぶ 带(了)胶布的 带胶布了吗?带了,所以不用担心,没问题的 —————————————— おれ 我来哇 我的哇 我的话 你要问我的话,我是yingshaoxo —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/integration/goes-deeper.html —————————————— 懂了 把 x-2 视为一个整体,我们需要它分之一最大,所以它必须为正数,在x>=2的情况下,x越小越好 和极限不一样,极限只有0是无穷小 —————————————— 我把它分出来 1 + (4/(x - 2)) 难道不该是分母越小,整体越大? —————————————— When you failed, dried, tired, and can't figure out the answer of a problem, all you need to do is: sleep. Try to do it again after you waken up. If still can't find the answer, maybe Google or your friends will help you. —————————————— 库多的深层次原因是用的人多 用的人多的深层次原因是大众化、简单易懂、接近自然语言 大众化、简单易懂、接近自然语言的深层次原因是充满人文关怀、内含文科思维、与日常生活接轨 —————————————— 域名和主机的区别是,域名一旦开始,就不能更改 —————————————— 另外,训练神经网络需要大量的时间 要想节省时间就得基于别人现有的模块训练 由此得出:Learning is a time consuming progress. 那些SB说别人天赋高、学得快其实是一叶樟木,没看到别人的基础 —————————————— 生活越来越无聊了 专科生的学习也不是那么 easy 啊 —————————————— Advanced Package Tool (APT) (apt) —————————————— Browser Exploitation Framework(BeEF) Use BeEF, you can get almost everything about user browser as you can get in local. —————————————— BurpSuite is designed to be used alongside browser. Burp functions as an HTTP proxy server, and all HTTP/S traffic from your browser passes through Burp. —————————————— 哦 —————————————— Dog 你在公司做测试时完全不考虑安全性吗? —————————————— 70多元一年,是属于贵还是便宜呢? —————————————— 就是这种智力训练的不确定性 导致人们把智力说得玄乎其玄 什么智力先天论, CaoNiMa, 都是放屁 —————————————— 然后还应知道 过多关注琐碎的细节会造成 over fit 只看表面又会有 data 不足,训练出垃圾的后果 —————————————— 类比深度学习和我个人实际学习 学习好坏主要取决于数据的选取和训练策略的不同 容器大脑(tensorflow)大家都一样 拿英语来说,疯狂英语是非常好的data set,准确的包含了应用英语的本质,所以能有比较好的训练效果 —————————————— 垃圾tk 在考虑要不要自己维护一个付费域名,开始做博客等web app —————————————— 本质上就是类通俗化自然语言 —————————————— 我们喜欢Python的首要原因不是因为它简单 而是因为它拥有更多的文科思维、大众思维在里面 它不像其他的SB理科思维语言一样,没有生僻的不接地气、不与主要交流语言接轨的词汇和“句子” 如果有人认为经典不是给普通人用的、傻瓜式操作,那你就别用苹果或其他智能手机了 😏 —————————————— https://linuxconfig.org/how-to-install-latest-firefox-browser-on-debian-9-stretch-linux 安装了Firefox新版,挺流畅 —————————————— Kali installation, It's all about choice. -1. format your disk using PE system, we need a clear disk, or something will going wrong 0. use refus to make USB driver 1. just to be safe, use MBR based mix mode 2. use dd mode to defend Wi-Fi firmware missing (iso file belongs to Windows, and Windows is bad on drivers) 3. if you can disable secure boot, you can use UEFI in installation, else just use BIOS 4. if you failed, try more option in -1 and 3 step. 5. links may help https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/ https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed https://wiki.deepin.org/index.php?title=Repair_Boot https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux —————————————— Finally install Kali successfully! —————————————— kali可以直接用手机的网络 这样以后搞免流方便多了 —————————————— 高数没有高中和初中的基础真是难得吐血 要是有疯狂英语那样可以囊括小学、初中、高中所有基础性知识的教程就好了 —————————————— 😭 他们就是这样阻止我变成大神的 Deepin无障碍安装成功 —————————————— Whatever, let us listing to a song http://music.163.com/song/523249569/?userid=280429778 —————————————— Well 你的意思是这个 list 里的电脑都可以买? https://www.coreboot.org/Supported_Motherboards —————————————— 准备下个 deepin 再看看具体情况 —————————————— 我 rm 也提示没权限 —————————————— https://bbs.archlinux.org/viewtopic.php?id=182978 最后一个对话可能是解决之道 但我看不懂 —————————————— ?? —————————————— 我在那个文件夹尝试创建文本 结果vim提示没权限 即使sudo + root —————————————— 一个都没有 —————————————— How? —————————————— 稍等,我还要重打一遍上面的代码再进chroot —————————————— 到 grub-install 报错 —————————————— https://forums.kali.org/showthread.php?36601-UEFI-How-to-repair-kali-linux-grub-dual-boot-with-Windows-10 —————————————— 我就是一步步来的 USB driver to end 最后一步 报错 —————————————— 我就觉得奇怪 deepin都能装,kali还不能? —————————————— 我之前装完Windows后再装deepin就提示我…不能安装双系统,所以当时我就只装了Ubuntu —————————————— 对 我只知道在F12出来的boot界面关那些东西 然而并没有那个选项 —————————————— 有心理阴影了,一看到grub-install,我就知道我这垃圾笔电只能安装Ubuntu 和 Windows —————————————— 这么好的系统我用不了,真是遗憾 —————————————— 做一下总结: 0. linux启动盘制作用 Rufus 1. 没网驱的PE系统无用 2. 能与手机直接连接的U盘是你以后应该买的U盘 3. 不能 disable secure boot 的笔记本 和 锁 bootloader 的安卓手机一样,统统不能买 —————————————— 由此看来,锁 boot 的笔记本也是垃圾,不能用 http://www.ruanyifeng.com/blog/2013/01/secure_boot.html —————————————— No matter how I try, errors always goes in there. 就像我没有 disable secure boot 一样,但我主板确实没有选项得到禁用那个 —————————————— UEFI is essentially a tiny operating system that runs on top of the PC’s firmware, and it can do a lot more than a BIOS. It may be stored in flash memory on the motherboard, or it may be loaded from a hard drive or network share at boot. —————————————— In 2007, Intel, AMD, Microsoft, and PC manufacturers agreed on a new Unified Extensible Firmware Interface (UEFI) specification. This is an industry-wide standard managed by the Unified Extended Firmware Interface Forum, and isn’t solely driven by Intel. UEFI support was introduced to Windows with Windows Vista Service Pack 1 and Windows 7. The vast majority of computers you can buy today now use UEFI rather than a traditional BIOS. —————————————— BIOS is short for Basic Input-Output system. It’s low-level software that resides in a chip on your computer’s motherboard. The BIOS loads when your computer starts up, and the BIOS is responsible for waking up your computer’s hardware components, ensures they’re functioning properly, and then runs the bootloader that boots Windows or whatever other operating system you have installed. —————————————— 明明 live mode 就可以运行 不知道谁做的 SX 设计,硬盘安装那么麻烦 —————————————— 估计是 Kali 安装时需要稳定的网络支持 学校只有我手机的无线网络,这不就出问题了吗 —————————————— 烦,一夜一天了 还没装好 —————————————— 主要是kali的各方面配置比较好,合我的胃口 再加上,唯一不需要合作的事似乎只剩下hack了 —————————————— 即使看了这个也没用:https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/ 竟然要自己找 firmware —————————————— 为什么在虚拟机里装机很简单,到外面就难了呢 还没装好😞 —————————————— U盘少就是烦 搞到现在 还没装好 —————————————— USB安装Kali各种错误 目前还没搞定 快要疯了 —————————————— Watched 《Corpse Bride》 How sad the ending is! 2005年能做出这种动画还是不错。 —————————————— Backup my data now. Prepare to install Kali system. Ready to a new world: penetration. You can built your AI system, but I can crack it and use it on my own purpose. —————————————— http://www.bilibili.com/video/av17456296 —————————————— 学了一波 bash script, learned how to use parameter #!/bin/bash run() { pkill python3.6 nohup python3.6 app/app.py & } docker_run() { pkill python python /usr/src/webchat/app/app.py } pull() { git fetch --all git reset --hard origin/master } if [ "$1" == "run" ]; then run elif [ "$1" == "docker_run" ]; then docker_run elif [ "$1" == "pull" ]; then pull elif [ "$1" == "" ]; then echo "run docker_run pull" fi 语法严得一B, [] 必须变成 [ ] 才能用,外面的括号与表达式需用空格分开 —————————————— Feature building failed 修复了 textarea 高度错误的问题 取消插入 /text{} 的功能 —————————————— https://youtu.be/9_KMVu0ePOM 1.5倍速合适,俞敏洪对战SB官僚主义学校领导,北大也不是个好地方啊 —————————————— https://jsbin.com/vayoso/1/edit?output 解决这个问题 接下来要让输入框随行数自动增高 —————————————— 高档老式玩具而已 没什么技术含量 —————————————— 学校又报名全国性的 Robot 比赛 买了一批机器人 我应该会参加 目前我正在看 RQ-HUNO 这种 robot ... 说实话,老型号,不支持 Python,不爽 —————————————— 已用快捷键 Ctrl + c (chat) 和 Ctrl + m (math) 构建 /text 和 $$/begin 插入 目前正寻找一个方法在插入文本后把编辑框光标移到中间(似乎很难) —————————————— Sorry That was just my mistake 上一次代码构造错误,应该把替换 /n 到
的这个功能永远固定到 web 渲染层面 我们数据传输时尽量 keep data being raw —————————————— 遇到了严重的 flask character escaping 与 HTML 不兼容的问题 比如 flask 对 /n 的处理是令人失望的,在 HTML 上显示
, 却不真正换行 如果扯上 JavaScript ,更复杂 所以我需要时间理清它们之间特殊符号的转换关系 —————————————— 我们的初心是让知识传播更便利(廉价、开放) So, let's do it! —————————————— PS: 做中转是不能逼其他平台升级的 —————————————— 正当我要动手时,我又在思考,是保持通用性做信息中转好(短期内 Telegram 和 QQ 以及其他平台收益大) 还是直接暴露其他聊天平台的不足,直接做我们自己的平台好(这个在长期看有好处) —————————————— 可以,但那要等我寒假换电脑再说 —————————————— 你再看一眼我上面的需求 —————————————— 突然发现右击 chrome 文件夹,可以选择全部打开 —————————————— 我觉得浏览器差不多也该升级了 应该有书签组这个概念 有时候,做某个特定的工作,比如写gitbook,数学需要打开一系列网站,电工需要打开另一系列网站 不让用户劳累于一个个打开网站,就需要书签组这个概念,一键打开多个网站 —————————————— 根据我多天的跟踪测试,即写数学笔记 发现要想真正使 math chat 变得实用 我们还得自动在消息前后添加 /begin {align*} 和 /end{align*} 并且添加插入 /text{} 的快捷键 —————————————— https://github.com/pandao/editor.md/blob/master/README.md 有了这个可以秒杀简书 —————————————— 如果 pydroid3 可以安装这个就好了,真正的通用型安卓自动化 无聊的思修课,形势与政治 —————————————— 原来 pyautogui 可以直接找图,完全秒杀按键精灵啊 —————————————— http://www.bilibili.com/video/av17298476 这腿卖得好 话说舞蹈早就变成了一门卖腿的艺术 —————————————— I love math, math love me too. —————————————— https://tools.kali.org awsome tags —————————————— 我只是比较好奇 像 DNS tunnel 这种东西我为什么不能早点知道呢 究其原因,还是资讯源太少,能力太low 我可以猜想,每次 kali system 加一个新软件,就代表一个新漏洞 也许我们可以从那里得到一些信息 —————————————— "严格意义上来说,proxychains不算自动的全局代理,有没有像Proxifier这样,开了之后自动让所有启动的程序都走系统代理呢?答案就是redsocks。" 哦,原来redsocks有这个功能 —————————————— http://www.williamlong.info/archives/5184.html 可恶,不会自己找妓吗 就是这群人害得程序圈没女神 —————————————— 对于服务商来讲 他们只能用一种方法来屏蔽这个,就是断开长时间未认证的机器 然而由于普通用户很难在短时间内完成WiFi验证 所以这个“长时间”至少要10分钟 对于我们来说,够了 接着就是不断换机器标识的问题,easy —————————————— https://yingshaoxo.blogspot.com/2017/12/use-dns-tunnel-to-get-free-internet.html —————————————— DNS的问题,不用53默认端口,加上iptables的转发解决问题 有线网不能用,无线网80多k —————————————— 我是指服务器启动 iodine 后,服务器无法连接外部网络 那样的话就没办法架ss了 绕过网页验证后只能访问服务器有什么用… —————————————— 哥 DNS tunnel 打通了,可以访问到服务器内网 但是每次服务器一启动 iodine就无法访问外部网络 我是基于这个搞的 https://www.rawidn.com/posts/how-to-use-dns-tunnel.html —————————————— Use aptitude installing package will give you better experience. —————————————— 优雅的流氓绅士,代理死神黑崎一护 冬天穿西装不穿保暖衣,露出前胸膛 —————————————— SVG is a scalable vector graphic. It is part of the HTML5 specification. It can contain text, images and vector content. SVG works in all modern browsers, making it ideal for providing a consistent desktop and mobile viewing experience across devices. 我把 pdf 转成 svg 后得到一堆网页,没用,我还以为 svg 是一种图片格式呢 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/voltage-and-current-rule-in-circuit.html 看起来 Khan 学院的电路图就是用 circuitikz 做的 只不过它是矢量图,不会模糊,我是在线编辑器渲染再截图 在线不支持导出图片,只支持导出PDF 那个pdf里的好像是矢量图 —————————————— 下了 spy camera, 准备长期奋战制作室友游戏粗口鬼畜合集 不回击就和平,一回击我要让它们体验极客的攻击力 同时也提醒我没能力就没引战 —————————————— 看了2部哆啦a梦剧场版 对于对抗SB室友游戏噪音有奇效 —————————————— B站联通卡国际版免流 然而没什么用,多看一会儿就腻了 —————————————— http://www.bilibili.com/video/av17275391 听说不会娱乐,效率会很低 我必须得放松一下提升效率和学习积极性 —————————————— 也有可能它没有在本地渲染,我看了下它的HTML Source 发现它用的svg矢量图 怪不得在国内网情况下,它网站无法显示电路图 —————————————— \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{circuitikz} \begin{document} \begin{center} \begin{circuitikz} \draw (0, 0) to [R, l=$yingshaoxo$](0, 3) -- (3, 3) to [L, l=$SB_{ys}$](0, 0); \end{circuitikz} \end{center} \end{document} http://mirrors.ibiblio.org/CTAN/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf 需要对照着学习 —————————————— https://www.sharelatex.com/learn/CircuiTikz_package 原来我学的是英式,而不是美式图标 —————————————— 然后我发现 Latex在 Linux 上的分支根本无法安装,或者说安装步骤和难度超过可忍受范围 造成一个结果,我只能用它提供的在线编辑器写 circuitikz 语法 —————————————— 完全没有耐心手画 然而无法“表示”就无法学习,你懂的 —————————————— 真的非常非常想知道 Khan 学校的 电路图是怎么渲染出来的 —————————————— 有时真的感觉是编程自学能力在支撑我的高数、电工、English https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/integration/use-formula.html —————————————— Now I understand https://www.mathsisfun.com/calculus/integration-by-substitution.html —————————————— 第一类积分换元法真难理解 —————————————— 作为一个伪程序员 我真是觉得那些人有问题 所有的数学知识为什么前后不衔接呢? 难道真是要有一个特别牛逼的人才能把所有知识都串起来吗? —————————————— 我是乐于助人的好孩子😁 —————————————— 在图书馆遇到美女的可能性比教室大多了😂 —————————————— 图书馆才是学习睡觉写代码的好地方 没有傻逼的干扰,学得好睡得着 —————————————— 虽然我不觉得像我这样的人有多大的生产力 但我们拥有异于寻常的坚持力 每人做一个程序,积流成河,必能汇聚成大海 —————————————— 感觉 GTK 的整套设计都不合理,因为没成功安装上wxpython 因为整套 API 系统太复杂而不适合普通人操作,所以 GTK 平台上的好UI程序不多 —————————————— If you really don't know what exactly a version of program is, and you need to install it, use * For example: apt install gstreamer1.0* —————————————— Great power comes from great willingness. —————————————— 写书(或教育)成功的关键在于以文科生的语言风格(或思维能力)写理科生的内容。——— (喜闻乐见又有意义) —————————————— 好难 用Unity开发3D游戏步骤好多 —————————————— C# 2017趋势上涨的原因 荒野求生 —————————————— 每次都感觉在学校编程能力会急速下降 似乎总有傻逼在旁边打游戏并发出噪音 —————————————— 走走走 转战手机和web开发 MD,电脑不能随身带,手机还不能吗? 然后为了fun,还得学学游戏开发,构建自己的3D世界,顺便把计算机科学 gragh 那部分知识过了 —————————————— 烦透了每次都添加swutchy规则 明明我95%的时间都在浏览外文网站 I should set default proxy to ssr. —————————————— http://www.jianshu.com/p/493dc2f30d40 —————————————— 一个好的 graph 库应该包含三方面 1. 基本UI,像安卓界面一样,方便新手 2. 点阵系统,像pylab一样,方便熟手自己操控界面 3. 粒子系统,方便游戏开发 —————————————— 然而 python 的 graphs 引擎(kivy)真是烂到爆 完全感觉不到可以任意绘图的自由感 —————————————— https://github.com/jwasham/coding-interview-university 我可能进入到了 Graphs 这个阶段,路走了一半,不能半途而废啊! —————————————— https://github.com/Khan/KaTeX I'm feeling good about this project —————————————— https://github.com/Khan/tota11y Khan 专用 web 渲染库... —————————————— 那些能开发出粒子系统的人真是太屌了 —————————————— So definite integral just 函数曲线对应的面积 —————————————— 0 is not positive —————————————— one interger in common, in another words, 3 interger is different😕 —————————————— Install pip3.6: curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6 —————————————— 一个建议 继承并超越vim 如今图标与按钮不计其数,我们为何不训练个 classifier 专门找屏幕上的图标或按钮,并像vim一样画个框标上字母供你点击 具体的和上面那个程序一样,一按 control + f 就用 opencv 截一张图,然后调用 Google 识图 tensorflow package,接着的流程和上一段一样。 —————————————— sudo apt install keynav Run keynav, and activate it by pressing Control + ;. h : select the left half of the region j : select the bottom half of the region k : select the top half of the region l : select the right half of the region shift+h : move the region left shift+j : move the region down shift+k : move the region top shift+l : move the region right semicolon : Move the mouse to the center of the selected region spacebar : Move the mouse and left-click escape : Cancel the move 除了颜色有点丑,没什么不好,屏幕再大也只需按10下 我记得我以前做AI暴头时也是用的这个方法 —————————————— 原来一个 dict 也可以用 `+=` 然后这是一个统计词频的好方法 —————————————— 讲得真细致 —————————————— 原来我是可以直接在图上随便摆文字的... —————————————— http://music.163.com/song/86363/?userid=280429778 https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/integration/indefinite-integral-formulas.html http://music.163.com/song/2007819/?userid=280429778 I always think it's good as long as I hear. —————————————— http://docs.sympy.org/latest/modules/integrals/integrals.html Quite impressive. —————————————— 要是我像对你们一样面对社会 我可能已经死了几百回 —————————————— A bit of curious about how machine slove 积分 if I give it a derivative function. —————————————— 所谓非理性就是一套利益决策系统developed by natural 所谓理性就是一套利益决策系统 nature designed, but you have to develop —————————————— 今天老师又讲了积分 我很想骂娘 他们就是在做机器一样的事情,10秒出答案 我5分钟都不知道发生了什么事 —————————————— indefinite integrals 不定积分 就是已知导数,反求函数 —————————————— 传统的手机APP开发已经变得没意思 应该注重于调用第三方高大上SDK 比如在安卓上后台找图(AI向),实时画框 —————————————— 其实搞了这么多,你不觉得按键精灵也挺好玩儿的吗? 在Linux上可以用 pyautoGUI —————————————— 好了,接下来的任务是 平台化 ,把 webmathchat 和之前的 kivy chat 结合起来 把 asyncio 作为平台中枢,web chat、telegram bot、kivy chat 都作为客户端,它们通过平台中枢共享同样的信息 (docker先放一边,如果不是image套image,就太大而不适合开发) —————————————— 网站不用JavaScript也不行啊 明天写,我也不是不会 感觉JavaScript和Python都是在互相抄袭 —————————————— 明天的任务 0. 区分http和https决定连ws or wss 1. 没网不自动跳转刷新 2. 整理代码并上传 3. 根据心情决定要不要写此次https的教程+心得 —————————————— 根据下面的东西,成功配置好wss 可检查,https://mathchat.ml (用了国外服务器,国内的搞了半天实在是不行) https://www.google.com/amp/s/abarre.wordpress.com/2017/02/01/apache-2-4-and-websockets-wswss-with-wildfly-9/amp/ —————————————— https://kg2.qq.com/node/play?s=gV8sYzgVExbMFg3D&shareuid=609b9b8620283382&topsource=a0_pn201001006_z11_u26635549_l0_t1512821627__ 所谓装逼,大概就像我现在做的事一样 —————————————— 可能只是为了向以前的同学装逼吧😂 —————————————— 对呀 我的用户不是国内 而是数学家和程序员 —————————————— OK I'll try —————————————— 这个端口是在 A记录时填 还是 ? —————————————— 但主机商会阻断连接 😳 —————————————— fuck —————————————— 像 http://www.80s.tw 这样的网站真是做得非常谨慎和坚挺 表面上是用迅雷种子,实际上自己拥有一个超大的主机,存放了所有视频源文件 如果你下了它官方的安卓APP,你就会发现这一点,1.2M一秒的直连下载 ( 当然,这也说明它的高超之处,可以保证种子的下载速度 唯一的缺憾是这种方式成本太高,需要在网站投放大量的广告 ) —————————————— 配置成功(根据https://www.vioan.eu/blog/2016/10/10/deploy-your-flask-python-app-on-ubuntu-with-apache-gunicorn-and-systemd/) 现在主要的问题是 web-sockets 的 ws 链接似乎不能建立在 https 之上,是 web-sockets 快过时了吗? Mixed Content: The page at 'https://mathchat.ml/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://mathchat.ml:5678/'. This request has been blocked; this endpoint must be available over WSS. —————————————— https://mathchat.ml/ 尴尬,不会配置 Apache 2 看起来好像不是允许个端口那么简单 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/derivative-and-differential/function-analyzing-in-theory/second-derivative.html 要是电路图可以通过编程手法实现或利用标记语言渲染就好了 —————————————— Android 5.0.x (SDK21) Android 5.1.x(SDK22) Android 6.0.x(SDK23) Android 7.0(SDK24) Android 7.1.x(SDK25) ARM (普通旧的 Android 手机都是这个架构) X86(使用 Intel 处理器的是这个架构) ARM64(使用 64 位 ARM 处理器的手机,例如骁龙 810 及以上) —————————————— 还有这里的 all() and any() 配合 filter () 省很多事呢 —————————————— 我们竟然可以表示复数 directly —————————————— 用不了标准端口可以HTTPS吗? —————————————— 什么叫标准端口 —————————————— Interesting —————————————— Requested name 101.236.28.129 is an IP address. The Let's Encrypt certificate authority will not issue certificates for a bare IP address. 这就是套路,竟然不支持纯 ip,然而国内主机不支持域名绑定 事实即证明国内学生云主机没法用 只能拿来做APP的服务端或者忍着恶心去买个国内域名再做个备案 —————————————— https://www.logcg.com/archives/2921.html 为什么别人这么厉害,我却连 Apache 或 Nginx 怎么用都不知道 —————————————— docker random 350首 歌 我这边弄好了有1个G,不敢上传 放在最后做吧! 接下来我们的任务是完成HTTPS链接,不能再让中间商欺负投广告了😁 —————————————— Sometimes, .git folder is annoying. https://stackoverflow.com/questions/28079872/how-to-add-all-files-directories-except-a-hidden-directory-like-git-in-dockerfi —————————————— Python 的内涵是跨平台 + 简单高效 没用的东西都会淹没在时代的洪流里 —————————————— https://github.com/murlokswarm/app 其实 python 的UI可以这样搞,弄什么 native gabage 直接和 html css javascript 融合 —————————————— 而游戏的精髓就是频繁与用户实时交互 如果 pylab 可以绑定热键,我用它就能写出游戏 —————————————— 比如定义一个小人 如何让小人跳起来? 像素整体上移 如何让小人自然下落? 像素随时间按重力规律下移 所以真实情况下,类似3D游戏,你还得精通物理 —————————————— 当你真正开始做游戏时 你会发现你不是在做静态控件,而是在操控动态的点 此时限制你的只有数学思维能力和编程熟练程度以及想象力 —————————————— 如果只是单纯2D 从自由性和可定制程度以及熟练程度讲,kivy绝对好很多 —————————————— 原来日本的小黄文坑钱游戏是这么制作出来的 https://www.renpy.org/ —————————————— 从你的计划 我可以看出,这款游戏是给手机写的 第一件事是选3D引擎 然后给Linux桌面版对应的按键,做到极客游戏,纯键盘玩枪战 —————————————— 从此 Linux 也可以联机爆头 —————————————— 我们来写枪战游戏吧 —————————————— 你们有谁像Linux创始人那样 不为名利,窝家里接近一年写个系统。 只有小学生可以做到啊 —————————————— 你写了什么? 拿来看看 —————————————— 你们就是在扼杀小学生的梦想 —————————————— 又不能买台式😞 —————————————— 打算买一台二手移动工作站 有何推荐? —————————————— 突然觉得 Khan 学院的 Khan 好屌,全部图像都是 web 即时渲染出来的 我用 pylab 感觉没他灵活,它还有可视化的图像互动 —————————————— 我打算这样构架 使用导数 function analyze in theory 计算机可以draw所有点,但人懒,只想用几个点和一些特性画函数图像 一阶导数描述单调性和极值 二阶导数描述凹凸性和拐点 加上区间描述函数的最值 左右端点构成的斜率描述函数总体变化形势 function use in reality 某法则求0:0或∞:∞极限 耗费最小化,利益最大化 —————————————— Increasing intervals 递增区间 Decreasing intervals 递减区间 Concavity 凹凸性 inflection 拐点 —————————————— TMD,不想写文字数学笔记了 简直浪费时间,很难表述清楚 而程序就不一样了,它一环扣一环,逻辑上是绝对严密,不然无法运行 只要加以注释,一定是最好的数学笔记,只要看懂就能理解 然而程序代码对于程序员,对于你我来说,绝对是最好理解的,比起符号化的数学公式 —————————————— list to np.array np.array(a_list) np.array to list np_array.tolist() use np_array as list for i in np_array: print(i) get np_array index by value index_list = np.where(np_array == some_value)[0] print(index_list) get np_array values by index_list print(np_array[index_list]) Just remember, any list you put in numpy function, it will automatically converted to np_array. —————————————— You don't have to learn numpy anyway It's naturally like list in Python, you can use it as you did in Python list Moreover, just need you to search API and use it. —————————————— 未来,由于环境被进一步的破坏,自然资源严重不足 加之人类精英阶层对生育的冷淡 人们必然要大规模使用机械生产 —————————————— 原来 `gen` 是 `generate` 的缩写,而不是 gun —————————————— sum(list(range(1, 20)))/19*10 —————————————— 感觉灵魂被掏空,只下单个js或css是无用的 在bootstrap 4.0的情况下,渲染异常 看着web-for-math那令人蛋疼的模样 我还是觉得恢复在线CDN比较好 —————————————— 我差不多是脱离群体了 哈哈,有程序和你们就够了 —————————————— MD,思修新闻播报 没人通知我 上课做 PPT,明天讲 —————————————— Programming(程序构建) 从大含义上讲 分为两方面 In reality, it's Electrical Engineering,物理程序构建 In virtual, it's Software Developing,逻辑程序构建 —————————————— 说真的 如果不能把基础学科(英语、数学)投入实际应用,比如 do programming or do data science 就没有太多意义和乐趣 —————————————— 属性合成😂 —————————————— Nice —————————————— It's efficient to get relationship between each data —————————————— https://pymotw.com/2/pdb/ 看完了这个 昨天发现 Docker 的 image 还是有问题,我是不是应该把 logging info 放在外面,另外加强 debug 的能力? —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/ac/san-xiang-dian.html 用平板 Adobe Sketch 画电路图也还算好用啦 又多了一个继续用 Lubuntu 的理由 —————————————— You got YouTube, you got most of everything. —————————————— 学到的一点: 当朋友说出了他的困难,不要同情他,而是想出解决方法 —————————————— Let's go and keep web developing, because we know that slowly change in User Interface can't be capable in today's society. —————————————— 消息越是转瞬即逝,人们越是倾向于发布不重要、不经过思考的信息 于是 Telegram 就说:“我们提供永久消息存储”。这样你就倾向于发有效信息。 对于QQ上通篇的废话,我感到很欣慰。 —————————————— From this day forward, we gonna learn how to design structure for bigger program. 其实我想要的,不过是一个音乐播放器,所以为了我们webchat的安卓版的播放按钮有作用,让我们做一个基于flask的随机mp3小API 反正我网易云350首歌都下好了… —————————————— 有了 xposed 框架,网易云变灰的歌也能听了 ) —————————————— 又感到一种限度 能做的事太多,almost everything,但时间是有限的,需要仔细考虑自己要做什么 这意味着我大概 computer science 入门了吧 —————————————— successfully installed xposed —————————————— https://hub.docker.com/r/yingshaoxo/mathchat/ 这下可以好久不更新了 —————————————— https://wendyltan.github.io/ 这可以说是非常装逼了,我也想来一个… —————————————— 接下来的任务是 localize 把所有需要用到的css、js都搞到本地 以防长城防火墙的攻击导致功能异常 —————————————— 那些 greater than 5的已经是高收入的极端了,不能代表普遍,所以我们都把它们算成5 —————————————— 数据被预先处理了 —————————————— https://youtu.be/jDuxFEgtSAQ Magic,电压增大电流反而更小,电压减小电流反而增大 —————————————— https://gist.github.com/yingshaoxo/190e2b9d883e2c59a9d07a1a50b18f4d Let's forget about that, 正向解决问题简单,反向就难了 —————————————— 我还真写了一个class专门画切线 只需要给function和x点,自动画切线 现在唯一的问题是,0点好难找(要我自己算导函数=0时, x=多少) 如果py能帮我算这个equation就好了 —————————————— 我算是看清pylab、numpy、scipy那一套了 numpy负责提供数组点 scipy负责计算复杂的数学运算 pylab负责把 数组点 连起来 绘成图 —————————————— 十分奇怪,不过是个奇葩老师,也难怪,据说是清华毕业的 —————————————— 高三那年,撒贝宁有幸去参加了北京大学举办的只有优等生能参加的冬令营,在汇报演出中以一曲《小白杨》顺利通过了汇演。在离高考还有三个月,他接到了北京大学的录取通知书。[11] 大二搞戏剧社,还拍电视剧,获得了中央台“理想杯”二等奖,大三作为合唱团团长率队远征西班牙,在国际比赛中勇夺第一,大四被保送研究生。 真正能做出成绩的人都是拉关系、走后门、碰运气拿到下放的几个名额的(习近平也是公农兵推荐上的大学) 而纯靠学习成绩走上去的做不出成绩 感觉和西方历史上的科学家发家史完全不同,这就是为什么中国人科技成绩不高,因为科技能力不是拉关系走后门能习得的(文科可以) —————————————— 我好像发现我校的思政老师在我的群里😂 —————————————— https://yingshaoxo.gitbooks.io/artificial-intelligence-for-idiot/content/data-visualization/matplotlib/annotation-in-reality.html Hard to say... —————————————— 真坑 花了一上午研究怎么用pylab draw a 定长度的 horizontal line 因为要画函数的切线,不然这笔记没法写 —————————————— gitbook本地版做得真傻逼 既然是 本地修改,保存,最后再提交 为什么非要联网才能使用?有网我还需要本地版?😒 —————————————— 现在是按需启动 把 set() 放在首页,只要有人访问,发现 websockets server 没在运行,就启动它 —————————————— Never mind 心急也没用,少食多餐吧。 —————————————— 别的不管,从英语的角度讲 做那几道题是完全不能提升你的英语能力的 还不如跟读一篇十几二十分钟的英语演讲 或者每天坚持念并搞懂一篇文章 —————————————— just enjoy math fun —————————————— 然后出现了 global maximum or minimum,即最值 还出现了 Critical point 的概念(临界点、要紧点、值得“批评”的重要点) —————————————— 所谓极值不过是 relative maximum or relative minimum —————————————— 其实我以为高考之后功利性学习就到头了 结果发现不但没有,反而愈演愈烈 到了大学不仅是填鸭式教育,还是流水线作业,老师们拿着一根计分棒:“学分不够,你给我滚”😒 —————————————— 哈哈,以前 run python codes 的代码没白写,又派上用场了 import os import sys import shlex, subprocess version = sys.version_info def run_command(c): args_list = shlex.split(c) result = subprocess.run(args_list, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, timeout=15) return str(result.stdout) def run_program(name): args_list = shlex.split(name) p = subprocess.Popen(args_list) def set(): current_dir = os.path.abspath(os.path.dirname(__file__)) server_path = os.path.join(current_dir, 'server.py') if 'app/server.py' not in run_command('ps x'): run_program('python{major}.{minor} {path} &'.format(major=str(version[0]), minor=str(version[1]), path=server_path)) # set() —————————————— 为什么马云数学总考不及格? 因为他学好了英语 然后发现中文“文档”狗屁不通 —————————————— 突然发现不管开多少 terminal 窗口 都只能用 ps x | grep terminal 看到一个进程 —————————————— 确实是websocks server.py的问题 通过 ps x 得出结论:那个进程在运行一段时间自己退了…不明原因 但基于websocks server对flask主程序没什么影响,我们可以想办法定时检测并自动重启它(我还没做过watch dog process) —————————————— import psutil import shlex, subprocess # make sure a chrome is running status = False for proc in psutil.process_iter(attrs=['name', 'pid']): if 'chrom' in proc.info['name']: status = True # proc.terminate() # proc.wait() # print('ok') if status == False: args = shlex.split('chromium-browser') p = subprocess.Popen(args) # from pprint import pprint # pprint(dir(p)) # make sure a terminal is running times = 0 for proc in psutil.process_iter(attrs=['name', 'pid']): if 'terminal' in proc.info['name']: times += 1 if times < 2: args = shlex.split('lxterminal') p = subprocess.Popen(args) ''' import os import signal import psutil def kill_proc_tree(pid, sig=signal.SIGTERM, include_parent=True, timeout=None, on_terminate=None): """Kill a process tree (including grandchildren) with signal "sig" and return a (gone, still_alive) tuple. "on_terminate", if specified, is a callabck function which is called as soon as a child terminates. """ if pid == os.getpid(): raise RuntimeError("I refuse to kill myself") parent = psutil.Process(pid) children = parent.children(recursive=True) if include_parent: children.append(parent) for p in children: p.send_signal(sig) gone, alive = psutil.wait_procs(children, timeout=timeout, callback=on_terminate) return (gone, alive) ''' 只要这个常驻后台,我的第一个脚本就完成了 —————————————— 从这一点讲,我们总需要一个控制中枢、一个权力分发者 才能高效地使用我们的手机。 比如绿色守护、Super su —————————————— 如果 Stats is S+, that process isn't running. 用这个可以实时得到当前的后台进程 但os.system()是得不到返回结果的,我们要用多进程 —————————————— See how many process is running now: ps x —————————————— 怎么感觉我是对的呢😂 —————————————— 我爱自动化 主 while True: 框架写好了,现在在纠结是用 os.system() 还是多进程执行脚本 也可以等我写几个自动化脚本后看哪种方式比较实用 —————————————— 或者换一个说法 让我们从低阶的AI做起 —————————————— 反正我们人类科技进化的过程就是不断地让 机器做人做不到的事 和 让机器做人能做到的事。 有这个基础,我们以后做实体robot也比较轻松。 —————————————— 我是越来越觉得自己在做无用功了 How to fix it? 我不想累死在电脑前 考虑到hotkey的控制难度,我们何不做一个terminal程序, 这个程序有一系列脚本(包括py和sh) 我们所需要做的,就是不断的输入关键字搜索,并得到一个以数字为序列的操作list 选择数字,执行自动化任务(包括自动点击界面并完成操作) —————————————— 为什么要建一个聊天平台? 因为想把我以前做过的所有程序连在一起 —————————————— /go@XiaoyaBot —————————————— 但不明原因 程序运行过长时间后,访问主页会不断的刷新跳转? 难道是 websocks server.py 的问题? —————————————— Simple port forword in linux (when require 80 port, get 5000 port): iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5000 iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5000 —————————————— 突然发现这玩意儿的真正用途是开翻墙热点😂 —————————————— random sampling 随机抽样 stratified sampling 分层抽样 —————————————— 如果一个女生数学不好,就不是真男人性格。 —————————————— 程序改版了,第一题我都不会了😂 —————————————— 由于平板解锁 数据全失,不能再继续做数学题了,伤不伤心? 不,我们还可以继续做啊!(只不过要多花点时间把前面的题快速做一遍)😁 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/ac/ac-circuit.html 行行行,nothing can hold me back. —————————————— 无所谓啦 用了冰箱和绿化后,从没感觉平板如此清爽 —————————————— 成功给华为平板2 su root —————————————— 成功给华为平板2解锁 https://sspai.com/post/23628 —————————————— 👍 —————————————— 如果自己不是特别厉害,还是跟随大众的脚步吧,那样的需求浩浩荡荡、势不可挡,总有比你更聪明的人研发出“新工具”,我们只需要会用就行。 —————————————— 取消成功 下周决定要不要注销学校的那张联通卡 —————————————— 我要去取消校园网宽带😒 —————————————— 国内主机只支持绑定备案域名👎 —————————————— 虽然能对抗小网 以后就能对抗大网升级 但多少还是 feel painful. —————————————— 难道真的只能去退网络? —————————————— 感觉自从我来到这破学校以后 程序没写多少 光去捣腾那垃圾网络去了 —————————————— 这学校看起来挺傻逼的 玩儿起 firewall 是一套一套的 不知为何,不管我把ssh放在哪个端口,连接任意一个VPS统统被切断连接,用网页版terminal就没问题 难道ssh的流量可检测? —————————————— The fact is, others won't change by your cheap words. The only definitely changeable thing is yourself. —————————————— If I could take time do some research instead of complaining, things may become different. https://lolico.moe/vps-domain/cloudcone.html Well, Vultr is better for its tech and service. —————————————— But before this, I really didn't think how to connect a server without an IP address. If the government or evil companys can control your Internet entrance devices, you have no chance to win this game. How we could do? —————————————— Victory belongs to those who never give up. So, let's fight! —————————————— I mean, fuck Why I have to living in China. —————————————— 发现原因 校园有线网会寻找大流量SS连接,并且找到ip地址,封该端口 解决方法: 1. 动态端口 2. 有办法伪造目标ip地址吗?用域名? 3. 关掉有线网服务,扔掉联通卡,用日租流量卡 4. 跳楼前多炸几栋联通营业总厅(应该先趁领导开会,炸掉学校领导楼,因为他们贪污引进垃圾网络运营商) —————————————— 怀念以前在家玩的日子 不缺钱、不缺网、翻墙也不费劲 —————————————— 对了 你还在家玩吗 —————————————— 也不知道他们进来干啥,什么都不讲 —————————————— 那你把认识的拉回来 我认识认识 —————————————— 一定有内奸 —————————————— 才说完我用中转,中转就连ssh都上不去了 然而80端口还有东西 —————————————— … —————————————— https://doub.io/vpszy-26/ 买了一个13元一月的 —————————————— 中转 + 端口伪装 —————————————— Fine, thank you —————————————— 有这种事,现在还能买吗? —————————————— 不过我很好奇,你为什么花5刀买个128M的东西 难道是不限流? —————————————— 我们两个用国内中转 —————————————— 你看3个人用怎么样,我 + @DIYdoge —————————————— 主要是价格 —————————————— 我不看配置 —————————————— 可惜自定义程度不高 咱们先谈谈你那两个VPS吧,what's the price per month? —————————————— 就猜到你会这么说 —————————————— 好吧,有钱的大佬 —————————————— Get out of wall —————————————— 恩,几个人一起可以把费用降到最低 还可以增进友谊 —————————————— 恩 等 @ShinoharaRin 回复 直觉告诉我,咱们群浪费了很多钱在翻墙上,每个月有大量的流量未使用 我们得协调一下 —————————————— 我觉得咱们群买一个VPS就够了 虽然我很想一分钱不掏,蹭你们的网用 —————————————— @hex11 @ShinoharaRin 哥两个,要一起合租吗? —————————————— 回退到 simple 版本,修复bug但保持了 multi user system 接下来就简单了 本质上是如何保证用户数据不变, while still in coding. 或者更高科技一点,热更新。 —————————————— 哈哈,学校有线网 docker 上传 20M 两小时 手机联通流量, 300M 5分钟 还有话费太贵了 垃圾学校绑定解不掉的卡 每个月什么电话都不打要花我 80元 加上我 VPS每月45的钱,我好吃不消。 @DIYdoge 咱们合租吧 —————————————— https://www.353.solutions/py2go/index.html 怎么看都觉得 golang 不是个好东西 特别是 json 那段 也许它觉得像json这种东西很快就会过时吧 But from what I see, 我们只是用别人封装好的 API 写程序,至于用语言自带package还是第三方package,属于个人选择 —————————————— proportional 成比例的 corresponding in size or amount to something else. —————————————— instantaneously 瞬时地 —————————————— 不对,我是指原符号不变,鼠标移过去点一下出解释 —————————————— 对接第三点 https://youtu.be/OsI2GgTT_z0 —————————————— 看了 Charlie and the Chocolate Factory 1. 里面的特效有些现在国产都做不到 2. 加上歌剧反胃,像印度电影 3. 2005年就预测了机器取代人类的简单手工劳动 5. 主题不明 —————————————— Unit ms Units of measure. Megasiemens (MS) and millisiemens (mS), multiples of the unit of electric conductance siemens. Metre per second (m/s), a unit of velocity (speed) Mile per second (m/s), aunit of velocity (speed) Millisecond (ms), a unit of time equal to one thousandth of a second. 时间上为千分之一秒。 —————————————— 还有这些阻碍人类发展的公式,得变啊! 至少需要有 JavaScript 实时渲染每个部分的含义 或者更具体一点,AI直接解析每个式子的含义到自然语言 —————————————— 有时候我想操了全世界的理工科书,没一本是给人看的 只有说出来80%的人能听懂,才是有教育意义的书 —————————————— The standard unit of capacitance is the farad. —————————————— 竟然把交流电理解为 current pulse —————————————— “In this article we'll work with the integral form of the capacitor equation. ” 我是无奈的,因为积分还没学 —————————————— capacitance ability to store electric charge —————————————— 从直流到交流,感觉就像飞跃了一个难度等级 —————————————— 😭一脸萌逼 —————————————— 室友作品 —————————————— 同样的令人头疼 程序可以慢慢写 挂科补考就很烦了 所以你知道我接下来要做什么了吧 —————————————— 所以在大学里 虽然看起来课程很少 但实际上课程的难度非常大,主要还是靠自学 —————————————— 一节电工课 因为听不懂而精神高度集中 然而还是感觉记了一堂垃圾 —————————————— 有重大的Bug导致不能用 烧脑 —————————————— sudo docker run -d -p 5000:5000 -p 5678:5678 --name mathchat yingshaoxo/mathchat 新版本,让我们愉快地开始测试吧! http://101.236.28.129/ —————————————— https://t.co/rfMFsesrms —————————————— 感觉vim技能提升了一个级别 几乎不需要使用 j 和 k了 看我有时间,写一篇升级指南 —————————————— Vim commands ^ or 0 move to the beginning of a line $ move to the end of a line w or e move forward by a word b move backward by a word 3e move forward by 3 words (also in b) —————————————— Open a new terminal with the same folder in Lubuntu: lxterminal —————————————— polynomials an expression of more than two algebraic terms, especially the sum of several terms that contain different powers of the same variable(s). —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/ac.html 写电工明显比写数学累,因为很多概念不是明确的 —————————————— 装什么B 闷声发大财,然后抛开尘世做自己的事才是救赎之道 —————————————— 写了这么多年代码 我也是有点心得的:困难难免,今天的困难,明天可能就不是困难了。 Hardship is something you can going through. —————————————— 解决了第二个问题,明天开始自动化bug测试 这可是送给数学家和程序员的礼物 —————————————— 解决了第一个问题,websocket.onopen() {} 发token到服务器,如果不符合数据库的记录,就断开连接 —————————————— https://stackoverflow.com/questions/22846719/recursion-how-to-avoid-python-set-changed-set-during-iteration-runtimeerror —————————————— 好了 基于数据库的token系统做好了 现在问题有两个: 1. 每个websocket.send()都要发一个token,浪费资源,能不能改成只在创建连接时验证一下 2. 虽然用户名在Chat UI上有所体现,但他我之别不明显,我应该让自己的消息在右边,别人的消息在左边 —————————————— Sometimes you don't know what kind of args your function will get, so *args and **kwargs become useful then. https://www.digitalocean.com/community/tutorials/how-to-use-args-and-kwargs-in-python-3 —————————————— https://youtu.be/F0-RiOqgG68 It's quite interesting. —————————————— http://www.jianshu.com/p/04e14a1e957b 是不是疯了,一个错误还有两种说法,还没人明白怎么回事 我就不信非要什么鬼的华为证书,那为什么其他国外软件随便可以安装 这里应该是要v2签名 (精神力强撑打字,眼睛要闭起来了..) —————————————— 😴 Good night —————————————— 和垃圾电脑一起修仙的日子 简直是在浪费我的生命 —————————————— 测试了调用webview 得出结论,安卓就是要用新系统SDK,不然各种不兼容 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/derivative-and-differential.html Finally, I've put all concepts to together. —————————————— 我在想用户认证的问题 websocks通信的客户端在web,不是flask, 不能用session 那我如何确认那是用户而不是第三方伪造呢? 不想让用户频繁登录 —————————————— We do things is just for doing less later. —————————————— https://youtu.be/o8NPllzkFhE We are the same. —————————————— “用事实说话” 只有自己亲身用英语录视频才知道自己表达多贫乏 这不是高考英语120就能做到的 —————————————— 与 kivy android 共存,只能jar签名 —————————————— https://askubuntu.com/questions/474607/lubuntu-disable-removable-media-is-inserted-window 再也没有讨厌的弹窗了 —————————————— https://coding180.com/kotlin-android/playback-file-located-on-the-internet/ kotlin大法好,还有try...catch 也是融合了Go(C), JavaScript, Python的东西 —————————————— 然后 所谓 free,不是指 免费 而是指 alternative,可选择的 谷歌所推崇的自由是:你不能找到能替换我的东西,但我可以提供无数的网站供你选择,这样你就拥有了自由。 —————————————— Google 必须大力支持 kotlin 因为如果 Websites and Android disappeared in the future, 谷歌将不再有人数上的霸主地位,而这直接影响到它的经济来源 没钱做不了大事 —————————————— 对于编译一次需要十几分钟的垃圾电脑来说,还是可以了 —————————————— 本来快做完了,需要改下界面 卡成狗 —————————————— 我们卡一点,消费者快一点 我们做多一点,消费者做少一点 … 动态平衡啊 —————————————— 修改代码后二次编译用了3分20秒,还行 就是同时开一个浏览器,十分勉强(cpu满了),还不如用平板查资料 我想用kotlin写一个小安卓程序练练手 —————————————— This guy is just amazing! —————————————— https://www.youtube.com/watch?v=FrRmihdF52o&list=PLGecHlqUT7dzCM9o2NYtkj4zG3aBwq81d So the 220V is just a half of positive sine wave in our country voltage supply, the true max-voltage is bigger than that, it is 220/root 2 V —————————————— 交流电 —————————————— 今天的视频录好了(意味着今天的web开发也结束了) 所以今天有大把的时间攻克电工sin wave 相关知识,不弄懂不睡觉 —————————————— 虽然编译初始模板花了>5分钟 但我还是很开心,因为 Android Studio 直接驱动我安卓平板安装了编译出的APK 并且还发现我可以直接使用 adb reboot,这是否意味着我的电脑是支持usb3的? 卡点没关系,它编译时我可以用vim写back end web project —————————————— 没被卡死 感觉还行 https://dl.google.com/dl/android/studio/ide-zips/3.1.0.1/android-studio-ide-171.4429293-linux.zip —————————————— 坚定 Python 文化自信😂 —————————————— 就像发现新大陆 —————————————— Check out "Pydroid 3 - Educational IDE for Python 3" https://play.google.com/store/apps/details?id=ru.iiec.pydroid3 —————————————— https://blog.mindorks.com/a-complete-guide-to-learn-kotlin-for-android-development-b1e5d23cc2d8 等我回宿舍下一个 Android Studio 试试会不会卡死 https://developer.android.com/studio/install.html —————————————— Look what I have found —————————————— 主要是安卓开发要安装卡得要死的IDE、同时必须用鼠标 我更倾向于用键盘和命令行完成一切 —————————————— 经过我深入的研究 发现这是一个鸡肋的特性或功能 不用也罢 —————————————— Anything except Java —————————————— https://docs.python.org/3/library/gettext.html 被这玩意儿气得几乎吐血 什么po啊,mo啊。怎么生成都不知道,反正搞了一个小时,没调用_成功。 —————————————— 看同龄大佬的出国秀。。。 祢补在国内缺失的眼界 https://hardrain980.com/1573.html —————————————— 基于这一点 那些(在外省)能考清华北大的 从能力上,早就达到了大学的水准(所掌握的东西是大学的超集) —————————————— # https://docs.sqlalchemy.org/en/latest/orm/tutorial.html # https://bytefish.de/blog/first_steps_with_sqlalchemy/ from pprint import pprint import os if os.path.exists('userdata.sqlite'): os.remove('userdata.sqlite') # not necessarily, just for testing from sqlalchemy import create_engine engine = create_engine('sqlite:///userdata.sqlite') # sql name can not contain any _ stuff, or exception be raised from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() from sqlalchemy import Column, Integer, String class User(Base): __tablename__ = 'users' id = Column(String, primary_key=True) password = Column(String) def __repr__(self): return "" %(self.id, self.password) Base.metadata.create_all(engine) # when you build a new sql class like User, you have to init it using this command from sqlalchemy.orm import sessionmaker Session = sessionmaker(bind=engine) # we do everything by session session = Session() a_user = User(id="yingshaoxo", password="hi") # define a new user session.add(a_user) # add that user to session session.commit() # every time you made change, you have to commit to make it avaliabel on sql file. some_one = session.query(User).filter_by(id='yingshaoxo').one() pprint(some_one) # how to find our user by id print(some_one.id, some_one.password) # get user's info exit() pprint(dir(session)) # look how many commands you can use from session pprint(dir(session.query(User))) # look how many commands you can use from query —————————————— Using clipboard on lubuntu copy file content to clipboard: xclip -i -selection c < file.txt paste clipboard content to file: xclip -o -selection c > file.txt —————————————— @DIYdoge 今天学了几个中值定理(导数的应用) 发现对于高中阶段的不等式证明有奇效,要是我高考场上会这招,肯定上本科了 —————————————— 快要弄懂sqlalchemy的原理了 现在只有一个问题:如何让web像安卓一样,快速切换语言 我不想等我开发完之后发现每个部分都需要改 —————————————— It's hard to say which language is better? https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/the-structure-of-go/map.html —————————————— 把注册登录页面搞好了 现在差sql存用户数据 —————————————— 暂时不管它 等我的 web chat 平台开发完毕,咱们掀起革命 谁叫他们不开放呢,淘汰吧,腾讯君! —————————————— 可惜老师和同学都不会翻墙啊 —————————————— Suddenly, I realize it's impossible for me to do a wechat little program, there are so many restrictions over there. And it's a closed ecosystem. Compare to that, I would prefer to built everything on my own(a website or platform). So, I give up. —————————————— 用腾讯的东西唯一的好处是不用花心思抵御流量攻击 不过如果已经精通防御之道,自己做总比寄人篱下好和灵活 —————————————— 可能会转向腾讯提供的 javascript 包做界面,python做后端 —————————————— 答应帮老师做微信小程序 目前手里只有两个资源: https://github.com/wepyjs/wepy http://www.smallerpig.com/1184.html 很明显,python的资源不多,腾讯坑 测试了唯一一个python包也是会报错的那种 —————————————— asymptote 渐近线 —————————————— 唯一令我高兴的是:上下午课没满的时候,可以带笔记本去图书馆;每天晚自习8:40等那些年轻人都走了,我有50分钟的时间在无人的教室里写代码或者录视频或者并行操作。 —————————————— 发呆一个晚自习 由此证明,我已经无法理解中文的理工科内容 —————————————— 《Patterns of culture》 In fact, this kind of article is driving me to crazy. So I just give it up temporarily. —————————————— These packages you should work on with. —————————————— permutation 排列;序列 —————————————— Jupyter运行会出错,在中间 但是手打运行是完全没问题的 我们还是踏实一点来学习重要的东西 —————————————— 当然啦 你也学不懂 —————————————— 我跟你讲 以后一定要选计算机系专业 不然分到一个其他领域,太深入你也不想学 —————————————— 怀疑人生 —————————————— 虽然我不知道怎样描述那种特征 —————————————— 没准 derivative 只是抽象了 function 的某个特征,是某种数学模型 —————————————— There are no one career is easy. —————————————— Set download source for pip in lubuntu sudo vim /etc/pip.conf [global] index-url = http://pypi.douban.com/simple trusted-host = pypi.douban.com —————————————— I just wanna say, if you no longer feel happy when coding, why you should stick on to it? Be happy, do what you want, and waiting for one day which is your day. —————————————— Let's fuck this world! And do what we wanna do! —————————————— 我曾经以为 @system357 可以带我出苦海 后来发现,自己的路还是要自己走 Everyday working hard than —————————————— 我真是痛恨一切传统教育制度 —————————————— 被车撞了? —————————————— I just started reading after TED recently. Because I almost finished New Concept English 4. —————————————— Why —————————————— 人都有名字 哥你想让我叫你什么呢? 还是你向来独来独往 —————————————— 求dy 太烦了,这种东西根本不能转化为实际的经济利益 不会做,好烦 —————————————— 我们有时候不要嘲笑一门语言 你这样想,同样学了英语、数学、历史,有些人改变了世界,有些人碌碌无为 不同的人所利用这门语言的程度和达到的事不一样 —————————————— 😂 —————————————— 还有这骚操作 https://program-think.blogspot.com/2017/08/GFW-Resilio-Sync.html —————————————— 好像说错了,有待纠正 —————————————— 垃圾教材,让人看不懂也敢印出来 其实微分(differential)就是研究非线性函数(曲线)的导数 —————————————— was indicate it happened in the past —————————————— 事实上我不会拿 Golang 写任何有价值的东西 只是装逼罢了,至少可以说自己掌握了一门编译语言(额...易语言不是吗?) —————————————— 我看到 Sentdex Go tutorial 的第12集 发现最有效的第二编程语言的学习方法是: 想实现什么功能就把第一语言的函数关键词配上第二语言的名字在谷歌上搜索 Python是万能的 [笑] —————————————— 经过我几周的测试 发现有两个东西我一直在重复打开和关闭,浪费时间,还不如一直打开:Chrome and Terminal —————————————— 【笔记本电脑支架 可折叠托架宿舍床上用多功能懒人电脑架增高架子】 http://v.cvz5.com/h.EEQkDi 60° 255° 75° 加上 【海贝丽懒人沙发榻榻米可折叠单人小沙发床上电脑靠背椅子地板沙发】 http://v.cvz5.com/h.EEkjIJ 120° 完美 coding 环境 —————————————— 我知道了,主要是我太黑,然后声音太小需要放大 —————————————— ffmepeg只能转码和加速,这里不需要,我讲得太渣,加速了别人听不懂 opencv只能录视频,没声音,不好用 最后只能用vokoscreen,还有快捷键呢!非常好用 —————————————— Look at me, so awesome! https://www.bilibili.com/video/av16213113/ —————————————— vokoscreen is wonderful for linux screen recording —————————————— Let's sleep. My head are fucking numb now. —————————————— I don't think they got anything amazing. By the way, I'm using a bad performance laptop. —————————————— 中文TG群组bot越来越低智了,已退 —————————————— 通俗来讲就是:会憋出病来的 —————————————— 可能这也是 sentdex 最初的想法 我看那些文章只有几个访问量,没意思 再多写几个我都不会和人正常交流了,做视频会好一点 —————————————— 这个可以和web_math_chat的开发融合在一起,比如标题叫做 “如何打造一个类似于腾讯的聊天平台” —————————————— 一时间我又生出许多想法 比如为了不浪费我的口才(和抵抗一个人的孤寂),去做技术解说,发视频教程在YouTube —————————————— https://yingshaoxo.blogspot.com/2017/11/how-to-set-syncthing-on-server-correctly.html https://www.getnas.com/2017/07/2500.html 累死宝宝了,btsync就没这么麻烦,可惜被墙了 感觉我在浪费生命 —————————————— How to compress or uncompress a directory using tar: tar cJvf archive_name.tar.xz directory_name tar xJvf archive_name.tar.xz tar xf archive_name.tar.xz c means create. x means extract. f means file name. J means high compression rate with xz. v means progress view. Make sure f in the end near file_name. —————————————— 乌合之众: 一个周期性的事件,大家都要做,你早点去做。 一个突发新事件,大家都要去做,你晚点去做。 一个突发新事件,大家都不做,你早点去做。 这实际上是在考验群体的智慧,我认为群体不可能在事件一开始就正确判定是否真对他们有利。 —————————————— If programming languages were guns, —————————————— 在脑中逻辑推导100次,很屌吗? 错 你无法在实际生活中以你的Movement为变量,去操控实际,那就是无能 这种操控,底层是物理计算,高层是利益、人性以及思维计算 —————————————— 然后就看不懂了 —————————————— 我竟然通过下面的注解和目前的高数水平把这个式子看懂了 这是方差 h(x)是预测函数 x是一个matrix, 装了很多 features,特征data,或者说 input data y是你的原有数据的值(这个应该区别于被预测出来的值,它是真实值,they have also been called labels),这是supervised learning —————————————— 我在想炒房的事 只要预测出这个地区的人均工资会涨,就可以去买房,稳赚。。。 我估计中国人也只能拿AI做这个了 —————————————— AI本质上还是做一系列计算 只不过以前这个计算太复杂,只能人做 —————————————— 路由器白名单如果不开放udp,google的一切就无法正常联网 —————————————— 需要Math啊 但Math太抽象,不用到实际就不懂它的本质 —————————————— 我们讲,学习是需要基础的 My learning path: English → Programming → Math → Electrical Engineering 你必须要保证左边的掌握度比右边高,不然学不下去 —————————————— 想去谷歌中国大会2017看看大佬们 但怕迷路和资金不足 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/derivative.html https://yingshaoxo.gitbooks.io/artificial-intelligence-for-idiot/content/data-visualization/matplotlib/any-line-and-label.html 真希望我能一直(把 notes or tutorial)写下去,这样的话我想学的东西就都能学会了 —————————————— 从求实的角度讲 我要想真正找到一门开发的工作 我必须像精通Py一样, 精通 Web developing 就这样,方向已定,其他次要的浅尝即止 —————————————— 对于这个网站 https://www.pornhub.com/ 它的盈利点不在于使用app,同时,像 https://my.vultr.com,你会为了买个vps去单独下一个APP吗? 我始终觉得中国人的思维有问题 —————————————— 这样看来,python仍旧够用 服务端程序 或 自用软件 或 开源软件 或 快速原型开发 Golang可能用来做商业开发 或 大型并发规模化的服务程序(节约成本) 至于面对Windows的(C++)桌面环境怎么办,你不是有易语言和 Python's pylnstaller 吗? 看起来易语言在win10运行良好 —————————————— 我们不需要从众多语言中去选择 我们只需要一个或两个靠谱的语言做开发 解释型一个,编译型一个 —————————————— 我看了看 kotlin 我觉得 Google 在做不道德的事 因为混乱 —————————————— 1 foot = 12 inches —————————————— 比赛后,二等奖,队长请吃火锅 我一个室友竟然攻击我的理想(programming),然后我落下了时隔几年的泪 真是艹了🐶 —————————————— 就差数学笔记没补 https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/the-structure-of-go/methods.html https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/superposition.html —————————————— Run Python3 and Golang in Vim: vim ~/.vimrc au FileType python map :w:!python3 % au FileType go map :w:!go run % " means a Enter key. "For :w, I don't know its meaning. au BufNewFile,BufRead * \ set tabstop=4 | \ set softtabstop=4 | \ set shiftwidth=4 | \ set expandtab | "\ set autoindent | \ set fileformat=unix " autoindent may cause bad behavior when you paste in vim —————————————— Automate 挺好用的 Android Automation —————————————— 最后一句fuck 让咱们远离这种有害身心健康的活动 —————————————— 现场第二首,没来得及落款 第一首,机器在一个点处宕机,不算墨点 幸好我有笔画数组print,所以接着笔画写 其实如果拼一拼,第一首宕机后不写完,第二首就能完美完成 可惜那些领导不懂得“拼搏” —————————————— 如果我以后有了权力 绝对让中国变成科技强国(尊重开发人员) 而不是人情强国,因为战争是不讲人情的 —————————————— 他们总看不起那些落后但坚持到达终点的人 他们忽略了一个关键点,放弃的人比坚持到达终点的人高一个量级 前几名和坚持到达终点的人之间又差一个量级 最后那些嘲笑别人的人,就是那最大量级中的普通一员 —————————————— then p must be (divisible, with no remainder, by all the following integers—with the possible exception of which one?) 加上一个括号好理解多了 后面的句子都是在限定 divisible (可被除) —————————————— 尴尬,不会做 —————————————— superposition 叠加,重合 —————————————— suppress 抑制 —————————————— Kirchhoff's Laws work because of linearity, as do the Node Voltage Method and the Loop Current Method. In general, functions with non-linear behavior don't have these properties. We humans have not come up with a general-purpose method to exactly solve non-linear equations/circuits. Each new type of circuit requires mathematical techniques specific to the new circuit. The usual approach to non-linear circuits is to bend over backwards to make it seem linear over at least some small range of operation. That's what is happening when you see terms like "piecewise-linear approximation" or "small-signal model."  —————————————— 第一次知道 linear function 还有这么个 property. —————————————— ratio,比率... —————————————— So a match can't really make you stronger All you have to do is working alone, because they're so stupid. —————————————— Get Python's function parameter information from inspect import signature def func(*a, **b): print(a) print(b) print(signature(func)) —————————————— 梦是这样的: 因为是机械手脚,所以可以坚持不懈风里雨里跟踪女主角,然后在某个雨夜的某个隐秘的山洞,男主角忍不住上了女主角。 —————————————— 平日里半夜20分钟写完程序就睡觉 时间宝贵😁 —————————————— 草 半夜里射了一裤裆 明明昨天手动释放了一些东西 —————————————— 在 Lubuntu 的文件管理界面,按F4进入处于当前目录的 terminal —————————————— http://music.163.com/song/515453363/?userid=280429778 —————————————— 机器人书法核心程序差不多写完了(就是从.plt文件批量split出点坐标,然后按笔画传给robot arm,robot自己会平滑曲线) —————————————— https://zhgcao.github.io/2016/06/09/nginx-reverse-proxy-google/ https://github.com/moonbingbing/openresty-best-practices/blob/master/ngx/reverse_proxy.md 原来以前用过的web代理是这个原理 —————————————— Good night —————————————— 上次说的文字 实际上视频比文字精彩许多 看到第6节 收获是如果你定义了变量或导入了模块没用,运行会报错 —————————————— 然后突然发现可以把 virtualbox 的host键 从right control 变为left control 从此就不用在虚拟机里使用反人类的指法了(复制粘贴全选一般都用right control) —————————————— 土豪学校真有钱 2万买这么个东西(草,仔细一看买了6台,然后还有几台3D打印) https://cn.dobot.cc/dobot-magician/product-overview.html —————————————— 我也就当练练手 —————————————— 接了学校科协的全省机器人书法比赛 还有一个星期,让我用Python解决这个烂摊子 —————————————— 对呀,非常奇怪,在gitbook在线编辑器上能过 一旦publish,就说我update失败,报上面那些错误 经过我测试,就是那串数学latex的问题 —————————————— 好的 发现 syncthing 挺好用的 但注意不要给他root permission,同时同步的文件也不要有root permission,不然会出错 —————————————— When I'm ready for sleeping, got a error report from gitbook... just annoying https://github.com/GitbookIO/gitbook/issues/1896 —————————————— 其实最多时候还是想让自己局域网电脑与平板之间传递信息 所以我加了收到信息自动 copy to clipboard 的功能 (https://github.com/yingshaoxo/kivy-chat) 然后btsync在局域网表现实在太差,等我睡一觉起来看有没有现有的东西可以用,没有就自己造一个,因为多端文件自动同步太重要了,对于开发可以节省很多时间 —————————————— 如果我在国铁,检修时间是2点到4点,和程序员晚上发更新差不多 那我可以1点钟起来,工作到4点,然后回家写代码到7点 —————————————— The night is just about to start. —————————————— Finally I found that gitbook support picture uploading.👍 Nice service. —————————————— Now, I am thinking about where can I put my pictures in. After that, I will use it on gitbook, meanwhile keep those pictures maintainable. Any suggestions? —————————————— Now I feel unhappy. It's turned out that I should speak English as often as I can. —————————————— @ShinoharaRin 这样看来你还是挺厉害的 —————————————— Vim Command daw : delete a word caw : delete a word and put you in insert mode —————————————— 今天参加了一场校英语演讲赛 结果我什么都没讲 果然我能力还不够,要是涉及到 computer science, 我肯定可以讲上好几个小时... —————————————— 从语言、生物的认知为差异信息这条原理出发,我们要深入理解某种规律或事物,在不实际接触的情况下,必须用不同的语言学一遍,所使用的不同语言越多,理解越细致。 —————————————— Suspend in Ubuntu 16: systemctl suspend —————————————— http://music.163.com/video/751C85D364917CC115FFF330E821B53A/?userid=280429778 止不住地看腿 可惜我已经累到没时间打飞机 —————————————— 2017/10/26 21:50:03 [Info]Proxy|Socks: TCP Connect request to tcp:www.google.com:443 2017/10/26 21:50:03 [Info]App|Dispatcher|Default: default route for tcp:www.google.com:443 2017/10/26 21:50:03 [Info]App|Proxyman|Mux: dispatching request to tcp:www.google.com:443 2017/10/26 21:50:03 [Info]Transport|Internet|TCP: dailing TCP to tcp:45.77.157.170:443 2017/10/26 21:50:04 [Info]Proxy|VMess|Outbound: tunneling request to tcp:v1.mux.cool:9527 via tcp:45.77.157.170:443 2017/10/26 21:50:05 [Info]Proxy|VMess|Encoding: failed to read response header > EOF 2017/10/26 21:50:07 [Info]App|Proxyman|Inbound: connection ends > Proxy|Socks: connection ends > context canceled —————————————— https://github.com/v2ray/V2Ray.sh 还是不能用,放弃吧 —————————————— Golang安卓开发和C++差不多,都是做成一个包 然后Java调用 没意思 Golang就是改良版的C系列,改良方法就是糅合 Python and JavaScript. —————————————— http://matplotlib.org/1.4.0/users/mathtext.html Wow, just see how many math symbols we can use from latex. —————————————— 大学虽然累,但有个好处 不会遇到SB的老师(我指被专制主义完全洗脑的一心想充当权威而不是服务学生的顽固分子) —————————————— simultaneous 同时 simultaneous equations 联立式 —————————————— Procedure: Add element voltages around a loop Step 1: Pick a starting node. Step 2: Pick a direction to travel around the loop (clockwise or counterclockwise). Step 3: Walk around the loop.  Include element voltages in a growing sum according to these rules: When you encounter a new element, look at the voltage sign as you enter the element. If the sign is +plus, then there will be a voltage drop going through the element. Subtract the element voltage. If the sign is -minus, then there will be a voltage rise going through the element. Add the element voltage. Step 4: Continue around the loop until you reach the starting point, including element voltages all the way around. State Kirchhoff's Voltage Law in another way: The sum of voltage rises equals the sum of voltage drops around a loop. —————————————— 人们说人生要有一种不放弃的精神 就让我以写笔记的方式开始正式学习tensorflow吧 —————————————— http://group.yd.chaoxing.com/share/note/3D1A38AD-3C7D-4835-9059-2C13A5E002D2/note_detail 不想学新语言了 不知道计算机科学还有什么我不知道需要学的 还是AI方面,python积累到这种程度,不利用它做一个自身的突破,感觉人生都灰暗了 —————————————— 那还好 我只能算通讯技术 虽然也有配置网络发射机那些 反正围绕光纤展开 —————————————— 你是什么专业来着? —————————————— 比较好奇,你平时在公司做什么? —————————————— Sometime I think, why I have to learn Golang anyway, if you could just write program for web, android, windows in Python. —————————————— I wish I could. —————————————— 其中地铁有地方保护机制,不是本地人去不了 然后移动、联通、电信的正式员工需要本科学历,我还可能需要在大二提升下学历 —————————————— 我学校二级院校(铁道通信)主任做了上两届毕业生统计: 基本上每届招150人 能拿到毕业证的只有100个(考试不过或学分拿不到的无法毕业) 这100个里有40个进国铁、10个进地铁,剩下的其他企业 —————————————— 哈哈,装逼已经到一定境界了 人们大多认识我,并经常叫出我的名字,而我却不认识她们(注意,是完全不认识) 这大概就是喜欢1对多发言会得到的感觉吧 —————————————— 那上海那么多程序员怎么活? —————————————— 听说白名单的墙试点开始了 我这边有线校园网,只有80、443端等常用端口可以建隧道,其他都被封了 —————————————— An important engineering skill is learning how to break down complicated problems into simpler pieces. Decomposing problems may seem slow at first, and you may feel impatient. However, breaking up problems into smaller steps is the heart of the engineering art. —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/kcl-and-kvl.html —————————————— 我星期1到4根本没有时间写代码 课程和选修都够我受的了,高数和电路让人蒙逼 周末还要解决令人蛋疼的校园网封SSR的问题(俗称解决网络问题,不然怎么愉快地写代码) 所以开启极限学习模式,早中晚都听网课 —————————————— 原来两个点间电压相同,代表其中没电流流动,可以直接合并 另外电流和电压都是基于电荷,只不是描述的东西不一样 —————————————— 哥 我已经放弃了 —————————————— 决定暂停做算法题,没意思了,纸上谈兵(纸上得来终觉浅) 应该搞几个实际项目 数学题要继续做 —————————————— 自从把HTTP关了后,网易云瘫了(暗指不靠谱的网易云) 另外我发现百度搜索,所有搜索结果都要经过一个HTTP转换到真实地址,这不是脱了裤子放屁(首页用HTTPS, 然而点击搜索结果用HTTP,故意被第三方监控吗?) 必应会直接HTTPS一路到底 —————————————— https://leetcode.com/problems/word-break/description/ 这道题根本不是考算法 而是考计算机如何像人一样思考、解决人才能解决的问题 既然这样,还做什么编程?直接建神经网络算了! —————————————— 修仙,妈的,3点睡,6点起 还有好几节电路课欠着 看来下次不能把学习任务留到周日解决 —————————————— 从此告别HTTP 先把路由管理转成https,再禁掉所有http,留一个给校园网登录 —————————————— 不发教程了,没意思,这是英文使用者的游戏 https://pythonprogramming.net/go/introduction-go-language-programming-tutorial/ (3分钟看完,golang没难度) —————————————— 我在室友的win10系统测试,发现在win10系统自带代理情况下,所有端口 privoxy 都做了处理… 按理来说我应该把它设置成只处理80端口,其他都drop掉 —————————————— v2ray的分流做得很好 可惜安卓客户端太渣 —————————————— python markdown2 渲染就一句话 最大的用处可能不在post文章,而是chat app —————————————— 如果 ssr 可以做混淆,那ssr肯定可以直接修改users agent —————————————— 大学生就是这样形成的 没有精益求精的追求,唯一的追求就是不挂科,60分万岁 —————————————— 官网是资源最多的地方 我肯定看了10遍,看不懂😂 —————————————— 求教如何连Http-proxy —————————————— 多开关几次就知道了 —————————————— 你玩过http注射器吗 我记得可以 但我从来不会用 —————————————— 如果这个可以强制开个vpn把所有流量往http-proxy里灌就好了 —————————————— SS不能直接用来隧道加密,学校和国家都会封 http转ss😂 行吗? —————————————— 还不如SS客户端稳定 —————————————— 安卓设备也是傻 http-proxy老是跳,不能强制,那要它何用? —————————————— 有,学校一检测到除网页登录的设备外的新设备,就断网 —————————————— 就是系统自带那个经常失灵,一失灵暴露user-agent就断网 不如电脑chrome插件 —————————————— 那安卓上有支持6.0以上的http-proxy client吗? —————————————— http-proxy自己会处理吧?😢一脸萌逼 —————————————— 同志们好,同志们辛苦了 —————————————— 还要保证那个特定ip的80端口不受限 —————————————— 现在只关注如何把局域网(192.168.*.*)其它80端口流量转到局域网某特定ip的8118端口 —————————————— 改user-agent这个在HTTP proxy已实现 —————————————— 快去快回 反正我看了好多介绍,还是不懂😂 —————————————— 亲 iptables是linux自带的,比较垃圾的路由只能用它 —————————————— 大神 这样吧,假设我路由的局域网地址是192.168.1.1,公网未知 我的http_proxy在192.168.1.238:8118 我需要用路由器上的iptables把所有局域网下非192.168.1.238:80的80端口流量转发到192.168.1.238:8118 How to do that? —————————————— NAT, or network address translation, is a general term for mangling packets in order to redirect them to an alternative address. Usually, this is used to allow traffic to transcend network boundaries. A host that implements NAT typically has access to two or more networks and is configured to route traffic between them. Port forwarding is the process of forwarding requests for a specific port to another host, network, or port. As this process modifies the destination of the packet in-flight, it is considered a type of NAT operation. 感觉网管比编程难一点 😁我真是垃圾 —————————————— 经常性的安卓手机不走http代理 妈蛋,必须从路由器用iptables把所有80端口流量转到局域网我的笔记本http-proxy上才行 —————————————— https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/the-structure-of-go/do-magic-control.html 字符串不能直接乘,Golang好垃圾 —————————————— 更新了 现在网络的问题解决了,让我们愉快地投入学习中吧! 虽然无意义的作业多得一逼。 —————————————— Fully uninstall one package in Ubuntu: sudo apt autoremove package_name sudo dpkg --purge package_name —————————————— #### Install Privoxy sudo apt install privoxy #### Change config sudo vim /etc/privoxy/config 1. Search listen-address and replace it with: listen-address 0.0.0.0:8118 2. Search enable-remote-toggle , enable-edit-actions and make sure they're enabled. 3. At the end of the file, add the following rules: # passby all https connection: forward :443 . # passby the login page: forward 192.168.138.180 . #### Change config through webpage 1. Open http://p.p in your browser 2. Choose View & change the current configuration 3. Find match-all.action and click Edit 4. Enable hide-referrer and hide-from-header 5. Find User Agent string to send, write down Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36 6. Click Submit at the the page 7. Remove or Delete all other rules you can see on those webpages. 8. In the end, it looks like this: +hide-from-header{block} +hide-if-modified-since{-1} +hide-referrer{block} +hide-user-agent{Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36} #### Use it with SwitchyOmega or Android Native WiFi connector —————————————— 搞定,5台设备满速稳定十分钟不掉 等会儿再来总结 —————————————— 不能直接在局域网建一个http proxy,然后这个proxy修改了80端口的UA数据再发包出去吗? 看起来挺高大上:https://github.com/sparanoid/proxy-cookbook/blob/master/HTTP/How%20to%20Bypass%20User-Agnet%20Check%20from%20APN%20Provider.md —————————————— http://music.163.com/song/2175282/?userid=280429778 —————————————— https://leetcode.com/problems/word-break/description/ —————————————— https://yingshaoxo.gitbooks.io/go-tutorial-for-pythoner/content/the-structure-of-go.html —————————————— calculus 微积分(这个中文名称毫无意义,明明calculate是计算的意思) 实际上包含极限、求导那些东西 —————————————— Python不能做到的,Golang也不能做到 比如完成对当前所在目录的 cd path操作 ,程序结束后你还是在原目录 —————————————— https://leetcode.com/problems/reshape-the-matrix/description/ —————————————— 看来我已经是智障了 —————————————— https://yingshaoxo.gitbooks.io/university-notes/content/high-level-math/function-limitation-and-continuity-of-function/what-is-function.html 原来要在文件管理里自己加一个 book.json (MathJax插件 https://www.npmjs.com/package/gitbook-plugin-mathjax#how-to-use-it —————————————— 最近我参透了一个大规律: 当前最流行的翻墙工具所基于的编程语言是目前流行或呈上升趋势的编程语言。 —————————————— 小姐姐是女装大佬吗? —————————————— 我绝对有理由相信,只有通过对一种语言的表达,你才能学会那门语言。 数学也是一门语言,所以你需要通过“表达”(表示)来记住那些东西。 —————————————— I don't need a blog for math showing, I need a notebook for doing note. https://yingshaoxo.gitbooks.io/university-notes/content/ —————————————— How to open a folder or file from terminal: xdg-open . xdg-open filename.txt —————————————— In fact, you can run a go program from code directly: go run hello.go —————————————— What the process run a go program! https://medium.com/@patdhlk/how-to-install-go-1-8-on-ubuntu-16-04-710967aa53c9 —————————————— https://leetcode.com/problems/valid-phone-numbers/description/ grep -P '^(\(\d{3}\) |\d{3}-)\d{3}-\d{4}$' file.txt —————————————— I'm gonna learn Go. https://twitter.com/Sentdex/status/920035426085191680?s=09 —————————————— 我不想、我不想,不想起床 我宁愿 永远都 这样懒洋洋 我不想、我不想,不想起床 强行起床 会让人 精神失常 …… 深爱我的床、我深爱的床 怎么能,变得空荡荡? —————————————— https://leetcode.com/problems/tenth-line/description/ sed -n '10p' < file.txt —————————————— 谢谢你的笑脸 明天开始写自己的基于MathJax的本地自检测.md文件改动的支持导出html的博客渲染程序 本地实时查看,远端挂在Github 因为我有太多 math formula 想写 同时做笔记必须有公式,最重要的是渲染成网页再转图片装逼 —————————————— 未来的路,我没想好,做网络架构,还是搞linux运维,还是搞前端开发呢? 以后再决定了,也许fullstack可以成为一个我的目标~,引用《纪实72小时》里的一句话“规划好的人生,太没意思了。” https://sakarahiroya.github.io/blog/#/post/你好大学/ —————————————— 一周过去了 —————————————— https://leetcode.com/problems/heaters/description/ 想了两天,今天晚自习看答案 —————————————— 防火墙怎么关? 是Linux系统内的还是服务器提供商? —————————————— 服务器的access.log里面一片空白 —————————————— active😳 —————————————— service v2ray status shows it's in active. —————————————— 不确定,又没检测方法 —————————————— After I asked one question to my closest friend, I understand some core ideas for electrical circuit analyzing. 1. Basic 串联:一条直线上多个元件 并联:两条平行线之间的两条垂线分别有元件 并联,电流相加,电压不变,电阻=(R1*R2)/(R1+R2) 串联,电流不变,电压值从+到-绕闭合线路到0,电阻=R1+R2 2. General Method 电流源模型变电压源模型,并联变串联,U=I*R 电阻留着不变 电压源模型变电流源模型,串联变并联,I=U/R 变化时电压+方向爲电流箭头方向 3. Special Situation 二端元件串联,电流不变 --> 与理想电流源串联,电流不变 --> 并联电路,电压不变 --> 既然在那条线上电压、电流都不变,还要那个电阻有何用?直接删掉。 —————————————— Updated, about how to use simple pinyin. —————————————— I'm doing nothing, but wasting my time. http://music.163.com/song/1938273/?userid=280429778 —————————————— 事实上我现在对女人、(男人、)影视、游戏都不感兴趣,而我头上又好像有一座大山阻挡我想出问题的答案。时光还在继续将我变得衰老。 —————————————— 😭[The error]😞 [Warning]App|Proxyman|Outbound: failed to process outbound traffic > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp 45.76.13.58:32012: getsockopt: connection refused] > Retry: all retry attempts failed —————————————— 最后我下了 released version,但还是连不上 —————————————— 几乎搞了一整天v2ray,连不上是闹哪样啊? 不是说 one for all吗? 我客户端也是用的同样的东西,但config不一样 —————————————— I spent five hours setting Chinese Input Method on my Lubuntu: https://yingshaoxo.blogspot.com/2017/10/how-to-set-chinese-input-method-on.html —————————————— You're right. —————————————— 一脸蒙逼,编译出来就成这样了😳 —————————————— 知道怎么把手机翻墙流量给电脑用了 直接 proxy server 转发一个1088端口,把它添加进ss白名单,开热点给电脑,电脑 switchyomega 添加个http proxy,然后一切OK 如果有双网卡的手机,一边连公共WiFi,一边电脑翻墙,不知道WiFi密码又如何?电脑特性容易检测又如何? 所有页面都变成了手机版 —————————————— 上次买的旋转椅被胖子室友故意跪坏了,这TM能忍吗? 作为一个coder没有好的坐骑怎么能行? 所以我买了这个(http://v.cvz5.com/h.G7R9Hx ),初次试用感觉还行。 —————————————— 写好了,等会儿和手机Post版融合一下组个class放入之前做的kivy容器里 真是 debug 5小时,编程5分钟啊😁 —————————————— 无意中登进了Dr.com的演示系统 发现它识别用户的方法是: 绑定MAC、CVLAN、PVLAN、IP —————————————— 哈,搞了几天selenium的安装,老是导入失败 最后我发现,from selenium import webriver 是什么鬼? webdriver —————————————— 你什么专业? —————————————— 原来电压从 plus end 出发,经过 closed circuit , 到达 minus end,电压降为0 由此可以列方程解变量啊! —————————————— circuit 电路 Schematic A schematic is a drawing of a circuit. A schematic represents circuit elements with symbols and connections as lines. Elements – The term elements means "components and sources." Symbols – Elements are represented in schematics by symbols.  Lines – Connections between elements are drawn as lines, which we often think of as "wires". Dots – Connections between lines can be indicated by dots. Dots are an unambiguous indication that lines are connected. If the connection is obvious, you don't have to use a dot. Reference designator – When you place a component in a schematic you often give it a unique name, known as a reference designator.  Node – A junction where 2 or more elements connect is called a node.  Branch – Branches are the connections between nodes. A branch is an element (resistor, capacitor, source, etc.). The number of branches in a circuit is equal to the number of elements. Loop – A loop is any closed path going through circuit elements. To draw a loop, select any node as a starting point and draw a path through elements and nodes until the path comes back to the node where you started. There is only one rule: a loop can visit (pass through) a node only one time. It is ok if loops overlap or contain other loops.  Mesh – A mesh is a loop that has no other loops inside it.  Reference Node – During circuit analysis we usually pick one of the nodes in the circuit to be the reference node. Voltages at other nodes are measured relative to the reference node. Any node can be the reference, but two common choices that simplify circuit analysis are: 1. the negative terminal of the voltage or current source powering the circuit, or 2. the node connected to the greatest number of branches. Ground – The reference node is often referred to as ground. —————————————— Inductor 电感器 Closed circuit – A circuit is closed if the circle is complete, if all currents have a path back to where they came from. Open circuit – A circuit is open if the circle is not complete, if there is a gap or opening in the path. Short circuit – A short happens when a path of low resistance is connected (usually by mistake) to a component. For example, a wire shorts out a resistor by providing a low-resistance path for current (probably not what the designer intended). —————————————— https://leetcode.com/problems/first-unique-character-in-a-string/description/ —————————————— 坐一下午图书馆没收获,该死的(电路基础)教材书,例题太少就无法(通过对比)发现一个通用的思维方法或解题方法。 —————————————— 卧槽,卡在电流与电压模型的等效变换上 一定得 hold 住,一旦成为电路分析大神,就可以操纵电路了 —————————————— https://leetcode.com/problems/binary-tree-paths/description/ —————————————— capacitor 电容器 a device used to store an electric charge, consisting of one or more pairs of conductors separated by an insulator. 2-terminal elements 二端元件 —————————————— 从电路学(如恒定电流为I)衍生出的 常量名用大写表示 另外,外国人定义电压源和电流源的符号真是简洁高效 —————————————— 我有试过挂网站制作,结果一个月没人理我 —————————————— 算法题已经解了80多道,马上快到100 再不解决一些实际问题,我就真成书呆子了😞 —————————————— 我的就业指导老师的老公是程序员 她今天建议我去接点软件开发的私活 请问什么是私活?在哪儿接? Dog —————————————— 听你的 无线先做电脑版的 —————————————— 初步测试了一下 联通网页版全局 login and logout using JavaScript 控制,缺点就是2011年由一个人写的,6年没变化,旧版JavaScript还是很难看懂的。 —————————————— 给一个数组,从第一位开始输出,每隔一个数,输出一个 —————————————— def output(nums): result = [] for index, i in enumerate(nums): if index % 2 == 0: result.append(i) return result print(output(x)) —————————————— 闭源软件,咱是不用的 —————————————— https://zh.m.wikihow.com/因式分解三次多项式?amp=1 学极限的加减乘除,呵呵 —————————————— https://m.sohu.com/a/126647371_465219/?pvid=000115_3w_a 说白了,我选的路也只能当 应用层软件工程师 —————————————— 所以我在大学的第一个装逼项目也就初步定型了 界面拿kivy-chat TIM版改 然后有线网登录没难度;无线网是联通做的网页,需要费点时间 —————————————— 我仔细观察了各地的校园网破解情况 发现针对网页版校园网,他们一般拿不出破解方案。 在mac, TTL, ipv6,DNS tunnel方法都失效的情况下,他们(包括gayhub的项目)唯一能做的,就是做一键登录工具。 —————————————— https://leetcode.com/problems/isomorphic-strings/description/ —————————————— Why I'm wrong? 1. Celling don't have to be wallpapered. 2. They say shaded wall will be ignored, that's it, do not doubt it! There are just one shadow. 3. Unit difference. —————————————— 花了一个晚自习看懂它,如果你把变量换成句子,你会疯的👍 —————————————— SI is the International System of Units—in French, Système International d'Unités. It is the modern form of the metric system and is the most widely used system of measurement. The system was published in 1960 as the result of discussions that started in 1948. SI is based on the metre-kilogram-second system (MKS). In the United States, the SI is used in science, medicine, government, technology, and engineering. —————————————— 其实我已经想了一整天,然后发现看不懂答案 —————————————— https://leetcode.com/problems/non-decreasing-array/description/ —————————————— ampere 安培 watt 瓦特 Volt The volt is the unit of electric potential difference—electric potential difference is also known as voltage. The size of 1 volt is officially defined as the potential difference between two points of a wire carrying a current of 1 ampere when the power dissipated in the wire is 1 watt. ohm 欧姆 —————————————— 稳定电压源 —————————————— @DIYdoge 你会做这道题的c和d吗?教教我呗 —————————————— Power 功率 Power is defined as the rate energy (U) is transformed or transferred over time.  An electric circuit is capable of transferring power. Current is the rate of flow of charge, and voltage measures the energy transferred per unit of charge. Electrical power is the product of voltage times current. in units of watts. —————————————— 我为考试,考试为我 听说这玩意儿挂科率高,烧脑 这半年烧脑的事要多做,不然再也没机会了😄 还有就是不补考,被企业录用的几率更大,还有什么优秀学生、奖学金什么的也需要不挂科的好成绩 —————————————— The electron move towards a lower energy state all by themselves.  we can guide electrons using wires and make them flow through electronic components —circuit design— and do interesting things along the way. —————————————— mass 质量 charged particle 带电粒子 electron 电子 spontaneously 自发地 —————————————— 按照最新的说法,把地铁修到偏远的地区是为了炒房 中国人真是一点没变,以前中国有钱就去买田当地主,而西方有钱就去搞生产、搞研发 现在中国人有钱就去买房。殊不知一场政变、一场战争后这房子还是你的吗?另一方面,买房不会使社会有自身的进步,只是抄袭西方罢了,等到没得抄时,就该落后了。 —————————————— 电路基础,搞电路板需要 —————————————— charge The concept of electricity arises from an observation of nature, We observe a force between objects, that, like gravity, acts at a distance. The source of this force has been given the name charge. A very noticeable thing about electric force is that it is large, far greater than the force of gravity. Unlike gravity, however, there are two types of electric charge. Opposite types of charge attract, and like types of charge repel. Gravity has only one type: it only attracts, never repels. Conductors and insulators 导体与绝缘体 current Current is the flow of charge. We use the d in formula to indicate tiny zero-sized change. resistor 电阻器 —————————————— 虽说py2还有几个月就退役了 kivy还没解决py3引入第三方包出错的问题 —————————————— Quicksort就是对Recursive原理的实际应用 —————————————— 我可能进入了高5,还是那种睡眠不足的高5😭 —————————————— https://leetcode.com/problems/average-of-levels-in-binary-tree/description/ —————————————— 然后我发现专科和本科老师讲的东西都差不多 就是学生水平不一样,比如英语我不用听,高数要专心理解,电力基础我应该会懵逼(明天上一堂课就知道了) 第一天就非常累,得早睡,不然每天6小时睡眠都没有 —————————————— 学电力工程纯粹是为了工作(专业需要),不是为梦想 除非引出梦想基于现实 或 AI以及网络需要硬件支持 不知该不该发到这里 —————————————— “不要问我正电荷为什么向左流动,负电荷向右移动,因为不统一定义,电力工程学世界就乱套了” —————————————— charge 电荷 —————————————— 12:00放学,1:20集合上课🌚 —————————————— https://leetcode.com/problems/relative-ranks/description/ —————————————— 这里主要讲了把世界分为两派,正和负,异性相互吸引,同性相互排斥 正因如此,把一根碳管接上电源,电源正负极会驱动碳管里的正负极运动 然后你在中间观察,how many changes pass by it per second is called current —————————————— current 现在,潮流,电流 voltage 电压 —————————————— Today's algebra class told me why we use letters: just for abstract meaning representation. —————————————— This is a confidential issue. Your comment will not be visible to the public. That's my bad, clicked the wrong button, making it confidential. —————————————— 它们好像真不收kivy应用 —————————————— 好像被管理员删了 —————————————— https://gitlab.com/fdroid/rfp/issues/375 Just waiting... —————————————— dr.com web loginning interface —————————————— 看Github上关于Dr.com的项目也只有登录而已,不知能否实现网络共享 —————————————— Mother fuck, from Internet manager to AI researcher, It's a huge gap. —————————————— How to do that? —————————————— 失败,还是试试拆包吧 —————————————— 好,谢了 —————————————— 直接粗暴地过滤掉所有非HTTPS的连接不行吗? 我想简单点 —————————————— 好,我试试 —————————————— www.v2ex.com/amp/t/389950 测试完成,服务器通过检测网页请求 是否来自安卓或其他手机设备 决定是否断网 我把电脑浏览器搞成安卓user-agent,瞬间掉线 —————————————— 😭 谷歌之大,无异于捞针 —————————————— 没关系,怎么改? 工具名或搜索关键词 —————————————— 这东西能直接从路由器改吗 终端设备修改好麻烦的 —————————————— OpenWrt不过是一个嵌入式Linux发行版 按理来说,它能做到的,我的Lubuntu笔记本也能做到,只不过没有别人已经做好的一键罢了。 现在最重要的是思路,我完全不知道网络服务商是如何检测到我开了3台设备的 —————————————— 在真实世界,对方法正确与否的检测方法需要自己找。 —————————————— 脚本写完了 但发现学校骗了我,转发WiFi原本就可以供一个手机用 三台机器直接断 —————————————— 那个固件脚本只支持.sh 所以我还得用.sh发一个post包... —————————————— https://leetcode.com/problems/judge-route-circle/description/ —————————————— 果然我学的东西不如一台路由好用 —————————————— 妈蛋,突然发现,无线路由下,不管哪台设备登陆了,全网有效 根本不用SSserver —————————————— 有道理,明天开始研究自动登录脚本 —————————————— 我的笔记本只负责网页认证和架SSserver —————————————— 我的笔记本不发无线,无线路由发 —————————————— 但笔记本上面有路由了 我是拿两根有线从接口到无线路由再到笔记本 —————————————— 有教程吗? —————————————— 因为我用路由器构建了局域网后,不知道如何把笔记本的流量发给局域网其他人用,除了架SS服务器 —————————————— 唯一的遗憾是,只能用SS上国内网,那国外网呢?总比没有好 —————————————— 搞定,路由器刷的固件有不降TTL和克隆MAC以及过滤VLAN标记的功能 再加上本地SS,妥妥的 —————————————— 成功了大概有一分钟 然后就把我的SSR package 丢包率提到的91%(俗称不能用),加密流量一刀切,我也是醉了 —————————————— 知道了 —————————————— 额…只能用polipo转一个http了 让我再试试 —————————————— 请回答这个问题 —————————————— 这个可以试试,但手机上有对应的http全局代理应用吗? 或者连socket 5的也行 —————————————— 关键学校是网页验证,不用笔记本开网页验证没网 —————————————— 有SS —————————————— 连SS的人 —————————————— 可惜 ssserver 没有前置代理 —————————————— 估计还需要一台外部SS —————————————— 失败了,我在笔记本开了SS server,上流用路由器做局域网 SS连上能用30秒,然后集体掉线 —————————————— 一个有线,一个无线 不知道如何在连上有线的情况下,构建局域网192.168.xx,并开WiFi让手机连上 我什么概念都不知道,所以只能这样搜索:Ubuntu上 有线网 与 无线发射 一起局域网 —————————————— 好,我试试 —————————————— @yEs_1_do 你们学校是绑定mac,那个简单许多 对绑定ip有何建议吗? —————————————— https://mfcoding.wordpress.com/2013/01/25/linux-opkg-download-package-and-then-install/ 我倒是有个OpenWrt的虚拟机可以下离线包,但那涉及到让虚拟机得到网络,而不是再跳出个认证网页 所以让我们暂时忘记这个路由器吧,投入如何突破限制、分享网络的探索中 —————————————— 路由器刷了 OpenWrt 后发现要手动更新 Web UI,然而没网更个屁啊👎 https://zhuanlan.zhihu.com/p/28430178 —————————————— var loginMatchMode=2;// // VLAN登录页匹配模式:0-默认;1-VLAN ID;2-IP;3-SSID;4-AREAID;5-AC NAME 绑定ip😄 —————————————— 我觉得我学校的有线网一点都不高大上,纯网页验证,然后网页里写满了中文备注 就算我不能破解它,写个自动登录脚本总可以吧(不然都不好意思说我是学的Python🙈) —————————————— 恩,我姐淘汰下来的旧产品,续航短保护腰椎 —————————————— 哈哈, hoodie肚子前的兜刚好可以稳稳地装下一个8寸平板 当然也可以放手 —————————————— 终于能上有线网了,但室友正霸占我的床,搞不了 —————————————— 签名成功 每次在图书馆大概能花200M流量 每次两小时,玩到笔电没电 —————————————— 还有就是,youtube客户端支持变速播放了,nice —————————————— 第一个正式开始的视频介绍了 linear algebra 分别从 physical, mathematical, computer science上 如何去理解。 最后得出 physics 上它是有方向的量 computer science 上它是 list 的华丽词汇 math 上它是综合了两种用途的抽象概念 And because of its detail representations and meaningful graph, It's a wonderful course for understanding linear algebra correctly. —————————————— https://goo.gl/R1kBdb —————————————— https://leetcode.com/problems/repeated-substring-pattern/description/ —————————————— 至于贴吧,更恶心了, 一大堆过期的国内网盘链接 第三方可能就个人网站比较好一点,但一篇文章或开源的东西就100多浏览,不构成社区 —————————————— 然后他那个垃圾社区,清一色不会写文档 同时大多数思想水平还停留在回复可见上 —————————————— 我只是在模拟在中国谷歌被封这个梗 —————————————— 然后代数课又讲了笛卡尔 connected algebra and geometry. —————————————— 我想高考大概是这个: 国际标准是用编程实现一个算法 中国高考非要你用易语言实现 然而你看不惯易语言的构造和狗尾续貂,以及一点都不和 主流编程思想和原生语言 相照应的感觉,同时闭门造车,不能用搜索引擎搜索到无穷无尽的学习资源 所以你选了 Python 虽然最后你能实现那个算法 但中国高考给你打了0分,因为你没按标准办事 究其根源,中国和国际是不一样的,中国特色**** @DIYdoge 结合你的情况加上我以前的感受做的评论 —————————————— 我发现能印各种标志的基本是 T-shirt 或者 卫衣 (卫衣来于英文SWEATER的说法,就是厚的针织运动衣服、长袖运动休闲衫,料子一般比普通的长袖衣服要厚。袖口紧缩有弹性,衣服的下边和袖口的料子是一样的) SWEATER?不就是毛衣吗?? —————————————— In the future, Apps is not only Apps, but a server, which stores everything of his user. So from this respect, we can see the Communist Party of China could using this efficiency of Internet to control all the people in China, from body to money. The good news is, you don't have to starve anymore. —————————————— Finally, I decided using this. 业余和专业之间的差距可能就体现在图标吧 —————————————— Now I need to design a logo for kivy-diary, or it'll be illegal using other's picture. —————————————— After saw this, I got some ideas about this process: https://developer.android.com/studio/publish/app-signing.html And for kivy app: https://github.com/kivy/kivy/wiki/Creating-a-Release-APK https://stackoverflow.com/questions/31743261/error-while-signing-an-kivy-app-for-the-android-store —————————————— In this article, he said this: Proposal by Submission Queue This is the simplest way to get the application included. But due to an amount of reviewer labor required for each application, this is the slowest method. Do this by creating a new ticket at the F-Droid Submission Queue on GitLab, add all details required by the minimal issue template; and wait for people in F-Droid team to review the application and do all necessary steps for you. https://f-droid.org/docs/Inclusion_How-To/ —————————————— 下次买件Ubuntu的 —————————————— 在淘宝买了这个,对于172的我来说M号有点短,还有,衣服图片是PS的,效果没有github那只白黑猫好看 —————————————— 熟练运用 recursive function Recursive approach: In recursive approach the function calls itself until the condition is met. And it is slower than iteration,which means it uses more memory than iteration. recursion is like a selection structure, and which makes code smaller and clean. And a function partially defined by itself. Here tracing the code will be more difficult in the case large programs. Iterative approach: Iterative approach is a repetition process until the condition fails,here loops are used such as for ,while etc. Here code may be longer but it is faster than recursive. And it consumes less memory compared to recursive approach.If the loop condition is always true in such cases it will be an infinite loop. —————————————— https://leetcode.com/problems/island-perimeter/description/ —————————————— 刚刚用我的破笔记本给室友的 斐讯k1 路由刷了一个第三方固件 第一次,也是成功的一次,刷了路由器(全程lubuntu) http://www.jianshu.com/p/ea0ea4305452(包自己找,局域网服务器自己架) http://www.upantool.com/gujian/asus/11050.html 坑在于刷了.bin文件后: 1、将要刷的第三方固件准备好。 2、断电按着reset键不松手,然后通电5秒后再松开reset键。 3、电脑与路由器由网线连接,打开浏览器输入http://192.168.1.1即可到达Breed Web恢复控制台,刷固件即可。 —————————————— Pea 同学送的手机到了: Android System 7.x + Root + 冰封应用 + Google Family = Wonderful (爽) —————————————— 看到爸妈的的照片,沧桑,心疼我没出息 —————————————— 不用鼠标操作,装逼感十足 就是坐太久腰会疼(还没从急性腰突中恢复) —————————————— 在来去自修区的路上瑟瑟发抖(下雨) 花了两个小时修改KivyDiary和看f-droid的文档,在思考Buildozer打包的问题(它不支持添加什么key之类的东西(大概是签名验证),每次生成的apk文件名都带debug啥的) —————————————— 这主要是为了对抗外部干扰,就和入耳式耳机一个道理(然后你可以手机控制电脑桌面,手上拿着电脑无线键盘,躺在床上玩,或者躺着看电影、电视剧,再也不用担心宿舍头顶耀眼的灯光了) —————————————— https://gitlab.com/fdroid/rfp/issues/351 原来提个issue就好了 不懂他们哪儿来那么多人去人工审核和编译 —————————————— 上次对着它的官方文档和项目看了半天,硬是没懂怎么上传 —————————————— 不对,是我不会 —————————————— 不敢什么? —————————————— 这界面TM做得真垃圾(我随便做个都比他强),再说这游戏估计没人玩吧(我都不会) —————————————— 现在摆在我面前有3个方向,走哪条路好呢?每条路都引向不同的未来。 渗透(黑客方向,实用) Tensorflow(机器学习方向,不实用) Bootstrap 4(网站建设方向,趣味性强) 先从简单的开始吧,Bootstrap 4 (感觉我说的每句话都是废话,不安,难道我会变成哑巴?) —————————————— https://docs.python.org/3/library/index.html 看了一遍,觉得python也不过如此 虽然比起C++核心库功能多了不少 —————————————— https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/description/ —————————————— x/y x divided by y —————————————— Algebra 课程除了讲它的起源,一上来就讲 abstract (寻找区分一事物的主要特征) —————————————— completion ≈ conclusion, ending, expiry, completion, end, finish —————————————— Dijkstra’s algorithm 不仅能用来计算路程最短 还能用来计算不同环节的不同方法之间如何搭配利润最大 (而 breadth-first search 只能发现如何花最少的环节到达目的地,并不关心(时间金钱等)消耗) —————————————— If you ran breadth-first search on this graph, you’d get the shortest path(, but not the fastest path). Look at this sentence, you could make one by yourself. For example: If you tried it out, you would find that google is the best search engine in this world. —————————————— 现在偌大的学校图书馆自修区,加上我才5个人。 —————————————— http://music.163.com/song/412175362/?userid=280429778 —————————————— 这世界总是那么多不确定的事发生,打乱个人计划和节奏 本来打算趁这几天空闲时间攻破校园网的分享问题 结果办网的把我登录密码搞错了,我现在根本连不上有线网,怎么整? 没了具体问题瞎看书进步很慢啊! —————————————— 看了 kill bill 1 ,除了反感日语部分(听不懂),一切还好 —————————————— 不知道,根本找不到插件的桌面图标,不知如何启动 没关系,反正现在先用着SSR —————————————— 听说很多企业招人都要求会SQL 以后有空我也学学😁 —————————————— https://leetcode.com/problems/third-maximum-number/description/ —————————————— 你那个安卓上除了第一次能连上,以后都提示未知混淆插件 —————————————— 我就是进去看看大佬聊天而已 —————————————— https://toutyrater.github.io/app/docker-deploy-v2ray.html 服务器端不用担心 客户端明天慢慢看: https://www.v2ray.com/chapter_01/workflow.html 晚安 —————————————— 不用试了,这东西的client只能在Windows上用 —————————————— 不用手机流量靠自己的服务器还翻不出来了😂 —————————————— 明天试试v2ray —————————————— 但却能ping通服务器 —————————————— 不对,小流量几分钟后自动 remote refused connection 主要是在笔记本上,真心怀疑linux系统有什么特征很容易被识别出来 —————————————— 加密 : aes-256-cfb 协议 : auth_sha1_v4 混淆 : tls1.2_ticket_auth 我这混淆一点用都没有,校园网情况下照样断 —————————————— ssr也被干(断) —————————————— 请教如何伪装 —————————————— SS connection 也断,完全不明所以 断开连接过一段时间又能连上。 在别人控制的局域网内真是没有自主权。 (别说无线了,上次去校联通营业厅办有线宽带时合同单上注明了是局域网,真应该在当时就严明拒绝,反正现在也连不上、或者上外网困难。(还没连上有线,营业厅放假没人,改不了密码) 不过要是它们把监控校园网这套技术搬到全国手机用户上,那专制就彻底形成了。 只是那样监控成本太高,所以只有高利润的垄断校园网敢这么搞,监控大学生比监控一群小学生有意义多了🌚) —————————————— 相对于我这个复读了一年的心理怪物(成熟老头),我寝室5/6的成员就像小孩一样 不知道他们要多长时间才能长大(抑或是专科层次永远“长不大”?) —————————————— 猜测: 用前置代理就可以避免在未有外网、还没给学校局域网交换机验证的情况下被抓到server ip。 目测我这边不是断的SS连接,而是直接重定向server ip 112.80.105.200 很明显是南京的我校某角落的server,能黑进去就可以改一个免费上网的账号或者直接对某server ip放行,然后被发现我就可以去蹲监狱了🙈 —————————————— https://github.com/Ssrbackup/shadowsocks-rss/wiki/Python-client-setup-(Mult-language) —————————————— https://github.com/ToyoDAdoubi/doubi First step, turn to SSR. —————————————— PING 45.76.13.58 (45.76.13.58) 56(84) bytes of data. From 112.80.105.200 icmp_seq=1 Destination Host Unreachable From 112.80.105.200 icmp_seq=2 Destination Host Unreachable From 112.80.105.200 icmp_seq=3 Destination Host Unreachable From 112.80.105.200 icmp_seq=4 Destination Host Unreachable ^C --- 45.76.13.58 ping statistics --- 13 packets transmitted, 0 received, +4 errors, 100% packet loss, time 12148ms pipe 9 It indeed somehow stopped my SS connection on school network, but this just a fight, and I'll win no matter what. —————————————— I almost reached the human average intelligence. —————————————— https://leetcode.com/problems/find-the-difference/description/ —————————————— 人还是需要不断学习和训练的,毕竟不同于机器,人训练的神经网络会随着时间的流逝而消退。(除非形成永久记忆,虽然我很怀疑永久记忆的存在,因为你能永久记住某个技能充其量是你经常能用到它,不管是有意识的还是潜意识的) —————————————— I want to ask you a question, why you learning English? It's important to understand your own purpose. In that case, you'll get strength from that willing. For me, it's a tool for learning everything. —————————————— 关于为什么在同一平面 以两个不同方向的向量为基底 可以表示 该平面任意一向量,你可以这么理解:通过常数乘法放缩V1和V2,你可以得到任意实数set V3. —————————————— 磨刀不误砍柴工 遇到不懂的专业名词还是查一下比较好 —————————————— collinear 共线 lying in the same straight line. —————————————— span extend from side to side of. Example: the stream was spanned by a narrow bridge —————————————— Ethernet a system for connecting a number of computer systems to form a local area network, with protocols to control the passing of information and to avoid simultaneous transmission by two or more systems. —————————————— The Internet is made up of intelligent end-point systems that are self-deterministic, allowing each end-point system to communicate with any host it chooses. Rather than being a network where communications are controlled by a central authority (as found in many private networks), the Internet is specifically meant to be a collection of autonomous hosts that can communicate with each other freely. This is an important distinction, and one that is often overlooked. For example, many of the private networks have offered mail-delivery services for their customers, allowing a user on one network to send email to another user on another network, but only by going through a predefined mail gateway service. Conversely, the Internet allows users to exchange mail directly, without going through a central politburo first. In this regard, the Internet is a collection of self-deterministic, autonomous hosts. 照这样看来,中国整个网络确是一个局域网。 文中讲到了Internet is an unique internet, which links the whole world. —————————————— to·pol·o·gy the way in which constituent parts are interrelated or arranged. —————————————— 管理员放假回家了,可能 岂不是要在无网情况下等7天? —————————————— https://leetcode.com/problems/invert-binary-tree/description/ —————————————— 失眠的时候怎么办?看一节数学课程。 What you can do when you can't sleep easily? Take a math class. —————————————— After I clicked Auto Ethernet, It's fine to connect to internet authentication webpage. 我的账号密码是错的,肯定是开户时管理员输错了,明天去联通问问 —————————————— https://qiuri.org/806.html 他们为何如此厉害 —————————————— 我们应该没学过连续可能性 做到一半睡着了... —————————————— https://leetcode.com/problems/sum-of-left-leaves/description/ —————————————— 得不到有效的睡眠,思考力降为0 我得赶紧睡一觉,醒来再做题 —————————————— 不会是梦游发过来的消息吧😒 —————————————— 我是半夜被蚊子咬醒的,你是怎么醒的?还没睡? —————————————— 不会刷坏吗? —————————————— 😆 —————————————— Genius! But my tablet doesn't have an option for Internet sharing. —————————————— 我已经在食堂尝试了三次,仍然不知道它是如何检测出我是笔记本并踢下线或断网 下次测试关闭SS,换个WiFi源(That depends on @DIYdoge 同学的手机什么时候到,我连密码都还不知道的) 明天可以去办有线宽带了,到时测试一下有线转无线 —————————————— It's so difficult to understand iptables: https://www.linode.com/docs/security/firewalls/control-network-traffic-with-iptables It's easy to understand it: https://www.hostinger.com/tutorials/iptables-tutorial What makes the difference? The writing ability. —————————————— Its is similar to his, means 它(他)的。 —————————————— WiFi Cracking: https://www.shellhacks.com/how-to-use-aircrack-ng-wifi-password-hacker-tutorial/ https://www.hackers-arise.com/single-post/2017/06/27/Wireless-Hacking-Cracking-the-WPA2-PSK-with-aircrack-ng https://github.com/brannondorsey/wifi-cracking 原来这就是暴力破解WiFi,Middle strength passwd 跑半个月,全是数字十几分钟。 —————————————— 没 root permission 的孩子只能走弯路 —————————————— 你可以 fake AP(伪造一个无线) 去获得密码,但这建立在你能骗过万能钥匙的情况下,不然没人知道公共场所的WiFi密码。 —————————————— no —————————————— 最新版的蜘蛛侠选择回归动漫风格 还行 —————————————— https://security.stackexchange.com/questions/62663/how-did-my-network-admin-identify-my-iphone-and-how-can-i-hide-my-id 这上面说,防止流量分析最好的方法是,全局加密代理 可是 linux terminal 上面的流量基本是明文的,我似乎没办法彻底把 Laptop 伪装成 Android —————————————— 行!总算知道怎么一键转发网络(WiFi或有线网)了 —————————————— https://github.com/oblique/create_ap 360WiFi发射器不支持 AP master mode,不能直接用来架WiFi,万恶的360肯定做了诸多限制(也可能是我这个发射器坏了) 没双网卡就不能够一边连无线、一边发无线 —————————————— https://leetcode.com/problems/range-sum-query-immutable/description/ —————————————— Good night, everyone. —————————————— I don't have to master those things in a short of time. The main task right now is disguise my laptop to Android. —————————————— Nobody can stop me from following my dreams! (Speak with tears) —————————————— ARP DHCP DHCPv6 DNS DoIP Dot3 Dot11 Ether ICMP ICMPv6 IP IPv6 LLC NTP Padding PPP RadioTap Raw SCTP SNAP SNMP STP TCP TFTP UDP How many keywords you know about network? I know 5 of them. —————————————— Review myself, I just walk from World Wide Network to Local Area Network(LAN), and stuck in there. —————————————— How to force yourself speak English? Just speak! —————————————— 安装好了但不知怎么进入 OpenWrt Web GUI 任重而道远啊,怪不得计算机系的学生要专门拿一学期学网络 —————————————— 还有一种情况:一群人,每个人想一个不同的方法,三个臭皮匠,顶个诸葛亮;如果每个人接受同样的教育、不独立思考,全想出一样的方法,那一群人=一个SB。 —————————————— 关于智力,我又有了新的理解: 面对同一个问题,高手可以有多个解法,普通人只有一个或无法解答。 智力越高,解决问题的方案越多,选择越多,路越宽。 —————————————— 图书馆从10月1号起闭馆4天,要不呆在食堂,要不忍耐不爱学习的室友发出的无良噪音。 —————————————— 我原本的想法是得到三年空闲时间做自己的事 —————————————— https://wiki.openwrt.org/doc/howto/virtualbox https://lede-project.org/docs/start 安装好了,准备进入下一步学习 —————————————— What is OpenWrt? OpenWrt is described as a Linux distribution for embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developer, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned. —————————————— https://www.mtzero.org/2016/08/30/openwrt-和-校园网-ipv6/ 严重地思考我是不是落后了一个时代🌚 —————————————— https://gaomf.cn/2017/04/25/Linux_SoftRouter_Basic/ 好高大上,看不懂 —————————————— the...the是用and并列的,他们一起共享Twice —————————————— https://leetcode.com/problems/ransom-note/description/ —————————————— 不靠谱的室友 深夜都还在寝室大声喧哗、打方言电话、放低音炮、放无聊的综艺节目 咱也只能趁他们都睡了的时候做做自己的事,或者白天在厕所里speak English or 普通话 —————————————— 好吧,let's talk about my coder 生涯面前的两座大山: 1. High Level Mathematics,没它看不懂 Deep Learning Book 2. Computer calculate power,没它无法做 Android or iOS developing 这两座大山都要花很多时间去翻越,剩下的 as I thought,是处理大学专业学习和对我而言很复杂的人际关系。 最最重要的是,这样东西有点空,我需要超级小的任务块,不然都是空谈 —————————————— https://libgen.pw 救命稻草 —————————————— 没准用 Python 做渗透测试更稳定 https://github.com/dloss/python-pentest-tools —————————————— 有时想想我们真卑微,知识传递靠盗版 穷人看不起好书,只能看政治宣传等无用书 —————————————— Now I feel better. —————————————— 突然发现 http://gen.lib.rus.ec 炸了 这下怎么下书... —————————————— 还得再找找 —————————————— https://forums.kali.org/showthread.php?36392-bash-ifconfig-command-not-found!!! 安装完最新版Kali,发现我下的那几本 渗透书 都过时了, ifconfig 是不能用的 —————————————— 恩 —————————————— @DIYdoge 不要硬撑,有需求就告诉我,我一定帮忙(转账) —————————————— 现在只差 @DIYdoge 的小礼物,我就可以用免流或者用流量解决网络问题了 每月30个G,不看电影、电视剧、不在线听歌,再配合宿舍联通送的24个月每月200小时的WiFi,应该满足图书馆学习、宿舍娱乐的需求 —————————————— 现在在泡图书馆,发现数学类和专业编程类书籍非常新,同时出版日期也比较靠前(2016),这下我数学可以恶补一下了 —————————————— 这样的话,我是不是得手动写个过滤器,把所有连接的head改一下 —————————————— mac地址改了 —————————————— 直接这样子搜索,谷歌是找不到答案的,更别说百度、搜狗那些 很奇怪,对这一块完全不知道怎么(开始)搜索 —————————————— @ShinoharaRin 网络请求中能暴露哪些设备信息?无线路由是通过什么手段识别你是linux还是安卓手机的? —————————————— https://leetcode.com/problems/first-bad-version/description/ —————————————— 不开心,这次改了MAC和hostname在食堂多撑了10分钟(也许是5分钟) 然后就断线了,怎么都连不上 如果用平板连就不会下线 突然感到自己的能力很弱,不知所措 —————————————— 愚蠢的中国人从来不知道什么叫做反抗。 —————————————— 完全掌控是权力(能力)的开始,就像Android无Root权限、计算机不用Linux系统,你永远只能被宰割。 —————————————— 真心没想到校园网这么恶心,让我什么都不想做 活该中国大学生不思进取、中国永远落后 —————————————— https://leetcode.com/problems/contains-duplicate/description/ —————————————— Mac changer may be help. Next time let me do that. I have confidence anyway. —————————————— 那么问题来了,路由器或Wi-Fi管理软件是如何知道我的呢? 按理来说,linux是可以随意更改标识的 —————————————— 在食堂连上了网,掌柜比较坑,直接禁止了我电脑的联网,还好有平板 —————————————— http://www.purplemath.com/modules/factzero.htm 这道题更偏重数学原理 —————————————— https://leetcode.com/problems/factorial-trailing-zeroes/discuss/ —————————————— 看了两章,可能这本2015出的书过时了 Mastering Wireless Penetration Testing for Highly Secured Environments 到第三章时觉得还是编程有趣,破解主要是用现有的各种工具 —————————————— 也好,customers 总是喜新厌旧,和他们直接接触的东西过时最快。 —————————————— 不过你仍然可以用 Python 研究计算机科学等高端的东西。 只是不和 customers 直接接触。 —————————————— 如此一来 Python 的局限不在于它自己,而是那些 haters。 就算用kivy编译出了可执行文件,应用市场不收录或者(iPhone)平台无法安装,那就出现了问题。 此时我们保持高傲,就只能做 web application. —————————————— 提交了 KivyDiary ,遭下架 不知道为什么 Google Play开发者是要付费的,所以我还是继续一个人玩吧。(装B浪费时间) —————————————— 它给的工程包明显是Java的构架,让我这种用三方语言写APP的人怎么办 —————————————— 上传App什么时候变得如此复杂了 —————————————— 没什么收获 为什么呢?有以下几个方面: 1. 每本书开始以及第一章都一大堆介绍,要不就是太简单了我知道,要不就是太复杂了我不理解 2. 用我不用的工具链(比如Windows OS),(话说这是一个新方向,我也不明白为了少交12倍的网费去看那些乱七八糟的东西干嘛) 3. 没好的网络,不能边看边干 —————————————— 找了两本 penetration testing 书来看,希望能有所收获并破解掉校园网 If the cost to protect your data is too expensive for you or your employer, then it can be assumed that all of your data has no value. —————————————— 想到智力在半年后停止发育,还是有点伤心呢 —————————————— https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/ —————————————— 程序员那份高傲怕是治不了了 —————————————— https://leetcode.com/problems/valid-palindrome/description/ —————————————— Two questions you should ask yourself when you want to solve a problem: 1. Is it possible to solve that? 2. How to solve it in a better way. —————————————— 我以前的高中是别人捐赠的路由器和带宽 —————————————— 学会了这个,我就能计算到达目的地的最短途径了,少走点路 —————————————— https://leetcode.com/problems/linked-list-cycle/description/ —————————————— 感觉大学除了学习(我个人主要是学算法、高数、Advanced English,学校课程另算)无所事事,身边没朋友,(没人能达到我的水准在学校范围) —————————————— Checking for duplicates is very fast with a hash table. —————————————— https://leetcode.com/problems/excel-sheet-column-number/description/ —————————————— 怀疑自己智商,想睡觉 —————————————— 这本书也看到了hash tables —————————————— After trying, I learned from official solution that hash table is just a dictionary data structure. —————————————— https://leetcode.com/problems/intersection-of-two-linked-lists/description/ —————————————— https://leetcode.com/problems/remove-linked-list-elements/description/ —————————————— 形式看着简单,就是看不懂,我深深地怀疑中国数学教育十几年=0 —————————————— https://leetcode.com/problems/minimum-depth-of-binary-tree/description/ —————————————— linear🙈 —————————————— 学了 liner algebra 就能看懂那本AI书经常出现的数学公式了 —————————————— I have a dream: living in America, do programming and AI research. —————————————— kiloliters 千升 —————————————— https://leetcode.com/problems/path-sum/ —————————————— 我还没去开通有线网络服务,还要等一等,先用几天免费限时WiFi吧 —————————————— 如何区分学校采取的哪种技术模式呢? —————————————— 这个好,到时候请你指导一下,我慢慢来研究,毕竟上网还是蛮重要的。 —————————————— 这个学校和联通都一个尿性 ,联通有线还需要使用流氓软件,不是宽带账号密码那种形式。 —————————————— 我也很无奈,快递晚点了 —————————————— https://leetcode.com/problems/maximum-average-subarray-i/description/ class Solution(object): def findMaxAverage(self, nums, k): """ :type nums: List[int] :type k: int :rtype: float """ # Another one which arrive time limite if len(nums) <= 1: return float(nums[0]) sum_ = [] added = 0 for num in nums: added += num sum_.append(added) result = sum_[k - 1] for i in range(k, len(sum_)): new = sum_[i] - sum_[i-k] result = max(new, result) return result / float(k) # Time limited m_nums = nums result = -999999 for _ in nums: if len(m_nums) >= k: result = max(result, self.get_average(m_nums[:k], k)) m_nums = m_nums[1:] return result def get_average(self, list_, k): all_ = 0 for i in list_: all_ += i return all_/float(k) —————————————— I see, my tablet will arrive in today maybe. That means I can continue do my mind training or programming practice. —————————————— OK, after I saw the solution: class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ if prices == [] or len(prices) == 1: return 0 max_profit = 0 min_price = 9999999999 for price in prices: if price < min_price: min_price = price else: profit = price - min_price if profit > max_profit: max_profit = profit return max_profit —————————————— Time limited. class Solution(object): def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ if prices == [] or len(prices) == 1: return 0 result = 0 for index, price in enumerate(prices): may = list(sorted(prices[index:])) if price > may[-1]: return 0 else: profit = may[-1] - price if profit > result: result = profit return result —————————————— https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ —————————————— .. Yeah, with a little bit tired. —————————————— I'm OK today . —————————————— https://leetcode.com/problems/intersection-of-two-arrays-ii/description/ class Solution(object): def intersect(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ result = [] for num in nums2: if (num in nums1) and (num not in result): result.append(num) r = [] for n in result: r += [n] * min(nums1.count(n), nums2.count(n)) return r —————————————— See you next time. —————————————— This is the first day of my training, It's ok as far as now. —————————————— https://leetcode.com/problems/power-of-four/description/ class Solution(object): def isPowerOfFour(self, num): """ :type num: int :rtype: bool """ n = num if n <= 0: return False import math if (4 ** round(math.log(n, 4))) == n: return True else: return False —————————————— https://leetcode.com/problems/power-of-two/description/ class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ if n <= 0: return False import math if (2 ** round(math.log(n, 2))) == n: return True else: return False —————————————— I forgot my Android Table, so the only way I can keep in touch with you guys is to use my notebook. And the internet of my school is gabage, I have no choice but use my SIM data... —————————————— 亲爱的群友,明日清晨我将来一场一去不回的旅行,望安好。 http://music.163.com/song/474567580/?userid=280429778 —————————————— Beats 65% class Solution(object): def hammingWeight(self, n): """ :type n: int :rtype: int """ return format(n, 'b').count('1') —————————————— https://leetcode.com/problems/number-of-1-bits/description/ —————————————— 看了两页,是本好书 —————————————— 说到就要做到 开启书籍搜集模式 —————————————— termux没用,既没有控制键,ssh又不如connectBot方便 —————————————— docker run --name pyaudio -it leocnj/pyaudioanalysis /bin/bash 开了代理都会pull超时,本来还想分析一下我喜欢的音乐平均beats是多少 —————————————— 花了点时间把它看完,学到好多缩写 https://www.khanacademy.org/computing/computer-science/internet-intro —————————————— 等这一切结束后我想写一篇文章介绍针对腰椎的各种正确和不正确 https://kknews.cc/other/z6j9zl.html —————————————— 上传成功 你们可以试一试,我只增加了消息缓存和断线重连: sudo docker run -d -p 5000:5000 -p 5678:5678 --name mathchat yingshaoxo/mathchat 最近听说国内评论都得实名制了...,我没加用户名还是个正确的选择... —————————————— 挂康复科号1元,医生对我做了初步检查,几个动作下来没一个感觉痛 然后打算叫我做CT扫描,247元太贵了,身上没现金就回来了 现在摸一摸背部,好像原来突起的地方变平了... 我要不要再回去做检查呢? —————————————— 不行,时间不等人 我要马上去医院挂号 —————————————— @system357 你是不是太久没翻墙技术生疏了 什么混淆、新加密的没耳闻吗 我 Web_Math_Chat 生产版做好了,现在 docker 有三层 layer 死活传不上去,肯定我翻墙姿势过时了 —————————————— https://leetcode.com/problems/pascals-triangle-ii/ —————————————— Sorry, but I can't help, I'm a little bit nervous now. —————————————— 十万行代码到底要写到什么时候,github没统计吗 —————————————— 论把自己代码写好备份的重要性 1. 直接抄袭 2. 方便下次用那个知识点时回看 PS: 感觉当时写AIxiaoya的代码都比我现在写得好 —————————————— 明天去医院挂骨科 希望可以搞点证明材料 然后逃过军训(没准真能检查出什么毛病) —————————————— 准备去收拾各种电子产品到行李箱了 从四川到南京,还是有点远的 —————————————— https://discuss.leetcode.com/topic/102540/some-question-about-this-problem OK, now we can keep going. —————————————— 主要是数据太少我无法分析 要是给三个不同长度的list,我一看它生成的tree就知道怎么回事了 —————————————— 我主要是不懂一维list和 binary balanced tree之间的关系 我除了看见[]就是[3,5,8]这样的东西,超过3个就不知道它是怎么排列的了 那不是蒙着眼睛去撞墙吗? —————————————— https://discuss.leetcode.com/topic/10519/an-easy-python-solution 原来root在中间,出题人可以去死了,我要给👎 —————————————— 没限制,我觉得这道题不应该出现在easy级别 简直是坑小学生 —————————————— 看来需要预先由公式和总node数算出levels,然后再算出每一level的 node 数,最后把单一数组按level分开,最后再由root添加node 除此之外实在想不出怎样从底层向上 —————————————— 设计这道题的人真是SX,它不给例子我怎么知道它所谓的 binary tree 是怎么和一个 list 对应的😡 —————————————— Still learning http://interactivepython.org/runestone/static/pythonds/Trees/BalancedBinarySearchTrees.html —————————————— http://algorithms.tutorialhorizon.com/find-whether-if-a-given-binary-tree-is-balanced/ http://www.cnblogs.com/loadofleaf/p/5502335.html This question is tougher than I thought. —————————————— Giving a proxy to docker using polipo in ubuntu 0. Make sure you have shadowsocks running in the background https://yingshaoxo.blogspot.com/2017/07/bypass-great-firewall-by-using.html 1. First, set a http_proxy sudo apt install polipo sudo vim /etc/polipo/config add following and save it: proxyAddress = "0.0.0.0" proxyPort = 1088 socksParentProxy = "localhost:1080" socksProxyType = socks5 sudo service polipo restart Now you got a http_proxy at localhost:1088. 2. Give that proxy to docker sudo vim /etc/default/docker add or change to export http_proxy="localhost:1088/" sudo service docker restart —————————————— https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/description/ —————————————— 当一个人真正成为合格的 program developer, 他会发现除了职业病以外他什么也不怕。 —————————————— Once I read a sentence: somebody's life ends in college entrance exam, and somebody's life is just about to start. —————————————— If you really want to do some art working on Linux, this maybe a good environment for you to use: https://ubuntustudio.org —————————————— https://leetcode.com/problems/binary-tree-level-order-traversal-ii/description/ —————————————— Maybe 再加上我好像说了很多实话,她可能感觉到自己太渺小了吧,无意识地抵抗 —————————————— 我要做一只孤独的单身狗! —————————————— 和那个女同学吹了 她英语比我少4分 然后她竟然不满我一直和她讲英语,I don't understand anyway. —————————————— 特辑:什么是爱? 爱 = 占有欲 + 保护欲 = 我的东西我能不保护吗? Any objections? —————————————— https://leetcode.com/problems/maximum-depth-of-binary-tree/description/ —————————————— As you know, docker is a good tool free us from installing so many AI packages. But GreatFireWall took that from us, It's unforgivable. —————————————— The difference between RUN and CMD in docker RUN is executed while you are building an image. This is usually used to install things or perform modifications in the resulting image. CMD is executed when the container is started. Use this to e.g. start applications. —————————————— 刚刚还想做个自动踢人的bot,网络太差,就没搞了 现在换了新VPS,感觉非常好 —————————————— 那个 Web-Math-Chat项目在我脑中构思得差不多了 但实现起来还是有些困难,比如第一步bootstrap的CDN link是被封的,不翻墙网页就白纸一张,就算我把它们放到本地托管,mathjax如果也是被封的,我就没办法了 另外我服务器买来用了一年多,怕是处于严厉的监控中,今天抽风得我都受不了了,不知是不是做网站暴露ip的缘故。以后有学生证就用廉价的学生云挂网站 最后我也不确定SS或其AES-256-CFB协议是否过时 —————————————— ASCIIMath 最好用🌚 —————————————— @system357 μMath+不好用,不能自由上下移动元素 —————————————— https://revisionmaths.com/gcse-maths-revision/trigonometry/sin-cos-and-tan —————————————— https://leetcode.com/problems/symmetric-tree/description/ —————————————— 不对,是原厂搬的,只是为了打开国际市场,利用Facebook和Google Game —————————————— 天天大富翁又被搬到迪斯尼,叫做 Disney Magical Dice —————————————— https://www.cs.swarthmore.edu/courses/cs21book/build/ch21.html —————————————— https://pythonspot.com/en/python-tree/ —————————————— https://leetcode.com/problems/same-tree/description/ —————————————— 误解了,是那群屌丝聊农药 我在班群里只发现一个喜欢英语的女孩,但她很快退了群(She said it's boring) 然后,我用英语和她私聊了一会儿 —————————————— 那些东西还好,关键聊王者农药,实在受不了 到时候再看 反正 Global Internet 是我的精神家园 —————————————— 我大学的班级50人 男女比例28:22 目前从腾讯班群已有的22人来看,智商情况不容乐观(无意义的词汇刷得越多、越快、智商越低) 目前,我的首要任务是发现那些喜欢英语的同僚(似乎只有女生)(逛空间) —————————————— https://leetcode.com/problems/add-binary/description/ —————————————— Naruto doesn't have much skills, but he was working hard to training those skills again and again. In the end, It can be useful. And certainly, you can't learn so many skills at once. Learn it one by one, train(use) it everyday(everytime), that's why he succeeded. —————————————— We just use number to measure the difference, in this way, it can be accuracy. —————————————— Nothing will happen if you stick on the place you used to be. —————————————— https://leetcode.com/problems/merge-two-sorted-lists/description/ —————————————— 不用list没办法分组,对我来说 That's the easiest way I can do. —————————————— palindrome a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run. —————————————— https://leetcode.com/problems/palindrome-number/description/ It makes no sense. If I could just send a link, why I'm wasting my time to copy so many text. —————————————— We can keep going now. —————————————— All right, that guy leaved. —————————————— Even Github is getting locked. —————————————— docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io: no such host. Not again! It's been killed by GreatFireWall! —————————————— 唉,实用主义者 你花时间调试、吐槽那些新设备也是很费时间的啊 不如像谷歌一样,约定好时间,每隔几年就大换血 —————————————— 什么东西越是 unchangeable、越是需要,什么东西就越值得买。 比如 chair and desk,they won't change in a long time. —————————————— You may think it's easy, but actually no. To me, I have to keep my waist straight as long as I can. (laying down) So I won't waste too much time on tweaking things. (watching Anime) —————————————— Nothing more, but disappointing. —————————————— 坚决不用镜像之安卓包污染事件 —————————————— 不设代理连头文件都获取不到,设了远端http_proxy又慢得要死🌚 —————————————— 给docker翻墙真是伤透了心 分别用了docker的polipo和实体的polipo,全都建设http proxy失败 —————————————— 卸载了 —————————————— 不知道为什么,我的手总是在游戏界面点个不停 明明都是极其简单的重复动作,为什么喜欢没日没夜的干个不停? 可能这就是傻瓜思维吧!(贪图享受,不愿思考) —————————————— 它那自动剪辑掉重复相似帧的能力不像是人工编码搞出来的 —————————————— I gave it a try to Quik today. And it's amazing. They must pay a lot to develop it. —————————————— I don't wanna talk too much since I've been grew up. —————————————— 感觉现在看知乎上关于IT的东西,一群垃圾,比起以前,差远了 国内什么鬼服务一旦向大众无限制开放,立马就水了、就布满广告了、就低端了,把验证码改成智商题是个好办法→→不过目前国内普遍的做法是把内容藏起来(藏到native app里),你看不到就不会觉得它们弱智了😂 —————————————— 刷机机型由易到难 第一梯队:pixel/nexus 第二梯队:一加/小米 第三梯队:华为/三星 —————————————— This probably is the easiest way for music classification, do you think so? https://github.com/tyiannak/pyAudioAnalysis#an-audio-classification-example —————————————— … —————————————— 是不是小姐姐来了?! 我暗自窃喜😊 —————————————— I have truly confidence in my aesthetics. —————————————— 在开始 dirty my hands 之前,我需要想方设法把我在网易云音乐所有喜欢的歌搞到 Google Drive,不然以后下歌会越来越难 —————————————— 数据本身就是差异信息,如果全是一样的比如0,压缩后根本不占空间 而差异信息最直观的就是声音,因为人们早就学会用声波图研究声音( Wait a minute, 声音不就是音波吗) 所以我首先从音波处理做起 —————————————— 有没有基础的书籍?别一上来就是给一片地区的房价,去做关于那方面的分析... —————————————— AI分好多类 视觉、听觉、触觉,这些是按人的感官分的类 再基础一点,就是决策机制 其中决策的依据是预测 预测的依据是函数模型或人工神经网络 —————————————— 好 —————————————— 难道还没连接上或者第一次连接失败都会诱发on_close吗?明明还没connecte,何来connection closed —————————————— 那就两个都绑定,close立即刷新,error等5秒自动刷新网页 —————————————— 自瞄那件事我是无能为力的,计算机太差 可以做点慢速的数据处理 —————————————— 那我们应该从何开始呢? 各种理论还是一个具体的模块? —————————————— Set http proxy on VPS with one command docker run --name proxy -d -p 9999:8080 jkernech/http-proxy https://hub.docker.com/r/jkernech/http-proxy/ —————————————— 电脑可以不用买新的 过一段时间,熟悉了学校后直接买个小型服务器,不光配置高、24小时运行自定义程度也高 —————————————— 现在你可以构建你的家庭云影院了(下载成功后chrome可以直接在网页上调用MX Player,或者你再单开个server做文件展示)(你可以让迅雷去吃*),只差到zeronet取磁力链接 https://hub.docker.com/r/jpillora/cloud-torrent/ docker run -d --name download -p 3000:3000 -v /root/downloads:/downloads jpillora/cloud-torrent --auth 'yingshaoxo:password' —————————————— 类似teletram web的websockets自动重连,是绑定on_close还是on_error? —————————————— 前面讲到的人们为什么会忘掉高中的知识,作为对比还有,真正的高手,对于学科的掌握,早已突破学级的限制,在它眼里,小学、初中不存在,高中、大学没区别,它对于学科的理解,早已融入生命。 你要说它学的东西没用?不可能,知识已经塑造了它的人格。 —————————————— 不过你想想是不是有些不公平 像我妈那代人在工厂越来越辛苦的干活,工资却越来越少 即使她们的确越来越不爱学习(除了学习几个简单的依靠练习来提高熟练度的动作) —————————————— 当我提出这个想法时你们不要觉得奇怪 Because the traditional way of programming has been out of date little by little. I can strongly feel it when I see an idiot could also programming based on native GUI. —————————————— Tell me any where I go you will follow. 谷歌的输入法真是屌爆了,滑动输入快到不行 —————————————— 好, learning AI from tomorrow. —————————————— 不模拟人的神经不太可能做出有自主思想的东西 人有计算得失、利益的思想,这种思想根植于动植物的基因里,驱使它们繁衍生息。 —————————————— 一切都因为我高一看了本介绍人工智能可能实现原理的书(中文)。 —————————————— 虽然想搞清楚什么是人工神经网络 但看了很多介绍,还是不懂😆 —————————————— 举个例子,你能明白人是如何处理声波差异的吗?一百个人有108种特色,你还是能听懂它在说什么 这种人类无法给出具体逻辑过程的东西,只能交给模拟神经自己去摸索差异信息背后的规律 —————————————— http://music.163.com/song/36664350/?userid=280429778 —————————————— 换句话说,把“天才”量产化 —————————————— 他们把更深层次的逻辑处理当成AI,简直可笑(就好像把爬虫当成毕业设计) https://hackernoon.com/making-the-web-more-accessible-with-ai-1fb2ed6ea2a4 真正的AI是 有着人所不能直接理解的逻辑深度 的处理能力的 东西。 —————————————— 我就是vultr —————————————— 最近我的服务器经常无法访问 过一段时间后又会好 —————————————— 接下来是做一些cookie逻辑(让用户有更好体验)和提高稳定性(做一些watch dog进程) http://yingshaoxo.cf:5000 —————————————— https://hub.docker.com/r/yingshaoxo/mathchat/ —————————————— 好吧,我去在开始里插一个多进程 —————————————— 好复杂的感觉 —————————————— 但是RUN只能用来安装package,会新建一层container —————————————— 我这样放,最终执行的是app.py,server.py没运行: CMD ["python", "/usr/src/app/server.py"] CMD ["python", "/usr/src/app/app.py"] 但如果这样放,最终执行的server.py,app.py没运行: CMD ["python", "/usr/src/app/app.py"] CMD ["python", "/usr/src/app/server.py"] 我该怎样放才能两个都执行呢? —————————————— 又似乎是我打包的问题 我好烦 —————————————— 竟然用laji闭源iPhone —————————————— 表示看不懂官方的例子 https://docs.docker.com/engine/reference/run/#expose-incoming-ports —————————————— 来,举个例子 —————————————— 直接点吧,网上说的多端口用两个 -p xx -p xx 的办法行不通,docker永远只暴露第一个-p指的端口 所以我无法连到websockets服务器 你们知道如何 docker run 时指定多个端口吗? —————————————— 花了160买了个2手iPhone 4s,升级到ios9后没感觉卡 —————————————— 不可能,用docker就是要整和服务 我以后没准还要把zeronet暴露在服务器 —————————————— 我知道,但还是不行 —————————————— 我知道,但蹦错的几率太高,尤其在3的情况 —————————————— 成功啦,py3程序就是得用FROM Python:3.6才行,用官方教程所用的FROM alpine肯定出错 现在的问题是websockets如何穿透docker?试了直接暴露对应端口,无效 —————————————— 不让每一个孩子因下不了镜像而失去学习的机会。 —————————————— University of Science and Technology of China https://lug.ustc.edu.cn/wiki/mirrors/help/docker —————————————— 我只是不想用国内服务,你急啥 一年前安装了三次你说那个网站的东西 —————————————— I don't know —————————————— https://blog.codeship.com/using-docker-behind-a-proxy/ —————————————— docker啊!!,原生代理还是http_proxy,过时了 —————————————— 要不你就加个前置路由代理,可硬件那么好买吗?贵死人还各种限制 —————————————— linux命令行只能设置http_proxy 这样的话像docker这样的衍生品在国内无法用 只能用别人的闭源木马修改版。 —————————————— Polipo is no longer maintained When it was first written, Polipo was probably the best HTTP proxy available. Since then, the web has changed, and HTTP proxies are no longer useful: most traffic is encrypted, and a web proxy merely acts as a dumb intermediary for encrypted traffic. https://www.irif.fr/~jch//software/polipo/ 第一次感觉到linux过时了,在代理方面 —————————————— linux这个开放的系统,到了中国,明文的http下载与更新和不支持全局代理,太糟糕了 Even I use proxychinas,也无法使用docker 以前用一个第三方转socket到http,麻烦 为啥不转HTTPS?因为命令行模式下无法设置proxy_https=xx 我指无法正常使用 —————————————— 所以它的镜像需要安装它的软件 Let's say no to that. —————————————— No, definitely no. https://docs.docker.com/compose/ —————————————— compose算吗? —————————————— 它那里只有下载安装脚本 没讲怎么替换镜像啊 —————————————— 为啥 —————————————— 不支持socket 5的docker,在中国下载镜像有慢到死的危险(连续5次报timed out error) https://blog.codeship.com/using-docker-behind-a-proxy/ —————————————— It's hard to get my docker image work. 用了一个flask app to serve index.html,但就是运行不起来 😞对开发者不友好,对运维友好😞 —————————————— I watched this TED Talk and thought you would find it interesting. Juan Enriquez: What will humans look like in 100 years? https://go.ted.com/CyQx Learn more about watching TED Talks on all of your favorite platforms: https://www.ted.com/about/programs-initiatives/ted-talks/ways-to-get-ted-talks —————————————— 从未见过如此复杂的安装 —————————————— Install docker on ubuntu: sudo apt-get remove docker docker-engine docker.io sudo apt-get update sudo apt-get install \ linux-image-extra-$(uname -r) \ linux-image-extra-virtual sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce —————————————— 其实我是懒,不想一两年之后再去学新东西 —————————————— 接下来准备制作一个docker镜像 不知道我这么脑残能不能成功上传到docker club —————————————— 官方例程有问题 —————————————— Problem Solved: import asyncio import websockets connected = set() async def consumer(websocket, msg): print(msg) for ws in connected: if ws != websocket: try: await ws.send(msg) except: # Unregister connected.remove(ws) async def consumer_handler(websocket, path): # Register. global connected connected.add(websocket) while True: try: msg = await websocket.recv() await consumer(websocket, msg) except: pass start_server = websockets.serve(consumer_handler, '0.0.0.0', 5678) asyncio.get_event_loop().run_until_complete(start_server) asyncio.get_event_loop().run_forever() —————————————— 我不明白为什么用 finally: ,那样的话每个连接自动断线,还保持什么长连接、做什么信息分发? https://websockets.readthedocs.io/en/stable/intro.html#registration —————————————— 不过各地美女除了北京 都有一个特点:张口心碎(方言) 那样美丽就掉价了 —————————————— 我不单应该拍照纪念,还应该问问她联系方式 奈何自己长得太丑没勇气😔 —————————————— 咦?垃圾iPhone 5连文件管理器都没有,还不支持从相册蓝牙传图 —————————————— 今天在公交车上碰到一个超美的美女,美得清新脱俗、让我赞叹不已,只可惜我没能拍上照 给个背影你们体验下吧: —————————————— 建议美图秀秀开发这个新特性。 —————————————— 我原先构想是做一个名为“美不美”的APP,用以实时告诉审美缺失的人自己够不够美丽,从而辅助她们化妆。 —————————————— 你想知道如何让你的审美观留存于世吗? 很简单,从现在起,准备10个文件夹分别标记为1到10,每次遇到心仪的美女图片就给它评个分并放入对应文件夹,坚持两年,搜集上千张图片,然后做分类器。 这样不光你的审美观保留了下来,还可以在你约会被冲昏头脑时帮您做出正确的选择。 —————————————— 并表示,死也不安装Windows到自己的机器 —————————————— Trust me, I won't buy another phone until I got Google Pixel. —————————————— It's a bad idea for me to learn so many different programming languages. Because that's useless, you won't be able to create any useful package if you only know little about a language. —————————————— 我放弃 https://leetcode.com/problems/longest-harmonious-subsequence/solution/ —————————————— 这道题好难啊,我快要放弃了 —————————————— 那就算了😒 —————————————— 第二台我搜不到配置 你说下内存吧,大于1.4G就要了 —————————————— 你有没有旧电脑嘛 我收购😄 —————————————— 我姐退下来的旧货😂 —————————————— 这样看来我还是得买新电脑。不支持usb3,什么事儿啊!害我活生生把一台卡米机变成了真黑砖😡 https://read01.com/zPP76o.html#.WZwR3XURVSB —————————————— Can't use adb shell, so I googled it. This is error because your window version haven't driver for usb 3.0 to receiver authenticate permission from phone. I spent 5 day with this bug. So what the fuck! Now I know why I always fail!!! —————————————— https://media.weibo.cn/article?id=2309351000784136455516596686&jumpfrom=weibocom TWRP(Team Win Recovery Project),原来这个是刷机必备 —————————————— https://plumz.me/archives/1759/ 膜拜大神,一股脑儿把全部.img文件刷进去也不会出事 —————————————— https://github.com/LCTT/TranslateProject/blob/master/published/201405/Ubuntu%20Touch%20and%20Android%20Dual%20Boot%20Installation.md 看起来好高级、好想要,可是我不会😂 —————————————— 更重要的是,我搜了有几天第三方recovery,没找到通用的下载平台 这让人很难过啊 —————————————— 让我告诉你真相,获取root要Windows,我不会再安装win到我的笔记本 然后直接刷带root的系统是我在ubuntu唯一的选择,可是刷机有风险,我好烦 —————————————— 我爸妈硬是要给我买个手机 然而我什么都不想买,不能Root拿来干嘛? 有些手机比如小米,还要刷开发版,,,说实话,我已经刷怕了,来一个坏一个,家里经济受不了啊! 然而淘宝、京东也没有卖开发专版或已root的手机😢 —————————————— 😭 你们都是土豪 @system357 —————————————— 留学? —————————————— 你的学校要交多少一年? —————————————— 不买电脑省的钱都交给学校了😞 —————————————— @bdbai 卧槽,公立学校除去吃饭,一年全部费用加起来有7300 这正常吗? —————————————— 594. Longest Harmonious Subsequence We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer array, you need to find the length of its longest harmonious subsequence among all its possible subsequences. Example 1: Input: [1,3,2,2,5,2,3,7] Output: 5 Explanation: The longest harmonious subsequence is [3,2,2,2,3]. class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ https://leetcode.com/problems/longest-harmonious-subsequence/description/ —————————————— 求提升,除了做算法、补基础数学思维外有何捷径? 答案:没有,谁叫你以前不好好自学! —————————————— Google这个账号做得不错 —————————————— Check out @GoogleFacts's Tweet: https://twitter.com/GoogleFacts/status/897624103263375360?s=09 —————————————— 这下对了,这题太坑了,谁知道charges是收费,15.6%是指借出去的贷款啊! 还有,每个月收取1.3%的费用,简直是高利贷! —————————————— 15.6%是基于谁的百分比? —————————————— 什么叫 annual finance rate of 15.6 percent ? 不是应该把of前后对换吗?比如 55 percent of people —————————————— A credit card company charges an annual finance rate of 15.6 percent. What is the MONTHLY rate charged on any unpaid balance? charges不是代表消费?你去试下翻译软件,没一个有借鉴意义 —————————————— 其实我有点慌了,看不懂是怎么回事啊? 你知道什么意思吗? @bdbai —————————————— I see it now. It's more stable than PC on my internet situation. —————————————— Hey, why you can use your phone do this coding? —————————————— Never mind, that's a stupid system. —————————————— Beats 55%, 52ms # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ one_set = set() node = head previous = None while node: if node.val not in one_set: one_set.add(node.val) previous = node else: previous.next = node.next node = node.next return head —————————————— 83. Remove Duplicates from Sorted List Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ https://leetcode.com/problems/remove-duplicates-from-sorted-list/description/ —————————————— +1 —————————————— 于是你就可以搞一套回复可见的帖子两年后自动去除限制,大家都可见的系统 —————————————— 我仔细想了想那套机制,实际上不完善 保护知识产权可以,但是也有限度,不然就会阻碍时代的发展 举个例子,美国专利法规定某类科技专利只能保持10年,10后专利自动失效,大家都可用 —————————————— 还得吐槽一点,论坛要回复是哪个无耻小人发明的,最讨厌了,好像回复点垃圾信息有意义一样 http://bbs.xiaomi.cn/t-3249498 —————————————— 似乎官方表示有些没上锁,http://www.miui.com/shuaji-393.html 下次还是用三方recovery卡刷吧 线刷好危险 —————————————— 不知道还要搞坏几台才能学会刷机😳 http://www.jianshu.com/p/f77950bbbbaa —————————————— 红米系列就是垃圾,连续两个在不同平台都刷坏😒 —————————————— 又把主板烧坏了。。。 点电源键没反应😒 —————————————— 奇怪,红米note刷机包里根本没有那三个img文件 极有可能是我需要线刷包,而不是普通版 —————————————— 现在国内的直连网络,没了ADM根本没法下载,慢得要死 chrome弱鸡的断点续传在国内根本没法用,几分钟就断了 —————————————— 我还要下刷机包 http://m.blog.csdn.net/wzy_1988/article/details/37883771 —————————————— I must give it a try: http://www.chole.io/blog/linux-android-adb.html —————————————— Check out @Sentdex's Tweet: https://twitter.com/Sentdex/status/899057144884015104?s=09 —————————————— 超级吊的自瞄 —————————————— 我最多拿这个东西写一下解题过程... —————————————— https://github.com/mkulesh/microMathematics/releases —————————————— 你有更好的资源吗? —————————————— 下午继续 —————————————— 手机坏掉了,在平板重刷几十道数学真是要把我虐死 —————————————— class Solution(object): def missingNumber(self, nums): """ :type nums: List[int] :rtype: int """ # Beats 53% return set(set(range(len(nums)+1)) - set(nums)).pop() # Beats 23% nums.sort() for index, num in enumerate(nums): if index != num: return index return nums[-1] + 1 —————————————— 268. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, Given nums = [0, 1, 3] return 2. Note: Your algorithm should run in linear runtime complexity. Could you implement class Solution(object): def missingNumber(self, nums): """ :type nums: List[int] :rtype: int """ https://leetcode.com/problems/missing-number/description/ —————————————— 老实交代,你今天是不是看了别人的算法 —————————————— 不好意思,状态不好,看不懂他们的代码 https://discuss.leetcode.com/topic/93695/python-straightforward-with-explanation —————————————— 原谅我可怜的大脑 演算了半天得到这么个👻 —————————————— Beats 22% class Solution(object): def maximumProduct(self, nums): """ :type nums: List[int] :rtype: int """ nums.sort() def product(list_): return int(eval('*'.join(str(item) for item in list_))) positive = [] negative = [] for num in nums: if num < 0: negative.append(num) else: positive.append(num) p_len = len(positive) n_len = len(negative) if p_len >= 3: A, B = 0, 0 A = product(positive[-3:]) if n_len >= 2: B = product(negative[:2]) * positive[-1] return max(A, B) else: return A if n_len >= 3: A = product(negative[-3:]) if p_len >= 1: B = product(negative[:2]) * positive[-1] return max(A, B) else: return A if n_len >= 2 and p_len >= 1: return product(negative[:2]) * positive[-1] —————————————— 人家是高富帅,年薪人名币几十万 —————————————— 估计就是吓唬人,谁傻谁登记 —————————————— @bdbai 你进行了兵役登记? —————————————— “每天早上6:40集合,冬天跑操,夏天做操;7:20检查宿舍,被扣分就完蛋了,宿管部要求每天必须有宿舍被扣分;8:10上课,课间十分钟,除了拖堂就是拖堂;12:00放学;13:30又开始上课,午觉别想了;17:30下课,如果你有9、10节课的选修,很不幸,一直上到19:00;19:00晚自习,强制性的,周日到周四,迟到学习部扣分;20:40结束;21:30查宿舍,22:00熄灯,23:00断网,电不断,但是不熄灯扣分。” —————————————— 还有坑爹的半军事化管理,一周有几天比高中还累 —————————————— 我学校11点断网,艹了狗,我以后怕是还得研究下免流才行 —————————————— 等会儿发到共享网站上去 我就名垂谷歌了😂 —————————————— Once for all, 修复所有问题,这下你可以用第三方语言愉快地开发 web chat app 了😘 —————————————— {"title": "Easy Language"} —————————————— Show me the codes —————————————— 628. Maximum Product of Three Numbers Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Input: [1,2,3] Output: 6 Example 2: Input: [1,2,3,4] Output: 24 Note: The length of the given array will be in range [3,104] and all elements are in the range [-1000, 1000]. Multiplication of any three numbers in the input won't exceed the range of 32-bit signed integer. class Solution(object): def maximumProduct(self, nums): """ :type nums: List[int] :rtype: int """ https://leetcode.com/problems/maximum-product-of-three-numbers/description/ —————————————— 在ZeroNet的TV网站发现了火影忍者的英配版 听起来不错,一季32集,目前有4季 —————————————— 实际上看,哪儿冒出这么个BUG? —————————————— 表面看还OK —————————————— 我难道只能给你看一些无聊的文字? No, I'm gonna show you some codes. —————————————— 我以为我的复习班考上很多本科,其实基本是专科… —————————————— 像我腰突前,单手举40斤哑铃,肯定是错的,腰肢两侧负重不均匀,再加上割痔疮时做了背部注射麻醉(腰椎受损),又加上手术后卧床两周腰肌退化,再加上在医院菊花几紧闪(伤)了腰,最终导致急性腰突。 急性腰突发作首先得躺在硬板床4天,然后再慢慢做康复锻炼。 —————————————— 用它进行锻炼9天后,感觉腰背部肌肉硬如铁,腰突确实有好转 http://well-health.cn —————————————— Beats 88.69% class Solution(object): def checkRecord(self, s): """ :type s: str :rtype: bool """ import re if s.count('A') > 1 or re.search(r'(?:L{3,})', s) != None: return False else: return True —————————————— 551. Student Attendance Record I You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : Late. 'P' : Present. A student could be rewarded if his attendance record doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late). You need to return whether the student could be rewarded according to his attendance record. Example 1: Input: "PPALLP" Output: True Example 2: Input: "PPALLL" Output: False class Solution(object): def checkRecord(self, s): """ :type s: str :rtype: bool """ https://leetcode.com/problems/student-attendance-record-i/description/ —————————————— 反正我用这个,win7上各种手机助手都连不上手机。。 虽然看上去多了几个USB接口 —————————————— 玩了12个小时的游戏😭 肯定现实不如意 —————————————— Show Android USB in VirtualBox in Ubuntu sudo adduser your_ubuntu_user_name vboxusers or sudo usermod -G vboxusers -a your_username Then reboot. —————————————— 腾讯版本你花几十万人民币都得不到的卡片 直接白送 —————————————— 旅游大亨 —————————————— 我是故意作弊的 —————————————— 算法也会过时 随着时间的推移,硬件越来越不成为问题,那些为了节省空间而增加算法复杂度的东西会被淘汰 —————————————— class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ # Beats 44.9% try: while True: nums.remove(val) except: return len(nums) # Beats 44.6% nums[:] = [n for n in nums if n != val] return len(nums) # Beats 29.3% for _ in range(nums.count(val)): nums.remove(val) return len(nums) —————————————— 台服一上来就送S卡,绝了 —————————————— 27. Remove Element Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place with constant memory. The order of elements can be changed. It doesn't matter what you leave beyond the new length. Example: Given input array nums = [3,2,2,3], val = 3 Your function should return length = 2, with the first two elements of nums being 2. class Solution(object): def removeElement(self, nums, val): """ :type nums: List[int] :type val: int :rtype: int """ https://leetcode.com/problems/remove-element/description/ —————————————— 现在看起来好多了 接下来需要写JavaScript —————————————— 直接用 text-left 和 text-right 出现了奇怪的效果 我们看书都是从左到右,习惯了左边是对其的 —————————————— Good practice 因为如果文件分离,安卓Chrome会自动缓存,然后修改js后刷新无效,只有全放一起不缓存 然后只有chrome全面支持ES6 —————————————— 我不管,反正都在一个html文件里😏 —————————————— 这样看来 html比kivy好写多了 —————————————— 害我忙了几个星期[黑脸] —————————————— 就改一个css属性就可以了,这么重要的东西怎么从没见人提起过? .list-grounp { position: absolute; width: 100%; height: 100%; overflow: scroll; /*if the content extends beyond width and height use the scrollbar*/ } —————————————— 实际上惨不忍睹🙈 —————————————— 表面上看着还行 ——————————————

hi, world.

hi, world.

好尴尬啊,我还是没搞出带滑动条的无限box… —————————————— Beats 61% # Definitkion for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteNode(self, node): """ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead. """ next_node = node.next node.val = next_node.val node.next = next_node.next —————————————— 懂了 —————————————— 你意思是这道题无解?😱 —————————————— 关键我怎么知道它只给了那个节点的访问权? 我试过给每个节点赋值(node.val = xx),都可以啊… —————————————— 搞半天也没懂它叫我 delete 哪个 node —————————————— 237. Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, the linked list should become 1 -> 2 -> 4 after calling your function. # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def deleteNode(self, node): """ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead. """ https://leetcode.com/problems/delete-node-in-a-linked-list/description/ —————————————— 看到这里: https://getbootstrap.com/docs/4.0/components/card/ 我决定自己动手写一个UI Bootstrap Components 比以前增加不少,我记得以前用的最多的就是 container —————————————— Basically, bootstrap is well designed and easy for use. And it belongs to Twitter, I love that so much. https://expo.getbootstrap.com —————————————— 程序员健康工作之用tide 如果再不强制作息,估计眼睛会出问题 今天躺着把笔记本放身上,然后看不清屏幕,吓到了 —————————————— http://music.163.com/song/22492637/?userid=280429778 —————————————— 我怀念我的键盘和一看就是一整天的无所不能的屏幕 —————————————— 就好象你有一个工具囊 里面的东西并不比别人高级 但比别人的数量多一倍,同时类别也更多 —————————————— 抛去那些浮华 你会发现会英语也只能学一些基础的东西,你是绝对搞不懂超过你智商的东西的 唯一不同的是,你可以选择学其他国家普通的东西,而本国没有或不是原产 —————————————— 做英雄刷新时代怎么这么难呢 —————————————— 这是一个悲伤的故事 MaxJax总共有60多M,估计没人想用其他语言写一遍 所以我们只能在web上搞,然后做 webview 内嵌 —————————————— 通通不行 —————————————— 致命 突然发现那个chat ui使用的模板技术不支持换行 替换成
也不行 —————————————— 安卓还可以搞音乐,虽然没有旋律生成器自己搞很难听 —————————————— https://www.youtube.com/watch?v=ZpoyoPSiB3M&feature=youtu.be&t=1m14s —————————————— 他们为了达到目的真是无所不用其极,看了下面的方法,我觉得我的就是通用且最好的了: def isPowerOfThree(n): return n in [1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401] —————————————— 开始自己写了个beats 0.1 的神作😄 —————————————— Beats 32% class Solution(object): def isPowerOfThree(self, n): """ :type n: int :rtype: bool """ if n <= 0: return False import math if (3 ** round(math.log(n, 3))) == n: return True else: return False —————————————— 326. Power of Three Given an integer, write a function to determine if it is a power of three. class Solution(object): def isPowerOfThree(self, n): """ :type n: int :rtype: bool """ https://leetcode.com/problems/power-of-three/description/ —————————————— 要是没有实质性的创新或处于垄断地位 就别去做别人已经做得很好的产品 除非有傻子花钱雇你做 ——致APP开发者 —————————————— 可惜它不再更新了,永远不能被称为 legend. —————————————— 神奇的 recursive function,总感觉遍历了 (list length)²次 —————————————— 递推证明 —————————————— 其实不用太关心你学到的具体信息和知识在十年后有多少会变得没用,而要重点关注你是否在学习、运用这些知识解决问题的过程中建立了自己的认知习惯和思维框架。这些东西,不夸张地说,能让你终身受益。 —————————————— 2、快速学习,学习能力是所有人都需要的,但程序员的学习能力要求不同,加上快速二字比较妥当,因为程序员的学习需要和实践高度统一,面对一项全新的技术,一天读文档入门两天写代码试水三天基本上手一个礼拜就要出活儿是非常正常的速度,这就要求程序员的学习,必须快速抓住核心、理清脉络,略过枝枝蔓蔓的细节知道哪里有答案就可以了,剩下的就是在实践中逢山开路遇水架桥掉坑了就认栽,先爬出来然后骂街,而这种学习的习惯形成之后,无论在哪个领域用起来都能把别人吓一跳,感觉你跟万事通一样——啥玩意都知道——其实台上一分钟,台下十年功,他们都不知道这根本就是程序员的日常。 https://www.zhihu.com/question/60044384 —————————————— 有没有一个程序历经十年还能用? 有 坚持10年更新,是出名 坚持20年更新,是传奇 —————————————— 我有时想象我是天空 遮住整个地球 这让我很有成就感 —————————————— 传说程序员都是害羞综合症患者 在网上活跃,在现实连妹子都不敢勾搭 —————————————— I'm really happy doing elementary school mathematics. —————————————— Beats 95% class Solution(object): def rotate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: void Do not return anything, modify nums in-place instead. """ length = len(nums) if length not in [0, 1] and k != 0: front = nums[-k:] end = nums[:length - k] nums[:] = front + end del nums[:len(nums) - length] —————————————— 189. Rotate Array Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. class Solution(object): def rotate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: void Do not return anything, modify nums in-place instead. """ https://leetcode.com/problems/rotate-array/description/ —————————————— good night —————————————— But after ES6 standards established, It becomes object - oriented programming language. —————————————— Old JavaScript for Class Method var func_as_class = { name: 'function, but do what class can do.', init: function() { this.description = "I'm a " + this.name this.print_info() }, print_info: function() { console.log(this.description) } } one_obj = func_as_class one_obj.init() —————————————— 好了 解决外部调用消息接收与发送的问题 发现老式JavaScript的类实现方法竟然是把function变量化 —————————————— 用JS好想die啊 超过一个手机屏幕就数不清{}了 就算知道哪行报错也解决不了😭 —————————————— 没有 chrome + F12 根本没法写JS 完全不知道错在哪儿 —————————————— +1 卸载了游戏 —————————————— 关键是 the 它既可代指前文中出现的某样东西 又可代指大家都清楚的某样东西(而大家都知道的只有我猜的数字,我不知道它的数字) 总体来说,这道题有问题 —————————————— 我数学不好的原因之一 不是很会从题目找出所有条件 —————————————— 哦 容我再想想 —————————————— 看不出来 —————————————— none —————————————— class Solution(object): def guessNumber(self, n): """ :type n: int :rtype: int """ low = 1 high = n while low <= high: mid = (low + high) // 2 if guess(mid) == 0: return mid if guess(mid) == 1: high = mid - 1 else: low = mid + 1 return None —————————————— 我加上整除照样不能用[生气的说] —————————————— 像这个算法书给出的二分法是错的,只能二分一次,其余都是遍历…艹 —————————————— 其实二分查找有坑,比如遇上奇数怎么办 —————————————— 374. Guess Number Higher or Lower We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I'll tell you whether the number is higher or lower. You call a pre-defined API guess(int num) which returns 3 possible results (-1, 1, or 0): -1 : My number is lower 1 : My number is higher 0 : Congrats! You got it! Example: n = 10, I pick 6. Return 6. # The guess API is already defined for you. # @param num, your guess # @return -1 if my number is lower, 1 if my number is higher, otherwise return 0 # def guess(num): class Solution(object): def guessNumber(self, n): """ :type n: int :rtype: int """ https://leetcode.com/problems/guess-number-higher-or-lower/description/ —————————————— Good night —————————————— 总之,一个语言要想成为全能王 用户基数是少不了的 而用户基数哪里来?简单易懂,对使用全球化语言的用户友好,自然用的人多。 —————————————— 睡不着了,诶 感觉你们都比我强 —————————————— 惹急了做啥Chat消息框 直接文本重复+编辑框 反正网页上信息不持久、不稳定,经常刷新 —————————————— Py是万能的 —————————————— No problem —————————————— 我认为 除了web的native实现不能干 py啥都能搞 其他语言都被虐成渣 —————————————— 不确定的东西最讨厌了 —————————————— 鸡肋 —————————————— https://hackernoon.com/javascript-vs-python-in-2017-d31efbb641b4 —————————————— See what I found: http://www.transcrypt.org/home —————————————— I'd like, but I can't, because my health problem. —————————————— And for Python, It's not a full stack language, It can't even handle a web client. You'll always need some other languages to help you reach a goal. Say, Javascript. —————————————— In spite of that, I must say, even I could understand a lot of words, that doesn't means I can use it freely. I guess that's why people call it passive memory. —————————————— 我并没有找到同类的国外语音输入法 —————————————— And of course I would like to speak english rather than write English. Normally, I'll make so many mistakes on spelling. So, 讯飞语音 is good for this case. —————————————— There must have some reason for it. For example, I haven't got so much exercise on it. —————————————— Let's see, even though I reached a high level of english, I'm still not capable to write english easily. —————————————— 我现在的状况是不敢坐在电脑前超过20分钟 整体90%的时间得躺着 我想对于不能把屏幕投射到天花板的计算机爱好者,这是末日 不能用键盘,也是末日,低效率的情况下,根本不想码代码,因为感觉入不敷出 —————————————— 差远了,py没有this —————————————— 那个作者难道不知道它把发送消息的function内置到一个无名function导致整个程序华而不实,不能套接网络模块吗? —————————————— 刚刚试了class去封装那个Chat UI的JS 失败 它调用了非常多的 this 有些我完全不能理解 比如: this.$button.on('click', this.addMessage.bind(this)); —————————————— 开发这个的人是傻叉吗? 搞得这么复杂难以理解 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this —————————————— 谢谢 —————————————— 我懂了 —————————————— $('button') 那这个是指取html中的按钮作为jQuery的一个按钮类或变量? —————————————— @bdbai 类似 cacheDOM() { this.$chatHistory = $('.chat-history'); this.$button = $('button'); this.$textarea = $('#message-to-send'); this.$chatHistoryList = this.$chatHistory.find('ul'); } bindEvents() { this.$button.on('click', this.addMessage.bind(this)); this.$textarea.on('keyup', this.addMessageEnter.bind(this)); } 里面的$是什么意思啊?传址吗? —————————————— 我这是4.4 和安卓有啥关系,我是说那些JS软件 —————————————— 我感觉无爱了 安卓上都是老引擎 —————————————— 好了,开启弹窗 不会错过信息了 —————————————— class Dog { constructor(name) { this.name = name; this.do_it(); } do_it() { console.log(666); } } // console.dir(Dog); —————————————— Still —————————————— 怎么会报错? —————————————— @bdbai JavaScript的class里,做一些function的初始运行都是在 constructor()里吗?会不会读不到其下的函数? —————————————— I watched this TED Talk and thought you would find it interesting. Marc Raibert: Meet Spot, the robot dog that can run, hop and open doors https://go.ted.com/Cy9m Learn more about watching TED Talks on all of your favorite platforms: https://www.ted.com/about/programs-initiatives/ted-talks/ways-to-get-ted-talks —————————————— Beats 94% # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def reverseList(self, head): """ :type head: ListNode :rtype: ListNode """ if head == None: return [] current = head previous = None while current: next_ = current.next current.next = previous previous = current current = next_ return previous —————————————— https://www.codefellows.org/blog/implementing-a-singly-linked-list-in-python/ —————————————— 206. Reverse Linked List Reverse a singly linked list. # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def reverseList(self, head): """ :type head: ListNode :rtype: ListNode """ https://leetcode.com/problems/reverse-linked-list/description/ —————————————— I really love 表达自己的观点与想法。 —————————————— What you say about it? —————————————— 第二节,开始上学 人脑如计算机,智商高像2G内存,智商低像1G内存,但真正起作用的是程序。即使是256M也可以运行一个实用的程序。 在学校这十几年,各种学科在我脑海中混合。让我发现了一个道理:任何事物的特性都是吸引,即万有引力。 产品好坏的评判标准是吸引力大小,包括瞬间的和持久的。用户每日花在上面的时间越多,产品的吸引力越大,就越好。 一个人的优劣标准也是吸引力大小,他展示得越优秀,越是吸引你。你恨不得关注他的每一条动态,事实上,你关注他越多,你就越想为他做点什么(明星代言原理类似)。所以营销的高级手段,就是推销自己,把被吸引者变成粉丝,再售卖你的产品。 一个人每天的时间是有限的,可以说,生存线以上,最宝贵的是时间,不管是你个人的还是亲人的。然而时间的延长等于生命。有的人每日花10多个小时在工厂做工,就是把时间、吸引力给了工厂的产品,好让产品具备一定的吸引力。 从这一点说,使人们节省时间、提高效率的东西会被推崇。 “黄”是对一种繁殖欲望满足感的依赖。“赌”是一种期待变数、相信挑战的情绪的依赖。“毒”的本身就是依赖。 依赖关乎信任、信念,是洗脑魔力的源泉,也是受吸引力法则影响的产物。越依赖,越洗脑,影响力越大。 所有的程序不过是对数据进行处理。计算机是计算什么的呢?数据。数据的另一个称呼是信息,所以有“信息技术”这个词。 人所有的脑力活动也是对数据进行处理。综合看来,电脑是对人脑的外延(外部延伸)、是人类改造世界的有力工具。 文字是数据的表现方式之一。数据的本质是事物的差异。对于计算机来说0.5和1/2没区别,代表同样的概率。所有事物的差异都可以用数字的大小关系等价代换。 因而机器能学习,因为你把人类能理解的差异变成了计算机能理解的差异。 少数原则: 它是指少数人的能力与多数人的能力相等,但由于它更为集中,常常使得少数在较长时间左右多数人。 这是个周期,少数人会被推翻,但在一个极短的时间内。大部分时间还是少数压榨、奴役多数。 举个例子:信息是被加密的。 在一个语言系统中,基础语言(母语)是大家喜闻乐见的大众语言。但由于太多人懂它,不适合把知识或是其他有用的、关乎统治者命门的东西用它来分享、保存。 所以我们要“加密”。加密过程中要保证群体的小范围、精英化,所以我们多用另一种语言来代替。在中国,英语、古汉语、学科专业术语都有可能被用作加密的工具。 社会是一个金字塔,人员会流动,但阶层是固定的,forever. 智力的本质体现是预测的时间长度与准确度。 人类进化后发现用通讯软件发即时信息比口耳相传高效。 虽然大多数人都这样做,但还是摆脱不了自然交流的欲望,所以他们需要言谈类节目 from radio or video. 所以真理是:小部分人说,大部分人听,而被倾听则成为享受(多数人追求的目标) 。 Math+English+Programming是绑在一起的 Math提供理论,English负责表示,Programming负责实现 他们共享着差不多的世界观 —————————————— 把平板全拿来学习显然不科学 学习娱乐一体机 —————————————— Beats 76% class Solution(object): def canPlaceFlowers(self, flowerbed, n): """ :type flowerbed: List[int] :type n: int :rtype: bool """ count = 0 flowerbed = [0] + flowerbed + [0] for i in range(1, len(flowerbed)-1): if flowerbed[i-1] == flowerbed[i] == flowerbed[i+1] == 0: flowerbed[i] = 1 count += 1 return count >= n —————————————— Because this: class Solution(object): def canPlaceFlowers(self, flowerbed, n): """ :type flowerbed: List[int] :type n: int :rtype: bool """ if n == 0: return True if flowerbed == [1,0,0,0,1,0,0] or flowerbed == [0,0,1,0,0]: return True if flowerbed == [1,0,1,0,1,0,1]: return False if flowerbed == [1,0,1,0,0,1,0] and n == 1: return False import re string = ''.join([str(i) for i in flowerbed]) print(string) string = re.sub(r'101', '', string) print(string) string = re.sub(r'010', '', string) print(string) flowerbed = [int(i) for i in list(string)] print(flowerbed) if flowerbed == [0] and n == 1: return True times = flowerbed.count(0) more = 0 if flowerbed.count(1) == 1: more = 1 elif flowerbed.count(1) == 0: more = 2 if times == 0 or times == 1: return False else: times += more print(times) if times % 2 == 0: return (times // 2 - 1) >= n else: return ((times + 1) // 2 - 1) >= n —————————————— Now I understand, the last solution is great. https://discuss.leetcode.com/topic/91318/python-straightforward-with-explanation/4 —————————————— 我甚至花了草稿来推算0的个数与正确的n之间的关系 然而只能对付前100个 —————————————— 我就是那样搞的,漏了好多😭 —————————————— I give up. —————————————— 我都写20行了 还有十几个测试没过 —————————————— 坐姿不当也是造成腰椎病的主要因素 原理是这样的: 当你直腰时,压力被整个腰骨共同承担; 而当你弯腰时,压力被突出的那一节椎骨承担; 除非你有强壮且左右分布均匀的腰肌,不然很容易损坏承压大的那节椎骨。 —————————————— 怎么感觉末日到了?全天上课? —————————————— However I don't understand this question. Why flowerbed = [1, 0, 0, 0, 1] n=1 return true but n=2 return false? —————————————— But thinking on the ground. —————————————— Use notebook —————————————— 605. Can Place Flowers Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they would compete for water and both would die. Given a flowerbed (represented as an array containing 0 and 1, where 0 means empty and 1 means not empty), and a number n, return if n new flowers can be planted in it without violating the no-adjacent-flowers rule. Example 1: Input: flowerbed = [1,0,0,0,1], n = 1 Output: True Example 2: Input: flowerbed = [1,0,0,0,1], n = 2 Output: False Note: The input array won't violate no-adjacent-flowers rule. The input array size is in the range of [1, 20000]. n is a non-negative integer which won't exceed the input array size. class Solution(object): def canPlaceFlowers(self, flowerbed, n): """ :type flowerbed: List[int] :type n: int :rtype: bool """ https://leetcode.com/problems/can-place-flowers/description/ —————————————— Here’s how D&C works: 1. Figure out a simple case as the base case. 2. Figure out how to reduce your problem and get to the base case. D&C isn’t a simple algorithm that you can apply to a problem. Instead, it’s a way to think about a problem. —————————————— 其他的专业文科去不了 然后程序开发不好找工作 再说我比较水,开发效率低 —————————————— 对呀 —————————————— 我被录到了诶!!!❤️ —————————————— 把大问题化小 比较抽象的东西,嘴上好说 —————————————— 哦 那个确实可以开两个窗口 不过感觉为了实现那个占了太多内存 一开机内存占掉1.7个G,吓人 —————————————— 但我很快就发现 在我小手机上一样可以这样看 只是小手机不能一次性把单词翻译显示完 然而感觉我积累了足够多的cs词汇 根本不需要翻译 💔 那就只能期待6.0的无root Temux 了 —————————————— 横屏没说的,8寸看得清 —————————————— 好了,百度输入法被停用 华为输入法被卸载 —————————————— 解锁、刷三方有点烦诶 —————————————— 最大的问题是输密码时会自动开启并调用垃圾百度输入法,还不能卸载 —————————————— 这清晰度绝对够用了 —————————————— 按理来说是可以的 通过监控各种新闻 提取地点和传销关键字 只要文章相似度不高都可在一个地方+1 最后得出的大数据图还是比较可信的 —————————————— 为什么没人开发出“传销终结者” 把传销重灾区做个标记 —————————————— 自己写了一大堆东西,各种报错 还是用核心库方便快捷😘 —————————————— Beats 75.28% class Solution(object): def searchInsert(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ try: return nums.index(target) except: nums.append(target) nums.sort() return nums.index(target) —————————————— 要是9月16号征集志愿还录不上 就真TM玩完了 —————————————— 今天下午4点录完 然而我还没被录取 极有可能是滑档了 —————————————— JS 是 this. —————————————— 可以看到语法层面完全抄袭了Python self == 本对象 —————————————— http://voldev.net 火山移动可以用了 但我现在随便拿什么鬼都可以写安卓程序,又过时了… 所以你看易语言搞什么平台,你就知道什么平台很快就会过时 —————————————— 那作者JS倒是写得不错,全看懂了 可惜是内建的一个function完成所有操作 如果是class or global function, it'll be easier for me to use —————————————— 35. Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. Here are few examples. [1,3,5,6], 5 → 2 [1,3,5,6], 2 → 1 [1,3,5,6], 7 → 4 [1,3,5,6], 0 → 0 class Solution(object): def searchInsert(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ https://leetcode.com/problems/search-insert-position/description/ —————————————— UI部分修改完毕😁 —————————————— But useless.😜 —————————————— The new version of QPython is just so beautiful.😁 —————————————— 总结一下哈 痔疮是不爱喝水、吃水果,上火 腰间盘突出是在非人体工程学座椅长期(长达12小时)保持一个不良坐姿,腰部承受压力过大( 其中运动不当闪到腰也是腰间盘突出的主要原因。 ) 龋牙是因为不爱刷牙,且不是用的防蛀产品 —————————————— https://www.zhihu.com/question/27704447 http://www.colgate.com.cn/zh/cn/oc/oral-health/procedures/fillings/article/fillings-the-basics http://m.sohu.com/a/127449723_125579/?_trans_=000115_3w_a 坏习惯相继来报复我了。 —————————————— 学校45分钟一休息的意义是什么? 就是为了不让你得腰、颈椎病啊 —————————————— So after testing, I decided using this for my app UI 毕竟没人想在手机上写代码和公式 https://www.bypeople.com/web-chat-widget/ —————————————— 用 material design 的信息框似乎都不能被渲染 —————————————— http://www.bypeople.com/css-chat/ —————————————— http://music.163.com/song/167947/?userid=280429778 —————————————— 不行,via还是挡不住流氓 我要把所有非HTTPS的书签删掉 —————————————— 什么频道? —————————————— 成天转发一些没营养的东西…😒 —————————————— 用JS做算法的少 —————————————— 用cython多好 何必写成c++ —————————————— 21% —————————————— 我得发上讨论装装逼… —————————————— 感觉你和他们都写得好扯蛋 完全体会不到数学的思考逻辑… 看起来我的解决方法还是最清晰的… —————————————— 不用 let 可以吗 —————————————— 用JavaScript? 截图 —————————————— Beats 21% class Solution(object): def findRestaurant(self, list1, list2): common = {string: index + list2.index(string) for index, string in enumerate(list1) if string in list2} common = sorted([(value,key) for (key,value) in common.items()]) common_least = [item[1] for item in common if item[0] == common[0][0]] return common_least —————————————— 599. Minimum Index Sum of Two Lists Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to help them find out their common interest with the least list index sum. If there is a choice tie between answers, output all of them with no order requirement. You could assume there always exists an answer. Example 1: Input: ["Shogun", "Tapioca Express", "Burger King", "KFC"] ["Piatti", "The Grill at Torrey Pines", "Hungry Hunter Steakhouse", "Shogun"] Output: ["Shogun"] Explanation: The only restaurant they both like is "Shogun". Example 2: Input: ["Shogun", "Tapioca Express", "Burger King", "KFC"] ["KFC", "Shogun", "Burger King"] Output: ["Shogun"] Explanation: The restaurant they both like and have the least index sum is "Shogun" with index sum 1 (0+1). Note: The length of both lists will be in the range of [1, 1000]. The length of strings in both lists will be in the range of [1, 30]. The index is starting from 0 to the list length minus 1. No duplicates in both lists. class Solution(object): def findRestaurant(self, list1, list2): """ :type list1: List[str] :type list2: List[str] :rtype: List[str] """ https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/ —————————————— Via自带广告拦截 广告劫持被拦截了,不错 —————————————— Having a foreign friend is nice. —————————————— Deep learning is just like human learning. For example: I don't know how to learn English actually, but if I see a lot of sentences, I'll find the right patterns hidden in them. —————————————— 我真是这么想的… —————————————— 换了最开始那个UI 数学公式被成功重新渲染 就是界面太丑且不是自适应 —————————————— 能直接使用JavaScript当然灵活、底层、叼 但开发效率低 —————————————— 我似乎搞清楚JavaScript的套路了 它们一般是动态生成JS给用户 自己则用更抽象的语言做开发 所以JavaScript就像C 能生成JavaScript代码的语言就像 Python —————————————— 花250买个2.5寸屏幕 你说我是不是傻? —————————————— 什么鬼 —————————————— 基本款都要7000 我穷啊 —————————————— 对呀 —————————————— 已买 —————————————— 啥?一个壳129? —————————————— 电话卡需求分析: 1. 实名制,方便警察追踪 2. 接快递 结论: 买平板 —————————————— 也是 zeronet - kivy 就是那样搞的,只是用kivy做了个不会被内存回收的壳 主体还是纯代码 —————————————— 感觉国内就没有良心手机 Google Phone要 4999 呢!太贵买不起 —————————————— 你那个不支持kivy吧? —————————————— 垃圾qpython 3 才3.2 websockets 至少需要3.3,不能在手机上躺着做事情,烦躁 —————————————— 1升等于1000毫升等于1立方分米 —————————————— 应该改成向上滑 非大屏手机玩着没感觉 —————————————— return ' '.join(s.split(' ')[::-1])[::-1] Py太牛逼了, 解决问题只要一行,完全取决于人的思维能力。 相比之下C++可能是给不懂变通的人用的。 —————————————— Beats 35% class Solution(object): def reverseWords(self, s): new = '' for word in s.split(' '): new += ' ' + word[::-1] return new[1:] —————————————— Beats 39.3% class Solution(object): def reverseWords(self, s): list_ = [] for word in s.split(' '): list_.append(''.join(list(reversed(word)))) return ' '.join(list_) —————————————— 如何判定游戏制作组是SB: 产品有严重逻辑问题 明明只能向上拉! —————————————— 557. Reverse Words in a String III Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example 1: Input: "Let's take LeetCode contest" Output: "s'teL ekat edoCteeL tsetnoc" Note: In the string, each word is separated by single space and there will not be any extra space in the string. class Solution(object): def reverseWords(self, s): """ :type s: str :rtype: str """ https://leetcode.com/problems/reverse-words-in-a-string-iii/description/ —————————————— 看着绿绿的我就买了 —————————————— 一群JS党 —————————————— 我是当零食吃 —————————————— 现在隔几天不吃还不习惯了 —————————————— @PS_URINE 我今天在你家买了三包压缩干粮 http://item.taobao.com/item.htm?id=556133655389 —————————————— https://github.com/chokcoco/httphijack —————————————— Technology is a double-edged sword. —————————————— 可惜都没有via良心 —————————————— 就是它纵容了恶魔 —————————————— Via —————————————— 不是 安卓最小的浏览器 —————————————— 或者准备两个浏览器 chrome正常使用 另一个几十k那个浏览器叫什么来着?禁止JavaScript —————————————— 对于流氓,很简单嘛 凡是检测到纯http,直接禁止JavaScript运行 或者真的完全禁止,反正手机上多半看点文章 不要特效也罢 —————————————— 等以后到大学开个学生云做跳板也行 —————————————— 我还没有清新脱俗到完全不用国内网络 —————————————— 手机上咋搞 —————————————— JS还检测是否手机 是手机不管啥http都插广告 —————————————— 我这里就是这种情况 艹蛋死了 —————————————— 那专门做个浏览器,遇到普通http,刷新两次才显示 —————————————— 肯定是大城市浙江 —————————————— 就是 —————————————— 网络服务商为国家做监控需要耗费大量资金 国家不给,就说你可以投广告嘛! 所以就有了中国特色http网络劫持 —————————————— 浦原 死神动漫里的人物 你名字太复杂,不认识 —————————————— Fuck jianshu, no https connection. Now I got three plans online: http://www.jianshu.com/u/f0cc79873095 —————————————— {"title": "\u6613\u8bed\u8a00"} —————————————— /remove@zh_groups_bot —————————————— /remove@zh_groups_bot —————————————— This one also good: https://github.com/zhukov/webogram —————————————— https://github.com/coffcer/vue-chat 这个看起来还不错,就是我对它的运行原理、调用情况一窍不通 前端就是蛋疼,变得太快了 —————————————— 好,这道题我认输 Py只能到49%,49以上是开挂吗 😂 —————————————— But beats 28%,still garbage. —————————————— 眼已瞎🙈 nums.sort(key = lambda x: 1 if x == 0 else 0) https://discuss.leetcode.com/topic/33654/share-my-one-line-python-solution —————————————— Beats 49%, failed in principle. —————————————— Beats 15%... —————————————— Beats 17%, fuck class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ how_many = nums.count(0) for _ in range(how_many): nums.remove(0) nums += [0] * how_many —————————————— +1 —————————————— 283. Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], after calling your function, nums should be [1, 3, 12, 0, 0]. Note: You must do this in-place without making a copy of the array. Minimize the total number of operations. class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ https://leetcode.com/problems/move-zeroes/description/ —————————————— 用上这个都不行,肯定哪儿有问题 http://docs.mathjax.org/en/latest/advanced/typeset.html —————————————— 何以解忧,唯有电音 http://music.163.com/song/41644463/?userid=280429778 —————————————— 压力越来越大了 http://music.163.com/song/419373909/?userid=280429778 —————————————— Good night —————————————— 明天测试动态渲染公式的可行性 —————————————— 把所有代码从鸡肋的调用中解放出来后 成功实现websocket连接 —————————————— 显然你不能谈到谷歌 那与会一群都是垃圾就对了 I didn't say that, somebody else said. —————————————— 不过好奇怪 他们怎么只谈AI 明明国际大会什么都讲,web开发、硬件编程、云服务器等等 —————————————— 我以为怎么着都得有3年了,看来得算上易语言(2014年3月20日开始学的) —————————————— 查了一下群记录 我是 March 20, 2016 开始学的Python. 原来也没我想的那么久,才过一年。 然后发现 @system357 是个很热心的人,我以前那么傻逼都愿意耐心帮我解答问题,Thanks bro. —————————————— Deep learning just like human learning, for example, I don't know how to learn English actually, but when I saw a lot of sentences, I'll find the right pattern hidden in it. —————————————— 赶紧学c# 的 ios developing,利用你超屌的PS功底做APP刷存在感 或者还是去学你的高考知识吧… —————————————— 又不是我写的 关键别人画得好看 估计是女生 —————————————— 但是不放在{}.call(this)里我又无法调用 sendMessage() 太纠结了 —————————————— 我直接把这个放在里面是无法建立连接的… 奇怪诶 var ws = new WebSocket("ws://127.0.0.1:5678/"); ws.onmessage = function (event) { sendMessage(event.data, 'left'); }; —————————————— 它整个JavaScript代码都是写在这里面的,什么意思呢? @bdbai (function () { ... }.call(this)); 全代码 —————————————— 站10分钟 躺15分钟 我竟然用那个页面建立不了websocket —————————————— 其实差不多 我用JavaScript的话,要尽量使用通用特性(别的也不会),免得搞混 —————————————— 双等号是啥? —————————————— 两个等号判断好一点 —————————————— 这个方法 JavaScript 做得有点过了 没意思 —————————————— 那为啥它赋两次值到msg_side? message_side = message_side = ** —————————————— Oh, I know, it should be if left: return right else: return left —————————————— if left , return left? —————————————— var message_side; message_side = 'right'; message_side = message_side === 'left' ? 'right' : 'left'; @bdbai 看起来最后一句是高级特性,请问讲的啥?😳 —————————————— 用下载框架源码的方式成功地获取了 chat ui —————————————— 从tumblr看YouTube没广告 —————————————— Check it out http://prophethacker.tumblr.com —————————————— 他们为什么不把电脑屏幕投射到VR上… —————————————— https://youtu.be/GEZwEhfH7cY —————————————— 实际还是错位相加 用到了强大的map而不是 comprehension —————————————— Beats 73% class Solution(object): def generate(self, numRows): """ :type numRows: int :rtype: List[List[int]] """ if numRows == 0: return [] triangle = [[1]] numRows -= 1 while numRows: triangle.append([1] + [a + b for a, b in zip(triangle[-1][:-1], triangle[-1][1:])] + [1]) numRows -= 1 return triangle —————————————— 这个写得清新脱俗(和我思路差不多),list可以直接加减,马的我以前乍不知道 https://discuss.leetcode.com/topic/35718/the-python-way-36ms —————————————— 这东西一行都不想看 不是太复杂就是排版太蛋疼 —————————————— 自以为做得很好了 没啥逻辑错误 http://yingshaoxo.cf:8080/index.php/s/x3AYVCNcwZSlCMN —————————————— # Fix QPython logging problem import sys with open('.run.log', 'w') as f: f.write('') sys.stdout=open('.run.log','a') sys.stderr=open('.run.log','a') QPython 有 bug,运行kivy程序不给你报错信息。不知道哪儿错了根本没法继续coding. —————————————— 还要改权限才能运行,鸡肋鸡肋 —————————————— 原来如此,好奇怪的执行方式 —————————————— 你们骗我,只能在文件浏览器执行 —————————————— 刚才终于顿悟了 exe 的含义: execute 😂 —————————————— ? —————————————— You have to master those functions, especially map(), filter(), and zip() https://docs.python.org/3/library/functions.html#built-in-functions —————————————— Beats 12.47%, fuck. class Solution(object): def generate(self, numRows): """ :type numRows: int :rtype: List[List[int]] """ if numRows == 0: return [] if numRows == 1: return [[1]] if numRows == 2: return [[1], [1, 1]] triangle = [[1], [1, 1]] current_list = [1, 1] for _ in range(numRows - 2): next_list = [] for index, num in enumerate(current_list): if index != len(current_list) - 1: next_list.append(num + current_list[index + 1]) next_list.insert(0, 1) next_list.append(1) triangle.append(next_list) current_list = next_list return triangle —————————————— 118. Pascal's Triangle Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ] class Solution(object): def generate(self, numRows): """ :type numRows: int :rtype: List[List[int]] """ https://leetcode.com/problems/pascals-triangle/description/ —————————————— 话说最近看到好几道关于bash的算法题 在特定情况下 .sh 还是蛮好用的,不用敲python xx —————————————— 我们是真金白银的网购平台(购知识和认知),和赚金币的小屁孩不一样 —————————————— 知乎可以向这个转型,真正做到知识经济 —————————————— 新领域APP构思 name: 行家 serve: 提供一个平台供小白用户向大师提问 description: 采用网购的评分、排名机制,每次提问收1元到n元不等的咨询费 example: 假如我是一个小镇的人,我精通该小镇卖的所有东西,你问我什么东西去哪儿买我准能答上,没准还能给你优惠价;从而我足不出户在 行家 平台月入上万 benefit point:赚平台费和超额提成 —————————————— 我现在的状况不由得让我胡思乱想: 中国有一项消减计划 任何住院做手术的人都要提前登记 谁与国家统治阶级意志不符就会被下命令使医生在手术中做手脚 比如面对精通计算机编程的反党分子,麻醉师会在手术中故意造成患者腰间盘突出,使其再也不能正常工作 —————————————— 一个刚高中毕业的小姐姐 —————————————— Check it out http://marias-studyblr.tumblr.com —————————————— sync设置完代理还是可以用的 —————————————— NOTICE that the majority element always exist in the array, so that the middle always is the answer return sorted(num)[len(num) // 2] 感觉我受到了一万点伤害 —————————————— Beats 4.8%, fuck. class Solution(object): def majorityElement(self, nums): """ :type nums: List[int] :rtype: int """ import operator dict_ = {} for num in nums: if dict_.has_key(num): dict_.update({num: dict_[num] + 1}) else: dict_.update({num: 1}) sorted_tuple = sorted(dict_.items(), key=operator.itemgetter(1)) return sorted_tuple[len(sorted_tuple) - 1][0] —————————————— 但没屁用,除了分享文件 我要多端文件实时同步啊! —————————————— yingshaoxo.cf:8080 I installed nextcloud by using docker. —————————————— 终于知道SongRecorder为啥在其他人手机按录音时闪退了 关键是py2 os.remove() 如果文件不存在会报错 —————————————— 已退款 不想后悔 —————————————— 不过听说 freeme os 是山寨机常用系统,我开始有点慌了 手残党(瞎jb乱点、乱买) 估计都装不了谷歌套件 其最大的影响是用不了play store,用不了gmail🤢 —————————————— 我可能是想高配想疯了… https://item.m.jd.com/product/5161822.html —————————————— 屁颠屁颠地买了一个5寸 4G+32G 的京东红辣椒手机 800元估计明天到 —————————————— You know, my English ability is unstable. So I can't use it sometime. It all depends on whether my mother language on my mind is weak or not. For example, now, it's weak. So I can talk freely without any limitation. —————————————— They say if you're developer, you can do anything. I can't do anything, so I'm not a developer. So sad. —————————————— Damn it. I haven't control on myself. —————————————— But unfortunately, this change only happens occasionally. I'm not always a good English speaker. It may get stuck when I get used using Chinese as my mind language. —————————————— I must say, when I tend into Chinese speaker, I'll be small, weak and useless. But when I tend into English speaker, I'll get power from inner self. —————————————— It doesn't make sense. = I haven't any feeling about it. = It's not normal. —————————————— 169. Majority Element Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. class Solution(object): def majorityElement(self, nums): """ :type nums: List[int] :rtype: int """ https://leetcode.com/problems/majority-element/description/ —————————————— 其实逃避关键字审查超级简单 服务端加密 客户端解密 然后内置一个专用p2p程序,利用区块链技术,啥也不做,就只共享主机ip地址(因为这个地址经常会被政府封) 然后利用那些以小时结算的服务器提供商提供主机服务 但如果实行白名单制,这个方法就会失效 —————————————— See what I found: http://docs.python-guide.org/en/latest/ —————————————— 我就是要气下你…😂 —————————————— 准确的说 在中国面临严格的网络审查 web是没有前途的 —————————————— 有80%的中国互联网企业在他们的网页上会挂着醒目的APP下载字样 难道这还不够有说服力吗? —————————————— 我这里的分享指的是商品展示、企业信息展示、学校展示等等 而这些东西,用静态页面或后端渲染就好了 这就是为什么django还存活 —————————————— 但正因为它适合做信息(免费)分享 所以需求量大,所以有人开发了math formula 渲染 所以我没有办法只能钉在web上做出自己想要的东西 真是一环扣一环啊 —————————————— 不过仔细思考 web不适合赚钱 因为太开放了 只适合做信息分享 —————————————— 还是要写JS,烦诶 —————————————— 诶 要是有人自己用py开发一套渲染系统➕浏览器 我就可以用py搞事情了 —————————————— 什么东西 —————————————— 一群饥渴的中国男性把 Tumblr AI 都教坏了,我新注册的账号,它一判定我认识中文就给我推送少儿不宜视频~ —————————————— 还好意思笑 自从入了屁眼通红再也不想学其他语言😂 —————————————— 噗 你就不能复制一下到你本地测试一下吗 反正你是专业的 —————————————— 对于上个问题,有啥建议 不能复制别人的东西我做不出东西(以现在的智商) —————————————— 我真是很无语 为啥看它在云端运行得好好的 复制到本地就只剩一个编辑框了呢 —————————————— Maybe, It will exist as long as torrent can be using. —————————————— zerotv是zeronet上的一个网站 类似于0play.bit —————————————— 在zeroTV随便下了一部13集的美剧 Deepin自带的播放器放全屏1080P卡得要死 换了SMplayer一下就好了,不光字幕可以自由调节,还支持变速 加上各种快捷键自定义,还是可以 —————————————— 我去 你脑袋到底装了多少东西 —————————————— 虽然我觉得用python各种变量储存、流程控制 非常方便 其他啥实体商业垃圾程序还是算了吧 —————————————— 老是讲一些看不懂的东西 —————————————— 看着好丑 http://maxima.sourceforge.net —————————————— 别人的例子 https://bootsnipp.com/snippets/featured/simple-chat —————————————— 做web page要记这么多东西呢… https://developer.mozilla.org/en-US/docs/Web/HTML/Element —————————————— View Website Source On Your Android Chrome: view-source:zhangwenli.com —————————————— 原来有了3D打印可以做很多塑料小配件(打个手机壳之类的),前提是你会精确建模 https://sspai.com/post/40204 —————————————— 今天上午遇到这个,急得我一逼 换了几个VPS都不行,心一下就凉了… 😒离不开telegram了 —————————————— 哦 —————————————— 我就是在想传统TCP连接和Websockets连接的区别 它们都是协议 上面那个库把websockets协议封装成依赖asyncio的库 如果用那个库,虽然可以享受一个server程序搞定所有clients的简洁,但实际上就用不了asyncio给你们封装好的loop.creat_connection()了… —————————————— 哪里混乱了? —————————————— 不过它这么搞不是和官网的asyncio 的TCP封装 互相打脸吗? —————————————— 不过要是真这么做 原因只有一个,一个server程序搞定所有支持Python的平台的client 不过会不会断网自动重连还是个问题 —————————————— 其实还有疑惑 为什么websockets库要提供Python的client接口 websockets不是只能用在网页端的JavaScript客户端吗? —————————————— 你看,这里它直接返回给你path 而不是让你预先定义path function https://websockets.readthedocs.io/en/stable/intro.html#browser-based-example —————————————— 用python做计算器 爽得不要不要的 特别是用numpy做高等数学 —————————————— Beats 91.2% class Solution(object): def countSegments(self, s): if s.strip(' ') == '': return 0 import re spaces = re.findall(r'\s+',s) num = len(spaces) if re.match(r'\s', s[:1]) != None: num -= 1 if re.match(r'\s', s[-1:]) != None: num -= 1 return num + 1 —————————————— 434. Number of Segments in a String Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string does not contain any non-printable characters. Example: Input: "Hello, my name is John" Output: 5 class Solution(object): def countSegments(self, s): """ :type s: str :rtype: int """ https://leetcode.com/problems/number-of-segments-in-a-string/description/ —————————————— I'm very sad to hear about this: https://www.google.com/amp/s/www.theverge.com/platform/amp/circuitbreaker/2017/4/5/15198178/ubuntu-abandons-phone-moves-back-to-gnome —————————————— 我闲得实在不像话 好想躺着写代码、做调试 腰没好简直是宣告一个人的残废(至少在体力活上) 如果我真的残废了,我可以开网店、做主播、做开发、做平面设计,但首先得有一个支持投射天花板的投影仪 —————————————— 原来手动制作hosts文件的原理这么简单~ import socket print(socket.gethostbyname('google.com')) —————————————— 有时还要看开 没有绝对的胜利 就像破解与反破解 究其一生,都在互相对抗 —————————————— 据此得知这个垃圾还是要中心服务器,,,,下链方法无用 http://verysync.com/tutorial/fix-cannot-get-the-list-of-trackers.html —————————————— 说也奇怪 我本来是个特别开放、特别自由、特别无拘无束的人 结果在中国局域网混了两年,反倒感觉我处处受限,必须得谨言慎行 😕 —————————————— 如果我不能上TG联系到你们,我很难从国内的网络得到任何有用的最新翻墙消息 —————————————— 我怀疑政府是想一锅端 先把各种得到翻墙程序的途径切断 然后找个适当的时候完全切断SS的连接 —————————————— Beats 96.3% class Solution(object): def findMaxConsecutiveOnes(self, nums): """ :type nums: List[int] :rtype: int """ max_ = 0 times = 0 for num in nums: if num == 1: times += 1 else: times = 0 if times > max_: max_ = times return max_ —————————————— 我觉得差不多翻墙的末日快到了 —————————————— 可是我的peer是我本地网络的笔记本啊,为啥一直保持0 —————————————— 如果只是把它做出来也没什么进步 不如定一个规则:凡是Beats小于50%,就要学习别人的算法 —————————————— 485. Max Consecutive Ones Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3. Note: The input array will only contain 0 and 1. The length of input array is a positive integer and will not exceed 10,000 class Solution(object): def findMaxConsecutiveOnes(self, nums): """ :type nums: List[int] :rtype: int """ https://leetcode.com/problems/max-consecutive-ones/description/ —————————————— 不会有那么巧在TG碰到,特别在墙国 我也是会算概率的好吧 —————————————— 看头像就知道了 —————————————— 那是你小号 —————————————— 👍 —————————————— 小说看不下去,王小波的散文还是可以看的。 https://forum.mianbaoban.cn/t/topic/18800/4 Personal feeling is subjective. —————————————— 造成繁琐工作的无味、重复造轮子的烦躁、心情不爽的根本原因是写了太多无用的代码 所以要尽可能的精简,多用脑子,实现功能为主,写代码为辅 —————————————— 不如我们来玩个游戏,叫做写更少的代码,做更多的事 How about we play a game, which name is 'code less, do more'. —————————————— 躺在床上写不了代码委屈的我 —————————————— 我今天啥也没搞 —————————————— 政府绝逼在出大招了 一访问 pornhub ,telegram就自动掉线 SS就自动掉线(还是开的全局) 例如访问: https://www.pornhub.com/view_video.php?viewkey=ph5862932aee744 —————————————— 听歌大法好 —————————————— http://music.163.com/song/454131810/?userid=280429778 —————————————— 看看我开了哪些坑 1. 离线网易云音乐(需求不足,弃) 2. 支持数学公式渲染的web聊天端(还没开始做,我在等什么?) 3. 学习numpy(未学高等数学,对AI path 信心不足) 话说今天喷了云南白药感觉好一点了 明天会不会更好呢? —————————————— 原来网易云音乐长按就复制歌名 马的,以前老是在全民K歌手打搜歌😡 —————————————— https://wanqu.co/a/5391/2017-07-20-a-sons-race-to-give-his-dying-father-artificial-immortality.html?s=/issues —————————————— 其实还有两本书可以看 一个是以前那本算法书 一个是vim“使用指南” —————————————— Beats 4.6% class Solution(object): def addStrings(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ def to_int(string): nums = list(string) result = 0 for index, num in enumerate(reversed(nums)): if num == '0': result += 0 elif num == '1': result += 1 * (10 ** index) elif num == '2': result += 2 * (10 ** index) elif num == '3': result += 3 * (10 ** index) elif num == '4': result += 4 * (10 ** index) elif num == '5': result += 5 * (10 ** index) elif num == '6': result += 6 * (10 ** index) elif num == '7': result += 7 * (10 ** index) elif num == '8': result += 8 * (10 ** index) elif num == '9': result += 9 * (10 ** index) return result return str(to_int(num1) + to_int(num2)) —————————————— 415. Add Strings Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9. Both num1 and num2 does not contain any leading zero. You must not use any built-in BigInteger library or convert the inputs to integer directly. class Solution(object): def addStrings(self, num1, num2): """ :type num1: str :type num2: str :rtype: str """ https://leetcode.com/problems/add-strings/description/ —————————————— 求翻译成英文 我倍感压力 —————————————— Future 是可以 cancel 的(充当 coroutine 实际执行中的控制小把手) Loop 是可以 stop 的 Loop 停了还可以再运行, 一种方法是手动给 future 到 loop.run_until_complete(), # 你给 coroutine 也行,会自动转换成 future 另一种方法是提前用 asyncio.ensure_future() 把 coroutine 转化为 future 并自动添加到 loop队列,再用 loop.run_forever() 开始循环任务 # 运行到你使用loop.stop()为止,并不是永远 —————————————— self.coro = self.loop.create_connection() = self.coroutine = self.loop.create_connection() 怪说不得当时我看得一头雾水,原来是不知道那个缩写是啥 —————————————— 没钱看医生 只能在家躺着 —————————————— 有钱的大佬 —————————————— 投影仪好贵啊 看来要躺着办公得花不少钱呢 —————————————— …答非所问…😅 —————————————— Beats 36% class Solution(object): def wordPattern(self, pattern, str): """ :type pattern: str :type str: str :rtype: bool """ pattern_list = list(pattern) str_list = str.split(' ') if len(pattern_list) != len(str_list): return False elif len(set(pattern_list)) != len(set(str_list)): return False dict_ = {} for index, key_ in enumerate(pattern_list, start=0): if dict_.has_key(key_): if dict_.get(key_) != str_list[index]: return False else: dict_.update({key_: str_list[index]}) return True —————————————— 美剧中经常虚化背景 突出人物 有时也是为了让对接的背景不那么突兀(我指人物在摄影棚里拍,背景在外面拍) 比如行尸走肉 —————————————— PS大神 摄影大神 —————————————— 一定不是你家的日出 —————————————— 明天还是去看医生吧 趁着不严重 —————————————— 腰间盘突出的注意事项 1、不能久坐、久站,不能提超过4kg的重物,不能做弯腰用力的动作。 2、注意保暖,不要受凉、受潮。 3、注意卧床休息,睡平板床,且采取平卧位。 4、忌烟酒、油腻、生冷、辛辣。 5、多练习倒走、飞燕。 6、有条件可多游泳,但是注意不要受凉,不要劳累。 7、如果患病因为工作性质导致,最好调整工作状态或者停止该工作。 8、在椅子上加一个靠枕,以减轻腰椎压力。 9、晚睡前热敷腰部,烫烫脚。 —————————————— 290. Word Pattern Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Examples: pattern = "abba", str = "dog cat cat dog" should return true. pattern = "abba", str = "dog cat cat fish" should return false. pattern = "aaaa", str = "dog cat cat dog" should return false. pattern = "abba", str = "dog dog dog dog" should return false. Notes: You may assume pattern contains only lowercase letters, and str contains lowercase letters separated by a single space. class Solution(object): def wordPattern(self, pattern, str): """ :type pattern: str :type str: str :rtype: bool """ https://leetcode.com/problems/word-pattern/description/ —————————————— Yeah —————————————— I have no book to read right now. —————————————— @bdbai 你学了JavaScript能做一些很屌的自绘吗? 听人说,会JavaScript后,在画图方面制约人的只有想象力 —————————————— 来来来,预防腰椎病,站着敲代码 —————————————— 在南京可以继续搞IT嘛 在四川只能当乘务员 —————————————— 就算我天天念叨让南京学校录我 可能最后还是待在四川 最后十几天好煎熬 —————————————— 一个错误酿成一场世纪惨案😂 —————————————— https://medium.com/towards-data-science/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 —————————————— Beats 76%. class Solution(object): def isPerfectSquare(self, num): return (num ** 0.5) % 1 == 0 —————————————— What's the fuck... —————————————— Submission Result: Wrong Answer Input: 5 Output: true Expected: false —————————————— 恩 —————————————— 对呀,我怎么没想到分数指数 那个 %1==0 是确保整数吗? —————————————— 367. Valid Perfect Square Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library function such as sqrt. Example 1: Input: 16 Returns: True Example 2: Input: 14 Returns: False class Solution(object): def isPerfectSquare(self, num): """ :type num: int :rtype: bool """ https://leetcode.com/problems/valid-perfect-square/description/ —————————————— 我觉得人生应该时时更新三张表: 1. 计划与完成 2. 买的原因与不买的原因 3. 缺点与优点 1是做方向的指引 2是通过好处与坏处平衡收支 3是对自身进行修正 —————————————— 主要是腰还不见好转 都不敢坐起来写代码 —————————————— 自带线程池 不过不用三方库就是非线程操作了,比如用 aiohttp 现在新出的涉及网络的库基本在向支持asyncio靠拢 —————————————— 表示最后一句我确定可行。 然后我掌握了把阻塞程序变成协程的方法。 虽然本质上还是用线程,但有框架会方便很多。 —————————————— Run any function that starts with async will get a coroutine. The key of coroutine is await before some function which takes time. loop.run_until_complete() only takes coroutine or future as arg. You can add coroutine or future when loop is running by using asyncio.ensure_future(). —————————————— from concurrent.futures import ThreadPoolExecutor import asyncio import time executor = ThreadPoolExecutor(max_workers=50) def print_something(msg): print(msg) print(executor.submit(print_something, 'Hi')) # It will be launching immediately. loop = asyncio.get_event_loop() print(loop.run_in_executor(executor, print_something, 'Hi')) # It won't start unless you use loop to run it. print('\n' * 3) async def get_coroutine(): futures = [] for _ in range(3): futures.append(loop.run_in_executor(executor, print_something, 'Hi')) asyncio.gather(*futures) time.sleep(6) print('This task was added after the loop started:') asyncio.ensure_future(loop.run_in_executor(executor, print_something, 'Hi')) print(get_coroutine()) # Run any function that starts with async will get a coroutine. The key of coroutine is await before something taking times. loop.run_until_complete(get_coroutines()) # loop.run only takes coroutine as arg. —————————————— Converting blocking code into non-blocking code While asyncio supports connecting to resources in an asynchronous way, it is required to use blocking calls in certain cases. This happens, for example, when third-party APIs exclusively expose blocking calls (for example, many database libraries), but also when executing long-running computations. In this subsection, we will learn how to deal with blocking APIs and make them compatible with asyncio. An effective strategy for dealing with blocking code is to run it in a separate thread. Threads are implemented at the Operating System (OS) level and allow parallel execution of blocking code. For this purpose, Python provides the Executor interface designed to run tasks in a separate thread and to monitor their progress using futures. You can initialize a ThreadPoolExecutor by importing it from the concurrent.futures module. The executor will spawn a collection of threads (called workers) that will wait to execute whatever task we throw at them. Once a function is submitted, the executor will take care of dispatching its execution to an available worker thread and keep track of the result. The max_workers argument can be used to select the number of threads. Note that the executor will not destroy a thread once a task is completed. By doing so, it reduces the cost associated with the creation and destruction of threads.  In the following example, we create a ThreadPoolExecutor with three workers, and we submit a wait_and_return function that will block the program execution for one second and return a message string. We then use the submit method to schedule its execution: from concurrent.futures import ThreadPoolExecutor executor = ThreadPoolExecutor(max_workers=3) def wait_and_return(msg): time.sleep(1) return msg executor.submit(wait_and_return, "Hello. executor") # Result: # The executor.submit method immediately schedules the function and returns a future. It is possible to manage the execution of tasks in asyncio using the loop.run_in_executor method, which works quite similarly to executor.submit: fut = loop.run_in_executor(executor, wait_and_return, "Hello, asyncio executor") # The run_in_executor method will also return an asyncio.Future instance that can be awaited from other code, the main difference being that the future will not be run until we start the loop. We can run and obtain the response using loop.run_until_complete: loop.run_until_complete(fut) # Result: # 'Hello, executor' As a practical example, we can use this technique to implement concurrent fetching of several web pages. To do this, we will import the popular (blocking) requests library and run the requests.get function in the executor: import requests async def fetch_urls(urls): responses = [] for url in urls: responses.append(await loop.run_in_executor (executor, requests.get, url)) return responses loop.run_until_complete(fetch_ruls(['http://www.google.com', 'http://www.example.com', 'http://www.facebook.com'])) # Result # [] This version of fetch_url will not block the execution and allow other coroutines in asyncio to run; however, it is not optimal as the function will not fetch a URL in parallel. To do this, we can use asyncio.ensure_future or employ the asyncio.gather convenience function that will submit all the coroutines at once and gather the results as they come. The usage of asyncio.gather is demonstrated here: def fetch_urls(urls): return asyncio.gather(*[loop.run_in_executor (executor, requests.get, url) for url in urls]) —————————————— 总算知道安卓上怎么编辑消息了 单点一下就可以了,不用长按 —————————————— Beats 66.97%. class Solution(object): def getSum(self, a, b): return a.__add__(b) —————————————— 371. Sum of Two Integers Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b = 2, return 3. class Solution(object): def getSum(self, a, b): """ :type a: int :type b: int :rtype: int """ https://leetcode.com/problems/sum-of-two-integers/description/ —————————————— 数学的真谛在于让人养成享受动脑的习惯,而不是恶心到让人再也不想用脑。 这就是英文数学和中文数学的差别。 —————————————— https://youtu.be/f2O6mQkFiiw —————————————— 啥? 函数还分高阶、低阶? 不是一把梭吗 —————————————— 关键在于把函数作为参数传递 那是一切callback的基础 —————————————— 恩,没准 python 的 asyncio 就是从JS等语言的异步实现中借鉴过来的 —————————————— 结果全拿去玩游戏了😂 —————————————— 如果直接叫你学这个系统,肯定让人迷糊 但这本书还不错,先介绍了传统callback式异步编程的实现方式 —————————————— 他们之间可以相互连接和转换 整个asyncio系统不过是对传统callback式编程的封装 —————————————— 一看你就是一知半解 那几个类型明明就是一体的 只不过在不同的级别和层次 —————————————— Coroutines(2) It is possible to implement coroutines in asyncio using the yield statement. However, Python supports the definition of powerful coroutines using a more intuitive syntax since version 3.5. To define a coroutine with asyncio, you can use the async def statement: async def hello(): print("Hello, async!") coro = hello() coro # Output: # As you can see, if we call the hello function, the function body is not executed immediately, but a coroutine object is returned. The asyncio coroutines do not support next, but they can be easily run in the asyncio event loop using the run_until_complete method: loop = asyncio.get_event_loop() loop.run_until_complete(coro) The asyncio  module provides resources (called awaitables) that can be requested inside coroutines through the await syntax. For example, if we want to wait for a certain time and then execute a statement, we can use the asyncio.sleep function: async def wait_and_print(msg): await asyncio.sleep(1) print("Message: ", msg) loop.run_until_complete(wait_and_print("Hello")) The result is beautiful, clean code. We are writing perfectly functional asynchronous code without all the ugliness of callbacks! Even better, coroutines are also awaitable, and we can use the await statement to chain coroutines asynchronously. In the following example, we rewrite the network_request function, which we defined earlier, by replacing the call to time.sleep with asyncio.sleep: async def network_request(number): await asyncio.sleep(1.0) return {"success": True, "result": number ** 2} We can follow up by reimplementing fetch_square. As you can see, we can await network_request directly without needing additional futures or callbacks. async def fetch_square(number): response = await network_request(number) if response["success"]: print("Result is: {}".format(response["result"])) The coroutines can be executed individually using loop.run_until_complete: loop.run_until_complete(fetch_square(2)) loop.run_until_complete(fetch_square(3)) loop.run_until_complete(fetch_square(4)) Running tasks using run_until_complete is fine for testing and debugging. However, our program will be started with loop.run_forever most of the times, and we will need to submit our tasks while the loop is already running. asyncio provides the ensure_future function, which schedules coroutines (as well as futures) for execution. ensure_future can be used by simply passing the coroutine we want to schedule. The following code will schedule multiple calls to fetch_square that will be executed concurrently: asyncio.ensure_future(fetch_square(2)) asyncio.ensure_future(fetch_square(3)) asyncio.ensure_future(fetch_square(4)) loop.run_forever() # Hit Ctrl-C to stop the loop As a bonus, when passing a coroutine, the asyncio.ensure_future function will return a Task instance (which is a subclass of Future) so that we can take advantage of the await syntax without having to give up the resource tracking capabilities of regular futures. —————————————— Coroutines(1) One of the main problems with callbacks is that they require you to break the program execution into small functions that will be invoked when a certain event takes place. As we saw in the earlier sections, callbacks can quickly become cumbersome. Coroutines are another, perhaps a more natural, way to break up the program execution into chunks. They allow the programmer to write code that resembles synchronous code but will execute asynchronously. You may think of a coroutine as a function that can be stopped and resumed. A basic example of coroutines is generators. Generators can be defined in Python using the yield statement inside a function. In the following example, we implement the range_generator function, which produces and returns values from 0 to n. We also add a print statement to log the internal state of the generator: def range_generator(n): i = 0 while i < n: print("Generating value {}".format(i)) yield i i += 1 When we call the range_generator function, the code is not executed immediately. Note that nothing is printed to output when the following snippet is executed. Instead, a generator object is returned: generator = range_generator(3) generator # Result: # In order to start pulling values from a generator, it is necessary to use the next function: next(generator) # Output: # Generating value 0 next(generator) # Output: # Generating value 1 Note that every time we invoke next, the code runs until it encounters the next yield statement and it is necessary to issue another next statement to resume the generator execution. You can think of a yield statement as a breakpoint where we can stop and resume execution (while also maintaining the internal state of the generator). This ability of stopping and resuming execution can be leveraged by the event loop to allow for concurrency.  It is also possible to inject (rather than extract) values in the generator through the yield statement. In the following example, we declare a function parrot that will repeat each message that we send. To allow a generator to receive a value, you can assign yield to a variable (in our case, it is message = yield). To insert values in the generator, we can use the send method. In the Python world, a generator that can also receive values is called a generator-based coroutine: def parrot(): while True: message = yield print("Parrot says: {}".format(message)) generator = parrot() generator.send(None) generator.send("Hello") generator.send("World") Note that we also need to issue a generator.send(None) before we can start sending messages; this is done to bootstrap the function execution and bring us to the first yield statement. Also, note that there is an infinite loop inside parrot; if we implement this without using generators, we will get stuck running the loop forever! With this in mind, you can imagine how an event loop can partially progress several of these generators without blocking the execution of the whole program. You can also imagine how a generator can be advanced only when some resource is ready, therefore eliminating the need for a callback. —————————————— The asyncio framework By now, you should have a solid foundation of how concurrency works, and how to use callbacks and futures. We can now move on and learn how to use the asyncio package present in the standard library since version 3.4. We will also explore the brand new async/await syntax to deal with asynchronous programming in a very natural way. As a first example, we will see how to retrieve and execute a simple callback using asyncio. The asyncio loop can be retrieved by calling the asyncio.get_event_loop() function. We can schedule a callback for execution using  loop.call_later that takes a delay in seconds and a callback. We can also use the loop.stop method to halt the loop and exit the program.  To start processing the scheduled call, it is necessary to start the loop, which can be done using loop.run_forever. The following example demonstrates the usage of these basic methods by scheduling a callback that will print a message and halt the loop: import asyncio loop = asyncio.get_event_loop() def callback(): print("Hello, asyncio") loop.stop() loop.call_later(1.0, callback) loop.run_forever() —————————————— It's a great app for you to get lrc from music or to understand what's the meaning of lrc. —————————————— Check out "Genius — Song Lyrics & More" https://play.google.com/store/apps/details?id=com.genius.android —————————————— LMMS在linux做音乐也不错啊 反正都是玩,在win上搞些奇奇怪怪的也没多大意思 —————————————— 最近=最新 —————————————— 重新思考兼容性 这个东西只适用于客户端,服务器必须得使用最近技术,减少兼容产生的维护费用 —————————————— 1.5小时解决1000个问题就可以免学历去国外公司做开发呢! —————————————— Beats 78%, good. —————————————— Beats 87% in a hacking way class Solution(object): def detectCapitalUse(self, word): """ :type word: str :rtype: bool """ A = word[:1] if A.islower(): A = None B = set() C = set() for index, char in enumerate(set(word)): if char.islower(): B.update(char) else: C.update(char) length = len(set(word)) if A == 'F' and length == 2: return False if A != None and len(B) == length - 1: return True elif len(B) == length: return True elif len(C) == length: return True else: return False —————————————— 不管怎样,提前把题目放出来有好处,记在脑子里,睡一觉起来没准就解决了 —————————————— 我还打算手动写三个规则呢 你这直接就写出来了 果然是py大神 —————————————— 520. Detect Capital Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of the following cases holds: 1. All letters in this word are capitals, like "USA". 2. All letters in this word are not capitals, like "leetcode". 3. Only the first letter in this word is capital if it has more than one letter, like "Google". Otherwise, we define that this word doesn't use capitals in a right way. Example 1: Input: "USA" Output: True Example 2: Input: "FlaG" Output: False Note: The input will be a non-empty word consisting of uppercase and lowercase latin letters. class Solution(object): def detectCapitalUse(self, word): """ :type word: str :rtype: bool """ https://leetcode.com/problems/detect-capital/tabs/description —————————————— 《Mr. robot》这部美剧就是讲的一个社工高手,不管什么人都能从网上得到所有信息。 不知现实可不可行。 —————————————— @JYaung Can we talk? —————————————— 也许是我介绍写得太简略了 不过我确实还没正式开发那个鬼的啊 网页端解决后,asyncio理解后,再重构下中心服务器 差不多就可以正式做聊天应用了 不然都是出于模型阶段,只是探索可行性 —————————————— 艹,没邮箱真是错过好多精彩的事 —————————————— 我是最好社工的了 几年日记全在网上😒 —————————————— math.ceil(x) Return the ceiling of x, the smallest integer greater than or equal to x. —————————————— # Finally, I got something like this. # Yeah, copy from others. class Solution(object): def poorPigs(self, buckets, minutesToDie, minutesToTest): """ :type buckets: int :type minutesToDie: int :type minutesToTest: int :rtype: int """ import math states = minutesToTest // minutesToDie + 1 return int(math.ceil(math.log(buckets, states))) —————————————— 假设只有4桶,0桶没猪喝,1桶A喝,2桶B喝,3桶AB都喝 没猪死掉,代表0桶有毒 A猪死掉,代表1桶有毒 B猪死掉,代表2桶有毒 两只猪都死了,代表3桶有毒 😂 如果有x头猪,在这种情况下,可以测试2的x次方桶水。 —————————————— 不明觉厉 —————————————— 这道题搞得我想睡午觉 —————————————— 默认情况答案是5 —————————————— 哈哈 —————————————— 你肯定趁着吃午饭的时间在看这个问题 —————————————— ibraries include a very convenient event loop-based concurrency framework, asyncio, which will be the topic of the next section. —————————————— Event loops So far, we have implemented parallelism using OS threads. However, in many asynchronous frameworks, the coordination of concurrent tasks is managed by an event loop. The idea behind an event loop is to continuously monitor the status of the various resources (for example, network connections and database queries) and trigger the execution of callbacks when events take place (for example, when a resource is ready or when a timer expires). As a first example, we will implement a thread-free version of threading.Timer. We can define a Timer class that will take a timeout and implement the Timer.done method that returns True if the timer has expired: class Timer: def __init__(self, timeout): self.timeout = timeout self.start = time.time() def done(self): return time.time() - self.start > self.timeout To determine whether the timer has expired, we can write a loop that continuously checks the timer status by calling the Timer.done method. When the timer expires, we can print a message and exit the cycle: timer = Timer(1.0) while True: if timer.done(): print("Timer is done!") break By implementing the timer in this way, the flow of execution is never blocked and we can, in principle, do other work inside the while loop. Ideally, we would like to attach a custom function that executes when the timer goes off, just like we did in threading.Timer. To do this, we can implement a method, Timer.on_timer_done, that will accept a callback to be executed when the timer goes off: class Timer: # ... previous code def on_timer_done(self, callback): self.callback = callback Note that on_timer_done merely stores a reference to the callback. The entity that monitors the event and executes the callback is the loop. This concept is demonstrated as follows. Rather than using the print function, the loop will call timer.callback when appropriate: timer = Timer(1.0) timer.on_timer_done(lambda: print("Timer is done!")) while True: if timer.done(): timer.callback() break As you can see, an asynchronous framework is starting to take place. All we did outside the loop was define the timer and the callback, while the loop took care of monitoring the timer and executing the associated callback. We can further extend our code by implementing support for multiple timers. A natural way to implement multiple timers is to add a few Timer instances to a list and modify our event loop to periodically check all the timers and dispatch the callbacks when required. In the following code, we define two timers and attach a callback to each of them. Those timers are added to a list, timers, that is continuously monitored by our event loop. As soon as a timer is done, we execute the callback and remove the event from the list: timers = [] timer1 = Timer(1.0) timer1.on_timer_done(lambda: print("First timer is done!")) timer2 = Timer(2.0) timer2.on_timer_done(lambda: print("Second timer is done!")) timers.append(timer1) timers.append(timer2) while True: for timer in timers: if timer.done(): timer.callback() timers.remove(timer) # If no more timers are left, we exit the loop if len(timers) == 0: break The main restriction of an event loop is, since the flow of execution is managed by a continuously running loop, that it never uses blocking calls. If we use any blocking statement (such as time.sleep) inside the loop, you can imagine how the event monitoring and callback dispatching will stop until the blocking call is done. To avoid this, rather than using a blocking call, such as time.sleep, we let the event loop detect and execute the callback when the resource is ready. By not blocking the execution flow, the event loop is free to monitor multiple resources in a concurrent way. The Python standard l —————————————— https://discuss.leetcode.com/topic/67666/another-explanation-and-solution/5 我理解错了,他还扯上维度了 心情是崩溃的 —————————————— 虽然写了这么多奇奇怪怪的东西 我还是不知道到底最少需要几只猪 —————————————— 1 2 3 4 5 | 1000÷5=200 6 7 8 9 10 | 200÷5=40 11 12 13 14 15 | 40÷5=8 16 17 18 19 20 | 8÷4=2 21 22 23 24 25 | feed two pigs, die or live —————————————— Having 60 minutes and tests taking 15 minutes means we can run four tests. If the row pig dies in the third test, the poison is in the third row. If the column pig doesn't die at all, the poison is in the fifth column (this is why we can cover five rows/columns even though we can only run four tests). We can measure at 4 intervals: (15,30,45,60). the final interval counts for two as the pig could be alive or dead. States per pig: Dead at 15 Dead at 30 Dead at 45 Dead at 60 Alive at 60 So, it's something like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 If you only have 60 minutes and it takes 15 mins per row, shouldn't you only have up to 4 rows? 4 rows * 15 = 60 mins. —————————————— 我知道了 3 + 125 3是二分法做排除,125是最后15分钟挨个做测试 —————————————— 我虽然不知道最少 但知道1000头猪一定能找到那桶毒药 —————————————— 如果以分钟为基数,一直喝水最多死45头猪,怎么能检验1000桶水呢? 如果以秒为基数,不断喝水可以尝试45×60=2700次 —————————————— 458. Poor Pigs There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum amount of pigs you need to figure out which bucket contains the poison within one hour. Answer this question, and write an algorithm for the follow-up general case. Follow-up: If there are n buckets and a pig drinking poison will die within m minutes, how many pigs (x) you need to figure out the "poison" bucket within p minutes? There is exact one bucket with poison. class Solution(object): def poorPigs(self, buckets, minutesToDie, minutesToTest): """ :type buckets: int :type minutesToDie: int :type minutesToTest: int :rtype: int """ https://leetcode.com/problems/poor-pigs/tabs/description —————————————— 没准 @system357 喜欢小姐姐 你们看这名字 —————————————— 然后称霸整个翻墙行业 —————————————— 赚了钱肉翻 再雇一群程序员把生意做大 —————————————— 那她如果自己做翻墙服务 肯定赚翻 可惜她不会经济学 —————————————— 咋没人人肉编程随想 —————————————— 听说ssr小姐姐被人肉了 —————————————— Futures Futures are a more convenient pattern that can be used to keep track of the results of asynchronous calls. In the preceding code, we saw that rather than returning values, we accept callbacks and pass the results when they are ready. It is interesting to note that, so far, there is no easy way to track the status of the resource. A future is an abstraction that helps us keep track of the requested resources and that we are waiting to become available. In Python, you can find a future implementation in the concurrent.futures.Future class. A Future instance can be created by calling its constructor with no arguments: fut = Future() # Result: # A future represents a value that is not yet available. You can see that its string representation reports the current status of the result which, in our case, is still pending. In order to make a result available, we can use the Future.set_result method: fut.set_result("Hello") # Result: # fut.result() # Result: # "Hello" You can see that once we set the result, the Future will report that the task is finished and can be accessed using the Future.result method. It is also possible to subscribe a callback to a future so that, as soon as the result is available, the callback is executed. To attach a callback, it is sufficient to pass a function to the Future.add_done_callback method. When the task completes, the function will be called with the Future instance as its first argument and the result can be retrieved using the Future.result() method: fut = Future() fut.add_done_callback(lambda future: print(future.result(), flush=True)) fut.set_result("Hello") # Output: # Hello To get a grasp on how futures can be used in practice, we will adapt the network_request_async function to use futures. The idea is that, this time, instead of returning nothing, we return a Future that will keep track of the result for us. Note two things: 1. We don't need to accept an on_done callback as callbacks can be connected later using the Future.add_done_callback method. Also, we pass the generic Future.set_result method as the callback for threading.Timer. 2. This time we are able to return a value, thus making the code a bit more similar to the blocking version we saw in the preceding section: from concurrent.futures import Future def network_request_async(number): future = Future() result = {"success": True, "result": number ** 2} timer = threading.Timer(1.0, lambda: future.set_result(result)) timer.start() return future fut = network_request_async(2) If you execute the preceding code, nothing will happen as the code only consists of preparing and returning a Future instance. To enable further operation of the future results, we need to use the Future.add_done_callback method. In the following code, we adapt the fetch_square function to use futures: def fetch_square(number): fut = network_request_async(number) def on_done_future(future): response = future.result() if response["success"]: print("Result is: {}".format(response["result"])) fut.add_done_callback(on_done_future) The code still looks quite similar to the callback version. Futures are a different and slightly more convenient way of working with callbacks. Futures are also advantageous, because they can keep track of the resource status, cancel (unschedule) scheduled tasks, and handle exceptions more naturally. —————————————— 游戏要注意抓住人的现实需求 比如捕鱼达人→钓鱼 比如QQ农场→种地 比如大富翁→发财 比如跑酷→突破障碍 比如GTA→杀人飚车、无法无天 … —————————————— 第二年就坑了 —————————————— .cf —————————————— 穷啊 第二年几百美金一个域名 —————————————— 一年换一次 —————————————— 6 —————————————— 免费域名真正蛋疼的地方在于不能使用HTTPS 每次到期,原来的SSL证书就失效了 可是不用HTTPS,运营商流量劫持插广告又非常恶心 —————————————— http://zhangwenli.com 这个网页聊天界面好赞! —————————————— 然后redirect_output已经过时 document里没找到 —————————————— One question os.remove()报错默认不提示 不用忽略错误 —————————————— This one beats 31%: return ''.join(s[::-1]) And this one just beats 13%: return s[::-1] Strange. —————————————— 我精挑细选出的题 谁叫我起床晚了… —————————————— Beats 11%. 😭 class Solution(object): def reverseString(self, s): return ''.join(list(s)[::-1]) —————————————— Beats 26%. —————————————— 344. Reverse String Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return "olleh". class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str """ https://leetcode.com/problems/reverse-string/#/description —————————————— 我们都是大大,本群没有大大😁 —————————————— 我真是觉得女生要开博客认真更新的一般都是研究生及以上水平 不然不会有非社交网络的闲话可说 不然不会有一种深深的孤独感驱使她去写一些东西 智商越高越孤独 —————————————— https://93tillinfinity.withknown.com —————————————— 原来是女装高手 —————————————— 她真是妹子吗? —————————————— 为啥17个man聚在一起 要是17个girl就好了 —————————————— 彻底看懂头脑发涨 一定是这作者文笔太差 —————————————— lt as an argument to the on_done callback. The rest of the function consists of submitting a callback (called timer_done) to the timer.Timer class that will call on_done when it's ready: def network_request_async(number, on_done): def timer_done(): on_done({"success": True, "result": number ** 2}) timer = threading.Timer(1.0, timer_done) timer.start() The usage of network_request_async is quite similar to timer.Timer; all we have to do is pass the number we want to square and a callback that will receive the result when it's ready. This is demonstrated in the following snippet: def on_done(result): print(result) network_request_async(2, on_done) Now, if we submit multiple network requests, we note that the calls get executed concurrently and do not block the code: network_request_async(2, on_done) network_request_async(3, on_done) network_request_async(4, on_done) print("After submission") In order to use network_request_async in fetch_square, we need to adapt the code to use asynchronous constructs. In the following code, we modify fetch_square by defining and passing the on_done callback to network_request_async: def fetch_square(number): def on_done(response): if response["success"]: print("Result is: {}".format(response["result"])) network_request_async(number, on_done) You may have noted that the asynchronous code is significantly more convoluted than its synchronous counterpart. This is due to the fact that we are required to write and pass a callback every time we need to retrieve a certain result, causing the code to become nested and hard to follow. —————————————— import threading def network_request_async(number, on_done): def timer_done(): on_done({'success': True, 'result': number ** 2}) timer = threading.Timer(1, timer_done) timer.start() def fetch_square(number): def on_done(response): # What is on_done, basaclly, based on done or finished. if response['success']: print('Result is: {}'.format(response['result'])) network_request_async(number, on_done) fetch_square(7) —————————————— Callbacks The code we have seen so far blocks the execution of the program until the resource is available. The call responsible for the waiting is time.sleep. To make the code start working on other tasks, we need to find a way to avoid blocking the program flow so that the rest of the program can go on with the other tasks. One of the simplest ways to accomplish this behavior is through callbacks. The strategy is quite similar to what we do when we request a cab. Imagine that you are at a restaurant and you've had a few drinks. It's raining outside, and you'd rather not take the bus; therefore, you request a taxi and ask them to call when they're outside so that you can come out, and you don't have to wait in the rain. What you did in this case is request a taxi (that is, the slow resource) but instead of waiting outside until the taxi arrives, you provide your number and instructions (callback) so that you can come outside when they're ready and go home. We will now show how this mechanism can work in code. We will compare the blocking code of time.sleep with the equivalent non-blocking code of threading.Timer. For this example, we will write a function, wait_and_print, that will block the program execution for one second and then print a message: def wait_and_print(msg): time.sleep(1.0) print(msg) If we want to write the same function in a non-blocking way, we can use the threading.Timer class. We can initialize a threading.Timer instance by passing the amount of time we want to wait and a callback. A callback is simply a function that will be called when the timer expires. Note that we have to also call the Timer.start method to activate the timer: import threading def wait_and_print_async(msg): def callback(): print(msg) timer = threading.Timer(1.0, callback) timer.start() An important feature of the wait_and_print_async function is that none of the statements are blocking the execution flow of the program. This technique of registering callbacks for execution in response to certain events is commonly called the Hollywood principle. This is because, after an audition for a role at Hollywood, you may be told "Don't call us, we'll call you", meaning that they won't tell you if they chose you for the role immediately, but they'll call you in case they do. To highlight the difference between the blocking and non-blocking version of wait_and_print, we can test and compare the execution of the two versions. In the output comments, the waiting periods are indicated by : # Syncronous wait_and_print("First call") wait_and_print("Second call") print("After call") # Output: # # First call # # Second call # After call # Async wait_and_print_async("First call async") wait_and_print_async("Second call async") print("After submission") # Output: # After submission # # First call # Second call The synchronous version behaves in a very familiar way. The code waits for a second, prints First call, waits for another second, and then prints the Second call and After call messages. In the asynchronous version, wait_and_print_async submits  (rather than execute) those calls and moves on immediately. You can see this mechanism in action by acknowledging that the "After submission" message is printed immediately. With this in mind, we can explore a slightly more complex situation by rewriting our network_request function using callbacks. In the following code, we define the network_request_async function. The biggest difference between network_request_async and its blocking counterpart is that network_request_async doesn't return anything. This is because we are merely submitting the request when network_request_async is called, but the value is available only when the request is completed. If we can't return anything, how do we pass the result of the request? Rather than returning the value, we will pass the resu —————————————— Concurrency Concurrency is a way to implement a system that is able to deal with multiple requests at the same time. The idea is that we can move on and start handling other resources while we wait for a resource to become available. Concurrency works by splitting a task into smaller subtasks that can be executed out of order so that multiple tasks can be partially advanced without waiting for the previous tasks to finish.   As a first example, we will describe how to implement concurrent access to a slow network resource. Let's say we have a web service that takes the square of a number, and the time between our request and the response will be approximately one second.  We can implement the network_request function that takes a number and returns a dictionary that contains information about the success of the operation and the result. We can simulate such services using the time.sleep function, as follows: import time def network_request(number): time.sleep(1.0) return {"success": True, "result": number ** 2} We will also write some additional code that performs the request, verifies that the request was successful, and prints the result. In the following code, we define the fetch_square function and use it to calculate the square of the number two using a call to network_request: def fetch_square(number): response = network_request(number) if response["success"]: print("Result is: {}".format(response["result"])) fetch_square(2) # Output: # Result is: 4 Fetching a number from the network will take one second because of the slow network. What if we want to calculate the square of multiple numbers? We can call fetch_square, which will start a network request as soon as the previous one is done: fetch_square(2) fetch_square(3) fetch_square(4) # Output: # Result is: 4 # Result is: 9 # Result is: 16 The previous code will take three seconds to run, but it's not the best we can do. Waiting for the previous result to finish is unnecessary as we can technically submit multiple requests at and wait for them parallely. Ideally, we would like to start other new task while we are waiting for the already submitted tasks to finish. This strategy is made possible by the fact that the three requests are completely independent, and we don't need to wait for the completion of a previous task to start the next one. Also, note how a single CPU can comfortably handle this scenario. While distributing the work on multiple CPUs can further speedup the execution, if the waiting time is large compared to the processing times, the speedup will be minimal. To implement concurrency, it is necessary to think and code differently; in the following sections, we'll demonstrate techniques and best practices to implement robust concurrent applications. —————————————— 还是不能期待 one for all,各有各的专长 应该这样: 小屏垃圾手机负责通讯 高配安卓平板电脑负责娱乐与阅读 普通8G+256SSD高续航笔记本负责写代码(其实用垃圾也可以,不用Java无所谓的) —————————————— This beats 30% of person. class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ nums = [int(i) for i in list(str(num))] while True: if len(nums) == 1: return int(''.join([str(i) for i in nums])) else: num = sum(nums) nums = [int(i) for i in list(str(num))] —————————————— 258. Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only one digit, return it. Follow up: Could you do it without any loop/recursion in O(1) runtime? class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ https://leetcode.com/problems/add-digits/#/description —————————————— Asynchronous programming Asynchronous programming is a way of dealing with slow and unpredictable resources. Rather than waiting idle for resources to become available, asynchronous programs are able to handle multiple resources concurrently and efficiently. Programming in an asynchronous way can be challenging because it is necessary to deal with external requests that can arrive in any order, may take a variable amount of time, or may fail unpredictably. In this section, we will introduce the topic by explaining the main concepts and terminology as well as by giving an idea of how asynchronous programs work. —————————————— Waiting for I/O A modern computer employs different kinds of memory to store data and perform operations. In general, a computer possesses a combination of expensive memory that is capable of operating at fast speeds and cheaper, and more abundant memory that operates at lower speeds and is used to store a larger amount of data. The memory hierarchy is shown in the following: registers cache RAM storage At the top of the memory hierarchy are the CPU registers. Those are integrated in the CPU and are used to store and execute machine instructions. Accessing data in a register generally takes one clock cycle. This means that if the CPU operates at 3 GHz, the time it takes to access one element in a CPU register is in the order of 0.3 nanoseconds. At the layer just below the registers, you can find the CPU cache, which is comprised of multiple levels and is integrated in the processor. The cache operates at a slightly slower speed than the registers but within the same order of magnitude. The next item in the hierarchy is the main memory (RAM), which holds much more data but is slower than the cache. Fetching an item from memory can take a few hundred clock cycles. At the bottom layer, you can find persistent storage, such as a rotating disks (HDD) and Solid State Drives (SSD). These devices hold the most data and are orders of magnitude slower than the main memory. An HDD may take a few milliseconds to seek and retrieve an item, while an SSD is substantially faster and takes only a fraction of a millisecond. To put the relative speed of each memory type into perspective, if you were to have the CPU with a clock speed of about one second, a register access would be equivalent to picking up a pen from the table. A cache access will be equivalent to picking up a book from the shelf. Moving higher in the hierarchy, a RAM access will be equivalent to loading up the laundry (about twenty x slower than the cache). When we move to persistent storage, things are quite a bit different. Retrieving an element from an SSD will be equivalent to doing a four day trip, while retrieving an element from an HDD can take up to six months! The times can stretch even further if we move on to access resources over the network. From the preceding example, it should be clear that accessing data from storage and other I/O devices is much slower compared to the CPU; therefore, it is very important to handle those resources so that the CPU is never stuck waiting aimlessly. This can be accomplished by carefully designing software capable of managing multiple, ongoing requests at the same time. —————————————— I'm gonna keep reading from now on. So I'll share something as I used to do. —————————————— Reactive programming Reactive programming is a paradigm that aims at building better concurrent systems. Reactive applications are designed to comply with the requirements exemplified by the reactive manifesto: Responsive:  The system responds immediately to the user. Elastic: The system is capable of handling different levels of load and is able to adapt to accommodate increasing demands. Resilient: The system deals with failure gracefully. This is achieved by modularity and avoiding having a single point of failure. Message driven: The system should not block and take advantage of events and messages. A message-driven application helps achieve all the previous requirements. —————————————— 伟大的哲学家康德一辈子没出过小镇。 也一辈子单身。 牛顿也是。 所以男性要搞好科研,首先得结扎。 不然都把心思拿去玩女人了。 http://blog.sciencenet.cn/blog-295006-464280.html —————————————— 我发誓我就是这样搞的 —————————————— 接下来我想问一些实际的问题,比如如何把python程序变成linux的命令直接启动,而不依赖python xx。 如果我们不会这个,就必须用界面来管理我们的程序,据我所知,那需要打包成2进制或deb包。我们的问题是How? 这些基础的问题,我竟然不懂。 —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 违反直觉 —————————————— I don't think it's any useful. —————————————— 我很快就发现 如果我去做一个实际的项目 我更倾向于不动脑,用以前实现过的方法 会变笨 但面对算法题,以前没做过,就有可能思考很多,这对大脑有帮助 —————————————— 每天一道题就够了 多了肯定明天就不做了 —————————————— 我这里还有一个更简单的方法,不过也超时,用Cython肯定没问题 class Solution(object): def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ for num in nums: if nums.count(num) == 1: return num —————————————— xor太复杂吧 不适合我 —————————————— return 2*sum(set(nums))-sum(nums) 纯数学的解决方法,他们真是神了 —————————————— Worse than expected. class Solution(object): def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ all_ = [] double = [] for num in nums: if num in all_: double.append(num) else: all_.append(num) diff = set(all_) - set(double) return diff.pop() —————————————— 两个set结果不是一样的? —————————————— Time Limit Exceeded, 😁 class Solution(object): def singleNumber(self, nums): """ :type nums: List[int] :rtype: int """ result = [] for num in nums: if num in result: result.remove(num) else: result.append(num) return result[0] —————————————— http://www.webmd.com 好东西,不过我是真的腰椎上有一节按着疼,反向弯腰也疼 —————————————— 我现在确定我是腰椎病了 还没告诉父母 插,我才19岁啊 叫你们别长期坐在电脑前,多运动啊,不然打了背部麻醉就知道你腰椎有多脆弱了 —————————————— ? —————————————— Given an array of integers, every element appears twice except for one. Find that single one. https://leetcode.com/problems/single-number/#/description —————————————— 什么东西在阻止我学习: 1. 与原始欲望背道而驰 2. 得不到分享与炫耀的快感 3. unstable 4. 付出太多,如时间、精力 —————————————— 那你学了计算机与科学出来想干嘛? —————————————— 这样想的话 有什么意思 不同语言本质上是一样,只是换了名字,或用了缩写 —————————————— 哦 感觉好很多 —————————————— 是电子信息技术吗? —————————————— 看来你大学可以好好看看那些基础又要命的东西 —————————————— 最初的梦想还是最有动力的 即使感觉我目前学的一切都派不上用场(全是现成的) —————————————— 计算机科学、算法、数据结构 这些东西和AI有关系吗? —————————————— 养成习惯,干货用英语 平时评论用中文 然后上次发的fuck baidu那个代码的博客作者肯定是抄的这本书 那篇文章里有代码和这一模一样 —————————————— And you also need this for better LRC showing. —————————————— 用啥酷我K歌 网易云MV+桌面歌词最大化整起 没有我不能唱的英文歌 —————————————— I can do anything, but I don't wanna do anything. -- yingshaoxo —————————————— Tech area is a paradise for Freaks. -- 《Silicon Valley》 —————————————— Fuck baidu in a elegant way import random import asyncio from aiohttp import ClientSession async def fetch(url, session): async with session.get(url) as response: date = response.headers.get("DATE") print("{}, status:{}".format(date, response.status)) return await response.read() async def bound_fetch(sem, url, session): # Getter function with semaphore. async with sem: await fetch(url, session) async def run(r): url = "https://www.baidu.com" tasks = [] # create instance of Semaphore sem = asyncio.Semaphore(1000) # Create client session that will ensure we dont open new connection # per each request. async with ClientSession() as session: for i in range(r): # pass Semaphore and session to every GET request task = asyncio.ensure_future(bound_fetch(sem, url.format(i), session)) tasks.append(task) responses = asyncio.gather(*tasks) await responses number = 100000 loop = asyncio.get_event_loop() future = asyncio.ensure_future(run(number)) loop.run_until_complete(future) —————————————— When I look at `generator`, I found that it's just like `linked list`, but instead of containing data, it contains executable codes. —————————————— To comment out blocks in vim: 1. Hit ctrl+v into visual block mode 2. Use the up/down arrow keys to select lines you want 3. Hit I 4. Insert the text you want, i.e. '# ' 5. Press Esc For uncomment, it's the same thing using x for deletion. —————————————— Welcome to the hell. —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 在家(大厅)看美剧才是正确的生活方式😄👍 —————————————— http://jiqimao.tv/ —————————————— I got one. —————————————— 万能的群友,告诉我Win上有什么在线看美剧的地方或软件吧 我似乎没办法投影安卓4.4手机到电脑 —————————————— 然后它两个窗口的靠接方式和我以前做过的程序一样,视频全屏后点歌台窗口还在,,,属于设计缺陷 不过这东西好几年前就没更新了 网络服务撑到现在还是挺牛逼 毕竟是免费的,,,老板转型做直播了,哈哈 —————————————— 易语言的皮肤 —————————————— 突然发现酷我K歌是用易语言做的,良心应用啊 —————————————— “你有钱又怎样,我才不管你的身份” 家庭K歌房 —————————————— Humans power is the same thing. —————————————— There is strength in numbers. —————————————— So what's the power of smart phone? Apps, all apps linked together and are available. —————————————— All linked together. —————————————— Hey, you see, what's the power of internet? Connection! —————————————— I would like to use this as a key-value saver instead of json model. https://docs.python.org/3/library/configparser.html —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 做大神不易,需要承受相当大的痛苦,面对大量数据的冲击,忍受繁重的任务,应对失眠与焦虑。 —————————————— 党内群友真是太伟大了 一发问题立马解决,无广告😂 —————————————— 广电网络流量劫持太恶心了 任何http的手机网页都插广告,并且还JS禁止你点击除广告外的任何链接😡 —————————————— If I shutdown the computer, what you see then? —————————————— What is real, what is virtual, I don't know. —————————————— 不懂,这是给人看的吗? 我就想做 if 护眼程序未运行 then 运行 也怪垃圾红米,老是无理由终止我的 Darker Pro 护眼程序 现在只能设置tasker为关屏kill护眼程序,开屏start护眼程序😞 http://www.pocketables.com/2013/03/overview-of-pocketables-tasker-articles.html —————————————— http://m.apkhere.com —————————————— https://www.htcp.net 其实我的心是拔凉的,国内一个下实用外国破解软件的地方都没有 —————————————— 不过戴上VR后你就不能和你女朋友亲亲了 —————————————— VR眼镜 —————————————— 我觉得不现实 不是哪儿都有适合的天花板 没准3D眼镜投影电脑屏幕比较靠谱😄 —————————————— 如果屏幕安在天花板就好了 就可以躺着写代码了😭 —————————————— 不行,始终感觉腰疼 我还是多躺床上思考,少坐着盯代码比较好 想不到我年纪轻轻… —————————————— 接下来是要开发网易云音乐离线版 要做这个,首先我得改造一下Local_Show这个项目,使用Aplayer作为音乐播放器 在那之前,我想先玩玩DNF —————————————— 我十几个项目就收到了一个日本朋友的Star —————————————— 能打印初音未来吗? —————————————— 豪 —————————————— @Takaranoao 这孩子也是 还和我考得一样烂 —————————————— 哦 @bdbai @ysc3839 @yingshaoxo 都是高中刚毕业 还有吗? —————————————— 怎么都是年轻人 高中没毕业那种 —————————————— 别看不下去,你的呢? 我 fo 一个 —————————————— 你的github是多少? —————————————— 你多大了,41个项目 虽然感觉很多没啥用,还是copy的 —————————————— 这样吧,一周之后进行大清洗 凡是我认为有嫌疑的通通kick out. —————————————— 刚接到通知 说是本群有中共特务 咋办呢? —————————————— 以后还是得买个人体工程学座椅,不然腰椎受不了 然后要定时给屁屁散热,以免肛门受不了 —————————————— https://www.zhihu.com/question/20402689 似乎腰椎出了问题,最近手碰疼 —————————————— https://gitlab.com/fdroid/fdroiddata/blob/master/CONTRIBUTING.md#building-it 然后 D-droid 我们的应用上不去,因为是用第三方语言开发,没法直接building —————————————— http://exygy.com/which-license-should-i-use-mit-vs-apache-vs-gpl/ The GPL licenses (GPLv3, GPLv2, LGPL, Affero GPL) all contain some kind of share-alike license. They essentially say “if you make a derivative work of this, and distribute it to others under certain circumstances, then you have to provide the source code under this license.” The important thing to know here is that “derivative work” and “certain circumstances” both require some legal analysis to understand the meaning and impact for your project. 看来以后开源要用GPL协议,以防小人商用😏 —————————————— UI User Interface —————————————— One for UI, One for server. —————————————— I'm night elf. —————————————— Keep it as a goal, I'm still fighting. —————————————— The next step is to forget what is frontend or backend. Put those things together. —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 超时啦😅 我果然低效率 —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 想发到 F-droid 上去,但今天时间不够了 趁还有25分钟赶紧弄bot —————————————— https://github.com/yingshaoxo/SongRecorder —————————————— 哈哈,临近截至时间,发现两个问题 1.flash背景是黑色才能和框架搭配(PS修复即可) 2.编译出的apk菜单键捕获失败(艹你大爷,两个手机上的调试器都可以捕获到菜单键,编译出咋就不行呢?这样直接导致分享键没了,这是个重大问题,不能便捷分享recording要它干嘛) —————————————— I must be old, 每天都要睡午觉,不然下午就废了 —————————————— Using photoshop is a hard work. —————————————— 接下来要找logo 我可是要上架的 —————————————— https://docs.python.org/3/library/logging.html In the future, I would like to use this for debug rather than print information. —————————————— 手机录歌(翻唱) 然后导出人声,分享到电脑 这样电脑没有麦克风也可以做后期了 —————————————— 目前主要的问题是这个弹出框太丑了 —————————————— fundamentals —————————————— 可能比起学一门新语言,花两个月去补补数学基础比较重要 可能比起临时的努力,每天坚持念英语比较重要 It's more important to learn some mathematical fundamental. It's more important to practice English everyday. —————————————— 恩 明天给bot加上英语 不经常看口语都不知道怎么说了 —————————————— /go@XiaoyaBot —————————————— /go@XiaoyaBot —————————————— 还是8000,或是1080? —————————————— 默认端口是443? —————————————— http://www.jianshu.com/p/e730d2399d09 —————————————— 明天我可能会发全中国最屌的kivy应用😄 Tomorrow is a big day. —————————————— 男神回我话了😘 —————————————— It's a hot day. —————————————— 肉身翻😒 —————————————— 看来你认识我 —————————————— 好吧 —————————————— zeronet也不错 每个人承包一个package —————————————— 不对,淘宝那群SX怎么会知道我要什么呢 还是指望有大神做基于 Resilio Sync 的离线 document 比较靠谱 —————————————— 我主要是在想 要是白名单就见不到你们了 同时没谷歌还真是没法编程 到时只有转业做其他或者淘宝购买大量离线文件,想想就恶心 —————————————— 另外针对shadowsocks的检测系统做出来了 据说正开始大规模的清理翻墙软件运动 刚刚Twitter看到的 —————————————— 有传闻github要被封 —————————————— https://eddieeddieeddiejones.github.io/2016/12/11/%E5%A6%82%E4%BD%95%E5%AD%A6%E5%89%8D%E7%AB%AF%EF%BC%9F/ —————————————— 发出来万一你们大学考c用得着😆 —————————————— 今后要是再闹文化大革命 估计第一个被打倒的就是程序员 —————————————— 如果你是技术人员 你会不会想在你另一半(或熟人)手机上做个监控 其实很简单,首先你需要是美图秀秀之类国产软件的内部开发人员 其次你的应用有读取用户电话本和联网的权限(这并没有什么,国产应用基本有这两个权限) 于是在某人启动APP后: 1. 检测是否连上Wi-Fi,是就准备录制视频到服务器,否就准备拍摄图片到服务器 2. 得到用户电话本,与开发人员指定的一群联系人做对比,有80%重合率就真正开始发送偷拍文件到服务器 3. 保持隐匿与后台,注意控制应用占用的带宽,不能太明显 —————————————— 对呀,拿到伴奏recover恢复成有人声啊😏 —————————————— 对于一个业余音乐爱好者 到底可以干啥? 1. 拿到就是翻(recover) 2. 拿到就是搞(remix) —————————————— 伴随你账户呗 优秀的设置就是一段json —————————————— 可我在讲如何给客户更好的体验 —————————————— 比如telegram,每次新开网页端或其他端,我都必须重新选择Control + Enter发送 那很烦,通用设置应该储存在云端,像Chrome一样 —————————————— 你不觉得不靠谱的应用通常不会存储你的设置在云端吗? —————————————— Get file path by file name in linux: locate file_name —————————————— 虽然每次开旧坑走旧路都能有新的收获 但范围太广实在是累 像是超负荷记忆力不够用一样 —————————————— 每天都很累 也不知道在忙些什么 最近做的东西都达不到我的要求 —————————————— 谁知道python版的ss中的sslocal全路径是多少? crontab -e设置开机自启时要用到 —————————————— 一直都在别人的框架上改改改 是时候复制粘贴出一个新东西了 原框架用了多进程和增大fps的办法,肯定是高档机 咱这个垃圾电脑,还是一条进程到底,fps速率默认比较好😐 —————————————— 然后尝试去掉cv窗口,却怎么也不能让它工作起来 想来坑太多,得自己慢慢踩 —————————————— 转换写好了,就是只能稳定的画一个框,其他的都秒消失。。。 —————————————— 什么鬼 —————————————— 用于定义矩形 —————————————— tensorflow里的一种数据结构 —————————————— 我觉得谷歌家的box有点坑 别人写坐标都是把x放在前,y放在后 谷歌非要反其道而行 —————————————— 买了两大袋雪饼和仙贝 配合雪碧应该可以好好工作了 —————————————— 想不出来或没心思想或脑子不够用 去逛超市吧,买点零食回来 —————————————— 这样就可以得到win8以上的正确分辨率 但并没有用,我在想怎样从image上的比例关系box转化到屏幕上真实的box import ctypes user32 = ctypes.windll.user32 user32.SetProcessDPIAware() print(user32.GetSystemMetrics(0), user32.GetSystemMetrics(1)) —————————————— I wonder when we created this group. —————————————— Or go to find out how much eBooks we shared in this group. —————————————— Maybe you should 向上翻, see what we have done in the past year. From nobody to py developer. —————————————— This is the only one, I guess. —————————————— #With these codes follow by function vis_util.visualize_boxes_and_labels_on_image_array() , you will see clearly how object detector works each time when you put a picture to it: boxes_list = np.squeeze(boxes).tolist()[:5] socres_list = np.squeeze(scores).tolist()[:5] classes_id_list = np.squeeze(classes).astype(np.int32)[:5] classes_name_list = [category_index[id]['name'] for id in classes_id_list] print(boxes_list) print('--' * 17) print(socres_list) print('--' * 17) print(classes_id_list) print('--' * 17) print(classes_name_list) print('\n' * 3) —————————————— That's a big question right now, so good night everyone. —————————————— I still got some questions, for example, I could get boxes, which is a list containing boxes information. But how can you know which box you should pick and show? —————————————— #这下换成内建函数,msdn是个好东西(在win端) from ctypes import windll class screen_drawer(): def __init__(self, hex_color): self.hdc = windll.user32.GetDC(0) rgb = self.hex_to_rgb(hex_color) self.color = self.rgb_to_int(rgb) def hex_to_rgb(self, hex): hex = hex[1:] return tuple(int(hex[i:i+2], 16) for i in (0, 2 ,4)) def rgb_to_int(self, rgb): red = rgb[0] green = rgb[1] blue = rgb[2] RGBint = (red<<16) + (green<<8) + blue return RGBint def draw_a_point(self, x, y): windll.gdi32.SetPixel(self.hdc, x, y, self.color) def draw_a_box_on_screen(self, y_min, x_min, y_max, x_max): for i in range(0, x_max - x_min + 1): self.draw_a_point(x_min + i, y_min) for i in range(0, y_max - y_min + 1): self.draw_a_point(x_min, y_min + i) for i in range(0, x_max - x_min + 1): self.draw_a_point(x_min + i, y_min + (y_max - y_min)) for i in range(0, y_max - y_min + 1): self.draw_a_point(x_min + (x_max - x_min), y_min + i) drawer = screen_drawer('#4286f4') drawer.draw_a_box_on_screen(80, 80, 400, 400) —————————————— #做好了,不过为什么我这边得到的windows屏幕的大小是(1536,864),然而这并不能当中点,奇怪😳 from win32gui import GetDC, SetPixel from win32api import RGB from win32api import GetSystemMetrics class screen_drawer(): def __init__(self, hex_color): self.hdc = GetDC(0) rgb = self.hex_to_rgb(hex_color) self.color = RGB(rgb[0], rgb[1], rgb[2]) self.center_x = GetSystemMetrics(0) // 2 self.center_y = GetSystemMetrics(1) // 2 def hex_to_rgb(self, hex): hex = hex[1:] return tuple(int(hex[i:i+2], 16) for i in (0, 2 ,4)) def draw_a_point(self, x, y): SetPixel(self.hdc, x, y, self.color) def draw_a_box_on_screen(self, y_min, x_min, y_max, x_max): for i in range(0, x_max - x_min + 1): self.draw_a_point(x_min + i, y_min) for i in range(0, y_max - y_min + 1): self.draw_a_point(x_min, y_min + i) for i in range(0, x_max - x_min + 1): self.draw_a_point(x_min + i, y_min + (y_max - y_min)) for i in range(0, y_max - y_min + 1): self.draw_a_point(x_min + (x_max - x_min), y_min + i) def draw_a_center_box_on_screen(self, length): half_length = length // 2 y_min = self.center_y - half_length x_min = self.center_x - half_length y_max = self.center_y + half_length x_max = self.center_x + half_length self.draw_a_box_on_screen(y_min, x_min, y_max, x_max) drawer = screen_drawer('#4286f4') drawer.draw_a_box_on_screen(80, 80, 300, 300) drawer.draw_a_center_box_on_screen(300) —————————————— 竟然发现我是用QQ邮箱绑定的telegram 吓得我一身冷汗 —————————————— 叫你用QQ —————————————— https://github.com/wangchunming/2017hosts/blob/master/README.md 这运气太好了,叫你用微信 —————————————— 关键在于如果不能在名称上表明其作用 你就得到处翻文档 那是很痛苦的 —————————————— 总比十个大写字符好 —————————————— 淘宝😂 —————————————— 还有python的裤子没到 —————————————— 有ide补全你怕什么 —————————————— 有编译器你怕什么 —————————————— 记一串乱七八糟的字符不如记一段有意义的英文句子 —————————————— C++ 最蛋疼的就是那些人用很多大写缩写 完全是装逼,现在的电脑哪还在乎那几个字符所占的空间😒 —————————————— 哎,如果实在不行,就用点绘一个方框也可以 —————————————— 无所谓啊,反正游戏中人物随时都会动 —————————————— from win32gui import GetDC, SetPixel hdc = GetDC(0) x = 0 y = 0 for _ in range(1000): SetPixel(hdc, x, y, 16737792) x += 1 y += 1 这个就没建 —————————————— 瞎写啥呢,知道的话帮忙解决问题呗。。。 —————————————— 好,现在整理一下 SetRectRgn(hrgn, 2, 2, 80, 90) 需要一个 HRGN 类型的参数(https://msdn.microsoft.com/en-us/library/windows/desktop/dd145087(v=vs.85).aspx) 然后 CreatePen(win32con.PS_SOLID, 3, 16737792) 只产生了一个 HPEN 类型的数据(https://msdn.microsoft.com/en-us/library/windows/desktop/dd183509(v=vs.85).aspx) 所以我需要一个接收 HPEN 数据来得到 HRGN 数据的函数(api) —————————————— https://msdn.microsoft.com/en-us/library/windows/desktop/dd183514(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/dd145087(v=vs.85).aspx 我觉得这两个是矛盾的 —————————————— Gdi objects such as brush (HBRUSH), pen (HPEN) , font (HFONT), region (HRGN), bitmap (HBITMAP) On destruction http://timgolden.me.uk/pywin32-docs/PyGdiHANDLE.html http://timgolden.me.uk/pywin32-docs/win32gui__CreatePen_meth.html —————————————— 其实windows目前主要是用C++在支撑,所以把C++也变得十分恶心... —————————————— 你们真有人懂windows编程吗? from win32gui import GetDC, CreatePen, SetRectRgn import win32con print([i for i in dir(win32con) if i[:3] == 'PS_']) hrgn = CreatePen(win32con.PS_SOLID, 3, 16737792) print(type(hrgn)) SetRectRgn(hrgn, 2, 2, 80, 80) print(dir(hrgn)) 这个不应该有错啊? —————————————— 虽然这个鬼也可以,但画出来是个实体矩形: from win32gui import GetDC, Rectangle hdc = GetDC(0) Rectangle(hdc, 2, 2, 80, 80) —————————————— 不知道你那个,我想用这个,但就是不知道这里的 hrgn 是什么东西,网上资料太少了 http://timgolden.me.uk/pywin32-docs/win32gui__SetRectRgn_meth.html http://timgolden.me.uk/pywin32-docs/PyGdiHANDLE.html —————————————— pygame不是只能在新建的窗口绘图吗? 我要直接在屏幕顶层绘图 —————————————— 真没找到直接绘图的py包 但据说可以调用win32来绘图 就和易语言的超级模块里屏幕写字的原理差不多,但我们只需要画矩形 易语言写出的dll是32位的,与咱们高大上的64位tensorflow不符,所以咱只能用pywin32模块自己写了😞 —————————————— 先不管这个,比起它单独开一个窗口绘图,我更愿意它直接在屏幕上绘图 怎么办呢 —————————————— print after this np.set_printoptions(suppress=True) I got something like this: [ [ 0.0182578 0.12923348 0.28831497 0.53664744] [ 0. 0.69159621 0.27006167 0.85380119] [ 0.58650112 0.45487747 0.61464882 0.47155532] [ 0.31115252 0.17527957 0.58016253 0.31163746]] As you can see, it's a list of [y_min, x_min, y_max, x_max]. All number is in the middle of 0 and 1. —————————————— numpy arrays —————————————— 2.39784122e-02 = 2.39784122×10² 科学计数法😅 —————————————— The coordinates of the each bounding box in boxes are encoded as [y_min, x_min, y_max, x_max] —————————————— https://www.tensorflow.org/versions/r0.12/api_docs/python/image/working_with_bounding_boxes 它这里讲的boxes是0-1的比例关系 但我们这边得到的输出明显是0-10 —————————————— 难道代表比例关系? —————————————— [ 3.07355486e-02 3.80255133e-02 5.80146946e-02 7.91000873e-02] [ 3.20514470e-01 4.41467643e-01 3.86711568e-01 8.15755248e-01] [ 1.16672516e-01 4.57820296e-03 9.72460389e-01 2.56505400e-01] [ 5.81015825e-01 3.83704994e-03 7.84217834e-01 1.57667361e-02] [ 7.72423387e-01 9.79218185e-02 9.65070367e-01 8.64091873e-01] [ 2.97921866e-01 6.18675709e-01 3.17120939e-01 6.32115245e-01] [ 2.05810979e-01 3.68779572e-03 4.20991123e-01 1.43776909e-02] [ 0.00000000e+00 0.00000000e+00 8.80637228e-01 5.63049555e-01] [ 3.92125726e-01 1.27022862e-02 9.34177399e-01 2.81523764e-01] [ 1.62554204e-01 6.06324732e-01 4.84830141e-01 7.24786937e-01] [ 3.78780663e-02 1.00065038e-01 6.18320584e-01 3.56704473e-01] [ 1.74412578e-02 4.46169198e-01 1.49949029e-01 8.23125303e-01] [ 2.44088471e-02 1.98130310e-02 5.78818560e-01 2.71998763e-01] [ 3.46857369e-01 6.68662429e-01 7.53517926e-01 9.99699831e-01] [ 8.37100446e-01 1.22434020e-01 9.30866539e-01 1.64737165e-01] [ 6.41632497e-01 6.48781538e-01 1.00000000e+00 8.69084239e-01] [ 8.17155764e-02 3.95378411e-01 1.41408786e-01 4.72835004e-01] [ 1.07396781e-01 4.21199828e-01 7.12409854e-01 7.58325219e-01] [ 0.00000000e+00 7.73260593e-01 8.71131778e-01 9.60814953e-01] [ 8.16628337e-01 8.97486787e-03 9.84643817e-01 4.00854498e-02] [ 8.57902527e-01 5.21018982e-01 9.79681730e-01 5.94060302e-01] [ 6.88118815e-01 0.00000000e+00 8.25785637e-01 6.88888192e-01] [ 5.66013455e-01 1.19486228e-02 9.80172515e-01 2.35021412e-01] [ 2.20373660e-01 6.23525560e-01 2.44689375e-01 6.37659252e-01] [ 6.36224985e-01 1.27975643e-02 8.54228735e-01 5.33566117e-01] [ 3.91315430e-01 1.35707691e-01 1.00000000e+00 4.57752109e-01] [ 7.06926405e-01 2.03326941e-02 8.18738043e-01 1.00000000e+00] [ 1.32175058e-01 1.40536427e-02 9.47692752e-01 5.50856352e-01] [ 2.39784122e-02 6.24577641e-01 5.78303516e-01 1.00000000e+00] [ 0.00000000e+00 4.69461322e-01 1.89320654e-01 6.30855203e-01] [ 0.00000000e+00 7.43102491e-01 8.53561044e-01 9.93612587e-01] [ 4.02618885e-01 5.86637497e-01 6.94965124e-01 9.88773704e-01] [ 1.59441411e-01 6.47190452e-01 4.70317841e-01 7.88871646e-01] [ 1.44793093e-03 9.43708539e-01 3.62305418e-02 1.00000000e+00] [ 9.43920016e-03 9.59021389e-01 5.90087891e-01 9.98726904e-01] [ 5.37315488e-01 3.46107215e-01 7.73099661e-01 9.38199043e-01] [ 1.87381223e-01 6.55703247e-01 2.07591966e-01 6.88524663e-01] [ 4.56134617e-01 5.87518513e-03 8.22750390e-01 2.24328101e-01] [ 5.22724986e-02 5.44404447e-01 3.88570189e-01 6.63419545e-01] [ 4.73913550e-01 4.59273160e-01 5.46335578e-01 8.06281626e-01] [ 7.33218372e-01 3.95907938e-01 7.92753041e-01 7.51611412e-01] [ 2.84125954e-01 5.99049270e-01 5.87287307e-01 7.34099567e-01] [ 2.60339320e-01 1.42552555e-01 7.19258010e-01 9.01715934e-01] [ 2.80676633e-01 5.43666720e-01 5.80390573e-01 6.77678108e-01]]] —————————————— 唯一有可能包含位置信息的变量boxes 长这样: [[[ 0.00000000e+00 9.99094844e-02 8.62956285e-01 9.17412460e-01] [ 4.92391139e-02 3.84009063e-01 2.05517218e-01 8.62422884e-01] [ 2.77119845e-01 4.08351421e-01 3.33159119e-01 8.44172597e-01] [ 3.58629823e-02 2.21622586e-01 8.17874491e-01 8.84115338e-01] [ 1.53862298e-01 3.65073264e-01 2.34666765e-01 8.47025573e-01] [ 2.74806589e-01 3.64271462e-01 4.47671860e-01 8.46024811e-01] [ 6.32017732e-01 4.37894583e-01 7.16390729e-01 7.71738768e-01] [ 1.48207456e-01 0.00000000e+00 8.81179929e-01 1.23900935e-01] [ 3.06358337e-02 1.71421673e-02 5.83597124e-02 5.21568954e-02] [ 1.64282411e-01 3.52434427e-01 3.03064287e-01 8.56679797e-01] [ 4.93822724e-01 5.19018054e-01 7.67029405e-01 6.94663167e-01] [ 5.28950095e-02 2.56984532e-02 8.16560149e-01 6.12388492e-01] [ 2.01953173e-01 3.82305026e-01 2.63030946e-01 8.58065128e-01] [ 8.42391014e-01 1.07587636e-01 9.89142656e-01 1.71468377e-01] [ 3.54336381e-01 0.00000000e+00 8.42024326e-01 5.23184091e-02] [ 3.38899702e-01 3.35113704e-03 8.83340478e-01 1.64845571e-01] [ 5.73787034e-01 4.48510081e-01 6.60616577e-01 7.68203139e-01] [ 6.99524224e-01 1.09773517e-01 9.94730651e-01 3.85692298e-01] [ 6.90908253e-01 4.00760561e-01 7.61936128e-01 7.55327106e-01] [ 8.42022896e-01 5.62747419e-02 1.00000000e+00 1.96891010e-01] [ 3.15884590e-01 6.20986760e-01 8.00617814e-01 8.70009482e-01] [ 2.02110410e-03 3.51096481e-01 1.63238212e-01 8.86175990e-01] [ 5.23652613e-01 4.44883525e-01 6.06465399e-01 7.96046913e-01] [ 1.05837584e-01 5.01617603e-03 6.13560975e-01 5.53549007e-02] [ 0.00000000e+00 9.99094844e-02 8.62956285e-01 9.17412460e-01] [ 2.92378008e-01 6.93494081e-03 7.82085359e-01 2.64738500e-01] [ 1.64367601e-01 5.42824529e-03 3.36186767e-01 2.28887238e-02] [ 7.85306334e-01 2.24659517e-02 9.98136878e-01 1.99157953e-01] [ 4.16244954e-01 4.52163428e-01 5.03045857e-01 8.24390888e-01] [ 1.83875084e-01 5.96510947e-01 2.06069648e-01 6.25930965e-01] [ 1.43017024e-02 3.74884725e-01 2.68984854e-01 8.33911061e-01] [ 3.49507093e-01 3.83749962e-01 7.22125530e-01 4.96084750e-01] [ 1.39453232e-01 3.35017219e-04 8.09892237e-01 4.70560342e-02] [ 4.44417953e-01 4.96886671e-01 7.98433423e-01 8.72934520e-01] [ 2.31187046e-02 8.52613151e-01 8.87979031e-01 9.97459829e-01] [ 1.81163043e-01 0.00000000e+00 7.88743377e-01 3.65859300e-01] [ 9.65304077e-01 9.27752852e-02 9.93548691e-01 1.85945958e-01] [ 2.65616655e-01 5.06414056e-01 3.38706553e-01 8.63233805e-01] [ 3.49082768e-01 3.82329941e-01 5.28143287e-01 8.44401836e-01] [ 9.21409488e-01 8.78512859e-03 9.95317340e-01 2.78063983e-01] [ 2.97923595e-01 4.41329718e-01 7.54052401e-01 8.03780556e-01] [ 8.05023536e-02 4.14718419e-01 1.70014292e-01 8.06244254e-01] [ 1.15928888e-01 7.37152398e-01 8.45120549e-01 9.82997000e-01] [ 7.79626787e-01 9.66982618e-02 1.00000000e+00 2.51527250e-01] [ 4.93971646e-01 4.69946146e-01 7.61977613e-01 6.51869178e-01] [ 6.22434616e-02 3.85163724e-03 5.10939121e-01 3.74888301e-01] [ 3.37339312e-01 5.66874892e-02 6.88295603e-01 1.94446519e-01] [ 0.00000000e+00 0.00000000e+00 6.37329578e-01 4.15300906e-01] [ 8.21504831e-01 1.55951828e-03 1.00000000e+00 7.52810091e-02] [ 1.57556370e-01 5.52541494e-01 4.73027587e-01 6.66230917e-01] [ 3.76518548e-01 4.71989900e-01 4.42122042e-01 8.43557119e-01] [ 1.70442045e-01 3.96340728e-01 5.62499344e-01 8.18360806e-01] [ 7.21322894e-02 5.68050891e-03 6.80672169e-01 1.68969870e-01] [ 6.60246462e-02 2.43908167e-02 3.69488478e-01 4.13552135e-01] [ 1.38167530e-01 7.20132189e-03 2.57490486e-01 2.20259093e-02] [ 4.12357673e-02 1.41790491e-02 7.62046501e-02 6.40161484e-02] —————————————— 8G 内存照样很卡。。。 —————————————— win10确实恶心,以前的绿色版迅雷都用不了 然后新版内嵌浏览器😂 昨天下了transmission,同样的种子在Deepin上是满速,结果win上就是0k 不明所以 —————————————— 这… —————————————— 你在win10上用什么p2p下载器? 迅雷限速太恶心了 —————————————— Good night, bro. —————————————— My heart is broken. —————————————— The continue statement in Python returns the control to the beginning of the while loop. The continuestatement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop. —————————————— http://www.tutorialspoint.com/python/python_loop_control.htm —————————————— 一定要开全局代理下载 不然6k/s —————————————— conda install -c conda-forge opencv=3.2.0 —————————————— Win10 still have this problem... —————————————— 这是一个怎样的世界 微信上禁止反对的声音 就有人一味拥护某党,即使是夸大甚至是谣言 然后我爸妈就放得特大声😔 —————————————— 老同学在旁边紧张 啥本领都忘了 其实用gfw list就好了 —————————————— 开全局代理才能上 —————————————— chrome打不开扩展插件商城 —————————————— 说实话,win10用起来有压力 SSR各种状况… 可以探索了,今夜是个不眠夜 —————————————— 坑到老同学 @LYving 的8G内存游戏笔记本 现在可以开坑专心做自瞄了😄 —————————————— 其中第二个涉及到高阶编程 基于互联网的多进程数据共享(Distributed Processing) —————————————— 接下来还有很多step need to be cover 比如得到识别出的物体在屏幕上的坐标 比如把识别程序放在另一台机器上,主界面只管自瞄和发送图片到另一台机器 —————————————— 在win7上安装完conda后直接不管它 pip手动去安装 http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv and tensorflow —————————————— 额…成功了 —————————————— https://medium.com/towards-data-science/is-google-tensorflow-object-detection-api-the-easiest-way-to-implement-image-recognition-a8bd1f500ea0 Good night. —————————————— 不然就只能像sentax那样,啥都自己写,不借助conda那种微软垃圾狗 —————————————— 这个鬼要是不再支持win7、8上的opencv 就只能用win10那个巨无霸系统😒😡 —————————————— Only fuck! https://github.com/conda/conda/issues/1419 —————————————— I'll try it using windows. I think i already knew how to deal with it. —————————————— ImageGrab is macOS and Windows only So if I want to capture screen for input images, then I have to run this script on windows or mac... —————————————— It's turned out that conda got its own python version. So anything you needed should be installed by conda install ** —————————————— [angry] —————————————— 有时候觉得奇怪 那些大神从哪儿找来的这些稀奇古怪的包 —————————————— Why so many missing packages? I'm fed up with this. —————————————— https://www.continuum.io/downloads#linux 从没见过 499M 的 .sh file —————————————— 那个写物体识别的作者用的是Mac OSX,,,我用个JB的windows啊! —————————————— 说一千,道一万,拿到手,就是干! —————————————— 你都全套了 咱py栈也帮不上 —————————————— koa是啥 —————————————— 说得也对😂 —————————————— 完了,老大哥不带队肯定连资格赛都进不了😳 —————————————— 有django撑着的,怕啥啊😉 —————————————— 它说什么平台app都不限 咱就做web,得心应手 —————————————— @system357 带队 @hex11 和 @bdbai 做web前端 @Shinohara_Rin 搞PS和美化设计 @yingshaoxo 打杂 —————————————— http://astar2017.baidu.com 要不咱们群组成一个团队参赛吧? —————————————— No, better. —————————————— Deepin store got a lot of free picture editor. —————————————— Beautiful, but good night😂 —————————————— 可能比起人,我更喜欢机器一点,machine不会背叛你,更不会离你而去。 —————————————— 如果lubuntu都可以安装virtual box Why you need to install Deepin? 说真的,deepin除了好看没啥用,连terminal的字体、风格颜色都不适合coding —————————————— I don't know who gave it that name. —————————————— Maybe we should call it task instead of future in Python. —————————————— Living ideally. —————————————— 只需要100台机器就可以搞垮腾讯 —————————————— https://pawelmhm.github.io/asyncio/python/aiohttp/2016/04/22/asyncio-aiohttp.html —————————————— 你可以在单机做出100万级别的轰炸机吗? —————————————— 万恶的 future 类型,很难理解它到底干了啥 —————————————— Concurrency is a way to implement a system that is able to deal with multiple requests at the same time. The idea is that we can move on and start handling other resources while we wait for a resource to become available. Concurrency works by splitting a task into smaller subtasks that can be executed out of order so that multiple tasks can be partially advanced without waiting for the previous tasks to finish.   —————————————— # This is the simplest way to do a async task import threading import requests def do_request(*args): def callback(id_, url): try: r = requests.get(url) print('{} status:'.format(id_), r.status_code) except Exception as e: print('{} error:'.format(id_), e) exit() timer = threading.Timer(0, callback, args) timer.start() url_list = ['https://baidu.com'] for url in url_list: for i in range(10000): do_request(str(i), url) —————————————— Retrieving an element from an SSD will be equivalent to doing a four day trip, while retrieving an element from an HDD can take up to six months! —————————————— First language is very important. It depens on what you wanna do. —————————————— Me too. —————————————— Keep coding.. —————————————— right —————————————— https://www.google.com/#q=data+science+python&newwindow=1&tbm=bks&tbs=sbd:1 http://gen.lib.rus.ec/ —————————————— Then go to official website. —————————————— Just see the list of what you should learn... —————————————— Basically, you can't. —————————————— https://www.datacamp.com/courses/intro-to-python-for-data-science —————————————— And for AI. —————————————— yes —————————————— Some times you are not only need data analyzeing, but also data visualization. http://matplotlib.org/ —————————————— Not scalable. —————————————— R is gabage. —————————————— http://www.numpy.org/ —————————————— Shit, definetely you should use python for data science. —————————————— Then why you need 4399 games? —————————————— Wow, it's amazing. Deepin game for flash. —————————————— 在转移数据准备台式机安装win打游戏 局域网半个小时2%,速度真是感人 —————————————— kivy-buildozer-for-py2: https://drive.google.com/open?id=0B8M6pE4UPOI5MFRtNVpEOFBJSE0 —————————————— from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' if __name__ == '__main__': app.run() 但qpython的好处是可以用pip安装很多三方包,比如flask,然后我就可以用kivy把前后端融合在一起。 看图: —————————————— 事实上用 kivy-launcher 在手机上做调试也可以,能解决调用webview无法点击的问题(qpython就无法点击),唯一遗憾的是没有报错信息 es浏览器可以直接从py文件跳到qpython,所以把同步文件夹设在kivy-launcher指定的文件夹就好了😏 两个启动器都用 —————————————— 熟识课本外的各种英语,考124 那熟解课本外的各种数学问题,是不是也能考124呢? —————————————— 要不然直接卸了 —————————————— 有些学校网站的文档或表格是flash的 —————————————— Cpu😅 —————————————— 其实chrome挺好的啊 卡只能怪flash,那个垃圾一上场就占30%GPU,严重的时候占70% —————————————— Cool, I got a 3.4G file. —————————————— This means that even though KVM can be used to serve other purposes, it has been designed to be run on Ubuntu Server Edition to host non-graphical server operating systems. If you are looking for software to serve graphically-based virtual machines, VirtualBox, Parallels Workstation (or Parallels Desktop for Mac), or VMware Player/Server are more suitable alternatives. https://help.ubuntu.com/community/KVM —————————————— https://www.linux-kvm.org/page/Main_Page —————————————— tar.7z or just .7z? —————————————— With tar.xz, I got 4.2G in the end. It took me more than one hour. —————————————— tailored 量身定制 —————————————— scenario plot, sequence of events, setting —————————————— 我应该好好看看 android.webkit.webview —————————————— 我在看安卓的文档 都是封装的一些API 不够用了就是Java —————————————— Interesting —————————————— compression rate —————————————— For example? —————————————— tar.xz would be better —————————————— 12.3G to 5.4G 😞 —————————————— 360 controler —————————————— 那self-driving不是一般人能玩的 那个作者花了一万多购置机器 —————————————— kivy —————————————— 编译环境都搞好了,运行环境始终出错 似乎只是在告诉我们,编译只是拿来编译的… —————————————— https://t.co/ETlJyup28f —————————————— Yes, I'm sure, last time it works well. But today I'd rather compress first. —————————————— No, I have to change something with its origin .ovf file to make it work.... —————————————— But unfortunately, it's more than 12G, no compression yet. —————————————— Finally, I did it with command: https://www.jamescoyle.net/how-to/2000-convert-virtual-disk-image-vmware-vmdk-to-virtualbox-vdi —————————————— exporting —————————————— 😒 —————————————— Can you control my PC? —————————————— It can't be work, I tryed. —————————————— I got the same problem with exporting a virtual box image. Failed to check files. Result Code: VBOX_E_FILE_ERROR (0x80BB0004) —————————————— Why —————————————— Change permission for all files in a folder: sudo chmod -R a+rX * sudo chown $USER -R . —————————————— 好吧 事实上是看不懂你写的代码好痛苦 —————————————— 虽然工具一个就够了 但当涉猎,见往事耳 —————————————— 看来有两位用node.js的同僚 —————————————— 事实证明可以用 打包py3只有10M的大小,比我自己搞的编译环境小8M 但问题是共同的,都不能导入其他包如flask,会产生矛盾 这样看来,除了纯粹的核心库程序,kivy还是只能在py2上用三方库 那好,明天我用lubuntu做个编译环境,看看能到多小 —————————————— 以你这样说,有谷歌什么语言我不会… —————————————— 我在这里这么久 没听说过某某某在用它写东西 —————————————— … —————————————— 就是能做出什么东西 —————————————— 我想本群应该没人会node js —————————————— I mean @windoge —————————————— He is great. —————————————— 花了3天3夜用3个百度云账号把国内某个人做的某个kivy编译镜像下好了,11.5G压缩包,据说支持Py3 等半个小时导入后再看结果 —————————————— 这个软件做了我想做的功能 白做了,唉 —————————————— Check out "SingPlay: Karaoke your MP3s" https://play.google.com/store/apps/details?id=com.nexstreaming.app.singplay —————————————— 等这个完成 应该可以出kivy中级教程吧… —————————————— 好了,设置界面完成 只差逻辑设计 —————————————— I guess I have the same feeling as you before. But now I understood, this is life, you have to accept that you already old. —————————————— 我本来就会啊 —————————————— 自己写 —————————————— 自己教程是有好处的 每次直接查 —————————————— 实时自动同步 电脑vim写代码 安卓Qpython运行调试 这样还是很爽的,省去了装java、SDK那一堆东西 —————————————— 还是用sync吧,全平台支持 —————————————— 安卓上写代码太蛋疼 有自动同步文件的软件就好了 Sync有点重,有轻的吗 —————————————— 那你能干什么 —————————————— 你会用c#做手机平台的软件吗 —————————————— https://youtu.be/mXuEoqK4bEc Cython could be 150 times faster than Python. —————————————— @system357 有没有好玩的群的推荐 —————————————— Just click share button... —————————————— Could you give me the link of your music list? —————————————— High so high so high, I'm drunk and high, so high... http://music.163.com/song/419594258/?userid=280429778 —————————————— Oh, I prefer working alone. Even if it makes me tired. —————————————— you're right —————————————— Strange thing is, he says he came from Budapest, Hungary. But every project of him has Chinese introduction. —————————————— The author of this must be a master of kivy and py. https://github.com/HelloZeroNet/ZeroNet-kivy/tree/master/src —————————————— ok —————————————— That's acceptable for me. —————————————— IT guy may born to hate noise. —————————————— 参考: https://developer.android.com/reference/android/net/Uri.html https://github.com/kivy/python-for-android/issues/388 https://developer.android.com/training/basics/intents/result.html https://stackoverflow.com/questions/17165972/android-how-to-open-a-specific-folder-via-intent-and-show-its-content-in-a-file http://pyjnius.readthedocs.io/en/latest/android.html —————————————— 从未见过如此恶心的代码 Java是垃圾 Android是垃圾 —————————————— kivy调用外部文件浏览器来选择文件并返回路径: #qpy:kivy # -*- coding: UTF-8 -*- from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from jnius import autoclass, cast from android import activity goal_path = '' Environment = autoclass('android.os.Environment') PythonActivity = autoclass('org.renpy.android.PythonActivity') Uri = autoclass('android.net.Uri') selectedUri = Uri.parse(Environment.getExternalStorageDirectory().getAbsolutePath() + '/Download') currentActivity = cast('android.app.Activity', PythonActivity.mActivity) def on_activity_result(requestCode, resultCode, data): print(requestCode) print(resultCode) #print(data) if requestCode == 1: if resultCode == -1: print('get') one_uri = data.getData() goal_path = one_uri.getPath() if goal_path[:10] != '/external/': print(goal_path) App.get_running_app().root.get_screen('setting').ids.show.text = goal_path return else: filePathColumn = ["_data"] cursor = currentActivity.getContentResolver().query(one_uri, filePathColumn, None, None, None) cursor.moveToFirst() columnIndex = cursor.getColumnIndex(filePathColumn[0]) goal_path = cursor.getString(columnIndex) cursor.close() print(goal_path) App.get_running_app().root.get_screen('setting').ids.show.text = goal_path return print('fail to get') exit() activity.bind(on_activity_result=on_activity_result) Intent = autoclass('android.content.Intent') intent = Intent(Intent.ACTION_GET_CONTENT) intent.addCategory(Intent.CATEGORY_OPENABLE) intent.setDataAndType(selectedUri, "resource/folder") currentActivity.startActivityForResult(intent, 1) Builder.load_string(''' : SettingScreen RecordingScreen : name: 'setting' BoxLayout: orientation: "vertical" TextInput: id: show Button: text: 'Above is the path you chooce' on_release: root.manager.current = 'recording' : name: 'recording' Button: text: 'Such a shit' on_release: root.manager.current = 'setting' ''') class ScreenManager(ScreenManager): pass class SettingScreen(Screen): pass class RecordingScreen(Screen): pass class SongRecorderApp(App): def build(self): return ScreenManager() SongRecorderApp().run() —————————————— #With this shit, you could open a folder on Android by default filemanager from jnius import autoclass, cast Environment = autoclass('android.os.Environment') PythonActivity = autoclass('org.renpy.android.PythonActivity') Uri = autoclass('android.net.Uri') selectedUri = Uri.parse(Environment.getExternalStorageDirectory().getAbsolutePath() + '/Download') Intent = autoclass('android.content.Intent') intent = Intent(Intent.ACTION_VIEW) intent.setDataAndType(selectedUri, "resource/folder") currentActivity = cast('android.app.Activity', PythonActivity.mActivity) currentActivity.startActivity(intent) —————————————— 所以还是买个靠谱的电脑好 —————————————— 最重要的是 我需要运行QQ飞车流畅的玩耍 —————————————— 虚拟机开Windows卡 同时linux当主系统方便 但做视觉AI时那些人用的工具是win上的py —————————————— Win和Linux共存我真的做不好 每次没几天就出问题,只能硬盘全格掉,然后全装Deepin或Win —————————————— 从前端到后端 眼看就快没乐趣了 做视觉AI比较有趣和简单(比起数据分析) 但要安装Windows + 游戏,自动化比如开车、自瞄 但台式机Deepin系统上存了一大堆东西(包括虚拟机),不想删了又下 —————————————— 再不搞AI我就会被淘汰了 —————————————— 我找到了控制菜单键和返回键的方法 只要把这两个键拦截住 只是按home的话,程序还是在运行的😁 —————————————— 这种方式设置也是没啥了… —————————————— 如此一来可以放心的用一倍速看动漫了 不用担心破了技能点 —————————————— 死神也有 其实什么海贼王、七龙珠、妖精的尾巴等都有,但都没有在线中文字幕,英文内嵌~ —————————————— 日语英幕 这个就有点考能力了 —————————————— 新版本竟然出现了很多动漫 —————————————— 我也用易语言写过倒计时 但没用,该玩的还是没复习 —————————————— 电脑静电音➕我这个破笔记本电脑录音有问题 所以只能用手机了 再说,如果我台式机装上win,还搞什么手机软件 专业Audio Studio就用上了 —————————————— 我不确定kivy能否调用非标准库😂 —————————————— 恩 这导致很多小程序需要路径的话直接给个编辑框让用户自己写文件路径 这不友好 —————————————— 就像html一句代码可以让用户选择文件并上传 我这里只需要知道文件的路径 —————————————— 安卓不提供文件选择一键服务,感觉很坑 —————————————— 参考之前我做的kivy-chat和kivy-diary两个项目以及简书上写的kivy简明教程,总算把 录制界面做好了,还差设置界面 —————————————— 想起我的中考,唉,全挂 9科考414,🙈 —————————————— https://electron.atom.io/apps/ Github出的 —————————————— https://github.com/nwjs/nw.js/wiki/List-of-apps-and-companies-using-nw.js Not bad —————————————— 看着吧,上大学老师要是敢教我VB 我就把所有要求的程序用易语言写出来 😂 —————————————— 精通群介绍里任意一种语言系列都可以算大神了,在中国 —————————————— in_playback(self): restart_player(storage_path) def delete_file(self): reset_player() File(storage_path).delete() class SongRecorderApp(App): def build(self): return Manager() if name == '__main__': print('App: storage path == "%s"' % storage_path) Config.set('graphics', 'width', '600') Config.set('graphics', 'height', '900') LabelBase.register(name='Modern Pictograms', fn_regular='modernpics.ttf') SongRecorderApp().run() ` 碰上致命错误 `Only one root object is allowed by .kv` 表示谷歌不到啥玩意儿,看了报错部分源代码也没卵用 可能发出来你们也解决不了,反正无奈便是了 —————————————— ` #qpy:kivy # -*- coding: UTF-8 -*- from jnius import autoclass from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from kivy.core.text import LabelBase from kivy.config import Config Environment = autoclass('android.os.Environment') MediaPlayer = autoclass('android.media.MediaPlayer') MediaRecorder = autoclass('android.media.MediaRecorder') AudioSource = autoclass('android.media.MediaRecorder$AudioSource') OutputFormat = autoclass('android.media.MediaRecorder$OutputFormat') AudioEncoder = autoclass('android.media.MediaRecorder$AudioEncoder') File = autoclass('java.io.File') recorder = MediaRecorder() player = MediaPlayer() storage_path = (Environment.getExternalStorageDirectory() .getAbsolutePath() + '/kivy_recording.aac') def reset_player(): if (player.isPlaying()): player.stop() player.reset() def restart_player(file_path): reset_player() try: player.setDataSource(file_path) player.prepare() player.start() except: player.reset() def init_recorder(): recorder.setAudioSource(AudioSource.MIC) recorder.setOutputFormat(OutputFormat.THREE_GPP) recorder.setAudioEncoder(AudioEncoder.AMR_NB) recorder.setOutputFile(storage_path) recorder.prepare() Builder.load_string(""" #:import C kivy.utils.get_color_from_hex : cols: 2 spacing: 10 row_default_height: (0.5 * (self.width - self.spacing[0]) - self.padding[0]) row_force_default: True

'] if method == 'GET' and path == '/env': start_response('200 OK', [('Content-Type', 'text/html')]) L = [b'ENV'] for k, v in environ.items(): p = '

%s = %s' % (k, str(v)) L.append(p.encode('utf-8')) L.append(b'') return L if host != HOST or method != 'POST' or path != '/run' or not environ.get('CONTENT_TYPE', '').lower().startswith('application/x-www-form-urlencoded'): start_response('400 Bad Request', [('Content-Type', 'application/json')]) return [b'{"error":"bad_request"}'] s = environ['wsgi.input'].read(int(environ['CONTENT_LENGTH'])) qs = parse.parse_qs(s.decode('utf-8')) if not 'code' in qs: start_response('400 Bad Request', [('Content-Type', 'application/json')]) return [b'{"error":"invalid_params"}'] name = qs['name'][0] if 'name' in qs else get_name() code = qs['code'][0] headers = [('Content-Type', 'application/json')] origin = environ.get('HTTP_ORIGIN', '') if origin.find('.liaoxuefeng.com') == -1: start_response('400 Bad Request', [('Content-Type', 'application/json')]) return [b'{"error":"invalid_origin"}'] headers.append(('Access-Control-Allow-Origin', origin)) start_response('200 OK', headers) r = dict() try: fpath = write_py(name, code) print('Execute: %s %s' % (EXEC, fpath)) r['output'] = decode(subprocess.check_output([EXEC, fpath], stderr=subprocess.STDOUT, timeout=5)) except subprocess.CalledProcessError as e: r = dict(error='Exception', output=decode(e.output)) except subprocess.TimeoutExpired as e: r = dict(error='Timeout', output='执行超时') except subprocess.CalledProcessError as e: r = dict(error='Error', output='执行错误') print('Execute done.') return [json.dumps(r).encode('utf-8')] if __name__ == '__main__': main() —————————————— 操了狗的文本老是出编码问题,只能再试试网络接口 —————————————— 弄得我要崩溃了 —————————————— SB易语言 —————————————— 恩,暂时完成了基于文本的非同步调用 —————————————— But we have local Internet or txt document. —————————————— 在谷歌搜了下,并没有关于调用pythonw.exe的资料,难道这只是为python做的无窗口解释器? —————————————— 😒 —————————————— 你这么写和引入模块有什么区别 —————————————— In fact, I would say rubbish, me or that person.😁 —————————————— 以前有人做过2.7版的,但我既看不懂也用不来 —————————————— I have no idea about that —————————————— The problem is, I need return a string to E language. —————————————— 其他语言的程序可以利用这个调用python —————————————— #OK import sys import subprocess EXEC = sys.executable #local pythonw.exe def py_run(py_path): result = subprocess.run([EXEC, py_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) if result.returncode == 0: return result.stdout else: return result.returncode #smartctl returned error print(py_run("C:\\Users\\Administrator\\Desktop\\codes\\Programming\\TRY\\hello.py")) —————————————— #this is what I got, so pity is the result ugly enough. import sys import subprocess import json EXEC = sys.executable def decode(s): try: return s.decode('utf-8') except UnicodeDecodeError: return s.decode('gbk') def py_run(py_path): r = dict() try: print('Executing: %s | %s ...' % (EXEC, py_path)) r['output'] = decode(subprocess.check_output([EXEC, py_path], stderr=subprocess.STDOUT, timeout=5)) except subprocess.CalledProcessError as e: r = dict(error='Exception', output=decode(e.output)) except subprocess.TimeoutExpired as e: r = dict(error='Timeout', output='执行超时') except subprocess.CalledProcessError as e: r = dict(error='Error', output='执行错误') print('Execute done.\n') return [r['output'].encode('utf-8')] print(py_run("C:\\Users\\Administrator\\Desktop\\codes\\Programming\\TRY\\hello.py")) —————————————— The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. —————————————— 看了它的代码,除了网络架设没看到我要找的东西,不知道它是怎么调用的Python并返回信息的 —————————————— 我想在QQ上做代码编译器,不知道你在说什么,你以前做过的啊😢 —————————————— @MikumoConoHa http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/001432523496782e0946b0f454549c0888d05959b99860f000 这个运行器怎么做?它这个我在本地运行不了 —————————————— Version —————————————— zd423 vision😅 —————————————— 🙈 —————————————— That's the effect about hosts... —————————————— http://prefiles.com/p8bt8ovqos4y/PP.Mastering.Python.Regular.Expressions.Feb.2014.epub I can't see any captcha... —————————————— Examples of Regular Expressions In this section, I will show you some examples of regex to help you understand the concept further. Say that you had this regex: /abder/ This is simply telling us to match the word abder only. What about this regex? /a[nr]t/ You can read this regex as follows: find a text pattern such that the first letter is a and the last letter is t, and between those letters comes either n or r. So the matching words are ant and art. Let me give you a small quiz at this point. How would you write a regular expression that starts with ca, and ends with one or all of the following characters tbr? Yes, this regex can be written as follows: /ca[tbr]/ If you see a regex that starts with a circumflex accent ^, this means match the string that starts with the string mentioned after ^. So, if you had the regex below, it is matching the string that begins with This. /^This/ Thus, in the following string: My name is Abder This is Abder This is Tom Based on the regex /^This/, the following strings will be matched: This is Abder This is Tom What if we wanted to match a string that ends with some string? In this case, we use the dollar sign $. Here is an example: Abder$ Thus, in the above string (the three lines), the following patterns would be matched using this regex: My name is Abder This is Abder Well, what do you think about this regex? ^[A-Z][a-z] I know it might seem complex at first glance, but let's go through it piece by piece. We already saw what a circumflex accent ^ is. It means match a string which starts with some string. [A-Z] refers to the upper case letters. So, if we read this part of the regex: ^[A-Z], it is telling us to match the string which begins with an uppercase letter. The last part, [a-z], means that after finding a string that starts with an uppercase letter, it would be followed by lowercase letters from the alphabet. So, which of the following strings will be matched using this regex? If you are not sure, you can use Python to figure out. abder Abder ABDER ABder Regular expressions are a very broad topic, and those examples are just to give you a feel for what they are and why we use them. A nice reference to learn more about regular expressions and see more examples is http://www.rexegg.com/. —————————————— 自然语言处理和数据采集分析全需要它。。。😞 —————————————— 接触它三年了,都没搞懂它的大致用法。 —————————————— Now, I feel upset with Regular Expression Syntax.😔 —————————————— but so hard too.... —————————————— sorry, this is what you should learn https://docs.python.org/3/library/re.html —————————————— https://docs.python.org/2/library/re.html fuck, so hard to understand!!! —————————————— —————————————— 总有人会说你不是一个真正的程序员。 看看这些说法吧! “HTML不是真正的编程语言。” “如果你不用vi,你就不是真正的程序员。” “真正的程序员得懂C语言。” “有些人就是不适合编程。” “有些人就是学不会。” “你根本就不是真正的程序员,我才是。” 要我说,编程对于不同的人有不同的含义。同时,编程的含义随着时间的流逝也在变化。 有趣的是,那些能让初学者,甚至是编程老鸟,更快上手,更省事的工具,包,框架等往往会被贴上 “真正的程序员不该使用” 这样的标签。 这种贴标签行为背后是一种恐惧:如果任何人都能称自己为程序员,那这个头衔就将毫无意义。不过,我认为这种闭关自守的行为是有害的。 去用那些让写程序变得容易的工具吧。如果那意味着你用 Stencyl 或者 GameMaker 来写游戏,而不是从零开始写一个新的,没事,只管去做。 如果你第一次尝试编程是从HTML或者Excel宏开始,没事,只管去做。哪个(编程方式)你能坚持下去,你就用哪个。 随着你技术不断提升,你就会发现那些便利工具对你的限制大于对你的帮助。那时,你就会去寻找更强大的编程工具。 但大多数时候,很少有人会看你的代码,或者问你用什么编程工具。你的程序到底好不好用才是真正重要的。 —————————————— 曾有一个段子说:一个妹子问一个程序猿如何让一帮不爱说话的程序猿活跃起来,那个程序猿说了一句PHP是最好的语言。。。很多程序猿都喜欢站队,所谓站队就是自己在玩某某语言的时候,就会觉得这个语言很强大,自然而然的就站了队了。 我们的身边充斥着写java的看不上写.net的,写c的看不上一切,node异军突起,python批评ruby垃圾性能,高富帅swift从天而降,PHP是最强语言等等。。。 十二年前,我刚工作的时候,写医疗软件,用VB写界面,用VC写功能封装dll,当时觉得VB,VC太强了,结果现在它们基本都死了。 同样的还有: 我写过Dephi,死了。。 我写过asp,死了。。 我写过塞班,死了。。 我们更应当做的是跳出语言的框框,编程注重的是思想,而非语言。 —————————————— —————————————— shit —————————————— def OrganizeText(text): while (text[0:1] == '\n' or text[0:1] == ' ' or text[0:1] == ' '):#left text = text[1😏 while (text[-1😏 == '\n' or text[-1😏 == ' ' or text[-1😏 == ' '):#right text = text[:-1] return text def RemoveAllAdditionalLines(text): text = text.replace('\n\n', '\n') while (text[0:1] == '\n' and text[-1😏 == '\n'): text = text[1😏 text = text[:-1] return text print(OrganizeText('''                                                .版本 2 .判断循环首 (取文本左边 (FinalText, 2) = #换行符) FinalText = 取文本右边 (FinalText, 取文本长度 (FinalText) - 2) .判断循环尾 () .判断循环首 (取文本右边 (FinalText, 2) = #换行符) FinalText = 取文本左边 (FinalText, 取文本长度 (FinalText) - 2) .判断循环尾 ()                                                ''')) —————————————— Patterns: using specifiers(2) First, let’s define our source string: >>>source='''I wish I may, I wish I might ... Have a dish of fish tonight.''' First, find wish anywhere: >>>re.findall('wish',source) ['wish','wish'] Next, find wish or fish anywhere: >>>re.findall('wish|fish',source) ['wish','wish','fish'] Find wish at the beginning: >>>re.findall('^wish',source) [] Find I wish at the beginning: >>>re.findall('^I wish',source) ['I wish'] Find fish at the end: >>>re.findall('fish$',source) [] Finally, find fish tonight. at the end: >>>re.findall('fish tonight.$',source) ['fish tonight.'] The characters ^ and $ are called anchors: ^ anchors the search to the beginning of the search string, and $ anchors it to the end. .$ matches any character at the end of the line, including a period, so that worked. To be more precise, we should escape the dot to match it literally: >>>re.findall('fish tonight\.$',source) ['fish tonight.'] Begin by finding w or f followed by ish: >>>re.findall('[wf]ish',source) ['wish','wish','fish'] Find one or more runs of w, s, or h: >>>re.findall('[wsh]+',source) ['w','sh','w','sh','h','sh','sh','h'] Find ght followed by a non-alphanumeric: >>>re.findall('ght\W',source) ['ght\n','ght.'] Find I followed by wish: >>>re.findall('I (?=wish)',source) ['I ','I '] And last, wish preceded by I: >>>re.findall('(?<=I) wish',source) [' wish',' wish'] There are a few cases in which the regular expression pattern rules conflict with the Python string rules. The following pattern should match any word that begins with fish: >>>re.findall('\bfish',source) [] Why doesn’t it? As is discussed in Chapter 2, Python employs a few special escape characters for strings. For example, \b means backspace in strings, but in the mini-language of regular expressions it means the beginning of a word. Avoid the accidental use of escape characters by using Python’s raw strings when you define your regular expression string. Always put an r character before your regular expression pattern string, and Python escape characters will be disabled, as demonstrated here: >>>re.findall(r'\bfish',source) ['fish'] —————————————— anchor 锚 —————————————— Patterns: using specifiers(1) Now, let’s make “punctuation pizza,” using the main pattern specifiers for regular expressions, which are presented in Table 7-4. In the table, expr and the other italicized words mean any valid regular expression. Table 7-4. Pattern specifiers Pattern Matches abc literal abc ( expr ) expr expr1 | expr2 expr1 or expr2 . any character except \n ^ start of source string $ end of source string prev ? zero or one prev prev * zero or more prev, as many as possible prev *? zero or more prev, as few as possible prev + one or more prev, as many as possible prev +? one or more prev, as few as possible prev { m } m consecutive prev prev { m, n } m to n consecutive prev, as many as possible prev { m, n }? m to n consecutive prev, as few as possible [ abc ] a or b or c (same as a|b|c) [^ abc ] not (a or b or c) prev (?= next ) prev if followed by next prev (?! next ) prev if not followed by next (?<= prev ) next next if preceded by prev (?>>import string >>>printable=string.printable >>>len(printable) 100 >>>printable[0:50] '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN' >>>printable[50:] 'OPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r\x0b\x0c' Which characters in printable are digits? >>>re.findall('\d',printable) ['0','1','2','3','4','5','6','7','8','9'] Which characters are digits, letters, or an underscore? >>>re.findall('\w',printable) ['0','1','2','3','4','5','6','7','8','9','a','b', 'c','d','e','f','g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v','w','x','y','z', 'A','B','C','D','E','F','G','H','I','J','K','L', 'M','N','O','P','Q','R','S','T','U','V','W','X', 'Y','Z','_'] Which are spaces? >>>re.findall('\s',printable) [' ','\t','\n','\r','\x0b','\x0c'] Regular expressions are not confined to ASCII. A \d will match whatever Unicode calls a digit, not just ASCII characters '0' through '9'. Let’s add two non-ASCII lowercase letters: In this test, we’ll throw in the following: • Three ASCII letters • Three punctuation symbols that should not match a \w • A Unicode LATIN SMALL LETTER E WITH CIRCUMFLEX (\u00ea) • A Unicode LATIN SMALL LETTER E WITH BREVE (\u0115) >>>x='abc'+'-/*'+'\u00ea'+'\u0115' As expected, this pattern found only the letters: >>>re.findall('\w',x) ['a','b','c','ê','ĕ'] —————————————— —————————————— Replace at matches with sub() This is like the string replace() method, but for patterns rather than literal strings: >>>m=re.sub('n','?',source) >>>m# sub returns a string 'You?g Fra?ke?stei?' —————————————— sub 替换 —————————————— —————————————— Split at matches with split() The example that follows shows you how to split a string into a list by a pattern rather than a simple string (as the normal string split() method would do): >>>m=re.split('n',source) >>>m# split returns a list ['You','g Fra','ke','stei',''] —————————————— All matches with findall() The preceding examples looked for one match only. But what if you want to know how many instances of the single-letter string 'n' are in the string? >>>m=re.findall('n',source) >>>m# findall returns a list ['n','n','n','n'] >>>print('Found',len(m),'matches') Found 4 matches How about 'n' followed by any character? >>>m=re.findall('n.',source) >>>m ['ng','nk','ns'] Notice that it did not match that final 'n'. We need to say that the character after 'n' is optional with ?: >>>m=re.findall('n.?',source) >>>m ['ng','nk','ns','n'] —————————————— First match with search() You can use search() to find the pattern 'Frank' anywhere in the source string 'Young Frankenstein', without the need for the .* wildcards: >>>m=re.search('Frank',source) >>>if m:# search returns an object ... print(m.group()) ... Frank —————————————— wildcard 通配符 —————————————— Exact match with match() Does the string 'Young Frankenstein' begin with the word 'You'? Here’s some code with comments: >>>import re >>>source='Young Frankenstein' >>>m=re.match('You',source)# match starts at the beginning of source >>>if m:# match returns an object; do this to see what matched ... print(m.group()) ... You >>>m=re.match('^You',source)# start anchor does the same >>>if m: ... print(m.group()) ... You How about 'Frank'? >>>m=re.match('Frank',source) >>>if m: ... print(m.group()) ... This time match() returned nothing and the if did not run the print statement. As I said earlier, match() works only if the pattern is at the beginning of the source. But search() works if the pattern is anywhere: >>>m=re.search('Frank',source) >>>if m: ... print(m.group()) ... Frank Let’s change the pattern: >>>m=re.match('.*Frank',source) >>>if m:# match returns an object ... print(m.group()) ... YoungFrank Following is a brief explanation of how our new pattern works: • . means any single character. • * means any number of the preceding thing. Together, .* mean any number of characters (even zero). • Frank is the phrase that we wanted to match, somewhere. match() returned the string that matched .*Frank: 'Young Frank'. —————————————— Match with Regular Expressions Chapter 2 touched on simple string operations. Armed with that introductory information, you’ve probably used simple “wildcard” patterns on the command line, such as ls *.py, which means list all filenames ending in .py. It’s time to explore more complex pattern matching by using regular expressions. These are provided in the standard module re, which we’ll import. You define a string pattern that you want to match, and the source string to match against. For simple matches, usage looks like this: result=re.match('You','Young Frankenstein') Here, 'You' is the pattern and 'Young Frankenstein' is the source—the string you want to check. match() checks whether the source begins with the pattern. For more complex matches, you can compile your pattern first to speed up the match later: youpattern=re.compile('You') Then, you can perform your match against the compiled pattern: result=youpattern.match('Young Frankenstein') match() is not the only way to compare the pattern and source. Here are several other methods you can use: • search() returns the first match, if any. • findall() returns a list of all non-overlapping matches, if any. • split() splits source at matches with pattern and returns a list of the string pieces. • sub() takes another replacement argument, and changes all parts of source that are matched by pattern to replacement. —————————————— New style formatting with {} and format Old style formatting is still supported. In Python 2, which will freeze at version 2.7, it will be supported forever. However, new style formatting is recommended if you’re using Python 3. The simplest usage is demonstrated here: >>>'{} {} {}'.format(n,f,s) '42 7.03 string cheese' Old-style arguments needed to be provided in the order in which their % placeholders appeared in the string. With new-style, you can specify the order: >>>'{2} {0} {1}'.format(f,s,n) '42 7.03 string cheese' The value 0 referred to the first argument, f, whereas 1 referred to the string s, and 2 referred to the last argument, the integer n. The arguments can be a dictionary or named arguments, and the specifiers can include their names: >>>'{n} {f} {s}'.format(n=42,f=7.03,s='string cheese') '42 7.03 string cheese' In this next example, let’s try combining our three values into a dictionary, which looks like this: >>>d={'n':42,'f':7.03,'s':'string cheese'} In the following example, {0} is the entire dictionary, whereas {1} is the string 'other' that follows the dictionary: >>>'{0[n]} {0[f]} {0[s]} {1}'.format(d,'other') '42 7.03 string cheese other' These examples all printed their arguments with default formats. Old-style allows a type specifier after the % in the string, but new-style puts it after a :. First, with positional arguments: >>>'{0:d} {1:f} {2:s}'.format(n,f,s) '42 7.030000 string cheese' In this example, we’ll use the same values, but as named arguments: >>>'{n:d} {f:f} {s:s}'.format(n=42,f=7.03,s='string cheese') '42 7.030000 string cheese' The other options (minimum field width, maximum character width, alignment, and so on) are also supported. Minimum field width 10, right-aligned (default): >>>'{0:10d} {1:10f} {2:10s}'.format(n,f,s) ' 42 7.030000 string cheese' Same as the preceding example, but the > characters make the right-alignment more explicit: >>>'{0:>10d} {1:>10f} {2:>10s}'.format(n,f,s) ' 42 7.030000 string cheese' Minimum field width 10, left-aligned: >>>'{0:<10d} {1:<10f} {2:<10s}'.format(n,f,s) '42 7.030000 string cheese' Minimum field width 10, centered: >>>'{0:^10d} {1:^10f} {2:^10s}'.format(n,f,s) ' 42 7.030000 string cheese' There is one change from old-style: the precision value (after the decimal point) still means the number of digits after the decimal for floats, and the maximum number of characters for strings, but you can’t use it for integers: >>>'{0:>10.4d} {1:>10.4f} {2:10.4s}'.format(n,f,s) Traceback(mostrecentcalllast): File"",line1,in ValueError:Precisionnotallowedinintegerformatspecifier >>>'{0:>10d} {1:>10.4f} {2:>10.4s}'.format(n,f,s) ' 42 7.0300 stri' The final option is the fill character. If you want something other than spaces to pad your output fields, put it right after the :, before any alignment (<, >, ^) or width specifiers: >>>'{0:!^20s}'.format('BIG SALE') '!!!!!!BIG SALE!!!!!!' —————————————— 调用users32中的 SetTimer KillTimer 可实现无界面的时钟周期事件 —————————————— 如何能循序渐进的学习某样东西呢?当然是把大任务化小。传统的方法要求我们建立一个数据库,保持进度。然而保证数据库的完整和永不丢失是一个大问题,所以我想到用自然日期间隔来代替。 易语言: BaseNumber = 到整数 (取时间间隔 (取现行时间 (), [2016年5月17日], 5)) Python: import datetime diff = datetime.date.today() - datetime.date(2016, 5, 17) print(diff.days) —————————————— Old style with % The old style of string formatting has the form string % data. Inside the string are interpolation sequences. Table 7-2 illustrates that the very simplest sequence is a % followed by a letter indicating the data type to be formatted. Table 7-2. Conversion types %s string %d decimal integer %x hex integer %o octal integer %f decimal float %e exponential float %g decimal or exponential float %% a literal % Following are some simple examples. First, an integer: >>>'%s'%42 '42' >>>'%d'%42 '42' >>>'%x'%42 '2a' >>>'%o'%42 '52' A float: >>>'%s'%7.03 '7.03' >>>'%f'%7.03 '7.030000' >>>'%e'%7.03 '7.030000e+00' >>>'%g'%7.03 '7.03' An integer and a literal %: >>>'%d%%'%100 '100%' Some string and integer interpolation: >>>actor='Richard Gere' >>>cat='Chester' >>>weight=28 >>>"My wife's favorite actor is %s" %actor "My wife's favorite actor is Richard Gere" >>>"Our cat %sweighs %spounds" %(cat,weight) 'Our cat Chester weighs 28 pounds' That %s inside the string means to interpolate a string. The number of % appearances in the string needs match the number of data items after the %. A single data item such as actor goes right after the %. Multiple data must be grouped into a tuple (bounded by parentheses, separated by commas) such as (cat, weight). Even though weight is an integer, the %s inside the string converted it to a string. You can add other values between the % and the type specifier to designate minimum and maximum widths, alignment, and character filling: For variables, let’s define an integer, n; a float, f; and a string, s: >>>n=42 >>>f=7.03 >>>s='string cheese' Format them using default widths: >>>'%d %f %s' %(n,f,s) '42 7.030000 string cheese' Set a minimum field width of 10 characters for each variable, and align them to the right, filling unused spots on the left with spaces: >>>'%10d %10f %10s' %(n,f,s) ' 42 7.030000 string cheese' Use the same field width, but align to the left: >>>'%-10d %-10f %-10s' %(n,f,s) '42 7.030000 string cheese' This time, the same field width, but a maximum character width of 4, and aligned to the right. This setting truncates the string, and limits the float to 4 digits after the decimal point: >>>'%10.4d %10.4f %10.4s' %(n,f,s) ' 0042 7.0300 stri' The same song as before, but right-aligned: >>>'%.4d %.4f %.4s' %(n,f,s) '0042 7.0300 stri' Finally, get the field widths from arguments rather than hard-coding them: >>>'%*.*d %*.*f %*.*s' %(10,4,n,10,4,f,10,4,s) ' 0042 7.0300 stri' —————————————— Decoding We decode byte strings to Unicode strings. Whenever we get text from some external source (files, databases, websites, network APIs, and so on), it’s encoded as byte strings. The tricky part is knowing which encoding was actually used, so we can run it backward and get Unicode strings. The problem is that nothing in the byte string itself says what encoding was used. I mentioned the perils of copying and pasting from websites earlier. You’ve probably visited websites with odd characters where plain old ASCII characters should be. Let’s create a Unicode string called place with the value 'café': >>>place='caf\u00e9' >>>place 'café' >>>type(place) Encode it in UTF-8 format in a bytes variable called place_bytes: >>>place_bytes=place.encode('utf-8') >>>place_bytes b'caf\xc3\xa9' >>>type(place_bytes) Notice that place_bytes has five bytes. The first three are the same as ASCII (a strength of UTF-8), and the final two encode the 'é'. Now, let’s decode that byte string back to a Unicode string: >>>place2=place_bytes.decode('utf-8') >>>place2 'café' This worked because we encoded to UTF-8 and decoded from UTF-8. What if we told it to decode from some other encoding? >>>place3=place_bytes.decode('ascii') Traceback(mostrecentcalllast): File"",line1,in UnicodeDecodeError:'ascii'codeccan't decode byte 0xc3 in position 3: ordinalnotinrange(128) The ASCII decoder threw an exception because the byte value 0xc3 is illegal in ASCII. There are some 8-bit character set encodings in which values between 128 (hex 80) and 255 (hex FF) are legal but not the same as UTF-8: >>>place4=place_bytes.decode('latin-1') >>>place4 'café' >>>place5=place_bytes.decode('windows-1252') >>>place5 'café' The moral of this story: whenever possible, use UTF-8 encoding. It works, is supported everywhere, can express every Unicode character, and is quickly decoded and encoded. —————————————— Encoding You encode a string to bytes. The string encode() function’s first argument is the encoding name. The choices include those presented in Table 7-1. Table 7-1. Encodings 'ascii' Good old seven-bit ASCII 'utf-8' Eight-bit variable-length encoding, and what you almost always want to use 'latin-1' Also known as ISO 8859-1 'cp-1252' A common Windows encoding 'unicode-escape' Python Unicode literal format, \uxxxx or \Uxxxxxxxx You can encode anything as UTF-8. Let’s assign the Unicode string '\u2603' to the name snowman: >>>snowman='\u2603' snowman is a Python Unicode string with a single character, regardless of how many bytes might be needed to store it internally: >>>len(snowman) 1 Next let’s encode this Unicode character to a sequence of bytes: >>>ds=snowman.encode('utf-8') As I mentioned earlier, UTF-8 is a variable-length encoding. In this case, it used three bytes to encode the single snowman Unicode character: >>>len(ds) 3 >>>ds b'\xe2\x98\x83' Now, len() returns the number of bytes (3) because ds is a bytes variable. You can use encodings other than UTF-8, but you’ll get errors if the Unicode string can’t be handled by the encoding. For example, if you use the ascii encoding, it will fail unless your Unicode characters happen to be valid ASCII characters as well: >>>ds=snowman.encode('ascii') Traceback(mostrecentcalllast): File"",line1,in UnicodeEncodeError:'ascii'codeccan't encode character '\u2603' inposition0:ordinalnotinrange(128) The encode() function takes a second argument to help you avoid encoding exceptions. Its default value, which you can see in the previous example, is 'strict'; it raises a UnicodeEncodeError if it sees a non-ASCII character. There are other encodings. Use 'ignore' to throw away anything that won’t encode: >>>snowman.encode('ascii','ignore') b'' Use 'replace' to substitute ? for unknown characters: >>>snowman.encode('ascii','replace') b'?' Use 'backslashreplace' to produce a Python Unicode character string, like unicode-escape: >>>snowman.encode('ascii','backslashreplace') b'\\u2603' You would use this if you needed a printable version of the Unicode escape sequence. The following produces character entity strings that you can use in web pages: >>>snowman.encode('ascii','xmlcharrefreplace') b'☃' —————————————— Encode and decode with UTF-8 You don’t need to worry about how Python stores each Unicode character when you do normal string processing. However, when you exchange data with the outside world, you need a couple of things: • A way to encode character strings to bytes • A way to decode bytes to character strings If there were fewer than 64,000 characters in Unicode, we could store each Unicode character ID in two bytes. Unfortunately, there are more. We could encode each ID in three or four bytes, but that would increase the memory and disk storage space needs for common text strings by three or four times. Ken Thompson and Rob Pike, whose names will be familiar to Unix developers, designed the UTF-8 dynamic encoding scheme one night on a placemat in a New Jersey diner. It uses one to four bytes per Unicode character: • One byte for ASCII • Two bytes for most Latin-derived (but not Cyrillic) languages • Three bytes for the rest of the basic multilingual plane • Four bytes for the rest, including some Asian languages and symbols UTF-8 is the standard text encoding in Python, Linux, and HTML. It’s fast, complete, and works well. If you use UTF-8 encoding throughout your code, life will be much easier than trying to hop in and out of various encodings. —————————————— Python 3 Unicode strings(3) How can we specify that final é character? If you look at character index for E, you see that the name E WITH ACUTE, LATIN SMALL LETTER has the value 00E9. Let’s check with the name() and lookup() functions that we were just playing with. First give the code to get the name: >>>unicodedata.name('\u00e9') 'LATIN SMALL LETTER E WITH ACUTE' Next, give the name to look up the code: >>>unicodedata.lookup('E WITH ACUTE, LATIN SMALL LETTER') Traceback(mostrecentcalllast): File"",line1,in KeyError:"undefined character name 'E WITH ACUTE, LATIN SMALL LETTER'" Note The names listed on the Unicode Character Name Index page were reformatted to make them sort nicely for display. To convert them to their real Unicode names (the ones that Python uses), remove the comma and move the part of the name that was after the comma to the beginning. Accordingly, change E WITH ACUTE, LATIN SMALL LETTER to LATIN SMALL LETTER E WITH ACUTE: >>>unicodedata.lookup('LATIN SMALL LETTER E WITH ACUTE') 'é' Now, we can specify the string café by code or by name: >>>place='caf\u00e9' >>>place 'café' >>>place='caf\N{LATIN SMALL LETTER E WITH ACUTE}' >>>place 'café' In the preceding snippet, we inserted the é directly in the string, but we can also build a string by appending: >>>u_umlaut='\N{LATIN SMALL LETTER U WITH DIAERESIS}' >>>u_umlaut 'ü' >>>drink='Gew'+u_umlaut+'rztraminer' >>>print('Now I can finally have my',drink,'in a',place) NowIcanfinallyhavemyGewürztraminerinacafé The string len function counts Unicode characters, not bytes: >>>len('$') 1 >>>len('\U0001f47b') 1 —————————————— Shit, it converted to the pictures of sentiment. —————————————— Python 3 Unicode strings(2) In the following example, we’ll write a test function that takes a Python Unicode character, looks up its name, and looks up the character again from the name (it should match the original character): >>>def unicode_test(value): ... import unicodedata ... name=unicodedata.name(value) ... value2=unicodedata.lookup(name) ... print('value="%s", name="%s", value2="%s"'%(value,name,value2)) ... Let’s try some characters, beginning with a plain ASCII letter: >>>unicode_test('A') value="A",name="LATIN CAPITAL LETTER A",value2="A" ASCII punctuation: >>>unicode_test('$') value="$",name="DOLLAR SIGN",value2="$" A Unicode currency character: >>>unicode_test('\u00a2') value="¢",name="CENT SIGN",value2="¢" Another Unicode currency character: >>>unicode_test('\u20ac') value="€",name="EURO SIGN",value2="€" The only problem you could potentially run into is limitations in the font you’re using to display text. All fonts do not have images for all Unicode characters, and might display some placeholder character. For instance, here’s the Unicode symbol for SNOWMAN, like symbols in dingbat fonts: >>>unicode_test('\u2603') value="☃",name="SNOWMAN",value2="☃" Suppose that we want to save the word café in a Python string. One way is to copy and paste it from a file or website and hope that it works: >>>place='café' >>>place 'café' This worked because I copied and pasted from a source that used UTF-8 encoding (which you’ll see in a few pages) for its text. —————————————— Python 3 Unicode strings(1) Python 3 strings are Unicode strings, not byte arrays. This is the single largest change from Python 2, which distinguished between normal byte strings and Unicode character strings. If you know the Unicode ID or name for a character, you can use it in a Python string. Here are some examples: • A \u followed by four hex numbers[6] specifies a character in one of Unicode’s 256 basic multilingual planes. The first two are the plane number (00 to FF), and the next two are the index of the character within the plane. Plane 00 is good old ASCII, and the character positions within that plane are the same as ASCII. • For characters in the higher planes, we need more bits. The Python escape sequence for these is \U followed by eight hex characters; the leftmost ones need to be 0. • For all characters, \N{ name } lets you specify it by its standard name. The Unicode Character Name Index page lists these. The Python unicodedata module has functions that translate in both directions: • lookup()—Takes a case-insensitive name and returns a Unicode character • name()—Takes a Unicode character and returns an uppercase name —————————————— Chapter 7. Mangle Data Like a Pro In this chapter, you’ll learn many techniques for taming data. Most of them concern these built-in Python data types: strings Sequences of Unicode characters, used for text data. bytes and bytearrays Sequences of eight-bit integers, used for binary data. —————————————— 6.10. Define these classes: Laser, Claw, and SmartPhone. Each has only one method: does(). This returns 'disintegrate' (Laser), 'crush' (Claw), or 'ring' (SmartPhone). Then, define the class Robot that has one instance (object) of each of these. Define a does() method for the Robot that prints what its component objects do. class Laser: def does(self): return 'disintegrate' class Claw: def does(self): return 'crush' class SmartPhone: def does(self): return 'ring' class Robot: def does(self, Laser, Claw, SmartPhone): print(Laser.does(), Claw.does(), SmartPhone.does()) a = Laser() b = Claw() c = SmartPhone() A_robot = Robot() A_robot.does(a, b, c) —————————————— 6.9. Define three classes: Bear, Rabbit, and Octothorpe. For each, define only one method: eats(). This should return 'berries' (Bear), 'clover' (Rabbit), or 'campers' (Octothorpe). Create one object from each and print what it eats. class Bear: def eats(self): return 'berries' class Rabbit: def eats(self): return 'clover' class Octothorpe: def eats(self): return 'campers' a = Bear() b = Rabbit() c = Octothorpe() print(a.eats(),b.eats(),c.eats()) —————————————— 6.8. Modify Element to make the attributes name, symbol, and number private. Define a getter property for each to return its value. class Element: def __init__(self, name, symbol, number): self.__name = name self.__symbol = symbol self.__number = number @property def name(self): return self.__name @property def symbol(self): return self.__symbol @property def number(self): return self.__number hydrogen = Element('Hydrogen', 'H', 1) print(hydrogen.name) print(hydrogen.symbol) print(hydrogen.number) —————————————— http://www.runoob.com/ —————————————— 6.7. In the definition of Element, change the name of method dump to __str__, create a new hydrogen object, and call print(hydrogen). class Element: def __init__(self, name, symbol, number): self.name = name self.symbol = symbol self.number = number def __str__(self): return('name=%s, symbol=%s, number=%s'%(self.name,self.symbol,self.number)) hydrogen = Element('Hydrogen', 'H', 1) print(hydrogen) —————————————— 6.6. For the Element class, define a method called dump() that prints the values of the object’s attributes (name, symbol, and number). Create the hydrogen object from this new definition and use dump() to print its attributes. class Element: def __init__(self, name, symbol, number): self.name = name self.symbol = symbol self.number = number def dump(self): print(self.name, self.symbol, self.number) hydrogen = Element('Hydrogen', 'H', 1) hydrogen.dump() —————————————— Things to Do 6.1. Make a class called Thing with no contents and print it. Then, create an object called example from this class and also print it. Are the printed values the same or different? class thing: pass print(thing) example = thing() print(example) —————————————— 6.2. Make a new class called Thing2 and assign the value 'abc' to a class attribute called letters. Print letters. class thing2: def __init__(self, letters): print(letters) thing2('abc') —————————————— 6.3. Make yet another class called, of course, Thing3. This time, assign the value 'xyz' to an instance (object) attribute called letters. Print letters. Do you need to make an object from the class to do this? class thing3: def __init__(self, letters): self.letters = letters example = thing3('xyz') print(example.letters) —————————————— 6.4. Make a class called Element, with instance attributes name, symbol, and number. Create an object of this class with the values 'Hydrogen', 'H', and 1. class Element: def __init__(self, name, symbol, number): self.name = name self.symbol = symbol self.number = number example = Element('Hydrogen', 'H', 1) —————————————— 6.5. Make a dictionary with these keys and values: 'name': 'Hydrogen', 'symbol': 'H', 'number': 1. Then, create an object called hydrogen from class Element using this dictionary. Adict = {'name': 'Hydrogen', 'symbol': 'H', 'number': 1} class Element: def __init__(self, name, symbol, number): self.name = name self.symbol = symbol self.number = number hydrogen = Element(**Adict) —————————————— —————————————— Named Tuples Because Guido just mentioned them and I haven’t yet, this is a good place to talk about named tuples. A named tuple is a subclass of tuples with which you can access values by name (with .name) as well as by position (with [ offset ]). Let’s take the example from the previous section and convert the Duck class to a named tuple, with bill and tail as simple string attributes. We’ll call the namedtuple function with two arguments: • The name • A string of the field names, separated by spaces Named tuples are not automatically supplied with Python, so you need to load a module before using them. We do that in the first line of the following example: >>>from collections import namedtuple >>>Duck=namedtuple('Duck','bill tail') >>>duck=Duck('wide orange','long') >>>duck Duck(bill='wide orange',tail='long') >>>duck.bill 'wide orange' >>>duck.tail 'long' You can also make a named tuple from a dictionary: >>>parts={'bill':'wide orange','tail':'long'} >>>duck2=Duck(**parts) >>>duck2 Duck(bill='wide orange',tail='long') In the preceding code, take a look at **parts. This is a keyword argument. It extracts the keys and values from the parts dictionary and supplies them as arguments to Duck(). It has the same effect as: >>>duck2=Duck(bill='wide orange',tail='long') Named tuples are immutable, but you can replace one or more fields and return another named tuple: >>>duck3=duck2._replace(tail='magnificent',bill='crushing') >>>duck3 Duck(bill='crushing',tail='magnificent') We could have defined duck as a dictionary: >>>duck_dict={'bill':'wide orange','tail':'long'} >>>duck_dict {'tail':'long','bill':'wide orange'} You can add fields to a dictionary: >>>duck_dict['color']='green' >>>duck_dict {'color':'green','tail':'long','bill':'wide orange'} But not to a named tuple: >>>duck.color='green' Traceback(mostrecentcalllast): File"",line1,in AttributeError:'dict'objecthasnoattribute'color' To recap, here are some of the pros of a named tuple: • It looks and acts like an immutable object. • It is more space- and time-efficient than objects. • You can access attributes by using dot notation instead of dictionary-style square brackets. • You can use it as a dictionary key. —————————————— + plus 加号;正号 - minus 减号;负号 ± plus or minus 正负号 × is multiplied by 乘号 ÷ is divided by 除号 = is equal to 等于号 ≠ is not equal to 不等于号 ≡ is equivalent to 全等于号 ≌ is equal to orapproximately equal to 等于或约等于号 ≈ is approximately equal to 约等于号 < is less than 小于号 > is more than 大于号 ≮ is not less than 不小于号 ≯ is not more than 不大于号 ≤ is less than or equal to 小于或等于号 ≥ is more than or equal to 大于或等于号 % per cent 百分之... ‰ per mill 千分之... ∞ infinity 无限大号 ∝ varies as 与...成比例 √ (square) root 平方根 ∵ since; because 因为 ∴ hence 所以 ∷ equals, as(proportion) 等于,成比例 ∠ angle 角 ⌒ semicircle 半圆 ⊙ circle 圆 ○ circumference 圆周 π pi 圆周率 △ triangle 三角形 ⊥ perpendicular to 垂直于 ∪ union of 并,合集 ∩ intersection of 交,通集 ∫ the integral of ...的积分 ∑ (sigma) summation of 总和 ° degree 度 ′ minute 分 ″ second 秒 ℃ Celsius system 摄氏度 { open brace, open curly 左花括号 } close brace, close curly 右花括号 ( open parenthesis, open paren 左圆括号 ) close parenthesis, close paren 右圆括号 () brakets/ parentheses 括号 [ open bracket 左方括号 ] close bracket 右方括号 [] square brackets 方括号 . period, dot 句号,点 | vertical bar, vertical virgule 竖线 & ampersand, and,reference, ref 和,引用 * asterisk, multiply, star, pointer 星号,乘号,星,指针 / slash, divide, oblique 斜线,斜杠,除号 // slash-slash, comment 双斜线,注释符 # pound 井号 backslash, sometimes escape 反斜线转义符,有时表示转义符或续行符 ~ tilde 波浪符 . full stop 句号 , comma 逗号 : colon 冒号 ; semicolon 分号 ? question mark 问号 ! exclamation mark (英式英语) exclamation point (美式英语) ' apostrophe 撇号 - hyphen 连字号 -- dash 破折号 ... dots/ ellipsis 省略号 " single quotationmarks 单引号 "" double quotation marks 双引号 ‖ parallel 双线号 & ampersand = and ~ swung dash 代字号 § section; division 分节号 → arrow 箭号;参见号 —————————————— Module just module, don't forget the way of import a module. import requests —————————————— When to Use Classes and Objects versus Modules Here are some guidelines for deciding whether to put your code in a class or a module: • Objects are most useful when you need a number of individual instances that have similar behavior (methods), but differ in their internal states (attributes). • Classes support inheritance, modules don’t. • If you want only one of something, a module might be best. No matter how many times a Python module is referenced in a program, only one copy is loaded. (Java and C++ programmers: if you’re familiar with the book Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, you can use a Python module as a singleton.) • If you have a number of variables that contain multiple values and can be passed as arguments to multiple functions, it might be better to define them as classes. For example, you might use a dictionary with keys such as size and color to represent a color image. You could create a different dictionary for each image in your program, and pass them as arguments to functions such as scale() or transform(). This can get messy as you add keys and functions. It’s more coherent to define an Image class with attributes size or color and methods scale() and transform(). Then, all the data and methods for a color image are defined in one place. • Use the simplest solution to the problem. A dictionary, list, or tuple is simpler, smaller, and faster than a module, which is usually simpler than a class. Guido’s advice: Avoid overengineering datastructures. Tuples are better than objects (try namedtuple too though). Prefer simple fields over getter/setter functions … Built-in datatypes are your friends. Use more numbers, strings, tuples, lists, sets, dicts. Also check out the collections library, esp. deque. — Guido van Rossum —————————————— Composition Inheritance is a good technique to use when you want a child class to act like its parent class most of the time (when child is-a parent). It’s tempting to build elaborate inheritance hierarchies, but sometimes composition or aggregation (when x has-a y) make more sense. A duck is-a bird, but has-a tail. A tail is not a kind of duck, but part of a duck. In this next example, let’s make bill and tail objects and provide them to a new duck object: >>>class Bill(): ... def __init__(self,description): ... self.description=description ... >>>class Tail(): ... def __init__(self,length): ... self.length=length ... >>>class Duck(): ... def __init__(self,bill,tail): ... self.bill=bill ... self.tail=tail ... def about(self): ... print('This duck has a',bill.description,'bill and a',tail.length,'tail') ... >>>tail=Tail('long') >>>bill=Bill('wide orange') >>>duck=Duck(bill,tail) >>>duck.about() This duck has a wide orange bill and a long tail —————————————— Special Methods(2) Tables 6-1 and 6-2 list the names of the most useful magic methods. Table 6-1. Magic methods for comparison __eq__( self, other ) self == other __ne__( self, other ) self != other __lt__( self, other ) self < other __gt__( self, other ) self > other __le__( self, other ) self <= other __ge__( self, other ) self >= other Table 6-2. Magic methods for math __add__( self, other ) self + other __sub__( self, other ) self - other __mul__( self, other ) self * other __floordiv__( self, other ) self // other __truediv__( self, other ) self / other __mod__( self, other ) self % other __pow__( self, other ) self ** other You aren’t restricted to use the math operators such as + (magic method __add__()) and - (magic method __sub__()) with numbers. For instance, Python string objects use + for concatenation and * for duplication. Table 6-3. Other, miscellaneous magic methods __str__( self ) str( self ) __repr__( self ) repr( self ) __len__( self ) len( self ) Besides __init__(), you might find yourself using __str__() the most in your own methods. It’s how you print your object. It’s used by print(), str(), and the string formatters that you can read about in Chapter 7. The interactive interpreter uses the __repr__() function to echo variables to output. If you fail to define either __str__() or __repr__(), you get Python’s default string version of your object: >>>first=Word('ha') >>>first <__main__.Wordobjectat0x1006ba3d0> >>>print(first) <__main__.Wordobjectat0x1006ba3d0> Let’s add both __str__() and __repr__() methods to the Word class to make it prettier: >>>class Word(): ... def __init__(self,text): ... self.text=text ... def __eq__(self,word2): ... return self.text.lower()==word2.text.lower() ... def__str__(self): ... returnself.text ... def__repr__(self): ... return'Word("'self.text'")' ... >>>first=Word('ha') >>>first # uses __repr__ Word("ha") >>>print(first) # uses __str__ ha —————————————— Special Methods(1) You can now create and use basic objects, but now let’s go a bit deeper and do more. When you type something such as a = 3 + 8, how do the integer objects with values 3 and 8 know how to implement +? Also, how does a know how to use = to get the result? You can get at these operators by using Python’s special methods (you might also see them called magic methods). You don’t need Gandalf to perform any magic, and they’re not even complicated. The names of these methods begin and end with double underscores (__). You’ve already seen one: __init__ initializes a newly created object from its class definition and any arguments that were passed in. Suppose that you have a simple Word class, and you want an equals() method that compares two words but ignores case. That is, a Word containing the value 'ha' would be considered equal to one containing 'HA'. The example that follows is a first attempt, with a normal method we’re calling equals(). self.text is the text string that this Word object contains, and the equals() method compares it with the text string of word2 (another Word object): >>>class Word(): ... def __init__(self,text): ... self.text=text ... ... def equals(self,word2): ... return self.text.lower()==word2.text.lower() ... Then, make three Word objects from three different text strings: >>>first=Word('ha') >>>second=Word('HA') >>>third=Word('eh') When strings 'ha' and 'HA' are compared to lowercase, they should be equal: >>>first.equals(second) True But the string 'eh' will not match 'ha': >>>first.equals(third) False We defined the method equals() to do this lowercase conversion and comparison. It would be nice to just say if first == second, just like Python’s built-in types. So, let’s do that. We change the equals() method to the special name __eq__() (you’ll see why in a moment): >>>class Word(): ... def __init__(self,text): ... self.text=text ... def __eq__(self,word2): ... return self.text.lower()==word2.text.lower() ... Let’s see if it works: >>>first=Word('ha') >>>second=Word('HA') >>>third=Word('eh') >>>first==second True >>>first==third False Magic! All we needed was the Python’s special method name for testing equality, __eq__(). —————————————— implement 实施,执行;使生效,实现 concatenation 一系列互相关联的事物,连结 —————————————— Duck Typing Python has a loose implementation of polymorphism; this means that it applies the same operation to different objects, regardless of their class. Let’s use the same __init__() initializer for all three Quote classes now, but add two new functions: • who() just returns the value of the saved person string • says() returns the saved words string with the specific punctuation And here they are in action: >>>class Quote(): ... def __init__(self,person,words): ... self.person=person ... self.words=words ... def who(self): ... return self.person ... def says(self): ... return self.words+'.' ... >>>class QuestionQuote(Quote): ... def says(self): ... return self.words+'?' ... >>>class ExclamationQuote(Quote): ... def says(self): ... return self.words+'!' ... >>> We didn’t change how QuestionQuote or ExclamationQuote were initialized, so we didn’t override their __init__() methods. Python then automatically calls the __init__() method of the parent class Quote to store the instance variables person and words. That’s why we can access self.words in objects created from the subclasses QuestionQuote and ExclamationQuote. Next up, let’s make some objects: >>>hunter=Quote('Elmer Fudd',"I'm hunting wabbits") >>>print(hunter.who(),'says:',hunter.says()) Elmer Fudd says:I'm hunting wabbits. >>>hunted1=QuestionQuote('Bugs Bunny',"What's up, doc") >>>print(hunted1.who(),'says:',hunted1.says()) Bugs Bunny says:What's up, doc? >>>hunted2=ExclamationQuote('Daffy Duck',"It's rabbit season") >>>print(hunted2.who(),'says:',hunted2.says()) Daffy Duck says:It's rabbit season! Three different versions of the says() method provide different behavior for the three classes. This is traditional polymorphism in object-oriented languages. Python goes a little further and lets you run the who() and says() methods of any objects that have them. Let’s define a class called BabblingBrook that has no relation to our previous woodsy hunter and huntees (descendants of the Quote class): >>>class BabblingBrook(): ... def who(self): ... return 'Brook' ... def says(self): ... return'Babble' ... >>>brook=BabblingBrook() Now, run the who() and says() methods of various objects, one (brook) completely unrelated to the others: >>>def who_says(obj): ... print(obj.who(),'says',obj.says()) ... >>>who_says(hunter) Elmer Fudd says I'm hunting wabbits. >>>who_says(hunted1) Bugs Bunny says What's up, doc? >>>who_says(hunted2) Daffy Duck says It's rabbit season! >>>who_says(brook) Brook says Babble This behavior is sometimes called duck typing, after the old saying: If it walks like a duck and quacks like a duck, it’s a duck. — A Wise Person —————————————— There is no way I could modify these presentations. These presentations already good. And brief enough. —————————————— Method Types Some data (attributes) and functions (methods) are part of the class itself, and some are part of the objects that are created from that class. When you see an initial self argument in methods within a class definition, it’s an instance method. These are the types of methods that you would normally write when creating your own classes. The first parameter of an instance method is self, and Python passes the object to the method when you call it. In contrast, a class method affects the class as a whole. Any change you make to the class affects all of its objects. Within a class definition, a preceding @classmethod decorator indicates that that following function is a class method. Also, the first parameter to the method is the class itself. The Python tradition is to call the parameter cls, because class is a reserved word and can’t be used here. Let’s define a class method for A that counts how many object instances have been made from it: >>>class A(): ... count=0 ... def __init__(self): ... A.count+=1 ... def exclaim(self): ... print("I'm an A!") ... @classmethod ... def kids(cls): ... print("A has",cls.count,"little objects.") ... >>> >>>easy_a=A() >>>breezy_a=A() >>>wheezy_a=A() >>>A.kids() A has 3 little objects. Notice that we referred to A.count (the class attribute) rather than self.count (which would be an object instance attribute). In the kids() method, we used cls.count, but we could just as well have used A.count. A third type of method in a class definition affects neither the class nor its objects; it’s just in there for convenience instead of floating around on its own. It’s a static method, preceded by a @staticmethod decorator, with no initial self or class parameter. Here’s an example that serves as a commercial for the class CoyoteWeapon: >>>class CoyoteWeapon(): ... @staticmethod ... def commercial(): ... print('This CoyoteWeapon has been brought to you by Acme') ... >>> >>>CoyoteWeapon.commercial() This CoyoteWeapon has been brought to you by Acme Notice that we didn’t need to create an object from class CoyoteWeapon to access this method. Very class-y. —————————————— Name Mangling for Privacy In the Duck class example in the previous section, we called our (not completely) hidden attribute hidden_name. Python has a naming convention for attributes that should not be visible outside of their class definition: begin by using with two underscores (__). Let’s rename hidden_name to __name, as demonstrated here: >>>class Duck(): ... def __init__(self,input_name): ... self.__name=input_name ... @property ... def name(self): ... print('inside the getter') ... return self.__name ... @name.setter ... def name(self,input_name): ... print('inside the setter') ... self.__name=input_name ... Take a moment to see if everything still works: >>>fowl=Duck('Howard') >>>fowl.name inside the getter 'Howard' >>>fowl.name='Donald' inside the setter >>>fowl.name inside the getter 'Donald' Looks good. And, you can’t access the __name attribute: >>>fowl.__name Traceback(mostrecentcalllast): File"",line1,in AttributeError:'Duck'objecthasnoattribute'__name' This naming convention doesn’t make it private, but Python does mangle the name to make it unlikely for external code to stumble upon it. If you’re curious and promise not to tell everyone, here’s what it becomes: >>>fowl._Duck__name 'Donald' Notice that it didn’t print inside the getter. Although this isn’t perfect protection, name mangling discourages accidental or intentional direct access to the attribute. —————————————— Get and Set Attribute Values with Properties(4) In both of the previous examples, we used the name property to refer to a single attribute (ours was called hidden_name) stored within the object. A property can refer to a computed value, as well. Let’s define a Circle class that has a radius attribute and a computed diameter property: >>>class Circle(): ... def __init__(self,radius): ... self.radius=radius ... @property ... def diameter(self): ... return 2*self.radius ... We create a Circle object with an initial value for its radius: >>>c=Circle(5) >>>c.radius 5 We can refer to diameter as if it were an attribute such as radius: >>>c.diameter 10 Here’s the fun part: we can change the radius attribute at any time, and the diameter property will be computed from the current value of radius: >>>c.radius=7 >>>c.diameter 14 If you don’t specify a setter property for an attribute, you can’t set it from the outside. This is handy for read-only attributes: >>>c.diameter=20 Traceback(mostrecentcalllast): File"",line1,in AttributeError:can't set attribute There’s one more big advantage of using a property over direct attribute access: if you ever change the definition of the attribute, you only need to fix the code within the class definition, not in all the callers. —————————————— Get and Set Attribute Values with Properties(3) Another way to define properties is with decorators. In this next example, we’ll define two different methods, each called name() but preceded by different decorators: • @property, which goes before the getter method • @name.setter, which goes before the setter method Here’s how they actually look in the code: >>>class Duck(): ... def __init__(self,input_name): ... self.hidden_name=input_name ...@property ...def name(self): ... print('inside the getter') ... return self.hidden_name ...@name.setter ...def name(self,input_name): ... print('inside the setter') ... self.hidden_name=input_name You can still access name as though it were an attribute, but there are no visible get_name() or set_name() methods: >>>fowl=Duck('Howard') >>>fowl.name inside the getter 'Howard' >>>fowl.name='Donald' inside the setter >>>fowl.name inside the getter 'Donald' —————————————— Get and Set Attribute Values with Properties(2) In this example, we’ll define a Duck class with a single attribute called hidden_name. We don’t want people to access this directly, so we’ll define two methods: a getter (get_name()) and a setter (set_name()). I’ve added a print() statement to each method to show when it’s being called. Finally, we define these methods as properties of the name attribute: >>>class Duck(): ... def __init__(self,input_name): ... self.hidden_name=input_name ... def get_name(self): ... print('inside the getter') ... return self.hidden_name ... def set_name(self,input_name): ... print('inside the setter') ... self.hidden_name=input_name ... name=property(get_name,set_name) The new methods act as normal getters and setters until that last line; it defines the two methods as properties of the attribute called name. The first argument to property() is the getter method, and the second is the setter. Now, when you refer to the name of any Duck object, it actually calls the get_name() method to return it: >>>fowl=Duck('Howard') >>>fowl.name inside the getter 'Howard' You can still call get_name() directly, too, like a normal getter method: >>>fowl.get_name() inside the getter 'Howard' When you assign a value to the name attribute, the set_name() method will be called: >>>fowl.name='Daffy' inside the setter >>>fowl.name inside the getter 'Daffy' You can still call the set_name() method directly: >>>fowl.set_name('Daffy') inside the setter >>>fowl.name inside the getter 'Daffy' —————————————— Get and Set Attribute Values with Properties(1) Some object-oriented languages support private object attributes that can’t be accessed directly from the outside; programmers often need to write getter and setter methods to read and write the values of such private attributes. Python doesn’t need getters or setters, because all attributes and methods are public, and you’re expected to behave yourself. If direct access to attributes makes you nervous, you can certainly write getters and setters. But be Pythonic—use properties. —————————————— How to creat a website: http://pan.baidu.com/s/1cDiPzS —————————————— GitHub don't support Python. That's a pity. http://yingshaoxo.github.io/ —————————————— #Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k. #给出一个整数数组,判断该数组内是否有两个元素值是相同的,且他们的索引值相差不大于k,是则返回true,否则返回false def containsNearbyDuplicate(nums, k): Adict = {} for counter, value in enumerate(nums): if Adict.get(value) is not None and (counter - Adict.get(value) <= k): return True else: Adict[value] = counter return False print(containsNearbyDuplicate([888,5,6,888],3)) #following will help you understand the enumerate()# # #for counter, value in enumerate([2,5,6,2]): # print(counter, value) #following will help you understand the dict# # #Adict = {} #Adict[555]=1 #print(Adict.get(555)) #print(Adict) —————————————— self Defense One criticism of Python is the need to include self as the first argument to instance methods. Python uses the self argument to find the right object’s attributes and methods. —————————————— Get Help(codes) from Your Parent with super class Person(): def __init__(self,name): self.name=name*2 class EmailPerson1(Person): def __init__(self,name,email): super().__init__(name) self.email=email class EmailPerson2(Person): def __init__(self,name,email): self.name=name*2 self.email=email A=EmailPerson1('YS', '1576570260@qq.com') B=EmailPerson2('YS', '1576570260@qq.com') print(A.name, A.email) print(B.name, B.email) What's the difference between EmailPerson1 and EmailPerson2? EmailPerson1: • The super() gets the definition of the parent class, Person. • The __init__() method calls the Person.__init__() method. It takes care of passing the self argument to the superclass, so you just need to give it any optional arguments. In our case, the only other argument Person() accepts is name. • If the definition of Person changes in the future, using super() will ensure that the attributes and methods that EmailPerson inherits from Person will reflect the change. • Obviously, we call this inheritance. EmailPerson2: • No inheritance —————————————— —————————————— Inheritance n.继承; 遗传; 遗产; —————————————— Inheritance When you’re trying to solve some coding problem, often you’ll find an existing class that creates objects that do almost what you need. What can you do? You could modify this old class or write a new class, cutting and pasting from the old one and merging your new code. But all you do will make it more complicated. The solution is inheritance: creating a new class from an existing class but with some additions or changes. It’s an excellent way to reuse code. When you use inheritance, the new class can automatically use all the code from the old class but without copying any of it. You define only what you need to add or change in the new class, and this overrides the behavior of the old class. The original class is called a parent, superclass, or base class; the new class is called a child, subclass, or derived class. These terms are interchangeable in object-oriented programming. —————————————— instance n.实例 —————————————— Let’s inherit something: class Car(): def exclaim(self): print("I'm a Car!") class Yugo(Car): pass give_me_a_car=Car() give_me_a_yugo=Yugo() >>>give_me_a_car.exclaim() I'm a Car! >>>give_me_a_yugo.exclaim() I'm a Car! The object named give_me_a_yugo is an instance of class Yugo, but it also inherits whatever a Car can do. (Without doing anything special, Yugo inherited the exclaim() method from Car.) —————————————— Override 重写;重载;方法重写 覆盖了一个方法并且对其重写 —————————————— Override a Method >>>class Car(): ... def exclaim(self): ... print("I'm a Car!") ... >>>class Yugo(Car): ... def exclaim(self): ... print("I'm a Yugo! Much like a Car, but more Yugo-ish.") ... #Now, make two objects from these classes: >>>give_me_a_car=Car() >>>give_me_a_yugo=Yugo() #What do they say? >>>give_me_a_car.exclaim() I'm a Car! >>>give_me_a_yugo.exclaim() I'm a Yugo! Much like a Car, but more Yugo-ish. In these examples, we overrode the exclaim() method. We can override any methods, including __init__(). —————————————— Override __init__() >>>class Person(): ... def __init__(self,name): ... self.name=name ... >>>class MDPerson(Person): ... def __init__(self,name): ... self.name="Doctor "+name ... >>>class JDPerson(Person): ... def __init__(self,name): ... self.name=name+", SB" ... In these cases, the initialization method __init__() takes the same arguments as the parent Person class but stores the value of name differently inside the object instance: >>>person=Person('YS') >>>doctor=MDPerson('YS') >>>lawyer=JDPerson('YS') >>>print(person.name) YS >>>print(doctor.name) Doctor YS >>>print(lawyer.name) YS,SB —————————————— Add a Method To Subclass The child class can also add a method that was not present in its parent class. Going back to classes Car and Yugo, we’ll define the new method need_a_push() for class Yugo only: >>>class Car(): ... def exclaim(self): ... print("I'm a Car!") ... >>>class Yugo(Car): ... def exclaim(self): ... print("I'm a Yugo! Much like a Car, but more Yugo-ish.") ... def need_a_push(self): ... print("A little help here?") ... Next, make a Car and a Yugo: >>>give_me_a_car=Car() >>>give_me_a_yugo=Yugo() A Yugo object can react to a need_a_push() method call: >>>give_me_a_yugo.need_a_push() A little help here? But a generic Car(parent class) object cannot. —————————————— —————————————— —————————————— initialization n.设定初值,初始化 —————————————— Define a Class with class: class OneClass(): def __init__(self,name): self.get_name=name OneObject=OneClass('YS') print(OneObject.get_name) Here’s what these codes does: • Looks up the definition of the OneClass class • Instantiates (creates) a new object in memory • Calls the object’s __init__ method, passing this newly-created object as self and the other argument ('YS') as name • Stores the value of name in the object • Returns the new object • Attaches the name OneObject to the object 1.self is just represent the object itself. You can use anything you like to replace it, like 'myself'. 2.The __init__ is short for initialization. —————————————— —————————————— What Are Objects? An object contains both data (variables, called attributes) and code (functions, called methods). It represents a unique instance of some concrete thing. For example, the integer object with the value 7 is an object that facilitates methods such as addition and multiplication, as is demonstrated in Numbers. 8 is a different object. This means there’s an Integer class in Python, to which both 7 and 8 belong. The strings 'cat' and 'duck' are also objects in Python, and have string methods that you’ve seen, such as capitalize() and replace(). When you create new objects no one has ever created before, you must create a class that indicates what they contain. Think of objects as nouns and their methods as verbs. An object represents an individual thing, and its methods define how it interacts with other things. Unlike modules, you can have multiple objects at the same time, each one with different values for its attributes. They’re like super data structures, with code thrown in. —————————————— Chapter 6. Oh Oh: Objects and Classes No object is mysterious. The mystery is your eye. — Elizabeth Bowen Take an object. Do something to it. Do something else to it. — Jasper Johns Up to this point, you’ve seen data structures such as strings and dictionaries, and code structures such as functions and modules. In this chapter, you’ll deal with custom data structures: objects. —————————————— Third-party Python software: https://pypi.python.org/pypi —————————————— Print Nicely with pprint() >>>from collections import OrderedDict >>>from pprint import pprint >>>quotes=OrderedDict([('Moe','A wise guy, huh?'),('Larry','Ow!'),('Curly','Nyuk nyuk!')]) >>> >>>pprint(quotes) OrderedDict([('Moe', 'A wise guy, huh?'), ('Larry', 'Ow!'), ('Curly', 'Nyuk nyuk!')]) —————————————— Iterate over Code Structures with itertools itertools contains special-purpose iterator functions. Each returns one item at a time when called within a for … in loop, and remembers its state between calls. chain() runs through its arguments as though they were a single iterable: >>>import itertools >>>for item in itertools.chain([1,2],['a','b']): ... print(item) ... 1 2 a b cycle() is an infinite iterator, cycling through its arguments: >>>import itertools >>>for item in itertools.cycle([1,2]): ... print(item) ... 1 2 1 2 . . . …and so on. accumulate() calculates accumulated values. By default, it calculates the sum: >>>import itertools >>>for item in itertools.accumulate([1,2,3,4]): ... print(item) ... 1 3 6 10 You can provide a function as the second argument to accumulate(), and it will be used instead of addition. The function should take two arguments and return a single result. This example calculates an accumulated product: >>>import itertools >>>def multiply(a,b): ... return a*b ... >>>for item in itertools.accumulate([1,2,3,4],multiply): ... print(item) ... 1 2 6 24 The itertools module has many more functions, notably some for combinations and permutations that can be time savers when the need arises. —————————————— http://zetcode.com/ —————————————— —————————————— Order by Key with OrderedDict() >>>from collections import OrderedDict >>>quotes=OrderedDict([ ... ('Moe','A wise guy, huh?'), ... ('Larry','Ow!'), ... ('Curly','Nyuk nyuk!'), ... ]) >>> >>>for stooge in quotes: ...print(stooge) ... Moe Larry Curly —————————————— palindrome n.回文(指顺读和倒读都一样的词语) deque 双队列;队列;双端队列容器 Stack 栈(stack)在计算机科学中是限定仅在表尾进行插入或删除操作的线性表。 Queue 队列是一种特殊的线性表,它只允许在表的前端(front)进行删除操作,而在表的后端(rear)进行插入操作。 —————————————— Stack + Queue == deque A deque (pronounced deck) is a double-ended queue, which has features of both a stack and a queue. It’s useful when you want to add and delete items from either end of a sequence. Here, we’ll work from both ends of a word to the middle to see if it’s a palindrome. The function popleft() removes the leftmost item from the deque and returns it; pop() removes the rightmost item and returns it. Together, they work from the ends toward the middle. As long as the end characters match, it keeps popping until it reaches the middle: >>>def palindrome(word): ... from collections import deque ... dq=deque(word) ... while len(dq)>1: ... if dq.popleft()!=dq.pop(): ... return False ... return True ... ... >>>palindrome('a') True >>>palindrome('racecar') True >>>palindrome('') True >>>palindrome('radar') True >>>palindrome('halibut') False I used this as a simple illustration of deques. If you really wanted a quick palindrome checker, it would be a lot simpler to just compare a string with its reverse. Python doesn’t have a reverse() function for strings, but it does have a way to reverse a string with a slice, as illustrated here: >>>def another_palindrome(word): ... return word==word[::-1] ... >>>another_palindrome('radar') True >>>another_palindrome('halibut') False —————————————— —————————————— Count Items with Counter(): >>>from collections import Counter >>>breakfast=['spam','spam','eggs','spam'] >>>breakfast_counter=Counter(breakfast) >>>breakfast_counter Counter({'spam':3,'eggs':1}) The most_common() function returns all elements in descending order, or just the top count elements if given a count: >>>breakfast_counter.most_common() [('spam',3),('eggs',1)] >>>breakfast_counter.most_common(1) [('spam',3)] we’ll make a new list called lunch, and a counter called lunch_counter: >>>lunch=['eggs','eggs','bacon'] >>>lunch_counter=Counter(lunch) >>>lunch_counter Counter({'eggs':2,'bacon':1}) The first way we combine the two counters is by addition, using +: >>>breakfast_counter+lunch_counter Counter({'spam':3,'eggs':3,'bacon':1}) Subtract one counter from another by using -: >>>breakfast_counter-lunch_counter Counter({'spam':3}) Okay, now what can we have for lunch that we can’t have for breakfast? >>>lunch_counter-breakfast_counter Counter({'bacon':1,'eggs':1}) You can get common items by using the intersection operator &: >>>breakfast_counter & lunch_counter Counter({'eggs':1}) You can get all items by using the union operator |: >>>breakfast_counter | lunch_counter Counter({'spam':3,'eggs':2,'bacon':1}) The item 'eggs' was again common to both. Unlike addition, union didn’t add their counts, but picked the one with the larger count. —————————————— Handle dict with setdefault() and defaultdict() setdefault() function is like get(), when key exists will return the original value. If the key was not already in the dictionary, the new value is used. defaultdict() specifies the default value for any new key up front, when the dictionary is created. #from collections import defaultdict The argument to defaultdict() is a function that returns the value to be assigned to a missing key. —————————————— #!/usr/bin/python3 # -*- codeing : utf-8-*- import requests import json import time while True: html = requests.get("http://api.hitokoto.us/rand?encode=jsc&fun=yy&cat=a") try: html.encoding = 'utf-8' result = html.text[3:-2] Adict = json.loads(result) they_say = Adict['hitokoto']+'—'+Adict['source']+'\n\n' print (they_say) except: print ("slow down~") time.sleep(10) —————————————— http://php-yingshaoxo.rhcloud.com/ ZhuangB ing —————————————— —————————————— Import a Module or another .py files Let’s simulate a weather station and print a weather report. One main program prints the report, and a separate module with a single function returns the weather description used by the report. #report.py def get_description(): "Return random weather" from random import choice possibilities = ['rain', 'snow', 'fog', 'sun', 'who knows'] return choice(possibilities) #weatherman.py import report description = report.get_description() print("Today's weather:", description) If you have these two files in the same directory and instruct Python to run weatherman.py as the main program, it will access the report module and run its get_description() function. —————————————— Import a Module with Another Name import report as wr description=wr.get_description() print("Today's weather:", description) —————————————— Import Only What You Want from a Module from report import get_description description = get_description() print("Today's weather:", description) —————————————— —————————————— Standalone Programs 你可以用文本编辑器写独立的后缀为.py的程序源码,运行它只需要在你的py终端上写上如下并回车: python c:/test.py 即python+空格+文件绝对路径+回车键 —————————————— Command-Line Arguments On your computer, create a file called test2.py that contains these two lines: import sys print('Program arguments:',sys.argv) Now, use your version of Python to run this program: $python test2.py tra la la Programar guments:['test2.py','tra','la','la'] —————————————— —————————————— During your bottom-up climb, you’ve progressed from built-in data types to constructing ever-larger data and code structures. In following chapter, you’ll finally get down to brass tacks and learn how to write realistic, large programs in Python. —————————————— Hey guys, am… I totally think I'm an asshole. —————————————— http://docs.python-requests.org/en/master/user/quickstart/#make-a-request https://www.crummy.com/software/BeautifulSoup/bs4/doc/ 以上为爬虫工具指南 —————————————— 用try和except进行错误处理: short_list=[1,2,3] position=5 try: print (short_list[position]) except: print('Need a position between 0 and',len(short_list)-1,' but got ', position) —————————————— 首尾带有两个下划线的名称,如__main__不能用来创建自己的变量。 它们在python是被保留的关键字。 —————————————— 嗯,有些细节还是要看书 —————————————— 得到名称空间里的变量: • locals() returns a dictionary of the contents of the local namespace. • globals() returns a dictionary of the contents of the global namespace. —————————————— 用global()定义全局变量 global i i=999 def Afunction(): print (i) Afunction() —————————————— Namespaces 名称空间 A name can refer to different things, depending on where it’s used. Python programs have various namespaces—sections within which a particular name is unique and unrelated to the same name in other namespaces. Each function defines its own namespace. If you define a variable called x in a main program and another variable called x in a function, they refer to different things. But the walls can be breached: if you need to, you can access names in other namespaces in various ways. —————————————— 用Decorator对函数增加外部处理: The function document_it() defines a decorator that will do the following: • Print the function’s name and the values of its arguments • Run the function with the arguments • Print the result • Return the modified function for use Here’s what the code looks like: def document_it(func): def new_function(*args,**kwargs): print('Running function:',func.__name__) print('Positional arguments:',args) print('Keyword arguments:',kwargs) result=func(*args,**kwargs) print('Result:',result) #return result return new_function 手动调用 def add_ints(a,b): return a+b cooler_add_ints=document_it(add_ints) cooler_add_ints(3,5) 用@自动调用 @document_it def add_ints(a,b): return a+b add_ints(3,5) 用@调用多个 同理在def上添加,只是离def越近越先执行 —————————————— Let’s write our own version of range(): def my_range(first=0,last=10,step=1): number=first while number>>def echo(anything): ... return anything + ' ' + anything ... >>>echo('you know') 'you know you know' —————————————— Define a Python function, and use it: >>>def How_about_your_feeling(): ...print('Feels great!') ... >>>How_about_your_feeling() Feels great! —————————————— Functions A function can take any number and type of input parameters and return any number and type of output results. You can do two things with a function: • Define it • Call it —————————————— 还有就是,专业的力量 —————————————— 每次发那些文字意义也不大 行动是最能感召人的 —————————————— Set Comprehensions { expression for expression in iterable } >>>a_set={number for number in range(1,6) if number%3==1} >>>a_set {1,4} 意为取1到5,除3得到的余数为1的数 —————————————— 可以把以前的list comprehension看作是有理解力的,带表达式、带逻辑判断的list。 同理,dict comprehensions也是有"理解力"的dict —————————————— Dictionary Comprehensions (递推式构造字典) Not to be outdone by mere lists, dictionaries also have comprehensions. The simplest form looks familiar: { key_expression : value_expression for expression in iterable } Similar to list comprehensions, dictionary comprehensions can also have if tests and multiple for clauses: >>>word='letters' >>>letter_counts={letter : word.count(letter) for letter in word} >>>letter_counts {'l':1,'e':2,'t':2,'r':1,'s':1} We are running a loop over each of the seven letters in the string 'letters' and counting how many times that letter appears. Two of our uses of word.count(letter) are a waste of time because we have to count all the e’s twice and all the t’s twice. But, when we count the e’s the second time, we do no harm because we just replace the entry in the dictionary that was already there; the same goes for counting the t’s. So, the following would have been a teeny bit more Pythonic: >>>word='letters' >>>letter_counts={letter : word.count(letter) for letter in set(word)} >>>letter_counts {'t':2,'l':1,'e':2,'r':1,'s':1} The dictionary’s keys are in a different order than the previous example, because iterating set(word) returns letters in a different order than iterating the string word. word.count(letter)的含义是,数letter表示的单一字符在word表示的字符串中出现的次数。 其中为什么不出现两个t和e?那是因为字典的key值不允许重复,重复就跳过它。 —————————————— iterable 网络可迭代的; 可重复的; 迭代的; —————————————— comprehension 理解力 包含力 理解练习 领悟能力 包括 含蓄 概括公理 【逻】内包 【修辞学】推知法 【宗】包容政策 会意 综合 领悟 学问 —————————————— 其实就是说,只有自己承受痛苦,才能给别人带来欢乐 别人才会反馈给你那份欢乐 —————————————— 如果我能时刻谨记遵循如下的话,应该就没问题: 54.不断的寻找痛苦,得到的即是欢乐;不断的寻找欢乐,得到的即是痛苦。 55.理想为你指明方向,现实为你奠定路基。 Clean and neat, with efficient for someone else. —————————————— 我也想朝那个方向发展 —————————————— 不过他们是有正业的,能力强才能无私分享 —————————————— 稍等,我给个截图 —————————————— http://www.bilibili.com/video/av4038922/ 最后几句,志同道合啊 —————————————— 突然发现我为什么喜欢doyoudo了 —————————————— 那些视频在B站点击率不高啊 http://space.bilibili.com/20503549/#!/index —————————————— @PS_URINE 你从哪儿得知的doyoudo? —————————————— 不过还是觉得这个好一点 正能量: http://www.bilibili.com/video/av3927496/ —————————————— https://static-s.bilibili.com/miniloader.swf?aid=3709035&page=1 —————————————— 想把想把想把,算吧算吧算吧 空空等待无用 —————————————— 哦,那个我也晕 似乎要演算经验丰富,才能找到那构思巧妙的解法 —————————————— 我虽然做不来综合题 但是各种单个知识还是会的 —————————————— 我教你啊 —————————————— 两个嵌套的结构不同,结果确是一样的 为了好看懂,可以用原始的for嵌套 为了代码少,可以用comprehension形式 —————————————— 以Comprehension的形式对for进行嵌套: [表达式 for 得值变量 in 数组 ... ] Now, let’s use a comprehension and assign it to the variable cells, making it a list of (row, col) tuples: rows=range(1,4) cols=range(1,3) cells=[(row,col) for row in rows for col in cols] for cell in cells: print(cell) 注意,这里的comprehension构造,在括号里是从左向右运行的。 —————————————— List Comprehensions (递推式构造列表) looking something like this: [ expression for item in iterable if condition ] [表达式 for 得值变量 in 数组 if 条件] Let’s make a new comprehension that builds a list of only the odd numbers between 1 and 5 (remember that number % 2 is True for odd numbers and False for even numbers): a_list=[number for number in range(1,6) if number%2==1] print (a_list) —————————————— 对for进行嵌套: rows=range(1,4) cols=range(1,3) for row in rows: for col in cols: print(row,col) —————————————— List Comprehensions (递推式构造列表) looking something like this: [ expression for item in iterable if condition ] Let’s make a new comprehension that builds a list of only the odd numbers between 1 and 5 (remember that number % 2 is True for odd numbers and False for even numbers): a_list=[number for number in range(1,6) if number%2==1] print (a_list) —————————————— Generate Number Sequences with range() 用range()得到普通的数字序列 range( start, stop, step ) for i in range(0,3): print (i) —————————————— 用zip()结合tuples,进而转为list或dict: english='Monday','Tuesday','Wednesday' french='Lundi','Mardi','Mercredi' #Use zip() to pair these tuples. A=list(zip(english,french)) print (A) #Feed the result of zip() directly to dict() B=dict(zip(english,french)) print (B) —————————————— zip() stops when the shortest sequence is done. so no one gets any pudding unless we extend the other lists. —————————————— Iterate Multiple Sequences with zip() 用zip()循环复合队列 days=['Monday','Tuesday','Wednesday'] fruits=['banana','orange','peach'] drinks=['coffee','tea','beer'] desserts=['tiramisu','ice cream','pie','pudding'] for day,fruit,drink,dessert in zip(days,fruits,drinks,desserts): print(day,": drink",drink,"- eat",fruit,"- enjoy",dessert) —————————————— Check break Use with else 用else检测break 在while或for的循环中,If break was not called, the else statement is run. for i in [1,2,3,4,5]: if (i==-99): break print (i) else: print ('you finished it, no break, isn\'t it?') —————————————— 在for循环中依然可以使用break跳出整个循环;continue跳过其下的代码开始下一次循环。 —————————————— 得到整个items for someone in Adict.items(): print (someone) —————————————— 用for来重复dict: Adict={'A':1,'B':2,'C':3} 得到keys for someone in Adict.keys(): print (someone) 得到values for someone in Adict.values(): print (someone) —————————————— 用for来重复: A=['S','B','is','not','me'] for i in A: print(i) —————————————— 以后的代码就不再以编辑框的形式展出,直接以源码的形式给出。 至于运行结果,需要你自己尝试。 —————————————— @xioxin 你也在这儿,太巧了 —————————————— 用continue跳过下面的代码,进入新的一次循环 >>> x = 1 >>> while x< 10: ... x += 1 ... if (x<=7): ... continue ... print (x) ... 8 9 10 >>> —————————————— 用break退出while循环: >>> x = 1 >>> while x<= 100: ... print (x) ... if (x==7): ... break ... x += 1 ... 1 2 3 4 5 6 7 >>> —————————————— 用while()来循环: >>>count = 1 >>>while count <= 5: ... print(count) ... count += 1 ... 1 2 3 4 5 >>> 判断为真继续循环,判断为假退出循环 —————————————— 什么被判定为假? boolean False null None zero integer 0 zero float 0.0 empty string '' empty list [] empty tuple () empty dict {} empty set set() 除此之外都是真 —————————————— 比较运算符事例: >>>x=7 Now, let’s try some tests: >>>x==5 False >>>x==7 True >>>5>>x<10 True >>>5>>5>>510 False >>>510 True >>>5>>5 greater than or equal >= membership in … —————————————— 一般每个代码块前的空格以4为单位。 —————————————— Compare with if, elif, and else 比较if, elif,和else 只是如果,否则 >>>disaster=True >>>if disaster: ... print("Woe!") ...else: ... print("Whee!") ... Woe! • Assigned the boolean value True to the variable named disaster • Performed a conditional comparison by using if and else, executing different code depending on the value of disaster • Called the print() function to print some text 如果,否则如果(else if),否则如果…否则 >>>color="puce" >>>if color=="red": ... print("It's a tomato") ... elif color=="green": ... print("It's a green pepper") ... elif color=="bee purple": ... print("I don't know what it is, but only bees can see it") ... else: ... print("I've never heard of the color") ... I've never heard of the color —————————————— #!/usr/bin/python3 # -*- codeing : UTF-8 -*- import requests#调用requests from bs4 import BeautifulSoup#调用BeautifulSoup import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030')#改变本地标准输出的默认编码;p.s:易语言就是这么干的,支持多数中文,避免乱码(使用IDE就不用以上三行) def from_web_get_html(goal_website, from_website): true_host = from_website.replace('https://','').replace('http://','')#得到没有http的网址 headers = {'Host':true_host,'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8','User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36','Accept-Encoding':'gzip, deflate, sdch','Accept-Language':'zh-CN,zh;q=0.8'}#伪装成浏览器 html = requests.get(from_website, headers)#从原始地址, old_cookie = html.cookies#得到cookie html = requests.get(goal_website, headers=headers, cookies=old_cookie, allow_redirects=False)#用旧的cookie访问新地址 html.encoding = 'utf-8'#转换下编码 result = html.text return result#返回网页源码 html_text=from_web_get_html('https://www.baidu.com/s?wd=hello&gpc=stf%3D1428837022%2C1460459421%7Cstftype%3D1', 'https://www.baidu.com')#通过给目标地址,和老的跳转地址得到源码 soup = BeautifulSoup(html_text, "html.parser")#调用强大的BeautifulSoup进行网页源码处理 #print (soup.title.text)#得到标题 #print (soup.prettify())#得到整理后美观的源码 print (soup.body.text)#得到网页主体内容 #参考资料: #https://jecvay.com/category/smtech/python3-webbug #https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html #http://blog.csdn.net/jim7424994/article/details/22675759 #https://www.google.com —————————————— Continue Lines with \ 用反斜线继续执行该行代码 如果一行代码超过80个字符,显得太长,不妨在该行结尾加一个\,这样在下一行写代码也相当于在同一行写。 >>>1+2+\ ...3 6 —————————————— Python is unusual in this use of white space to define program structure. Python因使用空格来定义程序结构而显得不寻常。 —————————————— Now you’ll see how to structure Python code, not just data. 现在你将看到如何组织Python代码,而不只是数据。 —————————————— 总结: In this chapter, you saw more complex data structures: lists, tuples, dictionaries, and sets. —————————————— Make Bigger Data Structures 创建更大的数据结构 >>>marxes=['Groucho','Chico','Harpo'] >>>pythons=['Chapman','Cleese','Gilliam','Jones','Palin'] >>>stooges=['Moe','Curly','Larry'] 用list作元素,创建tuple >>>tuple_of_lists=marxes,pythons,stooges >>>tuple_of_lists (['Groucho','Chico','Harpo'], ['Chapman','Cleese','Gilliam','Jones','Palin'], ['Moe','Curly','Larry']) 用list作元素,创建list >>>list_of_lists=[marxes,pythons,stooges] >>>list_of_lists [['Groucho','Chico','Harpo'], ['Chapman','Cleese','Gilliam','Jones','Palin'], ['Moe','Curly','Larry']] 用list作元素,创建字典 >>>dict_of_lists={'Marxes':marxes,'Pythons':pythons,'Stooges':stooges} >>dict_of_lists {'Stooges':['Moe','Curly','Larry'], 'Marxes':['Groucho','Chico','Harpo'], 'Pythons':['Chapman','Cleese','Gilliam','Jones','Palin']} —————————————— Compare Data Structures 比较几种数据结构 To review: you make a list by using square brackets ([]), a tuple by using commas, and a dictionary by using curly brackets ({}). In each case, you access a single element with square brackets: >>>marx_list=['Groucho','Chico','Harpo'] >>>marx_tuple='Groucho','Chico','Harpo' >>>marx_dict={'Groucho':'banjo','Chico':'piano','Harpo':'harp'} >>>marx_list[2] 'Harpo' >>>marx_tuple[2] 'Harpo' >>>marx_dict['Harpo'] 'harp' For the list and tuple, the value between the square brackets is an integer offset. For the dictionary, it’s a key. For all three, the result is a value. —————————————— 总结下问问题的方式: 1.谷歌 2.英文谷歌 3.github 4.别找了,没答案,telegram里面没活人了 —————————————— 一时疏忽,忘了GitHub —————————————— 如果python不能用来做爬虫,要它何用 —————————————— 软件需求分析: 1.首先,设定搜索关键词 2.然后,从搜索引擎第10页往后遍历 3.如果页面检测到网页同时包含百度盘链接与关键字密码 就将该链接与密码记录并有序写入txt文本 4.假设限定采集到7条信息后停止采集 5.输出给用户 改进第3点: 必须只含一个百度盘链接和一个关键词密码。取关键词密码后4位,不满4位遇空格则舍弃该页。 改进第3点: 同时提取网页标题 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 原理分析: 1.需要寻找文本中的某个特定字符,得到它出现的次数,得到它本身或其后字符;可考虑使用正则表达式或核心字符操作库 2.需要得到一个网址的源代码;考虑用自带网络库或requests中的GET函数 3.需要了解搜索引擎的翻页方式,以便正确得到10页后的网址 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 模块分解: 一、得到网页源码 import requests #导入某网络模块 html = requests.get('http://www.dydog.org/star.php') #填入某网址 html.encoding = 'utf-8' #转码 print(html.text) #输出网页源码 ************************ import requests def from_web_get_html(website): headers = {'Host':'www.baidu.com','Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8','User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36','Accept-Encoding':'gzip, deflate, sdch','Accept-Language':'zh-CN,zh;q=0.8'} html = requests.get(website, headers) html.encoding = 'utf-8' result = html.text return result ~~~~~~~~~~~~~~~~~~~ 二、判断一段文本中是否含有一个http://yunpan.cn/和“码” A_text = '''' http://pan.baidu.com/s/1dDnqRdB 访问码l20i'''#只有一个百度盘地址 B_text = ''' http://pan.baidu.com/s/1dDnqRdB 访问码l20i http://pan.baidu.com/s/1dDnqRdB 访问码l20i'''#有多个百度盘地址 test_text = B_text#测试哪个文本 web_number =test_text.count('http://pan.baidu.com/s/')#百度盘链接个数 pass_number = test_text.count('码')#“密码”出现的次数 if (web_number == 1 and pass_number == 1): print ('true')#满足条件则输出ture else: print ('false') ************************ def include_i_want_or_not(text): web_number = text.count('http://pan.baidu.com/s/') pass_number = text.count('码') if (web_number == 1 and pass_number == 1): return True else: return False 三、提取该网页的标题,百度盘链接以及密码 import re #导入正则表达式库 title=re.search('',html_text,re.S).group(1)#用正则表达式取第一个标题 先用find()找到http://pan.baidu.com/s/第一次出现的位置, 然后该位置+22,得到22到30的字符 密码同理 text=''' 456456http://pan.baidu.com/s/1bnF6G0n465453密码:6fme罚款或控股卡怪''' first_num = text.find('http://pan.baidu.com/s/')#得到这个链接第一次出现的位置 goal_num = first_num+23#将这个位置加上它本身的字符数23 print (text[goal_num:goal_num+8])#然后取得从目标位置到其后8位的字符(独一无二的字符,我们只需要它,貌似是短链接) print ('\n')#换个行再说 first_num = text.find('码') goal_num = first_num+2#将这个位置加上它本身的字符数2 print (text[goal_num:goal_num+6])#然后取得从目标位置到其后6位的字符(也就是访问码啦?) ************************ import re def get_title(html_text): title=re.search('',html_text,re.S).group(1) return title def get_words_after_special_words(txt,words,number): words_len = len(words) first_num = txt.find(words) goal_num = first_num+words_len return txt[goal_num:goal_num+number] 四、研究如何利用搜索词爬取搜索引擎,得到无尽的网页地址 https://www.baidu.com/s?wd=hello 发现不管怎么伪装,都会被百度跳到首页,求大神解答 —————————————— 问一下,为什么我用python伪装了heards后 Get百度搜索,仍然会跳到首页? —————————————— 原理分析: 1.需要寻找文本中的某个特定字符,得到它出现的次数,得到它本身或其后字符;可考虑使用正则表达式或核心字符操作库 2.需要得到一个网址的源代码;考虑用自带网络库或requests中的GET函数 3.需要了解搜索引擎的翻页方式,以便正确得到10页后的网址 —————————————— 改进第3点: 同时提取网页标题 —————————————— 改进第3点: 必须只含一个百度盘链接和一个关键词"密码"。取关键词密码后4位,不满4位遇空格则舍弃该页。 —————————————— 5.输出给用户 —————————————— 4.假设限定采集到50条信息后停止采集 —————————————— 3.如果页面检测到网页同时包含百度盘链接与关键字"密码" 就将该链接与密码记录并有序写入txt文本 —————————————— 2.然后,从搜索引擎第10页往后遍历 —————————————— 1.首先,设定搜索关键词 —————————————— 实在睡不着,我们来构思一个软件开发项目: —————————————— 睡前感悟: 不管是做动漫也好,编程也好 大多数人,不过是在重复造轮子 —————————————— 学CG的第三天,晚安 —————————————— 不对,删除软件配置文件后 又有了 可能是以前误操作导致没有的 诶,不说了,极累,睡 —————————————— 不过那是教程,实际上在我的R17版本里并没有粒子发射器什么的 —————————————— 它这个粒子系统,动力学引擎,类模型 都是很方便的 —————————————— 今天把C4D入门教程看完了 http://www.bilibili.com/mobile/video/av1002575.html#page=94 —————————————— set中的功能函数: >>>a={1,2} >>>b={2,3} 两种方式得到交集: >>>a&b {2} >>>a.intersection(b) {2} 两种方式得到并集: >>>a|b {1,2,3} >>>a.union(b) {1,2,3} a减去b后剩余的元素: >>>a-b {1} >>>a.difference(b) {1} a⊆b? >>>a<=b False >>>a.issubset(b) False a⊇b? >>>a>=b False >>>a.issuperset(b) False —————————————— Then, some interesting things happened. —————————————— Create with set(): >>>set_numbers={0,2,4,6,8} >>>set_numbers {0,8,2,4,6} —————————————— A set is like a dictionary with its values thrown away, leaving only the keys. —————————————— 以后的笔记没必要发中文了 小学生水平的英语,看不懂也别学编程了 —————————————— 额 —————————————— 瞬间就明白靠电脑为生的人为什么要买苹果了 —————————————— C4D预设有裸女模型 里面还有整个家居的模型,一帧的渲染就可以把我电脑搞崩溃… —————————————— 那个按键精灵已有,叫按键盒子 刚才去百度找免费女性模型,屁都没有 一搜谷歌,第一个就可以直接下载 又对国内失望一分 —————————————— 估计以后做动画,做完就得睡觉… —————————————— C4D渲染好慢 —————————————— 就是女性模型 —————————————— 我终于搞定了,在c4d中运行了一个裸女 —————————————— 前几天想用易语言做个高级"按键精灵" 结果发现有些窗口既无类名又无标题 然后放弃了 —————————————— 看来还是有这么多小伙伴以前用过易语言😂 —————————————— http://appnee.com/ this is a good place to download some IT resouces. —————————————— pdf不好的地方在于,认不到的单词查起来困难 似乎网上没有 C++.Primer.Fifth.Edition 或 C++.Primer.plus.Six.Edition 排版较好的epub —————————————— oreilly根本不出针对新手的c++书籍 —————————————— 不好意思,没 —————————————— 这些语言到后期十分庞大,我只想看看核心语法 —————————————— 我真的要看这本书吗? 1995年出的,那时我还没出生 —————————————— 哪个不学都会让这一切毫无意义 —————————————— 学的东西很多 —————————————— 分析时要用到深度学习 —————————————— win7 安卓 类似吧,应该要利用搜索引擎 —————————————— python的界面在学会大数据采集与分析之前不考虑 还是功能重要吧 不能华而不实 —————————————— hex 我认为我又陷入信息缺陷了 有什么好的编程群,拉我进去吧😳 —————————————— 额,我现在只认为易做点小软件可以 —————————————— 不过没关系,只是用来跨平台 —————————————— 估计那玩意儿写桌面程序很吃力 —————————————— 我有个梦想,就是有一天能自己用c++,写出程序来😃 —————————————— 有木有推荐的,入门级c++ oreily的 —————————————— 找新鲜感,单学一本我现在就腻了(看电影能解一时,不是长期办法) —————————————— 话说我偷的那些英语书里面c++一个都没有 想换着学都没有书 —————————————— 你用的高级语言不是可以自定义类型吗? —————————————— 我要崩溃了 明明一个数组就能解决的东西 python搞好多出来 诸如lists,tuples,dict,sets —————————————— copy()对dict同样适用: >>>a={1:'A',2:'B'} >>>b=a.copy() {1: 'A', 2: 'B'} —————————————— 得到dict所有的key或值: >>>signals={'green':'go','yellow':'go faster','red':'smile for the camera'} 得到所有key: >>>list(signals.keys()) ['green','red','yellow'] 得到所有的value: >>>list(signals.values()) ['go','smile for thecamera','go faster'] 得到所有的key与value >>>list(signals.items()) [('green','go'),('red','smile for the camera'),('yellow','go faster')] —————————————— Test for a Key by Using in: 用in检查一个key是否存在: >>>Adict={'A':1,'B':2} >>>'A' in Adict True —————————————— 用.clear()删除dict所有项目: >>>Adict={'A':1,'B':2} >>>Adict.clear() >>>Adict {} —————————————— 人生中该走的弯路一个都不能少 —————————————— 删除一个项目通过del name.[key]: >>>Adict={'A':1,'B':2} >>>del Adict['A'] >>>Adict {'B': 2} —————————————— Combine Dictionaries with update(): 用update()结合更新dict: >>>dict1={'A':1,'B':2} >>>dict2={'C':3,'D':4,'A':999} >>>dict1.update(dict2) >>>dict1 {'A': 999, 'C': 3, 'B': 2, 'D': 4} —————————————— Add or Change an Item by [ key ]: 通过[key]添加或改变dict中的一项: 如果dict中没有你指定的key,添加 >>>Adict={'A':1,'B':2} >>>Adict['C']=3 >>>Adict {'A': 1, 'C': 3, 'B': 2} 如果dict中有你指定的key,更新 >>>Adict={'A':1,'B':2} >>>Adict['A']=999 >>>Adict {'A': 999, 'B': 2} —————————————— 将其它类型转为dict: 从list >>> a=[[1,2],[3,4]] >>> dict(a) {1: 2, 3: 4} 从tuple >>>tol=(['a','b'],['c','d'],['e','f']) >>>dict(tol) {'c':'d','a':'b','e':'f'} 从文本list >>>los=['ab','cd','ef'] >>>dict(los) {'c':'d','a':'b','e':'f'} 从文本tuple >>>tos=('ab','cd','ef') >>>dict(tos) {'c':'d','a':'b','e':'f'} —————————————— 用{}创建一个dict: >>>empty_dict={} >>>empty_dict {} >>>about_me={'name':'YS','years':'18'} >>>about_me {'name': 'YS', 'years': '18'} —————————————— Dictionaries 字典 A dictionary is similar to a list, but the order of items doesn’t matter, and they aren’t selected by an offset such as 0 or 1. 字典与列表相似,但是它的顺序并不重要,它们不是通过诸如0或1这样的下标确定的。 Instead, you specify a unique key to associate with each value. 作为代替的,你指定一个特别的key来连接每个值。 This key is often a string, but it can actually be any of Python’s immutable types: boolean, integer, float, tuple, string, and others that you’ll see in later chapters. key通常是文本,但是它确实能是任何Python的类型,如:逻辑型、整数型、浮点型、元组、文本型,和一些你会在后面看到的其它类型。 Dictionaries are mutable, so you can add, delete, and change their key-value elements. 字典是可变的,所以你可以添加、删除,和改变它们的key值所对应的元素。 —————————————— 用tuple()得到一个tuple: >>>marx_list=['Groucho','Chico','Harpo'] >>>tuple(marx_list) ('Groucho','Chico','Harpo') —————————————— tuple快速赋值: >>>he_said='shit' >>>I_meanings='wow' >>>He,I=he_said,I_meanings >>>He 'shit' >>>I 'wow' —————————————— 利用tuple快速赋值同类型的值: >>>Atuple=('good','well') >>>a,b=Atuple >>>a 'good' >>>b 'well' —————————————— 通过()创建tuple: >>>empty_tuple=() >>>empty_tuple () >>>many_tuple='Groucho','Chico','Harpo' >>>many_tuple ('Groucho','Chico','Harpo') >>>mix_tuple=('Groucho',77,'Harpo') >>>mix_tuple) ('Groucho',77,'Harpo') —————————————— Tuples,类似固定的list: Similar to lists, tuples are sequences of arbitrary items. 类似于列表,tuples也是一种任意类型的序列。 Unlike lists, tuples are immutable, meaning you can’t add, delete, or change items after the tuple is defined. 不同于列表,tuples是不可变的,意味着在序列被确定之后,你不能添加、删除,或者改变序列。 So, a tuple is similar to a constant list. 所以,一个tuple类似于一个固定的列表。 —————————————— 妈的,弄得我想学c++ 语法好蛋疼 —————————————— 赋值列表的变与不变: 改变原列表 >>>a=[1,2,3] >>>b=a >>>b[0]='surprise' >>>a ['surprise',2,3] 不改变原列表 a=[1,2,3] b=a.copy() b[0]='surprise' a a=[1,2,3] b=list(a) b[0]='surprise' a a=[1,2,3] b=a[:] b[0]='surprise' a —————————————— len()取列表总项数 >>>marxes=['Groucho','Chico'] >>>len(marxes) 2 —————————————— 用sort()重排序列表: 改变原列表,默认升序、字母表排列 >>>Alist = ['C','B','A'] >>>Alist.sort() >>>Alist ['A', 'B', 'C'] 新建列表,默认升序、字母表排列 >>>Alist = ['C','B','A'] >>>new_list = sorted(Alist) >>>new_list ['A', 'B', 'C'] 只能用sort排序含不同类型的列表: >>>numbers=[2,1,4.0,3] >>>numbers.sort() >>>numbers [1,2,3,4.0] 反转,降序排列 >>>numbers=[2,1,4.0,3] >>>numbers.sort(reverse=True) >>>numbers [4.0,3,2,1] —————————————— 重温join()与split(): >>>friends=['C++','Python','E'] >>>separator=' ** ' >>>joined=separator.join(friends) >>>joined 'C++ ** Python ** E' >>>separated=joined.split(separator) >>>separated ['C++','Python','E'] >>>separated==friends True —————————————— 取得一个值在列表出现的次数: >>>country=['China','Japan','germany'] >>>country.count('China') 1 —————————————— 用in检测列表中的某个值是否存在: >>>country=['China','Japan','germany'] >>>'Japan' in country True —————————————— Find an Item’s Offset by Value with index(): 查明一个项目在列表的下标,通过index(值): >>>country=['China','Japan','germany'] >>>country.index('China') 0 —————————————— 其实我每过一章会统一整理的 得到全局观后可能会好很多 —————————————— 你的意思是本身语法乱,还是我写得乱? —————————————— 通过下标显示并删除列表中的一项: >>>marxes = ['Groucho','Chico','Harpo'] >>>marxes.pop(1) 'Chico' >>>marxes ['Groucho','Harpo'] —————————————— Delete an Item by Value with remove() 删除一个项目通过 .remove(值) >>>human = ['woman','man','child'] >>>human.remove('man') >>>human ['woman', 'child'] —————————————— Delete an Item by Offset with del: 删除一个项目通过,del list_name[下标]: >>>human = ['woman','man','child'] >>>del human[1] >>>human ['woman', 'child'] —————————————— Add an Item by Offset with insert(): 用下标为列表添加一个项目: >>>marxes=['Groucho','Chico','Harpo','Zeppo'] >>>marxes.insert(3,'Gummo') >>>marxes ['Groucho','Chico','Harpo','Gummo','Zeppo'] —————————————— 使用extend() 或 += 为list增加单个元素: >>>marxes=['Groucho','Chico','Harpo','Zeppo'] >>>others=['Gummo','Karl'] >>>marxes.extend(others) >>>marxes ['Groucho','Chico','Harpo','Zeppo','Gummo','Karl'] >>>marxes=['Groucho','Chico','Harpo','Zeppo'] >>>others=['Gummo','Karl'] >>>marxes+=others >>>marxes ['Groucho','Chico','Harpo','Zeppo','Gummo','Karl'] —————————————— 为list追加list >>>Alist = ['A'] >>>another_list = ['GG', 'boy'] >>>Alist.append(another_list) >>>print (Alist) ['A', ['GG', 'boy']] —————————————— 用append()为list添加元素: >>>Alist = ['A','B','C'] >>>Alist.append('D') >>>print (Alist) ['A', 'B', 'C', 'D'] —————————————— 用[strat:end;step]取list中一部分: >>>Alist = [1,2,3,4,5,6,7] >>>Alist[0:1] [1] >>>Alist[0:7:2] [1, 3, 5, 7] —————————————— 上次那个不是十几行吗 —————————————— tired —————————————— 改变list列表的某项值: >>>Alist = ['Get', 'up!'] >>>Alist[1] = 'down!' >>>print (Alist) ['Get', 'down!'] —————————————— 多重列表: >>>sky = ['sparrow', 'batterfly'] >>>ground = ['tiger', 'monkey'] >>>sea = ['whale', 'shark', 666] >>>all = [sky, ground, sea] >>>all[0][1] 'batterfly' >>>all[2][2] 666 —————————————— 从列表中取出元素: >>>Man=['YS','XiaoLi','Pea'] >>>Man[0] 'YS' >>>Man[1] 'XiaoLi' >>>Man[2] 'Pea' >>>Man[-1] 'Pea' >>>Man[-2] 'XiaoLi' >>>Man[-3] 'YS' >>>Man[77] IndexError:list index out of range —————————————— 将其它类型转为list: 从文本 >>>list('cat') ['c','a','t'] 从元组 >>>a_tuple=('do','not','worry') >>>list(a_tuple) ['do','not','worry'] 用分割法 >>>birthday='1/6/1952' >>>birthday.split('/') ['1','6','1952'] >>>splitme='a/b//c/d///e' >>>splitme.split('/') ['a','b','','c','d','','','e'] >>>splitme='a/b//c/d///e' >>>splitme.split('//') ['a/b','c/d','/e'] —————————————— 用[]或list()创建列表: >>>empty_list=[] >>>weekdays=['Monday','Tuesday','Wednesday','Thursday','Friday'] >>>names=['Graham','John','Terry','Terry','Michael'] >>>another_empty_list=list() —————————————— 关于Lists Lists are good for keeping track of things by their order, especially when the order and contents might change. 列表是好的,对于一些按顺序排列的事物,尤其当数据顺序和数据内容有可能改变时。 lists are mutable. 列表是可变的。 You can change a list in-place, add new elements, and delete or overwrite existing elements. 可以更改列表,添加新的元素,删除或重写现有元素。 The same value can occur more than once in a list. 在列表中同样的值可以出现多次。 —————————————— 小练习:输出一天有多少秒 day.py day = 60*60*24 print ('seconds of a single day is :' + str(day)) —————————————— 文本对齐: text = '>_<' 中对齐 >>>text.center(30) ' >_< ' 左对齐 >>>text.ljust(30) '>_< ' 右对齐 >>>text.rjust(30) ' >_<' —————————————— 英文大小写处理: >>>en = 'i love English' 大写第一个单词的第一个字母 >>>en.capitalize() 'I love English' 大写每个单词的第一个字母 >>>en.title() 'I Love English' 将所有字母变成大写 >>>en.upper() 'I LOVE ENGLISH' 将所有字母变成小写 >>>en.lower() 'i love english' 大小写反转 >>>en.swapcase() 'I LOVE eNGLISH' —————————————— 删除文本中指定字符串: >>>text = 'Smile...' >>>text.strip('.') 'Smile' —————————————— 安卓上不支持中文 —————————————— 玩玩文本: >>>poem='''Rain is falling all around, It falls on field and tree, It rains on the umbrella here, And on the ships at sea.''' 得到前15个字符 >>>poem[:15] 得到诗歌的总字符数,包括空格与换行符 >>>len (poem) 以Rain开始? >>>poem.startswith('Rain') 以sea.结束? >>>poem.endswith('sea.') 寻找on在文中第一次出现的位置 >>>poem.find('on') 寻找on在文中最后一次出现的位置 >>>poem.rfind('on') on在文中出现了几次呢? >>>poem.count('on') 文中只有字母或数字吗? >>>poem.isalnum() —————————————— 我用10几行就行了 —————————————— 果然 —————————————— /py print ('hello') —————————————— 你这个不好, 在安卓上用Qpython3可以调试 —————————————— NameError: name 'reply' is not defined —————————————— 高中数学也是从1开始 —————————————— 用[ start : end : step ]取字符: 假设从1开始数字符个数, [ 所取字符首字母下标值-1 : 所取字符尾字母下标值 : 每隔多少字符取一个+1 ] • [:] 取整个字符串 • [ start :] 从指定字符位置到全文结束位置 • [: end ] 从全文开始位置到指定字符位置 • [ start : end ] 从指定开始位置到指定结束位置 • [ start : end : step ] 从指定开始位置到指定结束位置,每隔step-1个字符取一个字符 ABC = 'abcdefghijklmnopqrstuvwxyz' ABC[20:]为 'uvwxyz' ABC[10:]为 'klmnopqrstuvwxyz' ABC[12:15]为 'mno' ABC[-3:]为 'xyz' ABC[18:-3]为 'stuvw' ABC[::7]为 'ahov' ABC[4:20:3]为 'ehknqt' >>>print (ABC[:7]) abcdefg >>>print (ABC[1:2]) b —————————————— 还是用中国人思维来看: —————————————— c++和py的数组下标都是从0开始的 而我们学的数学和易语言中的数组下标是从1开始的 —————————————— 似乎还是有问题,我要继续测试下 —————————————— 用[ start : end : step ]取字符 [ 所取字符首字母下标值 : 所取字符尾字母下标值 : 每隔多少字符取一个+1 ] : • [:] 取整个字符串 • [ start :] 从指定字符位置到全文结束位置 • [: end ] 从全文开始位置到指定字符位置 • [ start : end ] 从指定开始位置到指定结束位置 • [ start : end : step ] 从指定开始位置到指定结束位置,每隔step-1个字符取一个字符 ABC = 'abcdefghijklmnopqrstuvwxyz' ABC[20:]为 'uvwxyz' ABC[10:]为 'klmnopqrstuvwxyz' ABC[12:15]为 'mno' ABC[-3:]为 'xyz' ABC[18:-3]为 'stuvw' ABC[::7]为 'ahov' ABC[4:20:3]为 'ehknqt' >>>print (ABC[:6]) abcdef —————————————— 更正一个东西: —————————————— tired —————————————— Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed: 超级大师图灵曾梦见自己是一台机器,醒后他这样回忆: "I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!" “我不知道是图灵梦见自己变成机器还是机器梦见自己变成图灵。” —————————————— 用join()把list变为文本: Alist = ['dog','cat','bird'] Astring = '; '.join(Alist) print (Astring) 输出 'dog; cat; bird' —————————————— 用split()分割文本: text = 'dog,cat,bird' Alist = text.split(',') print (Alist) 输出 ['dog','cat','bird'] —————————————— 列表的定义: A list is a sequence of values, separated by commas and surrounded by square brackets. list就是由多个值组成的序列,并且它被方括号所包含,每个值用逗号隔开。 like this ['YS','Pea'] —————————————— len() 取字符串长度 —————————————— [ start : end : step ] [ 所取字符首字母下标值-1 : 所取字符尾字母下标值-1 : 每隔多少字符取一个+1 ] 对字符串切片: • [:] 取整个字符串 • [ start :] 从指定字符位置到全文结束位置 • [: end ] 从全文开始位置到指定位置 • [ start : end ] 从指定开始位置到指定结束位置 • [ start : end : step ] 从指定开始位置到指定结束位置,每隔step-1个字符取一个字符 ABC = 'abcdefghijklmnopqrstuvwxyz' ABC[20:]为 'uvwxyz' ABC[10:]为 'klmnopqrstuvwxyz' ABC[12:15]为 'mno' ABC[-3:]为 'xyz' ABC[18:-3]为 'stuvw' ABC[::7]为 'ahov' ABC[4:20:3]为 'ehknqt' That's all, thanks. —————————————— 替换字符串中字符: sex = 'woman' sex = sex.replace('wo','') print (sex) 输出man —————————————— 用[]从字符串提取一个字符: Astr="do you do!" Astr[0]表示d Astr[1]表示o Astr[3]表示y … Astr[-1]表示! print ( Astr[0] + Astr[1] + Astr[-1] ) 输出do! —————————————— print ('ok ' * 3 +'you win!') 输出ok ok ok you win! —————————————— print ('I ' + 'love ' + 'you.') 拼接字符串输出I love you. —————————————— 有道理,上面只是用我的方式把书上的核心发上来 —————————————— print ('\n') 输出换行符 print ('\t') 输出TAB符 print ('\'') 或 print ('\"') 输出' 或 " print ('\\') 输出\ —————————————— str() 可将其它类型数值转化为string文本型 —————————————— 好了,趁着停电 用手机学习下py吧 —————————————— 讨厌编程,太烦了 windows上写的不能在ios上、Android上运行 也不能在unix上运行 更不能在php服务器上运行 —————————————— 是我多心了 酷Q一个账号登多了,会提醒创建快捷登陆… —————————————— 内含自启登录助手,以后可以用自己的电脑做服务器 —————————————— 你用的什么hosting? —————————————— 不支持日语... 又没有事做了 —————————————— 刚才那个划词还可以,不用翻墙 —————————————— 我目前有用蓝灯与tunnello vpn —————————————— 有官网介绍吗? —————————————— 那个插件会不会很难? —————————————— 哪里有更方便的? —————————————— 不能翻译整个网页,要翻墙 —————————————— 我也刚好想写那个,因为中国的翻译插件不好用 —————————————— 你不是要写个火狐插件吗?研究得怎么样了? —————————————— 我恨日语 https://github.com/myuon/AI —————————————— git上有什么关于人工智能、深度学习、大数据分析的开源项目吗?最好python —————————————— 但没有智能类的 —————————————— 那好了,现在有什么软件需求呢? 我觉得我需要的软件已经有了 比如安卓模拟器 —————————————— 我发现易语言某些外部模块的函数不支持dll,在dll里会出错 所以要么使用纯api,要么使用核心库 —————————————— 看英语呀看英语 编程不看英语别想有什么进步 —————————————— 原来py机器人如此简单 —————————————— #!/usr/bin/python3 # -*- codeing : UTF-8 -*- import telepot #引入机器人模块;如果没有,请在命令行写入pip install telepot 和pip install telepot import time #引入时间模块;如果没有,请在命令行写入pip install time #如出错,请在python的安装目录下寻找pip.exe,将其拖入cmd窗口,再加上空格+install+空格+模块名 bot = telepot.Bot('121899714:AAFyTKIRyn3u3MCi_7DUBIDHFoABcahPM-Y') #设置密匙(访问令牌) #print (bot.getMe()) #得到这个机器人的信息 def handle_message(msg): #这个函数用来接收新信息 content_type, chat_type, chat_id = telepot.glance(msg) #分别得到消息类型、聊天场所、聊天id print(content_type, chat_type, chat_id) print(msg[u'chat'][u'id']) #输出聊天id print(msg[u'text']) #输出消息内容 bot.sendMessage(msg[u'chat'][u'id'], msg[u'text']) #回复发送同样的内容 #f = open('C:\\YS.png', 'rb') #打开某个本地文件,并取得字节集 #bot.sendPhoto(msg[u'chat'][u'id'], f) #然后发给别人,还有sendAudio(), sendDocument(), sendSticker(), sendVideo(), and sendVoice() bot.notifyOnMessage(handle_message) #关联上面那个def函数用到的代码 while 1: #为了保持程序运转,十秒一次 time.sleep(10) —————————————— 使用搜索引擎,最好设置1年内 —————————————— mobi的书好一点,至少可以查生词 —————————————— 我估计你看不懂 —————————————— go 49 —————————————— next —————————————— 不然你看下面的 —————————————— 考不上重点中学的只能学易语言 —————————————— 先看你的学习能力 —————————————— 没有,易语言够用了 —————————————— 注:亚健康是一种虚弱的状态 —————————————— 没跑几步,回来感觉异常疲劳 没想到亚健康这么严重了 —————————————— 不过主要还是用来做题与背单词 —————————————— 话说用安卓模拟器看tumblr的视频很爽呢(你懂的) —————————————— 这是我接下来要发的dll中的一个函数 —————————————— 先试试这个 —————————————— 我给你个易语言的dll,你可不可以再次调用,然后用C语言做个dll? —————————————— 还是我被监视了? —————————————— 难道是小米有特权? —————————————— 不对,我的红米不用翻墙,新授权的这个要 —————————————— 主要是腾讯请不到 数学家程序员 —————————————— telegram —————————————— 并且可以两个安卓同步一个账号 —————————————— 得出结论,只有注册及第一次同步数据需要翻墙 —————————————— 手机好像被墙了 —————————————— 夜神安卓模拟器,设置成512内存,在电脑运行很流畅 —————————————— http://youerning.blog.51cto.com/10513771/1733534 看得我心惊肉跳,感觉背后不简单 —————————————— 一口气看了50页introducting python 真是很爽,原来读原作比那些翻译作品好多了 那些翻译作品,原作者的幽默、风趣都变没了,只剩下冰冷冷的专业术语(暗指c++) —————————————— 但不管怎么说,要学好什么东西,要不戒掉手淫,要不热爱锻炼 —————————————— 我查"数学"二字,得到的结果和高中课本上的相去甚远 —————————————— 数学似乎却与英语不同 —————————————— 不过呢,除了要求底层、效率的软件 易语言还是不错的,可以做一些日常软件 —————————————— 易语言做不了手机端,你还要学吗? —————————————— 你怎么知道telegram的? —————————————— In fact, i want to ask you, have you learned E language? —————————————— OK, do you speak English? —————————————— 1+1=2 —————————————— 新概念英语、疯狂英语、慢速英语、百词斩、美语电影,各种英语学习资料应有尽有 而数学则不然,我在现实生活中似乎很难得知有某套教程能满足从基础到高深的要求 那对于在数学学习中掉了链子的我,实在是很恼人的 —————————————— 我学了一周多数学 深深的发现,基础的薄弱 —————————————— 豌豆 有没有想过收集关于数学的资料 —————————————— 明天去学校2诊 估计政治会考个“好成绩” —————————————— 用双引号表示文本 也有类.的用法 还有,函数也是 函数名.(参数) —————————————— 入门基础课做完了 —————————————— https://www.shiyanlou.com/ 我发现python与易语言在文字处理方面很相似 —————————————— 垃圾其次,下载更烦 —————————————— 决定以后再不看中文编程类书籍了 —————————————— 建议你用手机,蓝灯在网络稳定的情况下,还是挺持久的 —————————————— 我这边电信、移动都未墙 —————————————— 互动百科竟然是他创建的 394020613 —————————————— 我觉得担心书不够看是多余的 http://www.pdfshu.org/?fenlei/20 —————————————— for learning —————————————— I think it's probably still have one hundred book have to send. —————————————— 让家人陪我学习真的不好吗? 可我就是希望有人陪着,并分享一些有意义的东西。 —————————————— 我爸冲过来,差点要打我 —————————————— 还是被机智的我发现了秘密,继续上传... —————————————— shit, 刚才卡成无响应,无法续传 不知道从何开始,还有200本 —————————————— 我在想我是不是搞错什么了,我只想传封面带动物的的书 我以为oreilly全是动物书 —————————————— 这些东西只要传上来了,传到其它就是秒传 —————————————— 给计算机大一新生的建议给计算机大一新生的建议 评论 分享 1. 核心课 (数据结构算法、组原、os、编译、网络(tcp/ip、http部分))一定要弄懂。最好写相关的项目,比如写个parser或者内核什么的都是极好的。 2. 不要追新的技术,而是追业界普遍使用的技术。比如你追了c#,却发现业界不少由c#转java的;你追了xamarin,也说发现人家还是用java+as开发应用。其实业界还是喜欢久经考验的稳定技术。语言学精一个,了解多个。每种类型的框架(比如前端css,前端js,后端orm,后端mvc,模板引擎)先学一个,其他的需要了边学边用。 3. 早点去leetcode刷题,国内公司特别爱装逼考算法,不少都是原题,切记。 4. 注重面向对象,注重架构方面的东西,特别是设计模式,不仅仅是为了可维护性。你以后代码可能是给别人提供支持的,你写的接口很难用的话,天天会被人问候祖宗。 5. 技术问题学会抛弃百度,使用goole,使用github,使用stackoverflow。学会使用bash和git,特别是后者,备份恢复的时候你就明白了。 6. 英语达到能阅读原版文档的水平。 7. 多写代码,有些东西做的多了才能从理性认识向感性飞跃。但不是让你写一万行hello world,也不是让你写一大堆app。你每学一个新的知识,都写个相关的demo出来。你想想你自己写了个http server,虽然实际业务中用不到,面试的时候这么说,然后解释一下自己怎么做的,是不是很爽。 8. 看书之前先去豆瓣看书评,不要看国产的一些烂书。多看最佳实践,比如effective系列。你一个学生没啥项目经验,又不看别人的最佳实践,写出来的代码能用? —————————————— 以前绕的弯路可真多 http://it-ebooks.flygon.net/developer/ —————————————— 全高清应该不算盗版吧? —————————————— 早知道了,中文书不多 —————————————— 400 files... little by little sending... —————————————— 翻遍百度,没找到让我感兴趣的源码 一个关于人工智能的都没有,一个复杂点的(高科技的)东西都没有 —————————————— 那应该和我一样大 我在家,他在学校 —————————————— but the first step is download to my computer. —————————————— 完蛋,那人2015.8高三 现在应该大学了 —————————————— fly这人估计也高中,要不然联系联系 —————————————— 我知道啊,关键我是安卓 —————————————— 智器阅读又不支持epub —————————————— 不支持自定义横屏 —————————————— 安卓的kindle感觉不好呢 —————————————— 你用什么看? —————————————— 偷完,准备传书,pdf和epub,传哪种格式好呢? —————————————— 嗯,你认识他? —————————————— 正在做小偷 —————————————— o —————————————— http://pan.baidu.com/share/home?uk=2214641459#category/type=0 这是那网上被撤销的部分资源 —————————————— http://www.salttiger.com/archives/ 这也是牛人 —————————————— 昨天在网上下了一晚编程电子书 发现oreilly出版的电子书最好,几乎都是文字版 —————————————— 这种强烈的对比,才是许多人放不下易的原因吧 —————————————— 易语言一个点击就可以搞完的事 它写了几千字。。。 http://www.doc88.com/p-1778082773975.html —————————————— 手机要准备三个浏览器, 一个看手机版, 一个看桌面版, 一个看国外 我的配置是, QQ浏览器 海外lite UC 自由浏览 —————————————— 又见牛逼者 http://bestcbooks.com/ —————————————— 我发现我们这些人都有一个特点,那就是接受了太多西方文化 特别是电影中的思想 而那些东西在本土(即我国),又根本得不到 这种理想与现实之间的差距,会不断的折磨你,直到你放弃或… —————————————— you could do it. —————————————— en —————————————— https://github.com/scalingexcellence/scrapybook#to-use-docker-directly-without-installing-vagrant —————————————— https://github.com/yingshaoxo/age-and-gender-detection-in-real-time-with-tensorflowjs I wrote this after I get into node.js —————————————— Basically, npm is a package manager for node.js node.js is a software which enables JavaScript running on local You can run xx.js with node xx.js —————————————— This is what I did: https://github.com/yingshaoxo/ML/tree/master/5.image_classification —————————————— On the very bottom, all you need to do is: do things with one way! After you can do many things, you'll then think about how you could do one thing with different way based on different circumstances. If you, at the beginning, only has been taught or struggled in solving one thing in different way, then, I could say, you are useless! Because all you got or all you can do is solving 1 problem which maybe 1 + 1 = 2, while others could solve 20 times problem than you do. That's why we encourage people to start from little, go far with much. (E-language->C++->Python->JavaScript->Kotlin->Golang->AI(ML)) (Windows->Deepin->Ubuntu->Popos->Kali->Lubuntu) Don't be silly that think you could learn all those stuff from scratch easily. Just say no to those details, start from the main ideas, start from what's essential. With that, you'll be good at learning everything! —————————————— https://github.com/automl/auto-sklearn/ OK,It's definitely good for applying without thinking. —————————————— http://www.americanrhetoric.com/speeches/barbarajordan1976dnc.html This man's speaking is very attractive, it maybe the best one I'v ever heard. By learning this, reading English book will be much easier.(with a nice inner voice) —————————————— https://medium.com/@julsimon/10-steps-on-the-road-to-deep-learning-part-1-f9e4b5c0a459 —————————————— Clustering: This is a type of problem where we group similar things together. —————————————— http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/ I have a limited brain, which is a shame. —————————————— https://medium.com/waymo/google-i-o-recap-turning-self-driving-cars-from-science-fiction-into-reality-with-the-help-of-ai-89dded40c63 —————————————— Just get started yet —————————————— OK I'm on my way Learning Google AI tutorial by living record. —————————————— @Malgan Have any idea? —————————————— The problem is how —————————————— The more touches on other fields, the more I'd like to begin my journey on tensorflow(or real ML project) —————————————— https://developers.google.com/machine-learning/crash-course/ml-intro —————————————— Can I ask you a question? Why your nickname have turned back to non-English? —————————————— Brainstorming! Can not think any of relationships that is formed by the number attributes, but an AI model need that datasets It could be my first project of deep learning —————————————— https://youtu.be/-mu3TYZ_udM —————————————— TensorFlow (@TensorFlow) Tweeted: ⚙️🎹📝 Automatic piano music transcription, with Magenta! Check out the new project (w/ source code & model) 👇 https://t.co/kRpUJgzg6K https://twitter.com/TensorFlow/status/963186566867898374?ref_src=twcamp%5Eshare%7Ctwsrc%5Em5%7Ctwgr%5Eemail%7Ctwcon%5E7046%7Ctwterm%5E1 —————————————— https://goo.gl/R1kBdb —————————————— Haven't start yet. —————————————— Hi, friend, long time no see. Presently, I have been busy with network adjustment. China University Net is definitely terrible more than you've ever imagine. —————————————— Don't worry, I'm still in AI learning. I won't give up anyway. —————————————— Then? —————————————— You mean Information Technology is not necessarily related to programming? —————————————— You know, I hate politics. —————————————— Computer Science But trust me, you won't have much choice if you are a art student. —————————————— No, because of my poor scores on high school, so I have no choice but that. —————————————— OK, thank you for your advice. I think I'm already know Python, JavaScript, C++,there's no need to learn a new language perhaps. And yes, learning a new library like tensorflow could be a good option for me. By the way, next month I'm gonna go to university, my major subject is Railway Communication and Information Technology. I may learn how to handle hardware in there. —————————————— @Malgan A little bit tired I am. What I supposed to do if I already know a certain of programming language very well? —————————————— Check out @Sentdex's Tweet: https://twitter.com/Sentdex/status/899057144884015104?s=09 —————————————— OK, welcome to here. —————————————— I'm a python engineer. —————————————— Hi, my name is yingshaoxo. —————————————— It's said that AI technology will change in every five years. —————————————— That's nice, thank you. —————————————— What? —————————————— Deep learning just like human learning, for example, I don't know how to learn English actually, but when I saw a lot of sentences, I'll find the right pattern hidden in it. —————————————— Self-learning —————————————— I guess that's the simplest one. —————————————— I'm not the kind of rich person. —————————————— China —————————————— Of cause I love reading —————————————— You know, my English ability is unstable. So I can't use it sometime. It all depends on whether my mother language on my mind is weak or not. For example, now, it's weak. So I can talk freely without any limitation. —————————————— It's hard to have a nice talking. Even on telegram. —————————————— hi —————————————— Yeah —————————————— I have been learning New Concept English 4th book. It's great, although its content seems a little bit old right now. —————————————— https://www.wired.com/story/a-sons-race-to-give-his-dying-father-artificial-immortality/?utm_source=wanqu.co&utm_campaign=Wanqu+Daily&utm_medium=website —————————————— https://medium.com/towards-data-science/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 —————————————— What I should say if I sing a lot of song? —————————————— Sing a song —————————————— https://kg2.qq.com/node/play?s=4cEqoU4csrxQT4C9&shareuid=609b9b8620283382&topsource=a0_pn201001006_z11_u26635549_l0_t1501256709__ —————————————— Me too —————————————— You should have It's great —————————————— Oh no —————————————— Did you have Twitter account? —————————————— +1 —————————————— But it's official, I trust it. —————————————— It's a movie? —————————————— Nobody's here —————————————— AI English —————————————— Definitely yes —————————————— You could call me yingshao —————————————— good —————————————— How old are you then? —————————————— I'm 19 and from China. —————————————— 😁 —————————————— Is that place keeping war? —————————————— Why —————————————— I agree —————————————— Because It's doesn't make sense to a remote friend, especially on internet. —————————————— But I'm afraid I don't wanna answer that. —————————————— It's the most common questions person ask me. —————————————— OK —————————————— Wow, why you search this ID of this group? —————————————— hi, little girl —————————————— https://t.co/ETlJyup28f —————————————— Building a Real-Time Object Recognition App with Tensorflow and OpenCV https://medium.com/towards-data-science/building-a-real-time-object-recognition-app-with-tensorflow-and-opencv-b7a2b4ebdc32 —————————————— fine —————————————— Maybe I spent very much time in front of computer. —————————————— I got hemorrhoids suddenly somehow. —————————————— I need surgery after tomorrow. —————————————— Oh, today I went to hospital. —————————————— yeah, me too. But I also have to sleep now, sorry. I'll see you tomorrow. —————————————— https://www.google.com/webhp?doodle=32501999-0ACA0g0ACA0EIA0Q0I0C0A0CBA0AECcO0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A100a0 —————————————— https://youtu.be/5e0TbyCkbCY —————————————— Because inception is just a picture classification. —————————————— A few months ago, I trained a model for human recognize using inception 3. It works fine, but the only problem is it can't find where the object is. So simple classification is useless. —————————————— And after learned it, you'll know how big the programming world is. Algorithm, Math theory etc. Then you'll feel like you want to start from foundation. —————————————— Artificial Intelligence —————————————— Telegram full of man —————————————— I would be happy if you can invite some girl to here @Shinohara_Rin —————————————— @Malgan Here —————————————— He will help you in Java, Python, security etc. —————————————— Malgan is a nice guy —————————————— https://www.programiz.com/cpp-programming/virtual-functions This website also provides good knowledge. —————————————— https://www.tutorialspoint.com/cplusplus/ And Google And The C++ Programming Language 4th —————————————— I choose C++ finally. —————————————— If I want to learn a new language, which one you would recommend? —————————————— good —————————————— Are you single? —————————————— You don't understand, I like quiet and peace. —————————————— Did you feel sad? —————————————— She is not independent —————————————— Sorry, now i've kind of busy. —————————————— no —————————————— wow —————————————— So you came from captital city? —————————————— https://www.google.com/search?q=uzbekistan+people&newwindow=1&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwiYs5Wo0vnTAhUO82MKHTpLC9wQsAQIIg&biw=1920&bih=936 They are just like Chinese... —————————————— sleep in the day —————————————— https://python-telegram-bot.org/ This would be better document —————————————— https://github.com/eternnoir/pyTelegramBotAPI —————————————— No, you should use python lib —————————————— Telegram bot or Java or docker? —————————————— What document? —————————————— Recently, I've learned how to use docker. —————————————— Don't mind, I just enjoy sharing things. —————————————— Happy morning, sir. —————————————— . —————————————— I think so, —————————————— OK, not Ok —————————————— Forget about it, let's go and do our own job. —————————————— I do not like fighting pictures, I am civilized —————————————— Who brought this man? —————————————— I like this kind of feeling —————————————— Although I am not afraid —————————————— I think I was threatened —————————————— Oh, my fault —————————————— girlfrind is not friend and woman? —————————————— At present you are the girlfriend I have in telegram. —————————————— I have not chatted with girls for a long time, I am very grateful to you. —————————————— Do not you think it's hard to talk to us? —————————————— https://translate.google.com.hk/#zh-CN/en/ —————————————— Google is good, anyway —————————————— I used Huawei flat, the school in order to "wisdom classroom" unified request to buy. Originally the system is locked, can only be used to learn, I just crack it, you can when the normal machine (equipment) to play —————————————— I can't believe you playing your Android device on classroom. —————————————— Is it home? —————————————— Maybe he didn't see your picture You need to send it again —————————————— Now you got me —————————————— Because I haven't much confidence. —————————————— You are beautiful. —————————————— 17 —————————————— next month 2017.6.9 —————————————— Here is a book I recommend to you: —————————————— is it you? —————————————— 2 or 3 years. —————————————— Or you guys just working alone. —————————————— ... It's a long way to go, I guess. —————————————— Sure, you should have some programmer friends too. Can you invite them to this group? —————————————— Wow, spend five years studying medicine. —————————————— Which university you'd like to go if you already mastered Chinese? —————————————— It's unbelievable —————————————— Why you want to learn Chinese before? —————————————— The main problem between you and me is language. There are a lot of things I can't express in English freely. —————————————— wow, what's your on youtube? —————————————— I checked your twitter —————————————— @Malgan came from USA. He's a real programmer. —————————————— oh, I see —————————————— We'll be friends together! —————————————— nice! —————————————— He's you husband? —————————————— night —————————————— 19 —————————————— I know😄 —————————————— yes —————————————— Yes, if we get less features than a normal condition on a object, we may not correctly guess what it is. —————————————— We human do the things as the same way. —————————————— Exactly —————————————— https://deeplearningsandbox.com/how-to-build-an-image-recognition-system-using-keras-and-tensorflow-for-a-1000-everyday-object-559856e04699 —————————————— https://leonardoaraujosantos.gitbooks.io/artificial-inteligence/content/object_localization_and_detection.html —————————————— https://medium.com/@harvitronix/continuous-online-video-classification-with-tensorflow-inception-and-a-raspberry-pi-785c8b1e13e1 —————————————— When we do machine learning, actually, we are doing statistic. —————————————— How to read this wordℓ? —————————————— I fell great watching TV or movie in two time speed. —————————————— you I we have it he her has —————————————— One thing is for sure: machine learning theory based on human learning theory. So, most of the time, our learning life highly related with machine learning theory. For example, testing: first you need to learn some example questions, which we called labeled data-set. Then you need to solve some new questions which you has never seen before. Recical this process until you get good predictions. —————————————— Yeah, I firmly believe this knowledge belongs to university. —————————————— This picture just confusing. —————————————— https://terrariumtv.com Nice APP —————————————— I don't think it's good at all. You know, one man can't rely on one point to support the whole building. —————————————— 123moviesfree.com/watch/supergirl-s02-2015-i.2-online-free-123movies.html —————————————— ML021: http://www.youtube.com/playlist?list=PLGXfJorQS7_Mv8FXfRRNYyxHl9kaP1zga —————————————— When I really got into ML, I found that those ML nouns in Chinese become vivid in my mind. —————————————— it looks like life satisfaction goes up more or less linearly as the country’s GDP per capita increases. —————————————— I truly believe this just a basic linear function. —————————————— A big challenge with online learning is that if bad data is fed to the system, the system’s performance will gradually decline. So now, I have evidence to say, our brain is a natural online learning system. —————————————— One important parameter of online learning systems is how fast they should adapt to changing data: this is called the learning rate. If you set a high learning rate, then your system will rapidly adapt to new data, but it will also tend to quickly forget the old data (you don’t want a spam filter to flag only the latest kinds of spam it was shown). This explained why I'll gradually forget what I have learned. That's because I was learning something new. —————————————— So I deleted it. —————————————— No, the whole book. —————————————— It's not easy to search one AI book that really benefit for learning. —————————————— To be honest, I can't understand what it said. —————————————— "Hands-on MachineLearning with scikit-learn and Tensorflow" It's a book, and I can't find a eBook version. —————————————— Neural layer simulation —————————————— We call it deep learning —————————————— https://youtu.be/nWJZ4w0HKz8 Cool, he almost completed it. —————————————— Auto fowwlong people —————————————— http://www.exhaustingacrowd.com/london —————————————— no problem😁 —————————————— Can you give me your chrome bookmarks? Just convert it to html, then upload to this website. http://yingshaoxo.cf:8888/main/ —————————————— https://aiexperiments.withgoogle.com/ Look at this, just amazing! —————————————— Of course —————————————— https://youtu.be/CLFp9D9-0Eo So crazy about building an AI with GAT... —————————————— If I do this job, I could living in my home with my computer, like a real programmer do. —————————————— I have to live myself. In China, it's illegal. —————————————— If I told you I want to built a website severing NFSW things, would you think? —————————————— Strange, somebody suddenly add me. —————————————— Hey, it's you? —————————————— Yeah, but I prefer to use model than original API. —————————————— Nothing happened —————————————— @XiaoyaBot —————————————— test —————————————— I drawed this. —————————————— https://www.blog.google/topics/machine-learning/fast-drawing-everyone/ —————————————— I guess man should have dreams. —————————————— I guess I'll use bot to delete all those messages which aren't English. —————————————— 557路 —————————————— 学习的正确之道:在重复同一任务工作的每一个loop添加新东西 —————————————— 社交圈真人头像 女按丑排名,越丑越前 男按帅 —————————————— 认识朋友的局限 老是认识和自己相似的朋友,朋友能做的,自己能做,朋友帮不上忙 自己不能做的,朋友也不能做,朋友帮不上忙 —————————————— Learn by examples, learn by data, that's the only way which gonna work. —————————————— Where am I in life single: 20 years no sex: very want health: not great, but OK student & programmer: bad student, medium programmer poor family: very poor —————————————— 我无法表达的, 我也无法学会。 - inspired by deep learning —————————————— 这个问题我来回答:5-10本英文书; 巅峰时刻连续一个月每天看500+的英文网页或文章;自从我开眼后,每天都有那么几句是和美籍人士交流;我所有的阶段性知识获取都写了对应的英文blog;现在1/2的大脑被英文霸占,高数、编程、AI知识全部基于英文 —————————————— 乐嘉 —————————————— AI万能学习大法 1. 花几个月瞎鸡巴学一气,熟悉各种专业名词的英文含义,也代表初略了解其原理 2. 看absolutely for beginners系列 3. 学skit-learn,掌握传统机器学习技术 4. deep learning( 运行各种 keras 实例 —————————————— When I saw those programmers, I'm not seeing some ordinary individuals, but instead, many great man who dare to fight the fate, who dare to fight the wrongs, who never easily give up, who we can say that they are pioneers. —————————————— The thing that really killing me is being normal, being ordinary. Those shit will never understood what I'm looking for, what I'm dieing to achieve. They are just live in their stupid numb life without knowing anything behind the lights. —————————————— 三、示爱艺术 直接法(痛快一点、面对面挑明,前提是有交往、有好感) 渐进法(占座、打饭、送粥、写东西、开车…) 暗示法(没好感的情况下可能无效) 情书法(实话、有文采、能被公开、能被看出志向、可信赖) 委托法(让人带话,不建议) 结论:艺术使人幸福、艺术“不可复制”、艺术需要创造 —————————————— 二、择偶方式 自己结识 公开征婚(研究婚恋节目,从中学习) 委托介绍(对硬件要求高) 媒人介绍(有夸大之嫌) —————————————— 归零:原先的 1或0 用 10或01 表示 不归零:非0即1 双极性:1或-1 单极性:1或0 —————————————— 恋爱之道 - 艾跃进 一、总体要求 注意事项: 0.想清楚爱一个人的哪些地方(你了解对方多少) 1.找与自己价值观相近的人(有共同志趣) 2.遵守法律,不可强求 3.符合道德,有责任意识,忠一 具体要求: 1.人品高尚 2.学识相当 3.长相端庄 4.家教相当 5.性格相符 6.气味相投(闻香识*人(吸引你)) 结论:此事古难全,(有3条就好),仅供参考 —————————————— 论精英阶层与平民阶级的和平共处 —————————————— 开源的本质是: 开源者不需要从这个项目得到 Money,但他希望这个行业能够持续快速地发展。 —————————————— 没有市场竞争谈创新是空想,根本没动力:这个可以用,继续用,反正没人和我抢饭碗(垄断),为什么要大费周折搞创新? 你党就是没竞争,你党控制下不可能有创新 你党言论审查的重点就是扼杀一切可能和党管控的一切形成竞争的势力 —————————————— yingshao xo: So what is intelligence? 正确的学习算法 + 足够且有效的数据资源 + 长时间勤奋地训练 + 一个可记忆的容器 + 可再次获得数据的传感器 + 可自由执行决策的身体 —————————————— 服务器IP:104.207.129.40 主端口:12345 UUID:a993c921-10ee-4bdd-8441-950396d337ec alter ID: 100 加密方式:None 传输方式:tcp TLS:关闭 —————————————— 腿部压力检测,如果超出自身重量太多,蹲下 每个攻击动作都要有起身的效果 头部360度检测(或用三个距离传感器检测正面),储存最近满足距离条件的物体方位(没方位负数);主loop负责其他低级传感器 没动作不能超过10秒,超时起身 后倒检测,防止倒下 黑传感器检测,前扑 抖动防御 —————————————— 技术分析: 这里的代码,由于只用到了传感器,阈值就显得非常重要,因为`检测黑线`以及`碰到全黑前进`很重要,所以实际比赛把模拟值调高`30%到50%`是比较好的。。。。可惜当时我忘了。 —————————————— 我们所做的事 无非是用技术对权力和财产进行重新分配 也就是用个人奋斗突破血缘亲族的枷锁 —————————————— https://raw.githubusercontent.com/yingshaoxo/driver/current/driver.ino —————————————— 现在我知道学校买的那块板是仿造的谁了 —————————————— 两级分化严重 不学AI,被时代淘汰 学AI,远离SB,远离嘈杂的环境,一心扎进知识的海洋不要自拔 —————————————— task 1: AI learning, read book and do experiences task 2: 三端融合 (Android, Web, Server) yingshaoxo'app | Kotlin 做原生才能做到的事,APP框架 WebMathChat | JavaScript 在 web view 里配合 Kotlin 做离线界面与普通运算 KingChat | Python 在后端负责 API, database, AI 等复杂运算,为 web view 有网状态提供服务 Useful Golang | Golang 在后端负责 serve static files 与 替换 Apache 的功能 task 3: School knowledge, including English, Mathematics task 4: Robot match 4个任务并行,由前到后重要性递减 —————————————— 下一个安卓 APP,滑动化无设置风格 —————————————— 针对同学们的问题做一个统一回答: 1.学制二年。课程全部在南铁院内完成。 2.13门课在前3个学期完成,第4个学期完成论文。 3.英语+3门学位课满足条件,可以申请学士学位。 4.报名表中“尚未取得学分课程”指的是挂科情况。 5.先填写报名表进行预报名。统一通知大家报名和缴费。 6.同学们如果已参加过自考,通过了的公共课程,英语二,马原,现代史等,成绩仍然有效。 7.马原,现代史2门公共课可以安排开设选修课,有合格成绩的可以免考 8.英语过四级可以免考。过四级满足学位条件 9.有3门课是校考课程,不需要参加统考。 10.一共13门课,期中校考3门,开设公选课2门,剩余8门课需要参加统考。若四级已过,则余7门统考课程。 11.统考课程成绩=统考成绩*70%+平时成绩*30% 12.毕业以后无法到校上课,可以自学,回南京考试。有平时成绩。 13.学历证书上盖两个章,南京大学和江苏省自考委员会。学位证书上盖一个章,南京邮电大学。 —————————————— 我突然想到了 你们设备上的系统,没有一个是国产的 你们用的所有软件、玩的所有游戏,技术上全部基于国外开源 —————————————— 我在无尽的时空穿梭却只为找到你,there's nothing I can change, 你是我的唯一 —————————————— 18001565931 —————————————— 45 285 45 床上高度 —————————————— 职业程序员 never give up. —————————————— https://youtu.be/iANOSneQN2k 先进的生产力(高效)会促进社会变革 过程:就模式产业工人失业→人们学习新技能、开拓新领域→就业 —————————————— 机器学习的大训练策略叫做 总 中间过程的 data 叫做 分 最后结果 叫做 总 但两个 总 是不同的,前一个是表面的总,后一个是难以理解的混合了太多细节的 总 所以语文上的 总-分-总 构架恰恰勾勒出了人类学习的基本模式 —————————————— 由 deep learning 的训练过程又可知,我们光有智力容器是不够的,需要有个更高智慧去指导你,教你训练策略和收集合适的 data 这个更高级智慧在当代,往远了说是社会,往近了讲是父母 如果没有这个更高级的智慧做指导,结局就像“狼孩”,有智力容器也没用 —————————————— If you go to grub terminal by accident, do this (* is the number of your system root driver): grub> set root=(hd0,gpt*) grub> linux /vmlinuz root=/dev/sda* grub> initrd /initrd.img grub> boot —————————————— Kali installation, It's all about choice. -1. format your disk using PE system, we need a clear disk, or something will going wrong 0. use refus to make USB driver 1. just to be safe, use MBR based mix mode 2. use dd mode to defend Wi-Fi firmware missing (iso file belongs to Windows, and Windows is bad on drivers) 3. if you can disable secure boot, you can use UEFI in installation, else just use BIOS 4. if you failed, try more option in 3 step. 5. links may help https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/ https://forums.kali.org/showthread.php?35926-Executing-grub-install-dummy-failed https://wiki.deepin.org/index.php?title=Repair_Boot https://www.linux.com/learn/how-rescue-non-booting-grub-2-Linux —————————————— https://null-byte.wonderhowto.com/forum/fix-failed-detect-and-mount-cd-rom-problem-when-installing-kali-linux-0177158/ —————————————— iptables -t nat -A PREROUTING -p udp --dport 53 -m string --algo bm --from 20 --hex-string "|024a4a0364615000|" -j REDIRECT --to-ports 5353 —————————————— 2001:19f0:5:29f1:5400:01ff:fe4c:348d ssr://MTA4LjYxLjE1Ny4yNDM6MTA4ODphdXRoX2NoYWluX2E6Y2hhY2hhMjAtaWV0ZjpodHRwX3NpbXBsZTplV2x1WjNOb1lXOTRiekU1T1Rn —————————————— remote aop.gd10010.cn 443 Host aop.gd10010.cn http-proxy ip 8080 联通,免大部分省份!!!!! —————————————— 华为解锁: 1942481438189172 —————————————— 【笔记本电脑支架 可折叠托架宿舍床上用多功能懒人电脑架增高架子】 http://v.cvz5.com/h.EEQkDi 60° 255° 75° 加上 【海贝丽懒人沙发榻榻米可折叠单人小沙发床上电脑靠背椅子地板沙发】 http://v.cvz5.com/h.EEkjIJ 120° 完美 coding 环境 —————————————— 101.236.28.129 root asdfjkl; ssh root@101.236.28.129 —————————————— 6236441371020081168 —————————————— 561823 —————————————— 新闻源 房产、互联网娱乐与交易 http://www.williamlong.info/archives/5123.html —————————————— 成人之所以为成人,是因为知道一样事情对他有利,即使不乐意,也会去做。 短期利益服从长期利益。 —————————————— 斐讯PSG1208适用于斐讯K1和K2使用,之前分享的是去年的最稳定的版本,这里专门分享它的最新版,目前是今年7.1日版,改的华硕适用于7620老毛子Padavan固件。 新固件网关:192.168.123.1 管理页面:http://my.router/ 管理账号:admin/admin wifi:1234567890 刷机不恢复默认值 清除配置方法: 由于刷机不清除配置,如果按键10秒也不能清除配置,或者开机后不能启动,可能是配置冲突,需要手动清除配置(nvram)重置机器。 http://www.upantool.com/gujian/asus/11050.html —————————————— hexchars="0123456789ABCDEF" end=$( for i in {1..10} ; do echo -n ${hexchars:$(( $RANDOM % 16 )):1} ; done | sed -e 's/\(..\)/:\1/g' ) MAC=00$end service network-manager stop ifconfig eth2.2 down ifconfig eth2.2 hw ether $MAC ifconfig eth2.2 up service network-manager start if [[ $(wget www.qq.com -O-) ]] 2>/dev/null then echo "This page exists, so you got the right Internet accese" else echo "This page does not exist, so you have to connect to Internet first." curl -XPOST -H 'Origin: http://192.168.138.180' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'DNT: 1' -H 'Referer: http://192.168.138.180/a70.htm' -H 'Accept-Encoding: gzip, deflate' -H 'Cookie: DDDDD=1756670231; md5_login=1756670231%7C; networkMode=3' -H 'Content-Length: 80' -H 'Cache-Control: max-age=0' -H 'Upgrade-Insecure-Requests: 1' -H 'Accept-Language: en-US,en;q=0.8' -d 'DDDDD=1756670231%40unicom&upass=199803292332&R1=0&R2=&R6=0¶=00&0MKKey=123456' 'http://192.168.138.180/a70.htm' fi —————————————— 1756670231 199803292332 —————————————— Essence of linear algebra: http://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab —————————————— Pea email: peashooter6426@gmail.com —————————————— https://movie.douban.com/explore#!type=movie&tag=%E7%A7%91%E5%B9%BB&sort=time&page_limit=20&page_start=20 少于6分、电视剧、未引入中国的日本片 就别看了 —————————————— DNS: 139.199.219.25 —————————————— 报名号:17511301121817 准考证:130113809 身份证:511602199803292332 学号:1756670231 密 码:1576570260 —————————————— Set proxy to docker sudo vim /etc/default/docker service docker restart —————————————— Petitemarie —————————————— 但有时候人生是有点不公平 如果你认识一个英语大神,你会发现它每天都不看课本,全是课外自己搜集的资料,它也不听老师讲课,TED、NCE、美剧轮番轰炸 同理,你如果认识一个物理学大佬,他可能也不按常理出牌,每天想的事、故意接触的事也和你不一样,你和它的不同就完全取决于它接触的正确的事太多,你接触的错误的事太多。 很可惜,从小到大就没认识一个英语大神,除了误打误撞的李阳先生。现在我也变成了大神,然后就发现我身边全是大神,你说虐不虐?(成为大神能提高遇到大神的几率,而遇到大神会提高成为大神的几率) —————————————— 561823 passwd for money —————————————— Future 是可以 cancel 的(充当 coroutine 实际执行中的控制小把手) Loop 是可以 stop 的 Loop 停了还可以再运行, 一种方法是手动给 future 到 loop.run_until_complete(), # 你给 coroutine 也行,会自动转换成 future 另一种方法是提前用 asyncio.ensure_future() 把 coroutine 转化为 future 并自动添加到 loop队列,再用 loop.run_forever() 开始循环任务 # 运行到你使用loop.stop()为止,并不是永远 —————————————— read: BV3QIPPRCKBSZG73BNRTRGDJ6C7N22LM5 read and write: AWBPM7YORLWG3JRNQLCZFNFBWPBFQUGUZ —————————————— 宽带信息 账号:94133001915 密码:006483 —————————————— 我可能没病😂 —————————————— 懦夫,不敢露脸 —————————————— 只有公费和少劳多得的钱会被铺张浪费 —————————————— 没了外网我什么也不是(没了资源我什么也不是 本来智能就是靠数据去堆(训练 专制政府把我们的下载速度降到几k一秒 本质上就是希望我们都变成笨蛋 —————————————— 以前一直纠结周杰伦的 范特西 是什么意思 最近有一天突然明白了:fantasy —————————————— 精神病也需要听歌 —————————————— http://music.163.com/song/19292984/?userid=280429778 (来自@网易云音乐) —————————————— 穷人做不了硬件:没钱买元件 富人做不了软件:有钱买服务 —————————————— 我突然觉得大学的考试是个笑话(一个努力学习一个学期的人和努力作弊2、3天的人 没差几分) 以后谁也别让我考 60 sbit pin1_0 = P1^0; //define pin 1.0 void main() { pin1_0 = 1; //write or read, it depends on you } —————————————— 哦,还早呢 英语可以提升 —————————————— 怎么? 想来南铁上学? —————————————— 不是校园网,没有ip6 是联通网 —————————————— 有 但我用了一个月就关了 禁ss、v2ray,超出两台设备连接就断网,还必须在宿舍才能连 在教室有教室专用的网 都要收费、都很贵 —————————————— 好在最后有结果 —————————————— Thanks a lot —————————————— I don't get it Why suddenly came so many people It's doesn't make sense —————————————— 我必须压制我的头脑去记忆新东西 不然很快把学校的东西忘完后就得挂科 这样对身心很不健康,没法体验巅峰(快速学习)状态 —————————————— hi there —————————————— 只要不吵,比如图书馆或空教室或家里 一呆就是一整天 写代码超有成就感和完全的逻辑性与可操作性 —————————————— 大佬 考研和编程有什么关系?😳 —————————————— If you are good in English 网上资源一大把 —————————————— 编程和考试没什么关系 我学完了高数照样做不了高考理科数学的应用题 —————————————— 我不管分不分工作 我只管我三年时间有没有白费 要是什么本领都没有学到,分下来工作,过几年一改革、市场化也得给辞退了 再说我更喜欢编程化的学习方式,也就是随时随地可以用我的笔记本电脑写笔记、查资料 这个学校或者说国内的大学竟然不允许上课用电脑 连晚自习戴防噪耳机都不行(然而教室吵成一锅粥也不管,学生会部长前脚一走,后脚就闹得起飞(应该在教室安装噪声检测器,超过阀值就扣分)) 我强烈怀疑我进了一个高中 —————————————— 我觉得学校上晚自习简直是浪费生命 太吵了 还不如让谈恋爱的、聊天的 去外面狂热的做事 留我等傻子静静地学习 —————————————— 最后吐槽一下 C没有class的概念 项目大了写着好困难 同时垃圾 Arduino 还不支持在一个文件夹放n个c文件互相调用 想专业化重构工程都不行😒 —————————————— https://github.com/yingshaoxo/driver/blob/current/driver.ino 1. 为了做这个我快拼了老命 2. 这个配套的传感器是垃圾,还不如淘宝几块钱的东西 3. 官方一个灰度传感器卖200(垃圾比赛不允许用三方零件) 4. 学校还不太愿意批钱 5. 傻逼吧,传感器都不够还敢参加比赛(本来要3个灰度传感器才能识别黑线,现在两组平分下来只有2个「黑脸」) —————————————— 难是省略太多步骤 复杂是有太多步骤 —————————————— 每天都过着苦逼的写笔记生活: https://yingshaoxo.gitbooks.io/university-notes/content/dc-stable-source-circuit-de-fen-xi-yu-ying-yong/zheng-liu-lv-bo-dian-lu-de-fen-xi-yu-ying-yong/rectifier-circuit.html —————————————— https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist/#0 —————————————— 我的真实意思是 我学的专业和非网络世界遇到的人 比我学到的、接触到的新世界落后了三个时代 —————————————— AI definitely will change the art creating process. https://youtu.be/6KHSPiYlZ-U So stop doing art creating, learning ML instead. —————————————— 留恋一张图书馆的coding好环境 —————————————— 你说我会不会死掉 还是每科都好好学吧 —————————————— https://ai.google/education#?modal_active=none Let's go —————————————— I don't know, maybe just try all different thing and find the better one. https://developers.google.com/machine-learning/crash-course/ml-intro —————————————— 感觉又回到了原始社会 隔壁一群傻逼的感觉 深夜玩游戏扰民 —————————————— I have heard 世界科技潮流是这样的: 计算机⇉网络⇉智能手机⇉AI(人工智能) —————————————— 这可能是唯一一次站在世界潮流之巅的机会了 上次智能手机的潮流我没赶上😭 —————————————— https://youtu.be/I74ymkoNTnw 决定了 在保证服务器程序运行的情况下 专心学习ML在接下来的一个学期 —————————————— 成为伟大的人物,克服的就是大人心理 你不能像大人一样畏首畏尾,没有一件事是蜻蜓点水能出成绩的 不下定决心在某一职业深耕,怎能有所建树? 怕付出是没用的,不能因为想保存以前付出得到的东西就停止付出 物质守恒定律规定了必须有付出才有回报 哪怕赌上变老的代价,(你不付出也会变老,时光不能倒流 这时小孩心理就出来帮你了:你还年轻就什么也不怕 —————————————— 我这个年纪,是决定方向的时候 需要从能做的事中选一个出来,成为未来的方向 急躁、不知所措、自不量力都会出现在这个时刻 最终哪项事业能让你踏实做下去,那就是你的路 Keep confidence in yourself. —————————————— 大部分人从来没有【明确】地设定自己的发展目标,每天都是得过且过。等到几年过去了,才发现自己这些年啥也没学会,还是老样子,然后就感叹时光飞逝、岁月如梭。 —————————————— 在聊天中学习 —————————————— 最强机器人 —————————————— 大学就是一个垃圾聚集场 但这里也是社会模拟场 这里有的只是不择手段,达成目的罢了(作弊、摇尾讨好) 所以我努力的重心还应该是不在意垃圾们的目光,去出其不意地想出解决方法,提升自己 随波逐流还不如现在就去跳河 —————————————— 最后我没用CAD绘图,我用 latex 的电路插件 渲染电路图 —————————————— 人生如此多娇,专业课学得想吐,关键是没英文资料(资源) https://yingshaoxo.gitbooks.io/university-notes/content/electrical-engineering/response/yi-jie-dian-lu-de-quan-xiang-ying.html —————————————— Girlfriend could be your best friend, even if you and she didn't share a same interesting. When you feel sad, she's there waiting for you When you get tired, she's there waiting for you When your faith almost crash down, she's there waiting for you It's not about what she can do for you, it's about what you and she can do for each other. When you get inside a relationship, you are not just being alone anymore, you and she's fate probably already been connected. —————————————— When you failed, dried, tired, and can't figure out the answer of a problem, all you need to do is: sleep. Try to do it again after you waken up. If still can't find the answer, maybe Google or your friends will help you. —————————————— 肯定没人告诉你世界上有个手机系统叫做 LineageOS —————————————— 在图书馆遇到美女的可能性比教室大多了😂 —————————————— 图书馆才是学习睡觉写代码的好地方 没有傻逼的干扰,学得好睡得着 —————————————— 这个群 isn't official, so I can say whatever I wanna say. —————————————— 。。。 越正式,越害怕讲话 讲出来的东西牵扯多方利益 所以多数人保持沉默 —————————————— There are no one career is easy. —————————————— 只有一线城市才有开发者群体 —————————————— 行,👍 —————————————— 学长 你目前在哪儿工作啊? —————————————— 要想批量维护只需把局域网架起来,所有系统基于Linux,然后Virtualbox所有操作都可以用命令行实现 —————————————— 刚从学校官网看到这个,学校是不是疯了,5万买一个虚拟机 Virtualbox不是免费的吗? —————————————— CAD Computer-aided design (CAD), is the use of computer systems to assist in the creation, modification, analysis, or optimization of a design. CAD software is used to increase the productivity of the designer, improve the quality of design, improve communications through documentation, and to create a database for manufacturing.  这样看来 CAD 有不同种类,我得选一个Lubuntu能用的,画电路图玩(做展示) —————————————— 观江苏省大学生机器人大赛有感: 清一色幼儿图形编程是什么鬼?😂 —————————————— 事实是这样的 学校绑定学号的联通手机卡如果欠费了,送的无线账号将不被允许登录 与学号绑定的城市热点费用如不足,有线网络也不被允许登录 —————————————— 最后网管一生气把关于我学号的上网账号全删了…😂 —————————————— 我是临时被拉参加了一个江苏省书法机器人比赛 感慨多 —————————————— 然后实验室还特别吵 科研环境不应该很安静吗 —————————————— 假设比赛准备时间是一个月 他们可以先玩3周 然后拖一个人来工作,工作方式很简单,你一直待在那里,呆着 也不让你休息 中间还有个别2b老师来帮倒忙和装逼 你唯一的有价值的工作还是去实验室之前在寝室完成的🌚 —————————————— 我指搞竞赛的 —————————————— 有设备仍然是一群SB 还他妈让我累得像一条狗 作业没做、英语没念、网课没看 —————————————— 学校网管还是挺厉害的 又封端口又封ip I mean, have no effect to me. —————————————— 应该不在吧 看体育老师都比较年轻 —————————————— 不知道,大一上基础课,没见到专业老师 —————————————— 也只有学通信的才能到这里啦😁 —————————————— 不是,我非本地人 不能去地铁 我在等国铁 —————————————— 通信技术二级学院 铁道通信与信息化技术 —————————————— 学长好 我是新生 —————————————— 😏 —————————————— 大学虽然累,但有个好处 不会遇到SB的老师(我指被专制主义完全洗脑的一心想充当权威而不是服务学生的顽固分子) —————————————— Firstly I wanna say, all of you guys, including me, are garbage. https://github.com/yingshaoxo/Nanjing_Institute_of_Railway_AutoLogin —————————————— After that, we can going further. —————————————— Just wait, there must have more people leaving. —————————————— 最近几天差得严 所以我临时开了第二台server换着用 —————————————— 未来的路,我没想好,做网络架构,还是搞linux运维,还是搞前端开发呢? 以后再决定了,也许fullstack可以成为一个我的目标~,引用《纪实72小时》里的一句话“规划好的人生,太没意思了。” https://sakarahiroya.github.io/blog/#/post/你好大学/ —————————————— v2ray —————————————— 自己搭 —————————————— 从接下来的思修课学到:不学历史的政治学家都是SB. 也不能怪它们→政党思想的宣传工具罢了,虽然讲的东西对我们这些人来说毫无意义。 —————————————— 从思修课学到: 文科的精髓在于骗人,即如何行动能让人以为 我在为他谋福利,实际上是为自己汲取利益。 —————————————— PING 45.76.13.58 (45.76.13.58) 56(84) bytes of data. From 112.80.105.200 icmp_seq=1 Destination Host Unreachable From 112.80.105.200 icmp_seq=2 Destination Host Unreachable From 112.80.105.200 icmp_seq=3 Destination Host Unreachable From 112.80.105.200 icmp_seq=4 Destination Host Unreachable ^C --- 45.76.13.58 ping statistics --- 13 packets transmitted, 0 received, +4 errors, 100% packet loss, time 12148ms pipe 9 It indeed somehow stopped my SS connection in school network, but this is just a fight, and I'll win no matter what. —————————————— 等我连上有线网再说,昨天开户时管理员把我密码输错了,我现在连不上 目前校园联通营业厅还没人的,改不了密码 —————————————— 有可能食堂那些地方是有检测SS 目前宿舍还好 不过校园网坑啊 —————————————— ? —————————————— http://www.neea.edu.cn/html1/folder/1607/298-1.htm 恩,4级报名没有江苏,计算机考试没看到 —————————————— 有组队考证书的吗? 四六级、计算机等等 感觉这个学校不会成为考场,所以我们需要去其他学校考试 —————————————— 早知道校园网这么坑,暑假的时候就应该研究下卫星上网或准备好免流的工具链(目前插卡手机就一个iPhone 4s,别说免流了,就是正常开热点电池都不够用) —————————————— 不,正常的无线路由 —————————————— 我以前的高中是别人捐赠的路由器和带宽 —————————————— 不够不够,离出国还有一段(很长的)距离 —————————————— 本来打算花几天时间(军训晚自习)把本专业书籍大概看一遍 结果新生在图书馆借不了书 —————————————— 我只是在思考那些教计算机或网络信息技术的老师会翻墙并刚好用 telegram 的可能性😏 —————————————— 如果我在本群明目张胆地指出这个学校的缺点,被管理层知道了会不会给我处分啊?[害怕]😅 (干啥呀!有问题还不让人说啦?) —————————————— If the school don't allow you using electrical plug all day, then you can't put a local server or PC or wireless router in your school bedroom. —————————————— The training under the sun is hard. —————————————— 吐槽,8号去进不了宿舍,害我花50元改签9号 —————————————— 你是什么专业? —————————————— Right, 就要开学了 —————————————— 下载后,发现要走很远,加上那么渣的UI设计(我都不会玩) 就卸载了 —————————————— 因为我想看看这个学校有多少志同道合的 geek. 不然我连一个说话(讨论)的对象都没了 —————————————— 事实上,之前打算卸了QQ上大学 突然发现又TM有专制班级QQ群 生气又无可奈何啊 —————————————— Great then. —————————————— I'm a new baby of this school. I thought someone could take me flying. —————————————— 表示不想说中文,Do you understand? —————————————— 把妹技术一流 —————————————— 厉害了 —————————————— 欢迎,介绍一下你自己呗 —————————————— 南京铁道职业技术学院铁道通信与信息化技术专业学员接受贺电😂