Skip to content

Instantly share code, notes, and snippets.

View monajalal's full-sized avatar
🎯
Focusing

Mona Jalal monajalal

🎯
Focusing
View GitHub Profile
@atduskgreg
atduskgreg / hand_and_angle.pde
Created November 14, 2011 15:40
hand tracking with center point and angle kinect
import SimpleOpenNI.*;
SimpleOpenNI kinect;
void setup() {
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
// turn on user tracking
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);
kinect.setMirror(true);
@sole
sole / compile_ffmpeg.sh
Created January 18, 2012 08:57
Get an updated, 64-bit FFMPEG in your Mac Os X Lion computer
#!/bin/bash
# Thanks to Martin Los for his guide: http://www.martinlos.com/?p=41
URLS=("http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.3.tar.gz" "http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz" "http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz")
for i in "${URLS[@]}"
do
echo $i
curl -O -L $i
@batok
batok / paramiko_example.py
Created April 10, 2012 16:11
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )
OS=`echo \`uname\` | tr '[:upper:]' '[:lower:]'`
AURL="https://gist.githubusercontent.com/hightemp/5071909/raw/"
ANAME=".bash_aliases"
TMPAPATH="/tmp/$ANAME"
HOMEAPATH="~/$ANAME"
[ "$OS" = "windowsnt" ] && OS_WIN="yes"
[ "$OS" = "darwin" ] && OS_MAC="yes"
[ "$OS" = "linux" ] && OS_LIN="yes"
@MrFlick
MrFlick / elements.txt
Last active August 29, 2015 14:17
Periodic Table
# from the sample data included with http://www.ucancode.net/Visual_C_Control/Draw-table-shape-vc-example-periodic.htm
"AtomicNumber","AtomicWeight","GroupNumber","GroupName","Period","Block","CASRegistryID","ElementName","ElementSymbol","DiscoveryDate","DiscovererName","Row","Column"
1,1.00,5,"Non-metals","1","s-block","1333-74-0","Hydrogen","H","1766","Henry Cavendish",1,1
2,0.00,4,"Noble gases",,,,"Helium","He",,,1,18
3,0.00,0,"Alkali earth",,,,"Lithium","Li",,,2,1
4,0.00,1,"Alkaline earth",,,,"Beryllium","Be",,,2,2
5,0.00,3,"Metalloids",,,,"Boron","B",,,2,13
6,0.00,5,"Non-metals",,,,"Carbon","C",,,2,14
7,0.00,5,"Non-metals",,,,"Nitrogen","N",,,2,15
8,0.00,5,"Non-metals",,,,"Oxygen","O",,,2,16
JavaScript resources, all free online. They're ordered in diffuculty from top to bottom.
http://jsforcats.com/
https://www.youtube.com/playlist?list=PLeL6uTxQ-uX_5BpOb2FDNgG6SxjCs59Kv
https://www.youtube.com/watch?v=hQVTIJBZook
https://www.khanacademy.org/computing/computer-science/algorithms
http://speakingjs.com/es5/index.html
http://eloquentjavascript.net/index.html
http://superherojs.com/
https://www.youtube.com/watch?v=8aGhZQkoFbQ
2015-01-28 15:33:30 dimadima anyone here edit java with vim?
2015-01-28 15:33:37 surial dimadima: only complete blithering idiots.
2015-01-28 15:33:45 dimadima hmm
2015-01-28 15:33:56 surial vim is a great editor, but it's not intelligent, and java is a language that is extremely suitable to intelligent editing.
2015-01-28 15:34:04 surial In fact, you could go so far as to say that you NEED it to keep your sanity.
2015-01-28 15:34:06 dimadima i edit java with vim and i'm enjoying it well enough so far
2015-01-28 15:34:14 dimadima my one problem is that syntax highlighting
2015-01-28 15:34:17 freeone3000 Java IDEs are intelligent so Java developers don't have to be.
2015-01-28 15:34:27 freeone3000 dimadima: That's the one thing vim *does* do for Java code.
2015-01-28 15:34:27 surial dimadima: have you _used_ an intelligent editor?
/*
Basic MQTT example with Authentication
How to send MQTT data to IBM Bluemix from Intel Edison via Arduino.
by Rex St. John
*/
#include <SPI.h>
#include <WiFi.h>
@vasanthk
vasanthk / System Design.md
Last active July 24, 2024 07:54
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?
'''Functional Keras is a more functional replacement for the Graph API.
'''
###################
# 2 LSTM branches #
###################
a = Input(input_shape=(10, 32)) # output is a TF/TH placeholder, augmented with Keras attributes
b = Input(input_shape=(10, 32))
encoded_a = LSTM(32)(a) # output is a TF/TH tensor
encoded_b = LSTM(32)(b)