code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env python
# Copyright 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | Python |
#!/usr/bin/env pypy
import os, sys, logging, re
import argparse
import fnmatch
configurations = {'lite', 'pro'}
package_dirs = {
'lite': ('src/cx/hell/android/pdfview',),
'pro': ('src/cx/hell/android/pdfviewpro',)
}
file_replaces = {
'lite': (
'cx.hell.android.pdfview.',
'"cx.hell.an... | Python |
#!/usr/bin/python
import xml.parsers.expat;
import sys;
import re;
parser=xml.parsers.expat.ParserCreate('UTF-8');
values_en = {}
values_lang = {}
values_hash = {}
name=''
def parse(lang, values):
def start_element(n, attrs):
global name;
if n != u'string': return
name=attrs[u'name']
def end_element(... | Python |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | Python |
#!/usr/bin/env python
VERSION = "0.0.1"
import sys, os
try:
import pygtk
pygtk.require("2.0")
except:
print "Could not import pygtk"
try:
import gtk
import gtk.glade
except:
print "Could not import gtk"
sys.exit(1)
class Func:
"""
A pseudo-widget representing an a10 function.
"""
def __init__(self, x, ... | Python |
#!/usr/bin/env python
VERSION = "0.0.1"
import sys, os
try:
import pygtk
pygtk.require("2.0")
except:
print "Could not import pygtk"
try:
import gtk
import gtk.glade
except:
print "Could not import gtk"
sys.exit(1)
class Func:
"""
A pseudo-widget representing an a10 function.
"""
def __init__(self, x, ... | Python |
# Copyright (C) 2011 Roger Xu.
# Author: Roger Xu <roger.xu.2007@gmail.com>
#
# pacparser is a library that provides methods to parse proxy auto-config
# (PAC) files. Please read README file included with this package for more
# information about this library.
"""
Python module to parse pac files. Look at project's ho... | Python |
import cgi
import datetime
import logging
import urlparse
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import memcache
from google.appengine.api import urlfetch
logging.getLogger().setLevel(logging.DEBUG)
class MainPage(webapp.RequestHan... | Python |
import cgi
import datetime
import time
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer(index):
opmServers = []
opmServers.... | Python |
import cgi
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer():
opmServers = []
opmServers.append('http://rogerxu-opm.appspo... | Python |
import cgi
import urlparse
import wsgiref.handlers
from google.appengine.api import urlfetch
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
def getOpmServer():
opmServers = []
opmServers.append('http://rogerxu-opm.appspo... | Python |
#!/usr/bin/env python
# coding=utf-8
# Based on GAppProxy by Du XiaoGang <dugang@188.com>
# Based on WallProxy 0.4.0 by hexieshe <www.ehust@gmail.com>
__version__ = '1.8.5'
__author__ = 'phus.lu@gmail.com'
__password__ = ''
import sys, os, re, time, struct, zlib, binascii, logging
try:
from google.appengine.api ... | Python |
#!/usr/bin/env python
# coding=utf-8
# Contributor:
# Phus Lu <phus.lu@gmail.com>
__version__ = '1.10.1'
__password__ = ''
import sys, os, time, struct, zlib, binascii, logging, httplib, urlparse
try:
from google.appengine.api import urlfetch
from google.appengine.runtime import apiproxy_errors, D... | Python |
#!/usr/bin/python
import os
virtenv = os.environ['APPDIR'] + '/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
pass
#
# IMPORTANT: Put ... | Python |
#!/usr/bin/env python
"""
This file is executed from ../setup.py only.
Calculate cumulative version from Revision strings.
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http... | Python |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
structure = PolyData(points=[[0,0,0],[1,0,0],[1,1,0],[0,1,0],
[0,0,1],[1,0,1],[1,1,1],[0,1,1]],
polygons=[... | Python |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
points = [[0,0,0],[1,0,0],[2,0,0],[0,1,0],[1,1,0],[2,1,0],
[0,0,1],[1,0,1],[2,0,1],[0,1,1],[1,1,1],[2,1,1],
[0,1,2],[1,1,2],[2,1,2],[0,1... | Python |
#!/usr/bin/env python
import sys
sys.path = ['..']+sys.path
if sys.version[:3]=='1.5':
from lib152 import *
else:
from lib import *
#from pyvtk import *
vtk = VtkData(StructuredPoints([3,4,6]),
PointData(Scalars([0,0,0,0,0,0,0,0,0,0,0,0,
0,5,10,15,20,25,25,20,15... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
PyVTK provides tools for manipulating VTK files in Python.
VtkData - create VTK files from Python objects.
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of th... | Python |
__version__ = "0.4.74"
| Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.1 $
$Date:... | Python |
#!/usr/bin/env python
import os
import sys
from distutils.core import setup
version_file = os.path.join('lib','__version__.py')
if 1 or not os.path.exists(version_file):
major_version = 0
minor_version = 4
execfile(os.path.join('tools','get_revision.py'))
__version__='%d.%d.%d'%(major_version,minor_ve... | Python |
#!/usr/bin/env python
"""
Field
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision... | Python |
#!/usr/bin/env python
"""
UnstructuredGrid
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK... | Python |
#!/usr/bin/env python
"""
Tensors
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | Python |
#!/usr/bin/env python
"""
UnstructuredGrid
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK... | Python |
#!/usr/bin/env python
"""
LookupTable
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Re... | Python |
#!/usr/bin/env python
"""
PointData, CellData
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN R... | Python |
#!/usr/bin/env python
"""
TextureCoordinates
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RI... | Python |
#!/usr/bin/env python
"""
Vectors
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | Python |
#!/usr/bin/env python
"""
DataSetAttr
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Re... | Python |
#!/usr/bin/env python
"""
Normals
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | Python |
#!/usr/bin/env python
"""
DataSet
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | Python |
#!/usr/bin/env python
"""
StructuredGrid
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
... | Python |
#!/usr/bin/env python
"""
Scalars
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revisi... | Python |
#!/usr/bin/env python
"""
PyVTK provides tools for manipulating VTK files in Python.
VtkData - create VTK files from Python / read VTK files to Python
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given und... | Python |
__version__ = "0.4.74"
| Python |
#!/usr/bin/env python
"""
PolyData
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revis... | Python |
#!/usr/bin/env python
"""
Common functions/methods.
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR... | Python |
#!/usr/bin/env python
"""
ColorScalars
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$R... | Python |
#!/usr/bin/env python
"""
RectilinearGrid
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.... | Python |
#!/usr/bin/env python
"""
StructuredPoints
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK... | 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 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
"""
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 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
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/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 |
import sys
try:
if sys.platform == "win32":
import _wincon
Console = _wincon.Console
install_readline = _wincon.install_readline
else:
from _cursescon import Console
except ImportError:
raise ImportError, "installation error: cannot find a console driver"
#
# c... | Python |
#!/usr/bin/python2.5
# # phillias Build Tool - Main Executable Wrapper
# import sys
sys.path.append('src')
import src.phillias_main
src.phillias_main.Run() | Python |
import sys
import feedparser
import urllib
import urlparse
def download_from_atom(feed_url):
d = feedparser.parse(feed_url)
links = [l.href for e in d.entries
for l in e.links if l.rel == 'direct'] for link in links:
print("Downloading %s" % link)
filename = urlparse.urlspl... | Python |
$ sudo import python
$ apt-get install mercurial
#!/usr/bin/ python
$ svn import example_keene_project https://gerard-arveu-fontaine .googlecode.com/svn/trunk/exemple_keene_project -m 'initial import'
## this div add 12
curl https://www.google.com/accounts/ClientLogin \--data-urlencode Email=username@googlecode.com... | Python |
#!/usr/bin/python
#---------------------------------------------------------------------------
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ht... | Python |
# -*- python -*-
env = Environment(CCFLAGS = ['-Wall'])
env.Program('a3dcontrol', 'src/a3dcontrol.c')
SConscript(['tools/SConscript',
'examples/SConscript',
])
| Python |
env = Environment(CCFLAGS = ['-Wall'])
env.Program('i2crecorder',
'src/i2crecorder.c',
LIBS=['ftdi', ])
| Python |
env = Environment(CCFLAGS = ['-Wall'])
env.Program('pulsar',
'src/pulsar.c',
LIBS=['GL', 'GLU', 'glut' ])
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
定义一些常量
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
ROOT_TXT = u"GIS数据:"
DIVSROOT_TXT = u"驱动和数据登记:"
MAP_TXT = u"地图:"
ROOTS=[ROOT_TXT, DIVSROOT_TXT, MAP_TXT]
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
定义主界面
- writer:linux_23; create: Thu Jun 05 09:28:28 2008 ; version:1; 创建
"""
import wx,os
import wx.lib.hyperlink as hl
from geosings.ui.core.MainImage import GetBitmapByName
from geosings.core.system import *
from friendpanel import *
from gispanel imp... | Python |
# -*- encoding: utf-8 -*-
import os,sys,time
thispath = os.path.abspath(__file__)# get the module path!
parentdir,f = os.path.split(thispath)
msnppath = os.path.join(parentdir,"msnp.zip")
sys.path.append( msnppath )
import msnp
class MsnChatListener(msnp.ChatCallbacks):
def message_received(self, pass... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GIS列表面板
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
import wx,sys,os
import wx.lib.hyperlink as hl
from geosings.ui.core.wxKeyParser import *
from geosings.core.system.DefConf import USERHOME
from geosings.core.system.EncodeTran import utf82loc... | Python |
# -*- coding: cp936 -*-
"""
The MIT License
Copyright (c) 2005 hoxide
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 the rights to use, ... | Python |
from binascii import b2a_hex, a2b_hex
import tea ,struct
import md5
key = md5.new(md5.new("python").digest()).digest()
key1='E87B1ED5BF02A8169FBABB701311D8F2'
key2='Kr9kxuztjSgWxNcx'
print b2a_hex(key)
data='66BBA5CF7FFA17A96536C30ED4F24A671A6C17807413B8E83E7B3297C984FB87'
data2=a2b_hex('1097099d1c69f1f5000bb... | Python |
import pcap ,struct
pack=pcap.pcap()
pack.setfilter('udp')
for recv_time,recv_data in pack:
recv_len=len(recv_data)
if recv_len==55 and recv_data[42]==chr(02) and recv_data[54]==chr(03):
print struct.unpack('>I',recv_data[recv_len-6:recv_len-2])[0] | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
朋友列表面板
- writer:linux_23; create: Fri Jun 06 13:56:47 2008 ; version:1; 创建
"""
import wx,sys,os
import wx.lib.foldpanelbar as fpb
import wx.lib.hyperlink as hl
import xmpp
from geosings.ui.core.wxKeyParser import *
import cStringIO
from gispanel import *
... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
定义一些常量
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
ROOT_TXT = u"GIS数据:"
DIVSROOT_TXT = u"驱动和数据登记:"
MAP_TXT = u"地图:"
ROOTS=[ROOT_TXT, DIVSROOT_TXT, MAP_TXT]
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GIS列表面板
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
import wx,sys,os
import wx.lib.hyperlink as hl
from geosings.ui.core.wxKeyParser import *
from geosings.core.system.DefConf import USERHOME
from geosings.core.system.EncodeTran import utf82loc... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GIS树控件
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
import wx
from wx.lib.mixins import treemixin
from Const import *
from conf import *
from panels import GetImageByName, GetImageDirPath
class DemoTreeMixin(treemixin.VirtualTree, treemixin.D... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
定义主界面
- writer:linux_23; create: Thu Jun 05 09:28:28 2008 ; version:1; 创建
"""
import wx,os
import wx.lib.hyperlink as hl
from geosings.ui.core.MainImage import GetBitmapByName
from geosings.core.system import *
from friendpanel import *
from gispanel imp... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
进行配置的操作
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
from utils import TALK_CONF
import uuid
class GisData:
def get_gisdivs(self):
if 'GIS_DIVS' not in TALK_CONF:
TALK_CONF['GIS_DIVS'] = "[]"
divlists = TALK_CONF... | Python |
import bsddb
TALK_CONF = bsddb.hashopen('conf.db','c')
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
GIS树控件
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
import wx
from wx.lib.mixins import treemixin
from Const import *
from conf import *
from panels import GetImageByName, GetImageDirPath
class DemoTreeMixin(treemixin.VirtualTree, treemixin.D... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
进行配置的操作
- writer:linux_23; create: Jun 27 22:23:47 2008 ; version:1; 创建
"""
from utils import TALK_CONF
import uuid
class GisData:
def get_gisdivs(self):
if 'GIS_DIVS' not in TALK_CONF:
TALK_CONF['GIS_DIVS'] = "[]"
divlists = TALK_CONF... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
朋友列表面板
- writer:linux_23; create: Fri Jun 06 13:56:47 2008 ; version:1; 创建
"""
import wx,sys,os
import wx.lib.foldpanelbar as fpb
import wx.lib.hyperlink as hl
import xmpp
from geosings.ui.core.wxKeyParser import *
import cStringIO
from gispanel import *
... | Python |
#!/usr/bin/env python
# -*- encoding:utf8 -*-
# protoc-gen-erl
# Google's Protocol Buffers project, ported to lua.
# https://code.google.com/p/protoc-gen-lua/
#
# Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com
# All rights reserved.
#
# Use, modification and distribution are subject to the "New BSD License"
#... | 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 |
#
# Copyright (C) 2011 0xlab - http://0xlab.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Algoritmo de Cifrado/Descifrado en flujo A5/1
Copyright (C) 2012 Darío López Padial y César Aguilera
@bukosabino
@Cs4r
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Algoritmo de Cifrado/Descifrado en flujo A5/1
Copyright (C) 2012 Darío López Padial y César Aguilera
@bukosabino
@Cs4r
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public Licen... | Python |
#Transfer the original training data provided by JRS organization.
#The input may contain lots of zero values. To improve the I/O time,
#we eliminate the input to be as the form:
#AttrID:Value AttrID:Value ...
#-ktchuang
import sys
if len(sys.argv) <= 2:
print('Usage: python {0} LongInputFile EliminateOutp... | 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.