repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
vertexproject/synapse
synapse/tests/test_lib_rstorm.py
1
7127
import os import synapse.exc as s_exc import synapse.common as s_common import synapse.lib.rstorm as s_rstorm import synapse.tests.utils as s_test rst_in = ''' HI ## .. storm-cortex:: default .. storm-cortex:: default .. storm-opts:: {"vars": {"foo": 10, "bar": "baz"}} .. storm-pre:: [ inet:asn=$foo ] .. storm:: $l...
apache-2.0
-8,834,182,335,303,480,000
23.832753
97
0.54974
false
jmesteve/openerpseda
openerp/tools/which.py
456
6884
#!/usr/bin/env python """ Which - locate a command * adapted from Brian Curtin's http://bugs.python.org/file15381/shutil_which.patch * see http://bugs.python.org/issue444582 * uses ``PATHEXT`` on Windows * searches current directory before ``PATH`` on Windows, but not before an explicitly passed ...
agpl-3.0
4,400,156,635,876,288,500
43.412903
99
0.61534
false
Elandril/Sick-Beard
cherrypy/process/win32.py
35
6047
"""Windows service. Requires pywin32.""" import os import win32api import win32con import win32event import win32service import win32serviceutil from cherrypy.process import wspbus, plugins class ConsoleCtrlHandler(plugins.SimplePlugin): """A WSPBus plugin for handling Win32 console events (like Ct...
gpl-3.0
-4,735,544,542,773,538,000
32.752874
81
0.568546
false
joshgabriel/MPInterfaces
mpinterfaces/calibrate.py
1
60446
# coding: utf-8 # Copyright (c) Henniggroup. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import """ Calibration module: This module contains the classes for 1. Calibrate: Base class for specifying the parameters for calibration a...
mit
-5,084,235,460,146,115,000
42.896877
118
0.49373
false
tedder/ansible
lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py
31
7499
#!/usr/bin/python # Copyright: (c) 2018, Sebastian Schenzel <sebastian.schenzel@mailbox.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version':...
gpl-3.0
-5,666,724,200,757,903,000
29.987603
121
0.595546
false
Pexego/odoo
openerp/tools/amount_to_text_en.py
441
5103
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
5,969,969,919,104,919,000
37.08209
148
0.538899
false
cloudbase/cinder
cinder/tests/unit/volume/drivers/emc/scaleio/test_consistencygroups.py
6
10098
# Copyright (c) 2013 - 2016 EMC Corporation. # 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 # ...
apache-2.0
6,317,232,707,455,018,000
45.85782
79
0.575163
false
zsiki/ulyxes
pyapi/tcpiface.py
1
4981
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. module:: tcpiface.py :platform: Unix, Windows :synopsis: Ulyxes - an open source project to drive total stations and publish observation results. GPL v2.0 license Copyright (C) 2010- Zoltan Siki <siki.zoltan@epito.bme.hu>. .. moduleauthor:: Bence...
gpl-2.0
-1,690,776,806,671,815,200
30.929487
101
0.530616
false
nave91/dbt
dbt/compilation.py
1
7958
import itertools import os import json from collections import OrderedDict, defaultdict import sqlparse import dbt.project import dbt.utils import dbt.include import dbt.tracking from dbt.utils import get_materialization, NodeType, is_type from dbt.linker import Linker import dbt.compat import dbt.context.runtime i...
apache-2.0
8,952,308,713,549,154,000
29.725869
78
0.608696
false
matehall/Python-koan
python 3/koans/about_dice_project.py
14
1958
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * import random class DiceSet: def __init__(self): self._values = None @property def values(self): return self._values def roll(self, n): # Needs implementing! # Tip: random.r...
mit
-5,772,233,633,943,863,000
28.223881
106
0.569459
false
rudhir-upretee/Sumo_With_Netsim
docs/tutorial/city_mobil/statistics.py
6
4395
#!/usr/bin/env python """ @file statistics.py @author Michael Behrisch @author Daniel Krajzewicz @date 2008-10-17 @version $Id: statistics.py 12898 2012-10-26 08:58:14Z behrisch $ Collecting statistics for the CityMobil parking lot SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright...
gpl-3.0
-5,872,591,375,053,857,000
32.549618
129
0.612514
false
edx/lettuce
tests/integration/lib/Django-1.3/django/core/management/sql.py
229
8259
import os import re from django.conf import settings from django.core.management.base import CommandError from django.db import models from django.db.models import get_models def sql_create(app, style, connection): "Returns a list of the CREATE TABLE SQL statements for the given app." if connection.settings_...
gpl-3.0
4,728,522,245,343,453,000
42.468421
167
0.668604
false
pgmillon/ansible
lib/ansible/plugins/terminal/enos.py
101
2824
# (C) 2017 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # GNU General Public License v3.0+ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for ...
gpl-3.0
-7,970,105,739,172,920,000
33.024096
79
0.582861
false
lyapun/django-lean-42cc
django_lean/lean_analytics/tests.py
4
15078
from __future__ import with_statement from contextlib import contextmanager from django.conf import settings from django.contrib.auth.models import AnonymousUser, User from django.http import HttpRequest from django_lean.experiments.models import (AnonymousVisitor, Experiment, ...
bsd-3-clause
8,983,311,479,879,011,000
41.59322
81
0.535814
false
frozstone/concept
utilities/HeurDep.py
1
5042
from os import listdir, path from lxml import etree, objectify from pickle import load from sys import argv from StringIO import StringIO from collections import OrderedDict import time from utilities.norm_arxiv import norm_arxiv from utilities.norm_attribute import norm_attribute from utilities.norm_mrow ...
mit
-6,480,478,689,920,378,000
36.348148
171
0.628322
false
vadimtk/chrome4sdp
tools/telemetry/third_party/gsutilz/third_party/boto/boto/support/exceptions.py
151
1715
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
bsd-3-clause
-3,968,585,153,565,571,600
28.568966
77
0.783673
false
4022321818/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/xml/sax/saxutils.py
730
11688
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urllib.parse, urllib.request import io from . import handler from . import xmlreader def __dict_replace(s, d): """Replace substrings of a string using a dictionary.""" for key, val...
agpl-3.0
-3,012,627,070,021,310,000
31.831461
84
0.612252
false
vaquer/ckanext-dkan
ckanext/dkan/harvesters/dkanharvester.py
1
31034
import json import urllib import urllib2 import httplib import datetime import socket import datetime # from ckanext.harvest.harvesters.ckanharvester import CKANHarvester from ckanext.harvest.harvesters.base import HarvesterBase from ckanext.harvest.model import HarvestObject from ckan.logic import ValidationError, No...
agpl-3.0
8,176,333,278,479,023,000
40.656376
147
0.526165
false
TeamExodus/external_chromium_org
third_party/cython/src/Cython/Debugger/Tests/test_libpython_in_gdb.py
110
3979
# -*- coding: UTF-8 -*- """ Test libpython.py. This is already partly tested by test_libcython_in_gdb and Lib/test/test_gdb.py in the Python source. These tests are run in gdb and called from test_libcython_in_gdb.main() """ import os import sys import gdb from Cython.Debugger import libcython from Cython.Debugger ...
bsd-3-clause
-1,975,595,020,977,279,000
33.513043
79
0.64651
false
cs243iitg/vehicle-webapp
webapp/vms/views.py
1
12301
from django.shortcuts import render, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.views import generic from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_protect from django.contrib import auth from django.contrib import messages fr...
mit
-7,569,760,152,077,840,000
39.463816
297
0.576538
false
jambonrose/DjangoUnleashed-1.8
blog/migrations/0002_post_data.py
1
4440
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import date from django.db import migrations, models POSTS = [ { "title": "Django 1.0 Release", "slug": "django-10-released", "pub_date": date(2008, 9, 3), "startups": [], "tags": ["django", "pyt...
bsd-2-clause
-5,321,216,935,047,657,000
30.714286
50
0.510135
false
karstenw/nodebox-pyobjc
examples/Extended Application/matplotlib/examples/event_handling/zoom_window.py
1
2014
""" =========== Zoom Window =========== This example shows how to connect events in one window, for example, a mouse press, to another figure window. If you click on a point in the first window, the z and y limits of the second will be adjusted so that the center of the zoom in the second window will be the x,y coord...
mit
-4,583,119,347,413,692,400
24.493671
82
0.621152
false
Perferom/android_external_chromium_org
chrome/test/pyautolib/remote_host.py
80
3108
#!/usr/bin/env python # Copyright (c) 2011 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 cStringIO import os import pickle import socket import sys import pyauto class RemoteHost(object): """Class used as a ho...
bsd-3-clause
-9,016,086,451,230,564,000
29.772277
80
0.673745
false
HybridF5/jacket
jacket/storage/keymgr/conf_key_mgr.py
1
4888
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
-2,527,113,439,486,799,400
34.941176
82
0.683715
false
mancoast/CPythonPyc_test
cpython/263_test_nis.py
58
1317
from test import test_support import unittest import nis class NisTests(unittest.TestCase): def test_maps(self): try: maps = nis.maps() except nis.error, msg: # NIS is probably not active, so this test isn't useful if test_support.verbose: print "...
gpl-3.0
-118,805,081,679,479,950
29.627907
88
0.493546
false
numo16/wesnoth
data/tools/terrain2wiki.py
25
3386
#!/usr/bin/python # -*- coding:utf-8 -*- """ A script to create the "Terrain Table" on the TerrainCodeTableWML wiki page. Add the output to the wiki whenever a new terrain is added to mainline. """ from __future__ import with_statement # For python < 2.6 import os import sys import re try: import argparse excep...
gpl-2.0
-6,830,693,503,334,181,000
30.351852
98
0.619905
false
talele08/appengine-mapreduce
python/src/mapreduce/property_range.py
48
12527
#!/usr/bin/env python """A class representing entity property range.""" # pylint: disable=g-bad-name # pylint: disable=g-import-not-at-top import datetime from google.appengine.ext import ndb from google.appengine.ext import db from mapreduce import errors from mapreduce import util __all__ = [ "should_shard...
apache-2.0
1,427,884,614,381,187,000
29.703431
80
0.648918
false
telerik/cloudbase-init
cloudbaseinit/tests/plugins/windows/userdataplugins/test_urldownload.py
1
2120
# Copyright 2013 Mirantis Inc. # Copyright 2014 Cloudbase Solutions Srl # # 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 # # ...
apache-2.0
9,086,089,707,488,034,000
34.333333
78
0.684906
false
thepiper/standoff
venv/lib/python2.7/site-packages/werkzeug/contrib/profiler.py
362
5151
# -*- coding: utf-8 -*- """ werkzeug.contrib.profiler ~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides a simple WSGI profiler middleware for finding bottlenecks in web application. It uses the :mod:`profile` or :mod:`cProfile` module to do the profiling and writes the stats to the stream provide...
gpl-3.0
7,953,734,890,017,996,000
34.040816
82
0.580858
false
bcb/qutebrowser
tests/unit/misc/test_split.py
1
6937
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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...
gpl-3.0
6,512,470,582,566,713,000
35.819149
104
0.595926
false
repotvsupertuga/tvsupertuga.repository
instal/script.module.resolveurl/lib/resolveurl/plugins/prostream.py
2
1310
""" Plugin for ResolveUrl Copyright (C) 2020 gujal 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. This program is distributed...
gpl-2.0
4,390,770,347,793,681,400
37.529412
101
0.677863
false
ppwwyyxx/tensorflow
tensorflow/lite/testing/op_tests/unpack.py
3
2091
# Copyright 2019 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...
apache-2.0
-8,705,402,902,339,652,000
37.018182
80
0.678623
false
google-code-export/tvstreamrecord
cherrypy/scaffold/__init__.py
80
1859
"""<MyProject>, a CherryPy application. Use this as a base for creating new CherryPy applications. When you want to make a new app, copy and paste this folder to some other location (maybe site-packages) and rename it to the name of your project, then tweak as desired. Even before any tweaking, this should serve a fe...
gpl-3.0
-2,239,561,753,261,844,500
29.47541
74
0.601399
false
tboyce021/home-assistant
homeassistant/components/mcp23017/switch.py
8
2770
"""Support for switch sensor using I2C MCP23017 chip.""" from adafruit_mcp230xx.mcp23017 import MCP23017 # pylint: disable=import-error import board # pylint: disable=import-error import busio # pylint: disable=import-error import digitalio # pylint: disable=import-error import voluptuous as vol from homeassistant...
apache-2.0
-4,846,330,605,321,315,000
29.43956
85
0.661372
false
cryptica/slapnet
benchmarks/scalable/LeaderElectionCR79/make_net.py
1
2184
#!/usr/bin/python3 import sys import random def make_net(n,order): def previous(i): return (((i-2) % n) + 1) print('petri net "leader election %i" {' % n) print(' places {') for i in range(1,n+1): print(' ', end='') for j in range(1,n+1): print('s%in%i ' % (i,j)...
gpl-3.0
-3,174,904,058,223,468,500
25.962963
70
0.408425
false
Distrotech/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/db/models/manager.py
505
3578
from django.db.models.manager import Manager from django.contrib.gis.db.models.query import GeoQuerySet class GeoManager(Manager): "Overrides Manager to return Geographic QuerySets." # This manager should be used for queries on related fields # so that geometry columns on Oracle and MySQL are selected ...
apache-2.0
-7,499,098,740,079,269,000
33.737864
69
0.625769
false
xinwu/horizon
openstack_dashboard/dashboards/project/networks/views.py
43
5560
# 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...
apache-2.0
8,858,201,523,746,321,000
36.066667
78
0.643525
false
kmackenzieii/marauders-map
capture/make_fingerprint.py
1
1582
import re import os import kirk import numpy as n import pickle def trimmean(arr, percent): n = len(arr) k = int(round(n*(float(percent)/100)/2)) return n.mean(arr[k+1:n-k]) File = kirk.File width = kirk.width height = kirk.height box_size = kirk.box_size #Dictionary data structure to hold out parsed data...
mit
3,963,946,510,713,891,300
27.763636
73
0.64665
false
cwu2011/seaborn
seaborn/timeseries.py
6
13239
"""Timeseries plotting functions.""" from __future__ import division import numpy as np import pandas as pd from scipy import stats, interpolate import matplotlib as mpl import matplotlib.pyplot as plt from .external.six import string_types from . import utils from . import algorithms as algo from .palettes import c...
bsd-3-clause
1,424,119,876,327,610,600
36.610795
79
0.59642
false
dllsf/odootest
addons/l10n_be_invoice_bba/invoice.py
11
12783
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # i...
agpl-3.0
3,424,724,559,644,794,400
51.710084
165
0.500665
false
WillieMaddox/numpy
numpy/linalg/tests/test_regression.py
78
3097
""" Test functions for linalg module """ from __future__ import division, absolute_import, print_function import numpy as np from numpy import linalg, arange, float64, array, dot, transpose from numpy.testing import ( TestCase, run_module_suite, assert_equal, assert_array_equal, assert_array_almost_equal, asse...
bsd-3-clause
-3,510,802,748,468,733,400
31.6
78
0.513077
false
pcostell/apitools
apitools/base/py/exceptions.py
8
4111
#!/usr/bin/env python # # Copyright 2015 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...
apache-2.0
-7,502,974,637,699,833,000
23.470238
75
0.691073
false
akretion/odoo
addons/stock/tests/common.py
15
5095
# -*- coding: utf-8 -*- from odoo.tests import common class TestStockCommon(common.TransactionCase): def setUp(self): super(TestStockCommon, self).setUp() self.ProductObj = self.env['product.product'] self.UomObj = self.env['uom.uom'] self.PartnerObj = self.env['res.partner'] ...
agpl-3.0
7,401,060,998,887,452,000
49.95
173
0.58371
false
boundary/boundary-plugin-aws-elb
boundary_aws_plugin/cloudwatch_plugin.py
8
4606
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging import datetime import time from . import boundary_plugin from . import status_store """ If getting statistics from CloudWatch fails, we will retry up to this number of times before giving up and aborting the plugin. ...
apache-2.0
-1,106,427,700,143,722,400
46.979167
120
0.65241
false
ryfeus/lambda-packs
Tensorflow/source/tensorflow/python/keras/wrappers/scikit_learn/__init__.py
73
1062
# 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...
mit
5,678,663,099,695,419,000
39.846154
85
0.721281
false
Lonchadepavo/EstacionCisma
tools/expand_filedir_paths.py
166
3839
#!/usr/bin/env python import re, os, sys, fnmatch # Regex pattern to extract the directory path in a #define FILE_DIR filedir_pattern = re.compile(r'^#define\s*FILE_DIR\s*"(.*?)"') # Regex pattern to extract any single quoted piece of text. This can also # match single quoted strings inside of double quote...
gpl-3.0
7,966,900,155,057,483,000
39.27957
81
0.622818
false
fishscene/streamlink
src/streamlink/plugins/ustreamtv.py
3
20932
import re from collections import namedtuple from functools import partial from random import randint from time import sleep from streamlink.compat import urlparse, urljoin, range from streamlink.exceptions import StreamError, PluginError, NoStreamsError from streamlink.plugin import Plugin, PluginOptions from stream...
bsd-2-clause
9,127,619,429,026,349,000
32.4377
97
0.516577
false
khara914/cf-phpbuildpack
lib/build_pack_utils/downloads.py
15
4096
import os import urllib2 import re import logging from subprocess import Popen from subprocess import PIPE class Downloader(object): def __init__(self, config): self._ctx = config self._log = logging.getLogger('downloads') self._init_proxy() def _init_proxy(self): handlers = ...
apache-2.0
5,014,073,709,486,819,000
34.310345
92
0.526367
false
SelenaProject/selena
app/core/modules/weather/weather.py
1
5028
# !/usr/bin/env python3 import threading import time import urllib.request import json from .. import modulebase weather_check_interval = 60 # check every minute city = 'Kanata,ON' cur_weather_url = ('http://api.openweathermap.org/data/2.5/weather?q=%s&units=metric') % (city) forecast_url = ('http://api.openweath...
apache-2.0
7,716,334,859,486,772,000
26.626374
96
0.513325
false
sunsrising/xnhb
contrib/devtools/fix-copyright-headers.py
80
1348
#!/usr/bin/env python ''' Run this script to update all the copyright headers of files that were changed this year. For example: // Copyright (c) 2009-2012 The Bitcoin Core developers it will change it to // Copyright (c) 2009-2015 The Bitcoin Core developers ''' import os import time import re year = time.gmtime(...
mit
5,409,074,151,913,464,000
28.304348
83
0.615727
false
malexzx/grpc
examples/python/multiplex/helloworld_pb2.py
29
6763
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: helloworld.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
bsd-3-clause
-2,592,863,832,961,628,700
32.151961
369
0.732663
false
sve-odoo/odoo
addons/website_sale/models/sale_order.py
26
10438
# -*- coding: utf-8 -*- import random from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.addons.web.http import request class payment_transaction(orm.Model): _inherit = 'payment.transaction' _columns = { # link with the sale order 'sale_order_id': fields.m...
agpl-3.0
7,735,798,088,223,761,000
46.018018
136
0.581816
false
saurabh6790/omnitech-libs
core/doctype/custom_script/custom_script.py
34
1208
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl def autoname(self): self.doc.name = self.doc....
mit
7,915,574,700,104,366,000
27.116279
71
0.730132
false
BenSto/pybikes
pybikes/bysykkel.py
4
1909
# -*- coding: utf-8 -*- import json from .base import BikeShareSystem, BikeShareStation from . import utils class BySykkel(BikeShareSystem): authed = True meta = { 'system': 'BySykkel', 'company': ['Urban Infrastructure Partner'] } def __init__(self, tag, meta, feed_url, feed_detai...
lgpl-3.0
-2,898,308,452,387,493,000
26.271429
77
0.587742
false
yourcelf/btb
scanblog/profiles/models.py
1
18215
import os import datetime import itertools import string from django.db import models from django.db.models import Q from django.contrib.auth.models import User, Group from django.db.models.signals import post_save from django.dispatch import receiver from django.core.urlresolvers import reverse from django.utils.trans...
agpl-3.0
809,162,240,108,021,900
36.32582
114
0.596596
false
astropy/astropy
astropy/io/ascii/tests/test_html.py
7
22379
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests some of the methods related to the ``HTML`` reader/writer and aims to document its functionality. Requires `BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>`_ to be installed. """ from io impor...
bsd-3-clause
9,105,242,105,700,878,000
29.568306
100
0.562433
false
idxos/python-clblob
clblob/event.py
3
8978
# Copyright 2013 craigslist # # 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, s...
apache-2.0
-6,370,264,113,194,574,000
34.626984
79
0.596124
false
kans/birgo
deps/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/wire_format_test.py
571
10848
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
apache-2.0
6,601,034,554,819,583,000
41.87747
80
0.664731
false
tempbottle/kbengine
kbe/res/scripts/common/Lib/test/test_urllib2net.py
60
12676
import unittest from test import support from test.test_urllib2 import sanepathname2url import os import socket import urllib.error import urllib.request import sys try: import ssl except ImportError: ssl = None support.requires("network") TIMEOUT = 60 # seconds def _retry_thrice(func, exc, *args, **kwarg...
lgpl-3.0
7,038,316,231,340,377,000
36.064327
93
0.556011
false
ssaavedra/liquidhaskell
tests/regrtest.py
8
6362
#!/usr/bin/python # Copyright (c) 2009 The Regents of the University of California. All rights reserved. # # Permission is hereby granted, without written agreement and without # license or royalty fees, to use, copy, modify, and distribute this # software and its documentation for any purpose, provided that the # abov...
bsd-3-clause
-6,117,226,347,591,025,000
35.147727
124
0.593838
false
revmischa/boto
boto/s3/__init__.py
114
2836
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2014, Steven Richards <sbrichards@mit.edu> # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation fi...
mit
-6,787,125,218,032,336,000
37.324324
85
0.683004
false
girving/tensorflow
tensorflow/python/framework/graph_io.py
6
2539
# 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...
apache-2.0
7,503,392,494,628,514,000
33.310811
80
0.684128
false
zak-k/cis
cis/test/plot_tests/idiff.py
3
2350
#!/usr/bin/env python # (C) British Crown Copyright 2010 - 2014, Met Office # # This file was heavily influenced by a similar file in the iris package. """ Provides "diff-like" comparison of images. Currently relies on matplotlib for image processing so limited to PNG format. """ from __future__ import (absolute_imp...
gpl-3.0
691,823,414,193,231,400
31.638889
77
0.648511
false
macndesign/lettuce_webdriver
lettuce_webdriver/screenshot.py
4
2043
"""Steps and utility functions for taking screenshots.""" import uuid from lettuce import ( after, step, world, ) import os.path import json def set_save_directory(base, source): """Sets the root save directory for saving screenshots. Screenshots will be saved in subdirectories under this di...
mit
-1,381,010,187,349,928,400
26.986301
79
0.640724
false
rohitwaghchaure/erpnext-receipher
erpnext/patches/v5_0/update_item_and_description_again.py
102
1661
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe from frappe.utils import cstr import re def execute(): item_details = frappe._dict() for d in frappe.db.sql("select name, description from `tabItem`", as_dict=1): descriptio...
agpl-3.0
8,965,949,781,607,168,000
32.897959
98
0.666466
false
homeworkprod/byceps
byceps/services/ticketing/models/ticket_event.py
1
1337
""" byceps.services.ticketing.models.ticket_event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import datetime from typing import Any, Dict from ....database import db, generate_uuid from ....util.instances...
bsd-3-clause
-2,172,358,764,212,808,200
30.093023
91
0.631264
false
sinkuri256/python-for-android
python3-alpha/python3-src/Lib/distutils/tests/test_install_lib.py
47
3460
"""Tests for distutils.command.install_data.""" import sys import os import unittest from distutils.command.install_lib import install_lib from distutils.extension import Extension from distutils.tests import support from distutils.errors import DistutilsOptionError from test.support import run_unittest class Install...
apache-2.0
5,612,818,793,482,029,000
32.921569
73
0.613584
false
jalavik/invenio
invenio/legacy/bibingest/ingestion_package_interface.py
13
17273
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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,...
gpl-2.0
1,866,466,573,543,977,000
38.891455
194
0.62178
false
lbeltrame/bcbio-nextgen
bcbio/ngsalign/star.py
2
14590
import os import sys import shutil import subprocess import contextlib from collections import namedtuple import bcbio.bed as bed from bcbio.pipeline import config_utils from bcbio.distributed.transaction import file_transaction, tx_tmpdir from bcbio.utils import (safe_makedir, file_exists, is_gzipped) from bcbio.prov...
mit
-5,362,305,257,976,909,000
42.813814
94
0.59438
false
francisco-dlp/hyperspy
hyperspy/tests/__init__.py
4
1870
# -*- coding: utf-8 -*- # Copyright 2007-2016 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...
gpl-3.0
2,832,677,484,817,261,000
37.163265
72
0.702674
false
dablak/boto
boto/resultset.py
20
6557
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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...
mit
-7,485,846,445,197,036,000
36.683908
79
0.606375
false
windinthew/audacity
lib-src/lv2/lv2/plugins/eg-fifths.lv2/waflib/Logs.py
196
4755
#! /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,re,traceback,sys _nocolor=os.environ.get('NOCOLOR','no')not in('no','0','false') try: if not _nocolor: import waflib.ansiterm except ImportError: pass try: impo...
gpl-2.0
1,384,677,174,145,374,700
25.864407
228
0.683281
false
bob-white/UnityIronPythonConsole
Assets/IronPythonConsole/Plugins/Lib/repr.py
417
4296
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr","repr"] import __builtin__ from itertools import islice class Repr: def __init__(self): self.maxlevel = 6 self.maxtuple = 6 self.maxlist = 6 self.maxarray = 5 self.maxdict = 4 ...
mpl-2.0
4,721,990,324,382,316,000
31.545455
77
0.499302
false
matt-bernhardt/trapp
trapp/check_games.py
1
1339
# -*- coding: utf-8 -*- from trapp.checker import Checker from trapp.competition import Competition class CheckerGames(Checker): def reviewCompetition(self, competition, year): self.log.message('Reviewing competition ' + str(competition)) # Get years this competition was held sql = ("SEL...
gpl-2.0
-4,675,455,301,226,018,000
30.139535
69
0.554145
false
jorik041/plaso
plaso/parsers/winreg_plugins/mrulistex.py
1
18044
# -*- coding: utf-8 -*- """This file contains MRUListEx Windows Registry plugins.""" import abc import logging import construct from plaso.events import windows_events from plaso.lib import binary from plaso.parsers import winreg from plaso.parsers.shared import shell_items from plaso.parsers.winreg_plugins import i...
apache-2.0
6,099,554,587,811,214,000
37.228814
80
0.667867
false
kivio/pysllo
docs/conf.py
2
9751
# -*- coding: utf-8 -*- # # Pysllo documentation build configuration file, created by # sphinx-quickstart on Tue May 31 19:45:48 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
bsd-3-clause
4,232,071,813,671,519,000
27.679412
79
0.690698
false
cgcgbcbc/django-xadmin
xadmin/plugins/chart.py
17
5683
import datetime import decimal import calendar from django.template import loader from django.http import HttpResponseNotFound from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse from django.utils.encoding import smart_unicode from django.db import models from django.utils....
bsd-3-clause
-6,073,751,838,963,960,000
34.742138
136
0.604082
false
omarkhan/ansible-modules-core
cloud/google/gce_pd.py
130
9532
#!/usr/bin/python # Copyright 2013 Google Inc. # # 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 vers...
gpl-3.0
-3,526,913,295,690,532,400
31.202703
95
0.597881
false
pfmooney/dd-agent
checks.d/mesos.py
22
5151
# stdlib from hashlib import md5 import time # 3rd party import requests # project from checks import AgentCheck class Mesos(AgentCheck): SERVICE_CHECK_NAME = "mesos.can_connect" def check(self, instance): """ DEPRECATED: This generic Mesosphere check is deprecated not actively deve...
bsd-3-clause
6,378,490,254,408,713,000
39.559055
138
0.562997
false
40223137/cdag7test37
static/Brython3.1.3-20150514-095342/Lib/weakref.py
769
11495
"""Weak reference support for Python. This module is an implementation of PEP 205: http://www.python.org/dev/peps/pep-0205/ """ # Naming convention: Variables named "wr" are weak reference objects; # they are called this instead of "ref" to avoid name collisions with # the module-global ref() function imported from ...
gpl-3.0
-8,913,955,414,854,984,000
28.857143
76
0.551196
false
cloudwork/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Scanner/Fortran.py
61
14347
"""SCons.Scanner.Fortran This module implements the dependency scanner for Fortran code. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentati...
apache-2.0
-8,389,844,272,599,720,000
44.401899
125
0.599777
false
LordDamionDevil/Lony
lib/discord/member.py
14
8164
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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...
gpl-3.0
-7,428,569,703,087,051,000
34.650655
103
0.630696
false
JeffsFernandes/cuidando2
projeto/projeto/views.py
2
32828
#!/usr/bin/env python # -*- coding: utf-8 -*- from pyramid.view import view_config from .models import Cidadao, Cidadao_twitter,Atividade, Atividade_cidadao, Atividade_orcamento, Dados_site, Midia, Midia_comentario, Midia_video, Denuncia, Midia_foto #from .models import Cidadao, UsrTree, Atividade_cidadao #from .model...
gpl-3.0
1,547,272,856,669,598,200
34.836443
166
0.63968
false
jalavik/invenio
invenio/modules/upgrader/upgrades/invenio_2013_06_20_new_bibcheck_rules_table.py
15
1210
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013 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 (at your option) any later...
gpl-2.0
8,150,274,435,427,106,000
30.025641
74
0.721488
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/test/test_signal.py
79
33870
import unittest from test import support from contextlib import closing import gc import pickle import select import signal import struct import subprocess import traceback import sys, os, time, errno from test.script_helper import assert_python_ok, spawn_python try: import threading except ImportError: threadi...
gpl-2.0
-6,147,222,488,262,197,000
35.031915
86
0.561884
false
harryliu/edwin
edwinAgent/site_packages/dbRowFactory/pyDbRowFactory.py
4
14255
# -*- coding: utf-8 -*- ''' #@summary: DbRowFactory is one common factory to convert db row tuple into user-defined class object. It is supported SqlAlchemy, and any database modules conformed to Python Database API Specification v2.0. e.g. cx_Oracle, zxJDBC #@note: Note 1: The DbRowFactory wil...
apache-2.0
2,534,508,222,375,085,600
35
267
0.631428
false
spierepf/mpf
mpf/modes/tilt/code/tilt.py
1
7456
"""Contains the Tilt mode code""" # tilt.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # Documentation and more info at http://missionpinball.com/mpf from mpf.system.config import CaseInsensitiveDict from mpf.system...
mit
-623,721,192,207,639,700
34.174528
81
0.583691
false
jkleckner/ansible
docsite/conf.py
3
6348
# -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
gpl-3.0
4,186,485,526,585,211,000
29.228571
79
0.721014
false
wlanslovenija/django-tastypie
tastypie/throttle.py
5
4861
from __future__ import unicode_literals import time from django.core.cache import cache class BaseThrottle(object): """ A simplified, swappable base class for throttling. Does nothing save for simulating the throttling API and implementing some common bits for the subclasses. Accepts a number of...
bsd-3-clause
645,301,260,950,032,600
34.224638
92
0.627443
false
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.4/content/Lib/timeit.py
76
12059
#! /usr/bin/env python """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line ...
gpl-3.0
-2,558,819,460,344,612,000
35.765244
78
0.604279
false
kuredatan/taxocluster
featuresVector.py
2
2904
import sys as s from parsingMatch import parseAllFact from parsingFasta import parseFasta def sanitizeNode(node): if not node or not (len(node) == 2): #It means this node cannot appear in the taxonomic tree return None else: return node #@allMatches is a dictionary of (key=sa...
mit
3,946,318,179,366,013,000
48.220339
270
0.689738
false
opencloudinfra/orchestrator
venv/Lib/distutils/__init__.py
1211
3983
import os import sys import warnings import imp import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib # Important! To work on pypy, this must be a module that resides in the # lib-python/modified-x.y.z directory dirname = os.path.dirname distutils_path = o...
gpl-3.0
8,522,154,490,537,783,000
38.435644
112
0.674868
false
vmarkovtsev/django
tests/modeladmin/models.py
130
1603
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Band(models.Model): name = models.CharField(max_length=100) bio = models.TextField() sign_date = models.DateFiel...
bsd-3-clause
2,076,538,974,243,730,700
32.395833
94
0.675608
false
wreckJ/intellij-community
python/helpers/pydev/runfiles.py
43
10205
import os def main(): import sys #Separate the nose params and the pydev params. pydev_params = [] other_test_framework_params = [] found_other_test_framework_param = None NOSE_PARAMS = '--nose-params' PY_TEST_PARAMS = '--py-test-params' for arg in sys.argv[1:]: if not found_...
apache-2.0
8,427,868,121,583,086,000
39.496032
139
0.546399
false
jzbontar/orange-tree
Orange/canvas/gui/splashscreen.py
16
3975
""" A splash screen widget with support for positioning of the message text. """ from PyQt4.QtGui import ( QSplashScreen, QWidget, QPixmap, QPainter, QTextDocument, QTextBlockFormat, QTextCursor, QApplication ) from PyQt4.QtCore import Qt from .utils import is_transparency_supported class SplashScreen(QSp...
gpl-3.0
-4,653,576,518,878,900,000
29.113636
77
0.590692
false
Andrew-McNab-UK/DIRAC
tests/Integration/DataManagementSystem/FC_scaling_test.py
3
10751
######################################################################## # File : FC_Scaling_test # Author : Andrei Tsaregorodtsev ######################################################################## """ Test suite for a generic File Catalog scalability tests """ __RCSID__ = "$Id$" from DIRAC.Core.Base impor...
gpl-3.0
3,981,916,478,692,358,000
26.780362
104
0.628407
false
trabacus-softapps/openerp-8.0-cc
openerp/addons/survey/wizard/survey_print_statistics.py
4
1888
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-749,390,944,300,806,000
37.530612
80
0.587924
false
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_int_literal.py
21
7053
"""Test correct treatment of hex/oct constants. This is complex because of changes due to PEP 237. """ import unittest class TestHexOctBin(unittest.TestCase): def test_hex_baseline(self): # A few upper/lowercase tests self.assertEqual(0x0, 0X0) self.assertEqual(0x1, 0X1) self.ass...
gpl-2.0
1,412,140,431,842,650,000
48.321678
118
0.713313
false
androomerrill/scikit-nano
sknano/generators/__init__.py
2
1771
# -*- coding: utf-8 -*- """ ====================================================================== Structure generators (:mod:`sknano.generators`) ====================================================================== .. currentmodule:: sknano.generators Contents ======== Nanostructure generators -------------------...
bsd-2-clause
-6,295,112,794,061,266,000
23.260274
70
0.67476
false
v-iam/azure-sdk-for-python
azure-batch/azure/batch/models/node_file.py
3
1414
# 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 ...
mit
7,177,161,634,673,814,000
34.35
80
0.580622
false