repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
drglove/SickRage
refs/heads/master
lib/chardet/hebrewprober.py
2928
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
FlaPer87/django-nonrel
refs/heads/master
django/contrib/localflavor/id/id_choices.py
65
from django.utils.translation import ugettext_lazy as _ # Reference: http://id.wikipedia.org/wiki/Daftar_provinsi_Indonesia # Indonesia does not have an official Province code standard. # I decided to use unambiguous and consistent (some are common) 3-letter codes. PROVINCE_CHOICES = ( ('BLI', _('Bali')), ('...
JioCloud/horizon
refs/heads/master
openstack_dashboard/dashboards/admin/networks/ports/tabs.py
21
# Copyright 2012 NEC Corporation # # 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...
yavalvas/yav_com
refs/heads/master
build/matplotlib/examples/api/date_index_formatter.py
6
""" When plotting time series, eg financial time series, one often wants to leave out days on which there is no data, eh weekends. The example below shows how to use an 'index formatter' to achieve the desired plot """ from __future__ import print_function import numpy as np import matplotlib.pyplot as plt import matp...
kinzhang/cocos2d-js-v3.2
refs/heads/master
frameworks/js-bindings/cocos2d-x/setup.py
2
#!/usr/bin/python # coding=utf-8 """**************************************************************************** Copyright (c) 2014 cocos2d-x.org http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), ...
ndtran/compassion-modules
refs/heads/master
contract_compassion/tests/__init__.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Albert SHENOUDA <[email protected]> # # The licence is in the fi...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Pillow-2.3.0-py2.7-linux-x86_64.egg/PIL/WebPImagePlugin.py
7
from PIL import Image from PIL import ImageFile from io import BytesIO from PIL import _webp _VALID_WEBP_MODES = { "RGB": True, "RGBA": True, } _VP8_MODES_BY_IDENTIFIER = { b"VP8 ": "RGB", b"VP8X": "RGBA", b"VP8L": "RGBA", # lossless } def _accept(prefix): is_riff_file_format = pref...
gauravbose/digital-menu
refs/heads/master
tests/schema/tests.py
6
import datetime import itertools import unittest from copy import copy from django.db import ( DatabaseError, IntegrityError, OperationalError, connection, ) from django.db.models import Model from django.db.models.fields import ( BigIntegerField, BinaryField, BooleanField, CharField, DateTimeField, Intege...
michalkurka/h2o-3
refs/heads/master
h2o-py/tests/testdir_misc/pyunit_melt.py
2
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Pyunit for h2o.melt""" from __future__ import print_function import sys sys.path.insert(1,"../../") import pandas as pd from h2o.frame import H2OFrame from tests import pyunit_utils def melt_compare(df, **kwargs): frozen_h2o = H2OFrame(df) melted_h2o = frozen...
edx/xblock-sdk
refs/heads/master
setup.py
2
"""Set up for XBlock SDK""" import os import os.path from setuptools import setup def find_package_data(pkg, data_paths): """Generic function to find package_data for `pkg` under `root`.""" data = [] for data_path in data_paths: package_dir = pkg.replace(".", "/") for dirname, _, files i...
Delmonte3161/heroes-parser
refs/heads/master
s2protocol/protocol19458.py
28
# Copyright (c) 2013 Blizzard Entertainment # # 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, copy, modify, merge, publi...
skoczen/skoczen
refs/heads/master
project/apps/manual/migrations/0015_adds_lunar_day.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Don't use "from appname.models imp...
ASIX-ALS/asix-final-project-frontend
refs/heads/develop
node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
1509
# Copyright (c) 2013 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. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp import glob class VisualStudi...
wfxiang08/django185
refs/heads/master
tests/initial_sql_regress/models.py
77
""" Regression tests for initial SQL insertion. """ from django.db import models class Simple(models.Model): name = models.CharField(max_length=50)
JNRowe/upoints
refs/heads/main
tests/test_osm.py
1
# """test_osm - Test osm support""" # Copyright © 2012-2021 James Rowe <[email protected]> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of upoints. # # upoints 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 S...
BeDjango/intef-openedx
refs/heads/master
lms/djangoapps/courseware/tests/test_field_overrides.py
36
""" Tests for `field_overrides` module. """ import unittest from nose.plugins.attrib import attr from django.test.utils import override_settings from xblock.field_data import DictFieldData from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ( ModuleStore...
rohe/saml2test2
refs/heads/master
testtool/idp_test/__init__.py
22
__author__ = 'roland'
linktlh/Toontown-journey
refs/heads/master
toontown/effects/FireworkShowMixin.py
1
from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase import TTLocalizer from toontown.parties import PartyGlobals import Fireworks import FireworkShows from Firew...
arraypan/Food-Stickers
refs/heads/master
FoodStickersMessages/lib/python3.5/site-packages/wheel/tool/__init__.py
232
""" Wheel command-line utility. """ import os import hashlib import sys import json import wheel.paths from glob import iglob from .. import signatures from ..util import (urlsafe_b64decode, urlsafe_b64encode, native, binary, matches_requirement) from ..install import WheelFile def require_pkgres...
Qalthos/ansible
refs/heads/devel
test/units/modules/net_tools/nios/test_nios_network.py
27
# 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 version. # # Ansible is distributed in the hope that ...
klusark/android_external_chromium_org
refs/heads/cm-11.0
tools/json_to_struct/element_generator.py
115
# Copyright (c) 2012 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. import json import struct_generator def _JSONToCString16(json_string_literal): """Converts a JSON string literal to a C++ UTF-16 string literal. This ...
aparo/django-nonrel
refs/heads/master
tests/regressiontests/admin_validation/models.py
11
""" Tests of ModelAdmin validation logic. """ from django.db import models class Album(models.Model): title = models.CharField(max_length=150) class Song(models.Model): title = models.CharField(max_length=150) album = models.ForeignKey(Album) original_release = models.DateField(editable=False) ...
miguelpalacio/python-for-android
refs/heads/master
python-modules/twisted/twisted/web/test/test_newclient.py
49
# Copyright (c) 2009-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web._newclient}. """ __metaclass__ = type from zope.interface import implements from zope.interface.verify import verifyObject from twisted.python import log from twisted.python.failure import Failure from twis...
with-git/tensorflow
refs/heads/master
tensorflow/tools/docs/build_docs_test.py
53
# Copyright 2015 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...
ohmsclaw/volhalla
refs/heads/master
mongoose/bindings/python/example.py
11
# This is Python example on how to use Mongoose embeddable web server, # http://code.google.com/p/mongoose # # Before using the mongoose module, make sure that Mongoose shared library is # built and present in the current (or system library) directory import mongoose import sys # Handle /show and /form URIs. def Even...
ThiefMaster/indico
refs/heads/master
indico/modules/rb/models/locations_test.py
4
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.modules.rb.models.rooms import Room pytest_plugins = 'indico.modules.rb.testing.fixtures' ...
russellmayhew/satchmo
refs/heads/master
satchmo/apps/satchmo_ext/newsletter/urls.py
5
""" URLConf for Satchmo Newsletter app This will get automatically added by satchmo_store, under the url given in your livesettings "NEWSLETTER","NEWSLETTER_SLUG" """ from django.conf.urls import * from livesettings import config_value import logging log = logging.getLogger('newsletter.urls') urlpatterns = patterns(...
kkappel/web2py-community
refs/heads/master
languages/my.py
1
# -*- coding: utf-8 -*- { '!langcode!': 'my', '!langname!': 'Malay', '%d days ago': '%d hari yang lalu', '%d hours ago': '%d jam yang lalu', '%d minutes ago': '%d minit yang lalu', '%d months ago': '%d bulan yang lalu', '%d seconds ago': '%d saat yang lalu', '%d seconds from now': '%d saat dari sekarang', '%d weeks ago...
adityahase/frappe
refs/heads/develop
frappe/desk/doctype/system_console/system_console.py
2
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import json import frappe from frappe.utils.safe_exec import safe_exec from frappe.model.document import Document class SystemConsole(Document)...
mdworks2016/work_development
refs/heads/master
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__init__.py
1178
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from .__about__ import ( __author__, __copyright__, __email__, __licen...
msebire/intellij-community
refs/heads/master
python/testData/inspections/TransformClassicClass.py
83
class <warning descr="Old-style class"><caret>A</warning>: def foo(self): pass def bar(self): pass
FlyRabbit/WeRoBot
refs/heads/develop
werobot/utils.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import hashlib import re import random import json import six import time from hashlib import sha1 string_types = (six.string_types, six.text_type, six.binary_type) def get_signature(token, timestamp, nonce, *args): sign = [token,...
analurandis/Tur
refs/heads/master
backend/venv/Lib/site-packages/tests/test_cpp_domain.py
22
# -*- coding: utf-8 -*- """ test_cpp_domain ~~~~~~~~~~~~~~~ Tests the C++ Domain :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from util import raises from sphinx.domains.cpp import DefinitionParser, DefinitionError def parse(name,...
aitjcize/micropython
refs/heads/master
tests/basics/int-divzero.py
1
try: 1 / 0 except ZeroDivisionError: print("ZeroDivisionError") try: 1 // 0 except ZeroDivisionError: print("ZeroDivisionError")
studionow/pybrightcove
refs/heads/master
pybrightcove/enums.py
3
# Copyright (c) 2009 StudioNow, Inc <[email protected]> # # 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, copy, modi...
rohitwaghchaure/frappe
refs/heads/develop
frappe/core/page/modules_setup/modules_setup.py
9
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.desk.doctype.desktop_icon.desktop_icon import set_hidden_list, get_desktop_icons from frappe.utils.user import UserPermissions from frappe import _ @fra...
wetneb/django
refs/heads/master
tests/auth_tests/urls_admin.py
47
""" Test URLs for auth admins. """ from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth.admin import GroupAdmin, UserAdmin from django.contrib.auth.models import Group, User from django.contrib.auth.urls import urlpatterns # Create a silo'd admin site for just the user/g...
pataquets/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/mac.py
113
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2012, 2013 Apple Inc. 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...
amyshi188/osf.io
refs/heads/develop
framework/transactions/utils.py
61
# -*- coding: utf-8 -*- from flask import make_response from framework.exceptions import HTTPError from framework.routing import JSONRenderer, render_mako_string from website.util import is_json_request def get_error_message(error): """Retrieve error message from error, if available. """ try: ...
philsheard/pymarketing
refs/heads/master
setup.py
1
from setuptools import setup setup(name='pymarketing', version='0.1', description='Python for Marketing', url='https://github.com/philsheard/pymarketing', author='Phil Sheard', license='GNU GPL v2.0', packages=['pymarketing'], zip_safe=False)
justathoughtor2/atomicApe
refs/heads/encaged
cygwin/lib/python2.7/site-packages/pylint/test/functional/too_many_boolean_expressions.py
12
"""Checks for if statements containing too many boolean expressions""" # pylint: disable=invalid-name x = y = z = 5 if x > -5 and x < 5 and y > -5 and y < 5 and z > -5 and z < 5: # [too-many-boolean-expressions] pass elif True and False and 1 and 2 and 3: pass elif True and False and 1 and 2 and 3 and 4 and ...
Tranzystorek/servo
refs/heads/master
tests/wpt/web-platform-tests/service-workers/service-worker/resources/update-nocookie-worker.py
158
import time def main(request, response): # no-cache itself to ensure the user agent finds a new version for each update. headers = [('Cache-Control', 'no-cache, must-revalidate'), ('Pragma', 'no-cache')] # Set a normal mimetype. content_type = 'application/javascript' headers.appen...
pycoin/pycoin
refs/heads/master
pycoin/encoding.py
5
# -*- coding: utf-8 -*- """ Various utilities useful for converting one Bitcoin format to another, including some the human-transcribable format hashed_base58. The MIT License (MIT) Copyright (c) 2013 by Richard Kiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and a...
aborilov/txjsonrpc
refs/heads/master
txjsonrpc/scripts/getVersion.py
4
from txjsonrpc import meta print meta.version
gaboflowers/mallador_v3
refs/heads/master
unidecode/x021.py
62
data = ( '', # 0x00 '', # 0x01 'C', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c 'H', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 'N', # 0x15 ...
GunoH/intellij-community
refs/heads/master
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/typeCommentLocalWithTarget.py
38
def func(): with open('file.txt') as var: v<caret>ar
ryfeus/lambda-packs
refs/heads/master
Rasterio_osgeo_shapely_PIL_pyproj_numpy/source/numpy/distutils/command/egg_info.py
30
from __future__ import division, absolute_import, print_function import sys from setuptools.command.egg_info import egg_info as _egg_info class egg_info(_egg_info): def run(self): if 'sdist' in sys.argv: import warnings warnings.warn("`build_src` is being run, this may lead to mis...
bholley/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/item.py
148
import urlparse from abc import ABCMeta, abstractmethod, abstractproperty item_types = ["testharness", "reftest", "manual", "stub", "wdspec"] def get_source_file(source_files, tests_root, manifest, path): def make_new(): from sourcefile import SourceFile return SourceFile(tests_root, path, manife...
drakeet/shadowsocks
refs/heads/master
utils/autoban.py
1033
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 clowwindy # # 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 u...
arienchen/pytibrv
refs/heads/master
examples/python/tibrvlisten.py
1
## # tibrvlisten.py # rewrite TIBRV example: tibrvlisten.c # using Python Object Model # # LAST MODIFIED: V1.0 2016-12-22 ARIEN [email protected] # import sys import getopt from pytibrv.events import * def usage() : print() print("tibrvlisten.py [--service service] [--network network]") print(" ...
waltBB/neutron_read
refs/heads/master
neutron/tests/unit/test_metadata_namespace_proxy.py
21
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/Cookie.py
65
#!/usr/bin/env python # #### # Copyright 2000 by Timothy O'Malley <[email protected]> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in ...
CYBAI/servo
refs/heads/master
tests/wpt/web-platform-tests/wpt.py
24
# This file exists to allow `python wpt <command>` to work on Windows: # https://github.com/web-platform-tests/wpt/pull/6907 and # https://github.com/web-platform-tests/wpt/issues/23095 import os abspath = os.path.abspath(__file__) os.chdir(os.path.dirname(abspath)) exec(compile(open("wpt", "r").read(), "wpt", 'exec'))...
micbou/ycmd
refs/heads/master
ycmd/tests/extra_conf_store_test.py
4
# Copyright (C) 2016-2018 ycmd contributors # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
ropik/chromium
refs/heads/master
tools/json_schema_compiler/json_schema.py
5
# Copyright (c) 2012 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. import copy import json import os.path import sys _script_path = os.path.realpath(__file__) sys.path.insert(0, os.path.normpath(_script_path + "/../../"...
Gui13/CouchPotatoServer
refs/heads/master
couchpotato/core/media/movie/providers/metadata/mediabrowser.py
75
import os from couchpotato.core.media.movie.providers.metadata.base import MovieMetaData autoload = 'MediaBrowser' class MediaBrowser(MovieMetaData): def getThumbnailName(self, name, root, i): return os.path.join(root, 'folder.jpg') def getFanartName(self, name, root, i): return os.path.j...
nuuuboo/odoo
refs/heads/8.0
addons/crm_claim/__openerp__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
proxysh/Safejumper-for-Mac
refs/heads/master
buildmac/Resources/env/lib/python2.7/site-packages/twisted/internet/test/test_newtls.py
12
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._newtls}. """ from __future__ import division, absolute_import from twisted.trial import unittest from twisted.internet import interfaces from twisted.internet.test.reactormixins import ReactorBuilder from twiste...
lishensan/xbmc
refs/heads/master
tools/Fake Episode Maker/openAnything.py
169
# -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # http://xbmc.org # # 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, or (at your option) # any l...
ApuliaSoftware/odoo
refs/heads/8.0
openerp/workflow/instance.py
314
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
futuresystems-courses/465-naomi029
refs/heads/master
naomi_cm_command_hw3ex1.py
2
which python python --version virtualenv -p /usr/bin/python ~/ENV source $HOME/ENV/bin/activate pip install cmd3 pip --trusted pypi.python.org install cloudmesh_base pip --trusted pypi.python.org install cmd3 cm help cm-generate-command cm-generate-command naomicommand --path=~ cd cloudmesh_naomicommand/ python setup.p...
githubmlai/numpy
refs/heads/master
tools/swig/test/testVector.py
116
#! /usr/bin/env python from __future__ import division, absolute_import, print_function # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeE...
icio/evil
refs/heads/master
evil/__init__.py
1
#!/usr/bin/env python from collections import OrderedDict import fnmatch import os import re # Operators which act on expressions to their right are OP_RIGHT operators. # Operators which act on expressions to their left are OP_LEFT operators. # Operators which act on both are OP_LEFT | OP_RIGHT = OP_BOTH. OP_LEFT, OP_...
jonnatas/codeschool
refs/heads/master
src/cs_questions/migrations/old/0016_auto_20160531_1924.py
4
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-31 22:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cs_questions', '0015_auto_20160531_1923'), ] operations = [ migrations.Alter...
zzicewind/nova
refs/heads/master
nova/objects/dns_domain.py
29
# Copyright (C) 2014, 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...
asphalt-framework/asphalt-influxdb
refs/heads/master
tests/test_component.py
1
import pytest from asphalt.core import Context from asphalt.influxdb.client import InfluxDBClient from asphalt.influxdb.component import InfluxDBComponent @pytest.mark.asyncio async def test_default_client(caplog): """Test that the default client configuration works as expected.""" async with Context() as co...
davidfischer/rpc4django
refs/heads/master
tests/test_xmlrpcdispatcher.py
2
''' XML RPC Dispatcher Tests ------------------------- ''' import unittest from django.core.exceptions import ImproperlyConfigured from decimal import Decimal try: from rpc4django.xmlrpcdispatcher import XMLRPCDispatcher except ImproperlyConfigured: # Configure Django settings if not already configured ...
tamimcse/ns-3-dev-git
refs/heads/master
src/core/examples/sample-rng-plot.py
188
# -*- Mode:Python; -*- # /* # * 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 # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRA...
mmazanec22/too-windy
refs/heads/master
env/lib/python3.5/site-packages/pip/vcs/git.py
340
from __future__ import absolute_import import logging import tempfile import os.path from pip.compat import samefile from pip.exceptions import BadCommand from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip._vendor.packaging.versio...
bsmr-eve/Pyfa
refs/heads/master
eos/effects/shipbonuspiratesmallhybriddmg.py
1
# shipBonusPirateSmallHybridDmg # # Used by: # Ship: Daredevil # Ship: Hecate # Ship: Sunesis type = "passive" def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Hybrid Turret"), "damageMultiplier", ship.getModifiedItemAttr("s...
erwilan/ansible
refs/heads/devel
lib/ansible/executor/playbook_executor.py
57
# (c) 2012-2014, Michael DeHaan <[email protected]> # # 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) an...
gmalmquist/pants
refs/heads/master
src/python/pants/java/nailgun_io.py
14
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import errno import ...
Paul-L/android_gio_stock_kernel
refs/heads/cm-10.1
scripts/build-all.py
282
#! /usr/bin/env python # Copyright (c) 2009, Code Aurora Forum. 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...
windyuuy/opera
refs/heads/master
chromium/src/third_party/python_26/Lib/test/test_winreg.py
56
# Test the windows specific win32reg module. # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey from _winreg import * import os, sys import unittest from test import test_support test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me" test_data = [ ("Int Value", 45, ...
numerigraphe/odoo
refs/heads/8.0
openerp/addons/test_access_rights/models.py
299
from openerp import fields, models class SomeObj(models.Model): _name = 'test_access_right.some_obj' val = fields.Integer()
hack4impact/vision-zero-philly
refs/heads/master
tests/test_incident.py
1
import unittest import datetime from app import create_app, db from app.models import Incident, IncidentLocation, Agency, User class IncidentTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() ...
spookypeanut/trackinggeek
refs/heads/master
trackinggeek/point.py
1
# Tracking Geek: A tool for visualizing swathes of gpx files at once # Copyright (C) 2012, Henry Bush # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
daxm/fmcapi
refs/heads/master
fmcapi/api_objects/policy_services/snmpalerts.py
19
"""Not yet implemented."""
SaM-Solutions/samba
refs/heads/master
source4/scripting/python/samba/netcmd/join.py
19
#!/usr/bin/env python # # joins # # Copyright Jelmer Vernooij 2010 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # ...
eromoe/pyspider
refs/heads/master
pyspider/message_queue/beanstalk.py
12
#!/usr/bin/env python # coding:utf-8 """beanstalk queue - queue based on beanstalk Setting: you need to set max-job-size bigger(default 65535) DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT -z 524288" """ import time import umsgpack import beanstalkc import threading import logging from six.move...
ogrisel/sklearn_pycon2014
refs/heads/master
notebooks/fig_code/linear_regression.py
63
import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression def plot_linear_regression(): a = 0.5 b = 1.0 # x from 0 to 10 x = 30 * np.random.random(20) # y = a*x + b with noise y = a * x + b + np.random.normal(size=x.shape) # create a linear reg...
SteerSuite/steersuite-rutgers
refs/heads/master
steerstats/tools/gameobjects/gametime.py
8
class GameClock(object): """Manages time in a game.""" def __init__(self, game_ticks_per_second=20): """Create a Game Clock object. game_ticks_per_second -- The number of logic frames a second. """ self.game_ticks_per_second = f...
heynemann/pyvows
refs/heads/master
pyvows/cli.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- '''PyVows' main entry point. Contains code for command-line I/O, running tests, and the almighty `if __name__ == '__main__': main()`. ''' # pyVows testing engine # https://github.com/heynemann/pyvows # Licensed under the MIT license: # http://www.opensource.org/licenses...
MrLoick/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/apps/groups/client.py
48
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. 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 ...
lupyuen/RaspberryPiImage
refs/heads/master
home/pi/GrovePi/Software/Python/others/temboo/Library/Stripe/Events/ListAllEvents.py
5
# -*- coding: utf-8 -*- ############################################################################### # # ListAllEvents # Returns a list of events that have happened in your account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); ...
Lindem-Data-Acquisition-AS/TM4C129-discontinued
refs/heads/master
libraries/FreeRTOSv8.0.1/FreeRTOS-Plus/Source/CyaSSL/swig/runme.py
13
# file: runme.py import cyassl print "" print "Trying to connect to the echo server..." cyassl.CyaSSL_Init() #cyassl.CyaSSL_Debugging_ON() ctx = cyassl.CyaSSL_CTX_new(cyassl.CyaTLSv1_client_method()) if ctx == None: print "Couldn't get SSL CTX for TLSv1" exit(-1) ret = cyassl.CyaSSL_CTX_load_verify_locatio...
jat255/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/utils/peakfinders2D.py
1
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
sunzhxjs/JobGIS
refs/heads/master
lib/python2.7/site-packages/setuptools/launch.py
50
""" Launch the Python script on the command line after setuptools is bootstrapped via import. """ # Note that setuptools gets imported implicitly by the # invocation of this script using python -m setuptools.launch import tokenize import sys def run(): """ Run the script in sys.argv[1] as if it had been invoked ...
alanplotko/CoRE-Manager
refs/heads/master
app.py
2
# Flask from flask import Flask, render_template, request, redirect, url_for, session, abort, make_response # Authentication from authomatic.adapters import WerkzeugAdapter from authomatic import Authomatic from config import CONFIG # MongoDB and Sessions from flask.ext.session import Session from pymongo import Mong...
dkubiak789/OpenUpgrade
refs/heads/8.0
addons/document/odt2txt.py
435
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it unde...
kseistrup/qtile
refs/heads/develop
test/layouts/layout_utils.py
11
# Copyright (c) 2011 Florian Mounier # Copyright (c) 2012, 2014-2015 Tycho Andersen # Copyright (c) 2013 Mattias Svala # Copyright (c) 2013 Craig Barnes # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 Adi Sieker # Copyright (c) 2014 Chris Wesseling # # Permission is hereby granted, free o...
Ayub-Khan/edx-platform
refs/heads/master
common/lib/chem/chem/miller.py
182
""" Calculation of Miller indices """ import numpy as np import math import fractions as fr import decimal import json def lcm(a, b): """ Returns least common multiple of a, b Args: a, b: floats Returns: float """ return a * b / fr.gcd(a, b) def segment_to_fraction(distanc...
jamestwebber/scipy
refs/heads/master
scipy/special/_precompute/setup.py
27
from __future__ import division, print_function, absolute_import def configuration(parent_name='special', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('_precompute', parent_name, top_path) return config if __name__ == '__main__': from numpy.distutils.cor...
ZhangXinNan/tensorflow
refs/heads/master
tensorflow/contrib/autograph/__init__.py
4
# 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...
Fl0rianFischer/sme_odoo
refs/heads/9.0
addons/l10n_at/__init__.py
47
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) conexus import account_wizard
dahlstrom-g/intellij-community
refs/heads/master
python/testData/quickFixes/PyMoveAttributeToInitQuickFixTest/removePass.py
83
__author__ = 'ktisha' class A: def __init__(self): pass def foo(self): self.<caret>b = 1
hofmannedv/training-python
refs/heads/master
usecases/iban/iban.py
1
#!/usr/bin/python # ----------------------------------------------------------- # validates an International Bank Account Number (IBAN) using # a Regular Expression # demonstrates the usage of the re module #o # (C) 2017 Frank Hofmann, Berlin, Germany # Released under GNU Public License (GPL) # email frank.hofmann@e...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/loot/lootItems/re_junk/comlink.py
2
def itemTemplate(): return ['object/tangible/loot/npc_loot/shared_comlink_civilian_generic.iff'] def customItemName(): return 'Comlink' def stackable(): return 1 def junkDealerPrice(): return 15 def junkType(): return 0
bright-sparks/chromium-spacewalk
refs/heads/master
build/android/pylib/utils/json_results_generator.py
36
# 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. # # Most of this file was ported over from Blink's # Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py # Tools/Scripts/webkitpy/co...
bensondaled/pyfluo
refs/heads/v2
pyfluo/util/progress/__init__.py
1
from .progress import Progress, Elapsed from .progressbar import *