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
abhinavmoudgil95/root
documentation/primer/macros/runall.py
67
1051
#! /usr/bin/env python macros = [\ "slits.C", "write_ntuple_to_file_advanced.C", "write_ntuple_to_file.C", "write_to_file.C", "ExampleMacro.C", "ExampleMacro_GUI.C", "makeMySelector.C", "RunMySelector.C", "macro1.C", "macro2.C", "macro3.C", "macro4.C", "macro5.C", "macro6.C", "macro7.C", "macro8.C", "macro9.C", "read_...
lgpl-2.1
8,163,791,009,650,599,000
19.211538
63
0.609895
false
joariasl/odoo
addons/sale_order_dates/sale_order_dates.py
223
5308
# -*- 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
-7,299,664,617,999,201,000
47.254545
98
0.587038
false
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/pyasn1/pyasn1/type/namedval.py
200
1605
# ASN.1 named integers from pyasn1 import error __all__ = [ 'NamedValues' ] class NamedValues: def __init__(self, *namedValues): self.nameToValIdx = {}; self.valToNameIdx = {} self.namedValues = () automaticVal = 1 for namedValue in namedValues: if isinstance(na...
lgpl-3.0
-3,380,965,267,302,400,000
33.891304
78
0.578193
false
FreakJoe/cryptolockpy
cryptolock/SecureDatabase.py
1
2510
"""Provides an interface for interaction with the encrypted sqlite database""" from cryptolock.Database import Database from cryptolock.security import encrypt, decrypt, ensure_key_validity from cryptolock.exceptions import DocumentNotFoundException from config import DB_NAME class SecureDatabase(object): """Inte...
mit
2,641,452,946,776,980,500
38.21875
178
0.688446
false
neilLasrado/frappe
frappe/utils/doctor.py
9
3574
from __future__ import unicode_literals, print_function import frappe.utils from collections import defaultdict from rq import Worker, Connection from frappe.utils.background_jobs import get_redis_conn, get_queue, get_queue_list from frappe.utils.scheduler import is_scheduler_disabled from six import iteritems def ge...
mit
5,637,977,160,476,845,000
25.474074
82
0.675993
false
epfl-lts2/pygsp
examples/random_walk.py
1
1806
r""" Random walks ============ Probability of a random walker to be on any given vertex after a given number of steps starting from a given distribution. """ # sphinx_gallery_thumbnail_number = 2 import numpy as np from scipy import sparse from matplotlib import pyplot as plt import pygsp as pg N = 7 steps = [0, 1,...
bsd-3-clause
8,127,118,135,291,678,000
25.955224
82
0.605759
false
a-parhom/edx-platform
openedx/core/djangoapps/content/course_overviews/tasks.py
17
1815
import logging from celery import task from celery_utils.persist_on_failure import LoggedPersistOnFailureTask from django.conf import settings from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore from openedx.core.djangoapps.content.course_overviews.models import CourseOvervi...
agpl-3.0
-5,129,126,171,518,053,000
28.274194
98
0.697521
false
jnayak1/osf.io
website/conferences/model.py
5
2592
# -*- coding: utf-8 -*- import bson from modularodm import fields, Q from modularodm.exceptions import ModularOdmException from framework.mongo import StoredObject from website.conferences.exceptions import ConferenceError DEFAULT_FIELD_NAMES = { 'submission1': 'poster', 'submission2': 'talk', 'submissio...
apache-2.0
-8,042,053,060,265,043,000
40.142857
87
0.709877
false
tjanez/ansible
lib/ansible/plugins/callback/timer.py
168
1125
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from datetime import datetime from ansible.plugins.callback import CallbackBase class CallbackModule(CallbackBase): """ This callback module tells you how long your plays ran for. """ ...
gpl-3.0
-4,741,815,508,164,097,000
30.25
137
0.661333
false
ayoubg/gem5-graphics
gem5-gpu/tests/configs/gem5-gpu-ruby.py
1
7700
# Copyright (c) 2006-2008 The Regents of The University of Michigan # Copyright (c) 2012-2015 Mark D. Hill and David A. Wood # 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 so...
bsd-3-clause
5,956,949,063,054,247,000
32.624454
92
0.701558
false
40223239/cdb0622
static/Brython3.1.1-20150328-091302/Lib/linecache.py
785
3864
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globa...
gpl-3.0
-8,713,969,954,050,319,000
27.835821
77
0.552277
false
albertomurillo/ansible
lib/ansible/modules/cloud/amazon/lambda.py
30
22661
#!/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 distributed...
gpl-3.0
-2,961,850,021,296,127,000
37.149832
151
0.610123
false
RedHatQE/cfme_tests
cfme/tests/control/test_control_simulation.py
1
1824
import pytest from cfme import test_requirements from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import ONE_PER_CATEGORY from cfme.utils.appliance.implementations.ui import navigate_to pytestmark = [ pytest.mark.long_running, pytest.mark.provider(classes=[InfraPro...
gpl-2.0
-1,529,865,549,088,083,500
28.419355
77
0.642544
false
jeffreyzli/pokerbot-2017
MiniTourn_Triple/GameData.py
1
15989
import HandRankings as Hand from deuces.deuces import Card, Evaluator class GameData: def __init__(self, name, opponent_name, stack_size, bb): # match stats self.name = name self.opponent_name = opponent_name self.starting_stack_size = int(stack_size) self.num_hands = 0 ...
mit
4,925,240,639,102,176,000
42.330623
102
0.453124
false
JCA-Developpement/Odoo
addons/project_issue/project_issue.py
5
31214
#-*- 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,303,291,748,206,236,000
51.719595
238
0.593271
false
jonathan-beard/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/factories.py
34
21631
""" Factories for use in tests of XBlocks. """ import functools import pymongo.message import threading import traceback from collections import defaultdict from decorator import contextmanager from uuid import uuid4 from factory import Factory, Sequence, lazy_attribute_sequence, lazy_attribute from factory.container...
agpl-3.0
7,054,254,968,869,825,000
36.166667
115
0.61851
false
wbthomason/minigrade
minigrade.py
1
17857
from flask import Flask, render_template, request, jsonify, Response, abort, session, stream_with_context, redirect, g from ast import literal_eval import subprocess import re import requests import json import shutil import time import os import sqlite3 import logging import sys import commands import threading minig...
mit
-4,476,878,641,102,194,700
38.332599
147
0.552668
false
GehenHe/Recognize-Face-on-Android
tensorflow/python/training/sync_replicas_optimizer_test.py
13
11344
# 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...
apache-2.0
4,795,343,331,655,333,000
39.370107
80
0.644217
false
hefen1/chromium
tools/perf/benchmarks/benchmark_smoke_unittest.py
15
4441
# 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. """Run the first page of one benchmark for every module. Only benchmarks that have a composable measurement are included. Ideally this test would be compreh...
bsd-3-clause
-3,100,154,945,228,474,400
37.95614
80
0.725963
false
chromium/web-page-replay
third_party/dns/rdtypes/keybase.py
248
5017
# Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
7,943,649,026,068,709,000
32.671141
81
0.586805
false
nwjs/chromium.src
chrome/browser/vr/PRESUBMIT.py
3
1328
# Copyright 2017 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. """Presubmit script for changes affecting chrome/browser/vr See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details abo...
bsd-3-clause
4,806,534,365,545,533,000
31.390244
79
0.753765
false
zalando/patroni
patroni/api.py
1
40300
import base64 import hmac import json import logging import psycopg2 import time import traceback import dateutil.parser import datetime import os import six import socket import sys from ipaddress import ip_address, ip_network as _ip_network from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from...
mit
-8,030,453,850,098,482,000
45.215596
120
0.590819
false
mmazanec22/too-windy
env/lib/python3.5/site-packages/pip/_vendor/lockfile/linklockfile.py
536
2652
from __future__ import absolute_import import time import os from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class LinkLockFile(LockBase): """Lock access to a file using atomic property of link(2). >>> lock = LinkLockFile('somefile') >>> lock = Link...
gpl-3.0
-4,028,884,478,328,858,600
35.328767
75
0.507919
false
heke123/chromium-crosswalk
third_party/pylint/pylint/checkers/design_analysis.py
59
14962
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
bsd-3-clause
-7,703,321,333,731,783,000
40.217631
80
0.551998
false
sve-odoo/odoo
addons/mrp/mrp.py
9
64294
# -*- 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
7,542,235,777,335,139,000
53.486441
296
0.601036
false
leeseuljeong/leeseulstack_neutron
neutron/neutron_plugin_base_v2.py
17
14715
# Copyright 2011 VMware, 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 ...
apache-2.0
3,487,729,163,138,629,000
40.803977
79
0.592253
false
wooga/airflow
airflow/api/auth/backend/kerberos_auth.py
5
5597
# 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 u...
apache-2.0
7,344,094,935,603,928,000
36.313333
98
0.694301
false
patsissons/Flexget
flexget/plugins/plugin_spy_headers.py
23
4220
from __future__ import unicode_literals, division, absolute_import import logging import urllib2 import httplib import socket from flexget import plugin from flexget.event import event log = logging.getLogger('spy_headers') class CustomHTTPConnection(httplib.HTTPConnection): def __init__(self, *args, **kwargs)...
mit
-1,356,666,361,886,405,600
32.76
83
0.604028
false
avanzosc/avanzosc6.1
avanzosc_stock_invoice_pesamod/__init__.py
1
1095
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
2,555,510,857,156,987,400
42.8
78
0.624658
false
jdemaeyer/scrapy
tests/test_crawl.py
14
10928
import json import socket import logging from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.http import Request from scrapy.crawler import CrawlerRunner from scrapy.utils.python import to_unicode from tests import mock from tests.spiders impo...
bsd-3-clause
9,179,196,589,656,959,000
39.624535
103
0.664257
false
nilsgrabbert/spark
examples/src/main/python/mllib/naive_bayes_example.py
106
2285
# # 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
725,158,347,790,230,300
34.153846
96
0.721225
false
tdfischer/protobuf
python/google/protobuf/internal/decoder.py
223
26136
# 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: # # * Redistributions o...
bsd-3-clause
8,088,104,740,778,168,000
35.3
80
0.660583
false
jfhumann/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/filters/inject_meta_charset.py
1730
2746
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def __init__(self, source, encoding): _base.Filter.__init__(self, source) self.encoding = encoding def __iter__(self): state = "pre_head" meta_found = (self.enco...
mpl-2.0
766,359,624,140,021,800
41.246154
102
0.431173
false
UBERMALLOW/external_skia
tools/jsondiff.py
67
7458
#!/usr/bin/python ''' Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' ''' Gathers diffs between 2 JSON expectations files, or between actual and expected results within a single JSON actual-results file, and generates an old-vs-new diff...
bsd-3-clause
5,378,975,015,885,560,000
36.29
87
0.614374
false
flyballlabs/threatdetectionservice
api/venv/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py
450
9668
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys import os from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll, winapi_test winterm = None if windll is not None: winterm = WinTerm() def ...
apache-2.0
-5,407,541,810,699,044,000
39.966102
103
0.584816
false
RNAcentral/rnacentral-webcode
rnacentral/portal/models/ensembl_karyotype.py
1
1093
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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 a...
apache-2.0
-5,088,892,985,346,980,000
38.035714
150
0.779506
false
staslev/incubator-beam
sdks/python/apache_beam/runners/dataflow/internal/clients/dataflow/message_matchers.py
9
4292
# # 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
-2,532,038,113,027,068,400
33.894309
80
0.669851
false
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.5-beta1/content/Lib/fractions.py
252
22390
# Originally contributed by Sjoerd Mullender. # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>. """Rational, infinite-precision, real numbers.""" from __future__ import division from decimal import Decimal import math import numbers import operator import re __all__ = ['Fraction', 'gcd'] Rational...
gpl-3.0
234,536,269,373,083,260
36.008264
82
0.536311
false
vanessajurtz/lasagne4bio
peptide_MHCII/scripts/seq2bl.py
1
7560
#!/usr/bin/env python from __future__ import print_function import argparse import subprocess import sys import os import numpy as np from scipy.io import netcdf ########################################################################## # FUNCTIONS ###################################################################...
gpl-3.0
3,531,006,673,278,721,500
26.692308
84
0.526587
false
wonder-sk/QGIS
python/plugins/processing/algs/lidar/lastools/lasnoise.py
5
4112
# -*- coding: utf-8 -*- """ *************************************************************************** lasnoise.py --------------------- Date : September 2013 and May 2016 Copyright : (C) 2013 by Martin Isenburg Email : martin near rapidlasso point com ***...
gpl-2.0
-6,018,444,883,814,296,000
44.186813
113
0.583171
false
nickofbh/kort2
app/startup/init_app.py
1
1559
from flask.ext.security import Security, SQLAlchemyUserDatastore from flask.ext.social import Social, SQLAlchemyConnectionDatastore from logging.handlers import SMTPHandler import logging def init_error_logger_with_email_handler(app): """ Initialize a logger to send emails on error-level messages. Unhandl...
mit
1,743,370,612,890,378,000
40.052632
91
0.649134
false
t-tran/libcloud
libcloud/common/buddyns.py
24
2400
# 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 use ...
apache-2.0
-2,820,083,835,925,164,500
30.168831
74
0.651667
false
tobykurien/MakerDroid
assetsrc/pycam.mp3/src/pycam/Exporters/GCodeExporter.py
1
13911
# -*- coding: utf-8 -*- """ $Id: GCodeExporter.py 1092 2011-06-13 14:40:56Z sumpfralle $ Copyright 2010-2011 Lars Kruse <devel@sumpfralle.de> Copyright 2008-2009 Lode Leroy This file is part of PyCAM. PyCAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License a...
gpl-3.0
8,362,321,997,286,307,000
40.278932
93
0.580763
false
detrout/pykolab
pykolab/setup/setup_imap.py
1
7351
# -*- coding: utf-8 -*- # Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com) # # Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> # # 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 ...
gpl-3.0
-5,662,695,082,211,425,000
42.241176
191
0.623317
false
hoosteeno/mozillians
vendor-local/lib/python/rest_framework/tests/test_serializer_bulk_update.py
21
8866
""" Tests to cover bulk create and update using serializers. """ from __future__ import unicode_literals from django.test import TestCase from rest_framework import serializers class BulkCreateSerializerTests(TestCase): """ Creating multiple instances using serializers. """ def setUp(self): c...
bsd-3-clause
6,941,662,539,054,653,000
30.892086
99
0.507895
false
listingmirror/boto
boto/kms/exceptions.py
135
1523
# The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- # ITY, FITNESS FOR A PARTICULAR PURPOS...
mit
858,735,194,900,539,500
20.152778
74
0.792515
false
jtaghiyar/kronos
kronos/kronos.py
1
9365
""" Created on Mar 10, 2014 @author: jtaghiyar """ import os import subprocess as sub from kronos_version import kronos_version from utils import Pipeline from helpers import make_dir, Configurer from workflow_manager import WorkFlow, WorkFlowManager from plumber import Plumber from string import Template from tempfi...
mit
2,441,040,216,629,109,000
39.717391
95
0.59701
false
bjzhang/xen
tools/python/genwrap.py
49
11753
#!/usr/bin/python import sys,os import idl (TYPE_DEFBOOL, TYPE_BOOL, TYPE_INT, TYPE_UINT, TYPE_STRING, TYPE_ARRAY, TYPE_AGGREGATE) = range(7) def py_type(ty): if ty == idl.bool: return TYPE_BOOL if ty.typename == "libxl_defbool": return TYPE_DEFBOOL if isinstance(ty, idl.Enumeration): ...
gpl-2.0
-8,897,952,745,553,600,000
34.400602
110
0.49766
false
DougFirErickson/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/drawing/nx_agraph.py
40
13359
""" *************** Graphviz AGraph *************** Interface to pygraphviz AGraph class. Examples -------- >>> G=nx.complete_graph(5) >>> A=nx.to_agraph(G) >>> H=nx.from_agraph(A) See Also -------- Pygraphviz: http://networkx.lanl.gov/pygraphviz """ # Copyright (C) 2004-2012 by # Aric Hagberg <hagberg@lanl.go...
gpl-3.0
-6,826,047,771,870,065,000
28.885906
78
0.593832
false
maverickhuenlam/blog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/emacs.py
364
2486
# -*- coding: utf-8 -*- """ pygments.styles.emacs ~~~~~~~~~~~~~~~~~~~~~ A highlighting style for Pygments, inspired by Emacs. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import ...
mit
-8,701,955,396,103,310,000
33.527778
70
0.447305
false
total-impact/total-impact-core
test/unit_tests/providers/test_webpage.py
4
3437
# -*- coding: utf-8 -*- # need this line because test utf-8 strings later import os import collections from test.unit_tests.providers import common from test.unit_tests.providers.common import ProviderTestCase from totalimpact.providers.provider import Provider, ProviderContentMalformedError from test.utils import ...
mit
589,685,535,771,133,600
39.154762
139
0.653721
false
Jollytown/Garuda
server/garuda/lib/python2.7/site-packages/django/contrib/gis/shortcuts.py
197
1129
import zipfile from io import BytesIO from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = BytesIO() zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) zf.writestr('d...
mit
-7,978,633,604,650,189,000
29.513514
79
0.695306
false
buaabyl/lime_dict
ngram-chs/test_model.py
1
2375
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # # GNU GENERAL PUBLIC LICENSE # Version 2, June 1991 # # 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; eit...
gpl-2.0
5,729,214,951,637,735,000
25.144444
119
0.60646
false
ostroproject/meta-iotqa
lib/oeqa/runtime/nodejs/bleno.py
1
3666
#!/usr/bin/env python3 import os import sys import time import json import shutil import subprocess from oeqa.oetest import oeRuntimeTest from oeqa.utils.decorators import tag class BlenoTest(oeRuntimeTest): cleanup = False bleno_prefix_dir = '/home/root' def setUp(self): ''' Insta...
mit
-7,948,935,629,694,568,000
33.92381
99
0.535734
false
snailbob/namebench
nb_third_party/dns/edns.py
248
4312
# Copyright (C) 2009 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND NOMIN...
apache-2.0
7,793,788,975,581,201,000
29.366197
80
0.624536
false
kongseokhwan/kulcloud-iitp-neutron
neutron/tests/functional/api/test_policies.py
6
3938
# Copyright (c) 2014 Red Hat, 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 require...
apache-2.0
3,933,823,092,550,710,300
38.777778
79
0.643982
false
mspark93/VTK
ThirdParty/AutobahnPython/autobahn/wamp/role.py
17
6212
############################################################################### ## ## 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:/...
bsd-3-clause
-8,678,514,721,681,142,000
30.693878
123
0.627173
false
mboersma/docker-registry
scripts/create_ancestry.py
38
4259
#!/usr/bin/env python from __future__ import print_function import hashlib import sys import simplejson as json from docker_registry.core import exceptions import docker_registry.storage as storage store = storage.load() images_cache = {} ancestry_cache = {} dry_run = True def warning(msg): print('# Warning...
apache-2.0
-8,885,589,580,331,090,000
31.022556
75
0.610002
false
upgrades-migrations/preupgrade-assistant
tests/test_generation.py
2
2933
from __future__ import unicode_literals import unittest import tempfile import shutil import os from glob import glob from preupg.xmlgen.compose import XCCDFCompose, ComposeXML from preupg.utils import FileHelper from preupg import settings try: import base except ImportError: import tests.base as base FOO_D...
gpl-3.0
-9,129,212,730,886,706,000
33.916667
78
0.651551
false
drawks/ansible
lib/ansible/modules/cloud/smartos/smartos_image_facts.py
58
2857
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@gmail.com> # 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': '1.1', ...
gpl-3.0
891,851,594,811,400,600
25.682243
94
0.61331
false
AlexanderKaluzhny/instanotifier
instanotifier/feedsource/tasks.py
1
1090
import logging from celery import chain, shared_task from instanotifier.fetcher.main import fetch from instanotifier.parser.main import parse_and_save from instanotifier.publisher.tasks import publish from instanotifier.feedsource.models import FeedSource @shared_task def consume_feed(feedsource_pk): feed_sourc...
mit
-8,373,303,387,811,816,000
28.459459
84
0.730275
false
an7oine/WinVHS
Cygwin/lib/python2.7/threading.py
15
47210
"""Thread module emulating a subset of Java's threading model.""" import sys as _sys try: import thread except ImportError: del _sys.modules[__name__] raise import warnings from collections import deque as _deque from time import time as _time, sleep as _sleep from traceback import format_exc as _format...
gpl-3.0
-1,709,212,188,717,442,300
34.469572
99
0.58494
false
thomasboyt/zulip
bots/jabber_mirror.py
17
2060
#!/usr/bin/env python # Copyright (C) 2014 Zulip, Inc. # # 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, m...
apache-2.0
248,250,358,443,855,300
33.915254
86
0.739806
false
embray/astropy_helpers
astropy_helpers/sphinx/ext/phantom_import.py
63
5854
""" ============== phantom_import ============== Sphinx extension to make directives from ``sphinx.ext.autodoc`` and similar extensions to use docstrings loaded from an XML file. This extension loads an XML file in the Pydocweb format [1] and creates a dummy module that contains the specified docstrings. This can be ...
bsd-3-clause
-7,753,107,118,657,005,000
34.053892
79
0.526648
false
kowito/django-autocomplete-light
autocomplete_light/tests/generic.py
3
2146
import unittest from django.test import TransactionTestCase from django.contrib.contenttypes.models import ContentType from cities_light.models import Country, City from gfk_autocomplete.forms import TaggedItemForm from optionnal_gfk_autocomplete.forms import OptionnalTaggedItemForm import autocomplete_light clas...
mit
-2,285,408,161,107,717,600
31.029851
85
0.507922
false
Bysmyyr/chromium-crosswalk
tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/opsworks/test_layer1.py
114
2121
# 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
-863,694,600,709,380,000
38.277778
77
0.731259
false
gerryhd/diabot-assistant
lib/python2.7/site-packages/pip/_vendor/requests/__init__.py
327
2326
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
gpl-3.0
-4,771,305,494,699,191,000
25.431818
77
0.663801
false
artful-addict/rwd-starter-kit
node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
1355
44604
# 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
mit
2,553,579,039,716,467,000
35.530713
80
0.662721
false
flit/pyOCD
pyocd/rtos/freertos.py
2
20706
# pyOCD debugger # Copyright (c) 2016-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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
3,921,119,610,846,249,500
36.784672
135
0.576548
false
spaceone/mils-secure
app/console/app/pygments/styles/manni.py
24
2379
# -*- coding: utf-8 -*- """ pygments.styles.manni ~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. This is a port of the style used in the `php port`_ of pygments by Manni. The style is called 'default' there. :copyright: 2006-2007 by Armin Ronacher, Manni ...
mit
-7,596,017,939,640,651,000
30.72
70
0.522068
false
elmer/smart-gitosis
gitosis/gitdaemon.py
24
2451
import errno import logging import os from ConfigParser import NoSectionError, NoOptionError log = logging.getLogger('gitosis.gitdaemon') from gitosis import util def export_ok_path(repopath): p = os.path.join(repopath, 'git-daemon-export-ok') return p def allow_export(repopath): p = export_ok_path(rep...
gpl-2.0
909,698,860,963,063,300
26.233333
70
0.555692
false
RuralHunter/showtime
ext/libyuv/tools/valgrind-libyuv/libyuv_tests.py
13
5222
#!/usr/bin/env python # Copyright (c) 2012 The LibYuv Project Authors. All rights reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All c...
gpl-3.0
-986,795,738,026,042,600
43.254237
80
0.687859
false
wimnat/ansible
.azure-pipelines/scripts/combine-coverage.py
25
2174
#!/usr/bin/env python """ Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job. Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}" The recommended coverage artifact name format is: Coverage $(System.JobAtt...
gpl-3.0
4,483,138,846,012,009,000
35.233333
131
0.666973
false
hill-a/stable-baselines
stable_baselines/acer/acer_simple.py
1
39128
import time import warnings import numpy as np import tensorflow as tf from gym.spaces import Discrete, Box from collections import deque from stable_baselines import logger from stable_baselines.common.schedules import Scheduler from stable_baselines.common.tf_util import batch_to_seq, seq_to_batch, \ check_shap...
mit
5,275,019,937,884,541,000
49.881664
120
0.552469
false
team-vigir/vigir_pluginlib
vigir_pluginlib_manager/src/vigir_pluginlib_manager/plugin_tree_model.py
1
9877
#!/usr/bin/env python import bisect import QtCore import rospy import rospkg from python_qt_binding.QtCore import Qt, QObject, QAbstractItemModel from vigir_pluginlib_msgs.msg import PluginState, PluginDescription # Tree Model for Plugins class PluginTreeModel(QtCore.QAbstractItemModel): def __init__(self, ...
bsd-3-clause
6,844,389,969,254,234,000
30.555911
144
0.605649
false
pombredanne/pyjs
pyjswidgets/pyjamas/Canvas2D.py
7
3794
# Canvas wrapper component for Pyjamas # Ported by Willie Gollino from Canvas component for GWT - Originally by Alexei Sokolov http://gwt.components.googlepages.com/ # # Canvas API reference: # http://developer.apple.com/documentation/AppleApplications/Reference/SafariJSRef/Classes/Canvas.html#//apple_ref/js/Canvas.cle...
apache-2.0
3,494,479,413,940,423,000
29.845528
134
0.624143
false
tavaresdong/cs61a-projects
projects/ants/tests/09.py
4
10915
test = { 'name': 'Problem 9', 'points': 4, 'suites': [ { 'cases': [ { 'code': r""" >>> # QueenAnt Placement >>> queen = ants.QueenAnt() >>> impostor = ants.QueenAnt() >>> front_ant, back_ant = ants.ThrowerAnt(), ants.ThrowerAnt() >>> tu...
mit
5,591,873,258,290,303,000
35.265781
95
0.462483
false
qwertyjune/BethSaidaBible
venv/lib/python2.7/site-packages/django/contrib/contenttypes/migrations/0001_initial.py
83
1061
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ContentType', fields=[ ('id', models.AutoField(...
gpl-3.0
-7,140,024,555,739,251,000
31.151515
114
0.525919
false
applitools/eyes.selenium.python
applitools/selenium/capture/eyes_webdriver_screenshot.py
1
9401
from __future__ import absolute_import import base64 import typing as tp from selenium.common.exceptions import WebDriverException from applitools.core import EyesScreenshot, EyesError, Point, Region, OutOfBoundsError from applitools.utils import image_utils from applitools.selenium import eyes_selenium_utils from a...
apache-2.0
-1,635,731,997,330,818,600
47.709845
107
0.619828
false
spMohanty/TranslatorsDesk
translatorsdesk/public/views.py
2
8582
# -*- coding: utf-8 -*- '''Public section, including homepage and signup.''' from flask import (Blueprint, request, render_template, flash, url_for, redirect, session, jsonify, redirect, request, current_app, abort) from flask.ext.login import login_user, login_required, logout_u...
bsd-3-clause
241,997,993,304,568,960
33.328
136
0.575973
false
ewels/genomics-status
status/production.py
2
10980
""" Handlers related to data production. """ from collections import OrderedDict import cStringIO from datetime import datetime import json from dateutil import parser import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg import tornado.web from status.util import dthandler, Saf...
mit
6,187,717,627,677,048,000
30.282051
124
0.579872
false
wastholm/bitcoin
qa/rpc-tests/test_framework/blockstore.py
95
4447
# BlockStore: a helper class that keeps a map of blocks and implements # helper functions for responding to getheaders and getdata, # and for constructing a getheaders message # from mininode import * import dbm class BlockStore(object): def __init__(self, datadir): self.blockDB = ...
mit
-1,135,633,327,747,715,500
31.224638
77
0.566449
false
zoyahav/incubator-airflow
airflow/utils/dag_processing.py
20
23293
# -*- coding: utf-8 -*- # # 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 ...
apache-2.0
-468,427,558,696,618,750
34.399696
90
0.572876
false
jamesdavidson/corpkit
orientation/corpus_building.py
3
6471
# <headingcell level=1> # *corpkit*: a Python-based toolkit for working with parsed linguistic corpora # <headingcell level=2> # <markdowncell> # [Daniel McDonald](mailto:mcdonaldd@unimelb.edu.au?Subject=corpkit)** #--------------------------- # <markdowncell> # <br> # > **SUMMARY:** This *IPython Notebook* shows you...
mit
-646,345,693,461,582,700
35.772727
412
0.740689
false
sorenk/ansible
lib/ansible/modules/network/vyos/vyos_user.py
38
10849
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
8,672,371,816,617,020,000
31.00295
110
0.641902
false
SimonGriffioen/pascal
PASCAL/external/networkx/algorithms/operators/tests/test_all.py
40
5320
from nose.tools import * import networkx as nx from networkx.testing import * def test_union_all_attributes(): g = nx.Graph() g.add_node(0, x=4) g.add_node(1, x=5) g.add_edge(0, 1, size=5) g.graph['name'] = 'g' h = g.copy() h.graph['name'] = 'h' h.graph['attr'] = 'attr' h.node[0]['...
gpl-2.0
-7,766,239,356,524,277,000
26.142857
80
0.546617
false
jbzdak/edx-platform
lms/djangoapps/teams/tests/test_views.py
3
59381
# -*- coding: utf-8 -*- """Tests for the teams API at the HTTP request level.""" import json from datetime import datetime import pytz from dateutil import parser import ddt from elasticsearch.exceptions import ConnectionError from mock import patch from search.search_engine_base import SearchEngine from django.core.u...
agpl-3.0
-6,057,056,034,073,784,000
38.51
120
0.595832
false
xyguo/scikit-learn
sklearn/ensemble/bagging.py
22
36582
"""Bagging meta-estimator.""" # Author: Gilles Louppe <g.louppe@gmail.com> # License: BSD 3 clause from __future__ import division import itertools import numbers import numpy as np from warnings import warn from abc import ABCMeta, abstractmethod from ..base import ClassifierMixin, RegressorMixin from ..externals....
bsd-3-clause
-6,343,218,935,293,088,000
37.185804
85
0.588705
false
albmarvil/The-Eternal-Sorrow
dependencies/luabind/boost-build/test/core_dependencies.py
4
3503
#!/usr/bin/python # Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # This tests correct handling of dependencies, specifically, on # generated sources, and from generated sources. import Bo...
apache-2.0
-1,452,244,489,054,584,300
21.455128
90
0.60491
false
undoware/neutron-drive
neutron-drive/chardet/big5freq.py
323
82588
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
bsd-3-clause
-1,459,204,460,452,083,500
88.47779
103
0.770838
false
kobiso/ControlledDropout
deepnet/mc_avg.py
13
2226
"""Monte Carlo model averaging for dropout networks.""" from neuralnet import * from trainer import * import glob import sys import random def ExtractRepresentations(model_file, train_op_file, layernames, base_output_dir, memory = '100M', k=10): LockGPU() model = util.ReadModel(model_fil...
bsd-3-clause
4,243,209,627,237,788,000
29.493151
98
0.629829
false
gnulinooks/sympy
sympy/mpmath/tests/test_ode_mpmath.py
6
1825
from sympy.mpmath.calculus import ODE_step_euler, ODE_step_rk4, odeint, arange from sympy.mpmath import odefun, cos, sin, mpf, sinc, mp solvers = [ODE_step_euler, ODE_step_rk4] def test_ode1(): """ Let's solve: x'' + w**2 * x = 0 i.e. x1 = x, x2 = x1': x1' = x2 x2' = -x1 """ def de...
bsd-3-clause
-7,320,279,842,167,520,000
24.704225
78
0.500822
false
orgito/ansible
test/units/mock/loader.py
127
3861
# (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
-2,677,022,857,156,073,000
32.284483
88
0.636105
false
fjbatresv/odoo
addons/report_intrastat/report_intrastat.py
201
5606
# -*- 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,019,885,139,578,620,000
44.209677
174
0.551195
false
15Dkatz/pants
contrib/python/tests/python/pants_test/contrib/python/checks/tasks/checkstyle/test_future_compatibility.py
18
2005
# 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) from pants_test.cont...
apache-2.0
-4,803,154,613,223,159,000
26.465753
97
0.642394
false
pheanex/ansible-modules-extras
system/ohai.py
86
1695
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, 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...
gpl-3.0
1,162,367,051,849,566,000
28.224138
79
0.696755
false
jegger/kivy
examples/canvas/canvas_stress.py
21
2146
''' Canvas stress ============= This example tests the performance of our Graphics engine by drawing large numbers of small squares. You should see a black canvas with buttons and a label at the bottom. Pressing the buttons adds small colored squares to the canvas. ''' from kivy.uix.button import Button from kivy.ui...
mit
-1,416,847,572,926,505,700
28.805556
78
0.594129
false
seecr/weightless-core
test/udp/acceptortest.py
1
3124
## begin license ## # # "Weightless" is a High Performance Asynchronous Networking Library. See http://weightless.io # # Copyright (C) 2006-2011 Seek You Too (CQ2) http://www.cq2.nl # Copyright (C) 2011-2013, 2015, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # Copyright (C) 2015 Koninklijke Bibliotheek (KB) ht...
gpl-2.0
594,815,854,566,653,800
38.544304
103
0.675736
false
nwjs/blink
Tools/Scripts/webkitpy/style/patchreader.py
188
3699
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # Copyright (C) 2010 ProFUSION embedded systems # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
1,736,022,327,700,523,800
43.566265
94
0.680454
false
klahnakoski/TestFailures
pyLibrary/queries/query.py
1
25581
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from __f...
mpl-2.0
-3,689,688,759,005,675,000
33.568919
133
0.53442
false