Commands to get commit statistics for a Git repository from the command line -
using git log
, git shortlog
and friends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Handy Python functions written by Andrey Petrov (shazow). I release this code | |
under public domain. (Attribution is optional but appreciated.) | |
Approximate changelog (according to https://gist.github.com/603374): | |
2011-05-05 | |
- I made a proper github repo out of this: | |
https://github.com/shazow/unstdlib.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to use ART to compile arm oat files on the host: | |
# - Get source code according to https://source.android.com/source/downloading.html | |
# - source build/envsetup.sh | |
# - mm build-art | |
# - Use this script in the source root directory to compile APKs | |
CWD=`pwd` | |
export ANDROID_DATA="${CWD}/out/host/datadir/dalvik-cache/x86_64" | |
export ANDROID_ROOT="${CWD}/out/host/linux-x86" | |
BOOT_IMAGE="${CWD}/out/host/linux-x86/framework/core.art" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# How to use ART to compile arm oat files on the host: | |
# - Get source code according to https://source.android.com/source/downloading.html | |
# - source build/envsetup.sh | |
# - mm build-art | |
# - Build the full android image for aosp_arm-eng | |
# (Follow the directions at https://source.android.com/source/building.html) | |
# - Use this script in the source root directory to compile APKs | |
CWD=`pwd` | |
export ANDROID_DATA="${CWD}/out/host/datadir/dalvik-cache/x86_64" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Description of VideoStream | |
* | |
* @author Rana | |
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
*/ | |
class VideoStream | |
{ | |
private $path = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from z3 import * | |
import struct | |
# calculate e,f,d for a given input password | |
def calc(m): | |
e = 0 | |
f = 0 | |
d = 0 | |
for i in xrange(0, len(m)): | |
c = ord(m[i]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRCDIR = src | |
HDRDIR = headers | |
OBJDIR = obj | |
BINDIR = bin | |
DEPDIR = dep | |
DATDIR = data | |
CC = gcc | |
TARGET = sorting | |
CFLAGS = -Wall -Wextra -pedantic -g -O0 -I$(HDRDIR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Strip C comments | |
# by Stewart Ravenhall <[email protected]> -- 4 October 2000 | |
# Un-Korn-ized by Paolo Bonzini <[email protected]> -- 24 November 2000 | |
# Strip everything between /* and */ inclusive | |
# Copes with multi-line comments, | |
# disassociated end comment symbols, | |
# disassociated start comment symbols, | |
# multiple comments per line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' listing 6: pi_mp.py | |
Multiprocessing based code to estimate the value of PI | |
using monte carlo sampling | |
Ref: http://math.fullerton.edu/mathews/n2003/montecarlopimod.html | |
Uses workers: | |
http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool | |
''' | |
import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import time | |
import threading | |
import SocketServer | |
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler): | |
def handle(self): | |
data = open("file", "r").readlines() | |
for line in data: |