Skip to content

Instantly share code, notes, and snippets.

View aalhour's full-sized avatar
🪂

Ahmad Alhour aalhour

🪂
View GitHub Profile
@sharmaeklavya2
sharmaeklavya2 / cp_syllabus.md
Last active May 29, 2025 17:01
Competitive Programming Syllabus

Competitive Programming Syllabus

Geometry

  • Problems - Refer the article for a list of problems which can be solved using Rotating Calipers technique.
@aalhour
aalhour / README.md
Last active March 9, 2018 09:19
BrainFuck Interpreter and REPL in Python 3

PBFI: Pythonic BrainFuck Interpreter

Yet another educational interpreter for the BrainFuck Programming Language, written in Python 3. This might not be the shortest BrainFuck interpreter that you had come acorss, however the style of programming is for educational purposes only.

USAGE:

Help:

@efraintorlo
efraintorlo / Django_Gunicorn_Nginx.makefile
Last active December 13, 2016 15:46
Django with Gunicorn + Nginx
SHELL := /bin/bash
#-----------------------------------------------
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _ | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
#
#-----------------------------------------------
# Makefile to use:
@lucasrcosta
lucasrcosta / tornado_handler_thread_decorator.py
Last active February 20, 2019 08:51
Tornado Handler Thread Decorator
from concurrent.futures import ThreadPoolExecutor
from datetime import timedelta
from tornado import gen
from tornado.concurrent import run_on_executor
THREADPOOL_MAX_WORKERS = 10
THREADPOOL_TIMEOUT_SECS = 30
def onthread(function):
@fideloper
fideloper / update_curl.sh
Last active January 11, 2024 15:23
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@vasanthk
vasanthk / System Design.md
Last active August 20, 2025 18:08
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@sumpfgottheit
sumpfgottheit / gunicorn.init.sh
Last active June 5, 2024 02:35
Gunicorn Init Script
#!/bin/sh
#
# gunicorn_pypiserver Startup script for gunicorn for
#
# chkconfig: - 86 14
# processname: gunicorn_pypiserver
# pidfile: /var/run/pypiserver.pid
# description: Python application server for pypiserver
#
### BEGIN INIT INFO
@jamtur01
jamtur01 / ladder.md
Last active August 20, 2025 19:17
Kickstarter Engineering Ladder
@hwperkins
hwperkins / parsing.py
Created September 27, 2015 22:50
Rich Wareham's "Toy Language Parser"
from enochi.lexing import TokenType
from enochi import astnodes
class ParseError(Exception):
def __init__(self, message, *tokens):
self.message = message
self.tokens = tokens