Setting up dev environment for SciPy

Hi everyone! 👋

I got an email from someone pretty recently who wanted to setup a dev environment for SciPy. He had made changes to the source code of SciPy and now wanted to test if his changes were working or not. He had gotten so far without actually testing the code. In this post I will share details on how to setup a dev environment the right way. I will focus mainly on Mac OS. Continue reading Setting up dev environment for SciPy

Advertisements

Speeding up Python code using multithreading

Hi lovely people! 👋 A lot of times we end up writing code in Python which does remote requests or reads multiple files or does processing on some data. And in a lot of those cases I have seen programmers using a simple for loop which takes forever to finish executing. For example: Continue reading Speeding up Python code using multithreading

Running Python in the Browser

Running Python in the web browser has been getting a lot of attention lately. Shaun Taylor-Morgan knows what he’s talking about here – he works for Anvil, a full-featured application platform for writing full-stack web apps with nothing but Python. So I invited him to give us an overview and comparison of the open-source solutions for running Python code in your web browser.

Continue reading Running Python in the Browser

Python dis module and constant folding

Hi people! Recently, I was super confused when I found out that:

>>> pow(3,89)

runs slower than:

>>> 3**89

I tried to think of a suitable answer but couldn’t find any. I timed the execution of both of these statements using the timeit module in Python3:

Continue reading Python dis module and constant folding

Sending & Sniffing WLAN Beacon Frames using Scapy

Hi everyone! Over the summers I did research on Wi-Fi and part of my research involved sending and receiving different kinds of IEEE 802.11 packets. I did most of this stuff using Scapy so I thought why not create a tutorial about it? When I started my research I had to look through multiple online articles/tutorials in order to get started with Scapy. In order to save you time I am going to bring you up-to speed by running you through a short tutorial. Continue reading Sending & Sniffing WLAN Beacon Frames using Scapy

Practical Python Projects Book

Hi everyone! I am super proud to announce that my second book 🎉🎉Practical Python Projects🎉🎉 is alhamdulillah almost halfway done content-wise. This book is a direct result of a market gap which I found when I started programming a couple of years back. Most programming beginners have access to multiple resources to teach themselves the basics of Python (or any other language) but they don’t have access to those books/tutorials where they are taught to create end-to-end projects in a specific language. A fair amount of online tutorials and beginner textbooks teach the reader only the basics of a language without real-life concrete project development.

Continue reading Practical Python Projects Book

A FIFA 2018 World Cup SMS bot using Twilio, Heroku and Flask

Hi everyone! I am back with yet another tutorial. Its World Cup season and every other person is rooting for his/her favorite team. I was thinking about the next blog post idea and I thought why not create a project which can help you stay updated with how the world cup is progressing? And along the way, I might be able to teach myself (and you) something new. The end product is this tutorial. The project we are going to be developing is a Twilio application, hosted on Heroku. It is a chat (SMS) bot or sorts. You will be able to send various special messages to this bot and it will respond with the latest World cup updates. Continue reading A FIFA 2018 World Cup SMS bot using Twilio, Heroku and Flask