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
fanwenl/kindle-image
alien_invasion/setting.py
1
1456
""" 该文件是游戏的一些设置选项 """ class Settings(): """ 存储游戏的所有设置的类 """ def __init__(self): """ 初始化游戏的设置 """ self.screen_width = 1920 self.screen_height = 900 self.bg_color = (230, 230, 230) # 飞船设置 self.ship_limit = 3 # 设置子弹 self.bullet_width = 3 se...
apache-2.0
617,501,777,982,876,500
23.78
69
0.548465
false
tima/ansible
lib/ansible/modules/network/nxos/nxos_system.py
31
11749
#!/usr/bin/python # # 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 distribut...
gpl-3.0
-4,359,565,885,013,717,500
30
89
0.61086
false
40223245/2015cdb_g6-team1
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_program.py
738
10833
import io import os import sys import unittest class Test_TestProgram(unittest.TestCase): def test_discovery_from_dotted_path(self): loader = unittest.TestLoader() tests = [self] expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__)) self.wasRun = False ...
gpl-3.0
8,875,189,089,757,175,000
30.768328
89
0.592357
false
henridwyer/scikit-learn
examples/covariance/plot_covariance_estimation.py
250
5070
""" ======================================================================= Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood ======================================================================= When working with covariance estimation, the usual approach is to use a maximum likelihood estimator,...
bsd-3-clause
-5,532,135,736,919,476,000
37.70229
79
0.68856
false
rue89-tech/edx-analytics-pipeline
edx/analytics/tasks/util/tests/test_opaque_key_util.py
3
5866
""" Tests for utilities that parse event logs. """ from opaque_keys.edx.locator import CourseLocator import edx.analytics.tasks.util.opaque_key_util as opaque_key_util from edx.analytics.tasks.tests import unittest VALID_COURSE_ID = unicode(CourseLocator(org='org', course='course_id', run='course_run')) VALID_LEGAC...
agpl-3.0
-2,298,966,936,435,165,400
44.123077
120
0.678316
false
poppu-mtg/StackIt
StackIt/GUIapp.py
1
4165
import os, shutil, sys, time from . import globals, builder if sys.version_info.major == 3: from tkinter import * else: from Tkinter import * # from tkFileDialog import * from PIL import Image, ImageTk class ScrollIt(): def __init__(self): self.image1 = Image.open(mGui.btn2text.get()[9:] + '-sc...
mit
8,641,570,162,352,748,000
30.08209
123
0.629532
false
ofer43211/unisubs
apps/teams/migrations/0102_auto__add_billingreport.py
5
30439
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'BillingReport' db.create_table('teams_billingreport', ( ('end_date', self....
agpl-3.0
1,801,086,215,611,305,000
91.801829
226
0.557508
false
BeegorMif/HTPC-Manager
lib/sqlalchemy/event/api.py
75
3844
# event/api.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Public API functions for the event system. """ from __future__ import absolute_import...
gpl-3.0
1,422,416,332,737,700,000
28.343511
84
0.62565
false
jendap/tensorflow
tensorflow/python/ops/stateless_random_ops.py
8
11692
# 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 applica...
apache-2.0
-259,855,489,347,556,220
42.790262
80
0.675676
false
kustodian/ansible
lib/ansible/module_utils/network/ftd/fdm_swagger_client.py
19
26649
# Copyright (c) 2018 Cisco and/or its affiliates. # # 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 v...
gpl-3.0
8,751,988,325,963,484,000
40.769592
119
0.573455
false
vc3-project/vc3-info-service
vc3infoservice/core.py
1
11353
#!/bin/env python __author__ = "John Hover" __copyright__ = "2017 John Hover" __credits__ = [] __license__ = "GPL" __version__ = "0.9.1" __maintainer__ = "John Hover" __email__ = "jhover@bnl.gov" __status__ = "Production" import logging import random import string class InfoConnectionFailure(Exception): ''' ...
gpl-3.0
6,548,519,347,135,075,000
31.907246
201
0.534044
false
2013Commons/hue
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/Prof.py
37
75689
#._cv_part guppy.heapy.Prof from Tkinter import * import tkFileDialog import tkMessageBox class MyVar(StringVar): _default = 0.0 def set(self, value): StringVar.set(self, '%.2g'%value) suffixes = ('','K','M','G','T') def sizestring(value): value = float(value) sign = 1 if value < 0: sign = -1...
apache-2.0
-1,603,949,223,153,726,500
22.952215
96
0.641441
false
jp-bpl/configuration
util/vpc-tools/tag-old-ebs.py
62
7679
""" For a given aws account, go through all un-attached volumes and tag them. """ import boto import boto.utils import argparse import logging import subprocess import time import os from os.path import join, exists, isdir, islink, realpath, basename, dirname import yaml # needs to be pip installed import netaddr LO...
agpl-3.0
8,793,607,458,759,327,000
36.096618
101
0.582367
false
lucidfrontier45/scikit-learn
examples/covariance/plot_covariance_estimation.py
2
4991
""" ======================================================================= Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood ======================================================================= The usual estimator for covariance is the maximum likelihood estimator, :class:`sklearn.covariance.Em...
bsd-3-clause
-3,581,773,570,626,907,000
37.392308
79
0.686836
false
sorgerlab/bioagents
bioagents/tests/test_model_diagnoser.py
2
2836
from indra.statements import * from bioagents.mra.model_diagnoser import ModelDiagnoser from indra.assemblers.pysb import PysbAssembler from nose.plugins.attrib import attr drug = Agent('PLX4720') raf = Agent('RAF', db_refs={'FPLX': 'RAF'}) mek = Agent('MEK', db_refs={'FPLX': 'MEK'}) erk = Agent('ERK', db_refs={'FPLX...
bsd-2-clause
-759,491,562,513,554,800
34.898734
69
0.654795
false
p4datasystems/CarnotKE
jyhton/lib-python/2.7/idlelib/CallTips.py
43
7941
"""CallTips.py - An IDLE Extension to Jog Your Memory Call Tips are floating windows which display function, class, and method parameter and docstring information when you type an opening parenthesis, and which disappear when you type a closing parenthesis. """ import re import sys import types from idlelib import C...
apache-2.0
266,445,088,186,638,430
34.137168
79
0.541619
false
felixma/nova
nova/api/openstack/compute/schemas/fixed_ips.py
79
1027
# Copyright 2015 Intel 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 # # Unless require...
apache-2.0
-8,297,483,588,647,857,000
27.527778
78
0.674781
false
apache/airflow
airflow/providers/google/cloud/example_dags/example_translate_speech.py
3
3196
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
643,132,891,427,086,100
36.6
103
0.717772
false
fusionpig/ansible
v1/tests/TestSynchronize.py
103
6958
import unittest import getpass import os import shutil import time import tempfile from nose.plugins.skip import SkipTest from ansible.runner.action_plugins.synchronize import ActionModule as Synchronize class FakeRunner(object): def __init__(self): self.connection = None self.transport = None ...
gpl-3.0
5,844,200,755,748,302,000
38.534091
120
0.555188
false
danakj/chromium
tools/grit/grit/format/chrome_messages_json_unittest.py
23
3612
#!/usr/bin/env python # 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. """Unittest for chrome_messages_json.py. """ import os import sys if __name__ == '__main__': sys.path.append(os.path.join(os.pat...
bsd-3-clause
5,965,805,635,718,164,000
24.258741
116
0.565615
false
sadaf2605/django
django/db/models/sql/subqueries.py
9
8284
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.sql.constants import ( CURSOR, GET_ITERATOR_CHUNK_SIZE, NO_RESULTS, ) from django...
bsd-3-clause
-2,984,305,642,480,932,000
36.484163
107
0.599469
false
cmeon/AndyImage
andy_image_resize.py
1
1293
#!/usr/bin/env python import sys from os import path, mkdir from vipsCC import * sizes = { 'ldpi':3, 'mdpi':4, 'hdpi':6, 'xhdpi':8, 'xxhdpi':12, 'xxxhdpi':16 } if ( len(sys.argv) < 2): print """ (H)Andy Image Resize ----------------------------------- This program resizes images into ldpi to xxxhdpi ** I...
mit
-8,723,088,299,091,839,000
27.108696
81
0.596288
false
HexHive/datashield
compiler/llvm/utils/lit/lit/ShCommands.py
87
2696
class Command: def __init__(self, args, redirects): self.args = list(args) self.redirects = list(redirects) def __repr__(self): return 'Command(%r, %r)' % (self.args, self.redirects) def __eq__(self, other): if not isinstance(other, Command): return False ...
gpl-3.0
4,670,977,233,172,282,000
30.717647
69
0.500371
false
BizzCloud/PosBox
addons/marketing_campaign_crm_demo/__openerp__.py
119
1675
# -*- 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...
agpl-3.0
-4,796,450,197,818,860,000
37.068182
87
0.590448
false
vitaly-krugl/pika
pika/heartbeat.py
1
8261
"""Handle AMQP Heartbeats""" import logging import pika.exceptions from pika import frame LOGGER = logging.getLogger(__name__) class HeartbeatChecker(object): """Sends heartbeats to the broker. The provided timeout is used to determine if the connection is stale - no received heartbeats or other activit...
bsd-3-clause
-8,952,741,432,178,022,000
37.966981
172
0.63249
false
rmccoy7541/egillettii-rnaseq
scripts/snp_performance_analysis.py
1
3682
#! /bin/env python import sys from optparse import OptionParser import copy import matplotlib matplotlib.use('Agg') import pylab import scipy.optimize import numpy from numpy import array import dadi import os #call ms program from within dadi, using optimized parameters (converted to ms units) core = "-n 1 0.922 -n 2...
mit
-6,656,796,103,224,141,000
31.298246
157
0.617599
false
andela-bojengwa/talk
venv/lib/python2.7/site-packages/rest_framework/viewsets.py
21
5303
""" ViewSets are essentially just a type of class based view, that doesn't provide any method handlers, such as `get()`, `post()`, etc... but instead has actions, such as `list()`, `retrieve()`, `create()`, etc... Actions are only bound to methods at the point of instantiating the views. user_list = UserViewSet.a...
mit
-6,967,431,628,578,942,000
35.321918
88
0.610598
false
mit0110/oppia
core/tests/test_util_jobs.py
19
4472
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
-4,002,655,365,093,000,000
31.172662
79
0.702818
false
dakerfp/AutobahnPython
examples/twisted/wamp/basic/rpc/timeservice/backend.py
8
1139
############################################################################### ## ## Copyright (C) 2014 Tavendo GmbH ## ## 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:/...
apache-2.0
-424,877,754,839,242,300
30.638889
79
0.602283
false
jelugbo/hebs_master
lms/djangoapps/licenses/tests.py
30
9472
"""Tests for License package""" import logging import json from uuid import uuid4 from random import shuffle from tempfile import NamedTemporaryFile import factory from factory.django import DjangoModelFactory from django.test import TestCase from django.test.client import Client from django.test.utils import overrid...
agpl-3.0
945,123,290,270,383,700
41.859729
102
0.628906
false
ttroy50/vsid
tools/reset_protocol_model.py
1
2350
#!/usr/bin/python # """ Reset an Protocol in the database to 0 """ import sys import yaml from optparse import OptionParser def reset_protocol(file, dest, name, attributes=None): try: with open(file, 'r') as stream: database = yaml.load(stream) except Exception, ex: print "Excepti...
mit
-7,178,129,445,476,918,000
31.205479
109
0.578723
false
SEL-Columbia/commcare-hq
corehq/apps/reports/tests/test_cache.py
1
5210
import uuid from django.http import HttpRequest from django.test import TestCase from corehq.apps.domain.shortcuts import create_domain from corehq.apps.reports.cache import CacheableRequestMixIn, request_cache from corehq.apps.users.models import WebUser class MockReport(CacheableRequestMixIn): def __init__(sel...
bsd-3-clause
1,854,157,568,961,513,200
36.76087
98
0.590595
false
pwarren/AGDeviceControl
agdevicecontrol/thirdparty/site-packages/linux2/twisted/trial/reporter.py
3
15233
# -*- test-case-name: twisted.trial.test.test_trial -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # Author: Jonathan D. Simms <slyphon@twistedmatrix.com> # Original Author: Jonathan Lange <jml@twistedmatrix.com> from __future__ import generators import sys, types import war...
gpl-2.0
2,850,688,944,673,330,000
32.405702
119
0.575789
false
eebssk1/CAF_MSM_Kernel_msm8916_64
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
2,926,102,911,573,132,300
24.653333
75
0.651247
false
frreiss/tensorflow-fred
tensorflow/compiler/tests/matrix_triangular_solve_op_test.py
14
7183
# 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 applica...
apache-2.0
-6,328,305,133,745,971,000
40.281609
80
0.653766
false
awatts/boto
boto/sdb/db/model.py
152
10158
# Copyright (c) 2006,2007,2008 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,...
mit
7,552,580,929,164,204,000
33.317568
95
0.570388
false
guewen/odoo
addons/account/project/wizard/account_analytic_journal_report.py
378
3164
# -*- 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...
agpl-3.0
5,971,742,572,881,555,000
41.756757
192
0.606195
false
3dfxsoftware/cbss-addons
vauxoo_reports/sale_order_report/report/amd_computadoras_sale_report.py
1
1740
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # author.name@company.com # # This program is free software: you can redistrib...
gpl-2.0
-300,955,707,202,593,860
37.666667
83
0.623563
false
webu/django-cms
cms/test_utils/project/emailuserapp/forms.py
61
3574
# -*- coding: utf-8 -*- from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import EmailUser class UserCreationForm(forms.ModelForm): """ A form for creating a new user, including the required email and passw...
bsd-3-clause
6,759,825,045,499,173,000
31.198198
83
0.612759
false
Fafou/Sick-Beard
sickbeard/clients/requests/packages/urllib3/contrib/ntlmpool.py
262
4740
# urllib3/contrib/ntlmpool.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://co...
gpl-3.0
-624,329,888,205,280,000
38.5
77
0.563924
false
dpayne9000/Rubixz-Coin
qa/rpc-tests/test_script_address2.py
1
4079
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new Rubixzcoin multisig prefix functionality. # from test_framework.test_framework import Bitco...
mit
9,043,095,281,890,640,000
39.79
93
0.633734
false
sightmachine/simplecv2-facerecognizer
examples/mustachinator.py
1
1560
#!/usr/bin/python from operator import add from simplecv.core.camera import Camera from simplecv.display import Display from simplecv.factory import Factory cam = Camera() display = Display((800,600)) counter = 0 # load the cascades face_cascade = HaarCascade("face") nose_cascade = HaarCascade("nose") stache = Image...
bsd-2-clause
-9,220,633,982,461,406,000
37.04878
93
0.624359
false
UoK-Psychology/Openethics
root/tests/views.py
1
5023
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from mock import patch, call from ethicsapplication.models import EthicsApplication class IndexViewTestCase(TestCase): def setUp(self): self.user = User.objects.create_user...
gpl-3.0
-5,101,681,904,553,390,000
50.265306
150
0.611985
false
fabada/pootle
pootle/apps/pootle_app/project_tree.py
5
16115
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import errno import lo...
gpl-3.0
-8,047,285,457,306,035,000
35.132287
116
0.60422
false
NMGRL/pychron
pychron/mv/diode_locator.py
2
1121
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
apache-2.0
2,390,733,933,697,944,000
37.655172
81
0.530776
false
StudTeam6/competition
sw/ground_segment/python/udp_link/datalink_to_w5100.py
89
1441
#!/usr/bin/python import os import sys import socket import struct from optparse import OptionParser sys.path.append(os.getenv("PAPARAZZI_HOME") + "/sw/lib/python") parser = OptionParser() parser.add_option("-d", "--destip", dest="dest_addr", help="Destination IP for messages picked up from local socket", default="1...
gpl-2.0
1,211,181,697,388,336,400
32.511628
142
0.696738
false
idjaw/cliff
cliff/formatters/base.py
3
1507
"""Base classes for formatters. """ import abc import six @six.add_metaclass(abc.ABCMeta) class Formatter(object): @abc.abstractmethod def add_argument_group(self, parser): """Add any options to the argument parser. Should use our own argument group. """ @six.add_metaclass(abc.AB...
apache-2.0
6,276,743,716,660,493,000
29.14
78
0.676841
false
coll-gate/collgate
server/main/language.py
1
4780
# -*- coding: utf-8; -*- # # @file language.py # @brief Views related to the language type. # @author Frédéric SCHERMA (INRA UMR1095) # @date 2016-09-01 # @copyright Copyright (c) 2016 INRA/CIRAD # @license MIT (see LICENSE file) # @details from django.core.exceptions import SuspiciousOperation from django.shortcuts i...
mit
-7,089,780,795,515,978,000
24.015707
75
0.657807
false
PacktPublishing/Mastering-Mesos
Chapter4/Aurora/src/test/python/apache/aurora/common/test_cluster_option.py
14
2562
# # 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, software # distributed under ...
mit
934,750,406,198,310,000
31.025
88
0.735753
false
petewarden/tensorflow
tensorflow/python/data/experimental/ops/prefetching_ops.py
17
11416
# 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...
apache-2.0
-3,976,324,286,849,288,700
39.626335
116
0.698318
false
ctismer/pyfilesystem
fs/contrib/tahoelafs/__init__.py
14
15472
''' fs.contrib.tahoelafs ==================== This modules provides a PyFilesystem interface to the Tahoe Least Authority File System. Tahoe-LAFS is a distributed, encrypted, fault-tolerant storage system: http://tahoe-lafs.org/ You will need access to a Tahoe-LAFS "web api" service. Example (it wil...
bsd-3-clause
7,316,195,165,693,776,000
35.281928
96
0.576525
false
kumarkrishna/sympy
sympy/printing/latex.py
7
71602
""" A Printer which converts an expression into its LaTeX equivalent. """ from __future__ import print_function, division from sympy.core import S, Add, Symbol from sympy.core.function import _coeff_isneg from sympy.core.sympify import SympifyError from sympy.core.alphabets import greeks from sympy.core.operations im...
bsd-3-clause
3,123,879,096,282,475,000
34.569796
155
0.511452
false
codecollision/DropboxToFlickr
django/contrib/localflavor/br/forms.py
308
5803
# -*- coding: utf-8 -*- """ BR-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, CharField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ ...
bsd-3-clause
8,973,599,333,357,177,000
34.601227
104
0.579528
false
catapult-project/catapult
third_party/gsutil/gslib/vendored/boto/boto/swf/layer1_decisions.py
153
11938
""" Helper class for creating decision responses. """ class Layer1Decisions(object): """ Use this object to build a list of decisions for a decision response. Each method call will add append a new decision. Retrieve the list of decisions from the _data attribute. """ def __init__(self): ...
bsd-3-clause
-1,264,611,811,870,793,700
40.595819
84
0.550176
false
abzaloid/maps
django-project/lib/python2.7/site-packages/django/core/servers/fastcgi.py
170
6631
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is an adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standal...
mit
3,992,909,658,636,593,000
34.459893
94
0.625848
false
sajuptpm/murano
murano/dsl/exceptions.py
1
3632
# Copyright (c) 2014 Mirantis, 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...
apache-2.0
4,971,076,513,574,529,000
26.725191
78
0.651982
false
rafafigueroa/amrws
src/amrpkg/scripts/virtual_tracking.py
1
5059
#!/usr/bin/env python # -*- coding: utf-8 -*- import rospy from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist from geometry_msgs.msg import PoseStamped from tf.transformations import euler_from_quaternion import numpy as np def minAngle(ang): return np.arctan2(np.sin(ang), np.cos(ang)) def ori...
mit
5,498,423,566,118,179,000
23.921182
76
0.478553
false
knehez/edx-platform
lms/djangoapps/shoppingcart/urls.py
159
1390
from django.conf.urls import patterns, url from django.conf import settings urlpatterns = patterns( 'shoppingcart.views', url(r'^postpay_callback/$', 'postpay_callback'), # Both the ~accept and ~reject callback pages are handled here url(r'^receipt/(?P<ordernum>[0-9]*)/$', 'show_receipt'), url(r'^don...
agpl-3.0
-2,123,860,830,304,580,400
46.931034
128
0.658273
false
cxysteven/Paddle
python/paddle/v2/dataset/imikolov.py
1
3909
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
2,374,105,054,414,072,300
29.779528
79
0.618828
false
peterfpeterson/mantid
scripts/Muon/GUI/Common/calculate_pair_and_group.py
3
5823
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + impo...
gpl-3.0
4,403,268,382,402,388,500
37.058824
119
0.673536
false
riteshshrv/django
django/http/__init__.py
341
1103
from django.http.cookie import SimpleCookie, parse_cookie from django.http.request import ( HttpRequest, QueryDict, RawPostDataException, UnreadablePostError, ) from django.http.response import ( BadHeaderError, FileResponse, Http404, HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponse...
bsd-3-clause
-4,603,001,301,994,883,600
46.956522
78
0.789665
false
angdraug/nova
nova/tests/objects/test_instance_info_cache.py
32
4744
# Copyright 2013 IBM Corp. # # 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 agree...
apache-2.0
3,935,798,943,946,205,700
39.547009
78
0.627319
false
apt-helion/viperidae
data/models.py
1
2405
import datetime from peewee import * from pymongo import MongoClient from .config import Config database = Config.DATABASE # monkey patch the DateTimeField to add support for the isoformt which is what # peewee exports as from DataSet DateTimeField.formats.append('%Y-%m-%dT%H:%M:%S') DateField.formats.append('%Y-%m-...
gpl-3.0
6,635,790,639,644,045,000
29.0625
82
0.613721
false
brianmoose/civet
client/tests/test_JobRunner.py
2
13950
# Copyright 2016 Battelle Energy Alliance, 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 agr...
apache-2.0
-682,032,381,414,663,000
39.789474
126
0.566523
false
claws/AutobahnPython
autobahn/autobahn/websocket/http.py
35
19607
############################################################################### ## ## Copyright (C) 2011-2013 Tavendo GmbH ## ## 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 ## ## h...
apache-2.0
-3,128,548,720,702,845,400
83.150215
693
0.668741
false
nthall/pip
pip/compat/dictconfig.py
921
23096
# This is a copy of the Python logging.config.dictconfig module, # reproduced with permission. It is provided here for backwards # compatibility for Python versions prior to 2.7. # # Copyright 2009-2010 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # docu...
mit
7,203,165,168,251,220,000
39.877876
105
0.525416
false
pombredanne/libcomps
libcomps/src/python/docs/doc-sources/conf.py
2
8487
# -*- coding: utf-8 -*- # # x documentation build configuration file, created by # sphinx-quickstart on Mon Dec 9 16:34:26 2013. # # 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. # # All confi...
gpl-2.0
7,757,494,753,393,517,000
31.026415
121
0.699187
false
Health123/ansible
lib/ansible/utils/module_docs_fragments/cloudstack.py
85
2161
# -*- coding: utf-8 -*- # Copyright (c) 2015 René Moser <mail@renemoser.net> # # 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 # (...
gpl-3.0
1,994,771,917,855,923,200
32.230769
80
0.7
false
go-smart/glossia-quickstart
code/problem.py
1
13906
"""This requires CGAL mesher applied to series of surfaces. See readme.txt for details. """ from __future__ import print_function # Use FEniCS for Finite Element import fenics as d # Useful to import the derivative separately from dolfin import dx # Useful numerical libraries import numpy as N import matplotlib mat...
mit
5,167,436,385,352,867,000
37.30854
157
0.593629
false
restudToolbox/package
development/testing/_modules/auxiliary_reliability.py
1
6085
from statsmodels.tools.eval_measures import rmse from copy import deepcopy import numpy as np import shlex import os from config import SPEC_DIR import respy def get_est_log_info(): """ Get the choice probabilities. """ with open('est.respy.info') as in_file: for line in in_file.readlines(): ...
mit
-5,061,372,821,688,122,000
26.912844
89
0.601972
false
yesho/MITMf
core/proxyplugins.py
13
4292
# Copyright (c) 2010-2011 Ben Schmidt, Marcello Salvati # # 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 progr...
gpl-3.0
351,447,927,571,027,600
34.471074
126
0.622088
false
kracwarlock/Lasagne
lasagne/tests/layers/test_conv.py
9
18394
import numpy as np import pytest import importlib import theano import lasagne from lasagne.utils import floatX def conv2d(input, kernel, border_mode): output = np.zeros((input.shape[0], kernel.shape[0], input.shape[2] + kernel.shape[2] - 1, in...
mit
4,293,136,424,335,137,000
38.219616
79
0.559204
false
UdjinM6/dash
test/functional/feature_help.py
2
1909
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Verify that starting dashd with -h works as expected.""" import subprocess from test_framework.test_framewo...
mit
-4,326,766,752,787,602,000
40.5
100
0.65846
false
richardcs/ansible
lib/ansible/utils/module_docs_fragments/dimensiondata_wait.py
192
1429
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Dimension Data # # This module 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 ...
gpl-3.0
6,233,215,318,716,246,000
30.755556
83
0.705388
false
Perferom/android_kernel_lge_msm7x27-3.0.x
scripts/build-all.py
1250
9474
#! /usr/bin/env python # Copyright (c) 2009-2011, 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 # n...
gpl-2.0
-6,376,592,524,960,908,000
34.350746
81
0.593519
false
level420/iconfont
generate.py
1
4953
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2008 - 2012 1&1 Internet AG, Germany, http://www.1und1.de # # License: # MIT: https://opensource.o...
mit
8,421,166,476,534,527,000
31.801325
94
0.573794
false
pitch-sands/i-MPI
flask/Lib/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py
17
15432
# postgresql/psycopg2.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Support for the PostgreSQL database via the psycopg2 driver. Driver ------ ...
bsd-3-clause
1,876,613,324,961,498,400
38.468031
107
0.645607
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdeui/KPixmapSequence.py
1
1041
# encoding: utf-8 # module PyKDE4.kdeui # from /usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyKDE4.kdecore as __PyKDE4_kdecore import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtGui import PyQt4.QtSvg as __PyQt4_QtSvg cl...
gpl-2.0
6,659,048,858,140,943,000
26.394737
101
0.662824
false
vimagick/youtube-dl
youtube_dl/extractor/channel9.py
124
11345
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class Channel9IE(InfoExtractor): ''' Common extractor for channel9.msdn.com. The type of provided URL (video or playlist) is determined according to meta Search.PageType from web p...
unlicense
-722,020,901,182,227,300
39.956679
153
0.554429
false
lizoyu/kaggle-DigitRecognizer
jupyter/resume_train.py
1
1272
from lib.data_utils import get_MNIST_data from keras.models import load_model from keras.backend import tf as ktf from keras.optimizers import RMSprop from keras.callbacks import ModelCheckpoint, EarlyStopping # Read the MNIST data. Notice that we assume that it's 'kaggle-DigitRecognizer/data/train.csv', and we use he...
gpl-3.0
9,074,484,426,298,482,000
49.92
149
0.709119
false
GoogleCloudPlatform/ml-pipeline-generator-python
examples/kfp/demo.py
1
2531
# python3 # Copyright 2020 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 by applicab...
apache-2.0
-7,146,816,260,771,234,000
29.865854
74
0.674832
false
ernstp/kivy
kivy/tests/test_lang.py
26
5715
''' Language tests ============== ''' import unittest from weakref import proxy from functools import partial class BaseClass(object): uid = 0 # base class needed for builder def __init__(self, **kwargs): super(BaseClass, self).__init__() self.proxy_ref = proxy(self) self.childre...
mit
8,849,077,230,448,503,000
24.065789
67
0.569029
false
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/tm/tmsamlssoprofile.py
3
70968
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-7,694,855,360,198,886,000
33.635432
310
0.737628
false
askeing/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/hsts_wsh.py
486
1784
# Copyright 2013, Google 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 above copyright # notice, this list of conditions and the f...
mpl-2.0
-5,604,237,057,437,617,000
43.6
72
0.770179
false
siddharths067/HuHubaProject
lib/urllib3/util/__init__.py
204
1044
from __future__ import absolute_import # For backwards compatibility, provide imports that used to be here. from .connection import is_connection_dropped from .request import make_headers from .response import is_fp_closed from .ssl_ import ( SSLContext, HAS_SNI, IS_PYOPENSSL, IS_SECURETRANSPORT, as...
mit
8,028,172,173,013,394,000
18.333333
68
0.627395
false
SRabbelier/Melange
thirdparty/google_appengine/google/appengine/ext/bulkload/transform.py
3
15896
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
5,308,785,058,024,714,000
26.080068
80
0.695835
false
anaran/olympia
apps/amo/management/commands/clean_redis.py
9
3337
import logging import os import socket import subprocess import sys import tempfile import time from django.core.management.base import BaseCommand import redisutils import redis as redislib log = logging.getLogger('z.redis') # We process the keys in chunks of size CHUNK. CHUNK = 3000 # Remove any sets with less th...
bsd-3-clause
-8,952,598,293,099,763,000
27.042017
78
0.540306
false
dataxu/ansible
lib/ansible/parsing/yaml/dumper.py
90
2246
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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) an...
gpl-3.0
4,392,328,333,244,897,000
27.43038
118
0.765806
false
turon/openthread
tools/harness-automation/cases/router_9_2_6.py
1
1878
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
bsd-3-clause
-5,015,353,849,229,359,000
39.826087
77
0.761448
false
inspirehep/invenio
modules/bibindex/lib/bibindex_engine_tokenizer_unit_tests.py
5
20948
# -*- coding:utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2012, 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 (...
gpl-2.0
6,696,568,995,838,467,000
47.344186
170
0.579565
false
SpokesmanReview/django-boundaryservice
boundaryservice/management/commands/loadshapefiles.py
3
10135
import logging log = logging.getLogger('boundaries.api.load_shapefiles') from optparse import make_option import os, os.path import sys from zipfile import ZipFile from tempfile import mkdtemp from django.conf import settings from django.contrib.gis.gdal import (CoordTransform, DataSource, OGRGeometry, ...
mit
-7,678,625,108,405,079,000
37.101504
79
0.565861
false
pvt88/scrapy-cloud
cobweb/spiders/search_spider_tbds.py
2
2712
import scrapy from datetime import datetime from cobweb.items import PropertyItem from cobweb.utilities import extract_number, extract_unit, extract_property_id, strip, extract_listing_type class SearchSpiderTBDS(scrapy.Spider): name = 'search_spider_tbds' def __init__(self, vendor=None, crawl_url=None, typ...
gpl-3.0
-677,495,347,441,557,900
40.723077
108
0.582965
false
celadevra/ParaJumper
parajumper/cli/new.py
1
3231
"""module to handle 'new' command.""" import tempfile import os import re from subprocess import call from clint.textui import prompt, puts, indent, colored import parajumper.item as item import parajumper.config as config import parajumper.db as db EDITOR = os.environ.get('EDITOR', 'vim') def dispatch(args): ""...
gpl-3.0
3,437,406,899,622,635,000
35.303371
96
0.618694
false
fharenheit/template-spark-app
src/main/python/ml/index_to_string_example.py
123
2014
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
-4,261,917,867,060,582,400
36.296296
86
0.695631
false
felix1m/pyspotify
spotify/user.py
3
2597
from __future__ import unicode_literals import spotify from spotify import ffi, lib, serialized, utils __all__ = [ 'User', ] class User(object): """A Spotify user. You can get users from the session, or you can create a :class:`User` yourself from a Spotify URI:: >>> session = spotify.Se...
apache-2.0
3,371,609,170,819,571,700
28.179775
79
0.589911
false
Becksteinlab/MDPOW
mdpow/version.py
1
1579
# POW package __init__.py # Copyright (c) 2010 Oliver Beckstein <orbeckst@gmail.com> # Released under the GNU Public License 3 (or higher, your choice) # See the file COPYING for details. """\ MDPOW version information ========================= MDPOW uses `semantic versioning`_ with the release number consisting of a...
gpl-3.0
-4,106,233,672,329,393,000
31.895833
85
0.69791
false
mortada/numpy
numpy/core/tests/test_umath_complex.py
70
19916
from __future__ import division, absolute_import, print_function import sys import platform from numpy.testing import * import numpy.core.umath as ncu import numpy as np # TODO: branch cuts (use Pauli code) # TODO: conj 'symmetry' # TODO: FPU exceptions # At least on Windows the results of many complex functions ar...
bsd-3-clause
8,271,814,840,366,816,000
36.087523
87
0.544838
false
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/real_world_impact/nsfw_urls.py
113
2143
# 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. """NSFW urls in the Alexa top 2000 sites.""" nsfw_urls = set([ "http://xhamster.com/", "http://xvideos.com/", "http://livejasmin.com/", "http://pornh...
mit
-5,532,768,227,242,243,000
26.139241
72
0.59916
false
RUNDSP/luigi-swf
luigi_swf/examples/task_basic.py
1
1677
#!/usr/bin/env python import datetime import logging import os.path from subprocess import call import luigi from luigi_swf import cw, LuigiSwfExecutor logger = logging.getLogger(__name__) seconds = 1. minutes = 60. * seconds hours = 60. * minutes class DemoBasicTask(luigi.Task): # Workaround for when the...
apache-2.0
7,685,299,526,347,799,000
24.029851
77
0.654741
false
zero-rp/miniblink49
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
34
7369
# Copyright (C) 2012 Google 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 above copyright # notice, this list of conditions and the ...
apache-2.0
145,791,328,630,913,120
42.093567
134
0.627494
false