repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
mvpeng/bpm-playlists
refs/heads/master
bpm_playlists/settings.py
1
""" Django settings for bpm_playlists project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import...
mario21ic/python_curso
refs/heads/master
session2/13_sets.py
1
# -*- coding: utf-8 -*- print "#"*3 +" Sets "+"#"*3 print "" print "## Definiendo ##""" mi_set = set() mi_set.add('juan') mi_set.add('viki') mi_set.add('nati') print "mi_set:",mi_set otro = set(['juan', 'karina', 'diana']) print "otro:",otro print "" print "## Operaciones ##""" print "mi_set.intersection(otro)",mi_s...
mkoistinen/cmsplugin-form-handler
refs/heads/master
test_project/urls.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from cms.sitemaps import CMSSitemap from django.conf import settings from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin from django.contrib.sitemaps.v...
wagtail/wagtail
refs/heads/stable/2.13.x
wagtail/contrib/routable_page/models.py
6
from django.http import Http404 from django.template.response import TemplateResponse from django.urls import URLResolver, re_path from django.urls.resolvers import RegexPattern from wagtail.core.models import Page from wagtail.core.url_routing import RouteResult _creation_counter = 0 def route(pattern, name=None)...
OpenUpgrade-dev/OpenUpgrade
refs/heads/8.0
addons/hr_recruitment/__init__.py
433
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
Coburn37/js-beautify
refs/heads/master
python/jsbeautifier/unpackers/tests/testurlencode.py
111
# # written by Stefano Sanfilippo <a.little.coder@gmail.com> # """Tests for urlencoded unpacker.""" import unittest from jsbeautifier.unpackers.urlencode import detect, unpack # pylint: disable=R0904 class TestUrlencode(unittest.TestCase): """urlencode test case.""" def test_detect(self): """Tes...
r0jsik/rinde
refs/heads/master
example_2/stage/__init__.py
1
from rinde.stage import ControllerBase # Controller must be a subclass of rinde.stage.ControllerBase class Controller(ControllerBase): # Method invoked when stage gets ready def start(self): # self.nodes[ID] returns a reference to the component which is defined in a XML file with the ID attribute self.canv...
b0ttl3z/SickRage
refs/heads/master
lib/twilio/rest/resources/addresses.py
46
from twilio.exceptions import TwilioException from twilio.rest.resources import InstanceResource, ListResource class DependentPhoneNumber(InstanceResource): """A purchased phone number that depends on a particular :class:`Address`. Attributes are the same as :class:`PhoneNumber`. DependentPhoneNumbe...
showell/zulip
refs/heads/master
zerver/webhooks/papertrail/tests.py
3
from urllib.parse import urlencode from zerver.lib.test_classes import WebhookTestCase class PapertrailHookTests(WebhookTestCase): STREAM_NAME = 'papertrail' URL_TEMPLATE = "/api/v1/external/papertrail?&api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = 'papertrail' def test_short_message(self) -...
willprice/arduino-sphere-project
refs/heads/master
scripts/example_direction_finder/temboo/Library/Google/Plus/People/List.py
5
# -*- coding: utf-8 -*- ############################################################################### # # List # Returns all of the people who the authenticated user has added to one or more circles. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 ...
cpieloth/dojo_tdd_templates
refs/heads/master
python3/dojo.py
1
#!/usr/bin/env python3 import sys import dojo.calculator as calc if __name__ == '__main__': sys.exit(calc.main())
utarsuno/urbtek
refs/heads/dev
compression_algorithm/database_layer.py
1
# coding=utf-8 """ This module, database_layer.py, will act as an interface between the database and the compression algorithm. """ #CompressionAlgorithmTable = CC('Track data for the compression algorithm.') #name = PV('\'compression_algorithm\'') #c(""" #self.fields.append(TableField('bit(64)' ...
christopher-henderson/Banker
refs/heads/master
Banker/common/admin.py
13848
from django.contrib import admin # Register your models here.
einaru/luma
refs/heads/master
luma/plugins/search/gui/__init__.py
45
# -*- coding: utf-8 -*- # # Copyright (c) 2011 Luma developement team # # 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 2 of the License, or # (at your option) any later version. ...
senchp/tweet_reader
refs/heads/master
manage_streamer.py
1
from twython import Twython from twython import TwythonRateLimitError from subprocess import Popen, PIPE from time import sleep import signal import sys from utils import read_aloud #start-up the streamers asynchronously: streamer = Popen(["python", "read_stream.py"]) dm_streamer = Popen(["python", "read_dms.py"]) #p...
ThomasFeher/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/waf_unit_test.py
267
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys from waflib.TaskGen import feature,after_method from waflib import Utils,Task,Logs,Options testlock=Utils.threading.Lock() @feature('test') @after_method('apply_...
impowski/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py
241
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface SpecialMethodSignatureMismatch1 { getter long long foo(long index); }; """) results = parser.finish() except: threw = True harness.ok(threw, "Should have...
Iconoclasteinc/tgit
refs/heads/master
tgit/announcer.py
1
# -*- coding: utf-8 -*- # # TGiT, Music Tagger for Professionals # Copyright (C) 2013 Iconoclaste Musique Inc. # # 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 2 # of the License...
hainm/numpy
refs/heads/master
doc/cdoc/numpyfilter.py
108
#!/usr/bin/env python """ numpyfilter.py INPUTFILE Interpret C comments as ReStructuredText, and replace them by the HTML output. Also, add Doxygen /** and /**< syntax automatically where appropriate. """ from __future__ import division, absolute_import, print_function import sys import re import os import textwrap ...
Edraak/edx-platform
refs/heads/master
common/djangoapps/util/keyword_substitution.py
148
""" keyword_substitution.py Contains utility functions to help substitute keywords in a text body with the appropriate user / course data. Supported: LMS: - %%USER_ID%% => anonymous user id - %%USER_FULLNAME%% => User's full name - %%COURSE_DISPLAY_NAME%% => display name of the course ...
Lilykos/invenio
refs/heads/master
invenio/legacy/batchuploader/templates.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2012, 2013, 2014 CERN. # # Invenio 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 2 of the # License, or (a...
mavenlin/tensorflow
refs/heads/master
tensorflow/python/training/checkpoint_utils_test.py
49
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
srm912/servo
refs/heads/master
components/script/dom/bindings/codegen/BindingGen.py
150
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import sys import os sys.path.append(os.path.join(".", "parser")) sys.path.append(os.path.join(".", "ply")) import cPick...
allotria/intellij-community
refs/heads/master
python/testData/codeInsight/controlflow/exit.py
80
a = read() if a.startswith("Exit"): exit(a[5,].to_i) else: print a exit(0)
eckucukoglu/arm-linux-gnueabihf
refs/heads/master
lib/python2.7/lib2to3/pgen2/conv.py
325
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
antonve/s4-project-mooc
refs/heads/master
common/djangoapps/course_about/tests/test_views.py
19
""" Tests for user enrollment. """ import ddt import json import unittest from django.test.utils import override_settings from django.core.urlresolvers import reverse from rest_framework.test import APITestCase from rest_framework import status from django.conf import settings from datetime import datetime from mock i...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_xdrlib.py
95
from test import test_support import unittest import xdrlib class XDRTest(unittest.TestCase): def test_xdr(self): p = xdrlib.Packer() s = 'hello world' a = ['what', 'is', 'hapnin', 'doctor'] p.pack_int(42) p.pack_int(-17) p.pack_uint(9) p.pack_bool(True) ...
yfsun/FoodMe
refs/heads/master
node_modules/cordova/node_modules/plugman/node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_vcproj.py
2637
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Make the format of a vcproj really pretty. This script normalize and sort an xml. It also fetches all the properties inside linked...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/host/lib/python2.7/test/test_select.py
39
from test import test_support import unittest import select import os import sys @unittest.skipIf(sys.platform[:3] in ('win', 'os2', 'riscos'), "can't easily test on this system") class SelectTestCase(unittest.TestCase): class Nope: pass class Almost: def fileno(self): ...
ldoktor/autotest
refs/heads/master
client/shared/hosts/common.py
8
import os, sys dirname = os.path.dirname(sys.modules[__name__].__file__) client_dir = os.path.abspath(os.path.join(dirname, "..", "..")) sys.path.insert(0, client_dir) import setup_modules sys.path.pop(0) setup_modules.setup(base_path=client_dir, root_module_name="autotest.client")
jayme-github/CouchPotatoServer
refs/heads/master
libs/guessit/transfo/guess_date.py
150
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
phobson/seaborn
refs/heads/master
seaborn/tests/test_axisgrid.py
3
import warnings import numpy as np import pandas as pd from scipy import stats import matplotlib as mpl import matplotlib.pyplot as plt from distutils.version import LooseVersion import pytest import nose.tools as nt import numpy.testing as npt from numpy.testing.decorators import skipif try: import pandas.testin...
KevinOConnor/ptkei
refs/heads/master
empire.py
1
#!/usr/bin/env python """Main initialization file for empire client.""" # Copyright (C) 1998-1999 Kevin O'Connor # # 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 2 o...
yangming85/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/gis/db/backends/oracle/compiler.py
360
from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler from django.db.backends.oracle import compiler SQLCompiler = compiler.SQLCompiler class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler): pass class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler): def pla...
spadae22/odoo
refs/heads/chris_master_8
addons/payment_ogone/models/ogone.py
33
# -*- coding: utf-'8' "-*-" from hashlib import sha1 import logging from lxml import etree, objectify from pprint import pformat import time from datetime import datetime from urllib import urlencode import urllib2 import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp...
Codlydodly/python-client
refs/heads/master
main.py
1
import math import random import time from collections import deque from pyglet import image from pyglet.gl import * from pyglet.graphics import TextureGroup from pyglet.window import key, mouse import socket TCP_IP = '127.0.0.1' TCP_PORT = 5005 BUFFER_SIZE = 1024 import socket TCP_IP = '127.0.0.1' TCP_PORT = 5005...
knxd/PyKNyX
refs/heads/master
pyknyx/stack/layer7/apci.py
2
# -*- coding: utf-8 -*- """ Python KNX framework License ======= - B{PyKNyX} (U{https://github.com/knxd/pyknyx}) is Copyright: - © 2016-2017 Matthias Urlichs - PyKNyX is a fork of pKNyX - © 2013-2015 Frédéric Mantegazza This program is free software you can redistribute it and/or modify it under the terms o...
aimalz/chippr
refs/heads/master
chippr/mvn.py
1
# Wrapper for pomegranate.distributions.MultivariateGaussianDistribution import sys import numpy as np from pomegranate.distributions import MultivariateGaussianDistribution as MGD import chippr from chippr import defaults as d from chippr import utils as u class mvn(object): def __init__(self, mean, var): ...
rahul67/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/connection.py
49
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010 Google # Copyright (c) 2008 rPath, Inc. # Copyright (c) 2009 The Echo Nest Corporation # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All...
OpenUpgrade/OpenUpgrade
refs/heads/8.0
addons/base_import/tests/test_cases.py
53
# -*- encoding: utf-8 -*- import csv import io import unittest2 from openerp.tests.common import TransactionCase from .. import models ID_FIELD = { 'id': 'id', 'name': 'id', 'string': "External ID", 'required': False, 'fields': [], } def make_field(name='value', string='unknown', required=False...
timothyparez/PyBitmessage
refs/heads/master
src/proofofwork.py
2
#import shared #import time #from multiprocessing import Pool, cpu_count import hashlib from struct import unpack, pack import sys from debug import logger from shared import config, frozen, codePath, shutdown, safeConfigGetBoolean, UISignalQueue import openclpow import tr import os import ctypes def _set_idle(): ...
chbpku/rpi.sessdsa
refs/heads/master
代码/04 Web遥控小车.py
1
import cherrypy import os from cherrypy.lib.static import serve_file import RPi.GPIO as GPIO import time base_dir = os.path.dirname(os.path.realpath(__file__)) class CAR: IN1 = 11 IN2 = 12 IN3 = 13 IN4 = 15 PIN1 = 31 PIN2 = 32 PIN3 = 33 PIN4 = 35 PIN5 = 36 PIN6 = 37 PIN7 = 38 PIN8 = 40 Trig ...
XperiaSTE/android_external_bluetooth_bluez
refs/heads/5.38
test/bluezutils.py
90
import dbus SERVICE_NAME = "org.bluez" ADAPTER_INTERFACE = SERVICE_NAME + ".Adapter1" DEVICE_INTERFACE = SERVICE_NAME + ".Device1" def get_managed_objects(): bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.freedesktop.DBus.ObjectManager") return manager.GetManagedObjects(...
Kiiv/Sick-Beard
refs/heads/development
lib/guessit/hash_mpc.py
150
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
nikklassen/ycmd
refs/heads/master
cpp/ycm/tests/gmock/scripts/generator/cpp/keywords.py
1157
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions 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...
dagwieers/ansible-modules-core
refs/heads/devel
files/replace.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Evan Kaufman <evan@digitalflophouse.com # # This file is part of Ansible # # Ansible 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 t...
kevinsawicki/node-gyp
refs/heads/master
gyp/test/sanitize-rule-names/script.py
344
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import shutil import sys shutil.copyfile(*sys.argv[1:])
dudonwai/dudonsblog
refs/heads/master
Lib/site-packages/django/http/response.py
82
from __future__ import unicode_literals import datetime import json import re import sys import time from email.header import Header from django.conf import settings from django.core import signals, signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.json import DjangoJSONEncode...
motion2015/a3
refs/heads/a3
openedx/core/djangoapps/user_api/tests/test_middleware.py
26
"""Tests for user API middleware""" from mock import Mock, patch from unittest import TestCase from django.http import HttpResponse from django.test.client import RequestFactory from student.tests.factories import UserFactory, AnonymousUserFactory from ..tests.factories import UserCourseTagFactory from ..middleware ...
sasukeh/cinder
refs/heads/master
cinder/api/views/availability_zones.py
57
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # 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 ...
vinayan3/clpricehistory
refs/heads/master
django/contrib/localflavor/br/br_states.py
437
# -*- coding: utf-8 -*- """ An alphabetical list of Brazilian states for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ STATE_CHOICES = ( ('AC', 'Acre'), ('AL', 'Alagoas'), ('AP', u'Amapá'), ('AM', 'Amazonas'), ...
liulion/mayavi
refs/heads/master
mayavi/tests/csv_files/1col.py
5
{ 'array': array([(5.552,), (5.963,), (6.135,), (6.313,), (6.713,)], dtype=[('x-values', '<f8')]), 'kwds': { 'comments': '#', 'delimiter': None, 'dtype': {'formats': (float,), 'names...
Varriount/Colliberation
refs/heads/master
libs/twisted/test/plugin_basic.py
62
# Copyright (c) 2005 Divmod, Inc. # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # Don't change the docstring, it's part of the tests """ I'm a test drop-in. The plugin system's unit tests use me. No one else should. """ from zope.interface import classProvides from twisted.plugin import I...
mhuwiler/rootauto
refs/heads/mhuwiler
interpreter/llvm/src/utils/DSAextract.py
124
#! /usr/bin/python #this is a script to extract given named nodes from a dot file, with #the associated edges. An edge is kept iff for edge x -> y # x and y are both nodes specified to be kept. #known issues: if a line contains '->' and is not an edge line #problems will occur. If node labels do not begin with #Nod...
gzorin/OpenShadingLanguage
refs/heads/dev/gzorin/delegate-compile
testsuite/MaterialX/mx_max/mx_max_vector/run.py
64
#!/usr/bin/env python import os loc = os.environ["OSLHOME"] + os.environ["MATERIALX_OSOS"]+ "/" def buildCmd(shader, inputs): cmd = "--print " for pName, pValue in inputs.iteritems(): cmd += " -param " + pName + " " + pValue cmd += " " + shader + " -o out mx.exr" return cmd inputs = { "in1" : "0.1,0...
dbbhattacharya/kitsune
refs/heads/master
vendor/packages/Werkzeug/tests/contrib/test_fixers.py
8
from nose.tools import assert_raises from werkzeug import Request, Response, Client, create_environ, \ ResponseCacheControl, parse_cache_control_header from werkzeug.contrib import fixers @Request.application def path_check_app(request): return Response('PATH_INFO: %s\nSCRIPT_NAME: %s' % ( request.en...
dlintott/gns3
refs/heads/master
src/GNS3/Ui/ConfigurationPages/Page_PreferencesVirtualBox.py
3
# -*- coding: utf-8 -*- # vim: expandtab ts=4 sw=4 sts=4: # # Copyright (C) 2007-2011 GNS3 Development Team (http://www.gns3.net/team). # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation...
sidmitra/django_nonrel_testapp
refs/heads/master
django/db/backends/signals.py
1430
from django.dispatch import Signal connection_created = Signal(providing_args=["connection"])
BioroboticsLab/diktya
refs/heads/master
diktya/gan.py
1
# Copyright 2015 Leon Sixt # # 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 agreed to in writing, sof...
bdeggleston/cassandra-dtest
refs/heads/master
pushed_notifications_test.py
5
import time import pytest import logging from datetime import datetime from distutils.version import LooseVersion from threading import Event from cassandra import ConsistencyLevel as CL from cassandra import ReadFailure from cassandra.query import SimpleStatement from ccmlib.node import Node, TimeoutError from dtes...
zhangxiaoli73/BigDL
refs/heads/master
pyspark/setup.py
5
#!/usr/bin/env python # # Copyright 2016 The BigDL Authors. # # 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 applicab...
tanayseven/Voix
refs/heads/master
flask/lib/python2.7/site-packages/flup/server/__init__.py
7
# class NoDefault(object): pass __all__ = [ 'NoDefault', ]
neoareslinux/neutron
refs/heads/master
neutron/tests/fullstack/resources/config.py
7
# Copyright 2015 Red Hat, 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 or agre...
Hypernode/xtraceback
refs/heads/develop
test_support/python/3.1.5/test/badsyntax_nocaret.py
238
def f(x): [x for x in x] = x
dfalt974/SickRage
refs/heads/master
lib/pgi/gtype.py
19
# Copyright 2012 Christoph Reiter # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. from ctypes import byref ...
linkian209/Destiny_RNN
refs/heads/master
manifest/request.py
1
import requests, zipfile, os import json, sqlite3 import pickle #Optional #Reading the Destiny API Manifest in Python. [How I Did It, Anyway] weapon_types = ['Rocket Launcher', 'Scout Rifle', 'Fusion Rifle', 'Sniper Rifle', 'Shotgun', 'Machine Gun', 'Pulse Rifle', 'Auto Rifle', 'Hand Cannon', 'Sidear...
viur-framework/server
refs/heads/master
bones/captchaBone.py
1
# -*- coding: utf-8 -*- from server.bones import bone from server import request, utils from google.appengine.api import urlfetch import urllib import logging import json class captchaBone( bone.baseBone ): type = "captcha" def __init__(self, publicKey=None, privateKey=None, *args, **kwargs ): bone.baseBone.__in...
mjg/Impressive-svn
refs/heads/trunk
src/defaults.py
2
TopLeft, BottomLeft, TopRight, BottomRight, TopCenter, BottomCenter = range(6) NoCache, MemCache, CompressedCache, FileCache, PersistentCache = range(5) # for CacheMode Off, First, Last = range(3) # for AutoOverview # You may change the following lines to modify the default settings Verbose = False Fullscreen ...
xbmc/atv2
refs/heads/atv2
xbmc/lib/libPython/Python/Mac/Tools/IDE/Wmenus.py
4
import FrameWork import Wbase, Wcontrols from Carbon import Ctl, Controls, Qd, Res from types import * import Wapplication #_arrowright = Qd.GetPicture(472) #_arrowdown = Qd.GetPicture(473) _arrowright = Res.Resource( '\x00I\x00\x00\x00\x00\x00\n\x00\n\x11\x01\x01\x00\n\x00\x00\x00' '\x00\x00\n\x00\n\...
metalman/webmailbox
refs/heads/master
setup.py
1
import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(*rnames)).read() setup(name='webmailbox', version='0.1dev', author='Kaizhao Zhang', author_email='zhangkaizhao@gmail.com', license='MIT', description="Web mailbox to manage mails.", ...
mesosphere/simoorg
refs/heads/master
src/simoorg/plugins/topology/__init__.py
8
# # Copyright 2015 LinkedIn Corp. All rights reserved. # # 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 ...
TylerSandman/py-bst
refs/heads/master
pybst/splaytree.py
4
#!/usr/bin/env python # Author: Tyler Sanderson <tylerbtbam@gmail.com> # # This file is part of PyBST. # # PyBST 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 # (a...
kozko2001/libcaca
refs/heads/master
python/caca/__init__.py
2
# -*- coding: utf-8 -*- # # libcaca Colour ASCII-Art library # Python language bindings # Copyright (c) 2010 Alex Foulon <alxf@lavabit.com> # All Rights Reserved # # This library is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redis...
Emilgardis/falloutsnip
refs/heads/develop
scripts/plugins/CopyTo.py
2
# # Copy to Example # # Copy Selected Group or Record to another plugin or new plugin # from shared.util import * import System import FalloutSnip.Domain from FalloutSnip.Domain.Model import BaseRecord, Record, Plugin, SubRecord, GroupRecord from System import TimeSpan from System.Diagnostics import Stopwatch def ...
clair3st/Data-Structures
refs/heads/master
src/stack.py
1
"""Stack implementation in Python.""" from src.linked_list import LinkedList class Stack(object): """Implementation of Stack. public methods: push(value) - Adds a value to the stack. The parameter is the value to be added to the stack. pop() - Removes a value from the stack and returns that val...
munyirik/python
refs/heads/develop
cpython/Lib/lib2to3/fixes/fix_sys_exc.py
203
"""Fixer for sys.exc_{type, value, traceback} sys.exc_type -> sys.exc_info()[0] sys.exc_value -> sys.exc_info()[1] sys.exc_traceback -> sys.exc_info()[2] """ # By Jeff Balogh and Benjamin Peterson # Local imports from .. import fixer_base from ..fixer_util import Attr, Call, Name, Number, Subscript, Node, syms clas...
hargup/sympy
refs/heads/master
sympy/printing/mathematica.py
56
""" Mathematica code printer """ from __future__ import print_function, division from sympy.printing.codeprinter import CodePrinter from sympy.printing.str import StrPrinter from sympy.printing.precedence import precedence # Used in MCodePrinter._print_Function(self) known_functions = { "exp": [(lambda x: True, "...
SecondLiners/GO2
refs/heads/master
motd_db.py
1
""" motd class for Gig-o-Matic 2 Aaron Oppenheimer 24 August 2013 """ from google.appengine.ext import ndb # # class for Motd # class Motd(ndb.Model): """ Models a message of the day """ value = ndb.TextProperty() last_update = ndb.DateTimeProperty(auto_now=True) def set_motd(value): """ sets ...
manjunaths/tensorflow
refs/heads/master
tensorflow/compiler/tests/unary_ops_test.py
21
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
SkyPicker/Skywall
refs/heads/master
skywall/core/config.py
1
import os import re from ruamel import yaml from skywall.core.settings import settings_registry from skywall.core.signals import Signal before_config_load = Signal('before_config_load') after_config_load = Signal('after_config_load') before_config_save = Signal('before_config_save') after_config_save = Signal('after_...
bkochendorfer/reviewboard
refs/heads/master
reviewboard/extensions/tests.py
3
from __future__ import unicode_literals from contextlib import contextmanager from django.contrib.auth.models import User from django.core import mail from django.template import Context, Template from django.test.client import RequestFactory from django.utils import six from djblets.extensions.manager import Extensi...
was4444/chromium.src
refs/heads/nw15
tools/memory_inspector/memory_inspector/core/symbol.py
107
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Symbols(object): """A dictionary of symbols indexed by the key 'exec_path+0xoffset'.""" def __init__(self): self.symbols = {} # 'foo.so+0x12...
brchiu/tensorflow
refs/heads/master
tensorflow/contrib/ignite/python/ops/ignite_dataset_ops.py
4
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # 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 applicabl...
geosolutions-it/wps-remote
refs/heads/master
src/wpsremote/config_file_parameter.py
2
# (c) 2016 Open Source Geospatial Foundation - all rights reserved # (c) 2014 - 2015 Centre for Maritime Research and Experimentation (CMRE) # (c) 2013 - 2014 German Aerospace Center (DLR) # This code is licensed under the GPL 2.0 license, available at the root # application directory. import path import input_paramet...
kuno/ansible
refs/heads/devel
lib/ansible/runner/lookup_plugins/redis_kv.py
3
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible 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 ver...
Zymo-Research/mirror-seq
refs/heads/master
mirror_seq/trimming.py
1
def trim_paired_seqs(seq1, qual1, seq2, qual2, read_len): ''' Trim off Mirror-seq filled-in nucleoties. For read 1, trim off the last three nucleotides if they are CGA. For read 2, trim off the first two nucleotides. Parameters ---------- seq1 : str The read 1 sequence. qual1 : str ...
kartikgupta0909/mozilla-mozharness
refs/heads/master
mozharness/mozilla/mozbase.py
13
import os from mozharness.base.script import PreScriptAction class MozbaseMixin(object): """Automatically set virtualenv requirements to use mozbase from test package. """ def __init__(self, *args, **kwargs): super(MozbaseMixin, self).__init__(*args, **kwargs) @PreScriptAction('create-...
whardier/AMIty
refs/heads/master
test/poll.py
1
import amity import socket import logging import tornado.ioloop if __name__ == "__main__": import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format='%(asctime)s %(process)d %(filename)s %(lineno)d %(levelname)s #| %(message)s', datefmt='%H:%M:%S') ioloop = tornado.i...
MiLk/ansible
refs/heads/devel
test/units/modules/cloud/docker/test_docker.py
77
import collections import os import unittest from ansible.modules.cloud.docker._docker import get_split_image_tag class DockerSplitImageTagTestCase(unittest.TestCase): def test_trivial(self): self.assertEqual(get_split_image_tag('test'), ('test', 'latest')) def test_with_org_name(self): sel...
bradleypj823/swift
refs/heads/master
swift/common/middleware/x_profile/exceptions.py
56
# Copyright (c) 2010-2012 OpenStack, LLC. # # 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 agreed to ...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lz1988/django-web2015
refs/heads/master
django/contrib/gis/geometry/backend/geos.py
315
from django.contrib.gis.geos import ( GEOSGeometry as Geometry, GEOSException as GeometryException)
smakonin/SparseNILM
refs/heads/master
train_SSHMM.py
1
#!/usr/bin/env python3 # # Make a super-state hidden Markov model for evaluation (train_SSHMM.py) # Copyright (C) 2013-2015 Stephen Makonin. All Right Reserved. # import sys, json from statistics import mean from time import time from datetime import datetime from libDataLoaders import dataset_loader from libFolding i...
yuriyarhipov/ocr_python_google_cloud_vision
refs/heads/master
test_api.py
1
#!/home/arhipov/.virtualenvs/ocr_python/bin/python import requests from base64 import b64encode import json def make_image_data(image_filename): with open(image_filename, 'rb') as f: ctxt = b64encode(f.read()).decode() return json.dumps({"requests": { 'image': {'content': ctxt}, ...
ktritz/vispy
refs/heads/master
vispy/visuals/tests/test_linear_region.py
4
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Tests for LinearRegionVisual All images are of size (100,100) to keep a small file size """ import numpy as np from vispy.scene import visuals from vispy.testing import ...
intermezzo-fr/onedrive-d
refs/heads/master
onedrive_d/tests/api/test_items.py
2
__author__ = 'xb' import unittest from onedrive_d import str_to_datetime from onedrive_d.api import facets from onedrive_d.api import items from onedrive_d.api import resources from onedrive_d.tests import get_data from onedrive_d.tests import to_underscore_name from onedrive_d.tests.api.drive_factory import get_samp...
pypa/pip
refs/heads/main
tests/lib/test_wheel.py
4
"""Tests for wheel helper. """ import csv from email import message_from_string from email.message import Message from functools import partial from zipfile import ZipFile from tests.lib.wheel import ( _default, make_metadata_file, make_wheel, make_wheel_metadata_file, message_from_dict, ) def te...
gpoesia/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/tests/support.py
450
from __future__ import absolute_import, division, unicode_literals import os import sys import codecs import glob import xml.sax.handler base_path = os.path.split(__file__)[0] test_dir = os.path.join(base_path, 'testdata') sys.path.insert(0, os.path.abspath(os.path.join(base_path, ...
drawks/ansible
refs/heads/devel
test/sanity/code-smell/symlinks.py
48
#!/usr/bin/env python import os def main(): skip_dirs = set([ '.tox', ]) for root, dirs, files in os.walk('.'): for skip_dir in skip_dirs: if skip_dir in dirs: dirs.remove(skip_dir) if root == '.': root = '' elif root.startswith('....
klusta-team/kwiklib
refs/heads/master
kwiklib/utils/tests/test_params.py
1
"""Handle user-specified and default parameters.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- from kwiklib import (python_to_pydict, pydict_to_python, load_default_params, get_params) d...