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
biocyberman/bcbio-nextgen
bcbio/variation/joint.py
1
12850
"""Joint variant calling with multiple samples: aka squaring off, or backfilling. Handles the N+1 problem of variant calling by combining and recalling samples previously calling individually (or in smaller batches). Recalls at all positions found variable in any of the input samples within each batch. Takes a general...
mit
366,839,370,172,717,800
48.045802
115
0.61572
false
nazcahawk/my-machine-learning-journey
Algorithms/Resampling Methods/resampling-methods.py
1
1839
import pandas as pd from sklearn import model_selection from sklearn.linear_model import LogisticRegression def loadData(): col_names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class'] dataframe = pd.read_csv("./pima-indians-diabetes.data.txt", names = col_names) array = dataframe.v...
gpl-3.0
7,304,567,308,098,086,000
31.280702
113
0.664492
false
srio/shadow3-scripts
fresnel_zone_plate.py
1
5456
""" Example of how to trace a Fresnel Zone Plate by Lucia Alianelli and Manuel Sanchez del Rio. 1) The source is from get_beam(), is a collimated source of squared cross section (800 microns), monochromatic (1.54 A) 2) fresnel_zone_plane() calculates a fzp, centered at (0,0). It returns a new shadow3 beam cont...
mit
-3,930,223,089,856,317,000
25.362319
111
0.60099
false
OpusVL/odoo
addons/point_of_sale/point_of_sale.py
1
75451
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
7,864,355,358,685,735,000
49.808754
240
0.565678
false
Cargill/pipewrench
pipewrench/merge.py
1
16741
# Copyright 2017 Cargill Incorporated # # 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 ...
apache-2.0
1,934,122,254,740,587,800
34.847966
99
0.620393
false
cwi-dis/igor
igor/std-plugins/watchdog/igorplugin.py
1
1949
"""Linux kernel watchdog support""" import time import _thread class WatchdogClass: _singleton = None def __init__(self): self.watchdog_device = None self.watchdog_timeout = 60 self.stop_feeding = time.time() + self.watchdog_timeout WatchdogClass._singleton = self ...
mit
5,609,317,664,189,174,000
32.603448
88
0.583889
false
koadman/proxigenomics
graph/src/hic.py
1
5674
import vcf # # Simple method to count the number of records in a # VCF file. This is useful for providing progress on # very large runs. # def count_vcf_records(fname): return len([rec for rec in vcf.Reader(filename=fname)]) # # Represents the placement of a read within an # assembly or mapping. # class ReadPlac...
gpl-2.0
-4,197,486,720,476,214,000
26.278846
115
0.602573
false
akrzos/cfme_tests
cfme/tests/services/test_provision_stack.py
1
11089
import pytest import fauxfactory from cfme.configure.settings import set_default_view from cfme.services.catalogs.catalog_item import CatalogItem from cfme.services.catalogs.catalog import Catalog from cfme.services.catalogs.orchestration_template import OrchestrationTemplate from cfme.services.catalogs.service_catalo...
gpl-2.0
4,501,052,800,297,151,000
35.476974
99
0.663811
false
UMUNC/UMUNC
umunc_iris/view.py
1
12946
#coding=utf-8 import string, random, time from django.http import HttpResponseRedirect,HttpResponse,Http404 from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login,logout from...
gpl-2.0
4,903,219,674,929,317,000
36.201166
619
0.689185
false
the-gigi/book-tracker
models.py
1
1370
from datetime import datetime from sqlalchemy import (Column, DateTime, ForeignKey, Integer, String, Boolean, Index) from sqlalchemy.ext.declarative import declarative_base fr...
mit
-6,815,357,815,406,935,000
29.466667
85
0.629927
false
gr-vt/gr-message_tools
python/__init__.py
1
1818
# # Copyright 2008,2009 Free Software Foundation, Inc. # # This application 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, or (at your option) # any later version. # # This application is di...
gpl-3.0
8,796,432,004,257,260,000
32.666667
74
0.640264
false
timgraham/django-cms
cms/tests/test_cache.py
1
37950
# -*- coding: utf-8 -*- import time from django.conf import settings from django.template import Context from sekizai.context import SekizaiContext from cms.api import add_plugin, create_page, create_title from cms.cache import _get_cache_version, invalidate_cms_page_cache from cms.cache.placeholder import ( _g...
bsd-3-clause
-522,265,872,571,076,540
44.178571
137
0.614493
false
zstackio/zstack-woodpecker
integrationtest/vm/multihosts/vm_snapshots/paths/xsky_path8.py
1
1641
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=8, path_list=[ [TestAction.create_vm, 'vm1', ], [TestAction.create_volume, 'volume1', 'flag=scsi'], [TestAction.attach_volume, 'vm1', 'volume1'], ...
apache-2.0
4,953,529,768,538,772,000
36.295455
185
0.691651
false
ckelly/django-resume
resume/migrations/0001_initial.py
1
4894
# Generated by Django 2.0.2 on 2018-02-17 04:59 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Accomplishment', fields=[ ...
mit
9,172,293,473,632,564,000
40.82906
135
0.519207
false
davisd50/sparc.utils
sparc/utils/requests/request.py
1
1507
import requests import warnings from zope.component import getSiteManager from zope.component.factory import Factory from zope.interface import implementer from zope.interface import implements from zope.schema.fieldproperty import FieldProperty from interfaces import IRequest from sparc.entity.entity import BaseSchema...
mit
2,045,606,421,133,598,000
36.7
72
0.71931
false
Balannen/LSMASOMM
atom3/Kernel/GraphGrammar/GGLListRule1.py
1
4090
# _ GGLlistRule1.py ______________________________________________________ # Simple Graph Grammar rule for inserting an element in the list # _______________________________________________________________________ from GGrule import * from ASG_LinkedListMM import * from Element import * from B...
gpl-3.0
-3,004,780,335,116,040,000
41.978495
101
0.620293
false
yujikato/DIRAC
src/DIRAC/Resources/Computing/InProcessComputingElement.py
1
4486
######################################################################## # File : InProcessComputingElement.py # Author : Stuart Paterson ######################################################################## """ The simplest of the "inner" CEs (meaning it's used by a jobAgent inside a pilot) A "InProcess" CE...
gpl-3.0
-1,801,642,850,830,887,200
34.888
104
0.600981
false
RetailMeNot/acky
setup.py
1
1085
from __future__ import print_function from setuptools import setup, find_packages from acky import __version__ import sys if sys.version_info <= (2, 7): error = "ERROR: acky requires Python 2.7 or later" print(error, file=sys.stderr) sys.exit(1) with open('README.rst') as f: long_description = f.read(...
mit
-6,813,822,627,591,228,000
27.552632
54
0.609217
false
HazyResearch/metal
metal/multitask/mt_label_model.py
1
4032
import numpy as np from scipy.sparse import issparse from metal.label_model import LabelModel from metal.label_model.lm_defaults import lm_default_config from metal.multitask import MTClassifier from metal.multitask.task_graph import TaskGraph from metal.utils import recursive_merge_dicts class MTLabelModel(MTClassi...
apache-2.0
-7,107,710,309,165,409,000
37.037736
80
0.563244
false
unioslo/cerebrum
contrib/statistics/generate_manual_affiliations_report.py
1
10311
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016-2018 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
gpl-2.0
8,576,409,972,899,144,000
33.37
79
0.586364
false
bally12345/enigma2
lib/python/Components/Converter/ServiceOrbitalPosition.py
1
1396
# -*- coding: utf-8 -*- from Components.Converter.Converter import Converter from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr from Components.Element import cached class ServiceOrbitalPosition(Converter, object): FULL = 0 SHORT = 1 def __init__(self, type): Converter.__init__(self, t...
gpl-2.0
-5,284,013,900,266,894,000
27.489796
83
0.695559
false
nanjj/softlayer-python
SoftLayer/CLI/vpn/ipsec/translation/add.py
1
1533
"""Add an address translation to an IPSEC tunnel context.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment # from SoftLayer.CLI.exceptions import ArgumentError # from SoftLayer.CLI.exceptions import CLIHalt @click.command() @click.argument('contex...
mit
271,850,128,478,966,880
33.840909
73
0.60013
false
polarmobile/polar.paywall.test
src/polar/paywall/test/schemas.py
1
3096
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Polar Mobile. # 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 # ...
bsd-3-clause
-1,451,032,653,089,704,400
31.25
78
0.57655
false
jouvin/release
src/documentation_builder/lib/quattordocbuild/sourcehandler.py
1
3530
""" Module to handle 'source' related actions. It contains functions to run maven clean and compile, scan a whole tree for files and find '.pan' files and perl files, where when there is a duplicate between '.pod' and '.pl', the pod file has the preference. """ import os from vsc.utils import fancylogger from vsc.ut...
apache-2.0
-4,200,295,582,493,911,000
28.416667
81
0.609065
false
jesboat/fbthrift
thrift/lib/py/server/TAsyncioServer.py
1
9957
# @lint-avoid-pyflakes2 # @lint-avoid-python-3-compatibility-imports import asyncio import functools import logging from io import BytesIO import struct import warnings from .TServer import TServer, TServerEventHandler, TConnectionContext from thrift.Thrift import TProcessor from thrift.transport.TTransport import TM...
apache-2.0
-2,799,939,794,218,665,500
30.213166
79
0.626092
false
lutris/lutris
lutris/runners/jzintv.py
1
2783
# Standard Library import os from gettext import gettext as _ # Lutris Modules from lutris.runners.runner import Runner from lutris.util import system class jzintv(Runner): human_name = _("jzIntv") description = _("Intellivision Emulator") platforms = [_("Intellivision")] runner_executable = "jzintv/...
gpl-3.0
-984,113,275,935,674,000
31.360465
70
0.483651
false
Paul-St-Young/QMC
gamess_analyze.py
1
1909
#!/usr/bin/env python """ GAMESS output analysis script Author: Paul Young Last Modified: July 28 2014 """ ENTRIES=["TOTAL ENERGY =", "FINAL MCSCF ENERGY IS","COMPUTING THE HAMILTONIAN FOR"] import sys class GAMESS: def __init__(self,gmsout): self.gmsout = gmsout def grab(self,entry,line): # prints out the ...
mit
3,760,194,635,565,968,400
23.474359
83
0.618649
false
bboot/doorman
action.py
1
16021
# Copyright 2017 Google 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 writing, ...
apache-2.0
2,543,621,096,917,283,000
33.904139
100
0.59216
false
demisto/content
Packs/IntSight/Integrations/IntSight/IntSight.py
1
45839
from CommonServerPython import * import os URL = demisto.getParam('server') if URL[-1] != '/': URL += '/' if not demisto.getParam('proxy'): del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY'] del os.environ['http_proxy'] del os.environ['https_proxy'] VALIDATE_CERT = not demisto.params().g...
mit
2,684,224,134,671,546,400
38.721837
122
0.599031
false
roymno2/mmd_material_searcher
search_run.py
1
3905
#! -*-coding=gbk-*- import os import subprocess import sys import commands import time def walk_in_dir(root_path): assd="" try: for root, dirs, files in os.walk(root_path, True): for name in files: if len(name)>0: if name[0]!="$": ...
cc0-1.0
4,331,324,545,141,451,300
34.18018
96
0.400256
false
wpoa/wiki-imports
lib/python2.7/site-packages/mwparserfromhell/wikicode.py
1
27082
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2014 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
gpl-3.0
-7,413,086,825,576,524,000
45.451115
79
0.59226
false
mobarski/sandbox
kdb/kdb2.py
1
2477
import sqlite3 def sanitize(x): return x class KDB: def __init__(self,db): self.db = db # def create(self,*keys): for key in keys: key = sanitize(key) self.execute('create table if not exists {} (k primary key) without rowid'.format(key)) def drop(self,*keys): for key in keys: key = sanitize(key) ...
mit
-7,873,545,486,563,843,000
28.152941
99
0.625353
false
anandha2017/udacity
nd101 Deep Learning Nanodegree Foundation/DockerImages/11_miniflow/06_cost/notebooks/miniflow.py
1
4894
import numpy as np class Node(object): """ Base class for nodes in the network. Arguments: `inbound_nodes`: A list of nodes with edges into this node. """ def __init__(self, inbound_nodes=[]): """ Node's constructor (runs when the object is instantiated). Sets pro...
mit
4,252,226,177,772,334,600
26.340782
118
0.548835
false
madformuse/api
api/oauth.py
1
2374
from api import * from datetime import datetime # OAuth2 resource mapping def current_user(): try: if 'id' in session: uid = int(session['id']) return User.get(User.id == uid) except ValueError: pass return None @oauth.usergetter def user_get(username, password, c...
gpl-3.0
2,845,156,840,187,432,000
27.60241
76
0.625105
false
odeke-em/ldappy
ldapUsage/constants.py
1
1852
# Author: Emmanuel Odeke <odeke@ualberta.ca> # Resource file for constants import sys ############################CONSTANTS#################################### UALBERTA_DOMAIN_KEY = "ualberta.ca" DATE_KEY = "date" LAST_NAME_KEY = "lastname" FIRST_NAME_KEY = "firstname" SPEED_CODE_KEY = "speedCode" #code for acco...
mit
6,495,661,489,442,663,000
26.235294
79
0.714903
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_available_private_endpoint_types_operations.py
1
9206
# 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 may ...
mit
-666,279,864,695,155,500
47.968085
210
0.640126
false
psycane/django-calendar
scheduler/views.py
1
21376
from .models import Event import calendar import datetime from django.conf import settings from django.db.models import Q from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.shortcuts import render from django.template.defaulttags import register from django.template.loader import render_t...
mit
8,058,490,695,554,118,000
39.56167
142
0.484328
false
tobast/sysdig-full
processor/main.py
1
4370
#!/usr/bin/python3 # -*- coding: utf-8 -*- import alu import flags import op1processor import op2processor import opcodeGetter import registers import memory_unit import result_selector import constants from netlist import * ENABLE_DEBUG = False def show(pin, name): if ENABLE_DEBUG: push_context(name) o = fresh...
gpl-3.0
2,248,279,515,306,278,700
23.550562
76
0.702746
false
scott-maddox/fdint
scripts/gen__dgfd_pxd.py
1
1365
# Copyright (c) 2015, Scott J Maddox. All rights reserved. # Use of this source code is governed by the BSD-3-Clause # license that can be found in the LICENSE file. import os import sys fpath = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fdint/_dgfd.pxd')) with ope...
bsd-3-clause
-6,445,373,933,480,000,000
41.6875
85
0.484982
false
lliendo/Radar
radar/launcher/__init__.py
1
3723
# -*- coding: utf-8 -*- """ This file is part of Radar. Radar 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 3 of the License, or (at your option) any later version. Radar is distributed ...
lgpl-3.0
994,298,448,291,494,300
32.241071
131
0.656728
false
Pointedstick/ReplicatorG
skein_engines/skeinforge-44/fabmetheus_utilities/geometry/manipulation_paths/segment.py
1
6682
""" Add material to support overhang or remove material at the overhang angle. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ from fabmetheus_utili...
gpl-2.0
-8,035,484,972,065,297,000
42.109677
157
0.776115
false
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_xmlrpc.py
1
54857
import base64 import datetime import decimal import sys import time import unittest from unittest import mock import xmlrpc.client as xmlrpclib import xmlrpc.server import http.client import http, http.server import socket import threading import re import io import contextlib from test import support try: import ...
gpl-2.0
4,183,801,788,228,334,000
37.982219
87
0.607236
false
googleapis/python-aiplatform
google/cloud/aiplatform_v1/types/model.py
1
32277
# -*- 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
3,624,728,981,931,930,600
52
126
0.649193
false
dayatz/taiga-back
taiga/base/api/views.py
1
18548
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
agpl-3.0
5,930,852,295,475,852,000
36.54251
112
0.647094
false
johnnykv/mnemosyne
normalizer/modules/kippo_events.py
1
2086
# Copyright (C) 2012 Johnny Vestergaard <jkv@unixcluster.dk> # # 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 ...
gpl-3.0
7,506,185,033,417,648,000
34.355932
67
0.603068
false
QuLogic/meson
mesonbuild/compilers/swift.py
1
4808
# Copyright 2012-2017 The Meson development team # 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
4,217,364,798,761,059,300
36.858268
121
0.619592
false
ambimorph/recluse
recluse/nltk_based_segmenter_tokeniser.py
1
8330
# nltk_based_segmenter_tokeniser.py import nltk import regex, sys, codecs, unicodedata, string from recluse import utils def subtokenise(token, abbreviation_list=[]): """ Returns a tuple of disjoint, non-overlapping substrings that cover the token string. Subtokens are determined as follows: All...
agpl-3.0
-7,891,212,064,563,186,000
36.522523
130
0.623409
false
bit-jmm/ttarm
nmf/nmf.py
1
3289
# -*- coding: utf-8 -*- # gaussian-nmf import math import numpy as np # import scipy.sparse as sp from sys import float_info import logging class NMF(object): # ランダム疎行列 # def convert_sparse_matrix(self, data): # s1, s2 = data.shape # if s1 == 3: # data = data.T # vals = data[:,...
gpl-2.0
-8,254,493,147,447,400,000
25.398305
107
0.463884
false
atwoz/vimeko
sources_non_forked/syntastic-extras/syntax_checkers/cfg/cfg.py
1
3007
#!/usr/bin/env python """Check config file syntax.""" try: import configparser except ImportError: import ConfigParser as configparser import re import sys try: import configobj except ImportError: configobj = None def check_configobj(filename): """Check file using configobj. Return list ...
mit
6,438,492,801,272,342,000
24.700855
78
0.584968
false
blowmage/gcloud-ruby
google-cloud-monitoring/synth.py
1
3174
# Copyright 2018 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 agreed to in writing, s...
apache-2.0
-7,843,847,575,345,364,000
32.0625
119
0.647763
false
MeganCFord/ClosetSkels
capstone/halloween/models.py
1
2284
from django.db import models from django.utils import timezone class Costume(models.Model): owner=models.ForeignKey('auth.User', on_delete=models.CASCADE, related_name ="costumes") name=models.CharField(max_length=55) description=models.CharField(max_length=1000, blank=True) public=models.BooleanField...
mit
-3,543,358,805,283,569,700
35.253968
114
0.668126
false
lefthandedroo/Cosmo-models
Models/da_distrib-histogram.py
1
6439
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Feb 13 11:45:04 2019 @author: BallBlueMeercat This script runs through models, noise on data and dataset size options to collect the distribution of angular diameter distance assosiated with each, then plots these distributions as scatter and as a norm...
mit
-8,585,168,642,844,225,000
37.106509
142
0.544184
false
ameihm0912/MozDef
tests/lib/query_models/query_test_suite.py
1
1774
#!/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/. # Copyright (c) 2017 Mozilla Corporation # # Contributors: # Brandon Myers bmyers@mozilla.com imp...
mpl-2.0
525,544,195,609,790,340
33.784314
75
0.61274
false
hipnusleo/laserjet
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/test_ciphers.py
1
4039
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import binascii import pytest from cryptography.exceptions im...
apache-2.0
2,308,280,494,394,163,000
27.918519
79
0.588017
false
smlacombe/sageo
app/model/columns/column_painter_last_event.py
1
1616
# # Copyright (C) 2013 Savoir-Faire Linux Inc. # # This file is part of Sageo # # Sageo 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 optio...
gpl-3.0
4,463,876,406,926,093,300
36.581395
83
0.69802
false
bing-ads-sdk/BingAds-Python-SDK
bingads/v12/internal/bulk/stream_reader.py
1
3214
from .bulk_object import _BulkObject from .format_version import _FormatVersion from .object_reader import _BulkObjectReader from bingads.internal.error_messages import _ErrorMessages class _BulkStreamReader(): """ Reads a bulk object and also its related data (for example corresponding errors) from the stream.""...
mit
-6,590,556,094,682,769,000
32.134021
109
0.610765
false
Elbertbiggs360/buckelist-api
app/api/v1/item.py
1
6607
from flask import Blueprint, request, jsonify, g from flask_restplus import abort, Resource, fields, Namespace, marshal_with from app.models.item import Item from app.models.bucketlist import Bucketlist from app.utils.utilities import auth item_api = Namespace( 'bucketlists', description='A bucketlist item manipul...
mit
-1,902,331,470,830,739,000
43.342282
103
0.608143
false
emilsvennesson/script.module.inputstreamhelper
tests/xbmcvfs.py
1
2936
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """This file implements the Kodi xbmcvfs module, either using stubs or alternative functionality""" # flake8: noqa: FI14; pylint: disable=i...
mit
2,583,302,668,208,595,500
29.268041
100
0.645095
false
jpvanhal/cloudsizzle
cloudsizzle/scrapers/noppa/spiders/tests.py
1
9233
# -*- coding: utf-8 -*- # # Copyright (c) 2009-2010 CloudSizzle Team # # 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, #...
mit
6,771,890,846,566,697,000
40.59009
80
0.673671
false
cernanalysispreservation/analysis-preservation.cern.ch
cap/modules/repos/errors.py
3
3242
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2018 CERN. # # CERN Analysis Preservation Framework 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...
gpl-2.0
-5,198,789,454,273,908,000
35.022222
78
0.656693
false
edx/ease
ease/create.py
1
5704
""" Functions that create a machine learning model from training data """ import os import sys import logging import numpy #Define base path and add to sys path base_path = os.path.dirname(__file__) sys.path.append(base_path) one_up_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..//')) sys.path.appe...
agpl-3.0
-6,518,942,980,891,145,000
37.802721
131
0.660589
false
karoraw1/xMetaPipeline
bin/measure_euclidean_dists.py
1
4990
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Aug 17 13:51:26 2017 @author: login """ import pandas as pd from otu_ts_support import parseBiosample import numpy as np from scipy.spatial.distance import pdist from scipy.spatial.distance import squareform original_bins = ["Bin_52", "Bin_46", "Bin_23...
bsd-2-clause
-4,140,844,667,451,682,000
34.397163
89
0.601202
false
ArchiveTeam/googlecode-grab
pipeline.py
1
11533
# encoding=utf8 import datetime from distutils.version import StrictVersion import hashlib import os.path import random from seesaw.config import realize, NumberConfigValue from seesaw.item import ItemInterpolation, ItemValue from seesaw.task import SimpleTask, LimitConcurrent from seesaw.tracker import GetItemFromTrac...
unlicense
-2,357,863,513,384,041,000
38.632302
200
0.593861
false
realizeapp/realize-core
core/web/user_views.py
1
3317
from flask import Blueprint, request, jsonify, current_app from flask.ext.security import login_required from flask.ext.login import current_user from flask_wtf import Form from flask.views import MethodView from wtforms import TextField from wtforms_json import MultiDict from core.plugins.lib.views.forms import JSONMi...
agpl-3.0
-7,919,639,812,747,500,000
33.552083
122
0.514622
false
abarisain/mopidy
mopidy/mpd/protocol/audio_output.py
1
1177
from __future__ import unicode_literals from mopidy.mpd.exceptions import MpdNoExistError from mopidy.mpd.protocol import handle_request @handle_request(r'disableoutput\ "(?P<outputid>\d+)"$') def disableoutput(context, outputid): """ *musicpd.org, audio output section:* ``disableoutput`` T...
apache-2.0
-5,834,711,902,576,035,000
22.078431
62
0.615973
false
HackerEarth/cassandra-python-driver
cassandra/io/twistedreactor.py
1
8375
# Copyright 2013-2015 DataStax, 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 writi...
apache-2.0
152,441,721,305,304,320
31.335907
79
0.622806
false
dsimandl/teamsurmandl
deploy_tools/fabfile.py
1
3792
from fabric.contrib.files import append, exists, sed from fabric.api import local, env, cd, run from fabric.colors import green, red REPO_URL = "https://github.com/dsimandl/teamsurmandl.git" def backup(): local('git pull') print("Enter files you want to add, or just press return for all files") files = ra...
mit
-6,718,033,075,787,943,000
43.611765
114
0.671941
false
andresailer/lcgeo
DDSim/DDSim/Helper/ConfigHelper.py
1
3620
"""Helper object to identify configuration parameters so we can easily overwrite them via command line magic or via the steering file To add additional arguments create either a member variable or a property to a subclass of the ConfigHelper. To add additional arguments to the add_argument call for the parser object c...
gpl-3.0
-3,972,353,452,196,389,000
31.612613
111
0.614365
false
HazyResearch/metal
tests/metal/end_model/test_loss.py
1
3053
import unittest import torch import torch.nn as nn from metal.end_model.loss import SoftCrossEntropyLoss from metal.utils import pred_to_prob class LossTest(unittest.TestCase): @classmethod def setUpClass(cls): torch.manual_seed(1) def test_sce_equals_ce(self): # All correct predictions...
apache-2.0
-465,173,543,178,997,900
34.091954
87
0.540452
false
stephanie-wang/ray
rllib/evaluation/interface.py
1
3461
import os from ray.rllib.utils.annotations import DeveloperAPI @DeveloperAPI class EvaluatorInterface: """This is the interface between policy optimizers and policy evaluation. See also: RolloutWorker """ @DeveloperAPI def sample(self): """Returns a batch of experience sampled from this...
apache-2.0
9,010,526,220,752,648,000
26.91129
78
0.608495
false
ericholscher/django
django/utils/termcolors.py
1
7510
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = dict((color_names[x], '3%s' % x) for x in range(8)) background = dict((color_names[x], '4%s' % x) for x in range(8)) RESET = '0' opt_dict = {'bold': '1', 'underscore':...
bsd-3-clause
-3,519,319,297,047,664,000
34.424528
89
0.520772
false
in4lio/yupp
eg/switch.py
1
1846
#! /usr/bin/env python # coding: yupp ($__TITLE__ 0) from __future__ import unicode_literals from __future__ import print_function from builtins import bytes from zlib import crc32 ($! switch construction for strings based on CRC-32 ) ($set crc32-switch \cond.\crc32-case..\crc32-default..\body.] _crc32 = crc32( ...
mit
-1,182,587,895,379,364,400
23.613333
65
0.437703
false
jazzband/jazzband-site
jazzband/admin.py
1
2678
from flask import redirect, request, session, url_for from flask_admin import Admin, AdminIndexView, expose from flask_admin.contrib import sqla from flask_login import current_user from .account.models import OAuth from .auth import current_user_is_roadie from .db import postgres from .members.models import EmailAddr...
mit
858,234,447,832,963,000
27.189474
75
0.659447
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_email/test__header_value_parser.py
1
124495
import string import unittest from email import _header_value_parser as parser from email import errors from email import policy from test.test_email import TestEmailBase, parameterize class TestTokens(TestEmailBase): # EWWhiteSpaceTerminal def test_EWWhiteSpaceTerminal(self): x = parser.EWWhiteSpace...
apache-2.0
601,214,179,309,072,300
41.338095
100
0.535638
false
mvaled/sentry
tests/sentry/api/bases/test_sentryapps.py
2
4733
from __future__ import absolute_import from django.http import Http404 from mock import patch from sentry.testutils import TestCase from sentry.api.bases.sentryapps import ( SentryAppPermission, SentryAppBaseEndpoint, SentryAppInstallationPermission, SentryAppInstallationBaseEndpoint, add_integrat...
bsd-3-clause
7,408,418,504,860,931,000
35.129771
95
0.695753
false
jedie/PyDragon32
PyDC/PyDC/wave2bitstream.py
1
23493
#!/usr/bin/env python2 # coding: utf-8 """ :copyleft: 2013 by Jens Diemer :license: GNU GPL v3 or above, see LICENSE for more details. """ import sys import wave import functools import array import itertools import logging import struct import time import math try: import audioop except ImportError, err...
gpl-3.0
3,719,192,939,188,148,700
34.8125
108
0.539565
false
predakanga/irccrypt
setup.py
1
1203
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.md').read() setup( name='irccrypt', ...
isc
-8,418,784,829,701,820,000
25.130435
62
0.610325
false
Muon/redux
redux/visitor.py
1
2625
from redux.ast import ASTNode import logging class Visitor(object): "Implements the extrinsic Visitor pattern." def __init__(self): super(Visitor, self).__init__() self.depth = 0 def log(self, fmt, *args, **kwargs): logging.getLogger(type(self).__name__).debug("%s%d: " + fmt, " ...
mit
-2,904,752,769,884,024,300
31.012195
118
0.50781
false
kepstin/picard
picard/ui/options/general.py
1
2903
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006 Lukáš Lalinský # # 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...
gpl-2.0
4,511,537,156,451,807,700
40.428571
90
0.69069
false
storborg/pyeagle
pyeagle/colors.py
1
1285
""" Helpers to convert between EAGLE color definitions (which are integers into an arbitrary array) and other real-world color spaces. """ # This table can be populated by viewing the 'Color' selection dialog in the # EAGLE layers editor. The colors are zero-indexed starting from the top left. eagle_to_rgb = [ (25...
mit
5,834,094,314,360,172,000
28.204545
78
0.57821
false
guileschool/BEAGLEBONE-tutorials
BBB-firmware/u-boot-v2018.05-rc2/test/py/tests/test_efi_selftest.py
1
2076
# Copyright (c) 2017, Heinrich Schuchardt <xypron.glpk@gmx.de> # # SPDX-License-Identifier: GPL-2.0 # Test efi API implementation import pytest import u_boot_utils @pytest.mark.buildconfigspec('cmd_bootefi_selftest') def test_efi_selftest(u_boot_console): """ Run bootefi selftest """ u_boot_console.run_command(...
mit
541,772,234,173,347,800
39.705882
92
0.733622
false
ChristopherOlson/ArduHeli
Tools/ardupilotwaf/boards.py
1
16307
#!/usr/bin/env python # encoding: utf-8 from collections import OrderedDict import sys import waflib from waflib.Configure import conf _board_classes = {} class BoardMeta(type): def __init__(cls, name, bases, dct): super(BoardMeta, cls).__init__(name, bases, dct) if 'abstract' not in cls.__dict...
gpl-3.0
-6,799,535,619,323,194,000
27.067126
108
0.544858
false
soby/ParsePy
setup.py
1
1183
from distutils.core import setup, Command from unittest import TextTestRunner, TestLoader class TestCommand(Command): '''Run test suite using `python setup.py test `''' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): '...
gpl-3.0
-6,981,281,324,889,855,000
27.166667
75
0.622992
false
facelessuser/ColorHelper
lib/multiconf.py
1
5932
r""" Multiconf allows the reading of platform and or host specific values from Sublime settings. Multiconf is a module that allows you to read platform and/or host specific configuration values to be used by Sublime Text 2 plugins. Using this module's `get` function, allows the user to replace any settings value in a...
mit
7,679,711,671,005,120,000
30.892473
120
0.642953
false
zibawa/IoT_pki
zibawa_PKI/settings-sample.py
1
5737
""" Django settings for zibawa_PKI project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ https://docs.zibawa.com For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/r...
gpl-3.0
4,311,233,592,381,588,000
25.934272
118
0.640579
false
srgblnch/LinacDS
LinacAttrs/groupAttr.py
1
3731
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
4,771,849,156,789,504,000
34.533333
79
0.608684
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/bugs/browser/tests/test_bugtask.py
1
112979
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type from datetime import ( datetime, timedelta, ) import re import urllib from BeautifulSoup import BeautifulSoup from lazr.lifecycle.event impo...
agpl-3.0
-6,606,176,185,459,101,000
43.132422
78
0.650749
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_ip_groups_operations.py
1
27195
# 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 may ...
mit
33,650,392,783,851,896
48.266304
186
0.639272
false
ttimon7/AutobahnPython
autobahn/util.py
1
13828
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
mit
-3,312,809,518,649,519,600
29.06087
90
0.603269
false
nynguyen/sprint_zero_demo
main/main/settings.py
1
2173
""" Django settings for main project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
mit
-3,471,171,386,326,497,000
23.41573
71
0.717441
false
danieltahara/indivisible
indivisible/datasources/eventregistry2.py
1
1369
from eventregistry import EventRegistry from eventregistry import QueryEvents from eventregistry import RequestEventsInfo class EventRegistry2(EventRegistry): """ Wrapper around EventRegistry API """ @classmethod def initialize(cls, key): cls.key = key def __init__(self): sup...
mit
516,621,765,764,199,600
30.113636
72
0.558072
false
google/dotty
efilter_tests/benchmarks/hygdata_v3.py
1
2962
# EFILTER Forensic Query Language # # Copyright 2015 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 # # Un...
apache-2.0
533,686,915,138,752,500
32.659091
78
0.634369
false
kinow-io/kinow-python-sdk
kinow_client/apis/attributes_api.py
1
17983
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.41 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re # python 2 and python 3 compatibility library from six i...
apache-2.0
-5,356,901,050,274,648,000
39.963554
113
0.545793
false
getsentry/raven-python
tests/breadcrumbs/tests.py
1
8015
import sys import logging from raven.utils.testutils import TestCase from raven.base import Client from raven import breadcrumbs from io import StringIO class DummyClass(object): def dummy_method(self): pass class BreadcrumbTestCase(TestCase): def test_crumb_buffer(self): for enable in 1...
bsd-3-clause
-4,469,905,193,321,869,000
37.349282
93
0.54947
false
PowerDNS/pdns
regression-tests.dnsdist/test_Spoofing.py
1
40574
#!/usr/bin/env python import dns from dnsdisttests import DNSDistTest class TestSpoofingSpoof(DNSDistTest): _config_template = """ addAction(makeRule("spoofaction.spoofing.tests.powerdns.com."), SpoofAction({"192.0.2.1", "2001:DB8::1"})) addAction(makeRule("spoofaction-aa.spoofing.tests.powerdns.com."), S...
gpl-2.0
5,515,543,885,777,489,000
43.343169
199
0.559324
false
jsillitoe/ember-django-bloggr
bloggr/settings.py
1
2603
""" Django settings for bloggr project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
mit
4,391,524,739,407,423,000
23.8
102
0.719554
false
scalado/contexo
contexo/plugins/export/genmake.py
1
16148
#!C:\Python26\python.exe ############################################################################### # # genmake.py # Component of Contexo commandline tools - (c) Scalado AB 2010 # ...
gpl-2.0
-5,191,164,783,857,072,000
42.525606
307
0.559017
false
pacoqueen/bbinn
SQLObject/SQLObject-0.6.1/sqlobject/dbconnection.py
1
24846
from __future__ import generators True, False = 1==1, 0==1 import threading import re import warnings import atexit import os import new import sqlbuilder from cache import CacheSet import col from joins import sorter from converters import sqlrepr import urllib import weakref warnings.filterwarnings("ignore", "DB-A...
gpl-2.0
3,282,310,136,762,850,000
34.595989
126
0.536626
false
matthiasplappert/motion_classification
src/tests/test_hmm_impls.py
1
3315
import unittest import numpy as np from sklearn.base import clone from toolkit.hmm.impl_hmmlearn import GaussianHMM as HMMLearnGaussianHMM from toolkit.hmm.impl_hmmlearn import SequentialGaussianFHMM from toolkit.hmm.impl_pomegranate import GaussianHMM as PomegranateGaussianHMM class TestHMMImplementations(unittest...
mit
2,704,178,269,393,278,000
44.410959
123
0.603017
false
meetshah1995/pytorch-semseg
ptsemseg/models/frrn.py
1
5925
import torch import torch.nn as nn import torch.nn.functional as F from ptsemseg.models.utils import FRRU, RU, conv2DBatchNormRelu, conv2DGroupNormRelu frrn_specs_dic = { "A": { "encoder": [[3, 96, 2], [4, 192, 4], [2, 384, 8], [2, 384, 16]], "decoder": [[2, 192, 8], [2, 192, 4], [2, 48, 2]], ...
mit
1,372,395,955,121,058,800
34.059172
96
0.50481
false