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
# using python-hidapi | |
import hid | |
import time | |
VENDOR_ID = 0x0483 | |
PRODUCT_ID = 0x5032 | |
TOTAL_KEY_COUNT = 68 | |
h = hid.device() | |
keyboard_path = [ a['path'] for a in hid.enumerate(VENDOR_ID, PRODUCT_ID) if a['interface_number']==1][0] |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package testsnmp4j; | |
import java.io.IOException; | |
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.util.Vector; |
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
#!/usr/bin/python | |
from pprint import pprint as p;import subprocess as s; | |
def loop_list_print(cmds): | |
oo = [ s.Popen(['/bin/sh','-c', cmd], stdout=s.PIPE).communicate()[0] for cmd in cmds] | |
ooo = [ ( o, o.decode('unicode_escape',errors='replace'), o.decode('big5') ) for o in oo ] | |
for oo in ooo: | |
for o in oo: | |
print(o.strip()) |
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
#!/bin/bash | |
# playdeb builds a debian package of the play framework. playdeb downloads | |
# the playframework by itself. You run it by | |
# playdeb.sh <version> <maintainer> | |
# Example: | |
# playdeb.sh 1.2.3 "Denny Colt <[email protected]>" | |
# | |
# The script has been tested with version 1.2.3. | |
if [ -z $1 ] |
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
#!/usr/bin/env python2.7 | |
import urllib2 | |
import time | |
_ITERATIONS = 200 | |
start_time = time.time() | |
for i in range(0, _ITERATIONS): |