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
glemaitre/protoclass
protoclass/tool/dicom_manip.py
1
14985
#title :dicom_manip.py #description :This will create a header for a python script. #author :Guillaume Lemaitre #date :2015/04/20 #version :0.1 #notes : #python_version :2.7.6 #============================================================================== # Import...
gpl-2.0
5,627,377,868,135,266,000
29.833333
135
0.624424
false
andburn/python-unitypack
unitypack/environment.py
1
2335
import os from urllib.parse import urlparse from .asset import Asset from .assetbundle import AssetBundle class UnityEnvironment: def __init__(self, base_path=""): self.bundles = {} self.assets = {} self.base_path = base_path self.files = [] def __del__(self): for f in self.files: f.close() def __re...
mit
-976,772,978,860,595,700
26.470588
79
0.659529
false
google/fedjax
fedjax/legacy/datasets/toy_regression_test.py
1
1381
# 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 agreed to in writing, ...
apache-2.0
-6,813,115,389,254,925,000
36.324324
80
0.731354
false
phev8/ward-metrics
wardmetrics/visualisations.py
1
16641
import matplotlib.pyplot as plt def plot_events_with_segment_scores(segment_results, ground_truth_events, detected_events, use_datetime_x=False, show=True): """ Test :param segment_results: :param ground_truth_events: :param detected_events: :param use_datetime_x: :param show: :return:...
mit
-3,669,431,086,910,914,000
47.944118
197
0.625684
false
msimacek/koschei
koschei/backend/depsolve.py
1
5237
# Copyright (C) 2014-2016 Red Hat, Inc. # # 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
3,479,328,165,184,086,500
38.08209
89
0.668322
false
dagnello/ansible-modules-core
cloud/amazon/ec2_asg.py
1
33907
#!/usr/bin/python # 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. # # Ansible is distributed...
gpl-3.0
-7,845,743,638,671,991,000
39.851807
232
0.643731
false
chippey/gaffer
python/GafferUI/PathWidget.py
1
7446
########################################################################## # # Copyright (c) 2011, John Haddon. All rights reserved. # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
bsd-3-clause
-3,532,087,557,409,567,000
29.768595
138
0.657266
false
mricon/totp-cgi
test.py
1
28974
#!/usr/bin/env python # -*- coding: utf-8 -*- ## # Copyright (C) 2012 by Konstantin Ryabitsev and contributors # # 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
-1,990,789,207,096,743,700
36.579767
116
0.627459
false
ntt-sic/nova
nova/tests/virt/libvirt/test_libvirt.py
1
303692
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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 # # ...
apache-2.0
-9,089,820,123,202,550,000
40.487978
79
0.54878
false
IBMDecisionOptimization/docplex-examples
examples/cp/visu/rcpsp_multi_mode_json.py
1
5287
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- """ This example is th...
apache-2.0
4,069,867,353,027,879,000
38.162963
128
0.598449
false
MCLConsortium/mcl-site
support/upgradeMCL.py
1
1894
#!/usr/bin/env python # encoding: utf-8 # Copyright 2020 California Institute of Technology. ALL RIGHTS # RESERVED. U.S. Government Sponsorship acknowledged. import sys, logging, transaction from Products.CMFPlone.utils import get_installer _products = [ # 'edrnsite.portlets', # 'edrn.theme', # 'eke.know...
apache-2.0
-4,641,201,772,737,198,000
29.516129
114
0.670719
false
lukacu/django-gallery
gallery/admin.py
1
3677
#!/usr/bin/python # -*- Mode: python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- from django.conf import settings from django.contrib.admin.util import unquote from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404...
bsd-3-clause
6,451,354,872,952,156,000
40.264368
172
0.632853
false
erigones/erigones-sddc-api
esdc_api/client.py
1
5663
# -*- coding: utf-8 -*- """ esdc_api.client ~~~~~~~~~~~~~~~ This module contains the Danube Cloud API :class:`Client` class used to access the Danube Cloud HTTP API. """ import json import requests from . import __version__ from .response import Response __all__ = ( 'Client', ) class Client(object): """ ...
bsd-3-clause
3,342,749,459,229,568,000
35.535484
115
0.603744
false
kennedyshead/home-assistant
homeassistant/components/auth/login_flow.py
1
8731
"""HTTP views handle login flow. # GET /auth/providers Return a list of auth providers. Example: [ { "name": "Local", "id": null, "type": "local_provider", } ] # POST /auth/login_flow Create a login flow. Will return the first step of the flow. Pass in parameter 'client_id' and 'r...
apache-2.0
-943,019,571,495,028,600
31.337037
87
0.617455
false
aschn/goodtechgigs
goodtechgigs/gigs/migrations/0001_initial.py
1
1492
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import model_utils.fields import taggit.managers class Migration(migrations.Migration): dependencies = [ ('profiles', '0004_auto_20150305_2200'), ('tags', '0002_a...
apache-2.0
-3,499,465,569,666,910,000
42.882353
256
0.605898
false
rec/echomesh
code/python/echomesh/base/Path.py
1
4125
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.base import MakeEmptyProject from echomesh.base import Platform import getpass import os import os.path import sys # If ECHOMESH_EXTERNALS_OVERRIDE_SYSTEM_PACKAGES is True, you want Echomesh to # use its own external pac...
mit
2,194,033,821,893,237,000
28.464286
82
0.638788
false
gmork2/django-soap-connector
soap_connector/tests/api/test_root.py
1
1369
from urllib.parse import urlparse, ParseResult from django.test import TestCase from django.urls import resolve, ResolverMatch from rest_framework.reverse import reverse from soap_connector.api.base import URL_NAMES class RootViewTestCase(TestCase): """ """ def setUp(self): """ :return...
gpl-3.0
111,986,330,788,116,370
19.132353
67
0.553689
false
andela-jngatia/Just-Do-It
bucketlist/migrations/0002_auto_20160310_0740.py
1
3876
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-03-10 07:40 from __future__ import unicode_literals import django.contrib.auth.models import django.core.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('...
mit
-4,156,431,365,914,840,600
43.045455
409
0.605263
false
hadronproject/lpms
lpms/shelltools.py
1
11180
# Copyright 2009 - 2011 Burak Sezer <purak@hadronproject.org> # # This file is part of lpms # # lpms 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) an...
gpl-3.0
-1,432,450,333,180,091,600
32.573574
115
0.598748
false
MediffRobotics/DeepRobotics
DeepBrain/SockCommun_Brain_Rpi.py
1
2527
import math class BrainCommuViaSock: def __init__(self): self.Uparm_OldShiftingSteps=0; self.Elbow_OldShiftingSteps=0; def Elbow_Angles2Steps(self,Angle_Deg=0): #Init MovingSide_InitLength=231.03; # connect to motor ShortSideLength=50;#mm...
gpl-3.0
3,892,539,015,571,696,600
31.818182
77
0.633558
false
marcharper/stationary
stationary/utils/matrix_checks.py
1
1986
from .math_helpers import kl_divergence_dict from .graph import Graph from .edges import edges_to_edge_dict from nose.tools import assert_almost_equal def check_detailed_balance(edges, s, places=7): """ Check if the detailed balance condition is satisfied. Parameters ---------- edges: list of tu...
mit
7,332,367,794,311,983,000
25.48
78
0.608761
false
tensorflow/cloud
src/python/tensorflow_cloud/tuner/vizier_client.py
1
19569
# Lint as: python3 # Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-2,417,612,249,861,651,000
36.632692
80
0.568297
false
georgemarshall/django-rest-auth
rest_allauth/app_settings.py
1
1793
from django.conf import settings from .account.serializers import ( UserDetailsSerializer as DefaultUserDetailsSerializer, LoginSerializer as DefaultLoginSerializer, ChangePasswordSerializer as DefaultChangePasswordSerializer, SetPasswordSerializer as DefaultSetPasswordSerializer, EmailSerializer a...
mit
1,956,809,140,446,849,000
31.6
95
0.819297
false
ismk/Python-Examples
temp3.py
1
1914
import sys import sqlite3 as lite import time con = lite.connect("passwords.db") cur = con.cursor() cur.execute("CREATE TABLE if not EXISTS passwords(site VARCHAR(50), username VARCHAR(20), password VARCHAR(20));") print ("\n***** Welcome to Passwords.py. *****\n\n") choice = None while choice == None...
mit
4,125,055,926,198,433,000
19.288889
114
0.568443
false
AnalogJ/lexicon
lexicon/providers/cloudns.py
1
8480
"""Provider module for CloudNS""" import logging import requests from lexicon.providers.base import Provider as BaseProvider LOGGER = logging.getLogger(__name__) NAMESERVER_DOMAINS = ["cloudns.net"] def provider_parser(subparser): """Configure provider parser for CloudNS""" identity_group = subparser.add_...
mit
-3,725,754,271,118,477,000
37.371041
94
0.58691
false
spectralDNS/shenfun
docs/paper/CG/CGpaper_dirichlet.py
1
8842
""" This script has been used to compute the Dirichlet results of the paper Efficient spectral-Galerkin methods for second-order equations using different Chebyshev bases The results have been computed using Python 3.9 and Shenfun 3.1.1. The generalized Chebyshev-Tau results are computed with dedalus, and are as...
bsd-2-clause
-6,614,167,239,419,566,000
28.972881
114
0.513345
false
Zearin/python-parsimonious
parsimonious/exceptions.py
1
1517
class BadGrammar(Exception): """The rule definitions passed to Grammar contain syntax errors.""" class VisitationError(Exception): """Something went wrong while traversing a parse tree. This exception exists to augment an underlying exception with information about where in the parse tree the error o...
mit
-4,155,696,561,795,561,500
31.276596
79
0.632169
false
bricetebbs/signup
urls.py
1
1081
from django.conf.urls import patterns, url urlpatterns = patterns('', url ( regex = '^email/$', view = 'signup.views.signup_email', name = 'signup_email' ), url ( regex = '^logout/$', view = 'signup.views.signup_logout', name = 'signup_logout' )...
mit
-8,363,420,443,017,328,000
26.74359
78
0.506013
false
EnviroCentre/patterns-toolbox
setup.py
1
1042
# -*- coding: utf-8 -*- # Copyright 2015 Florenz A. P. Hollebrandse # # 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 a...
apache-2.0
-1,147,717,983,915,998,200
30.575758
74
0.711132
false
di-unipi-socc/tosKer
tosker/docker_interface.py
1
9261
''' Docker interface module ''' import os from functools import wraps from os import path import six from docker import APIClient, errors from .graph.artifacts import Dockerfile from .graph.nodes import Container, Root, Volume from .helper import Logger _cli = None def _get_name(func): @wraps(func) def fun...
mit
-3,849,401,497,029,572,600
24.725
80
0.559875
false
Coldwings/Campanella-rapidfork
rapidfork/views/base.py
1
4552
# coding:utf-8 from datetime import datetime import decimal import json import six import logging import traceback from tornado import escape from tornado.web import RequestHandler, HTTPError def tojson(data, ensure_ascii=True, default=False, **kwargs): def serializable(obj): if isinstance(obj, decimal.De...
apache-2.0
4,599,085,205,981,180,400
33.047244
109
0.547641
false
JeffRoy/mi-dataset
mi/dataset/driver/cg_dcl_eng/dcl/test/test_cg_dcl_eng_dcl_recovered_driver.py
1
1070
#!/home/mworden/uframes/ooi/uframe-1.0/python/bin/python __author__ = 'mworden' from mi.core.log import get_logger log = get_logger() from mi.idk.config import Config import unittest import os from mi.dataset.driver.cg_dcl_eng.dcl.cg_dcl_eng_dcl_recovered_driver import parse from mi.dataset.dataset_driver import P...
bsd-2-clause
-7,268,057,656,039,230,000
24.5
99
0.654206
false
atados/api
atados_core/models/legacy_address.py
1
3608
import pytz from django.db import models from datetime import datetime from pygeocoder import Geocoder from django.utils.translation import ugettext_lazy as _ from address import GoogleAddress class State(models.Model): name = models.CharField(_('name'), max_length=30) code = models.CharField(_('code'), max_l...
mit
-4,876,659,624,860,120,000
36.583333
124
0.606984
false
ppyordanov/HCI_4_Future_Cities
Server/src/virtualenv/Lib/site-packages/pip/_vendor/requests/adapters.py
1
14468
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
mit
-4,050,275,592,329,711,600
36.28866
97
0.600705
false
arangodb/arangodb
3rdParty/V8/v7.9.317/tools/testrunner/local/variants.py
1
2368
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Use this to run several variants of the tests. ALL_VARIANT_FLAGS = { "assert_types": [["--assert-types"]], "code_serializer": [["--cache=code"]], "...
apache-2.0
5,822,265,050,243,910,000
37.193548
79
0.638514
false
lebabouin/CouchPotatoServer-develop
couchpotato/core/providers/nzb/binnewz/nzbdownloader.py
1
3562
# Author: Guillaume Serre <guillaume.serre@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 versi...
gpl-3.0
7,066,434,616,544,077,000
35.731959
152
0.660865
false
w1ndy/qtile
libqtile/widget/keyboardkbdd.py
1
3411
# Copyright (c) 2015 Ali Mousavi # # 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, distrib...
mit
3,760,122,123,004,868,600
37.325843
79
0.640575
false
patchew-project/patchew
tests/test_mbox.py
1
3040
#!/usr/bin/env python3 # # Copyright 2017 Red Hat, Inc. # # Authors: # Fam Zheng <famz@redhat.com> # # This work is licensed under the MIT License. Please see the LICENSE file or # http://opensource.org/licenses/MIT. import mbox from .patchewtest import PatchewTestCase, main class MboxTest(PatchewTestCase): ...
mit
-6,980,690,564,377,600,000
33.146067
86
0.56104
false
IAmWave/blekota
src/blekota.py
1
2295
import argparse parser = argparse.ArgumentParser(description='Load or create a Blekota model') parser.add_argument('file', help='Either a .pkl file containing an existing model or a .wav sound on which to train a new model. If a .wav is provided, other parameters can be used to specify model hyper...
mit
5,942,508,307,662,493,000
39.982143
208
0.658388
false
hayderimran7/ec2-api
ec2api/tests/functional/botocoreclient.py
1
1492
# Copyright 2015 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
-957,823,799,688,157,800
35.390244
78
0.676944
false
jwodder/aptrepo
src/aptrepo/sources.py
1
1579
from collections import namedtuple import re from .archive import Archive class AptSource(namedtuple('AptSource', 'deb options uri suite components')): def __str__(self): sline = self.deb if self.options: sline += ' ' + ' '.join(f'{k}={v}' if v is not None else k ...
mit
9,165,954,857,391,489,000
35.72093
77
0.49905
false
0xffea/keystone
keystone/common/wsgi.py
1
19339
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (...
apache-2.0
-8,984,619,201,358,130,000
33.047535
79
0.595687
false
google/report2bq
application/classes/sa360_report_validation/product_lead_and_cross_sell.py
1
3261
""" 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
apache-2.0
-783,439,681,970,412,500
27.12069
80
0.653481
false
catapult-project/catapult
catapult_build/build_steps.py
3
12384
# Copyright 2016 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. import argparse import json import os import sys # This is the list of tests to run. It is a dictionary with the following # fields: # # name (required): Th...
bsd-3-clause
-8,936,685,477,396,930,000
31.93617
80
0.541101
false
tyll/bodhi
bodhi/server/scripts/approve_testing.py
1
4185
# -*- coding: utf-8 -*- # Copyright © 2013-2017 Red Hat, Inc. and others. # # This file is part of Bodhi. # # 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 ...
gpl-2.0
-3,813,178,846,344,620,500
38.102804
100
0.660134
false
NoBodyCam/TftpPxeBootBareMetal
nova/tests/baremetal/test_volume_driver.py
1
4399
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
apache-2.0
8,312,770,303,761,770,000
30.198582
78
0.580359
false
wcmckee/wcmckee-notebook
hackbrobeur.py
1
2509
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # Hack BroBeur # <markdowncell> # python script to make account at centre for logins. # <codecell> from github import Github import os import getpass import git import time from clint.textui import colored import dominate from dominate.tags impo...
gpl-2.0
2,657,833,803,489,301,000
11.420792
85
0.656038
false
robwarm/gpaw-symm
tools/niflheim-agts.py
1
5426
import os import sys import glob import shutil import subprocess def cmd(c): x = os.system(c) assert x == 0, c def fail(subject, email=None, filename='/dev/null', mailer='mail'): assert mailer in ['mailx', 'mail', 'mutt'] import os if email is not None: if filename == '/dev/null': ...
gpl-3.0
-8,642,778,261,663,894,000
30.546512
85
0.572429
false
vitchyr/rlkit
rlkit/util/hyperparameter.py
1
7092
""" Custom hyperparameter functions. """ import abc import copy import math import random import itertools from typing import List import rlkit.pythonplusplus as ppp class Hyperparameter(metaclass=abc.ABCMeta): def __init__(self, name): self._name = name @property def name(self): return ...
mit
-2,940,930,123,126,832,600
30.109649
86
0.597998
false
monkeysecurity/aws_api_classifier
apiapi.py
1
2868
""" Usage: apiapi.py (all|mutating) [--csv=output_file] """ import csv from policyuniverse import global_permissions import re from tabulate import tabulate TAGS = { 'DATA_PLANE': ['object', 'bucket'], 'CONTROL_PLANE': ['policy', 'attribute', 'permission'], 'MUTATING': ['create', 'delete', 'm...
apache-2.0
6,818,567,263,265,383,000
28.875
123
0.57113
false
mhogg/bonemapy
bonemapy/elementTypes.py
1
6798
# -*- coding: utf-8 -*- # Copyright (C) 2013 Michael Hogg # This file is part of bonemapy - See LICENSE.txt for information on usage and redistribution import numpy as np from abaqusConstants import C3D4, C3D4H, C3D10, C3D10H, C3D10I, C3D10M, C3D10MH # ~~~~~~~~~~ class elementC3D4(): def __init__(self): ...
mit
-8,532,450,555,790,286,000
32.487685
130
0.416887
false
childsish/sofia
templates/genomics/steps/sequence_set.py
1
2159
import gzip from sofia.step import Step from lhc.binf.sequence.reverse_complement import reverse_complement try: import pysam def get_fasta_set(filename): return pysam.FastaFile(filename) except ImportError: from lhc.io.fasta import FastaInOrderAccessSet def get_fasta_set(filename): f...
gpl-2.0
952,286,789,581,727,600
31.712121
109
0.597962
false
funkring/fdoo
addons-funkring/report_aeroo/barcodes/write.py
1
8543
# -*- coding: utf-8 -*- """ Barcodes for Python - Module for writing. Copyright 2009 Peter Gebauer Cairo backend for writing barcodes. "Barcodes for Python" 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, eithe...
agpl-3.0
-8,345,297,074,543,309,000
35.508547
95
0.606813
false
TC01/AutoCrab
AutoCrab2/python/crabutil.py
1
1225
""" Utility functions for working with CRAB. Used by most of the autocrab commands. """ import os def getCrabConfig(dir): """Retrieves backup copy of crab config file in directory.""" path = os.path.join(dir, "share", "crab.cfg") return path def getCrabLog(dir): path = os.path.join(dir, "log", "crab.log") retur...
mit
1,058,610,956,331,786,500
25.06383
70
0.69551
false
tritoanst/ccxt
python/ccxt/bxinth.py
1
8476
# -*- coding: utf-8 -*- from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError class bxinth (Exchange): def describe(self): return self.deep_extend(super(bxinth, self).describe(), { 'id': 'bxinth', 'name': 'BX.in.th', 'countries': 'TH', # ...
mit
-6,969,734,723,890,171,000
33.737705
126
0.461185
false
mileistone/test
utils/test/datasets/coco.py
1
18590
# -------------------------------------------------------- # Fast/er R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- from datasets.imdb import imdb import datasets.ds_utils as ds_utils from fast_rcnn.config i...
mit
8,357,223,769,747,148,000
41.132251
100
0.516138
false
praetorian-inc/pentestly
modules/reporting/xml.py
1
1655
from recon.core.module import BaseModule from dicttoxml import dicttoxml from xml.dom.minidom import parseString import codecs import os class Module(BaseModule): meta = { 'name': 'XML Report Generator', 'author': 'Eric Humphries (@e2fsck) and Tim Tomes (@LaNMaSteR53)', 'version': 'v0.0.2'...
gpl-3.0
5,376,551,073,993,372,000
40.375
121
0.538973
false
micahcochran/geopandas
geopandas/tools/tests/test_sjoin.py
1
10287
from __future__ import absolute_import from distutils.version import LooseVersion import numpy as np import pandas as pd from shapely.geometry import Point, Polygon import geopandas from geopandas import GeoDataFrame, GeoSeries, read_file, base from geopandas import sjoin import pytest from pandas.util.testing impo...
bsd-3-clause
130,542,483,010,739,260
37.52809
79
0.564207
false
crackcell/www-entity-mining
people/stars/ent.sina.com.cn/crawler.py
1
2883
#!/usr/bin/env python # -*- encoding: utf-8; indent-tabs-mode: nil -*- """ crawler ~~~~~~~ desc :copyright: (c) 2015 Menglong TAN. """ import os import sys import re import urllib2 import time import BeautifulSoup import logging logger = logging.getLogger(__file__) logger.setLevel(logging.DEBUG) ch ...
bsd-3-clause
7,542,542,099,566,126,000
31.862069
149
0.55439
false
TFMV/veloce
classifier.py
1
4504
import pyspark from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.classification import LogisticRegressionWithSGD from pyspark.mllib.tree import DecisionTree from pyspark import SparkContext from pyspark.sql import SQLContext ##If running through pyspark, start pyspark as follows: pyspark --pa...
mit
-4,944,954,862,459,573,000
46.451613
276
0.72913
false
Forage/Gramps
gramps/gui/plug/tool.py
1
11556
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2005-2007 Donald N. Allingham # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Paul Franklin # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
gpl-2.0
6,896,968,333,442,710,000
35
86
0.536777
false
tensorflow/addons
tensorflow_addons/image/tests/transform_ops_test.py
1
16494
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,881,526,463,542,878,700
34.547414
88
0.56566
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_body_type_filter112.py
1
7225
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
-6,208,763,084,608,335,000
33.903382
84
0.578685
false
alex/django-old
django/contrib/auth/tests/auth_backends.py
1
9965
import warnings from django.conf import settings from django.contrib.auth.models import User, Group, Permission, AnonymousUser from django.contrib.contenttypes.models import ContentType from django.test import TestCase class BackendTest(TestCase): backend = 'django.contrib.auth.backends.ModelBackend' def s...
bsd-3-clause
4,535,194,109,111,291,000
38.387352
109
0.649875
false
APTrust/EarthDiver
dpnode/dpn/client/apiclient.py
1
2153
import json from os.path import normpath from http.client import HTTPSConnection, HTTPConnection from urllib.parse import urlencode, urlparse class APIException(Exception): pass class APIClient: """ A basic client to query the DPN REST API. """ def __init__(self, url, api_token): self.set...
apache-2.0
-1,497,941,737,126,121,000
28.493151
83
0.579656
false
hmendozap/auto-sklearn
test/util/test_common.py
1
1264
# -*- encoding: utf-8 -*- from __future__ import print_function from functools import partial import os import unittest from autosklearn.util import set_auto_seed, get_auto_seed, del_auto_seed, \ check_pid class TestUtilsCommon(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): ...
bsd-3-clause
-3,619,677,723,574,373,400
26.478261
75
0.626582
false
Inspq/ansible
lib/ansible/modules/identity/sx5/sx5_client.py
1
16092
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, INSPQ Team SX5 # # This file is not 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 y...
gpl-3.0
-4,687,860,115,322,721,000
38.723457
268
0.486387
false
kovidgoyal/kitty
kitty/layout/grid.py
1
12595
#!/usr/bin/env python # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net> from functools import lru_cache from itertools import repeat from math import ceil, floor from typing import ( Any, Callable, Dict, Generator, List, Optional, Sequence, Set, Tuple ) from kitty.bo...
gpl-3.0
-4,798,671,985,011,705,000
40.705298
145
0.581421
false
georgeha/software_engineering
aws/restolingo/placeorder/models.py
1
3621
""" This file contains all the models that are used in our system """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from autoslug import AutoSlugField from django.core.urlresolvers import reverse from django.contrib.auth.models import...
mit
-3,469,167,692,740,765,000
30.215517
120
0.604529
false
helena-project/beetle
controller/manager/tasks.py
1
5949
import socket from datetime import timedelta from celery.decorators import task, periodic_task from celery.utils.log import get_task_logger from django.utils import timezone from beetle.models import VirtualDevice, PrincipalGroup from network.models import ConnectedGateway, ConnectedDevice, DeviceMapping, \ Service...
apache-2.0
-5,559,685,777,284,174,000
31.508197
79
0.756598
false
EmanuelStoyanov/NomNom-Food-Delivery
tests.py
1
4962
import unittest import database import logged_menu class database_tests(unittest.TestCase): def setUp(self): database.create_users_table() database.create_restaurant_table() database.create_orders_table() database.create_taxes_table() database.register('Barney', '420', "Mcl...
gpl-3.0
-4,299,222,095,564,951,000
34.956522
73
0.644498
false
italopaiva/propositional-logic
operations.py
1
6549
"""Describe the possible operations.""" from lp.interpreter import Interpreter, TruthTable, SetTruthTable class Operation: """Base class for operations.""" def perform(self, *args): """Perform the operation.""" raise NotImplementedError def parse(self, line): """ Generic...
mit
4,685,439,699,903,485,000
31.909548
79
0.602077
false
leiferikb/bitpop
src/chrome/common/extensions/docs/server2/servlet.py
1
4143
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class RequestHeaders(object): '''A custom dictionary impementation for headers which ignores the case of requests, since different HTTP libraries seem t...
gpl-3.0
2,190,137,133,376,314,000
25.056604
73
0.64253
false
lnmds/jorge
ext/gambling.py
1
5013
import asyncio import decimal import random import discord from discord.ext import commands from .common import Cog EMOJI_POOL = ':thinking: :snail: :shrug: :chestnut: :ok_hand: :eggplant:'.split() BET_MULTIPLIER_EMOJI = ':thinking:' X4_EMOJI = [':snail:', ':chestnut:', ':shrug:'] X6_EMOJI = [':eggplant:', ':ok_han...
mit
-950,188,890,208,021,200
29.560976
147
0.56265
false
erinspace/osf.io
website/search_migration/__init__.py
1
34093
JSON_UPDATE_NODES_SQL = """ SELECT json_agg( json_build_object( '_type', CASE WHEN N.type = 'osf.registration' THEN 'registration' WHEN PREPRINT.URL IS NOT NULL THEN 'preprint' WHEN PARENT_GUID._id IS NULL ...
apache-2.0
-1,947,196,518,070,275,300
44.885599
273
0.406506
false
duncanmmacleod/gwpy
gwpy/plot/axes.py
1
21895
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018-2020) # # This file is part of GWpy. # # GWpy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
gpl-3.0
2,707,461,000,808,235,500
34.543831
79
0.546837
false
glehmann/uptodate
uptodate/plugins/display.py
1
1674
#!/usr/bin/env python #coding: iso-8859-15 # # Copyright (C) 2005 Gaëtan Lehmann <gaetan.lehmann@jouy.inra.fr> # # this file is part of uptodate # # 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...
gpl-2.0
-8,111,562,675,753,110,000
28.892857
97
0.719833
false
google/makani
lib/python/pack2/backend_py.py
1
9016
# Copyright 2020 Makani Technologies 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...
apache-2.0
-2,375,850,912,057,371,600
29.153846
80
0.551797
false
umkcdcrg01/ryu_openflow
ryu/app/my_arp_v3_copy.py
1
7774
# Simple Arp Handler v2 # Jack Zhao # s.zhao.j@gmail.com from operator import attrgetter from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import CONFIG_DISPATCHER from ryu.controller.handler import MAIN_DISPATCHER from ryu.controller.handler import set_ev_cls from ry...
apache-2.0
6,158,059,715,359,937,000
40.572193
136
0.605866
false
phronesis-mnemosyne/census-schema-alignment
wit/wit/dev/authorship-embedding.py
1
4685
import pandas as pd import urllib2 from pprint import pprint from matplotlib import pyplot as plt from bs4 import BeautifulSoup from hashlib import md5 import sys sys.path.append('/Users/BenJohnson/projects/what-is-this/wit/') from wit import * pd.set_option('display.max_rows', 50) pd.set_option('display.max_column...
apache-2.0
-2,159,664,508,630,088,000
22.661616
140
0.631163
false
quantmind/jflib
boostbuilder/build_ext.py
1
7401
import os import sys from types import * from distutils.errors import * from distutils.dep_util import newer_group from distutils.core import Extension as old_Extension from distutils.command.build_ext import build_ext as _build_ext from distutils import log from utils import fullsplit class external_ob...
bsd-3-clause
-4,701,284,351,250,491,000
38.233696
90
0.547764
false
manub686/atomix
r2cmplr/_scrape_b_i.py
1
4226
#!/usr/bin/python ''' Atomix project, _scrape_b_i.py, (TODO: summary) Copyright (c) 2015 Stanford University Released under the Apache License v2.0. See the LICENSE file for details. Author(s): Manu Bansal ''' import csv import os import sys import re from _util import * class BlockScraper: def which(self, block...
apache-2.0
-1,635,830,698,253,406,700
26.986755
137
0.612636
false
leifos/treconomics
treconomics_project/treconomics/test_views.py
1
1408
from django.core.urlresolvers import reverse __author__ = 'mickeypash' from django.test import TestCase class LandingViewTests(TestCase): def test_home_view_status_code(self): """ Testing the response status codes Status expected - 200 OK """ response = self.client.get(re...
mit
660,491,089,278,089,300
28.978723
63
0.618608
false
Xeralux/tensorflow
tensorflow/contrib/distributions/python/ops/statistical_testing.py
1
32457
# Copyright 2018 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
7,352,941,959,383,396,000
43.583791
80
0.697045
false
Marcello-Sega/pytim
pytim/interface.py
1
27725
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 from abc import ABCMeta, abstractmethod import numpy as np from .properties import _create_property from .writepdb import _writepdb from . import messages from . import utilities from scipy.sp...
gpl-3.0
-8,665,581,660,487,102,000
38.949568
120
0.541064
false
iNecas/katello
cli/src/katello/client/api/repo.py
1
5198
# -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should h...
gpl-2.0
7,461,500,698,733,066,000
35.598592
87
0.617279
false
cyrillg/ros-playground
src/deedee_driver/tests/test_motors_driver.py
1
2314
#! /usr/bin/env python PKG='deedee_driver' import sys import unittest from mock import Mock from deedee_driver.motors_driver_lib import * class TestMotorsDriver(unittest.TestCase): def setUp(self): robot_name = "test_bot" config = {"max_wheel_speed": 0.55} serial_socket = Mock() ...
mit
-295,165,355,079,123,500
31.138889
68
0.492653
false
openstack/networking-sfc
networking_sfc/db/migration/alembic_migrations/versions/newton/contract/06382790fb2c_fix_foreign_constraints.py
1
1647
# 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
-3,674,974,696,152,133,600
33.3125
78
0.686096
false
cwaldbieser/txcas
sample.py
1
22229
#! /usr/bin/env python from __future__ import print_function import argparse import cgi from textwrap import dedent from urllib import urlencode import sys from txcas.constants import ( VIEW_LOGIN, VIEW_LOGIN_SUCCESS, VIEW_LOGOUT, VIEW_INVALID_SERVICE, VIEW_ERROR_5XX, VIEW_NOT_FOUND) from tx...
gpl-3.0
1,190,900,562,462,385,700
37.861888
222
0.500157
false
nathanielvarona/airflow
tests/providers/apache/pinot/hooks/test_pinot.py
1
9827
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
-1,238,631,437,813,165,000
34.476534
101
0.559377
false
jbarlow83/OCRmyPDF
tests/test_stdio.py
1
3399
# © 2019 James R. Barlow: github.com/jbarlow83 # # 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 os import sys from pathlib import Path from subprocess import D...
gpl-3.0
-968,572,428,516,915,500
28.293103
81
0.622131
false
ryandub/simpl
simpl/rest.py
1
13761
# Copyright (c) 2011-2015 Rackspace US, 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...
apache-2.0
3,635,419,209,916,187,600
36.394022
79
0.600538
false
b3j0f/debate
django/core/views.py
1
3280
"""View module.""" from .models import ( Account, User, Topic, Event, Space, Vote, Tag, Media, Stat ) from .serializers import ( AccountSerializer, UserSerializer, TopicSerializer, MediaSerializer, EventSerializer, VoteSerializer, TagSerializer, SpaceSerializer, StatSerializer ) from .permissions i...
mit
-417,113,614,665,994,500
22.768116
72
0.559146
false
openstack/networking-arista
networking_arista/tests/unit/ml2/mechanism_ha_simulator.py
1
4119
# Copyright (c) 2018 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
2,236,879,542,072,917,500
40.606061
77
0.686817
false
NerdsvilleCEO/elections
tests/test_flask_irc.py
1
5788
#!/usr/bin/python # -*- coding: utf-8 -*- """ (c) 2014 - Copyright Joshua Santos Author: Joshua Santos <nerdsville@nerdsville.net> # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2, o...
gpl-2.0
-6,630,374,561,659,560,000
35.866242
79
0.585867
false
michimussato/pypelyne2
pypelyne2/payload/rr/7.0.29__installer/files/render_apps/scripts/kso_tcp.py
1
6250
import SocketServer import struct import datetime import sys import time StructureID_rrCommands =0x0B03 StructureID_RRN_TCP_HeaderData_v3 = 0x0D03 Size_RRCommands = 1232 Size_RRN_TCP_HeaderData_v3 = 198 rrnData_commands = 7 log_command="print(' \\\'" log_command_end="')" log_command_intern_prestring=" " log_...
gpl-2.0
4,744,804,664,678,391,000
30.407035
231
0.62832
false
balena/python-smime
setup.py
1
1324
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.r...
apache-2.0
-497,665,523,071,325,800
32.948718
74
0.635196
false
moas/sketchbadges
exo/studio/users/urls.py
1
2012
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url from django.contrib.auth.views import ( logout_then_login, login, password_change ) from django.core.urlresolvers import reverse_lazy from django.views import generic from . import views urlpatte...
mit
7,237,117,035,323,833,000
23.536585
64
0.538767
false
tcarmelveilleux/CheapDrawBot
Software/drivers/pololu_maestro.py
1
1901
# # Basic library to interface with Pololu Maestro servo controllers # through serial port. # # Limitations: # * CRC-7 not yet supported import serial class PololuMaestro: CMD_SET_TARGET = 0x04 CMD_SET_SPEED = 0x07 CMD_SET_ACCEL = 0x09 def __init__(self, port, baud_rate=9600): self.port = por...
mit
-2,907,025,372,800,003,000
31.220339
84
0.609679
false
sklam/numba
numba/cuda/tests/cudapy/test_idiv.py
1
1061
import numpy as np from numba import cuda, float32, float64, int32 from numba.cuda.testing import unittest, CUDATestCase class TestCudaIDiv(CUDATestCase): def test_inplace_div(self): @cuda.jit(argtypes=[float32[:, :], int32, int32]) def div(grid, l_x, l_y): for x in range(l_x): ...
bsd-2-clause
8,982,965,068,970,503
26.921053
57
0.514609
false