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
coiax/pyode
tests/test_xode.py
2
30688
#!/usr/bin/env python ###################################################################### # Python Open Dynamics Engine Wrapper # Copyright (C) 2004 PyODE developers (see file AUTHORS) # All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of EITHER: # ...
lgpl-2.1
129,536,766,369,157,010
30.029323
76
0.559209
false
yanheven/nova
nova/tests/unit/virt/xenapi/image/test_glance.py
33
11630
# Copyright 2013 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 requ...
apache-2.0
5,720,992,741,060,890,000
44.429688
79
0.527945
false
repotvsupertuga/repo
instal/script.module.stream.tvsupertuga.addon/resources/lib/sources/en/wrzcraft.py
8
6752
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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
-5,193,886,154,355,285,000
35.497297
172
0.475118
false
zyrikby/androguard
androguard/decompiler/dad/tests/dataflow_test.py
14
14248
"""Tests for def_use.""" import sys sys.path.append('.') import collections import mock import unittest from androguard.decompiler.dad import dataflow from androguard.decompiler.dad import graph from androguard.decompiler.dad import node from androguard.decompiler.dad import instruction from androguard.decompiler.dad...
apache-2.0
8,023,422,970,382,853,000
31.381818
79
0.380685
false
neurokernel/retina
retina/InputProcessors/RetinaInputProcessor.py
1
4648
#!/usr/bin/env python import numpy as np import h5py from neurokernel.LPU.utils.simpleio import * import retina.classmapper as cls_map import pycuda.driver as cuda from neurokernel.LPU.InputProcessors.BaseInputProcessor import BaseInputProcessor class RetinaInputProcessor(BaseInputProcessor): def __init__(self,...
bsd-3-clause
-5,776,355,278,828,769,000
35.888889
100
0.584552
false
sbkolate/sap_frappe_v6
frappe/email/doctype/email_alert/email_alert.py
3
4011
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json from frappe import _ from frappe.model.document import Document from frappe.utils import validate_email_add, nowdate class EmailAlert...
mit
2,750,044,336,936,229,400
32.705882
109
0.704562
false
Dave-ts/Sigil
src/Resource_Files/plugin_launchers/python/validationcontainer.py
9
2091
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Copyright (c) 2014 Kevin B. Hendricks, John Schember, and Doug Massay # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following ...
gpl-3.0
-4,743,733,439,009,246,000
45.466667
89
0.761836
false
aplanas/rally
tests/unit/plugins/openstack/context/nova/test_flavors.py
13
3947
# Copyright 2014: Mirantis 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
6,756,423,582,459,452,000
31.619835
78
0.569546
false
citrix-openstack-build/sahara
sahara/tests/unit/plugins/hdp/test_clusterspec.py
3
69753
# Copyright (c) 2013 Hortonworks, 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 ...
apache-2.0
-4,165,563,385,657,736,700
43.857235
79
0.563646
false
alex/changes
changes/listeners/hipchat.py
1
3156
import json import logging import requests from flask import current_app from changes.config import db from changes.constants import Result, Status from changes.models import Build, ProjectOption, Source from changes.utils.http import build_uri logger = logging.getLogger('hipchat') DEFAULT_TIMEOUT = 1 API_ENDPOINT ...
apache-2.0
6,745,039,586,604,910,000
26.206897
93
0.611217
false
stoewer/nixpy
nixio/pycore/data_array.py
1
8360
# Copyright (c) 2016, German Neuroinformatics Node (G-Node) # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICENSE file in the root of the Project. from numbers import Number from .entity_with_sourc...
bsd-3-clause
6,309,524,489,179,583,000
31.913386
79
0.605742
false
caioserra/apiAdwords
examples/adspygoogle/dfp/v201308/custom_field_service/deactivate_all_line_item_custom_fields.py
2
2861
#!/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,093,755,459,794,316,300
30.788889
80
0.664453
false
RobertoMalatesta/synergy
ext/toolchain/commands1.py
22
55902
# synergy -- mouse and keyboard sharing utility # Copyright (C) 2012 Synergy Si Ltd. # Copyright (C) 2009 Nick Bolton # # This package is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # found in the file LICENSE that should have accompanied this file. # # ...
gpl-2.0
8,686,066,971,684,435,000
26.578688
116
0.64944
false
CarterBain/AlephNull
tests/test_events_through_risk.py
3
11456
# # Copyright 2013 Quantopian, 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 wr...
apache-2.0
354,420,153,847,497,400
32.595308
78
0.464735
false
OpenSlides/openslides-votecollector
setup.py
1
1308
from setuptools import find_packages, setup package_name = 'openslides-votecollector' module_name = 'openslides_votecollector' module = __import__(module_name) with open('README.rst') as readme: long_description = readme.read() with open('requirements.txt') as requirements: install_requires = requirements.r...
mit
434,190,824,964,950,200
32.538462
92
0.651376
false
ibrahimkarahan/Flexget
flexget/ui/api.py
5
7172
from flask import request, jsonify, Blueprint, Response, flash import flexget from flexget.config_schema import resolve_ref, process_config, get_schema from flexget.manager import manager from flexget.options import get_parser from flexget.plugin import plugin_schemas from flexget.utils.tools import BufferQueue API_V...
mit
-145,441,332,919,503,260
33.647343
117
0.602064
false
rogalski/pylint
pylint/extensions/emptystring.py
4
2417
# -*- coding: utf-8 -*- # Copyright (c) 2016 Alexander Todorov <atodorov@MrSenko.com> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Looks for comparisons to empty string.""" import itertools import astroid fro...
gpl-2.0
3,413,561,731,749,634,600
33.042254
90
0.625155
false
ndtran/compassion-accounting
recurring_contract/model/invoice.py
1
1713
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Cyril Sester <csester@compassion.ch> # # The licence is in the file __op...
agpl-3.0
5,345,413,194,025,163,000
31.153846
78
0.52948
false
albertz/grub-fuse
compile.py
1
4476
#!/usr/bin/python import os, os.path, sys os.chdir(os.path.dirname(__file__)) try: os.mkdir("build") except: pass import re from fnmatch import fnmatch from pipes import quote from pprint import pprint CFLAGS = "-g -Wall -Iinclude -Igrub-core/gnulib " + \ "-Ibuild -DLIBDIR=\\\"/usr/local/lib\\\" " + \ "-DHAVE_CON...
gpl-3.0
3,300,640,583,022,266,400
23.459016
95
0.613047
false
fgoudreault/auxiclean
auxiclean/gui/equality_breaker.py
1
3366
from .auxiliary_window import AuxiliaryWindow from ..handler import TextHandler import tkinter as tk class EqualityBreaker(AuxiliaryWindow): _title = "Auxiclean - EqualityBreaker" _loggername = "auxiclean.gui.equality_breaker" def __init__(self, candidates, nchoices, course, *args, **kwargs): # L...
mit
-8,210,463,254,876,397,000
38.505882
78
0.538416
false
statX/nz-houses
clients/client_koordinates.py
1
1958
#!/usr/bin/env python #http://api.trademe.co.nz/v1/Listings/553527490.json import oauth2 as oauth import time import urllib2 import json def retrieve_school_zone(): with open('./kdapikeys.txt') as fileObject: KEYHERE = fileObject.readline().strip() #school zone request apiRequest = 'http://api.koordinates.c...
bsd-2-clause
-1,435,137,139,717,250,800
33.350877
200
0.720633
false
yoshinarikou/MilleFeuilleRaspberryPi
milpython/milpy/lib/gpio.py
1
1610
######################################################################## # MCU Gear(R) system Sample Code # Auther:y.kou. # web site: http://www.milletool.com/ # Date : 8/OCT/2016 # ######################################################################## #Revision Information # #########################################...
mit
5,481,458,723,627,884,000
23.769231
72
0.631056
false
aliok/trnltk
trnltk/morphology/contextful/likelihoodmetrics/hidden/test/test_simplegoodturing.py
1
3202
# coding=utf-8 """ Copyright 2012 Ali Ok (aliokATapacheDOTorg) 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
2,126,987,249,120,535,000
39.531646
122
0.657089
false
adityahase/frappe
frappe/app.py
1
8114
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import os from six import iteritems import logging from werkzeug.wrappers import Request from werkzeug.local import LocalManager from werkzeug.exceptions ...
mit
-1,566,488,549,490,101,500
28.830882
128
0.726769
false
OpenPLi/enigma2
lib/python/Screens/Standby.py
2
14247
import os import RecordTimer import Components.ParentalControl from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.config import config from Components.AVSwitch import AVSwitch from Components.Console import Console from Components.Impor...
gpl-2.0
2,006,730,632,789,092,900
37.92623
193
0.747245
false
jiangzhonghui/viewfinder
backend/db/subscription.py
13
6249
# Copyright 2012 Viewfinder Inc. All Rights Reserved """User subscription table. A subscription is any time-limited modification to a user's privileges, such as increased storage quota. Subscriptions may be paid (initially supporting iOS in-app purchases) or granted for other reasons such as referring new users. """ ...
apache-2.0
2,398,161,972,583,370,000
37.574074
108
0.720595
false
emersonsoftware/ansiblefork
lib/ansible/modules/system/systemd.py
5
16377
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Brian Coca <bcoca@ansible.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...
gpl-3.0
6,874,354,297,627,575,000
37.086047
182
0.546071
false
analurandis/Tur
backend/venv/Lib/site-packages/git/test/test_commit.py
2
12355
# -*- coding: utf-8 -*- # test_commit.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from __future__ import print_function from git.test.lib import ( Tes...
mit
-6,085,914,519,278,853,000
36.168675
110
0.647326
false
Jorge-Rodriguez/ansible
lib/ansible/modules/system/seport.py
4
8442
#!/usr/bin/python # Copyright: (c) 2014, Dan Keder <dan.keder@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
-3,285,057,386,472,222,000
26.953642
113
0.637645
false
Zaneh-/bearded-tribble-back
taiga/feedback/models.py
21
1633
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
-8,765,439,346,029,666,000
46.970588
83
0.676272
false
lexor90/node-compiler
node/tools/run-valgrind.py
5
2519
#!/usr/bin/env python # # Copyright 2009 the V8 project 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: # # * Redistributions of source code must retain the above copyright # noti...
mit
-1,382,701,634,226,333,400
37.753846
72
0.745931
false
DepthDeluxe/ansible
lib/ansible/modules/identity/ipa/ipa_host.py
22
10210
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
2,483,066,706,811,936,000
32.920266
114
0.632321
false
hammerhorn/working
hr.py
1
2015
#!/usr/bin/env python3 """ Produces horizontal lines for use in shell scripts. usage: hr.py [-h] [-w WIDTH] [-p PATTERN] [-c] optional arguments: -h, --help show this help message and exit -w WIDTH, --width WIDTH -p PATTERN, --pattern PATTERN -c, --center * floats should give screenwidths, ints sh...
gpl-3.0
1,426,352,709,110,236,700
27.785714
83
0.6134
false
neerja28/Tempest
tempest/api/object_storage/test_container_acl.py
4
3994
# Copyright 2012 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 requ...
apache-2.0
2,373,737,822,112,379,400
41.042105
78
0.658237
false
bicofino/Pyramboia
pyramboia/pyramboia/urls.py
1
5379
from django.conf.urls import patterns, include, url from django.contrib import admin from tasks.views import runTask from tasks.views import ProjectListView, ProjectCreateView, ProjectDetailView, ProjectUpdateView, ProjectDeleteView, HeaderListView, HeaderCreateView, HeaderDetailView, HeaderUpdateView, HeaderDeleteView...
mit
-5,152,567,834,804,699,000
53.887755
467
0.3971
false
alinikkhah/s4cmd
setup.py
1
1218
#!/usr/bin/env python # # Copyright 2012 BloomReach, 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...
apache-2.0
6,579,009,193,789,784,000
28.707317
74
0.684729
false
omeed-maghzian/mtag
mtag_munge.py
1
36789
#!/usr/bin/env python from __future__ import division from __future__ import absolute_import from ldsc_mod.ldscore import allele_info as allele_info import pandas as pd import numpy as np import os import sys import traceback import gzip import bz2 import argparse from scipy.stats import chi2 import logging import time...
gpl-3.0
-8,876,316,338,793,550,000
38.220682
163
0.557286
false
mosquito/Tornado-MySQL
tornado_mysql/tests/test_connection.py
4
2755
import time from tornado.testing import gen_test from tornado import gen import tornado_mysql from tornado_mysql.tests import base class TestConnection(base.PyMySQLTestCase): @gen_test def test_utf8mb4(self): """This test requires MySQL >= 5.5""" arg = self.databases[0].copy() arg['ch...
mit
2,432,940,451,073,849,300
31.411765
100
0.600363
false
cngo-github/translation-server
src/irc/queue/xchat/xchat-translator-2.7.5.py
1
15038
# -*- coding: utf-8 -*- __module_name__ = "Xchat Translator" __module_version__ = "-.-" __module_description__ = "Performs translations from one language to another" __module_author__ = "Chuong Ngo" import xchat import json import socket import select DEFAULT_LANG = "en" MAX_ERROR = 3 # Must be either True or False ...
mit
1,971,687,278,613,201,400
25.853571
317
0.654941
false
Andrew-McNab-UK/DIRAC
Interfaces/scripts/dirac-wms-job-status.py
7
2067
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-wms-job-status # Author : Stuart Paterson ######################################################################## """ Retrieve status of the given DIRAC job """ __RCSID__ = "$Id$" import os ...
gpl-3.0
-1,949,146,979,304,111,600
29.850746
95
0.54717
false
dpinney/omf
omf/models/commsBandwidth.py
1
4260
''' Comms Bandwidth Model ''' import os, datetime, shutil from os.path import join as pJoin import networkx as nx from omf import comms from omf.models import __neoMetaModel__ from omf.models.__neoMetaModel__ import * # Model metadata: tooltip = "Calculate the bandwidth requirements for a communications system on a ...
gpl-2.0
3,672,570,366,437,700,000
34.206612
168
0.731925
false
davinwang/caffe2
caffe2/python/mkl/mkl_fc_op_test.py
4
1753
# Copyright (c) 2016-present, Facebook, 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...
apache-2.0
-8,658,453,736,706,285,000
32.711538
78
0.637764
false
mofr/advent-of-code
2016/assembunny.py
1
1444
def run(source, out=None, **registers): statements = list(map(lambda s: [s.split()[0], s.split()[1:]], source.split('\n'))) pc = 0 reg = { 'a': 0, 'b': 0, 'c': 0, 'd': 0, } reg.update(registers) def val(arg): if arg in reg: return reg[arg] ...
apache-2.0
-2,466,116,944,208,556,000
28.469388
87
0.40928
false
rahul-c1/scikit-learn
sklearn/tree/tests/test_tree.py
6
29150
""" Testing for the tree module (sklearn.tree). """ import pickle import numpy as np from functools import partial from itertools import product import platform from sklearn.metrics import accuracy_score from sklearn.metrics import mean_squared_error from sklearn.utils.testing import assert_array_equal from sklearn....
bsd-3-clause
-7,347,510,510,261,935,000
34.505481
79
0.589434
false
t794104/ansible
lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py
6
9472
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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 = { 'metadat...
gpl-3.0
-469,219,042,870,135,000
35.571429
122
0.546347
false
mesenev/movement_fefu
movement_app/management/commands/filldb.py
2
2090
import random from django.core.management.base import BaseCommand from movement_app.models import * __author__ = 'komatsu' def random_date(start, end): """ This function will return a random datetime between two datetime objects. """ delta = end - start int_delta = (delta.days * 24 * 60 * ...
mit
5,191,440,878,712,828,000
28.041667
75
0.536842
false
wiki-ai/revscoring
revscoring/utilities/fetch_idioms.py
1
2320
""" ``revscoring fetch_idioms -h`` :: Gets a list of English language idioms from en.wiktionary.org. Usage: fetch_idioms [--output=<path>] [--verbose] [--debug] Options: -h --help Print this documentation --output=<path> Path to a file to wri...
mit
-3,024,613,572,800,338,000
23.217391
69
0.552586
false
taku-y/bmlingam
bmlingam/commands/bmlingam_coeff.py
1
5844
# -*- coding: utf-8 -*- """Include functions used in command bin/bmlingam-coeff. """ # Author: Taku Yoshioka # License: MIT from argparse import ArgumentParser import matplotlib.pyplot as plt import numpy as np from bmlingam import load_pklz, MCMCParams, infer_coef_posterior def parse_args_bmlingam_coeff(args=None...
mit
-4,117,505,851,537,802,000
39.303448
84
0.515914
false
girving/tensorflow
tensorflow/contrib/estimator/python/estimator/dnn_linear_combined_test.py
12
8059
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-3,234,208,295,958,200,300
34.502203
80
0.70232
false
miniconfig/home-assistant
tests/components/automation/test_sun.py
7
14025
"""The tests for the sun automation.""" from datetime import datetime import unittest from unittest.mock import patch from homeassistant.core import callback from homeassistant.setup import setup_component from homeassistant.components import sun import homeassistant.components.automation as automation import homeass...
mit
-6,312,618,687,379,220,000
34.327456
78
0.488414
false
aronsky/home-assistant
tests/components/automation/test_template.py
2
14776
"""The tests for the Template automation.""" import unittest from homeassistant.core import Context, callback from homeassistant.setup import setup_component import homeassistant.components.automation as automation from tests.common import ( get_test_home_assistant, assert_setup_component, mock_component) from te...
apache-2.0
-4,656,855,175,723,286,000
32.967816
84
0.475636
false
testmana2/test
DebugClients/Python3/coverage/python.py
18
5728
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Python source expertise for coverage.py""" import os.path import zipimport from coverage import env, files from coverage.misc import contract, expensive, NoSou...
gpl-3.0
-4,367,037,442,771,514,000
28.833333
84
0.598638
false
lmcinnes/pynndescent
pynndescent/rp_trees.py
1
38378
# Author: Leland McInnes <leland.mcinnes@gmail.com> # # License: BSD 2 clause from warnings import warn import locale import numpy as np import numba import scipy.sparse from pynndescent.sparse import sparse_mul, sparse_diff, sparse_sum, arr_intersect from pynndescent.utils import tau_rand_int, norm import joblib fr...
bsd-2-clause
7,960,273,991,405,806,000
29.507154
90
0.584736
false
m3pt0r/l0l
core/database/generator.py
2
10276
#------------------Bombermans Team---------------------------------# #Author : B3mB4m #Concat : b3mb4m@protonmail.com #Project : https://github.com/b3mb4m/Shellsploit #LICENSE : https://github.com/b3mb4m/Shellsploit/blob/master/LICENSE #------------------------------------------------------------------# def generato...
mit
-3,363,724,911,885,896,700
33.253333
201
0.632542
false
MM56/Magipack.js
examples/packImages.py
1
1413
#!/usr/bin/env python import os, sys, getopt import re import json def listFiles(path): if not path.endswith('/'): path += '/' files = os.listdir(path) arr = [] for f in files: if f.lower().endswith(('.png', '.jpg', '.jpeg', '.gif', '.webp')): arr.append([path + f, f]) if os.path.isdir(path + '/' + f): ...
mit
-648,486,166,919,818,800
21.09375
70
0.550602
false
aravart/capomate
poolmate/test/test_api.py
2
1786
import numpy as np import StringIO from poolmate.teach import Runner, SVMLearner, build_options from sklearn.datasets import make_classification # TODO: Unneeded? class ScikitTextLearner: def __init__(self, scikit_learner): self.scikit_learner = scikit_learner def fit(self, yx): pass de...
mit
5,406,317,989,885,995,000
28.278689
68
0.577828
false
maurodoglio/taar
taar/flask_app.py
1
2518
# 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/. import sys from flask import Flask from dockerflow.flask import Dockerflow import optparse from decouple import config i...
mpl-2.0
4,864,298,516,271,165,000
26.977778
87
0.664019
false
birryree/servo
components/style/binding_tools/regen_atoms.py
6
7054
#!/usr/bin/env python # 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/. import re import os PRELUDE = """ /* This Source Code Form is subject to the terms of the Mozil...
mpl-2.0
-7,448,468,700,294,948,000
28.638655
96
0.58279
false
NeCTAR-RC/horizon
openstack_dashboard/test/unit/api/test_neutron.py
1
76425
# Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-9,127,317,398,460,591,000
44.06191
79
0.608728
false
okfn/goodtables-web
web/components/commons/view_mixins.py
1
1387
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os from werkzeug.datastructures import FileStorage from flask import current_app as app from goodtables.pipeline import Pipeline from . imp...
mit
-7,738,223,652,564,126,000
31.255814
79
0.638789
false
kennedyshead/home-assistant
tests/components/google/test_calendar.py
8
11233
"""The tests for the google calendar platform.""" import copy from unittest.mock import Mock, patch import httplib2 import pytest from homeassistant.components.google import ( CONF_CAL_ID, CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_DEVICE_ID, CONF_ENTITIES, CONF_NAME, CONF_TRACK, DEVICE_...
apache-2.0
7,621,273,218,091,933,000
34.547468
85
0.645776
false
OpenQbo/qbo_webi
src/teleoperation/sip2rtmp/p2p-sip/src/std/rfc2617.py
4
6811
# Copyright (c) 2007, Kundan Singh. All rights reserved. See LICENSING for details. # @implements RFC2617 (HTTP auth) ''' The HTTP basic and digest access authentication as per RFC 2617. ''' from random import randint from hashlib import md5 from base64 import b64encode import time # @implements RFC2617 ...
gpl-2.0
2,026,771,447,023,723,000
49.613636
305
0.606519
false
macarthur-lab/xbrowse
seqr/views/apis/gene_api_tests.py
1
3060
import json from django.test import TransactionTestCase from django.urls.base import reverse from seqr.models import GeneNote from seqr.views.apis.gene_api import gene_info, create_gene_note_handler, update_gene_note_handler, delete_gene_note_handler from seqr.views.utils.test_utils import _check_login GENE_ID = 'EN...
agpl-3.0
2,172,696,810,965,846,300
43.347826
124
0.673203
false
barseghyanartur/django-material
tests/integration/tests/test_textinput.py
10
4970
import json from django import forms from django_webtest import WebTest from . import build_test_urls class TextInputForm(forms.Form): test_field = forms.CharField( min_length=5, max_length=20, widget=forms.TextInput(attrs={'data-test': 'Test Attr'})) class TestTextInput(WebTest): d...
bsd-3-clause
3,600,718,790,823,478,000
36.089552
122
0.608853
false
linkedin/indextank-service
api/boto/ec2/elb/healthcheck.py
11
2662
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
apache-2.0
8,682,352,233,627,036,000
38.147059
74
0.661157
false
azumimuo/family-xbmc-addon
plugin.video.bubbles/resources/lib/sources/english/hoster/open/gogoanime.py
1
3837
# -*- coding: utf-8 -*- ''' Bubbles Addon Copyright (C) 2016 Exodus 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
-2,185,568,075,376,425,700
31.794872
182
0.565546
false
hectord/lettuce
tests/integration/lib/Django-1.2.5/django/db/models/options.py
43
19583
import re from bisect import bisect from django.conf import settings from django.db.models.related import RelatedObject from django.db.models.fields.related import ManyToManyRel from django.db.models.fields import AutoField, FieldDoesNotExist from django.db.models.fields.proxy import OrderWrt from django.db.models.loa...
gpl-3.0
5,512,299,899,066,825,000
39.047035
122
0.580759
false
darktears/chromium-crosswalk
components/proximity_auth/e2e_test/setup_test.py
28
5738
# Copyright 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. """ Script that exercises the Smart Lock setup flow, testing that a nearby phone can be found and used to unlock a Chromebook. Note: This script does not cu...
bsd-3-clause
3,833,290,620,455,111,700
33.359281
80
0.70129
false
nerevu/frappe
frappe/desk/star.py
38
1503
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """Allow adding of stars to documents""" import frappe, json from frappe.model.db_schema import add_column @frappe.whitelist() def toggle_star(doctype, name, add=False): """Ad...
mit
-17,695,761,688,688,134
27.358491
89
0.692615
false
robinro/ansible
lib/ansible/modules/network/avi/avi_healthmonitor.py
43
6595
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
-3,460,733,175,874,149,000
34.456989
157
0.638817
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.0/Lib/gopherlib.py
8
5634
"""Gopher protocol client interface.""" import string # Default selector, host and port DEF_SELECTOR = '1/' DEF_HOST = 'gopher.micro.umn.edu' DEF_PORT = 70 # Recognized file types A_TEXT = '0' A_MENU = '1' A_CSO = '2' A_ERROR = '3' A_MACBINHEX = '4' A_PCBINHEX = '5' A_UUENCODED = ...
mit
8,951,770,436,714,671,000
26.086538
88
0.526092
false
rupace10/mysql-connector-python
lib/mysql/connector/dbapi.py
35
2330
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
gpl-2.0
8,646,486,502,092,094,000
30.066667
78
0.722747
false
tanglei528/nova
nova/tests/integrated/v3/test_server_usage.py
31
1463
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
-7,752,620,562,111,676,000
36.512821
78
0.660287
false
cloudnull/ansible-modules-core
cloud/openstack/os_auth.py
9
2006
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
-2,372,976,840,638,432,000
28.5
72
0.6999
false
DanMcInerney/clusterd
src/platform/jboss/fingerprints/JBoss51.py
8
1534
from src.platform.jboss.interfaces import JINTERFACES from cprint import FingerPrint from requests import exceptions from log import LOG import utility class FPrint(FingerPrint): def __init__(self): self.platform = "jboss" self.version = "5.1" self.title = JINTERFACES.WM self....
mit
1,282,200,764,707,094,000
36.414634
83
0.498696
false
Captain-Coder/tribler
Tribler/Core/Utilities/torrent_utils.py
1
4775
from __future__ import absolute_import import logging import os import libtorrent from six import text_type logger = logging.getLogger(__name__) def commonprefix(l): # this unlike the os.path.commonprefix version always returns path prefixes as it compares # path component wise. cp = [] ls = [p.spl...
lgpl-3.0
2,500,792,797,343,158,300
33.601449
116
0.633508
false
rbian/avocado-vt
virttest/libvirt_xml/nwfilter_protocols/icmp.py
26
6074
""" icmp protocl support class(es) http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoICMP """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.nwfilter_protocols import base class Icmp(base.TypedDeviceBase): """ Create new Icmp xml instances Properties: attrs...
gpl-2.0
-716,273,272,941,290,800
45.366412
86
0.552519
false
valdecdev/asterisk360
asterisk360/models/asterisk360.py
2
4474
__author__ = 'les' from openerp.osv import orm, fields from openerp.tools.translate import _ class asterisk_server(orm.Model): _inherit = "asterisk.server" _columns = { 'ws_address': fields.char('Asterisk WebSocket Server Full Address or DNS', size=150, help="Full URI of the WebSockets Server includi...
agpl-3.0
3,636,015,768,797,953,000
41.207547
224
0.506482
false
procangroup/edx-platform
lms/djangoapps/certificates/management/commands/regenerate_user.py
15
5358
"""Django management command to force certificate regeneration for one user""" import copy import logging from django.contrib.auth.models import User from django.core.management.base import BaseCommand from opaque_keys.edx.keys import CourseKey from six import text_type from badges.events.course_complete import get_c...
agpl-3.0
-2,069,358,726,322,033,400
37.826087
120
0.513438
false
VaneCloud/horizon
openstack_dashboard/dashboards/project/volumes/snapshots/forms.py
72
1841
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
-2,058,576,810,762,252,300
39.021739
75
0.603476
false
ganeti/ganeti
test/py/ganeti.storage.gluster_unittest.py
1
7056
#!/usr/bin/python3 # # Copyright (C) 2013, 2016 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this ...
bsd-2-clause
-8,493,400,030,548,871,000
37.557377
80
0.629819
false
elego/tkobr-addons
tko_email_template_restrict_by_group/models/mail_template.py
1
1160
# -*- coding: utf-8 -*- # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Thinkopen - Brasil # Copyright (C) Thinkopen Solutions (<http://www.thinkopensolutions.com.br>) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import mode...
agpl-3.0
2,005,225,474,380,050,700
37.666667
166
0.62931
false
jasrusable/fun
venv/lib/python2.7/site-packages/twill/commands.py
19
23001
""" Implementation of all of the individual 'twill' commands available through twill-sh. """ import sys import _mechanize_dist as mechanize from _mechanize_dist import ClientForm from _mechanize_dist._headersutil import is_html OUT=None ERR=sys.stderr # export: __all__ = ['get_browser', 'reset_browser', ...
gpl-2.0
-8,889,449,112,937,615,000
24.756999
107
0.57741
false
sjschmidt44/python_data_structures
data_structures/stack.py
1
1071
from node import Node class Stack(): def __init__(self): self.top = None self.size = 0 def __repr__(self): return 'The stack has {num} Nodes, and {top} is at the top'.format( num=self.size, top=self.top) def push(self, val): '''Add a value to the head of the s...
mit
-8,825,053,508,267,262,000
25.121951
75
0.493931
false
rhdedgar/openshift-tools
openshift/installer/vendored/openshift-ansible-3.5.127/roles/lib_openshift/src/class/oc_label.py
20
9497
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCLabel(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' # pylint allows 5 # pylint: disable=too-many-arguments def __init__(self, name, namespace, ...
apache-2.0
7,749,958,976,490,707,000
31.523973
94
0.520901
false
muggot/python-goose
goose/images/ImageExtractor.py
1
1258
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
7,027,247,018,022,876,000
34.942857
73
0.734499
false
BoltzmannBrain/nupic.research
htmresearch/regions/LanguageSensor.py
2
8108
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, 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
-783,225,662,559,630,500
31.562249
80
0.609521
false
blaze225/zulip
analytics/tests/test_counts.py
2
31188
from __future__ import absolute_import from django.db import models from django.db.models import Sum from django.test import TestCase from django.utils import timezone from analytics.lib.counts import CountStat, COUNT_STATS, process_count_stat, \ zerver_count_user_by_realm, zerver_count_message_by_user, \ zer...
apache-2.0
4,257,407,679,303,316,500
50.127869
125
0.613441
false
LaoZhongGu/kbengine
demo/res/scripts/data/d_spaces_spawns.py
3
2636
# -*- coding: utf-8 -*- datas={ 1: [ ], 2: [ (1001, (-102.9299, 191.0, -150.922),(0.0,0.0,0.0), 1), (1002, (-105.0, 191.0, -150.922),(0.0,0.0,0.0), 1), (1003, (-132.9299, 191.0, -150.922),(0.0,0.0,0.0), 1), (1003, (-137.833725, 170.639648, -202.246201),(0.0,0.0,0.0), 1), (1003, (-146.968063, 161.339844, -...
lgpl-3.0
6,214,054,206,730,106,000
46.071429
66
0.515175
false
wndias/bc.repository
plugin.video.kmediatorrent/resources/site-packages/xbmcswift2/cli/create.py
20
5636
''' xbmcswift2.cli.create --------------------- This module contains the code to initialize a new XBMC addon project. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' import os import string import readline from os import getcwd from xml.sax import saxutil...
gpl-2.0
-3,313,580,659,413,640,700
28.820106
79
0.642832
false
noashin/kinetic_ising_model_neurons
spikes_activity_generator.py
1
3550
import numpy as np from scipy import stats from scipy.special import expit from scipy.stats import multivariate_normal def exp_cosh(H): beta = 1.0 return 0.5 * np.exp(beta * H)/np.cosh(beta * H) def gaussian(H): #import ipdb; ipdb.set_trace() a = 1 cov = np.diag(np.repeat(a, H.shape[1])) re...
mit
-7,903,146,007,753,143,000
28.583333
119
0.599718
false
geopython/QGIS
python/PyQt/PyQt5/QtSvg.py
17
1129
# -*- coding: utf-8 -*- """ *************************************************************************** QtSvg.py --------------------- Date : March 2016 Copyright : (C) 2016 by Juergen E. Fischer Email : jef at norbit dot de ********************************...
gpl-2.0
-65,583,323,552,826,400
42.423077
75
0.374668
false
rezoo/chainer
chainer/functions/array/spatial_transformer_sampler.py
3
11318
import numpy import chainer from chainer.backends import cuda from chainer import function from chainer.utils import argument from chainer.utils import type_check if cuda.cudnn_enabled: cudnn = cuda.cudnn libcudnn = cuda.cuda.cudnn _sampler_type = libcudnn.CUDNN_SAMPLER_BILINEAR class SpatialTransforme...
mit
-4,569,858,674,480,813,000
35.509677
79
0.54029
false
sigttou/SMMpy
src/server.py
1
4225
#!/usr/bin/env python2 # -*- coding: utf-8 -*- __author__ = "David Bidner, Rene Höbling and Alexander Wachter" __license__ = "BSD 2-Clause" __version__ = "1.0.0" __status__ = "Released" # Provides a more or less complex structure for the SMM Network server import rsa import os.path import time import stomp import jso...
bsd-2-clause
7,359,604,263,949,605,000
31
80
0.523674
false
allena29/pi-learning
02-operation-nee-naw/script.py
1
1062
#!/usr/bin/python import sys import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) # Setup Stuff sys.stderr.write('\033[1;31mnee\033[1;34mnaw script') GPIO.setup(39, GPIO.OUT) GPIO.setup(40, GPIO.OUT) # HOW def turn_a_light_on_or_off(light, on): if light == 'red': gpio_pin_number = 27 ...
gpl-3.0
-7,835,198,423,294,629,000
18.309091
59
0.617702
false
rishatsharafiev/crm
project/api/serializers.py
1
8981
# -*- coding: utf-8 -*- from rest_framework import serializers from rest_framework import exceptions from rest_framework.validators import ValidationError, UniqueValidator from django.contrib.auth.models import User from .models import ( Employee, Subdivision, Project, Task, Comment, # TaskPict...
mit
7,633,766,168,438,574,000
30.851064
113
0.627436
false
zniper/zeenote
simplenote/extract.py
1
1830
import requests import logging import json from simplenote.settings import ALCHEMY_API_KEY, ALCHEMY_API_URL from simplenote.settings import DIFFBOT_API_URL logging.basicConfig() logger = logging.getLogger(__name__) class Extracter: _url = '' _text = '' def __init__(self, url): self._url = url ...
mit
-6,868,258,579,506,773,000
24.416667
81
0.549727
false
yigitguler/django
django/utils/datastructures.py
17
15984
import copy import warnings from collections import OrderedDict from django.utils import six from django.utils.deprecation import RemovedInDjango19Warning class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed i...
bsd-3-clause
-4,628,845,063,320,184,000
28.274725
107
0.551802
false
abadger/Bento
bento/private/_yaku/yaku/tools/pyext.py
1
16532
import sys import os import copy import distutils import distutils.sysconfig import re import warnings from subprocess \ import \ Popen, PIPE, STDOUT from yaku.task_manager \ import \ topo_sort, build_dag, \ CompiledTaskGen, set_extension_hook from yaku.sysconfig \ import \ ...
bsd-3-clause
-3,239,157,631,129,578,000
30.310606
229
0.570893
false
neskk/PokeAlarm
tools/webhook_test.py
1
12389
import requests import time import sys import json import re import os import portalocker import pickle truthy = frozenset([ "yes", "Yes", "y", "Y", "true", "True", "TRUE", "YES", "1", "!0" ]) whtypes = { "1": "pokemon", "2": "pokestop", "3": "gym", "4": "egg", "5": "raid" } teams = { "0"...
agpl-3.0
-2,479,586,920,499,399,000
30.685422
79
0.514327
false