Category: Python

  • Mathematical modeling of fake news

    I took Mathematical Modelling Basics course during the last couple of months. It was produced by Delft University of Technology, offered for free on edX. Thanks TUDelft and edX! It is a great course introducing mathematical modeling. I like the fact in this short course, 3 important areas are covered with good practices: mathematics, computer […]

  • fail2ban installation and configuration notes

    A couple of days ago one web site I volunteer to manage was under DDOS attack. I installed and configured fail2ban to protect us from future similar attacks. Here are some notes. The server is the RedHat/Fedora/CentOS variety, as you can tell from commands listed below. Please translate them to your distro’s corresponding commands as […]

  • Ubuntu更新、Python和R软件包安装、和Firefox下载插件演示

    视频演示: 1. 怎么更新Ubuntu Linux; sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential 2. 怎么安装Python包; sudo apt-get install python-pip sudo apt-get install python-dev sudo pip install numpy sudo pip install ggplot… 3. 怎么安装R和R包; sudo apt-get install r-base sudo apt-get install openjdk-7-jdk sudo R install.packages(“xlsx”) 4. 如何方便快捷下载视频: Firefox, 插件DownThemAll

  • Useful code snippet for Python list fold/reduce

    Going through one of the MOOC courses, I came across a homework problem that I solved with one of Python’s list reduce functions, any(), throwing in an interesting functional programming twist. I save it here for my own reference. I won’t mention which course this is, lest I give the answer away to one of […]

  • Managing Windows services with sysinternals tools and Python

    Below is the copy of the README file from one of my github repo. Feel free to download the code and play with it. If you have ideas and good Python Windows admin scripts, share them! — Working with Windows, one frequently needs to manage various services: finding their status, startup modes, startup accounts, stopping […]