Skip to content

Instantly share code, notes, and snippets.

View pipoa
#!/bin/bash
set -ex
pip_args=${@:-"--help"}
apk add --no-cache \
--virtual .build-deps \
gcc \
g++ \
make \
@roadsideseb
roadsideseb / async_schedule.py
Last active May 13, 2021
A slightly modified version of the 'schedule' Python package that works with asyncio 😎
View async_schedule.py
import emoji
import schedule
import asyncio
import inspect
from datetime import datetime
class Job(schedule.Job):
@roadsideseb
roadsideseb / 01 🐍 load testing with gatling.md
Last active Jan 12, 2017
Load testing Python web apps with Gatling
View 01 🐍 load testing with gatling.md

Results

These results are generated by a gatling simulation that ramps 100 user over 10 second and then keeps the users constant at that rate for 60 seconds before ramping again by 100 users. The entire scenario runs from 0 to 1000 users.

Flask

@roadsideseb
roadsideseb / python_job_sites.md
Last active Apr 4, 2018
Job sites for Django and Python developers
View python_job_sites.md
@roadsideseb
roadsideseb / pyvideo_speaker_classification.ipynb
Last active Dec 12, 2016
Classification of Python conferences by men and women speaker based on pyvideo.org data
View pyvideo_speaker_classification.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roadsideseb
roadsideseb / auto_install_dmg.sh
Last active Nov 10, 2016
Various ways to install packages on OSX
View auto_install_dmg.sh
#!/bin/bash
#
# Install an application or library that uses a PKG installer
# wrapped inside a DMG archive. Takes the URL of the DMG and
# optionally the name of the downloaded file locally.
#
# ./auto_install_dmg.sh https://example.com/software/download/super_genius_tool_v1.2.dmg
set -uxe
download_url=${1:-"https://google.com/"}
@roadsideseb
roadsideseb / py27_package_with_init.md
Last active Dec 9, 2016
Subtle difference between packages
View py27_package_with_init.md

Subtle differences in loading packages

PEP-420 is explaining the differences between regular packages and namespace packages: https://www.python.org/dev/peps/pep-0420/

Python 2.7

A package with a __init__.py:

my
View beer_fridge_trust.md

The Rules of the Beer Fridge Trust

Rule #1

The beer frigde is a trust-based organism that will die if the trust is not nurtured.

Rule #2

Beer in the fridge is fair game to every member of the trust, unless explicitly labeled.

Rule #3

View Carsharing_Vancouver.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roadsideseb
roadsideseb / Makefile
Last active Jan 26, 2016
Deploying image to tutum.
View Makefile
.PHONY: deploy build static-upload
SHELL := /bin/bash
base_image := elbaschid/python-base
builder_image := elbaschid/django-builder
tester_image := elbaschid/django-tester
image := tutum.co/elbaschid/love-fear
image_version := $(shell python deployer.py bump_version)