repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
alanaberdeen/coupled-minimum-cost-flow-track
cmcft/tools/params/c_cost.py
1
2405
# c_cost.py # Cost vector for edges in coupled matrix import numpy as np __all__ = ["c_cost"] def c_cost(g, a_coup, a_vertices): # TODO: think this function is slow. Check for performance increases. # c_cost # creates vector of costs for edges # # Inputs: g - graph structure # ...
mit
-3,617,845,052,523,256,300
23.540816
77
0.50894
false
stylight/python-fastbill
tests/test_api.py
1
6430
#!/usr/bin/env python # encoding: utf-8 import datetime import decimal import httpretty import json import unittest # Set the endpoint to http because some library combination # leads to a SSLError when running the test with httpretty. api_endpoint = "http://automatic.fastbill.com/api/1.0/api.php" api_email = "fastb...
mit
5,063,697,128,748,161,000
32.489583
80
0.487092
false
steffgrez/fast-jsonrpc2
fast_jsonrpc2/resolver.py
1
2183
""" from fast_jsonrpc import JSONRPCResolver def foo(msg) return 'foobar ' + str(msg) router = {'foo': foo} resolver = JSONRPCResolver(router) json_request = {"jsonrpc": "2.0", "method": "foo", "params": ["toto"], "id": 1} json_response = resolver.handle(json_request) print json_response -> {"jsonrpc": "2.0", "...
mit
4,663,643,689,105,370,000
26.2875
79
0.558406
false
ninemoreminutes/django-datatables
test_project/settings.py
1
2955
# Python import os import sys # Django from django.conf import global_settings # Update this module's local settings from the global settings module. this_module = sys.modules[__name__] for setting in dir(global_settings): if setting == setting.upper(): setattr(this_module, setting, getattr(global_setting...
bsd-3-clause
7,971,362,363,779,574,000
23.221311
72
0.598308
false
sfu-fas/coursys
faculty/event_types/career.py
1
27177
import fractions import itertools from django import forms from django.utils.safestring import mark_safe from django.http import HttpResponse from faculty.event_types import fields, search from faculty.event_types.base import BaseEntryForm from faculty.event_types.base import CareerEventHandlerBase from faculty.event...
gpl-3.0
-6,561,575,408,359,670,000
38.732456
155
0.601317
false
ulif/pulp
common/pulp/common/error_codes.py
1
9417
from collections import namedtuple from gettext import gettext as _ Error = namedtuple('Error', ['code', 'message', 'required_fields']) """ The error named tuple has 4 components: code: The 7 character uniquely identifying code for this error, 3 A-Z identifying the module followed by 4 numeric characters for th...
gpl-2.0
3,952,500,558,581,350,000
56.072727
100
0.609642
false
stuart-stanley/RackHD
test/tests/api/v2_0/nodes_tests.py
1
20157
from config.api2_0_config import config from config.amqp import * from modules.logger import Log from modules.amqp import AMQPWorker from modules.worker import WorkerThread, WorkerTasks from on_http_api2_0 import ApiApi as Api from on_http_api2_0 import rest from datetime import datetime from proboscis.asserts import a...
apache-2.0
-2,104,577,647,102,050,300
41.978678
114
0.540904
false
QuincyWork/AllCodes
Python/Codes/Practice/LeetCode/211 Add and Search Word - Data structure design.py
1
1913
 # define const variable _MAX_LETTER_SIZE = 27; _STRING_END_TAG = '#'; class TireNode(object): def __init__(self,x): self.value = x self.childNodes = {} class WordDictionary(object): def __init__(self): """ Initialize your data structure here. """ self.root =...
