How to Build a Market Simulator Using Markov Chains and Python
How to Build a Market Simulator Using Markov Chains andpython Model customer behavior, visualize A/B test results, predict user metrics…all using a simple Markovian framework! final product In this...
View ArticleA Tale of Two Functions
In Which Ben Learns 1 Is The Loneliest Number So, my biggest shortcoming as a developer is my toolkit of algorithms at my fingertips by instinct. It's not that I'm not pretty familiar with the basics,...
View ArticleOptimize the Django ORM
Recently, I have been optimizing some functions that were slower than expected. As with most MVPs, the initial iteration was to get something working and out there. Looking at Scout APM revealed that...
View Articlecodingdirectional: Delete duplicate file with python program
In this article we will start to explore the technique which we will use to delete a duplicate file in our computer folder. The main objective in this chapter is to select a file in one folder and then...
View Article用Python来写MapReduce之Wordcount
前言 虽然Hadoop是用Java编写的一个框架, 但是并不意味着他只能使用Java语言来操作, 在Hadoop-0.14.1版本后, Hadoop支持了python和C++语言, 在 Hadoop的文档 中也表示可以使用Python进行开发, 通常来说都会考虑将源码打包成jar包再运行, 例子: PythonWordCount 这明显不方便. 在Hadoop的文档中提到了 Hadoop...
View ArticleAccess functions via Dictionary
I have a function like this: def abc(a,b): return a+b And I want to assign it to a dictionary like this: functions = {'abc': abc(a,b)} The trouble is, when assigning it to the dictionary, since the...
View ArticleZato Blog: Introducing Zato public API services
This article offers a high-level overview of the public services that Zato offers to users wishing to manage their environments in an API-driven manner in addition to web-admin and enmasse tools....
View ArticlePython 的枚举类型
起步 python 的原生类型中并不包含枚举类型。为了提供更好的解决方案,Python 通过 PEP 435 在 3.4 版本中添加了 enum 标准库。 枚举类型可以看作是一种标签或是一系列常量的集合,通常用于表示某些特定的有限集合,例如星期、月份、状态等。在没有专门提供枚举类型的时候我们是怎么做呢,一般就通过字典或类来实现: Color = { 'RED' : 1, 'GREEN': 2,...
View Article伯克利开源工具库 RLib 现已支持大规模多智能体强化学习
AI 前线导读:近日,UC 伯克利的研究团队 RISELab 在其 Github 的项目 Ray Rlib 0.6.0 中添加了面向多智能体强化学习(multi-agent Reinforcement Learning)的支持。本文由团队成员 Eric Liang 首发于 RISELab 团队主页,AI 前线翻译整理。本文主要是关于多智能体强化学习的简明教程,以及在 RLib 中的设计思路。...
View Article这个Python资源在GitHub上标星超8000,现在被翻译成了中文
最近,GitHub上一个关于python的工程完工了。 一个名为“暮晨”的贡献者,把一个非常有趣的Python项目,翻译成了中文版。 这个项目是《What the f*ck Python!》,专门介绍 Python 里面那些奇奇怪怪的语言坑。 关于项目 项目的主体构成部分就是示例,一共分为5个部分,分别是: Strain your brain!/大脑运动! Appearances are...
View ArticleList of three tuples to a dictionary from the list of lists
I need the first item in the each tuple to be the key that returns a list of lists of the corresponding items. For example... This is my input data: my_problem = [(1,20,400), (1,30,450), (2,40,525),...
View Articleangr学习笔记
前言 angr是一个基于符号执行和模拟执行的二进制框架,可以用在很多的场景,比如逆向分析,漏洞挖掘等。本文对他的学习做一个总结。 安装 这里介绍ubuntu下的安装,其他平台可以看 官方文档 首先安装一些依赖包 sudoapt-getinstallpython-devlibffi-devbuild-essentialvirtualenvwrapper 然后使用...
View ArticlePython 拓展之详解深拷贝和浅拷贝
首先我在这介绍两个新的小知识,要在下面用到。一个是函数 id() ,另一个是运算符 is。id() 函数就是返回对象的内存地址;is 是比较两个变量的对象引用是否指向同一个对象,在这里请不要和 == 混了,== 是比较两个变量的值是否相等。 >>> a = [1,2,3] >>> b = [1,2,3] >>> id(a) 38884552L...
View ArticleZ-Wave : Lessons Learned Python OpenZwave
This article explains a few missing pieces of the puzzle I had when setting up a home automation network using ZWave. Most of this information is available publicly but it took a while to find or to...
View ArticlePython Pandas Groupby Tutorial
In this Pandas group by we are going to learn how to organize Pandas dataframes by groups. More specifically, we are going to learn how to group by one and multiple columns. Furthermore, we are going...
View ArticleGet a date from a Django DateTimeField
I would like to request some assistance regarding this matter I am learning django and trying out some codes but I hit a brick wall at trying to get the date only from a model's DateTimeField here's...
View ArticleDataquest: An Intro to Deep Learning in Python
Deep learning is a type of machine learning that’s growing at an almost frightening pace. Nearly every projection has the deep learning industry expanding massively over the next decade. This market...
View Article创建第一个Tkinter图形界面|先生的Tkinter教程(1)
文章目录 一、为什么使用Tkinter而非PyQt 二、创建一个基本的Tkinter程序 一、为什么使用Tkinter而非PyQt 众所周知,在python中创建图形界面程序有很多种的选择,其中PyQt和wxPython都是很热门的模块包,这些第三方的图形界面模块功能强大、配置丰富,界面美观,是很多人的选择。...
View ArticleReal World CTF Magic Tunnel Write Up
赛时的时候没看这个题目,最后时间队友发现了点,但是苦于本地搭建不好环境以及没有时间就放弃了。 言归正传。 打开题目我们发现提供了一个Download功能,随便测试下,例如: http://www.venenof.com/1.gif 同时这里没有限制任何后缀,那么这意味着我们可以远程下载任意文件。 通过file协议我们可以读取任意文件,利用 file:///proc/mounts 可以找到web目录:...
View Articlegamingdirectional: Create the third level for this pygame project
In this article we are going to create the third level for our pygame project after we have created the previous two levels, the reason I create the third game level in this chapter is because this...
View Article