code
stringlengths
1
1.72M
language
stringclasses
1 value
# Copyright (C) 2007 Alexandre Conrad, alexandre (dot) conrad (at) gmail (dot) com # # This module is part of FormAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import helpers as h from formalchemy import config from formalchemy import base from tempita import Tem...
Python
import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ 'pyramid', 'SQLAlchemy', 'transaction', 'repoze.tm2', 'zo...
Python
# -*- coding: utf-8 -*-
Python
import transaction from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy import Unicode from sqlalchemy.exc import IntegrityError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from zope.sqlalchemy impo...
Python
import unittest from pyramid.config import Configurator from pyramid import testing import os from webtest import TestApp from pyramidapp import main from paste.deploy import loadapp dirname = os.path.abspath(__file__) dirname = os.path.dirname(dirname) dirname = os.path.dirname(dirname) def _initTestingDB(): fro...
Python
from pyramidapp.models import DBSession from pyramidapp.models import MyModel def my_view(request): dbsession = DBSession() root = dbsession.query(MyModel).filter(MyModel.name==u'root').first() return {'root':root, 'project':'pyramidapp'}
Python
from pyramid.config import Configurator from sqlalchemy import engine_from_config from pyramidapp.models import initialize_sql def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ engine = engine_from_config(settings, 'sqlalchemy.') initialize_sql(engine) ...
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
#! /usr/bin/python import glob import shutil import sys import subprocess import os if 'linux' in sys.platform: platform = 'linux' else: platform = 'darwin' toolchain = "%s/android-toolchain" % os.getenv("HOME") openssl_version = "1.0.0n" encfs_version = "1.7.5" def cpfile(src, target): sys.stdout.write...
Python
#! /usr/bin/python import glob import shutil import sys import subprocess import os def cpfile(src, target): sys.stdout.write("Copying %s to %s\n" % (src, target)) shutil.copy(src, target) # We only copy the armeabi version of the binary archs = ["armeabi"] for arch in archs: try: os.makedirs("....
Python
#! /usr/bin/python import glob import shutil import sys import subprocess import os def cpfile(src, target): sys.stdout.write("Copying %s to %s\n" % (src, target)) shutil.copy(src, target) # We only copy the armeabi version of the binary archs = ["armeabi"] for arch in archs: try: os.makedirs("....
Python
#! /usr/bin/python import glob import shutil import sys import subprocess import os def cpfile(src, target): sys.stdout.write("Copying %s to %s\n" % (src, target)) shutil.copy(src, target) # We only copy the armeabi version of the binary archs = ["armeabi"] for arch in archs: try: os.makedirs("....
Python
import string #headingDict = {} class ircstuff: pass #1 ,2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 #type, lots, currency , dateopen , dateclose , open , close ,high , low , pips , Dollar, pipstotal ,dollarTotal headingDic...
Python
#! /usr/bin/env python import string import sys import math from zuluDicts import* '''Provider Type Sand Lots Currency Date Open Date Closed Open Close High Low Pips/$ Total''' class Zuluread(WikiaHeader): def __init__(self): self.tickerDict = {} self.wikialist = [] self.templist = [] ...
Python
import hashlib import hmac import struct from util.tlv import loopTLVBlocks, tlvToDict from crypto.aeswrap import AESUnwrap from pprint import pprint from crypto.PBKDF2 import PBKDF2 from util.bplist import BPlistReader from crypto.aes import AESdecryptCBC from crypto.curve25519 import curve25519 from hashlib...
Python
#HAX d=open("redsn0w_win_0.9.9b4/redsn0w.exe", "rb").read() i = d.find("<key>IV</key>") i = d.rfind("<?xml",0,i) j = d.find("</plist>", i) assert i != -1 assert j != -1 open("Keys.plist", "wb").write(d[i:j+8])
Python
""" 0 1:MCSHA256DigestWithSalt 2:SecKeyFromPassphraseDataHMACSHA1 """ from crypto.PBKDF2 import PBKDF2 import plistlib import hashlib SALT1 = "F92F024CA2CB9754".decode("hex") hashMethods={ 1: (lambda p,salt:hashlib.sha256(SALT1 + p)), 2: (lambda p,salt:PBKDF2(p, salt, iterations=1000).read(20)) ...
Python
from keychain import Keychain from crypto.aes import AESdecryptCBC import hashlib from Crypto.Cipher import AES class Keychain3(Keychain): def __init__(self, filename, key835=None): Keychain.__init__(self, filename) self.key835 = key835 def decrypt_data(self, data): ...
Python
from crypto.aes import AESdecryptCBC import struct import sqlite3 import M2Crypto from util import write_file from util.bplist import BPlistReader import plistlib import hashlib import string from util.cert import RSA_KEY_DER_to_PEM printset = set(string.printable) def render_password(p): data = p["...
Python
from crypto.aes import AESdecryptCBC import struct """ iOS 4 keychain-2.db data column format version 0x00000000 key class 0x00000008 kSecAttrAccessibleWhenUnlocked 6 kSecAttrAccessibleAfterFirstUnlock 7 ...
Python
import sqlite3 from keychain3 import Keychain3 from keychain4 import Keychain4 def keychain_load(filename, keybag, key835): version = sqlite3.connect(filename).execute("SELECT version FROM tversion").fetchone()[0] print "Keychain version : %d" % version if version == 3: return Keychain3(fil...
Python
from keychain4 import Keychain4 from util.bplist import BPlistReader class KeychainBackup4(Keychain4): def __init__(self, filename, keybag): self.keychain = BPlistReader.plistWithFile(filename) self.keybag = keybag def get_passwords(self): res = [] genps = self.keyc...
Python
#!/usr/bin/python import plistlib import zipfile import struct import sys from Crypto.Cipher import AES from util.lzss import decompress_lzss devices = {"n88ap": "iPhone2,1", "n90ap": "iPhone3,1", "n92ap": "iPhone3,3", "n18ap": "iPod3,1", "n81ap": "iPod4,1", "k48...
Python
#!/usr/bin/env python import os import sys from struct import pack, unpack from Crypto.Cipher import AES from crypto.aeswrap import AESUnwrap from util.bplist import BPlistReader from keystore.keybag import Keybag from pprint import pprint MBDB_SIGNATURE = 'mbdb\x05\x00' MBDX_SIGNATURE = 'mbdx\x02\x00' ...
Python
import hashlib,struct,glob,sys,os from crypto.PBKDF2 import PBKDF2 from util.bplist import BPlistReader from Crypto.Cipher import AES from util import read_file, write_file import plistlib """ decrypt iOS 3 backup blob (metadata and file contents) """ def decrypt_blob(blob, auth_key): len = struct.unp...
Python
from Crypto.Cipher import AES ZEROIV = "\x00"*16 def removePadding(blocksize, s): 'Remove rfc 1423 padding from string.' n = ord(s[-1]) # last byte contains number of padding bytes if n > blocksize or n > len(s): raise Exception('invalid padding') return s[:-n] def AESdecryptCBC(da...
Python
import struct from Crypto.Cipher import AES """ http://www.ietf.org/rfc/rfc3394.txt quick'n'dirty AES wrap implementation used by iOS 4 KeyStore kernel extension for wrapping/unwrapping encryption keys """ def unpack64bit(s): return struct.unpack(">Q",s)[0] def pack64bit(s): return struc...
Python
#!/usr/bin/python # -*- coding: ascii -*- ########################################################################### # PBKDF2.py - PKCS#5 v2.0 Password-Based Key Derivation # # Copyright (C) 2007, 2008 Dwayne C. Litzenberger <dlitz@dlitz.net> # All rights reserved. # # Permission to use, copy, modify, and distribute ...
Python
from Crypto.Util import number CURVE_P = (2**255 - 19) CURVE_A = 121665 def curve25519_monty(x1, z1, x2, z2, qmqp): a = (x1 + z1) * (x2 - z2) % CURVE_P b = (x1 - z1) * (x2 + z2) % CURVE_P x4 = (a + b) * (a + b) % CURVE_P e = (a - b) * (a - b) % CURVE_P z4 = e * qmqp % CURVE_P a ...
Python
#!/usr/bin/env python from Crypto.Cipher import AES from Crypto.Util import strxor from struct import pack, unpack from util.bplist import BPlistReader def gcm_rightshift(vec): for x in range(15, 0, -1): c = vec[x] >> 1 c |= (vec[x-1] << 7) & 0x80 vec[x] = c vec[0] >>= 1 return vec...
Python
""" /************************************************************** LZSS.C -- A Data Compression Program *************************************************************** 4/6/1989 Haruhiko Okumura Use, distribute, and modify this program freely. Please send me your improved versions. PC-VAN ...
Python
import base64 def chunks(l, n): return (l[i:i+n] for i in xrange(0, len(l), n)) def RSA_KEY_DER_to_PEM(data): a = ["-----BEGIN RSA PRIVATE KEY-----"] a.extend(chunks(base64.b64encode(data),64)) a.append("-----END RSA PRIVATE KEY-----") return "\n".join(a)
Python
import struct def tlvToDict(blob): d = {} for tag,data in loopTLVBlocks(blob): d[tag] = data return d def tlvToList(blob): return list(loopTLVBlocks(blob)) def loopTLVBlocks(blob): i = 0 while i + 8 <= len(blob): tag = blob[i:i+4] length = struct.unp...
Python
""" http://github.com/farcaller/bplist-python/blob/master/bplist.py """ import struct import plistlib from datetime import datetime, timedelta class BPListWriter(object): def __init__(self, objects): self.bplist = "" self.objects = objects def binary(self): '''binary -> string ...
Python
def read_file(filename): f = open(filename, "rb") data = f.read() f.close() return data def write_file(filename,data): f = open(filename, "wb") f.write(data) f.close()
Python
import os import plistlib import struct import socket from datetime import datetime from progressbar import ProgressBar, Percentage, Bar, SimpleProgress, ETA class DeviceInfo(dict): @staticmethod def create(dict): try: assert dict.has_key("dataVolumeUUID") filename = "%s.plist" % dict.get("dataVo...
Python
import os import sys import struct import zlib from btree import AttributesTree, CatalogTree, ExtentsOverflowTree from structs import * from util import write_file class HFSFile(object): def __init__(self, volume, hfsplusfork, fileID, deleted=False): self.volume = volume self.blockSize = volume.blo...
Python
import hashlib from Crypto.Cipher import AES from emf import cprotect_xattr, cprotect4_xattr, EMFFile from structs import * from util import write_file """ Implementation of the following paper : Using the HFS+ Journal For Deleted File Recovery. Aaron Burghardt, Adam Feldman. DFRWS 2008 http://www.dfrws.org/2...
Python
import plistlib import os import struct from hfs import HFSVolume, HFSFile from keystore.keybag import Keybag from structs import HFSPlusVolumeHeader, kHFSPlusFileRecord, getString from construct import Struct, ULInt16,ULInt32, String from Crypto.Cipher import AES from construct.macros import ULInt64, Padding ...
Python
from structs import * """ Probably buggy """ class BTree(object): def __init__(self, file, keyStruct, dataStruct): self.file = file self.keyStruct = keyStruct self.dataStruct = dataStruct block0 = self.file.readBlock(0) btnode = BTNodeDescriptor.parse(block0) ...
Python
from construct import * from construct.macros import UBInt64 """ http://developer.apple.com/library/mac/#technotes/tn/tn1150.html """ def getString(obj): return obj.HFSUniStr255.unicode kHFSRootParentID = 1 kHFSRootFolderID = 2 kHFSExtentsFileID = 3 kHFSCatalogFileID ...
Python
import plistlib import os from keystore.keybag import Keybag from keychain.keychain4 import Keychain4 from keychain.managedconfiguration import bruteforce_old_pass from util.ramdiskclient import RamdiskToolClient from util import write_file def checkPasscodeComplexity(rdclient): pl = rdclient.downloadFile...
Python
import os import plistlib from keystore.keybag import Keybag from util.ramdiskclient import RamdiskToolClient """ this wont work on iOS 5 unless the passcode was already bruteforced """ def escrow(): client = RamdiskToolClient() di = client.getDeviceInfos() key835 = di.get("key835").decode("hex"...
Python
import os import sys from hfs.emf import EMFVolume from hfs.journal import do_emf_carving if __name__ == "__main__": if len(sys.argv) < 2: print "Usage: emf_undelete.py disk_image.bin" sys.exit(0) filename = sys.argv[1] volume = EMFVolume(filename) dirname = os.path.dirname(f...
Python
import plistlib import sys from optparse import OptionParser from keystore.keybag import Keybag from keychain import keychain_load from keychain.managedconfiguration import bruteforce_old_pass def main(): parser = OptionParser(usage="%prog keychain.db keyfile.plist") parser.add_option("-d", "--display...
Python
from optparse import OptionParser from hfs.emf import EMFVolume def main(): parser = OptionParser(usage="emf_decrypter.py disk_image.bin") parser.add_option("-w", "--nowrite", dest="write", action="store_false", default=True, help="disable modifications of input file, for testing") ...
Python
#!/usr/bin/env python import sys, os from PyQt4 import QtGui, QtCore from keychain.keychain_backup4 import KeychainBackup4 from Crypto.Cipher import AES from crypto.aeswrap import AESUnwrap from backups.backup4 import MBDB, getBackupKeyBag from pprint import pprint class KeychainTreeWidget(QtGui.QTreeWidget...
Python
#!/usr/bin/python # -*- coding: utf-8 -*- # # usbmux.py - usbmux client library for Python # # Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
Python
#!/usr/bin/python # -*- coding: utf-8 -*- # # tcprelay.py - TCP connection relay for usbmuxd # # Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free So...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2008 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or l...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2008 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or l...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/license...
Python
#!/usr/bin/env python # # Copyright (c) 2008 Google, Inc. # Contributed by Arun Sharma <arun.sharma@google.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, includi...
Python
#!/usr/bin/env python from distutils.core import setup, Extension from distutils.command.install_data import install_data setup(name='perfmon', version='4.0', author='Arun Sharma', author_email='arun.sharma@google.com', description='libpfm wrapper', packages=['perfmon'], package_di...
Python
# # Copyright (c) 2008 Google, Inc. # Contributed by Arun Sharma <arun.sharma@google.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation #...
Python
# # Copyright (c) 2008 Google, Inc. # Contributed by Arun Sharma <arun.sharma@google.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation #...
Python
from perfmon_int import * from pmu import * from session import * pfm_initialize()
Python
#!/usr/bin/env python # # Copyright (c) 2008 Google, Inc. # Contributed by Arun Sharma <arun.sharma@google.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, includi...
Python
#! /usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
Python
#! /usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # Resource object code # # Created: ?? ???. 10 13:05:40 2011 # by: The Resource Compiler for PyQt (Qt v4.6.2) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x09\x19\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
# -*- coding: utf-8 -*- # # Copyright (C) 2011 by Igor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
Python
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
Python
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
Python
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
Python
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
Python
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
Python
#!/usr/bin/python #------------------------------------------------------------------------------ # $Id: formatedstring.py 3 2008-10-17 09:35:32Z 2derand $ # # creator 2derand #------------------------------------------------------------------------------ def convertFormatedLine(line,format,formatDeffs): def cflGe...
Python
#!/usr/bin/python #------------------------------------------------------------------------------ # $Id$ # # creator 2derand #------------------------------------------------------------------------------ def convertFormatedLine(line,format,formatDeffs): def cflGet(line,j,out,dump): rv = '' while line[j]<>...
Python