code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/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/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | Python |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-#
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | Python |
#!/usr/bin/python2.4
'''Load the latest update for a Twitter user and leave it in an XHTML fragment'''
__author__ = 'dewitt@google.com'
import codecs
import getopt
import sys
import twitter
TEMPLATE = """
<div class="twitter">
<span class="twitter-user"><a href="http://twitter.com/%s">Twitter</a>: </span>
<span... | Python |
#!/usr/bin/python2.4
'''Post a message to twitter'''
__author__ = 'dewitt@google.com'
import ConfigParser
import getopt
import os
import sys
import twitter
USAGE = '''Usage: tweet [options] message
This script posts a message to Twitter.
Options:
-h --help : print this help
--consumer-key : the twit... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | Python |
"""Implementation of JSONDecoder
"""
import re
import sys
import struct
from simplejson.scanner import make_scanner
try:
from simplejson._speedups import scanstring as c_scanstring
except ImportError:
c_scanstring = None
__all__ = ['JSONDecoder']
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
def _floatconst... | Python |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | Python |
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | Python |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | Python |
r"""Using simplejson from the shell to validate and
pretty-print::
$ echo '{"json":"obj"}' | python -msimplejson.tool
{
"json": "obj"
}
$ echo '{ 1.2:3.4}' | python -msimplejson.tool
Expecting property name: line 1 column 2 (char 2)
"""
import simplejson
def main():
import sys
if l... | Python |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# 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... | Python |
# editcarddialog.py
# this is a dialog to allow the user to edit a card.
import sys
from PyQt4 import QtGui, QtCore
from flashcard import *
class EditCardDialog(QtGui.QDialog):
def __init__(self, card, parent = None):
QtGui.QDialog.__init__(self, parent)
self.card = card
#print se... | Python |
# activecarddialog.py
# this is a dialog to allow the user to specify which cards from the vocab to be active
import sys
from PyQt4 import QtGui, QtCore
class ActiveCardDialog(QtGui.QDialog):
def __init__(self, vocab, parent=None):
QtGui.QDialog.__init__(self, parent)
self.vocab = vocab
... | Python |
# unicodecsv.py
# the csv module doesn't handle unicode, so we need this stuff too.
# I'm pretty sure there's overkill here for my purposes, but since I copied the code directly
# from the docs and don't fully understand it, I can't edit it to my likings.
import csv, codecs, cStringIO
def unicode_csv_reader(unicode_... | Python |
# editcarddialog.py
# this is a dialog to allow the user to edit the word types.
from PyQt4 import QtGui, QtCore
from wordtype import *
class WordTypeDialog(QtGui.QDialog):
def __init__(self, vocab, parent = None):
QtGui.QDialog.__init__(self, parent)
self.setWindowTitle('Edit Word Types')
... | Python |
# wordtype.py
# each word has its own configuarble fields
from PyQt4 import QtGui, QtCore
class WordType:
def __init__(self, parent, name, fields):
self.vocab = parent
self.name = name
self.fields = fields # this should be an array
def deleteField(self, fieldName):
for fi... | Python |
# flashcard.py
# this is the class for each card.
import sys
import string
import exceptions
from PyQt4 import QtGui, QtCore
from wordtype import *
class FileFormatError(exceptions.Exception):
def __init__(self, message = 'The file is not correctly formatted!'):
self.message = message
return
de... | Python |
# constants.py
# constnt to share between multiple files
flashblack_version = 'flashblack 0.3'
| Python |
#!/usr/bin/python
# flasblack.py
# launches the flashblack application
global flashblack_version
flashblack_version = 'flashblack 0.3'
import sys
from PyQt4 import QtGui, QtCore
from flashcardgui import FlashCardGui
app = QtGui.QApplication(sys.argv)
flashcards = FlashCardGui()
flashcards.show()
sys.exit(app.exec_(... | Python |
#!/usr/bin/python
# flashcardgui.py
# this is a PyQt gui for the greek flashcard program
from PyQt4 import QtGui, QtCore
from flashcard import FlashCard
from vocab import Vocab
from constants import flashblack_version
class FlashCardGui(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__ini... | Python |
# vocab.py
# this is the class for a collection of flash cards
from PyQt4 import QtGui, QtXml, QtCore
# QXmlStreamWriter might be in QtXml or QtCore so import all from both and don't specify module
from PyQt4.QtXml import *
from PyQt4.QtCore import *
import random, pdb, codecs, csv
from constants import flashblac... | Python |
# configdialog.py
# this is a dialog to allow the user to specify the change in difficulty of a card when you get it wrong or right
import sys
from PyQt4 import QtGui, QtCore
class ConfigDialog(QtGui.QDialog):
def __init__(self, vocab, parent=None):
QtGui.QDialog.__init__(self, parent)
se... | Python |
#!/usr/bin/python
# flashcardgui.py
# this is a PyQt gui for the greek flashcard program
from PyQt4 import QtGui, QtCore
from flashcard import FlashCard
from vocab import Vocab
from constants import flashblack_version
class FlashCardGui(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__ini... | Python |
#!/usr/bin/python
# flasblack.py
# launches the flashblack application
global flashblack_version
flashblack_version = 'flashblack 0.3'
import sys
from PyQt4 import QtGui, QtCore
from flashcardgui import FlashCardGui
app = QtGui.QApplication(sys.argv)
flashcards = FlashCardGui()
flashcards.show()
sys.exit(app.exec_(... | Python |
# editfontsdialog.py
# this is a dialog to allow the user to edit the fonts in a vocab.
import sys
from PyQt4 import QtGui, QtCore
class EditFontsDialog(QtGui.QDialog):
def __init__(self, vocab, parent = None):
QtGui.QDialog.__init__(self, parent)
self.vocab = vocab
self.fontEdits... | Python |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | Python |
#!/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 |
#!/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 |
#!/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 |
#!/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 |
#!/usr/bin/env python
#
# hanzim2dict
#
# Original version written by Michael Robinson (robinson@netrinsics.com)
# Version 0.0.2
# Copyright 2004
#
# 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... | Python |
# This tool convert KangXiZiDian djvu files to tiff files.
# Download djvu files: http://bbs.dartmouth.edu/~fangq/KangXi/KangXi.tar
# Character page info: http://wenq.org/unihan/Unihan.txt as kIRGKangXi field.
# Character seek position in Unihan.txt http://wenq.org/unihan/unihandata.txt
# DjVuLibre package provides the... | Python |
#!/usr/bin/python
# WinVNKey Hannom Database to Stardict dictionary source Conversion Tool
# coded by wesnoth@ustc on 070804
# http://winvnkey.sourceforge.net
import sys, os, string, types, pprint
infileencoding = 'utf-16-le'
outfileencoding = 'utf-8'
def showhelp():
print "Usage: %s filename" % sys.argv[0]
def isha... | Python |
#!/usr/bin/env python2
#
# converts XML JMDict to Stardict idx/dict format
# JMDict website: http://www.csse.monash.edu.au/~jwb/j_jmdict.html
#
# Date: 3rd July 2003
# Author: Alastair Tse <acnt2@cam.ac.uk>
# License: BSD (http://www.opensource.org/licenses/bsd-license.php)
#
# Usage: jm2stardict expects the file JMdi... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gimpfu import *
import os
def prepare_image(image, visibleLayers, size, numColors = None):
"""prepare custom image
image - image object to change
size - size of the image in pixels
visibleLayers - a list of layers that must be visible
"""
for layer in imag... | Python |
import sys, string
base = {}
for line in sys.stdin.readlines():
words = string.split(line[:-1], '\t')
if len(words) != 2:
print "Error!"
exit
if base.has_key(words[0]):
base[words[0]] += [words[1]]
else:
base[words[0]] = [words[1]]
keys = base.keys()
keys.sort()
for key in keys:
print key,'\t... | Python |
#!/usr/bin/env python
#
# uyghur2dict
# By Abdisalam (anatilim@gmail.com), inspired by Michael Robinson's hanzim2dict converter.
#
# Original version, hanzim2dict, written by Michael Robinson (robinson@netrinsics.com)
# Version 0.0.2
# Copyright 2004
#
# This program is free software; you can redistribute i... | Python |
import sys, string
for line in sys.stdin.readlines():
words = string.split(line[:-1], '\t')
muci = words[1]
sheng = words[2]
deng = words[3]
hu = words[4]
yunbu = words[5]
diao = words[6]
fanqie= words[7]
she = words[8]
chars = words[9]
romazi= words[10]
beizhu= words[12]
pinyin= word... | Python |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os, string, re, glob
import libxml2dom
fencoding = 'utf-8'
whattoextract = u'康熙字典'
#def TextInNode(node):
# result = u''
# for child in node.childNodes:
# if child.nodeType == child.TEXT_NODE:
# result += child.nodeValue
# else:
# result += TextInNode(child)
... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Script for decoding Lingea Dictionary (.trd) file
# Result is <header>\t<definition> file, convertable easily
# by stardict-editor from package stardict-tools into native
# Stardict dictionary (stardict.sf.net and www.stardict.org)
#
# Copyright (C) 2007 - Klokan Petr ... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
from pyglet.window import key, mouse
from pyglet.libs.darwin.quartzkey import keymap, charmap
from pyglet.libs.darwin.cocoapy import *
NSTrackingArea = ObjCClass('NSTrackingArea')
# Event data helper functions.
def getMouseDelta(nsevent):
dx = nsevent.deltaX()
dy = -nsevent.deltaY()
return int(round(dx)... | Python |
from pyglet.libs.darwin.cocoapy import *
from systemcursor import SystemCursor
NSNotificationCenter = ObjCClass('NSNotificationCenter')
NSApplication = ObjCClass('NSApplication')
class PygletDelegate_Implementation(object):
PygletDelegate = ObjCSubclass('NSObject', 'PygletDelegate')
@PygletDelegate.metho... | Python |
from pyglet.libs.darwin.cocoapy import *
# This class is a wrapper around NSCursor which prevents us from
# sending too many hide or unhide messages in a row. Apparently
# NSCursor treats them like retain/release messages, which can be
# problematic when we are e.g. switching between window & fullscreen.
class System... | Python |
import unicodedata
from pyglet.window import key
from pyglet.libs.darwin.cocoapy import *
NSArray = ObjCClass('NSArray')
NSApplication = ObjCClass('NSApplication')
# This custom NSTextView subclass is used for capturing all of the
# on_text, on_text_motion, and on_text_motion_select events.
class PygletTextView_Imp... | Python |
from pyglet.libs.darwin.cocoapy import *
class PygletWindow_Implementation(object):
PygletWindow = ObjCSubclass('NSWindow', 'PygletWindow')
@PygletWindow.method('B')
def canBecomeKeyWindow(self):
return True
# When the window is being resized, it enters into a mini event loop that
# only ... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
'''Wrapper for X11
Generated with:
tools/genwrappers.py xlib
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import ctypes
from ctypes import *
import pyglet.lib
_lib = pyglet.lib.load_library('X11')
_int_types = (c_int16, c_int32)
if hasattr(ctypes, 'c_int64'):
# Some b... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
'''Wrapper for Xinerama
Generated with:
tools/genwrappers.py xinerama
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import ctypes
from ctypes import *
import pyglet.lib
_lib = pyglet.lib.load_library('Xinerama')
_int_types = (c_int16, c_int32)
if hasattr(ctypes, 'c_int64')... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
'''Wrapper for Xxf86vm
Generated with:
tools/genwrappers.py xf86vmode
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import ctypes
from ctypes import *
import pyglet.lib
_lib = pyglet.lib.load_library('Xxf86vm')
_int_types = (c_int16, c_int32)
if hasattr(ctypes, 'c_int64'):... | Python |
'''Wrapper for Xi
Generated with:
tools/genwrappers.py xinput
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: wrap.py 1694 2008-01-30 23:12:00Z Alex.Holkner $'
import ctypes
from ctypes import *
import pyglet.lib
_lib = pyglet.lib.load_library('Xi')
_int_types = (c_int16, c_i... | Python |
# objective-ctypes
#
# Copyright (c) 2011, Phillip Nguyen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list o... | Python |
from ctypes import *
import sys, platform, struct
__LP64__ = (8*struct.calcsize("P") == 64)
__i386__ = (platform.machine() == 'i386')
PyObjectEncoding = b'{PyObject=@}'
def encoding_for_ctype(vartype):
typecodes = {c_char:b'c', c_int:b'i', c_short:b's', c_long:b'l', c_longlong:b'q',
c_ubyte:b'C... | Python |
from ctypes import *
from ctypes import util
from .runtime import send_message, ObjCInstance
from .cocoatypes import *
######################################################################
# CORE FOUNDATION
cf = cdll.LoadLibrary(util.find_library('CoreFoundation'))
kCFStringEncodingUTF8 = 0x08000100
CFAllocatorR... | Python |
# objective-ctypes
#
# Copyright (c) 2011, Phillip Nguyen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source code must retain the above copyright
# notice, this list o... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
import pyglet
# Cocoa implementation:
if pyglet.options['darwin_cocoa']:
from cocoapy import *
# Carbon implementation:
else:
from types import *
from constants import *
carbon = pyglet.lib.load_library(
framework='/System/Library/Frameworks/Carbon.framework')
# No 64-bit version of qui... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
#!/usr/bin/python
# $Id: $
import struct
from ctypes import *
import pyglet
import constants
from types import *
IS64 = struct.calcsize("P") == 8
_debug_win32 = pyglet.options['debug_win32']
if _debug_win32:
import traceback
_GetLastError = windll.kernel32.GetLastError
_SetLastError = ... | Python |
import ctypes
from pyglet import com
lib = ctypes.oledll.dinput8
LPVOID = ctypes.c_void_p
WORD = ctypes.c_uint16
DWORD = ctypes.c_uint32
LPDWORD = ctypes.POINTER(DWORD)
BOOL = ctypes.c_int
WCHAR = ctypes.c_wchar
UINT = ctypes.c_uint
HWND = ctypes.c_uint32
HANDLE = LPVOID
MAX_PATH = 260
DIENUM_STOP ... | Python |
#!/usr/bin/python
# $Id:$
import ctypes
lib = ctypes.windll.wintab32
LONG = ctypes.c_long
BOOL = ctypes.c_int
UINT = ctypes.c_uint
WORD = ctypes.c_uint16
DWORD = ctypes.c_uint32
WCHAR = ctypes.c_wchar
FIX32 = DWORD
WTPKT = DWORD
LCNAMELEN = 40
class AXIS(ctypes.Structure):
_fields_ = (
... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import time
from pyglet.media import AbstractAudioPlayer, AbstractAudioDriver, \
MediaThread, MediaEvent
import pyglet
_debug = pyglet.options['debug_media']
class SilentAudioPacket(object):
def __in... | Python |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import sys
import lib_pulseaudio as pa
from pyglet.media import AbstractAudioDriver, AbstractAudioPlayer, \
AbstractListener, MediaException, MediaEvent
import pyglet
_debug = pyglet.options['debug_media']
def check(result... | Python |
'''Wrapper for pulse
Generated with:
tools/genwrappers.py pulseaudio
Do not modify this file.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: wrap.py 1694 2008-01-30 23:12:00Z Alex.Holkner $'
import ctypes
from ctypes import *
import pyglet.lib
_lib = pyglet.lib.load_library('pulse')
_int_types = (c_... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
#!/usr/bin/python
# $Id:$
import ctypes
import math
import sys
import threading
import time
import lib_dsound as lib
from pyglet.media import MediaException, MediaThread, AbstractAudioDriver, \
AbstractAudioPlayer, MediaEvent
from pyglet.window.win32 import _user32, _kernel32
import pyglet
_debug ... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | Python |
# Uses the HID API introduced in Mac OS X version 10.5
# http://developer.apple.com/library/mac/#technotes/tn2007/tn2187.html
import sys
__LP64__ = (sys.maxint > 2**32)
from pyglet.libs.darwin.cocoapy import *
# Load iokit framework
iokit = cdll.LoadLibrary(util.find_library('IOKit'))
# IOKit constants from
# /Syst... | Python |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import ctypes
import pyglet
from pyglet.input.base import \
Device, DeviceException, DeviceOpenException, \
Control, Button, RelativeAxis, AbsoluteAxis
from pyglet.libs.x11 import xlib
from pyglet.compat import asstr
try... | Python |
#!/usr/bin/env python
'''
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import ctypes
import pyglet
from pyglet.input.base import Tablet, TabletCanvas, TabletCursor
from pyglet.window.carbon import CarbonEventHandler
from pyglet.libs.darwin import *
from pyglet.libs.darwin import _oscheck
class Car... | Python |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | 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.