The two most basic operations are api-get
and api-send
, which are named simply based on their interaction with the node mesh. Simply put, api-get
can only search and retrieve entries from the mesh, while api-send
can modify the mesh in any way.
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/python2.7 | |
#Auto survey | |
import re,sys,os | |
class answer: | |
def __init__(self): | |
self.ans = [] | |
def answer(self,a): | |
self.ans.append(a) |
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 os, sys, Image | |
size = 328, 328 | |
outdir='D:\\pics\\thumbs' | |
files = [] | |
glob = None | |
try: | |
for root, dirs, files in os.walk("%s" % (sys.argv[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
class bresenham: | |
def __init__(self, start, end): | |
self.start = list(start) | |
self.end = list(end) | |
self.path = [] | |
self.steep = abs(self.end[1]-self.start[1]) > abs(self.end[0]-self.start[0]) | |
if self.steep: | |
print 'Steep' |
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 re, sys | |
class note: | |
def __init__(self,fname): | |
self.notes = [] | |
self.fname = fname | |
def parse(self): | |
_f = open(self.fname,'r') | |
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
Chapter 2 - Ancient Near East | |
=== | |
Human-Headed Winged Lion (Lamassu) | |
--- | |
* Guardian figure from Assyrian palace of Assumasirpal II (ruled 883-859 BC) | |
* Carved limestone, 10ft high | |
Gate of the Citadel of Sargon II | |
--- |
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
#The majority of this code was taken from | |
# http://twistedmatrix.com/documents/current/core/howto/clients.html#auto5 | |
#While the original code would have worked fine for a bot, I didn't like the | |
#way they handled logging. Why reinvent the wheel when Python has an | |
#excellent built-in module (`logging`) for doing just that? | |
#Anyway, this bot creates a "database" of registered users that it loads on | |
#run and saves on exit. | |
# | |
#python ircbot.py -build-db | |
#python ircbot.py |
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
#flags - 2012 | |
#wtfplv2 | |
import sys | |
if not len(sys.argv)==2: | |
print 'Usage: brainfuck.py <file>' | |
sys.exit(1) | |
PROGRAM = bytearray(9999) | |
CELL = 0 |
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
if (x >= y) #A label | |
x=x-y; | |
else | |
y=y-x | |
.data | |
x: word; | |
y: word; | |
//Machine Code |
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.sql.*; | |
import java.util.*; | |
import java.io.*; | |
public class Database{ | |
public static void main (String args []) throws SQLException, IOException { | |
// Load the Oracle JDBC driver | |
DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); | |
String serverName = "csor6.bsu.edu"; |
OlderNewer