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
zas/picard
picard/webservice/api_helpers.py
3
11862
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2018, 2020 Laurent Monin # Copyright (C) 2018-2021 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Lice...
gpl-2.0
7,906,424,418,091,639,000
39.210169
116
0.59678
false
WIZARD-CXY/container-agent
tests/run_containers_test.py
6
16625
#!/usr/bin/python """Tests for run_containers.""" import unittest import yaml from container_agent import run_containers class RunContainersTest(unittest.TestCase): def testKnownVersion(self): yaml_code = """ version: v1beta1 """ run_containers.CheckVersion(yaml.load(yaml_code)) ...
apache-2.0
-326,527,721,619,271,550
29.787037
78
0.560241
false
jonathonwalz/ansible
lib/ansible/modules/network/panos/panos_lic.py
78
4915
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
-8,696,113,681,780,111,000
26.61236
99
0.633571
false
tcheehow/MissionPlanner
Lib/sgmllib.py
64
18437
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tag...
gpl-3.0
2,139,560,108,084,405,200
31.339964
79
0.487932
false
paplorinc/intellij-community
plugins/hg4idea/testData/bin/hgext/inotify/linux/watcher.py
92
10504
# watcher.py - high-level interfaces to the Linux inotify subsystem # Copyright 2006 Bryan O'Sullivan <bos@serpentine.com> # This library is free software; you can redistribute it and/or modify # it under the terms of version 2.1 of the GNU Lesser General Public # License, or any later version. '''High-level interfa...
apache-2.0
5,934,919,016,846,217,000
30.355224
79
0.607673
false
ChenJunor/hue
desktop/core/src/desktop/redaction/tests.py
30
14341
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-2,513,246,936,025,765,400
31.892202
137
0.613137
false
mtbc/openmicroscopy
components/tools/OmeroPy/src/omero/plugins/cecog.py
11
6684
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Methods for working with cecog Copyright 2010 University of Dundee, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import os import re import sys from omero.cli import BaseControl, CLI import omero import omero.consta...
gpl-2.0
-4,093,312,626,652,441,600
33.632124
78
0.624776
false
yordan-desta/QgisIns
python/plugins/processing/gui/ScriptEditorDialog.py
2
7417
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptDialog.py --------------------- Date : December 2012 Copyright : (C) 2012 by Alexander Bruy Email : alexander dot bruy at gmail dot com *******...
gpl-2.0
-2,637,167,935,403,416,000
35.536946
79
0.569233
false
miki725/django-sub-query
sub_query/db/models/sql/compiler.py
2
2389
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from django.contrib.gis.db.models.sql.compiler import * # noqa class SubQueryGeoSQLCompiler(GeoSQLCompiler): def __init__(self, *args, **kwargs): super(SubQueryGeoSQLCompiler, self).__init__(*args, **kwargs) self.is_...
mit
-3,160,998,684,231,973,400
32.180556
92
0.577648
false
luisgg/iteexe
exe/export/singlepage.py
1
6261
# =========================================================================== # eXe # Copyright 2004-2005, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
4,817,701,529,972,917,000
36.716867
122
0.546079
false
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/modules/health_icd10/__init__.py
1
1084
# -*- coding: utf-8 -*- ############################################################################## # # GNU Health: The Free Health and Hospital Information System # Copyright (C) 2008-2016 Luis Falcon <lfalcon@gnusolidario.org> # Copyright (C) 2011-2016 GNU Solidario <health@gnusolidario.org> # # # This...
gpl-3.0
4,977,416,208,658,131,000
44.166667
78
0.616236
false
weynsee/chompy
chompy/chom.py
1
10122
# Copyright 2009 Wayne See # # 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 wri...
apache-2.0
3,881,770,356,532,504,600
29.736677
92
0.535072
false
cubarco/tunasync
tunasync/jobs.py
1
4053
#!/usr/bin/env python2 # -*- coding:utf-8 -*- import sh import sys from setproctitle import setproctitle import signal import Queue import traceback def run_job(sema, child_q, manager_q, provider, **settings): aquired = False setproctitle("tunasync-{}".format(provider.name)) def before_quit(*args): ...
gpl-3.0
-5,656,886,585,572,669,000
29.022222
81
0.515174
false
SickGear/SickGear
lib/hachoir_py2/parser/archive/cab.py
2
11532
""" Microsoft Cabinet (CAB) archive. Author: Victor Stinner, Robert Xiao Creation date: 31 january 2007 - Microsoft Cabinet SDK http://msdn2.microsoft.com/en-us/library/ms974336.aspx """ from __future__ import absolute_import from hachoir_py2.parser import Parser from hachoir_py2.field import (FieldSet, Enum, ...
gpl-3.0
-1,445,820,675,758,761,000
43.697674
120
0.601283
false
topliceanu/learn
python/python_koans/python2/koans/about_lists.py
1
3314
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutArrays in the Ruby Koans # from runner.koan import * class AboutLists(Koan): def test_creating_lists(self): empty_list = list() self.assertEqual(list, type(empty_list)) self.assertEqual(0, len(empty_list)) def test_list...
mit
-3,316,874,178,908,327,000
30.264151
79
0.564273
false
ghevcoul/pycraft
pycraft/window.py
1
10596
# python imports import math # 3rd party imports import pyglet.clock import pyglet.graphics import pyglet.window from pyglet.gl import * # noqa from pyglet.window import key, mouse from pycraft.util import sectorize, cube_vertices, normalize from pycraft.objects.block import get_block from pycraft.configuration impo...
mit
-7,912,588,687,094,050,000
37.530909
106
0.572763
false
jcfrank/myrepo
tests/test_git_config.py
90
1229
import os import unittest import git_config def fixture(*paths): """Return a path relative to test/fixtures. """ return os.path.join(os.path.dirname(__file__), 'fixtures', *paths) class GitConfigUnitTest(unittest.TestCase): """Tests the GitConfig class. """ def setUp(self): """Create a GitConfig obje...
apache-2.0
-993,697,815,883,633,200
22.634615
68
0.656631
false
glorizen/nupic
examples/opf/clients/hotgym/prediction/one_gym/run.py
21
5172
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
-7,198,310,259,295,470,000
33.711409
78
0.6657
false
eternity-group/eternity
qa/rpc-tests/listtransactions.py
1
10134
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
mit
5,482,839,542,988,151,000
49.41791
113
0.579238
false
wkfwkf/statsmodels
examples/run_all.py
34
1740
"""run all examples to make sure we don't get an exception Note: If an example contaings plt.show(), then all plot windows have to be closed manually, at least in my setup. uncomment plt.show() to show all plot windows """ from __future__ import print_function from statsmodels.compat import input stop_on_error = Tru...
bsd-3-clause
9,140,511,130,762,936,000
30.636364
75
0.53046
false
kavasoglu/ocl_web
ocl_web/apps/collections/views.py
1
33279
""" OCL Collection views """ import logging import re import requests import simplejson as json from apps.core.utils import SearchStringFormatter from apps.core.views import UserOrOrgMixin from braces.views import LoginRequiredMixin from django.contrib import messages from django.core.paginator import Paginator from d...
mpl-2.0
3,701,399,419,970,683,000
39.289346
140
0.588329
false
SoCo/SoCo
soco/events_asyncio.py
1
20247
"""Classes to handle Sonos UPnP Events and Subscriptions using asyncio. The `Subscription` class from this module will be used in :py:mod:`soco.services` if `config.EVENTS_MODULE` is set to point to this module. Example: Run this code, and change your volume, tracks etc:: import logging logging...
mit
8,036,526,208,551,836,000
34.273519
87
0.597027
false
alshedivat/tensorflow
tensorflow/contrib/gan/python/eval/python/eval_utils_impl.py
73
5394
# 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
-8,027,765,234,457,368,000
39.253731
80
0.677234
false
rohitwaghchaure/New_Theme_Erp
erpnext/accounts/report/gross_profit/gross_profit.py
10
4692
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt from erpnext.stock.utils import get_buying_amount, get_sales_bom_buying_amount def execute(filters=None):...
agpl-3.0
-8,837,677,750,861,082,000
39.456897
101
0.70162
false
thnee/ansible
lib/ansible/module_utils/splitter.py
197
9433
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
5,943,040,259,923,911,000
42.671296
120
0.629174
false
mcaleavya/bcc
examples/networking/vlan_filter/data-plane-tracing.py
4
7701
#!/usr/bin/python from __future__ import print_function from bcc import BPF import sys import socket import os import argparse import time import netifaces as ni from sys import argv from kafka import KafkaProducer from kafka.errors import KafkaError from datetime import datetime #args def usage(): print("USAGE:...
apache-2.0
1,250,353,873,064,427,800
38.901554
370
0.626542
false
massmutual/scikit-learn
sklearn/utils/estimator_checks.py
1
54609
from __future__ import print_function import types import warnings import sys import traceback import pickle from copy import deepcopy import numpy as np from scipy import sparse import struct from sklearn.externals.six.moves import zip from sklearn.externals.joblib import hash, Memory from sklearn.utils.testing imp...
bsd-3-clause
-1,967,102,036,242,952,700
35.381746
81
0.620484
false
spauka/therm_flask
scripts/BlueFors Scripts/TC_monitor.py
1
7020
import os, os.path import sys import re import time, datetime import csv, json import urllib.request, urllib.error PATH = "C:\\BlueFors logs" FOLDER_PATTERN = r"([0-9]{2})-([0-9]{2})-([0-9]{2})" FRIDGE = 'BlueFors_QT1' SENSORS = ((1, "Fifty_K"), (2, "Four_K"), (3, "Magnet"), (5, "Still...
mit
7,036,134,591,124,994,000
38.661017
117
0.488462
false
dannyboi104/SickRage
lib/github/tests/Issue214.py
39
3361
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
-2,778,031,219,372,326,400
47.710145
86
0.525439
false
NihilistBrew/Dust
typeclasses/objects.py
10
8575
""" Object The Object is the "naked" base class for things in the game world. Note that the default Character, Room and Exit does not inherit from this Object, but from their respective default implementations in the evennia library. If you want to use this class as a parent to change the other types, you can do so b...
mit
-1,748,344,436,981,123,600
51.932099
81
0.621108
false
eayun/ovirt-engine
packaging/setup/ovirt_engine_setup/util.py
5
8581
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
apache-2.0
-2,239,322,857,381,195,000
31.138577
78
0.547139
false
ivanvladimir/gensim
gensim/test/test_doc2vec.py
1
16473
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ from __future__ import with_statement import logg...
gpl-3.0
4,964,461,634,763,161,000
41.084399
140
0.627043
false
40223149/2015cd_midterm
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/__init__.py
603
6082
## pygame - Python Game Library ## Copyright (C) 2000-2001 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
gpl-3.0
-2,677,844,959,535,766,000
30.512953
79
0.719336
false
mm112287/2015cda-24
static/Brython3.1.1-20150328-091302/Lib/codecs.py
739
35436
""" codecs -- Python Codec Registry, API and helpers. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import builtins, sys ### Registry and builtin stateless codec functions try: from _codecs import * except ImportError as why: raise SystemErro...
gpl-3.0
6,426,372,559,448,843,000
31.243858
80
0.61288
false
georgeha/mandelbrot
mandelbrot_core/mandelbrot_pilot_cores.py
1
7097
__author__ = "George Chantzialexiou" __copyright__ = "Copyright 2012-2013, The Pilot Project" __license__ = "MIT" """ A Mandelbrot Fractal Generator Using Pilot Job This is an example of mandelbrot Fracatl Generator using the capabilities of Pilot Job API. It requires the Python Image Library (PIL) which c...
mit
-8,474,553,532,810,824,000
32.635071
125
0.649288
false
nexiles/odoo
addons/stock/procurement.py
227
22183
# -*- 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,480,869,196,577,223,000
55.589286
292
0.616328
false
mailboxly/po
pymongo/auth.py
23
15619
# Copyright 2013-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
agpl-3.0
-7,128,809,727,734,575,000
34.417234
80
0.58941
false
LeZhang2016/openthread
tests/scripts/thread-cert/ipv6.py
11
35649
#!/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 # ...
bsd-3-clause
1,892,638,632,973,712,000
30.053136
138
0.596062
false
southpawtech/TACTIC-DEV
3rd_party/CherryPy/cherrypy/process/plugins.py
6
20583
"""Site services for use with a Web Site Process Bus.""" import os import re try: set except NameError: from sets import Set as set import signal as _signal import sys import time import thread import threading # _module__file__base is used by Autoreload to make # absolute any filenames retrieved from sys.mod...
epl-1.0
7,515,089,356,924,826,000
35.624555
92
0.552738
false
smn/onadata
onadata/apps/main/tests/test_form_edit.py
13
5646
from django.core.urlresolvers import reverse from onadata.apps.main.models import MetaData from onadata.apps.main.views import edit from onadata.apps.logger.models import XForm from onadata.apps.logger.views import delete_xform from test_base import TestBase class TestFormEdit(TestBase): def setUp(self): ...
bsd-2-clause
-7,252,004,297,335,132,000
43.809524
79
0.617251
false
kwrobert/heat-templates
tests/software_config/test_heat_config_kubelet.py
7
4615
# # 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
6,697,983,440,104,976,000
30.394558
78
0.486024
false
enlighter/ndl-question-papers-search-hub
qp_search_project/searcher/models.py
1
3438
from django.db import models from django.contrib.auth.models import AbstractUser, UserManager from django.utils import timezone from django.dispatch import receiver from django.db.models.signals import post_save from localflavor.in_ import in_states gettext_noop = lambda s: s EDUCATIONAL_ROLE= ( ('vb', gettext_n...
mit
-7,797,993,381,692,575,000
32.067308
127
0.655032
false
shaulkf/bitcoin
qa/rpc-tests/proxy_test.py
93
7769
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from test_framework.socks5 im...
mit
-8,663,886,744,985,916,000
42.161111
146
0.622731
false
nguyentruongtho/buck
programs/subprocutils.py
5
3349
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
apache-2.0
-4,354,652,863,883,181,000
34.252632
83
0.643774
false
ppries/tensorflow
tensorflow/contrib/distributions/python/ops/transformed_distribution.py
1
9906
# 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
-1,960,353,723,900,015,000
35.285714
88
0.673127
false
adw0rd/lettuce
tests/integration/lib/Django-1.3/django/contrib/localflavor/fi/fi_municipalities.py
394
10822
# -*- coding: utf-8 -*- """ An alphabetical list of Finnish municipalities for use as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ MUNICIPALITY_CHOICES = ( ('akaa', u"Akaa"), ('alajarvi', u"Alajärvi"), ('alavieska', u"Alav...
gpl-3.0
-8,824,018,512,322,498,000
29.27762
74
0.544961
false
cmbruns/vr_samples
test/python/test_sphere.py
1
2362
#!/bin/env python import unittest import glfw from OpenGL import GL from PIL import Image import numpy from vrprim.imposter import sphere def images_are_identical(img1, img2): ar1 = numpy.array(img1.convert('RGBA')) ar2 = numpy.array(img2.convert('RGBA')) return numpy.array_equiv(ar1, ar2)...
mit
2,724,550,455,750,067,000
33.253731
93
0.594412
false
pdee/pdee
python-libs/rope/base/project.py
40
11976
import cPickle as pickle import os import shutil import sys import warnings import rope.base.fscommands from rope.base import exceptions, taskhandle, prefs, history, pycore, utils from rope.base.resourceobserver import * from rope.base.resources import File, Folder, _ResourceMatcher class _Project(object): def ...
gpl-3.0
-1,300,507,421,648,576,300
30.936
79
0.580745
false
giovannimanzoni/project2
test/RS485/python/readFromRS485.py
2
1384
#!/usr/bin/env python # # Python sample application that reads from the raspicomm's RS-485 Port # # Thanks to Acmesystems, program edited by Giovanni Manzoni @ HardElettroSoft # # 9600 8N1 flow control Xon/Xoff # import array import serial maxReadCount=10 readBuffer = array.array('c') print('this sample application...
cc0-1.0
1,092,960,362,548,122,100
28.446809
123
0.684249
false
FrankBian/kuma
kuma/humans/models.py
5
2264
from __future__ import with_statement import json import os import subprocess import urllib from django.conf import settings GITHUB_REPOS = "https://api.github.com/repos/mozilla/kuma/contributors" class Human(object): def __init__(self): self.name = None self.website = None class HumansTXT(ob...
mpl-2.0
4,215,389,603,359,651,000
29.186667
79
0.555654
false
ravello/ansible
v2/ansible/plugins/lookup/flattened.py
60
2408
# (c) 2013, Serge van Ginderachter <serge@vanginderachter.be> # # 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)...
gpl-3.0
-4,433,044,808,361,023,500
33.4
89
0.627076
false
openpaperwork/paperwork
paperwork-gtk/src/paperwork/frontend/beacon/__init__.py
1
7272
import datetime import dateutil.parser import http import http.client import json import logging import multiprocessing import os import platform import ssl import re import threading import urllib logger = logging.getLogger(__name__) class Beacon(object): USER_AGENT = "Paperwork" UPDATE_CHECK_INTERVAL = d...
gpl-3.0
-85,576,949,341,282,530
32.823256
78
0.561881
false
atodorov/dnf-plugins-core
plugins/needs_restarting.py
2
6405
# needs_restarting.py # DNF plugin to check for running binaries in a need of restarting. # # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at ...
gpl-2.0
-7,182,448,113,677,368,000
29.942029
77
0.624044
false
zx8/youtube-dl
youtube_dl/extractor/dump.py
120
1036
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class DumpIE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?dump\.com/(?P<id>[a-zA-Z0-9]+)/' _TEST = { 'url': 'http://www.dump.com/oneus/', 'md5': 'ad71704d1e67dfd9e81e3e8b42d69d99', ...
unlicense
-4,632,474,669,795,308,000
25.564103
73
0.506757
false
songfj/calibre
src/calibre/ebooks/markdown/extensions/toc.py
46
8336
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.1+](http://packages.python.org/Markdown/) """ from __future__ import absolute_import from __future__ import unicode_literals from . import Extension from ..treeprocessors import Treeproce...
gpl-3.0
-211,858,965,639,474,370
36.719457
88
0.523273
false
40423107/2017springcd_hw
theme/pelican-bootstrap3_local/static/glow/primitive.py
161
4838
from javascript import JSConstructor, JSObject from .vector import vec class primitive: def __init__(self, prim, **kwargs): for _key in kwargs.keys(): if isinstance(kwargs[_key], vec): kwargs[_key]=kwargs[_key]._vec self._prim=prim(kwargs) def rotate(self, **kwargs): if '...
agpl-3.0
-5,092,828,974,536,535,000
22.038095
76
0.621124
false
Emergya/icm-openedx-educamadrid-platform-basic
cms/djangoapps/models/settings/course_grading.py
143
8907
from datetime import timedelta from xmodule.modulestore.django import modulestore class CourseGradingModel(object): """ Basically a DAO and Model combo for CRUD operations pertaining to grading policy. """ # Within this class, allow access to protected members of client classes. # This comes up wh...
agpl-3.0
8,758,491,024,203,329,000
36.1125
116
0.614348
false
HBEE/odoo-addons
stock_picking_locations/__openerp__.py
3
1744
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
-3,205,728,772,784,360,000
31.90566
79
0.583142
false
quantumlib/OpenFermion
src/openfermion/testing/lih_integration_test.py
1
6590
# 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 # distribu...
apache-2.0
7,106,191,499,194,213,000
46.410072
80
0.654173
false
kpayson64/grpc
examples/python/route_guide/route_guide_pb2_grpc.py
55
4244
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import route_guide_pb2 as route__guide__pb2 class RouteGuideStub(object): """Interface exported by the server. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.GetFe...
apache-2.0
1,557,904,399,272,445,200
36.557522
79
0.704995
false
MSusik/invenio
invenio/modules/formatter/format_elements/bfe_date_rec.py
39
1053
## 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, or (at your option...
gpl-2.0
-7,645,262,181,802,193,000
35.310345
75
0.710351
false
lmazuel/azure-sdk-for-python
azure-batch/azure/batch/models/pool_add_parameter.py
1
12361
# 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
8,355,341,465,042,573,000
62.389744
558
0.719602
false
achang97/YouTunes
lib/python2.7/site-packages/pyasn1_modules/rfc2560.py
5
8307
# # This file is part of pyasn1-modules software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # # OCSP request/response syntax # # Derived from a minimal OCSP library (RFC2560) code written by # Bud P. Bruegger <bud@ancitel.it> # Copyright: Ancitel, S.p.a, ...
mit
-2,406,343,363,187,537,000
36.759091
118
0.688456
false
cosmicAsymmetry/zulip
zerver/tests/test_tutorial.py
32
2671
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from typing import Any, Dict from zerver.lib.test_helpers import ( get_user_profile_by_email, most_recent_message, ) from zerver.lib.test_classes import ( ZulipTestCase, ) from zerver.models import ( ...
apache-2.0
-6,931,556,165,873,486,000
30.423529
85
0.611756
false
cmelange/ansible
lib/ansible/plugins/action/script.py
22
3738
# (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 the License, or # (at your option) any lat...
gpl-3.0
-3,229,372,390,476,327,000
38.347368
93
0.64473
false
nmercier/linux-cross-gcc
linux/lib/python2.7/dist-packages/numpy/lib/tests/test_nanfunctions.py
21
28230
from __future__ import division, absolute_import, print_function import warnings import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equal, assert_almost_equal, assert_raises, assert_array_equal ) # Test data _ndat = np.array([[0.6244, np.nan, 0.2692, 0.0116, np.na...
bsd-3-clause
3,839,043,500,124,620,000
37.408163
83
0.520616
false
epssy/hue
desktop/core/ext-py/python-openid-2.2.5/openid/test/cryptutil.py
87
2961
import sys import random import os.path from openid import cryptutil # Most of the purpose of this test is to make sure that cryptutil can # find a good source of randomness on this machine. def test_cryptrand(): # It's possible, but HIGHLY unlikely that a correct implementation # will fail by returning the ...
apache-2.0
6,933,728,707,529,041,000
26.416667
70
0.540358
false
kingvuplus/gui_test3
lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
34
10923
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.HelpMenu import HelpableScreen from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.FileList import FileList from Tools.Directories import fileExists, resolveFilename, SCOP...
gpl-2.0
1,444,806,314,667,675,600
43.222672
368
0.680033
false
alexlo03/ansible
contrib/inventory/vagrant.py
28
4076
#!/usr/bin/env python """ Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and returns it under the host group 'vagrant' Example Vagrant configuration using this script: config.vm.provision :ansible do |ansible| ansible.playbook = "./provision/your_playbook.yml" ...
gpl-3.0
8,947,058,068,151,190,000
30.114504
112
0.65947
false
mrgloom/menpofit
menpofit/_version.py
5
15768
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
bsd-3-clause
-2,500,855,670,279,683,000
33.278261
79
0.577879
false
xtao/openduckbill
src/openduckbilld.py
3
1582
#!/usr/bin/python2.4 # Copyright 2008 Google Inc. # Author : Anoop Chandran <anoopj@google.com> # # openduckbill is a simple backup application. It offers support for # transferring data to a local backup directory, NFS. It also provides # file system monitoring of directories marked for backup. Please read # the READ...
gpl-2.0
-5,042,270,495,903,658,000
34.155556
81
0.76043
false
ZenHarbinger/snapcraft
integration_tests/test_tar_plugin.py
2
2083
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-582,446,290,726,293,100
30.560606
71
0.601056
false
taylorhxu/pybrain
examples/supervised/backprop/datasets/parity.py
30
1587
#!/usr/bin/env python __author__ = 'Tom Schaul (tom@idsia.ch)' from pybrain.datasets import SequentialDataSet class ParityDataSet(SequentialDataSet): """ Determine whether the bitstring up to the current point conains a pair number of 1s or not.""" def __init__(self): SequentialDataSet.__init__(self, ...
bsd-3-clause
4,482,021,155,472,248,300
29.519231
102
0.503466
false
sysalexis/kbengine
kbe/res/scripts/common/Lib/test/test_asynchat.py
72
11161
# test asynchat from test import support # If this fails, the test will be skipped. thread = support.import_module('_thread') import asynchat import asyncore import errno import socket import sys import time import unittest import unittest.mock try: import threading except ImportError: threading = None HOST...
lgpl-3.0
-7,138,717,779,159,256,000
32.516517
79
0.587582
false
jicruz/heroku-bot
lib/pip/_vendor/distlib/wheel.py
412
39115
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import base64 import codecs import datetime import distutils.util from email import message_from...
gpl-3.0
-3,028,837,808,793,968,600
38.994888
82
0.48567
false
nguyenppt/support-tools
googlecode-issues-exporter/github_issue_converter_test.py
2
21195
# Copyright 2013 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 applicable law or a...
apache-2.0
-8,939,932,848,136,075,000
35.35506
101
0.657089
false
heke123/chromium-crosswalk
net/data/verify_certificate_chain_unittest/generate-expired-target-notBefore.py
5
1182
#!/usr/bin/python # Copyright (c) 2015 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. """Certificate chain with 1 intermediary, where the target is expired (violates validity.notBefore). Verification is expected to fail."...
bsd-3-clause
-723,594,222,017,862,900
35.9375
79
0.750423
false
qlands/onadata
onadata/apps/logger/migrations/0007_auto__add_field_xform_has_start_time.py
13
6918
# 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 field 'XForm.has_start_time' db.add_column('odk_logger_xform', 'has_start_time', self.gf('django.db.models...
bsd-2-clause
8,636,821,917,159,513,000
70.319588
182
0.55146
false
cstipkovic/spidermonkey-research
python/macholib/macholib/itergraphreport.py
16
1929
""" Utilities for creating dot output from a MachOGraph XXX: need to rewrite this based on altgraph.Dot """ from collections import deque try: from itertools import imap except ImportError: imap = map __all__ = ['itergraphreport'] def itergraphreport(nodes, describe_edge, name='G'): edges = deque() ...
mpl-2.0
-1,693,671,182,173,531,100
25.424658
75
0.543805
false
anoopcs9/samba
python/samba/tests/net_join.py
6
2340
# Unix SMB/CIFS implementation. # # Copyright (C) Catalyst.Net Ltd. 2017 # # 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 versio...
gpl-3.0
1,980,999,309,935,555,300
35
71
0.665812
false
plusk01/roboclaw-v5
examples/roboclaw_speeddistance.py
2
2263
#***Before using this example the motor/controller combination must be #***tuned and the settings saved to the Roboclaw using IonMotion. #***The Min and Max Positions must be at least 0 and 50000 import time import roboclaw def displayspeed(): enc1 = roboclaw.ReadEncM1(address) enc2 = roboclaw.ReadEncM2(ad...
mit
-387,954,521,332,675,600
26.2875
115
0.709236
false
s142857/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_stream.py
446
6264
from __future__ import absolute_import, division, unicode_literals from . import support # flake8: noqa import unittest import codecs from io import BytesIO from six.moves import http_client from html5lib.inputstream import (BufferedStream, HTMLInputStream, HTMLUnicodeInputStream, ...
mpl-2.0
8,543,401,352,933,068,000
33.229508
98
0.595626
false
Lilykos/invenio
invenio/legacy/pdfchecker/__init__.py
13
1091
#!@PYTHON@ # -*- mode: python; coding: utf-8; -*- # # This file is part of Invenio. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundati...
gpl-2.0
5,489,555,657,419,852,000
34.193548
74
0.737855
false
keyurpatel076/MissionPlannerGit
Lib/site-packages/numpy/core/_internal.py
53
18020
#A place for code to be called from C-code # that implements more complicated stuff. import re import sys import warnings from numpy.compat import asbytes, bytes if (sys.byteorder == 'little'): _nbo = asbytes('<') else: _nbo = asbytes('>') def _makenames_list(adict): from numpy.core import dtype al...
gpl-3.0
-3,881,838,203,730,782,000
28.205835
131
0.535461
false
neuroidss/nupic.research
projects/sequence_classification/run_encoder_with_union.py
9
8995
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
8,369,572,605,949,795,000
32.069853
83
0.68438
false
liushuaikobe/evermd
lib/thrift/transport/TTwisted.py
74
6547
# # 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...
gpl-2.0
8,268,285,665,951,202,000
28.894977
79
0.670536
false
azazel75/LasaurApp
docs/conf.py
1
9717
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # LasaurApp documentation build configuration file, created by # sphinx-quickstart on Fri Jun 10 02:42:34 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 # ...
gpl-3.0
1,352,571,625,436,426,200
27.748521
80
0.692601
false
b-cannon/my_djae
djangae/db/utils.py
1
10507
#STANDARD LIB from datetime import datetime from decimal import Decimal from itertools import chain import warnings #LIBRARIES from django.conf import settings from django.db import models from django.db.backends.util import format_number from django.db import IntegrityError from django.utils import timezone from goo...
bsd-3-clause
7,902,433,080,726,686,000
30.364179
111
0.599029
false
abramhindle/marsyas-fork
scripts/sfplugin-test-wrapper.py
5
1546
#!/usr/bin/env python import os import sys import subprocess import shutil import commands def runCommand(workingDir, bextractLocation, sfpluginLocation, extraBextractCmdArgs, mfFileLocation, outputMplFile, testFile, goodFilename): os.chdir(workingDir) bextractCmd = ("%s %s -t %s -p %s") % (be...
gpl-2.0
-9,078,033,573,374,746,000
30.55102
113
0.665589
false
stefan-andritoiu/upm
examples/python/oled_ssd1308.py
6
5876
#!/usr/bin/env python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 ...
mit
3,160,959,485,128,185,300
57.76
89
0.541184
false
wubr2000/googleads-python-lib
examples/adxbuyer/v201502/basic_operations/remove_placement.py
4
2203
#!/usr/bin/python # # Copyright 2013 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 b...
apache-2.0
-4,210,179,938,968,221,000
30.927536
78
0.672265
false
hrjn/scikit-learn
examples/cluster/plot_birch_vs_minibatchkmeans.py
333
3694
""" ================================= Compare BIRCH and MiniBatchKMeans ================================= This example compares the timing of Birch (with and without the global clustering step) and MiniBatchKMeans on a synthetic dataset having 100,000 samples and 2 features generated using make_blobs. If ``n_clusters...
bsd-3-clause
-9,206,692,442,729,150,000
34.864078
81
0.65647
false
paulrouget/servo
tests/wpt/web-platform-tests/webdriver/tests/close_window/user_prompts.py
22
4182
# META: timeout=long import pytest from tests.support.asserts import assert_dialog_handled, assert_error, assert_success def close(session): return session.transport.send( "DELETE", "session/{session_id}/window".format(**vars(session))) @pytest.fixture def check_user_prompt_closed_without_exception(se...
mpl-2.0
-9,217,744,106,945,975,000
34.142857
90
0.716404
false
PsychoTV/PsychoTeam.repository
plugin.video.PsychoTV/resources/lib/sources/wsonline_tv.py
6
4721
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
gpl-2.0
7,275,365,600,453,348,000
33.210145
126
0.542046
false
sam-tsai/django-old
tests/regressiontests/utils/datastructures.py
27
1212
""" >>> from django.utils.datastructures import SortedDict >>> d = SortedDict() >>> d[7] = 'seven' >>> d[1] = 'one' >>> d[9] = 'nine' >>> d.keys() [7, 1, 9] >>> d.values() ['seven', 'one', 'nine'] >>> d.items() [(7, 'seven'), (1, 'one'), (9, 'nine')] # Overwriting an item keeps it's place. >>> d[1] = 'ONE' >>> d.valu...
bsd-3-clause
-2,609,876,074,755,356,000
22.307692
79
0.574257
false
fldc/CouchPotatoServer
couchpotato/core/plugins/category/main.py
61
3963
import traceback from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import addEvent from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from .index import CategoryIndex, Categor...
gpl-3.0
-3,093,676,944,332,690,000
25.42
100
0.482463
false
aviweit/libcloud
libcloud/test/test_utils.py
42
13018
# -*- coding: utf-8 -*- # 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 "Li...
apache-2.0
6,754,832,451,209,640,000
32.81039
84
0.565107
false
django-nonrel/djangoappengine
docs/conf.py
3
7964
# -*- coding: utf-8 -*- # # Django App Engine documentation build configuration file, created by # sphinx-quickstart on Tue Dec 20 20:01:39 2011. # # 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 fil...
bsd-3-clause
4,284,537,228,714,997,000
31.773663
80
0.708061
false
funbaker/astropy
astropy/io/misc/asdf/__init__.py
2
1456
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ The **asdf** subpackage contains code that is used to serialize astropy types so that they can be represented and stored using the Advanced Scientific Data Format (ASDF). This subpackage defines classes, referred to as **tags**,...
bsd-3-clause
-5,625,127,473,037,531,000
52.925926
79
0.782967
false
ingkebil/GMDBot
page_exists.py
1
1236
#!/usr/bin/env python """Check if a '(data page)' for a biomolecule exists""" __author__ = "Kenny Billiau" __copyright__ = "2014, GMD" __license__ = "GPL v2" __version__ = "0.1" import sys import urllib2 import re import downloadinchi as inchi import openpyxl as px import urllib def get_molecules_from_xlsx(fn): ...
gpl-2.0
-8,409,803,177,533,417,000
24.22449
141
0.59466
false