code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,BUFFER,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,BUFFER,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,BUFFER,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,BUFFER,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)... | Python |
import sys
param = sys.argv[1:]
ip,host,buffer,log = param
print ip
print host
print buffer
print log
| Python |
from socket import *
import sys,struct,time
myHost = ''
myPort = 50007
param = sys.argv[1:]
N_PEER,BUFFER,LOG = param
print N_PEER
print BUFFER
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(int(N_PEER)) ... | Python |
#########################################################
# Server side: open a socket on a port, listen for
# a message from a client, and send an echo reply;
# this is a simple one-shot listen/reply per client,
# but it goes into an infinite loop to listen for
# more clients as long as this server script runs... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct
Mcache = []
class csnode:
def PadMsg(self,msg):
self.msg =msg
while len(self.msg) < 1024:
self.msg=self.msg+' '
return self.msg
def connect_bootstrap(self... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct
Mcache = []
Buffer = []
class csnode:
def PadMsg(self,msg):
self.msg =msg
while len(self.msg) < 1024:
self.msg=self.msg+' '
return self.msg
def connect_bo... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct
Mcache = []
Buffer = []
class csnode:
def PadMsg(self,msg):
self.msg =msg
while len(self.msg) < 1024:
self.msg=self.msg+' '
return self.msg
def connect_bo... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
from socket import *
import pickle
def PadMsg(msg):
while len(msg) < 1024:
msg=msg+' '
return msg
myHost = ''
myPort = 50007
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(5) ... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct
Mcache = []
class csnode:
def PadMsg(self,msg):
self.msg =msg
while len(self.msg) < 1024:
self.msg=self.msg+' '
return self.msg
def connect_bootstrap(self... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
#print 'voce esta tentando conectar em '+ ip
sNode = socket.socket... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sN... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
#print 'voce esta tentando conectar em '+ ip
sNode = socket.socket... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
sNode = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sN... | Python |
import sys
param = sys.argv[1:]
ip,host,buffer,log = param
print ip
print host
print buffer
print log
| Python |
from socket import *
import sys,struct,time
myHost = ''
myPort = 50007
param = sys.argv[1:]
N_PEER,BUFFER,LOG = param
print N_PEER
print BUFFER
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(int(N_PEER)) ... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
from socket import *
import struct
myHost = ''
myPort = 50007
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(5)
video = open('../../DESENVOLVIMENTO/provider/lost.avi', 'r')
Saida=Fa... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,struct,fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_nto... | Python |
import SocketServer,sys,re,time,thread,threading,os,socket,random
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 7187))
s.send("REGISTER\r\n")
time.sleep(0.2)
resp = s.recv(1024)
print 'Resposta: ',resp.strip()
#s.send("REGISTER\r\n")
#time.sleep(0.2)
#resp = s.recv(1024)
#print 'Resposta... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,struct,fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_nto... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class csnode:
def connect_bootstrap(self):
global Mcache
sBootStrap = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sBootStrap.connect(('127.0.0.1', 7187))
sBootStrap.send("REGISTER\r\n")
time.sleep(0.2)
res... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
import struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.... | Python |
#########################################################
# Server side: open a socket on a port, listen for
# a message from a client, and send an echo reply;
# this is a simple one-shot listen/reply per client,
# but it goes into an infinite loop to listen for
# more clients as long as this server script runs... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(msg):
while len(msg) < 1024:
msg=msg+' '
return msg
def server_bind(self):
SocketServer.ThreadingTCPServer.server_bi... | Python |
import SocketServer,sys,re,time,thread,threading,os,socket,random
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 7187))
s.send("REGISTER\r\n")
time.sleep(0.2)
resp = s.recv(1024)
print 'Resposta: ',resp.strip()
#s.send("REGISTER\r\n")
#time.sleep(0.2)
#resp = s.recv(1024)
#print 'Resposta... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(msg):
while len(msg) < 1024:
msg=msg+' '
return msg
def server_bind(self):
SocketServer.ThreadingTCPServer.server_bi... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,Interface_ip
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(self,msg):
while len(msg) < 1024:
self.msg=msg+' '
return self.msg
def server_bind(self):
SocketServer.Threadi... | Python |
import SocketServer,sys,re,time,thread,threading,os,socket,random
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 7187))
s.send("REGISTER\r\n")
time.sleep(0.2)
resp = s.recv(1024)
print 'Resposta: ',resp.strip()
#s.send("REGISTER\r\n")
#time.sleep(0.2)
#resp = s.recv(1024)
#print 'Resposta... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,Interface_ip
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(self,msg):
while len(msg) < 1024:
self.msg=msg+' '
return self.msg
def server_bind(self):
SocketServer.Threadi... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def server_bind(self):
SocketServer.ThreadingTCPServer.server_bind(self)
self.socket.setdefaulttimeout(5)
self.run = True
def setup(self):
print 'BootStrap:... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def server_bind(self):
SocketServer.ThreadingTCPServer.server_bind(self)
self.socket.setdefaulttimeout(5)
self.run = True
def setup(self):
print 'BootStrap:... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random,Interface_ip
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(msg):
while len(msg) < 1024:
msg=msg+' '
return msg
def server_bind(self):
SocketServer.ThreadingTCPSer... | Python |
import SocketServer,sys,re,time,thread,threading,os,socket,random
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', 7187))
s.send("REGISTER\r\n")
time.sleep(0.2)
resp = s.recv(1024)
print 'Resposta: ',resp.strip()
#s.send("REGISTER\r\n")
#time.sleep(0.2)
#resp = s.recv(1024)
#print 'Resposta... | Python |
import socket, struct, fcntl
class Interface_ip:
def set_interface(self,ifname):
self.ifname = ifname
def get_ip_address(self):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack('256s', self.i... | Python |
#!/usr/bin/python
import SocketServer,sys,re,time,thread,threading,os,socket,random,Interface_ip
Mcache = []
class BootStrapHandler(SocketServer.BaseRequestHandler):
def PadMsg(msg):
while len(msg) < 1024:
msg=msg+' '
return msg
def server_bind(self):
SocketServer.ThreadingTCPSer... | Python |
import sys,re,time,thread,threading,os,random
from socket import *
myHost = ''
myPort = 50007
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(5)
lista = []
def thread1():
connection, address = sockobj.accept()
print 'Server connected by', address
lista.append(conne... | Python |
import sys,re,time,thread,threading,os,random
from socket import *
myHost = ''
myPort = 50007
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(5)
lista = []
def thread1():
connection, address = sockobj.accept()
print 'Server connected by', address
lista.append(conne... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
#print 'voce esta tentando conectar em '+ ip
sNode = socket.socket... | Python |
#!/usr/bin/python
import sys,time,socket,struct
param = sys.argv[1:]
IP,PACKAGE_SIZE,LOG = param
Mcache = []
Buffer = []
PACKAGE_SIZE = int(PACKAGE_SIZE)
PAYLOAD = PACKAGE_SIZE- 24
log = open(LOG+time.strftime('%Y%m%d%H%M%S')+'.txt','w')
class csnode:
#print 'voce esta tentando conectar em '+ ip
sNode = socket.socket... | Python |
import sys
param = sys.argv[1:]
ip,host,buffer,log = param
print ip
print host
print buffer
print log
| Python |
from socket import *
import sys,struct,time
myHost = ''
myPort = 50007
param = sys.argv[1:]
N_PEER,BUFFER,LOG = param
print N_PEER
print BUFFER
sockobj = socket(AF_INET, SOCK_STREAM)
sockobj.bind((myHost, myPort))
sockobj.listen(int(N_PEER)) ... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
def getList():
return list(["hello", "hi", "greetings"])
services = {
'getList': getList
}
if __name__ == '__main__':
from pyamf.remoting.wsgigateway import WSGIGateway
from wsgiref import simple_server
gw = WSGIGateway(services)
httpd = simple_server.WSGIServer(
('lo... | Python |
#!/usr/bin/env python
def getList():
return list(["hello", "hi", "greetings"])
services = {
'getList': getList
}
if __name__ == '__main__':
from pyamf.remoting.wsgigateway import WSGIGateway
from wsgiref import simple_server
gw = WSGIGateway(services)
httpd = simple_server.WSGIServer(
('lo... | Python |
import compizconfig
context = compizconfig.Context()
def getInfoObject():
InfoObject = []
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCateg["Plugins"] = []
InfoObject.append(nextCateg)
for plugin in sorted(c... | Python |
import settings
import yaml
import os
import sys
InfoObject = settings.getInfoObject()
def writeYAMLToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.yaml")
testerXML = open(xml_file, 'w')
yaml.dump(InfoObject, tester... | Python |
import compizconfig
context = compizconfig.Context()
def getInfoObject():
InfoObject = []
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCateg["Plugins"] = []
InfoObject.append(nextCateg)
for plugin in sorted(c... | Python |
import settings
import yaml
import os
import sys
infoObject = settings.getInfoObject()
def writeYAMLToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.yaml")
testerXML = open(xml_file, 'w')
yaml.dump(infoObject, tester... | Python |
import compizconfig
context = compizconfig.Context()
def getInfoObject():
InfoObject = []
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCateg["Plugins"] = []
InfoObject.append(nextCateg)
for plugin in sorted(c... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.json")
testerXML = open(xml_file, 'w')
simplejso... | Python |
import compizconfig
context = compizconfig.Context()
def getInfoObject():
InfoObject = []
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCateg["Plugins"] = []
InfoObject.append(nextCateg)
for plugin in sorted(c... | Python |
import settings
import cjson
import simplejson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.yaml")
testerXML = open(xml_file, 'w')
simplejso... | Python |
#!/usr/bin/env python
import compizconfig
import os
from xml.etree import cElementTree as ET
from lxml import etree
import sys
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz'... | Python |
#!/usr/bin/env python
import compizconfig
import os
from xml.etree import cElementTree as ET
from lxml import etree
import sys
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz'... | Python |
#!/usr/bin/env python
def aString(theParams):
return theParams[0] + "___" + theParams[1]
def anArray():
return ["hello", "there", "this", "is", "an", "array"]
def anObject():
return [{"var1": "hello", "var2": "hi", "var3": "etc"}, {"var1": "aslkd", "var2": "asdf", "var3": "etcafgb"}]
services = {
'aString': a... | Python |
#!/usr/bin/env python
def aString(theParams):
return theParams[0] + "___" + theParams[1]
def anArray():
return ["hello", "there", "this", "is", "an", "array"]
def anObject():
return [{"var1": "hello", "var2": "hi", "var3": "etc"}, {"var1": "aslkd", "var2": "asdf", "var3": "etcafgb"}]
services = {
'aString': a... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "json/allSettings.txt")
testerXML = open(xml_file, 'w')
... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
#!/usr/bin/env python
import compizconfig
context = compizconfig.Context()
def CatSortCompare(v1, v2):
if v1 == v2:
return cmp(v1, v2)
if context.Plugins['core'].Category == v1:
return cmp('', v2 or 'zzzzzzzz')
if context.Plugins['core'].Category == v2:
return cmp(v1 or 'zzzzzzz', '... | Python |
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
import logging
from urlparse import urlparse
import os
class flashbsm(webapp.RequestHandler):
def get(self):
swf = 'http://' + urlparse(self.request.url).netloc + '/swfs/settings.swf';
templa... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.json")
testerXML = open(xml_file, 'w')
simplejso... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "assets/json/allSettings.txt")
testerXML = open(xml_file,... | Python |
import compizconfig
import time
import os
from threading import Thread
context = compizconfig.Context()
globalInfoObject = []
settingsHolder = []
pluginsHolder = []
changed = []
def getInfoObject():
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCat... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "tester.json")
testerXML = open(xml_file, 'w')
simplejso... | Python |
import settings
import simplejson
import cjson
import os
import sys
infoObject = settings.getInfoObject()
def writeJSONToFile():
print "hello there"
xml_file = os.path.abspath(__file__)
xml_file = os.path.dirname(xml_file)
xml_file = os.path.join(xml_file, "assets/json/allSettings.txt")
testerXML = open(xml_file,... | Python |
import compizconfig
import time
import os
from threading import Thread
context = compizconfig.Context()
globalInfoObject = []
settingsHolder = []
pluginsHolder = []
changed = []
def getInfoObject():
for category in sorted(context.Categories, CatSortCompare):
nextCateg = {}
nextCateg["Name"] = category
nextCat... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
#!/bin/env python
import os
import re
import sys
ws = re.compile(r'-')
f = open("list.txt")
names = f.readlines()
f.close()
for name in names:
name = name[0:-1]
newname = ""
for token in ws.split(name):
newname += token[0].upper()
newname += token[1:]
cmd = "cp %s %s" % (name,newname)
p... | Python |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.