Skip to content

Instantly share code, notes, and snippets.

View mr-eyes's full-sized avatar
🦆

Mohamed Abuelanin mr-eyes

🦆
View GitHub Profile
@cessor
cessor / pympstore.py
Created November 11, 2017 09:14
Multiprocessing & Sqlite Example
import sqlite3
import multiprocessing
'''
This program starts a daemon process that listens on a queue.
It then starts 10 processes that place integers in the queue.
The listening daemon pulls the integers out of the queue and
stores them in the database.
'''
DB_FILENAME = 'db.sqlite'
@tonyseek
tonyseek / README.rst
Last active November 5, 2022 15:20
Build Python binding of C++ library with cffi (PyPy/Py3K compatible)

Run with Python:

pip-2.7 install cffi
PYTHON=python2.7 sh go.sh

Run with PyPy:

pip-pypy install cffi
PYTHON=pypy sh go.sh
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active May 12, 2024 11:19
How to use Pelican on GitHub Pages
@sehe
sehe / Makefile
Last active April 17, 2020 21:41
C++ version of reverse-complement
all: cpp-version c-version alioth
CPPFLAGS+=-g -O3
CPPFLAGS+=-march=native
# LDFLAGS+=-ltcmalloc
CXXFLAGS+=$(CPPFLAGS) -std=c++0x
LDFLAGS+=-lpthread
# CXX=clang++
@GerHobbelt
GerHobbelt / .gitignore
Created July 8, 2012 14:41
d3.js: force layout; click to group/bundle nodes
# Editor backup files
*.bak
*~
@kvorion
kvorion / naivebayes.py
Created December 7, 2010 03:34
naive bayes implementation
#Author: Krishnamurthy Koduvayur Viswanathan
from __future__ import division
import collections
import math
class Model:
def __init__(self, arffFile):
self.trainingFile = arffFile
self.features = {} #all feature names and their possible values (including the class label)