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
robwebset/script.tvtunes
resources/lib/settings.py
1
19968
# -*- coding: utf-8 -*- import os import unicodedata import xbmc import xbmcaddon import xbmcvfs import xbmcgui ADDON = xbmcaddon.Addon(id='script.tvtunes') ADDON_ID = ADDON.getAddonInfo('id') # Common logging module def log(txt, debug_logging_enabled=True, loglevel=xbmc.LOGDEBUG): if ((ADDON.getSetting("logEnab...
gpl-2.0
4,027,405,000,036,394,500
35.173913
263
0.627304
false
kburts/drf-music
Scripts/redditBot.py
1
2545
""" Script to get data from reddit(specificly /r/listentothis or /r/music. It is supposed to be independent from the Django stuff. Creates a new playlist on server with: title: Listentothis description: date created and objective of playlist songs: front page of /r/listentothis NOTE: Only works with YouTu...
mit
7,201,106,919,070,885,000
23.95098
91
0.571709
false
scotthartbti/android_external_chromium_org
build/linux/unbundle/remove_bundled_libraries.py
43
2549
#!/usr/bin/env python # Copyright 2013 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. """ Removes bundled libraries to make sure they are not used. See README for more details. """ import optparse import os.path import...
bsd-3-clause
-2,765,794,157,529,262,000
28.298851
80
0.650059
false
frreiss/tensorflow-fred
tensorflow/tools/build_info/gen_build_info.py
4
3276
# Lint as: python3 # 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 ...
apache-2.0
-8,610,942,156,774,095,000
32.428571
80
0.688645
false
Degustare/degustare
degustare/promoters/models.py
1
3519
# -*- coding: UTF-8 -*- # models.py # # Copyright (C) 2013 Degustare # # Author(s): Cédric Gaspoz <cga@degustare.ch> # # This file is part of Degustare. # # Degustare 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 Founda...
gpl-3.0
2,532,337,192,749,681,000
54.857143
247
0.712052
false
arunkgupta/gramps
gramps/gen/filters/rules/person/_nodeathdate.py
1
2022
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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, or # (at you...
gpl-2.0
-7,554,091,370,283,989,000
33.862069
75
0.519288
false
juhovh/tapcfg
scons-tools/gmcs.py
7
1292
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
lgpl-2.1
-2,434,527,621,287,536,000
39.375
97
0.581269
false
dbrumley/recfi
llvm-3.3/docs/conf.py
4
8437
# -*- coding: utf-8 -*- # # LLVM documentation build configuration file. # # 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 configuration values have a default; values that are commented...
mit
2,591,951,988,882,091,500
32.480159
80
0.690648
false
PandaWei/tp-qemu
qemu/tests/live_snapshot_transaction.py
6
1981
import logging from autotest.client.shared import error from qemu.tests import live_snapshot_basic @error.context_aware def run(test, params, env): """ live_snapshot_transaction test: 1. Boot up guest with a system disk and 2 data disk. 2. Create multiple live snapshots simultaneously for all 3 disk...
gpl-2.0
4,695,742,916,996,725,000
40.270833
86
0.590106
false
Williams224/davinci-scripts
kstaretappipig/MC_12_MagDown_Kstar_etap_pipig.py
1
13688
#-- GAUDI jobOptions generated on Tue Jun 9 10:51:04 2015 #-- Contains event types : #-- 11104115 - 146 files - 3030432 events - 881.12 GBytes #-- Extra information about the data processing phases: #-- Processing Pass Step-124834 #-- StepId : 124834 #-- StepName : Reco14a for MC #-- ApplicationName : ...
mit
4,996,624,453,627,941,000
74.208791
215
0.79325
false
google-research/google-research
etcmodel/models/hotpotqa/eval_utils.py
1
15626
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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
-2,961,833,774,225,874,400
39.692708
80
0.656982
false
auready/docker-py
tests/integration/api_swarm_test.py
2
6265
import copy import docker import pytest from ..helpers import force_leave_swarm, requires_api_version from .base import BaseAPIIntegrationTest class SwarmTest(BaseAPIIntegrationTest): def setUp(self): super(SwarmTest, self).setUp() force_leave_swarm(self.client) def tearDown(self): s...
apache-2.0
-5,370,201,884,570,877,000
34.596591
79
0.584836
false
pytorch/fairseq
examples/roberta/wsc/wsc_criterion.py
1
6037
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import torch import torch.nn.functional as F from fairseq import utils from fairseq.criterions import LegacyFairseqCriterion, reg...
mit
-5,281,491,222,413,921,000
35.149701
87
0.568991
false
barseghyanartur/django-spillway
spillway/renderers/gdal.py
2
3416
import os import tempfile import zipfile from rest_framework.renderers import BaseRenderer class BaseGDALRenderer(BaseRenderer): """Abstract renderer which encodes to a GDAL supported raster format.""" media_type = 'application/octet-stream' format = None charset = None render_style = 'binary' ...
bsd-3-clause
-7,724,765,439,345,521,000
28.196581
76
0.608899
false
linmajia/dlbench
tools/torch/torchbm.py
2
6990
import argparse import os, sys import time import subprocess # Parse arguments current_time = time.ctime() parser = argparse.ArgumentParser(description='Python script benchmarking torch') parser.add_argument('-log', type=str, default=('torch_' + current_time + '.log').replace(" ", "_"), help='Name of log file,...
mit
-1,749,751,885,262,729,500
42.6875
176
0.633047
false
gspilio/nova
nova/openstack/common/notifier/rpc_notifier.py
5
1685
# Copyright 2011 OpenStack Foundation. # 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 req...
apache-2.0
-4,811,352,886,368,260,000
35.630435
78
0.68724
false
TimYi/pyresttest
pyresttest/test_mini_framework_benchmarks.py
7
2117
# Benchmarks parts of program to seee what testing overhead is like import timeit # Test basic pycurl create/delete, time is ~2.5 microseconds time = timeit.timeit("mycurl=Curl(); mycurl.close()", setup="from pycurl import Curl", number=1000000) print('Curl create/destroy runtime for 1M runs (s)'+str(time)) # Test t...
apache-2.0
-3,051,182,077,601,934,000
63.151515
220
0.689655
false
guillermooo/dart-sublime-bundle-releases
AAA.py
1
3294
# Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details. # All rights reserved. Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file.) '''This module is intended to run first when the different plugins load. It should perform a basic status ...
bsd-3-clause
-760,142,418,297,389,800
28.401786
100
0.565442
false
shikhardb/scikit-learn
sklearn/tree/tests/test_export.py
9
2889
""" Testing for export functions of decision trees (sklearn.tree.export). """ from numpy.testing import assert_equal from nose.tools import assert_raises from sklearn.tree import DecisionTreeClassifier from sklearn.tree import export_graphviz from sklearn.externals.six import StringIO # toy sample X = [[-2, -1], [-1...
bsd-3-clause
6,269,548,510,660,223,000
31.829545
78
0.472136
false
jcrudy/clinvoc
clinvoc/vocabularies/ccs/icd9.py
2
1242
# from clinvoc.icd9 import ICD9PCS, ICD9CM from . import resources import os import re from clinvoc.icd9 import ICD9CM, ICD9PCS import pandas as pd from toolz.dicttoolz import merge # ''' # Single category parsing # ''' icd9cm_vocab = ICD9CM(use_decimals=False) icd9pcs_vocab = ICD9PCS(use_decimals=False) def _get_icd...
mit
-607,442,997,935,483,300
35.529412
178
0.618357
false
guileschool/BEAGLEBONE-tutorials
BBB-firmware/u-boot-v2018.05-rc2/tools/dtoc/dtb_platdata.py
1
20180
#!/usr/bin/python # # Copyright (C) 2017 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # SPDX-License-Identifier: GPL-2.0+ # """Device tree to platform data class This supports converting device tree data to C structures definitions and static data. """ import collections import copy import sys import f...
mit
-5,484,930,682,351,137,000
34.27972
98
0.533647
false
stratton-oakcoin/oakcoin
test/functional/test_framework/comptool.py
1
18445
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Oakcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Compare two or more oakcoinds to each other. To use, create a class that implements get_tests(), and p...
mit
-5,134,176,956,727,703,000
44.208333
149
0.582434
false
marcoitur/Freecad_test
src/Mod/OpenSCAD/prototype.py
27
29821
#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (LGPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. import FreeCAD import re,math fr...
lgpl-2.1
6,419,621,455,341,096,000
42.093931
109
0.521411
false
jlaurelli/stockify
web/tests/test_env_settings.py
1
1248
"""Test Environmental settings are handled properly.""" import os import importlib from unittest.mock import patch # from django.test import TestCase # from unittest import skip # we have to use tools outside of django, because when it's initialized # it's too late to change environment variables from unittest import ...
mit
2,996,270,555,049,597,000
32.72973
77
0.610577
false
vgrachev8/youtube-dl
youtube_dl/extractor/nfb.py
7
3584
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urllib_request, compat_urllib_parse, ) class NFBIE(InfoExtractor): IE_NAME = 'nfb' IE_DESC = 'National Film Board of Canada' _VALID_URL = r'https?://(?:www\.)?(nfb|onf)\.ca/film/(?P<i...
unlicense
-7,381,620,407,547,731,000
37.138298
113
0.540179
false
minlex/django-socialregistration
tests/app/views.py
8
1238
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from socialregistration.contrib.facebook.models import FacebookProfile from socialregistration.contrib.foursquare.models import FoursquareProfile from socialregistration.contrib.github...
mit
5,831,158,185,763,440,000
48.52
74
0.779483
false
jaredkoontz/leetcode
Python/flatten-nested-list-iterator.py
3
1916
# Time: O(n), n is the number of the integers. # Space: O(h), h is the depth of the nested lists. # """ # This is the interface that allows for creating nested lists. # You should not implement it, or speculate about its implementation # """ #class NestedInteger(object): # def isInteger(self): # """ # ...
mit
-1,797,174,466,296,585,700
28.030303
95
0.561065
false
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/sklearn/calibration.py
7
20044
"""Calibration of predicted probabilities.""" # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Balazs Kegl <balazs.kegl@gmail.com> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # Mathieu Blondel <mathieu@mblondel.org> # # License: BSD 3 clause from __future__ impo...
mit
8,433,434,882,342,731,000
34.288732
79
0.593095
false
samuelmaudo/yepes
yepes/contrib/datamigrations/importation_plans/update_or_bulk_create.py
1
1986
# -*- coding:utf-8 -*- from __future__ import unicode_literals import collections from django.utils import six from yepes.contrib.datamigrations.importation_plans import ModelImportationPlan class UpdateOrBulkCreatePlan(ModelImportationPlan): def import_batch(self, batch): model = self.migration.mode...
bsd-3-clause
2,911,455,087,934,738,000
33.842105
79
0.441591
false
uwescience/myria-web
appengine/networkx/algorithms/shortest_paths/astar.py
15
4913
# -*- coding: utf-8 -*- """Shortest paths and path lengths using A* ("A star") algorithm. """ # Copyright (C) 2004-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from heapq import heappush, heappop fr...
bsd-3-clause
-4,030,149,992,754,040,000
29.899371
79
0.587625
false
GambitResearch/replisome
lib/replisome/consumers/DataUpdater.py
1
16446
from operator import itemgetter import psycopg2.extras from psycopg2 import extensions as ext from psycopg2 import sql from replisome.errors import ReplisomeError import logging logger = logging.getLogger('replisome.DataUpdater') UNCHANGED_TOAST = {} def tupgetter(*idxs): """Like itemgetter, but return a 1-tu...
bsd-3-clause
-2,957,178,685,116,214,000
34.066098
79
0.522802
false
mdeemer/XlsxWriter
xlsxwriter/test/comparison/test_chart_high_low_lines02.py
8
1817
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
214,080,986,216,174,050
24.236111
79
0.511282
false
SecLion77/i3_config
scripts/workspace_controller.py
1
4434
#!/usr/bin/python3 import subprocess import sys import json import math import os from os.path import expanduser from tempfile import TemporaryFile def get_workspace(): handle = subprocess.Popen( ["i3-msg", "-t", "get_workspaces"], stdout=subprocess.PIPE) output = handle.communicate()[0] data = js...
mit
7,642,548,049,970,373,000
30.006993
90
0.586378
false
Distrotech/glib
build/win32/setup.py
7
17387
#!/usr/bin/python # vim: encoding=utf-8 #expand *.in files #this script is only intended for building from git, not for building from the released tarball, which already includes all necessary files import os import sys import re import string import subprocess import optparse def get_version(srcroot): ver = {} ...
lgpl-2.1
-6,020,025,983,272,109,000
46.247283
189
0.515788
false
trolldbois/ctypeslib
test/test_fast_clang.py
1
3051
import unittest import ctypes from test.util import ClangTest class CompareSizes(ClangTest): """Compare python sizes with the clang framework. """ #@unittest.skip('') def test_basic_types_size(self): """Test sizes of pod.""" targets = ['_char', '_short', '_int', '_uint', '_long', '_...
mit
-8,898,688,422,079,667,000
38.115385
90
0.55195
false
nacl-webkit/chrome_deps
chrome/test/install_test/theme_updater.py
6
2887
# 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. """Update tests for themes.""" import os from common import util import chrome_options import install_test class ThemeUpdater(install_test.InstallTes...
bsd-3-clause
-2,779,664,602,906,177,000
33.783133
79
0.704538
false
MostafaGazar/tensorflow
tensorflow/examples/tutorials/input_fn/boston.py
19
2448
# 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 appl...
apache-2.0
-849,208,337,605,358,200
33.971429
75
0.674837
false
kvar/ansible
lib/ansible/modules/cloud/cloudstack/cs_securitygroup_rule.py
38
12923
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # 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
8,876,380,384,042,106,000
32.301546
122
0.607461
false
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8
lib/python2.7/test/test_multiprocessing.py
27
76391
#!/usr/bin/env python # # Unit tests for the multiprocessing package # import unittest import Queue import time import sys import os import gc import signal import array import socket import random import logging import errno import test.script_helper from test import test_support from StringIO import StringIO _multi...
gpl-2.0
-2,977,560,226,234,707,500
29.229917
88
0.585658
false
praveen-pal/edx-platform
common/djangoapps/terrain/steps.py
5
6146
#pylint: disable=C0111 #pylint: disable=W0621 # Disable the "wildcard import" warning so we can bring in all methods from # course helpers and ui helpers #pylint: disable=W0401 # Disable the "Unused import %s from wildcard import" warning #pylint: disable=W0614 # Disable the "unused argument" warning because lettuce...
agpl-3.0
3,205,520,309,022,815,000
28.834951
115
0.677514
false
roadmapper/ansible
lib/ansible/modules/cloud/ovirt/_ovirt_affinity_label_facts.py
2
6836
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
-5,892,429,747,630,375,000
34.978947
156
0.647747
false
sayanchowdhury/fedmsg_meta_fedora_infrastructure
fedmsg_meta_fedora_infrastructure/tests/pkgdb.py
4
85348
# This file is part of fedmsg. # Copyright (C) 2012 Red Hat, Inc. # # fedmsg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. #...
lgpl-2.1
-135,555,807,236,765,020
39.836364
267
0.42513
false
Panagiotis-Kon/empower-runtime
empower-manager.py
2
13767
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
apache-2.0
2,858,925,847,260,787,000
26.479042
79
0.569623
false
PimentNoir/xbmc
addons/service.xbmc.versioncheck/service.py
23
4122
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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...
gpl-2.0
4,657,650,795,815,922,000
35.803571
118
0.623241
false
yuanbaowen521/tadbit
_pytadbit/utils/hic_filtering.py
1
12308
""" 06 Aug 2013 """ from warnings import warn from sys import stderr from re import sub from pytadbit.utils.extraviews import tadbit_savefig import numpy as np try: from matplotlib import pyplot as plt except ImportError: warn('matplotlib not foun...
gpl-3.0
8,235,652,805,680,449,000
37.223602
79
0.500731
false
keras-team/keras-io
examples/audio/speaker_recognition_using_cnn.py
1
14417
""" Title: Speaker Recognition Author: [Fadi Badine](https://twitter.com/fadibadine) Date created: 14/06/2020 Last modified: 03/07/2020 Description: Classify speakers using Fast Fourier Transform (FFT) and a 1D Convnet. """ """ ## Introduction This example demonstrates how to create a model to classify speakers from t...
apache-2.0
4,170,799,372,194,741,000
29.805556
105
0.677603
false
DanielCoutoVale/openccg
bin/dlf_parser.py
4
9487
# # dlf_parser.py (invoked by ccg-draw-graph) uses graphviz's dot to visualize (D)LF graphs # # author: Jonathan Barker (with minor contributions by Michael White) # license: LGPL # from xml.etree.ElementTree import ElementTree import optparse, sys, codecs, xml, os from collections import defaultdict # Parse argument...
lgpl-2.1
8,954,360,837,046,538,000
34.665414
118
0.505639
false
fedora-infra/pdc-updater
pdcupdater/handlers/__init__.py
1
2266
import abc import fedmsg.utils def load_handlers(config): """ Import and instantiate all handlers listed in the given config. """ for import_path in config['pdcupdater.handlers']: cls = fedmsg.utils.load_class(import_path) handler = cls(config) yield handler class BaseHandler(object...
lgpl-2.1
-3,433,893,769,655,368,000
30.472222
79
0.6015
false
pchauncey/ansible
lib/ansible/modules/cloud/amazon/aws_direct_connect_connection.py
29
11812
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = """ --- module...
gpl-3.0
6,655,581,191,164,276,000
37.855263
147
0.630037
false
pylbert/upm
examples/python/rpr220.py
6
2146
#!/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
5,392,803,090,927,367,000
35.372881
73
0.721342
false
bsmedberg/socorro
webapp-django/crashstats/supersearch/views.py
1
10765
import isodate import datetime import json import math import urllib from collections import defaultdict from django import http from django.conf import settings from django.contrib.auth.decorators import permission_required from django.core.urlresolvers import reverse from django.shortcuts import render from django.v...
mpl-2.0
7,692,848,706,769,278,000
28.173442
79
0.593312
false
pbs/django-cms
menus/base.py
6
2114
# -*- coding: utf-8 -*- from django.utils.translation import get_language from django.utils.encoding import smart_str class Menu(object): namespace = None def __init__(self): if not self.namespace: self.namespace = self.__class__.__name__ def get_nodes(self, request): """...
bsd-3-clause
4,657,401,836,683,723,000
28.375
103
0.569536
false
rishig/zulip
zerver/webhooks/greenhouse/tests.py
2
3550
# -*- coding: utf-8 -*- from mock import MagicMock, patch from zerver.lib.test_classes import WebhookTestCase class GreenhouseHookTests(WebhookTestCase): STREAM_NAME = 'greenhouse' URL_TEMPLATE = "/api/v1/external/greenhouse?stream={stream}&api_key={api_key}" FIXTURE_DIR_NAME = 'greenhouse' CONTENT_T...
apache-2.0
-409,897,108,513,201,600
43.936709
183
0.590986
false
vijayendrabvs/hap
neutron/services/loadbalancer/drivers/embrane/db.py
12
1804
# Copyright 2014 Embrane, 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
-1,744,174,685,889,021,000
31.214286
78
0.68459
false
mscuthbert/abjad
abjad/tools/selectiontools/test/test_selectiontools_VerticalMoment___len__.py
2
1499
# -*- encoding: utf-8 -*- from abjad import * def test_selectiontools_VerticalMoment___len___01(): score = Score( r''' \new Staff { \times 4/3 { d''8 c''8 b'8 } } \new PianoStaff << \new Staff { ...
gpl-3.0
8,077,643,505,249,827,000
27.846154
122
0.496998
false
andrewyoung1991/abjad
abjad/tools/labeltools/label_leaves_in_expr_with_named_interval_classes.py
2
1742
# -*- encoding: utf-8 -*- from abjad.tools import markuptools from abjad.tools import pitchtools from abjad.tools import scoretools from abjad.tools.topleveltools import attach from abjad.tools.topleveltools import iterate def label_leaves_in_expr_with_named_interval_classes(expr, markup_direction=Up): r"""Label ...
gpl-3.0
9,164,501,160,472,659,000
30.672727
99
0.54822
false
sparkslabs/kamaelia
Sketches/MPS/Old/greylisting.py
3
23214
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ver...
apache-2.0
-8,248,058,968,048,290,000
35.215289
157
0.563281
false
chriscrosscutler/scikit-image
skimage/feature/peak.py
18
6225
import numpy as np import scipy.ndimage as ndi from ..filters import rank_order def peak_local_max(image, min_distance=10, threshold_abs=0, threshold_rel=0.1, exclude_border=True, indices=True, num_peaks=np.inf, footprint=None, labels=None): """ Find peaks in an image, an...
bsd-3-clause
2,725,758,630,431,916,000
37.664596
91
0.578474
false
alfred82santa/dirty-models
tests/dirty_models/tests_fields.py
1
73981
from datetime import date, datetime, time, timedelta, timezone from enum import Enum from unittest import TestCase import iso8601 import sys from dateutil import tz from dirty_models.base import AccessMode from dirty_models.fields import ArrayField, BaseField, BooleanField, BytesField, DateField, DateTimeField, EnumF...
bsd-2-clause
3,501,055,680,036,023,000
38.268047
119
0.574093
false
endlessm/chromium-browser
native_client/pnacl/scripts/llvm-test.py
1
21139
#!/usr/bin/python # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script runs the LLVM regression tests and the LLVM testsuite. These tests are tightly coupled to the LLVM build, and re...
bsd-3-clause
-7,646,420,506,978,552,000
38.438433
80
0.619944
false
Ralf3/samt2
fuzzy/gui/helpwin_ui.py
1
4487
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'helpwin.ui' # # Created: Fri Feb 5 15:59:05 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
gpl-3.0
2,420,758,255,669,234,700
48.307692
180
0.685313
false
tensorflow/probability
tensorflow_probability/python/distributions/vector_exponential_linear_operator.py
1
13153
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
7,902,681,406,365,660,000
37.014451
81
0.665095
false
v-iam/azure-sdk-for-python
azure-mgmt-billing/azure/mgmt/billing/models/__init__.py
3
1200
# 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
6,976,934,034,514,775,000
32.333333
76
0.668333
false
mitchins/pelican-plugins
neighbors/neighbors.py
13
1936
# -*- coding: utf-8 -*- """ Neighbor Articles Plugin for Pelican ==================================== This plugin adds ``next_article`` (newer) and ``prev_article`` (older) variables to the article's context """ from pelican import signals def iter3(seq): it = iter(seq) nxt = None cur = next(it) for p...
agpl-3.0
6,031,071,882,090,224,000
32.37931
77
0.615186
false
kjiang8/Ardustat
Deprecated_Unsupported/Python_Client/ardustat_library_no_class.py
1
6942
import serial import socket import glob import pickle from time import sleep,time import subprocess import sys import os import atexit port = "" ser = serial.Serial() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mode = "socket" debug = False chatty = False groundvalue = 0 p = None def findPorts(): """A co...
bsd-2-clause
-3,351,243,363,049,091,000
27.334694
159
0.653558
false
Saurabh7/shogun
examples/undocumented/python_modular/kernel_comm_word_string_modular.py
26
1453
#!/usr/bin/env python from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_dna('../data/fm_train_dna.dat') testdat = lm.load_dna('../data/fm_test_dna.dat') parameter_list = [[traindat,testdat,4,0,False, False],[traindat,testdat,4,0,False,False]] def kernel_comm_word_string_modular (fm_train_dna=traind...
mit
4,664,420,409,205,243,000
35.325
132
0.770819
false
miketwo/pylacuna
pylacuna/enhancedbody.py
1
4727
#!/usr/bin/env python import pylacuna.enhancedbuilding as enhancedbuilding # from pylacuna.core.body import Body # from caching import GLOBAL_CACHE class EnhancedBody(object): def __init__(self, body, cache): ''' body -- A body object on which to perform calcs cache -- a cache object. Must...
mit
1,330,059,170,199,518,000
36.220472
183
0.541781
false
pongem/python-bot-project
appengine/standard/botapp/env/lib/python2.7/site-packages/django/contrib/admin/filters.py
49
18042
""" This encapsulates the logic for displaying filters in the Django admin. Filters are specified in models with the "list_filter" option. Each filter subclass knows how to display a filter for a field that passes a certain test -- e.g. being a DateField or ForeignKey. """ import datetime from django.contrib.admin.op...
apache-2.0
-2,297,045,167,604,673,000
39.726862
111
0.591952
false
xiaohaidao007/pandoraBox-SDK-mt7620
staging_dir/host/lib/scons-2.5.0/SCons/Debug.py
3
7481
"""SCons.Debug Code for debugging SCons internal things. Shouldn't be needed by most users. Quick shortcuts: from SCons.Debug import caller_trace caller_trace() """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software...
gpl-2.0
-6,272,530,359,477,291,000
30.041494
99
0.616361
false
caktus/rapidsms
rapidsms/backends/http/forms.py
7
1876
from django import forms from rapidsms.router import lookup_connections class BaseHttpForm(forms.Form): """Helper form for validating incoming messages. :param backend_name: (Optional) name of the backend """ def __init__(self, *args, **kwargs): """Save backend name to form for use later"""...
bsd-3-clause
6,591,994,300,506,421,000
33.740741
77
0.627932
false
klahnakoski/ActiveData-ETL
vendor/pyLibrary/testing/elasticsearch.py
4
3437
# 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisio...
mpl-2.0
5,477,488,911,563,290,000
29.963964
170
0.584812
false
xiaoguoai/ec-dev-swift
test/unit/proxy/controllers/test_base.py
3
24089
# Copyright (c) 2010-2012 OpenStack Foundation # # 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
-8,547,977,783,461,098,000
44.110487
79
0.58205
false
yorkerlin/shogun
applications/asp/model.py
31
4100
# # 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, or # (at your option) any later version. # # Written (W) 2006-2008 Soeren Sonnenburg # Written (W) 2007 Gunnar ...
gpl-3.0
9,219,667,901,655,523,000
27.671329
108
0.679756
false
austinzheng/swift
utils/cmpcodesize/cmpcodesize/compare.py
18
12566
# ====--- compare.py - Compare built products' sizes -*- coding: utf-8 -*-===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
apache-2.0
-8,552,913,735,851,363,000
35.109195
79
0.517587
false
alexbruy/QGIS
python/plugins/processing/gui/MultipleInputDialog.py
3
3895
# -*- coding: utf-8 -*- """ *************************************************************************** MultipleInputDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
gpl-2.0
-8,104,855,217,735,489,000
37.186275
89
0.570988
false
gtko/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/worldstarhiphop.py
13
1885
from __future__ import unicode_literals import re from .common import InfoExtractor class WorldStarHipHopIE(InfoExtractor): _VALID_URL = r'https?://(?:www|m)\.worldstar(?:candy|hiphop)\.com/videos/video\.php\?v=(?P<id>.*)' _TEST = { "url": "http://www.worldstarhiphop.com/videos/video.php?v=wshh6a7q1...
gpl-3.0
9,005,061,584,498,543,000
32.660714
102
0.540584
false
scavarda/mysql-dbcompare
mysql-utilities-1.6.0/mysql/utilities/common/server.py
1
80854
# # Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in th...
apache-2.0
423,251,853,561,488,700
37.520248
79
0.547716
false
davebridges/Lab-Website
papers/api.py
2
11043
'''This package controls API access to the :mod:`papers` app. Overview -------- The API for the :mod:`papers` application provides data on publications. The data can be provided as either a group of publications or as a single publication. Only GET requests are accepted. These urls are served at the endpoint **/api...
mit
-652,082,548,811,331,100
76.230769
362
0.350448
false
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/prompt_toolkit/input.py
20
3214
""" Abstraction of CLI Input. """ from __future__ import unicode_literals from .utils import DummyContext, is_windows from abc import ABCMeta, abstractmethod from six import with_metaclass import io import os import sys if is_windows(): from .terminal.win32_input import raw_mode, cooked_mode else: from .term...
gpl-3.0
6,210,073,192,508,431,000
22.807407
83
0.595831
false
brianwoo/django-tutorial
build/Django/build/lib.linux-x86_64-2.7/django/conf/locale/pt/formats.py
115
1717
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = '...
gpl-3.0
5,912,890,879,756,242,000
40.853659
90
0.538462
false
tidalmelon/twisted-intro
twisted-server-1/fastpoetry.py
11
1796
# This is the Twisted Fast Poetry Server, version 1.0 import optparse, os from twisted.internet.protocol import ServerFactory, Protocol def parse_args(): usage = """usage: %prog [options] poetry-file This is the Fast Poetry Server, Twisted edition. Run it like this: python fastpoetry.py <path-to-poetry-file...
mit
-1,949,318,157,078,893,800
22.025641
71
0.666481
false
xingjian-f/Leetcode-solution
173. Binary Search Tree Iterator.py
1
1262
# Definition for a binary tree node # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class BSTIterator(object): def move_left(self, node, stack): while node.left is not None: stack.append(node) node...
mit
2,159,593,557,568,160,500
22.830189
62
0.497623
false
gwu-business/salad-system-py
software/add_menu_item.py
1
2164
# python software/populate_db.py # ... source: https://github.com/PyMySQL/PyMySQL#example import pymysql.cursors import os try: DB_ROOT_PASSWORD = os.environ["MYSQL_ROOT_PASSWORD"] # if your root user has a password, assign it to the "MYSQL_ROOT_PASSWORD" environment variable except KeyError as e: DB_ROOT_PAS...
mit
-1,822,069,577,736,512,500
22.021277
152
0.667283
false
AnotherIvan/calibre
src/calibre/gui2/store/stores/smashwords_plugin.py
15
3729
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import random import re import ur...
gpl-3.0
-2,007,733,385,792,226,000
35.203883
98
0.547064
false
taborlab/FlowCal
FlowCal/excel_ui.py
1
67063
""" ``FlowCal``'s Microsoft Excel User Interface. This module contains functions to read, gate, and transform data from a set of FCS files, as specified by an input Microsoft Excel file. This file should contain the following tables: - **Instruments**: Describes the instruments used to acquire the samples li...
mit
3,935,264,825,413,908,000
41.098556
83
0.559444
false
ruschelp/cortex-vfx
test/IECore/ops/imagePrimitiveInOut/imagePrimitiveInOut-1.py
12
2283
########################################################################## # # Copyright (c) 2011, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
-4,463,369,717,491,706,400
34.671875
76
0.679369
false
HSC-Users/hscTools
bick/bin/hscOverlay.py
2
4221
#!/usr/bin/env python # Original filename: bin/hscOverlay.py # # Author: Steven Bickerton # Email: # Date: Tue 2014-10-07 11:50:49 # # Summary: # import sys import os import re import math import argparse import lsst.daf.persistence as dafPersist import hsc.pipe.base.butler as hscButler import nu...
gpl-3.0
4,461,821,912,527,629,300
30.5
95
0.55674
false
ironsmile/tank4eta
render.py
1
6364
#!/usr/bin/env python #-*- coding: utf8 -*- import sys import time import pygame import logging import pygame.font import fonts from locals import * RESOLUTION = (1024, 768) class Render (object): def __init__(self, fullscreen=False): pygame.display.init() pygame.display.set_caption("tank4eta")...
mit
5,978,659,144,117,039,000
32.671958
86
0.594595
false
led02/F2x
src/F2x/parser/plyplus/tree.py
2
15740
# Copyright 2018 German Aerospace Center (DLR) # # 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 agre...
apache-2.0
-1,514,153,886,316,261,400
40.421053
129
0.488882
false
broferek/ansible
lib/ansible/module_utils/network/dellos6/dellos6.py
13
10501
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # (c) 2017 Red Hat, Inc # # Copyright (c) 2016 Dell Inc. # # 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 dynamica...
gpl-3.0
-143,854,291,924,755,060
37.892593
148
0.61137
false
tiancj/emesene
emesene/e3/papylib/papyon/papyon/service/AddressBook/scenario/base.py
6
1815
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.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 Foundation; either version 2 of the License, or # (at your option) an...
gpl-3.0
-727,098,125,315,662,300
30.293103
76
0.683196
false
ep1cman/workload-automation
wlauto/workloads/caffeinemark/__init__.py
10
2731
# Copyright 2013-2015 ARM Limited # # 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 w...
apache-2.0
7,416,160,328,666,156,000
39.161765
80
0.686562
false
ddico/odoo
odoo/addons/test_read_group/tests/test_empty.py
43
1898
# -*- coding: utf-8 -*- from odoo.tests import common class TestEmptyDate(common.TransactionCase): """ Test what happens when grouping on date fields and getting a "false" grouping value """ def setUp(self): super(TestEmptyDate, self).setUp() self.Model = self.env['test_read_group.on_d...
agpl-3.0
2,720,031,528,162,348,500
31.169492
89
0.48156
false
Project-Bonfire/EHA
Scripts/include/file_lists.py
3
5233
# The idea here is to make some lists of the necessary files for each scenario # in order to make the code a little more organized! #--------------------------------------------------------- # # Credit based related files # #--------------------------------------------------------- # Files for the base...
gpl-3.0
4,927,005,644,334,628,000
62.817073
156
0.596981
false
heurezjusz/Athena
athenet/layers/concat.py
2
1809
"""Concatenation layer.""" import numpy as np import theano.tensor as T from athenet.layers import Layer class Concatenation(Layer): """Concatenation layer.""" def __init__(self, input_layer_names=None, name='concat'): """Create concatenation layer. :param input_layer_names: List of input ...
bsd-2-clause
-5,675,369,083,648,082,000
30.736842
74
0.600884
false
sursum/buckanjaren
buckanjaren/lib/python3.5/site-packages/django/forms/models.py
5
56541
""" Helper functions for creating Form classes from Django models and database field objects. """ from __future__ import unicode_literals from collections import OrderedDict from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError, ) fro...
mit
2,205,083,225,850,833,000
40.882222
116
0.590085
false
onoga/wm
src/gnue/common/datasources/GConditions.py
2
55841
# GNU Enterprise Common Library - XML elements for conditions # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise 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 Fo...
gpl-2.0
-955,720,464,379,371,300
29.783352
79
0.501728
false
yongshengwang/hue
desktop/core/ext-py/guppy-0.1.10/guppy/etc/KnuthBendix.py
37
7764
#._cv_part guppy.etc.KnuthBendix """ An implementation of the Knuth-Bendix algorithm, as described in (1), p. 143. For determining if two paths in a category are equal. The algorithm as given here, takes a set of equations in the form of a sequence: E = [(a, b), (c, d) ...] where a, b, c, d are 'paths'....
apache-2.0
-8,588,377,452,142,216,000
22.245509
77
0.551005
false
kenshay/ImageScripter
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/testing/browser_test_case.py
6
3561
# 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. from functools import wraps import logging import os import sys import types import unittest from telemetry.internal.browser import browser_finder from tele...
gpl-3.0
7,389,350,027,619,998,000
29.965217
80
0.708509
false
jameswatt2008/jameswatt2008.github.io
python/Python核心编程/网络编程/截图和代码/概述、SOCKET/多进程copy文件/test/nntplib.py
11
43078
"""An NNTP client class based on: - RFC 977: Network News Transfer Protocol - RFC 2980: Common NNTP Extensions - RFC 3977: Network News Transfer Protocol (version 2) Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'ha...
gpl-2.0
3,845,756,644,645,159,000
36.557105
96
0.579089
false