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
def BaseSeven(num): | |
powersOfSeven = 1; | |
res = 0; | |
while num / powersOfSeven > 6: powersOfSeven = powersOfSeven * 7 | |
while powersOfSeven != 1: | |
res = res * 10 + int(num / powersOfSeven) | |
num = num - int(num / powersOfSeven) * powersOfSeven | |
powersOfSeven = powersOfSeven / 7 | |
res = res * 10 + num | |
return res |
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
class BaseSevenNumber: | |
def __init__(self): | |
self.digits = [1] | |
def Double(self): | |
for i in range(0, len(self.digits)): | |
self.digits[i] = self.digits[i] * 2 | |
for i in range(len(self.digits) - 1, -1, -1): | |
if self.digits[i] > 6: |
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
Error for wireless request "Set <option name>" (<related option code>) : | |
SET failed on device <wireless device> ; Operation not permitted. |
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
ifconfig eth0 up | |
iwconfig eth0 essid any | |
ifup eth0 |
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
GUM>loadb a2000000 | |
*In HyperTerminal: Transfer->Send File->u-boot.bin with Kermit protocol* | |
GUM>protect off all | |
GUM>era 1:0-1 | |
GUM>cp.b a2000000 0 ${filesize} | |
GUM>reset |
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
GUM>loady a2000000 | |
*In HyperTerminal: Transfer->Send File->rootfs_arm_nofpu.jffs2 with Ymodem protocol* | |
GUM>pro on 1:0-1 && jera all && cp.b a2000000 40000 ${filesize} |
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
GUM>loady a2000000 | |
*In HyperTerminal: Transfer->Send File->uImage with Ymodem protocol* | |
GUM>katinstall 100000 | |
GUM>katload 100000 | |
GUM>bootm |
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
Welcome to the Gumstix Linux Distribution! | |
gumstix login: root | |
Password: | |
Don't eat me! | |
# |
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
def learn(self, user, msg): | |
global factoids, substitutions | |
msg = msg.strip() | |
if msg[0] == '[' and ']' in msg[6:]: | |
epos = msg.find(']') | |
token = msg[1:epos] | |
body = msg[epos + 1:] | |
if not factoids.has_key(token): | |
factoids[token] = [] | |
factoids[token].append(body.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
running = False | |
try: | |
# In this example, we bridge over port 18293 | |
listener = socket.socket() | |
listener.bind(('0.0.0.0', 18293)) | |
listener.listen(1) | |
bridge_client = listener.accept()[0] | |
listener.close() | |
print("Bridge Client Connected.") |