mit
-8,859,075,159,283,428,000
23.189873
125
0.521193
false
thorwhalen/ut
stats/util.py
1
2022
__author__ = 'thor' from numpy import zeros, argmin, array, unique, where from scipy.spatial.distance import cdist def _df_picker(df, x_cols, y_col): return df[x_cols].as_matrix(), df[[y_col]].as_matrix() def df_picker_data_prep(x_cols, y_col): return lambda df: _df_picker(df, x_cols, y_col) def binomial...
mit
2,205,652,758,375,168,500
32.7
120
0.674085
false
greyshell/linuxJuicer
badchar-detection-automated/badchar-detection-HPNNM-B.07.53.py
1
8764
#!/usr/bin/env python # Description: Identify good and bad chars in HPNNM-B.07.53 # author: greyshell # Script requirements: python 2.7 x86, pydbg 32bit binary, python wmi, pywin32 # Copy pydbg inside C:\Python27\Lib\site-packages\ # Copy pydasm.pyd inside C:\Python27\Lib\site-packages\pydbg\ import os import socket...
mit
5,686,919,584,607,260,000
29.754386
116
0.674464
false
MarxDimitri/schmankerl
schmankerlapp/models.py
1
1505
from django.db import models from django.contrib.auth.models import User # Create your models here. class Restaurant(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='restaurant') name = models.CharField(max_length=500) phone = models.CharField(max_length=500) add...
apache-2.0
687,804,165,970,565,200
35.707317
90
0.706312
false
Fokko/incubator-airflow
airflow/ti_deps/deps/trigger_rule_dep.py
1
9884
# -*- 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 #...
apache-2.0
-311,230,294,439,406,660
43.32287
94
0.563234
false
nexdatas/configserver
test/NXSConfigServer_test.py
1
4015
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gpl-3.0
5,636,351,133,139,023,000
28.740741
77
0.631382
false
walterbender/story
toolbar_utils.py
1
5567
# -*- coding: utf-8 -*- # Copyright (c) 2011, Walter Bender # Port To GTK3: # Ignacio Rodriguez <ignaciorodriguez@sugarlabs.org> # 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 ...
gpl-3.0
-1,535,071,521,111,068,200
32.945122
75
0.659062
false
tbjoern/adventofcode
Thirteen/refined.py
1
2330
import Queue import time import sys if len(sys.argv) > 1: try: seed = int(sys.argv[1]) except ValueError, x: seed = 1600 width, height = 40,41 class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\03...
mit
-4,447,621,782,373,359,000
19.592593
91
0.562661
false
yeleman/health_ident
health_ident/management/commands/export_j2me.py
1
2794
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import os import zipfile from django.conf import settings from optparse import make_option from django.core.management.base import ...
unlicense
8,823,605,234,748,818,000
35.298701
110
0.582319
false
sumihai-tekindo/account_sicepat
add_sub_menu/models/check_id.py
1
1245
from datetime import datetime from openerp.osv import fields,osv from openerp.tools.translate import _ class purchase_requisition_line(osv.osv): _inherit = "purchase.requisition.line" def stock_out(self, cr, uid, ids,stock_out): if self.stock_out: return { 'view_type': 'form', 'flags': {'a...
gpl-3.0
-3,897,940,405,699,393,500
35.787879
191
0.659438
false
nkoep/blaplay
blaplay/formats/wav.py
1
1831
# blaplay, Copyright (C) 2012 Niklas Koep # 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. # This program is distribut...
gpl-2.0
-6,617,483,503,426,571,000
35.62
78
0.677226
false
kaushik94/sympy
sympy/printing/tests/test_rcode.py
7
14176
from sympy.core import (S, pi, oo, Symbol, symbols, Rational, Integer, GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, Eq) from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt, gamma, sign, Max, Min, factorial, beta) from sympy.sets import Range...
bsd-3-clause
-5,326,308,247,995,265,000
27.87169
105
0.482294
false
gplepage/gvar
examples/svdcut.py
1
2303
""" svdcut.py --- Correlations and SVD Cuts This code illustrates the use of SVD cuts when calculating correlations using random samples. See the Case Study in the documentation for more information. """ from __future__ import print_function import numpy as np import gvar as gv try: # may not be installed, in wh...
gpl-3.0
5,101,233,874,259,818,000
40.125
98
0.583152
false
smcoll/django-rules
tests/testsuite/contrib/test_views.py
1
6234
from __future__ import absolute_import from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.http import HttpRequest, Http404 from django.test import TestCase from django.utils.encoding import force_str from rules.contrib.views import objectgetter from testa...
mit
642,590,048,350,649,100
46.587786
87
0.677254
false
alex-ip/agdc
agdc/landsat_ingester/__main__.py
1
2058
#!/usr/bin/env python # =============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
bsd-3-clause
2,366,633,804,520,542,700
49.45
86
0.68999
false
GAMPTeam/vampyre
demos/mlp/randmlp.py
1
3387
# -*- coding: utf-8 -*- """ randmlp: Random MLP class definitions @author: Sundeep """ import numpy as np import pickle """ Randomly generated multilayer perceptron """ class RandomMLP: """ Constructor """ def __init__(self, nin, nhid, nout, sparse_tgt=[]): # Get dimensions self...
mit
-1,413,568,176,545,062,700
25.460938
72
0.459404
false
jlongever/redfish-client-python
on_http_redfish_1_0/models/odata_4_0_0_context.py
1
2489
# coding: utf-8 """ Copyright 2015 SmartBear Software 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
-451,191,449,684,300,100
26.351648
77
0.55685
false
kit-cel/gr-dab
apps/dab_rx_constellation.py
1
6407
#!/usr/bin/env python2 # -*- coding: utf8 -*- # Andreas Müller, 2008 # andrmuel@ee.ethz.ch # # this code may be freely used under GNU GPL conditions """ demodulate DAB signal and ouput to constellation sink """ from gnuradio import gr, uhd, blocks from gnuradio import eng_notation from gnuradio.eng_option import eng...
gpl-3.0
8,074,108,952,524,165,000
38.54321
346
0.685295
false
reliableJARED/python
opencv/video_on_video_overlay_tracked_obj.py
1
4338
''' This code will put a video on a colored object (like a green ball)in the main video stream. It will resize the overlay video on the fly based on big the tracked object is. The code will not work without the file: hist_for_tracking.png that is the 'color calibration' image. The program does allow you to calibrate...
gpl-3.0
-4,845,308,143,406,473,000
35.453782
90
0.638774
false
cosmodesi/snsurvey
src/control.py
1
1120
#!/usr/bin/env python import numpy import sncosmo import scipy.optimize import matplotlib.pyplot as plt model=sncosmo.Model(source='salt2-extended') def f(t ,rlim): # print t, model.bandflux('desr',t, zp = rlim, zpsys='ab') return model.bandflux('desr',t, zp = rlim, zpsys='ab')-1. def controlTime(z,rlim): ...
bsd-3-clause
-1,581,675,154,253,889,500
26.317073
79
0.605357
false
prefetchnta/questlab
bin/x64bin/python/37/Lib/html/parser.py
1
18191
"""A parser for HTML and XHTML.""" # This file is based on sgmllib.py, but the API is slightly different. # 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 tags are special) # a...
lgpl-2.1
-4,034,221,794,916,283,000
36.704255
80
0.490792
false
spedepekka/testdroid-samples
appium/sample-scripts/python/testdroid_android_hybrid.py
1
9582
## ## For help on setting up your machine and configuring this TestScript go to ## http://docs.testdroid.com/appium/ ## import os import time import unittest import subprocess from time import sleep from appium import webdriver from device_finder import DeviceFinder from selenium.common.exceptions import WebDriverExce...
apache-2.0
8,970,575,629,305,151,000
39.09205
108
0.635775
false
aykut/django-oscar
oscar/apps/address/abstract_models.py
1
7907
import zlib from django.db import models from django.utils.translation import ugettext_lazy as _ class AbstractAddress(models.Model): """ Superclass address object This is subclassed and extended to provide models for user, shipping and billing addresses. The only required fields are last_name...
bsd-3-clause
-9,183,936,321,529,190,000
38.143564
108
0.621981
false
glowtree/pybythec
pybythec/__init__.py
1
18150
# -*- coding: utf-8 -*- from pybythec import utils from pybythec.utils import f from pybythec.utils import PybythecError from pybythec.BuildStatus import BuildStatus from pybythec.BuildElements import BuildElements import os import sys import time from threading import Thread log = utils.Logger('pybythec') __author_...
isc
2,476,342,218,496,277,000
29.658784
146
0.638182
false
wasade/qiime
tests/test_core_microbiome.py
1
4217
#!/usr/bin/env python # File created on 08 Jun 2012 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Greg Caporaso" __email__ = "gregcaporaso@gmail.com" from...
gpl-2.0
8,308,714,476,410,311,000
55.986486
908
0.526678
false
git-commit/TardisDiff
TardisDiff.py
1
4981
import sys import os import inspect from PyQt5 import QtWidgets, QtCore, QtGui import plugnplay from uptime import boottime from TardisUtil import TardisOptions, TimeSubmitter class TardisDiff(QtWidgets.QMainWindow): def __init__(self): super(TardisDiff, self).__init__() self.difference = 0 ...
isc
2,382,846,917,862,565,000
35.094203
86
0.656495
false
PPKE-Bioinf/consensx.itk.ppke.hu
consensx/storage/csv.py
1
1205
class CSVBuffer(object): """Class which stores data for values.CSV""" def __init__(self, my_path): self.working_dir = my_path self.max_resnum = -1 self.min_resnum = 100000 self.csv_data = [] def add_data(self, data): self.csv_data.append(data) def write_csv(sel...
mit
8,709,585,037,877,639,000
31.567568
79
0.46971
false
philipgian/pre-commit
pre_commit/make_archives.py
1
2079
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os.path import tarfile from pre_commit import five from pre_commit import output from pre_commit.util import cmd_output from pre_commit.util import cwd from pre_commit.util import rmtree from pr...
mit
-5,814,434,410,959,443,000
27.875
76
0.644541
false
coddingtonbear/d-rats
d_rats/gps.py
1
33132
import re import time import tempfile import platform import datetime import subst import threading import serial import socket from math import pi,cos,acos,sin,atan2 import utils if __name__ == "__main__": import gettext gettext.install("D-RATS") TEST = "$GPGGA,180718.02,4531.3740,N,12255.4599,W,1,07,1.4,...
gpl-3.0
4,689,796,423,073,490,000
28.063158
111
0.489165
false
aoyono/sicpy
Chapter2/exercises/exercise2_76.py
1
1059
# -*- coding: utf-8 -*- """ https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-16.html#%_thm_2.76 """ def run_the_magic(): print(""" In case we add new types to a system with generic operations: 1. in explicit design style, we would need to create a new predicate for each type, ...
mit
-4,016,245,937,390,531,000
35.517241
80
0.621341
false
timlau/yumex
src/poc/test-liststore.py
1
2777
#!/usr/bin/python -tt import gtk import time import gobject import base64 class Dummy: def __init__(self): self.name = 'package' self.ver = '1.0' self.rel = '0.1.fc14' self.arch = 'x86_64' self.summary = "This is a packages" def list_store(model, num=10): for i in xra...
gpl-2.0
-2,058,047,734,032,428,000
33.7125
117
0.616853
false
kirti3192/spoken-website
mdldjango/views.py
1
15036
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.core.context_processors import csrf from models import MdlUser from events.models import TrainingAttendance from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_req...
gpl-3.0
2,444,503,224,367,037,000
41.235955
210
0.60415
false
dedalusj/PaperChase
backend/alembic/env.py
1
2339
from __future__ import with_statement import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig from paperchase.models import * from paperchase.core import db f...
mit
-7,431,257,112,022,274,000
26.197674
76
0.690894
false
IngenuityEngine/arkMath
test/test_helpers.py
1
2374
# Standard modules from expects import * # Our modules import arkInit arkInit.init() import tryout import arkMath from arkMath import Mat44 class test(tryout.TestSuite): title = 'test/test_helpers.py' def is_vector(self): vec = arkMath.Vec(1,2,3,4) self.assertEqual(arkMath.isVector(vec), True) self.assertE...
mit
8,659,748,860,809,815,000
29.831169
115
0.667228
false
leingang/plg
plg/utils/decorators.py
1
1819
#!/usr/bin/env python import logging def debug_entry(f): """ debug the entry into a function >>> import sys >>> import logging The stream configuration is just to make doctests work. In practice, you'd probably want the default stream sys.stderr. >>> logging.basicConfig(lev...
gpl-3.0
2,352,242,054,812,354,000
22.333333
80
0.548103
false
pitrou/numba
numba/targets/arrayobj.py
1
109012
""" Implementation of operations on Array objects and objects supporting the buffer protocol. """ from __future__ import print_function, absolute_import, division import math import llvmlite.llvmpy.core as lc from llvmlite.llvmpy.core import Constant import numpy from numba import types, cgutils, typing from numba....
bsd-2-clause
-1,622,536,346,280,335,400
34.741639
96
0.599943
false
cetygamer/pywinauto
pywinauto/unittests/test_menuwrapper.py
1
6250
# GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or without # ...
bsd-3-clause
-1,208,418,087,928,953,300
40.666667
107
0.66672
false
frombeijingwithlove/dlcv_for_beginners
chap6/bbox_labeling/bbox_labeling.py
1
7575
import os import cv2 from tkFileDialog import askdirectory from tkMessageBox import askyesno WINDOW_NAME = 'Simple Bounding Box Labeling Tool' FPS = 24 SUPPOTED_FORMATS = ['jpg', 'jpeg', 'png'] DEFAULT_COLOR = {'Object': (255, 0, 0)} COLOR_GRAY = (192, 192, 192) BAR_HEIGHT = 16 KEY_UP = 65362 KEY_DOWN = 65364 KEY_LEF...
bsd-3-clause
2,674,751,870,218,334,700
32.223684
116
0.532937
false
teampopong/pokr.kr
alembic/versions/3e683fc1af11_region_id_field_of_meetings_table.py
1
1559
# -*- coding: utf-8 -*- """region_id field of 'meetings' table Revision ID: 3e683fc1af11 Revises: 2f08fb65fe0b Create Date: 2014-05-24 21:31:25.378918 """ from __future__ import unicode_literals # revision identifiers, used by Alembic. revision = '3e683fc1af11' down_revision = '2f08fb65fe0b' from alembic import op...
apache-2.0
-873,324,810,509,578,100
27.722222
89
0.620245
false
Ektorus/bohrium
ve/cpu/tools/locate.py
1
8762
from __future__ import print_function ## 3D Lattice Boltzmann (BGK) model of a fluid. ## D3Q19 model. At each timestep, particle densities propagate ## outwards in the directions indicated in the figure. An ## equivalent 'equilibrium' density is found, and the densities ## relax towards that state, in a proportion gove...
lgpl-3.0
-477,230,179,552,261,200
30.070922
88
0.351518
false
Micronaet/micronaet-mx
sale_discount/model/discount.py
1
4156
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # Original module for stock.move from: # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny...
agpl-3.0
6,720,405,219,061,504,000
34.220339
79
0.568816
false
soulnothing/FlaskReDoc
example/exampleapplication.py
1
3734
import sys import re import json from flask import current_app, render_template, render_template_string from flask import Flask, jsonify from threading import Thread from flaskredoc import ReDoc from werkzeug.wsgi import DispatcherMiddleware from werkzeug.serving import run_simple from werkzeug.debug import DebuggedApp...
mit
8,131,353,653,670,957,000
37.895833
99
0.697108
false
cykl/hprof2flamegraph
stackcollapse_hpl.py
1
8006
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2014, Clément MATHIEU # 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 c...
bsd-2-clause
1,047,224,140,835,399,000
39.226131
168
0.602998
false
AdrienGuille/pyMABED
build_event_browser.py
1
3036
# coding: utf-8 # std import time import argparse import os import shutil # web from flask import Flask, render_template from flask_frozen import Freezer # mabed import mabed.utils as utils __author__ = "Adrien Guille" __email__ = "adrien.guille@univ-lyon2.fr" event_browser = Flask(__name__, static_folder='browser...
mit
-3,382,823,232,691,615,000
34.717647
105
0.553689
false
mganeva/mantid
qt/python/mantidqt/widgets/codeeditor/test/test_multifileinterpreter.py
1
2516
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2017 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + # This file is part of the mantid workbenc...
gpl-3.0
-4,618,802,130,108,384,000
40.933333
87
0.675278
false
matus-stehlik/glowing-batman
base/templatetags/roots_tags.py
1
1874
from django import template from django.core.urlresolvers import reverse from django.conf import settings from django.template.base import TemplateSyntaxError register = template.Library() @register.simple_tag def url_active(request, urls, *args, **kwargs): if request.path in (reverse(url, args=list(*args), kwar...
mit
-6,420,556,990,031,565,000
22.425
78
0.61953
false
nfcharles/python-aws-sign
aws_sign/v4/__init__.py
1
1295
from .. import ServiceConstants class Sigv4ServiceConstants(ServiceConstants): """Logical grouping of Signature Version 4 service constants This class sets the appropriate Signature v4 specific parameters required for signing. """ # Minimum required headers for signature v4 signed requests __R...
mit
-6,848,493,036,127,987,000
37.088235
81
0.484942
false
CognizantOneDevOps/Insights
PlatformAgents/com/cognizant/devops/platformagents/agents/alm/pivotaltracker/PivotalTrackerAgent3.py
1
16890
#------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http:/...
apache-2.0
4,832,219,274,571,249,000
58.055944
139
0.562937
false
lzhjie/benchmark
client_redis.py
1
1166
# coding: utf-8 # Copyright (C) zhongjie luo <l.zhjie@qq.com> import redis from db_bench import DbConnection, multi_process_bench, Options class StrictRedis(DbConnection): def __init__(self, options): super(StrictRedis, self).__init__(options) self.__db = 0 self.__client = None...
mit
9,135,346,619,652,901,000
22.808511
74
0.56518
false
bparzella/secsgem
secsgem/secs/data_items/objid.py
1
1674
##################################################################### # objid.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # This library 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 Foun...
lgpl-2.1
-4,627,299,520,120,166,000
33.875
69
0.61828
false
jaeilepp/mne-python
mne/simulation/tests/test_raw.py
1
13124
# Authors: Mark Wronkiewicz <wronk@uw.edu> # Yousra Bekhti <yousra.bekhti@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import os.path as op import warnings from copy import deepcopy import numpy as np from numpy.testing import assert_allclose, assert_array_equal fro...
bsd-3-clause
-239,478,660,592,898,980
45.211268
79
0.604846
false
CMUSV-VisTrails/WorkflowRecommendation
vistrails/core/cache/utils.py
1
2304
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
bsd-3-clause
1,477,760,557,045,283,600
45.08
79
0.659722
false
a67878813/script
flvrepair.py
1
3480
# coding: utf-8 #2019.11.24 refixed in ubuntu19.10 #使用前需安装yamdi #sudo apt install yamdi #ubuntu 16.04LTS #与win机器mount命令示例: #sudo mount -t cifs -o username="用户名",password="密码",uid=1000 //192.168.2.90/raid5_5-9/直播录像 /mnt2 #若目录不存在,terminal中 #sudo mkdir mnt2 #sudo chown -R linux用户名:linux用户名 mnt2 #使用方法 : #1.修改脚本预计遍历flv的目...
apache-2.0
-2,722,938,224,545,431,000
20.682759
121
0.594148
false
jzawar/highstreet
app.py
1
5268
#!/usr/bin/env python from __future__ import print_function from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError import json import os import re from flask import Flask from f...
apache-2.0
1,609,381,478,073,361,700
35.583333
482
0.656986
false
rcosnita/fantastico
fantastico/routing_engine/__init__.py
1
1176
''' Copyright 2013 Cosnita Radu Viorel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
mit
8,748,253,644,158,708,000
60.947368
126
0.793367
false
pudo/aleph
aleph/tests/test_groups_api.py
1
1170
from aleph.core import db from aleph.model import Role from aleph.views.util import validate from aleph.tests.util import TestCase class GroupsApiTestCase(TestCase): def setUp(self): super(GroupsApiTestCase, self).setUp() self.role = self.create_user(foreign_id='user_1') group = Role.load...
mit
7,372,743,651,423,293,000
38
69
0.623932
false
spoqa/nirum-python
tests/datastructures_test.py
1
4258
import collections import pickle from pytest import raises from nirum.datastructures import List, Map def test_map_init(): assert list(Map()) == [] assert (sorted(Map([('a', 1), ('b', 2)]).items()) == sorted(Map({'a': 1, 'b': 2}).items()) == sorted(Map(Map({'a': 1, 'b': 2})).items())...
mit
-3,196,325,386,247,096,000
26.470968
78
0.546501
false
Salandora/OctoPrint
src/octoprint/server/util/__init__.py
1
6142
# coding=utf-8 from __future__ import absolute_import, division, print_function __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" fr...
agpl-3.0
-1,420,406,611,270,146,000
32.736264
134
0.744788
false
UKTradeInvestment/export-wins-data
mi/tests/test_hvc_views.py
1
42324
import datetime from django.test import TestCase from django.utils.timezone import get_current_timezone from factory.fuzzy import FuzzyChoice from freezegun import freeze_time from django.urls import reverse from django.core.management import call_command from fixturedb.factories.win import create_win_factory from...
gpl-3.0
-5,138,177,416,890,777,000
40.575639
99
0.577568
false
eharney/cinder
cinder/tests/functional/test_volumes.py
1
5004
# Copyright 2011 Justin Santa Barbara # 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
4,194,754,191,102,223,000
38.09375
79
0.635092
false
genzgd/Lampost-Mud
lampmud/mud/chat.py
1
1548
from lampost.gameops.action import ActionError from lampost.di.resource import Injected, module_inject from lampmud.mud.action import mud_action sm = Injected('session_manager') module_inject(__name__) @mud_action('emote', target_class='cmd_str') def emote(source, target): source.broadcast(raw="{}{} {}".format('...
mit
6,273,739,487,291,257,000
35
96
0.662791
false
Lujeni/ansible
lib/ansible/modules/cloud/amazon/cloudfront_invalidation.py
1
10548
#!/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) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['pre...
gpl-3.0
2,975,625,500,619,000,000
36.140845
143
0.664865
false
trustedanalytics/data-catalog
tests/test_query_translation.py
1
16431
# # Copyright (c) 2015 Intel 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 agreed to i...
apache-2.0
1,777,149,651,204,844,000
27.775832
123
0.421581
false
googleapis/googleapis-gen
google/cloud/videointelligence/v1p1beta1/videointelligence-v1p1beta1-py/google/cloud/videointelligence_v1p1beta1/services/video_intelligence_service/transports/grpc_asyncio.py
1
12936
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-4,601,164,260,622,470,700
45.365591
99
0.619125
false
yephper/django
tests/model_options/test_tablespaces.py
1
5517
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.db import connection from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models.tablespaces import ( Article, ArticleRef, Authors, Reviewers, Scientist, ScientistRef, ...
bsd-3-clause
-7,410,635,361,430,300,000
41.101563
79
0.636759
false
bioinform/somaticseq
somaticseq/vcfModifier/modify_JointSNVMix2.py
1
3347
#!/usr/bin/env python3 import argparse import somaticseq.genomicFileHandler.genomic_file_handlers as genome def run(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Variant Call Type, i.e., snp or indel parser.add_argument('-infile', '--input-vcf', type=str...
bsd-2-clause
4,254,031,095,837,364,000
29.990741
142
0.501942
false
faassen/morepath
morepath/tests/test_publish.py
1
8911
import dectate import morepath from morepath.app import App from morepath.publish import publish, resolve_response from morepath.request import Response from morepath.view import render_json, render_html from webob.exc import HTTPNotFound, HTTPBadRequest, HTTPFound, HTTPOk import webob from webtest import TestApp as Cl...
bsd-3-clause
-5,141,796,688,623,529,000
22.574074
78
0.622265
false
phenoxim/nova
nova/notifications/objects/instance.py
1
25085
# 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 # d...
apache-2.0
-2,227,258,545,918,772,700
38.880763
79
0.673351
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/distutils/command/check.py
1
5369
"""distutils.command.check Implements the Distutils 'check' command. """ __revision__ = "$Id: check.py 85197 2010-10-03 14:18:09Z tarek.ziade $" from distutils.core import Command from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docuti...
mit
-768,187,753,055,831,900
36.284722
78
0.575899
false
cbrunker/quip
lib/Handlers.py
1
11422
# # Response handlers for P2P Server # import asyncio import logging from functools import partial from hashlib import sha1, sha384 from uuid import uuid4 from os import path from lib.Database import getFriendRequests, getSigningKeys, setUidMask, storeAuthority, setFriendAuth, getMessageKeys, \ setAddress, getFil...
gpl-3.0
8,537,975,647,144,394,000
35.492013
127
0.651112
false
t-hey/QGIS-Original
python/plugins/processing/algs/qgis/ExtendLines.py
1
2995
# -*- coding: utf-8 -*- """ *************************************************************************** ExtendLines.py -------------------- Date : October 2016 Copyright : (C) 2016 by Nyall Dawson Email : nyall dot dawson at gmail dot com ******************...
gpl-2.0
7,437,769,807,170,386,000
36.4375
100
0.535225
false
studywolf/blog
InvKin/Arm.py
1
7959
''' Copyright (C) 2013 Travis DeWolf This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope t...
gpl-3.0
4,691,724,446,632,460,000
34.373333
79
0.547305
false
Mansilla1/Sistema-SEC
apps/usuarios/views.py
1
14404
#!/usr/bin/env python # -*- coding: utf-8 -*- # Código desarrollado por Daniel Mansilla from django.shortcuts import render, render_to_response, redirect from django.views.generic import ListView, CreateView, DetailView, DeleteView, UpdateView, TemplateView from django.http import HttpResponse, HttpResponseRedirect, Ht...
apache-2.0
1,000,900,255,023,441,300
29.313684
156
0.682317
false
svenstaro/python-web-boilerplate
boilerplateapp/models/user.py
1
2930
"""Module containing the `User` model.""" import uuid import secrets import string from datetime import datetime from sqlalchemy.dialects.postgresql import UUID from sqlalchemy_utils.models import Timestamp from flask import current_app from boilerplateapp.extensions import db, passlib class User(db.Model, Timesta...
mit
2,480,630,203,031,518,700
35.17284
94
0.646075
false
mattclarkdotnet/haleasy
test/test_haltalk.py
1
4074
from unittest import TestCase from haleasy import HALEasy import responses class TestHaleasyHaltalk(TestCase): haltalk_root = '''{ "_links": { "self": { "href":"/" }, "curies": [ { "name": "ht", "hr...
mit
1,266,185,808,340,458,200
37.084112
105
0.500982
false
fdslight/fdslight
pywind/web/handlers/websocket.py
1
8933
#!/usr/bin/env python3 import pywind as tcp_handler import pywind.web.lib.websocket as websocket import pywind.web.lib.httputils as httputils import socket, time class ws_listener(tcp_handler.tcp_handler): def init_func(self, creator, listen, is_ipv6=False): if is_ipv6: fa = socket.AF_INET6 ...
bsd-2-clause
-8,273,594,278,908,964,000
25.149254
116
0.545953
false
johren/RackHD
test/tests/redfish10/test_redfish10_api_systems.py
1
17067
''' Copyright 2016, EMC, Inc. Author(s): George Paulos ''' import fit_path # NOQA: unused import import os import sys import subprocess import fit_common import flogging log = flogging.get_loggers() # Local methods NODECATALOG = fit_common.node_select() def _delete_active_tasks(node): for dummy in range(1,10...
apache-2.0
-1,922,357,574,213,929,200
57.05102
144
0.564716
false
broomyocymru/ditto
ditto/core/cache.py
1
1389
import glob import os import shutil import uuid from os.path import expanduser import requests from ditto.core import logger def setup(): global session_uuid session_uuid = str(uuid.uuid1()) def cleanup(): shutil.rmtree(get_cache_dir(), True) def get_session_uuid(): return session_uuid def get...
mit
-2,744,009,419,647,377,400
21.419355
78
0.587473
false
yuanming-hu/taichi
tests/python/test_bitmasked.py
1
4777
import taichi as ti def archs_support_bitmasked(func): return ti.archs_excluding(ti.opengl, ti.cc)(func) @archs_support_bitmasked def test_basic(): x = ti.field(ti.i32) c = ti.field(ti.i32) s = ti.field(ti.i32) bm = ti.root.bitmasked(ti.ij, (3, 6)).bitmasked(ti.i, 5) bm.place(x) ti.root...
mit
2,388,788,574,790,093,000
18.577869
79
0.528365
false
jemofthewest/GalaxyMage
src/Sound.py
1
2427
# Copyright (C) 2005 Colin McMillen <mcmillen@cs.cmu.edu> # # This file is part of GalaxyMage. # # GalaxyMage 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 opti...
gpl-2.0
-3,338,352,428,866,749,400
23.765306
70
0.679852
false
JohanComparat/pySU
galaxy/python/lineListAir.py
1
4082
""" Script loading the atomic properties from the pyNEB package. Mostly line transitions. Input to the line fitting procedures """ import numpy as n from scipy.interpolate import interp1d import pyneb as pn # Conversion from Morton (1991, ApJS, 77, 119) wavelength in Angstrom # SDSS spectra are in the vacuum, ther...
cc0-1.0
-7,262,391,922,114,196,000
31.141732
101
0.715091
false
black-knight/magic_lamp
Server/src/board/markers/marker.py
1
2739
import cv2 from board.board_descriptor import BoardDescriptor class Marker(object): def __init__(self, marker_id): """ :param marker_id: Marker ID """ self.marker_id = marker_id def preferred_input_image_resolution(self): """ Returns the preferred input resolu...
apache-2.0
6,870,595,627,794,209,000
31.607143
107
0.56517
false
JulyJ/MindBot
mindbot/router.py
1
2824
""" Module designed to route messages based on strategy pattern. This module includes class mapper tuple to correlate received from telegram user command with target command class to run. Additionally, this module generates help message based on command list. """ from typing import Any, Dict from .co...
mit
-6,548,554,171,890,835,000
37.684932
87
0.695467
false
althalus/knotcrafters
knotdirectory/knotdirectory/knots/models.py
1
2886
from django.db import models from taggit.managers import TaggableManager from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth import get_user_model User = get_user_model() class Knot(models.Mo...
mit
-6,894,886,796,592,600,000
37.48
120
0.682259
false
LogikSim/LogikSimPython
src/debug/pyside_bugs/nonimplemented_virtual_methods.py
1
1739
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright 2014 The LogikSim Authors. All rights reserved. Use of this source code is governed by the GNU GPL license that can be found in the LICENSE.txt file. Nonimplemented virtual methods can lead to event handling Problems. Run the script as it is and you will observ...
gpl-3.0
7,154,451,987,703,996,000
22.186667
77
0.677976
false
JMMolenaar/cadnano2.5
cadnano/document.py
1
19668
#!/usr/bin/env python # encoding: utf-8 from operator import itemgetter import cadnano.util as util import cadnano.preferences as prefs from cadnano.cnproxy import ProxyObject, ProxySignal from cadnano.cnproxy import UndoStack, UndoCommand from cadnano.strand import Strand from cadnano.oligo import Oligo from cadna...
mit
5,810,336,417,466,848,000
35.831461
102
0.552725
false
CrystallineEntity/bulbs
bulbs/views/home.py
1
1916
from pyramid.view import view_config from bulbs.components.subcategory import number_of_threads, number_of_posts, last_post from bulbs.components import db def catinfo(cat): keys = "id", "title", "desc", "slug" keys_values = zip(keys, cat) return dict(keys_values) def categories(): """Return a dict c...
mit
-4,394,526,757,759,784,400
32.034483
102
0.634134
false
repotvsupertuga/tvsupertuga.repository
script.module.cryptolib/lib/Crypto/PublicKey/RSA.py
1
2753
#!/usr/bin/env python from __future__ import absolute_import import binascii import struct from rsa import PublicKey, PrivateKey from Crypto.Math.Numbers import Integer def import_key(extern_key, passphrase=None): """Import an RSA key (public or private half), encoded in standard form. :Parameter extern_...
gpl-2.0
2,940,562,159,866,837,000
33.848101
74
0.631311
false
fatcloud/PyCV-time
experiments/stop_motion_tool/stop_motion_tool.py
1
1533
from cam import OpenCV_Cam import cv2 import os.path import time cam = OpenCV_Cam(0) cam.size = (1920, 1080) KEY_ESC = 27 KEY_SPACE = ord(' ') PAGE_DOWN = 2228224 # This make the stop motion to be controllable by presenter. prevFrame = None i = 0 #Make a directory on current working directory with date and time a...
mit
5,548,077,770,134,502,000
24.131148
88
0.641879
false
googleapis/googleapis-gen
google/cloud/translate/v3beta1/translation-v3beta1-py/google/cloud/translate_v3beta1/types/__init__.py
1
2684
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-8,703,619,056,856,148,000
27.553191
74
0.742548
false
jtpereyda/boofuzz
boofuzz/primitives/bit_field.py
1
6982
import struct from builtins import range import six from past.builtins import map from .. import helpers from ..constants import LITTLE_ENDIAN from ..fuzzable import Fuzzable def binary_string_to_int(binary): """ Convert a binary string to a decimal number. @type binary: str @param binary: Binary ...
gpl-2.0
3,794,698,004,206,549,500
33.564356
120
0.574048
false
ubyssey/dispatch
dispatch/tests/test_core.py
1
1743
from django.test import TestCase from dispatch.modules.integrations import BaseIntegration class IntegrationTestCase(TestCase): class TestIntegration(BaseIntegration): ID = 'test-integration' HIDDEN_FIELDS = [ 'setting_d' ] def test_integration_returns_empty_settings(sel...
gpl-2.0
-5,843,173,825,848,535,000
30.690909
82
0.653471
false
mtils/ems
ems/qt/richtext/char_format_actions.py
1
6238
from ems.qt import QtWidgets, QtCore, QtGui from ems.qt.richtext.char_format_proxy import CharFormatProxy Qt = QtCore.Qt QObject = QtCore.QObject QColor = QtGui.QColor QAction = QtWidgets.QAction QKeySequence = QtGui.QKeySequence QFont = QtGui.QFont QIcon = QtGui.QIcon QPixmap = QtGui.QPixmap ThemeIcon = QIcon.fromTh...
mit
4,689,382,300,073,918,000
32.543011
97
0.648124
false