Why MIT now uses python instead of scheme for it's intro to comp sci (2009)
This week, I find myself lucky enough to be at the International Lisp Conference at MIT in Cambridge, MA. I won’t get into why I’m here right now, for those of you who might be surprised. The purpose...
View ArticleGet an empty file when served by django
I have the following code for managing file download through django. def serve_file(request, id): file = models.X.objects.get(id=id).file #FileField file.open('rb') wrapper = FileWrapper(file) mt =...
View ArticlePython can not parse date with Regex
I have a program in which the user can enter a string and have the date in the string. I am using RegEx to match \d+\/\d+\/\d+ to extract the date from the string but for some reason in my test case,...
View Article圣诞前夕X-MAS CTF一道有趣的web+pwn
0x001 前言 最近空下来,做了一下X-MAS CTF的pwn题,题目质量很好,期间遇到一道web+pwn花了不少时间,主要从子进程调试、socket通信方面详细讨论如何解决这类基于socket服务的pwn题。 题目下载: 链接: https://pan.baidu.com/s/1G4L-B1rSydLRCJ-9Zcy9Ug 密码:wsxd 0x002 分析...
View ArticleA year of almost blogging
2019 is around the corner and I am looking at how many blog posts I wrote this year and the number is a resounding zero. On the other hand, looking in my drafts folder, I see quite a few posts in...
View Article人工智能时代,我用Python写了一个智能机器人来聊天,非常不错!
人工智能已是趋势,智能酒店,智能网吧,无人驾驶等等都已经实现,过不了多久,就会普及我们的生活圈子;同样,智能时代的来临意味着很多人将会面临失业。我们要跟着时代的发展前进,这样,我们才不会被时代所抛弃,所淘汰! 而作为人工智能的首选语言――python 将会是我们学习的首选目标;有人说过一句话: 在近后的社会中,不会python的人将会被列为新“文盲”!...
View Article让普通视频变成慢动作:「AI加帧」技术现已开源
今年 6 月份,英伟达发布了一篇生成高质量慢动作视频的论文――《Super SloMo: High Quality Estimation of Multiple Intermediate Frames for Video Interpolation》,探讨了如何将普通设备录制的视频转换为高帧率慢动作视频。这项工作的原理是在临近的两帧之间补充额外的画面帧。让我们先来看一下效果: 额......
View ArticlePython Sandboxie Escape 沙盒绕过
前言 在 SSTI 服务端模版注入中,已经接触到了python沙箱逃逸的方法。其命令执行本质上可以理解为一种沙箱绕过,它和Python沙箱绕过的方法是通用的。 Python沙箱...
View ArticlePython基础知识大全:集合用法、文件操作、字符编码转换、函数
人工智能时代,该学学python了! 既然确定学习Python了,那么就要一步一步从基础开始学习嘛~! 下面我们来看看基础知识 集合(Set)及其函数 集合是一个无序的、无重复元素的序列。 list={1,3,6,5,7,9,11,3,7}#定义集合方式一 list1=set([1,3,6,5,7,9,11,3,7])#定义集合方式二 list2=set()#定义一个空集合...
View ArticlePython WEB应用部署
https://www.cnblogs.com/wspblog/p/8575101.html#_label0 使用Apache模块mod_wsgi运行python WSGI应用 Flask应用是基于WSGI规范的,所以它可以运行在任何一个支持WSGI协议的Web应用服务器中,最常用的就是 Apache+mod_wsgi 的方式...
View ArticleCompact, Streaming Pretty-Printing of Hierarchical Data
Automatic Binary Serialization in uPickle 0.7 Pretty-printing hierarchical data into a human-readable form is a common thing to do. While a computer doesn't care exactly how you format the same...
View Article春运渡劫?Python帮你12306抢回家的火车票
前言 年味越来越淡,但我对过年的期待一直没变。为了理想,离开家乡。这一路,背上行囊,穿过人潮,千里迢迢。疲惫也好,激动也罢,总有家乡值得牵挂。...
View ArticleCentos部署 django 服务 nginx uwsgi
1.安装python3 yum -y install wget gcc make zlib-devel readline-devel bzip2-devel ncurses-devel sqlite-devel gdbm-devel xz-devel tk-devel openssl-devel wget...
View ArticleImagePy――UI界面支持开放插件的Python开源图像处理框架
雷锋网 AI 科技评论按,ImagePy 是一款 python 开源图像处理框架,其 UI 界面支持开放插件。在 github: https://github.com/Image-Py/imagepy 上,不仅有关于这款图像处理软件的详细介绍,还有一些使用示例,雷锋网 (公众号:雷锋网) AI 科技评论接下来将详细介绍这一开源图像处理框架。 ImagePy 是一款基于 imagej...
View Article只会Python可造不出iPhone
python正成为计算机领域的红人,它的走红不仅仅因为它的简易语言设计和各种方便的调用包,还与各种培训课程中的营销般的吹捧不无关系。 在这些热文的叙述中,似乎学会Python,就能搞定一切计算机难题了。对于这种普及类编程工具和课程,今天的文章可能可以带来一些不一样的看法。 这篇文章的作者Bhavya...
View Articlecodeforces April fool contest 2018
提示:这篇文章的主题是code-golf(即写出尽可能短的代码),使用的语言是python 2。这篇文章含有cf April Fool contest 2018的剧透。 (除草。。还没更完,看心情更。。 B. A Map of the Cat python3好像不用flush,所以用了python3。第一发107B,只排到了第四...
View ArticleGeek Deals: DRM-Free STEM Books Starting at $1
If you’re ready to start the new year out on the right foot, this Humble Book Bundle is a fantastic way to learn. Jump in for as little as a buck, and your 2019 can be filled with new skills. Humble...
View ArticleTo all Data Scientists The one Graph Algorithm you need to know
Graphs provide us with a very useful data structure. They can help us to find structure within our data. With the advent of Machine learning and big data we need to get as much information as possible...
View ArticleLearn Python for Data Science from Scratch
Why python? Python is a multipurpose programming language and widely used for Data Science, which is termed as the sexiest job of this century. Data Scientist mine thru the large dataset to gain...
View ArticleList of nested predicates
Advanced sorting criteria for a list of nested tuples I have a list of nested tuples of the form: [(a, (b, c)), ...] Now I would like to pick the element which maximizes a while minimizing b and c at...
View Article