This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#!/usr/bin/python | |
# | |
#simple app to read string from serial port | |
#and publish via MQTT | |
# | |
#uses the Python MQTT client from the Mosquitto project | |
#http://mosquitto.org | |
# | |
#Andy Piper http://andypiper.co.uk | |
#2011/09/15 |
#Stack Overflow scraper script | |
#imports necessary modules | |
from urllib2 import urlopen | |
from BeautifulSoup import BeautifulSoup | |
import time | |
username = raw_input("Username: ") |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/usr/bin/env python | |
import sys | |
import csv | |
def MeanAveragePrecision(valid_filename, attempt_filename, at=10): | |
at = int(at) | |
valid = dict() | |
for line in csv.DictReader(open(valid_filename,'r')): | |
valid.setdefault(line['source_node'],set()).update(line['destination_nodes'].split(" ")) |
# Add these two gems | |
gem 'ice_cube', '0.9.3' | |
gem 'squeel', '1.0.16' |
-- Example Data | |
DROP TABLE Employees; | |
DROP TABLE Departments; | |
CREATE TABLE Departments(DepartmentID INTEGER PRIMARY KEY, Name VARCHAR); | |
CREATE TABLE Employees(EmployeeID INTEGER PRIMARY KEY, DepartmentID INTEGER, BossID INTEGER, Name VARCHAR, Salary INTEGER); | |
ALTER TABLE Employees ADD FOREIGN KEY (BossID) REFERENCES Employees(EmployeeID); | |
ALTER TABLE Employees ADD FOREIGN KEY (DepartmentID) REFERENCES Departments(DepartmentID); |
Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.
If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j