This file contains 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 java.awt.Robot; | |
import java.awt.event.KeyEvent; | |
public class TestRobot { | |
public static void main(String args[]) throws Exception { | |
Robot r = new Robot(); | |
int sleep = 500; | |
int i = 0; | |
for(;;) { | |
r.keyPress(KeyEvent.VK_SPACE); |
This file contains 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 java.io import File | |
from java.nio.file import Files | |
from java.nio.file import FileSystems | |
from java.nio.file.StandardWatchEventKinds import * | |
from java.nio.file.StandardCopyOption import * | |
from java.nio.file import Paths | |
source = '/source/file/path' | |
target = '/dest/file/path' |
This file contains 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
Summary of the links shared here: | |
http://blip.tv/clojure/michael-fogus-the-macronomicon-597023... | |
http://blog.fogus.me/2011/11/15/the-macronomicon-slides/ | |
http://boingboing.net/2011/12/28/linguistics-turing-complete... | |
http://businessofsoftware.org/2010/06/don-norman-at-business... | |
http://channel9.msdn.com/Events/GoingNative/GoingNative-2012... | |
http://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-R... | |
http://en.wikipedia.org/wiki/Leonard_Susskind | |
http://en.wikipedia.org/wiki/Sketchpad | |
http://en.wikipedia.org/wiki/The_Mother_of_All_Demos |
This file contains 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
#!/usr/bin/env python | |
import wx, time, webbrowser | |
import random | |
import urllib2 | |
import time | |
from threading import Thread | |
#https://readertray.googlecode.com/svn/trunk/lib/tools.py | |
from tools import file | |
This file contains 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
#Dependency: | |
#-libpebble with other required libs (e.g. lightblue etc) | |
#-py-vlcclient (https://github.com/DerMitch/py-vlcclient.git) | |
#it is assumed that pebble is already paired. | |
from vlcclient import VLCClient | |
import pebble as libpebble | |
import sys | |
import time |
This file contains 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
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\u@\h:\w\$(parse_git_branch) $ " |
This file contains 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
def large_sum(el): | |
class _helper: | |
large_pos = len(el) | |
current_pos = len(el) | |
large = [] | |
current = [] | |
h = _helper() | |
def _large_sum(_el, pos): | |
if pos == len(_el) - 1: | |
h.large_pos -= 1 |
This file contains 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
#!/bin/sh | |
while [ true ]; do | |
found=`curl --no-progress-bar "https://play.google.com/store/devices/details/Nexus_5_32GB_Black?id=nexus_5_black_32gb" 2> /dev/null | grep "Coming soon" | wc -l` | |
if [ $found -eq "0" ]; then | |
python ~/gcsms.py send | |
if [ $? -eq 0 ]; then | |
break | |
else | |
python ~/gcsms.py send | |
fi |
This file contains 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
I have personally enjoyed several Aha! moments from studying basic automata theory. NFAs and DFAs form a microcosm for theoretical computer science as a whole. | |
Does Non-determinism Lead to Efficiency? There are standard examples where the minimal deterministic automaton for a language is exponentially larger than a minimal non-deterministic automaton. Understanding this difference for Turing machines is at the core of (theoretical) computer science. NFAs and DFAs provide the simplest example I know where you can explicitly see the strict gap between determinism and non-determinism. | |
Computability != Complexity. NFAs and DFAs both represent regular languages and are equivalent in what they compute. They differ in how they compute. | |
Machines Refine Languages. This is a different take on what we compute and how we compute. You can think of computable languages (and functions) as defining an equivalence class of automata. This is a fundamental perspective change in TCS, where we focus not just on the what, but the |
This file contains 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
set gfn=Courier_New | |
set nobackup | |
filetype plugin indent on " required! | |
set laststatus=2 " Always show the statusline | |
set t_Co=256 " Explicitly tell Vim that the terminal supports 256 colors | |
set mouse=a | |
set tabstop=4 |
OlderNewer