repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vrutkovs/github-review-dashboard | github_review_dashboard/github_reviews.py | 1 | 8004 | # -*- coding: utf-8 -*-
import dateutil.parser
import datetime
import os
import logging
import sys
from dateutil.tz import tzutc
from github_client import GithubClient
root = logging.getLogger()
root.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Format... | mit | 9,067,402,440,644,792,000 | 36.227907 | 100 | 0.600575 | false | 3.775472 | false | false | false |
barry-scott/git-workbench | WebSite/build-web-site.py | 2 | 3322 | #!/usr/bin/env python3
import sys
import os
import pathlib
import shutil
def copyFile( src, dst_dir ):
dst = dst_dir / src.name
shutil.copy( str( src ), str( dst ) )
if len(sys.argv) < 3:
print( 'Usage: %s <version> <kits-folder> [--test] [--install]' % (sys.argv[0],) )
print( ' %s 0.9.3 /shared... | apache-2.0 | -2,889,871,900,023,997,000 | 33.247423 | 123 | 0.631547 | false | 2.661859 | false | false | false |
kamillus/MediaServer | client/settings.py | 1 | 3678 | import os
import json
import socket
class Settings(object):
protocol = "http"
host = "0.0.0.0" #socket.gethostbyname(socket.gethostname())
port = "1345"
user_settings_directory = "~/.MediaServer"
settings_file = "settings"
library_file = "library"
file_paths = []
library = {}
settin... | gpl-3.0 | -7,362,011,661,599,930,000 | 36.161616 | 135 | 0.56335 | false | 3.6308 | false | false | false |
vadyur/script.media.aggregator | plugin.py | 1 | 3404 | import urllib, sys
import log
def make_url(params):
url = 'plugin://script.media.aggregator/?' + urllib.urlencode(params)
return url
def get_params():
if len(sys.argv) < 3:
return None
param = dict()
paramstring = sys.argv[2]
if len(paramstring) >= 2:
params = sys.argv[2]
cleanedparams = params.replace(... | gpl-3.0 | -2,530,008,572,893,542,000 | 21.401316 | 91 | 0.668919 | false | 2.96 | false | false | false |
akampjes/p0rk-crackling | p0rk/porkweb/migrations/0003_auto__del_task__add_jobtask.py | 1 | 7331 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Task'
db.delete_table(u'porkweb_task')
# Adding model 'JobTask'
db.create... | bsd-3-clause | -3,612,208,758,449,123,300 | 59.595041 | 153 | 0.544128 | false | 3.502628 | false | false | false |
Samneetsingh/OutlierDetection | odt/clustering/dbscan.py | 1 | 1993 | ###############################################
## Local Outlier Factor (LOF) Implementation ##
###############################################
### Import Python Libraries ###
import pandas as pd
from pandas import DataFrame
from numpy import array, matrix
### Import R Libraries ###
import rpy2.robjects as R
from rpy... | gpl-3.0 | -1,624,652,984,021,545,700 | 25.932432 | 87 | 0.569995 | false | 3.650183 | false | false | false |
astrocatalogs/supernovae | tasks/nedd.py | 1 | 4007 | '''Import tasks for NED-D, the galactic distances catalog.
'''
import csv
import os
from collections import OrderedDict
from html import unescape
from astrocats.catalog.utils import (get_sig_digits, is_number, pbar,
pretty_num, uniq_cdl)
from astropy import units as un
from astropy... | mit | -142,725,370,561,388,260 | 37.902913 | 79 | 0.512603 | false | 4.06802 | false | false | false |
FEniCS/uflacs | uflacs/backends/ufc/templates.py | 1 | 1188 |
import re
from ffc.backends.ufc import *
# TODO: Make cell_orientation a double +1.0|-1.0 instead of the int flag in ffc/ufc/dolfin
# TODO: Simplify ufc templates by introducing 'preamble' keyword in place of members, constructor, destructor
domain_background = """
/// This is just here to document the memory layout... | gpl-3.0 | 7,236,381,945,068,393,000 | 33.941176 | 109 | 0.599327 | false | 2.687783 | false | false | false |
gazally/chatbot-reply | chatbot_reply/script.py | 2 | 9930 | #! /usr/bin/env python
# Copyright (c) 2016 Gemini Lasswell
# 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/.
""" chatbot_reply.script, defines decorators and superclass f... | mpl-2.0 | 2,177,815,255,354,238,500 | 39.864198 | 80 | 0.65428 | false | 4.493213 | false | false | false |
brainstorm-ai/DIGITS | digits/model/images/generic/views.py | 1 | 21335 | # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import os
import re
import tempfile
import flask
import werkzeug.exceptions
from .forms import GenericImageModelForm
from .job import GenericImageModelJob
from digits import frameworks
from digits import utils... | bsd-3-clause | 3,276,499,681,111,370,000 | 37.098214 | 209 | 0.559784 | false | 4.054542 | true | false | false |
Squeegee/vidis | convert_feeds.py | 1 | 56481 | #!/usr/bin/env python3
# -*- mode: python -*-
"""
Simple script for helping rename TV shows
"""
# TODO: Need support for custom in/out
# TODO: Need support for callable rename objects
# TODO: Use regex to get a list of all words in filename
# then make sure only ours exist in it
# If needed, use spell... | gpl-2.0 | 8,169,383,276,372,346,000 | 70.494937 | 141 | 0.344541 | false | 3.654782 | false | false | false |
closeio/tasktiger | tests/test_queue_size.py | 1 | 2787 | """Test max queue size limits."""
from multiprocessing import Process
import datetime
import os
import signal
import time
import pytest
from tasktiger import Task, Worker
from tasktiger.exceptions import QueueFullException
from .config import DELAY
from .tasks import decorated_task_max_queue_size, simple_task, slee... | mit | 4,320,719,270,570,761,000 | 29.966667 | 73 | 0.616792 | false | 3.930889 | true | false | false |
jessemyers/lxmlbind | lxmlbind/tests/test_personlist.py | 1 | 2797 | from copy import deepcopy
from nose.tools import assert_raises, eq_, ok_
from six import b
from lxmlbind.api import List, of, tag
from lxmlbind.tests.test_person import Person
@tag("person-list")
@of(Person)
class PersonList(List):
"""
Example using typed list.
"""
pass
def test_person_list():
... | apache-2.0 | 3,924,461,606,874,291,700 | 31.905882 | 153 | 0.638184 | false | 3.337709 | true | false | false |
consulo/consulo-python | plugin/src/main/dist/helpers/pydev/_pydevd_bundle/pydevd_dont_trace.py | 21 | 3780 | '''
Support for a tag that allows skipping over functions while debugging.
'''
import linecache
import re
from _pydevd_bundle.pydevd_constants import dict_contains
# To suppress tracing a method, add the tag @DontTrace
# to a comment either preceding or on the same line as
# the method definition
#
# E.g.:
# #@DontTra... | apache-2.0 | -3,880,196,339,799,125,500 | 28.76378 | 109 | 0.549735 | false | 4.204672 | false | false | false |
JQGoh/jqlearning | Simulation/PeriodicBoundary/python/ising_bc3.py | 1 | 2584 | #! /usr/bin/env python3
import textwrap
import argparse
import numpy as np
import random
import math
import time
proginfo = textwrap.dedent('''\
This python script compares the efficiencies of different schemes
implementing the periodic boundary conditions for Ising model problem.
Author: JQ e-mail: gohji... | gpl-3.0 | -7,825,178,804,035,132,000 | 30.901235 | 83 | 0.51161 | false | 3.554333 | false | false | false |
dbiesecke/dbiesecke.github.io | repo/service.vpn.manager/api.py | 1 | 2885 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Zomboided
#
# 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... | mit | 6,293,123,317,180,647,000 | 36.466667 | 103 | 0.614211 | false | 3.851802 | false | false | false |
grace1912-cmis/grace1912-cmis-cs2 | recursion.py | 1 | 1728 | #def countdown(n):
# if n<= 0:
# print "Blastoff!"
# else:
# print n
# countdown(n-1)
#def countup(n):
# if n == 10:
# print "Blastoff!"
# else:
# print n
# countup(n+1)
#def main():
# countdown(10)
# countup(-5)
#
#main()
#
#def count_up_from(start, stop):
# ... | cc0-1.0 | 1,118,823,374,739,786,500 | 18.2 | 58 | 0.506366 | false | 2.725552 | false | false | false |
adamretter/exist-nightly-build | generate-exist-dist-html-table.py | 1 | 4078 | #!/usr/bin/env python3
from os import walk
import os, re, sys, subprocess
from datetime import datetime
import argparse
###
## Generates a HTML table of eXist-db dist artifacts
###
tmp_dir="/tmp/exist-nightly-build/dist"
default_build_dir = tmp_dir + "/source"
default_output_dir = tmp_dir + "/target"
# parse comman... | bsd-3-clause | -5,322,992,537,409,844,000 | 38.211538 | 231 | 0.587788 | false | 3.291364 | false | false | false |
porter-liu/sync-tot | sync-tot.py | 1 | 3839 | #!/usr/bin/python
# Author: Porter Liu
import re
import sys
import json
import string
import urllib2
import os.path
from poster.encode import MultipartParam
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
# http://foo.com/allbuilds/iOS-client.123/InHouse_123.ipa
configu... | mit | -6,783,168,711,163,809,000 | 23.767742 | 154 | 0.67752 | false | 2.985226 | true | false | false |
kgao/MediaDrop | mediadrop/lib/tests/players_test.py | 1 | 1427 | # -*- coding: utf-8 -*-
# This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2014 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code in this file is dual licensed under the MIT license or
# the GPLv3 or (at your option) any later version.
... | gpl-3.0 | -6,628,470,833,905,030,000 | 39.771429 | 76 | 0.702873 | false | 3.867209 | true | false | false |
orospakr/hedgehoghd | hedgehoghd/importer/tile.py | 1 | 4085 | # HedgehogHD - Vector Graphics Platform Game Engine
# Copyright (C) 2010 Andrew Clunis <andrew@orospakr.ca>
# 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
... | gpl-3.0 | 1,766,584,052,791,250,700 | 48.817073 | 256 | 0.656304 | false | 3.595951 | false | false | false |
ZeroQI/Hama.bundle | Contents/Code/__init__.py | 1 | 14544 | # -*- coding: utf-8 -*-
#
# To Do
# - 'Debug' mode: logs per serie folder, need to use scanner logging
# - search word pick serie, do levenstein i partially match only (few chars difference)
### Imports ###
# Python Modules #
import re
import os
import datetime
# HAMA Modules #
import common # Functions: G... | gpl-3.0 | -3,552,288,789,778,248,700 | 83.55814 | 420 | 0.580033 | false | 3.545588 | false | false | false |
radical-software/mongrey | mongrey/validators.py | 1 | 3493 | # -*- coding: utf-8 -*-
import re
from .exceptions import ValidationError
from . import utils
from .constants import _
EMAIL_REGEX = re.compile(
# dot-atom
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"
# quoted-string
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013... | bsd-3-clause | 329,091,669,721,205,440 | 28.854701 | 95 | 0.590896 | false | 3.475622 | false | false | false |
lnls-fac/fieldmaptrack | fieldmaptrack/beam.py | 1 | 1160 | import math
import mathphys.constants as consts
import mathphys.units as units
import mathphys.constants as consts
class Beam:
def __init__(self, energy, current = 0):
self.energy = energy
self.current = current
self.brho, self.velocity, self.beta, self.gamma = Beam.calc_brho(self.energy)... | mit | 8,841,157,816,990,691,000 | 37.666667 | 121 | 0.583621 | false | 2.997416 | false | false | false |
tensorflow/federated | tensorflow_federated/python/simulation/baselines/emnist/digit_recognition_tasks.py | 1 | 8364 | # Copyright 2021, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 4,423,842,963,618,045,000 | 44.456522 | 88 | 0.724295 | false | 3.788043 | true | false | false |
litex-hub/pythondata-cpu-blackparrot | pythondata_cpu_blackparrot/system_verilog/bp_fe/test/tb/bp_fe_icache/trace_script.py | 1 | 1103 | #!/bin/usr/python
import sys, getopt
from trace_gen import TraceGen
def main():
tracer = TraceGen(39, 28, 32)
filepath = sys.argv[1]
filename = filepath + "test_load.tr"
file = open(filename, "w")
file.write(tracer.print_header())
file.write(tracer.print_comment("Load from address -... | bsd-3-clause | 1,709,599,234,293,871,900 | 23.068182 | 117 | 0.598368 | false | 2.925729 | false | false | false |
aroberge/reeborg-docs | src/python/reeborg_fr.py | 1 | 21637 | """Ce module contient les fonctions, classes et exceptions qui peuvent être
utilisées dans un programme Python pour le Monde de Reeborg.
"""
# When generating documentation using sphinx, these modules are both
# unavailable and not needed
try:
from browser import window
RUR = window.RUR
except ImportError:
... | cc0-1.0 | 2,362,399,738,499,656,700 | 30.866071 | 89 | 0.594004 | false | 3.121574 | false | false | false |
houseind/robothon | GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/distutils/mingw32ccompiler.py | 2 | 8852 | """
Support code for building Python extensions on Windows.
# NT stuff
# 1. Make sure libpython<version>.a exists for gcc. If not, build it.
# 2. Force windows to use gcc (we're struggling with MSVC and g77 support)
# 3. Force windows to use g77
"""
import os
import sys
import log
# Overwrite certa... | mit | -2,947,776,504,283,242,000 | 37.995595 | 96 | 0.549932 | false | 3.939475 | false | false | false |
PHOTOX/fuase | ase/ase/io/netcdftrajectory.py | 2 | 22214 | """
netcdftrajectory - I/O trajectory files in the AMBER NetCDF convention
More information on the AMBER NetCDF conventions can be found at
http://ambermd.org/netcdf/. This module supports extensions to
these conventions, such as writing of additional fields and writing to
HDF5 (NetCDF-4) files.
A Python NetCDF modul... | gpl-2.0 | -966,150,789,107,956,700 | 35.778146 | 85 | 0.555235 | false | 3.934467 | false | false | false |
tsotetsi/textily-web | temba/settings_common.py | 1 | 40330 | from __future__ import unicode_literals
import iptools
import os
import sys
from celery.schedules import crontab
from datetime import timedelta
from django.utils.translation import ugettext_lazy as _
# -----------------------------------------------------------------------------------
# Default to debugging
# ------... | agpl-3.0 | 4,250,592,255,089,422,300 | 31.868786 | 119 | 0.501389 | false | 4.141933 | true | false | false |
mariosv/twitter-network | src/collector.py | 1 | 2178 | # This file is part of twitter-followers.
#
# Copyright (C) 2013 Marios Visvardis <visvardis.marios@gmail.com>
#
# twitter-followers 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 Lice... | gpl-3.0 | 6,474,551,986,281,247,000 | 31.029412 | 78 | 0.610652 | false | 4.125 | false | false | false |
SCOAP3/scoap3 | www/nations.py | 1 | 32845 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014, 2015 CERN.
##
## Invenio 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 opt... | gpl-2.0 | 6,278,846,856,669,608,000 | 41.766927 | 349 | 0.507505 | false | 3.780937 | false | false | false |
jdemon519/cfme_tests | cfme/tests/containers/test_reports.py | 1 | 7753 | # -*- coding: utf-8 -*-
import re
import pytest
from cfme.containers.provider import ContainersProvider
from cfme.intelligence.reports.reports import CannedSavedReport
from utils import testgen
from utils.blockers import BZ
pytestmark = [
pytest.mark.usefixtures('setup_provider'),
pytest.mark.meta(
... | gpl-2.0 | 3,935,604,979,949,869,000 | 37.381188 | 98 | 0.613182 | false | 3.484494 | true | false | false |
gchrupala/imaginet | layers.py | 1 | 2037 | import theano
import theano.tensor as T
import passage.inits as inits
from theano.tensor.extra_ops import repeat
from passage.theano_utils import shared0s, floatX
### Directly compositional models
### Associative operators ###
class Add(object):
'''Elementwise addition.'''
def __init__(self, size):
... | mit | -3,363,936,435,873,267,000 | 30.338462 | 106 | 0.559647 | false | 3.344828 | false | false | false |
bird-house/bird-feeder | setup.py | 1 | 1481 | # -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup
version = '0.2.0'
description = 'Bird Feeder publishes Thredds metadata catalogs to a Solr index service with birdhouse schema.'
long_description = (
open('README.rst').read() + '\n' +
open('AUTHORS.rst').read() + '\n' +... | apache-2.0 | 4,515,275,595,300,078,000 | 27.480769 | 110 | 0.605672 | false | 3.826873 | false | true | false |
SGover/monopoly | gameGui.py | 1 | 19395 | from gui import guiButton
import time, sys, os
from constants import *
from random import randrange
import pygame
from pygame.locals import QUIT
from threading import Thread
X = 550
POPUP_TOP=100
POPUP_LEFT=200
POPUP_SIZE=(700,500)
class PopupWindow():
def __init__(self,massage,buttons,image=None,... | unlicense | 1,911,387,531,245,233,000 | 38.322245 | 211 | 0.516834 | false | 3.689367 | false | false | false |
davidcusatis/horizon | openstack_dashboard/api/rest/nova.py | 6 | 17795 | # Copyright 2014, Rackspace, US, 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 w... | apache-2.0 | -1,027,541,799,600,478,800 | 33.823875 | 79 | 0.583872 | false | 4.262275 | false | false | false |
olibre/CodingGoodPractices | python/samples/long_file_names_v2.py | 2 | 1553 | #!/usr/bin/env python3
import argparse
import collections
import pathlib # available since Python 3.4 (else install it using pip/pipenv/…)
import sys
# Parse command line arguments
parser = argparse.ArgumentParser(
prog="long-file-names",
description="For files having same size, print the file names longer t... | cc0-1.0 | -2,579,672,594,505,361,000 | 35.928571 | 97 | 0.694391 | false | 3.477578 | false | false | false |
tectronics/3account | imports/ofxml2flat.py | 1 | 16364 | ########################################################################
# Copyright (C) 2007,8,9 Ehud Ben-Reuven
# udi@benreuven.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation version 2... | gpl-2.0 | -5,259,371,252,796,897,000 | 43.832877 | 167 | 0.530188 | false | 3.760974 | false | false | false |
gizmag/django-generic-follow | generic_follow/model_mixins.py | 2 | 1513 | from django.contrib.contenttypes.models import ContentType
from .models import Follow
class UserFollowMixin(object):
def get_follow_set(self, model=None):
qs = Follow.objects.filter(
user=self
).prefetch_related('target')
if model:
model_type = ContentType.object... | mit | -430,271,871,194,127,400 | 27.54717 | 65 | 0.604759 | false | 3.88946 | false | false | false |
GoogleCloudPlatform/solutions-cloud-orchestrate | cli/src/orchestrate/commands/broker/machines/unassign.py | 1 | 3884 | # python3
# 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... | apache-2.0 | -230,905,375,245,548,830 | 30.072 | 87 | 0.67585 | false | 4.263447 | false | false | false |
failys/CAIRIS | cairis/core/RoleEnvironmentProperties.py | 2 | 1430 | # 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... | apache-2.0 | -7,146,271,404,292,756,000 | 42.333333 | 82 | 0.776224 | false | 4.144928 | false | false | false |
rg3915/spark | spark/events/models.py | 1 | 2745 | from django.db import models
from django.contrib.auth.models import User
from django.shortcuts import resolve_url as r
from spark.activities.models import Activity
class Event(models.Model):
user = models.ForeignKey(User)
title = models.CharField('título', max_length=200)
date_start = models.DateField('da... | mit | -7,333,217,467,340,034,000 | 28.728261 | 68 | 0.619744 | false | 3.835905 | false | false | false |
henryhallam/piksi_tools | piksi_tools/console/console.py | 1 | 12523 | #!/usr/bin/env python
# Copyright (C) 2011-2014 Swift Navigation Inc.
# Contact: Fergus Noble <fergus@swift-nav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS... | lgpl-3.0 | -7,748,614,377,926,515,000 | 35.616959 | 98 | 0.667093 | false | 3.729303 | true | false | false |
bioinfo-core-BGU/neatseq-flow_modules | neatseq_flow_modules/Liron/RSEM_module/Merge_RSEM.py | 1 | 1404 | import os, re
import sys
import pandas as pd
files= sys.argv[1:]
flag=0
for file_name in files:
temp_data = pd.read_csv(file_name, sep='\t',index_col=0)
sample=file_name.split(os.sep)[-1]
path=file_name.rstrip(sample).rstrip(os.sep)
if sample.endswith('.genes.results'):
sample=sample.rstrip('.genes.results')
... | gpl-3.0 | 4,188,589,171,506,673,000 | 31.674419 | 79 | 0.690171 | false | 2.391823 | false | false | false |
dahak-metagenomics/dahak | workflows/functional_inference/antibiotic_resistance/antibiotic_res.py | 1 | 5001 | from __future__ import print_function
from clustergrammer_widget import *
#from antibiotic_res import *
from ipywidgets import interact, interactive, fixed, interact_manual
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import glob
import qgrid
import numpy as np
def concat_abricate_file... | bsd-3-clause | -1,330,198,413,099,557,000 | 31.057692 | 78 | 0.670466 | false | 3.388211 | false | false | false |
dwhagar/snowboard | snowboard/userChannel.py | 1 | 1845 | # This file is part of snowboard.
#
# snowboard 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.
#
# snowboard is distributed in the hop... | gpl-3.0 | 1,624,387,356,584,009,200 | 33.185185 | 75 | 0.678591 | false | 4.028384 | false | false | false |
KenV99/testRenderCapture | resources/lib/utils/rolling_stats.py | 1 | 4234 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 KenV99
#
# 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) a... | gpl-2.0 | -3,416,934,110,689,314,000 | 29.028369 | 102 | 0.557865 | false | 3.82821 | false | false | false |
esbanarango/random_real_address | support/get_address.py | 1 | 1500 | #Created by Liang Sun <i@liangsun.org> in 2012
import urllib2
import re, json, time,hashlib, random
import MultipartPostHandler
from gevent import pool
from gevent import monkey
from urllib2 import URLError, HTTPError
monkey.patch_all()
def get_address():
u = 100000.0
v = 1000000.0
longitude = int(rando... | mit | 7,659,958,008,000,969,000 | 31.630435 | 133 | 0.608667 | false | 3.740648 | false | false | false |
xuegang/gpdb | src/test/tinc/tincrepo/mpp/lib/gpstop.py | 9 | 6328 | """
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the 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 | -4,920,722,707,538,082,000 | 36.005848 | 220 | 0.606511 | false | 4 | true | false | false |
rspavel/spack | var/spack/repos/builtin/packages/superlu/package.py | 3 | 3630 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import glob
import os
class Superlu(Package):
"""SuperLU is a general purpose library for the di... | lgpl-2.1 | -3,001,714,705,535,062,500 | 34.940594 | 95 | 0.54022 | false | 3.514037 | true | false | false |
endlessm/chromium-browser | third_party/chromite/cros_bisect/chrome_on_cros_bisector_unittest.py | 1 | 24193 | # -*- coding: utf-8 -*-
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Test chrome_on_cros_bisector module."""
from __future__ import print_function
import copy
import itertools
import os
import ... | bsd-3-clause | 2,018,605,499,905,117,400 | 41.743816 | 80 | 0.702476 | false | 3.266676 | true | false | false |
t-yanaka/zabbix-report | customer_api/api/migrations/0005_auto_20170727_1529.py | 1 | 1388 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-27 06:29
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0004_auto_20170725_... | mit | -8,209,237,910,542,917,000 | 36.513514 | 147 | 0.636888 | false | 3.813187 | false | false | false |
klahnakoski/cloc | cloc/util/thread/multiprocess.py | 1 | 2859 | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import unicode_literals
from __fu... | mpl-2.0 | -4,370,935,611,232,605,700 | 25.472222 | 93 | 0.580972 | false | 3.842742 | false | false | false |
ric2b/Vivaldi-browser | chromium/tools/perf/benchmarks/dummy_benchmark.py | 2 | 1650 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Dummy benchmarks for the bisect FYI integration tests.
The number they produce aren't meant to represent any actual performance
data of the browser. For m... | bsd-3-clause | 7,245,285,478,421,240,000 | 27.448276 | 77 | 0.734545 | false | 3.666667 | true | false | false |
guo-xuan/Sipros-Ensemble | Scripts/HierarchicalClustering.py | 1 | 1992 |
#!/usr/bin/python
import sys, getopt, warnings, os, re
def mergeClosestClusters (CandidateCluster, distanceThreshold) :
bReVal = True
firstBestCulsterId = -1
secondBestCulsterId = -1
#print CandidateCluster
for i in range(len(CandidateCluster) - 1) :
averageFirst = sum(CandidateCluster[i])/float(len(Cand... | gpl-3.0 | 6,426,118,372,494,261,000 | 33.344828 | 96 | 0.729418 | false | 3.331104 | false | false | false |
onema/evee | evee/generic_event.py | 1 | 1477 | #
# This file is part of the onema.io evee Package.
# For the full copyright and license information,
# please view the LICENSE file that was distributed
# with this source code.
#
# @author Juan Manuel Torres <software@onema.io>
#
from collections import MutableMapping
from evee.event import Event
class GenericEvent... | mit | -4,976,885,365,516,149,000 | 24.465517 | 66 | 0.590386 | false | 4.22 | false | false | false |
LeonardCohen/coding | py/ExtractTxt.py | 1 | 1279 | # Python 3.4 on Mac OS X
import glob
import re
import csv
from pandas import DataFrame,Series
class Jd:
def __init__(self):
self.ls = []
def file_list(self, path):
self.file_list = glob.glob(path)
def contents(self, f_name):
with open(f_name) as f:
# readlines don... | gpl-2.0 | 7,452,650,952,246,396,000 | 23.132075 | 71 | 0.521501 | false | 3.279487 | false | false | false |
collective/collective.subsitebehaviors | src/collective/subsitebehaviors/browser/cssviewlet.py | 1 | 2489 | import re
from plone import api
from plone.app.layout.viewlets.common import ViewletBase
from plone.app.layout.navigation.root import getNavigationRoot
#from ftw.subsite.interfaces import ISubsite
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from ..behaviors import ISubSite
from ..utils impo... | gpl-2.0 | -163,639,943,893,151,740 | 32.635135 | 94 | 0.634793 | false | 3.622999 | false | false | false |
yaoshengzhe/vitess | py/vtdb/vtgate_utils.py | 1 | 4537 | import logging
import re
import time
from vtdb import dbexceptions
from vtdb import vtdb_logger
from vtproto import vtrpc_pb2
INITIAL_DELAY_MS = 5
NUM_RETRIES = 3
MAX_DELAY_MS = 100
BACKOFF_MULTIPLIER = 2
def log_exception(exc, keyspace=None, tablet_type=None):
"""This method logs the exception.
Args:
exc:... | bsd-3-clause | -2,225,089,024,428,708,000 | 29.863946 | 78 | 0.668724 | false | 3.831926 | false | false | false |
DAInamite/uav_position_controller | path_follower/src/path_follower_test.py | 1 | 2566 | #! /usr/bin/env python
import roslib
roslib.load_manifest('path_follower')
import rospy
# Brings in the SimpleActionClient
import actionlib
# Brings in the messages used by the fibonacci action, including the
# goal message and the result message.
import path_follower.msg
import math
from tf.transformations import... | gpl-3.0 | -6,383,331,141,924,541,000 | 27.197802 | 93 | 0.692907 | false | 3.28133 | false | false | false |
cgranade/python-quaec | src/qecc/circuit.py | 1 | 23198 | #!/usr/bin/python
# -*- coding: utf-8 -*-
##
# circuit.py: Modeling for stabilizer circuits.
##
# © 2012 Christopher E. Granade (cgranade@gmail.com) and
# Ben Criger (bcriger@gmail.com).
# This file is a part of the QuaEC project.
# Licensed under the AGPL version 3.
##
# This program is free software: you can redi... | agpl-3.0 | 5,946,945,021,224,020,000 | 34.253799 | 126 | 0.555158 | false | 3.919074 | false | false | false |
Bachmann1234/diff-cover | setup.py | 1 | 1920 | #!/usr/bin/env python
import os
from setuptools import setup
from diff_cover import VERSION, DESCRIPTION
REQUIREMENTS = [line.strip() for line in
open(os.path.join("requirements", "requirements.txt")).readlines()]
setup(
name='diff_cover',
version=VERSION,
author='Matt Bachmann',
url='... | apache-2.0 | 3,118,059,828,008,584,700 | 44.714286 | 92 | 0.56875 | false | 4.528302 | false | false | false |
tryolabs/luminoth | luminoth/models/ssd/feature_extractor.py | 1 | 5954 | import sonnet as snt
import tensorflow as tf
from sonnet.python.modules.conv import Conv2D
from tensorflow.contrib.layers.python.layers import utils
from luminoth.models.base import BaseNetwork
VALID_SSD_ARCHITECTURES = set([
'truncated_vgg_16',
])
class SSDFeatureExtractor(BaseNetwork):
def __init__(sel... | bsd-3-clause | 2,943,543,094,307,964,000 | 41.22695 | 79 | 0.545516 | false | 3.650521 | false | false | false |
CenterForOpenScience/modular-file-renderer | mfr/extensions/image/render.py | 2 | 1613 | import os
import furl
from mako.lookup import TemplateLookup
from mfr.core import extension
from mfr.extensions.image import settings
from mfr.extensions.utils import munge_url_for_localdev, escape_url_for_template
class ImageRenderer(extension.BaseRenderer):
TEMPLATE = TemplateLookup(
directories=[
... | apache-2.0 | -63,360,576,098,337,810 | 34.844444 | 108 | 0.66398 | false | 3.691076 | false | false | false |
battlemidget/conjure-up | conjureup/juju.py | 1 | 18086 | """ Juju helpers
"""
import os
import sys
from concurrent import futures
from functools import partial, wraps
from subprocess import DEVNULL, PIPE, CalledProcessError, Popen, TimeoutExpired
import yaml
import macumba
from bundleplacer.charmstore_api import CharmStoreID
from conjureup import async
from conjureup.app_c... | mit | 3,829,067,942,046,718,000 | 29.244147 | 79 | 0.594493 | false | 4.130167 | true | false | false |
javazquez/vertx-web | src/test/sockjs-protocol/venv/lib/python2.7/site-packages/ws4py/streaming.py | 13 | 8217 | # -*- coding: utf-8 -*-
from ws4py.messaging import TextMessage, BinaryMessage, CloseControlMessage,\
PingControlMessage, PongControlMessage
from ws4py.framing import Frame, OPCODE_CONTINUATION, OPCODE_TEXT, \
OPCODE_BINARY, OPCODE_CLOSE, OPCODE_PING, OPCODE_PONG
from ws4py.exc import FrameTooLargeException, ... | apache-2.0 | -558,925,618,375,780,300 | 34.726087 | 99 | 0.539978 | false | 5.311571 | false | false | false |
seize-the-dave/XlsxWriter | xlsxwriter/test/comparison/test_types05.py | 8 | 1978 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | -7,885,417,370,544,912,000 | 27.666667 | 79 | 0.581901 | false | 3.732075 | true | false | false |
jpablio/Directrices-JPV | tools/copy_branches.py | 21 | 4362 | # -*- coding: utf-8 -*-
"""
Dependency:
`git-remote-bzr` from https://github.com/felipec/git-remote-bzr
must be in the `$PATH`.
"""
from __future__ import absolute_import, print_function
import argparse
import os
import subprocess
from contextlib import contextmanager
from pkg_resources import resource_str... | agpl-3.0 | -3,905,283,719,602,350,000 | 32.553846 | 76 | 0.545621 | false | 3.969063 | false | false | false |
aewallin/allantools | tests/realtime/test_rt_nbs14_1k.py | 2 | 4384 | """
NBS14 test for allantools (https://github.com/aewallin/allantools)
nbs14 datasets are from http://www.ieee-uffc.org/frequency-control/learning-riley.asp
Stable32 was used to calculate the deviations we compare against.
The small dataset and deviations are from
http://www.ieee-uffc.org/frequency-contr... | lgpl-3.0 | 8,062,652,023,265,584,000 | 43.282828 | 137 | 0.614051 | false | 2.642556 | true | false | false |
Passw/gn_GFW | build/android/pylib/local/device/local_device_linker_test_run.py | 5 | 2336 | # 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 logging
import sys
import traceback
from pylib.base import base_test_result
from pylib.linker import test_case
from pylib.local.device import local_d... | gpl-3.0 | -3,789,683,687,704,482,300 | 29.736842 | 78 | 0.689212 | false | 3.773829 | true | false | false |
Peilonrayz/instruction-follower | src/instruction_follower/hrm.py | 1 | 7959 | import re
import string
class HRMException(Exception):
pass
class TileError(HRMException):
def __init__(self, data):
super().__init__(
"Bad tile address! "
"Tile with address {} does not exist! "
"Where do you think you're going?".format(data)
)
class Ou... | mit | 7,252,481,977,393,019,000 | 24.186709 | 94 | 0.535746 | false | 3.839363 | false | false | false |
flacjacket/qtile | libqtile/widget/gmail_checker.py | 3 | 2668 | # Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 zordsdavini
# Copyright (c) 2014 Alexandr Kriptonov
# Copyright (c) 2014 Tycho Andersen
#
# 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 wi... | mit | -2,250,641,655,460,438,800 | 41.349206 | 79 | 0.651049 | false | 3.994012 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_while_loop_op.py | 2 | 23080 | # Copyright (c) 2018 PaddlePaddle 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 appli... | apache-2.0 | -7,682,790,755,158,995,000 | 39.209059 | 94 | 0.541681 | false | 3.651899 | true | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/mini/image_replication/test_replicate_iso_image.py | 1 | 1246 | '''
New Integration test for image replication.
@author: Legion
'''
import os
import time
import random
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
image_name = 'iso-image-replication-test-' + time.strftime('%y%m%d%H%M%S', time.localtime())
test_stub = test_lib.lib_ge... | apache-2.0 | 1,099,374,511,047,678,200 | 22.980769 | 92 | 0.668539 | false | 3.046455 | true | false | false |
StefanRijnhart/partner-contact | partner_firstname/__openerp__.py | 7 | 1822 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi. Copyright Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by t... | agpl-3.0 | -7,672,724,424,427,872,000 | 33.377358 | 78 | 0.587816 | false | 3.96087 | false | false | false |
atomic-labs/zulip | zerver/management/commands/create_stream.py | 9 | 1146 | from __future__ import absolute_import
from __future__ import print_function
from django.core.management.base import BaseCommand
from zerver.lib.actions import do_create_stream
from zerver.models import Realm, get_realm
import sys
class Command(BaseCommand):
help = """Create a stream, and subscribe all active u... | apache-2.0 | -5,861,407,564,355,417,000 | 32.705882 | 79 | 0.644852 | false | 4.374046 | false | false | false |
annahs/atmos_research | AL_incand_calib_SP244.py | 1 | 3411 | import sys
import os
import datetime
import pickle
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.colors as colors
from pprint import pprint
import sqlite3
import calendar
from datetime import datetime
from datetime import timedelta
import math
import numpy.polynomial.po... | mit | -5,794,640,837,672,244,000 | 25.045802 | 106 | 0.673116 | false | 2.186538 | false | false | false |
lutris/lutris | lutris/services/steam.py | 1 | 6617 | """Steam service"""
import json
import os
from gettext import gettext as _
from gi.repository import Gio
from lutris import settings
from lutris.config import LutrisConfig, write_game_config
from lutris.database.games import add_game, get_game_by_field, get_games
from lutris.database.services import ServiceGameCollec... | gpl-3.0 | 8,328,365,703,079,465,000 | 34.385027 | 116 | 0.612211 | false | 3.508484 | true | false | false |
darencard/RADpipe | process_rawreads.py | 1 | 15286 | #!/usr/bin/env python
##print __name__
import re
import sys
import os
import optparse
import subprocess
usage_line = """
process_rawreads.py
Version 2.0 (2 December, 2014)
License: GNU GPLv2
To report bugs or errors, please contact Daren Card (dcard@uta.edu).
This script is provided as-is, with no support and no gu... | gpl-2.0 | 7,832,913,055,881,202,000 | 54.384058 | 425 | 0.611278 | false | 2.983216 | false | false | false |
datasciencesg/knowledge-base | MOOC/Computer-Science-and-Python/Lecture 9.py | 1 | 1648 | class intSet(object):
"""An intSet is a set of integers
The value is represented by a list of ints, self.vals.
Each int in the set occurs in self.vals exactly once."""
def __init__(self):
"""Create an empty set of integers"""
self.vals = []
def insert(self, e):
"""Assumes e... | mit | -147,776,047,993,633,660 | 27.912281 | 79 | 0.536408 | false | 4.140704 | false | false | false |
LearnPythonAndMakeGames/BasicPythonTutorialSeries | basic_tutorials/loops.py | 1 | 1425 | import random
def attack(attack_power, percent_to_hit, percent_to_critical=0.01):
"""Calculates the damage done based on attack power and percent to
hit. Also calculates critical strike.
Parameters:
attack_power - attack power
percent_to_hit - percent to hit
Optional:
percen... | apache-2.0 | 1,480,331,657,702,606,000 | 28.6875 | 72 | 0.666667 | false | 3.544776 | false | false | false |
philippgovernale/dijkstrapy | mathfuncs.py | 1 | 1868 | import math
from decimal import *
from fractions import Fraction
def cube_root(operand):
'''Return the cube root of x'''
power = 1 / 3.0
result = math.pow(operand, power)
return result
def sci_notation(operand1, operand2):
'''scientific notation. For nums x and y retuns x *10^y'''
... | gpl-3.0 | 8,808,939,666,276,561,000 | 30.77193 | 100 | 0.620985 | false | 3.751004 | false | false | false |
0x1mason/GribApi.XP | grib_api/examples/python/bufr_read_synop.py | 1 | 2952 | # Copyright 2005-2017 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernme... | apache-2.0 | -3,858,405,223,084,148,700 | 27.384615 | 78 | 0.631436 | false | 3.789474 | false | false | false |
YoeriDijkstra/iFlow | packages/semi_analytical2DV/hydro/HydroLead.py | 1 | 8896 | """
Date: 01-06-15
Authors: R.L. Brouwer
"""
import logging
import numpy as np
from nifty.functionTemplates.NumericalFunctionWrapper import NumericalFunctionWrapper
import nifty as ny
from zetaFunctionUncoupled import zetaFunctionUncoupled
from src.util.diagnostics import KnownError
class HydroLead:
# Variables
... | lgpl-3.0 | 5,931,138,916,524,291,000 | 39.072072 | 231 | 0.520459 | false | 2.822335 | false | false | false |
stggh/PyAbel | abel/direct.py | 2 | 8751 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
from .tools.math import gradient
try:
from .lib.direct import _cabel_direct_integral
cython_ext = True
except (ImportE... | mit | 7,123,239,178,088,770,000 | 35.405858 | 79 | 0.59407 | false | 3.747201 | false | false | false |
shaoziyang/SensorTilePocketWatch | src/main.py | 1 | 4685 | # SensorTile Poket watch
# by shaoziyang 2017
# http://www.micropython.org.cn
# https://github.com/shaoziyang/SensorTilePocketWatch
import pyb
from st import SensorTile
from pyb import Timer, Pin, ExtInt, RTC
from micropython import const
import baticon
SLEEPCNT = const(18)
SW_PIN = 'PG11'
VUSB_PIN = '... | mit | -1,308,226,705,722,466,000 | 22.149485 | 80 | 0.47492 | false | 2.645398 | false | false | false |
zzz0072/Python_Exercises | 07_RSI/ch01/logic_gate.py | 1 | 4604 | #!/usr/bin/env python3
class LogicGate:
def __init__(self, label):
self.name = label
self.output = None
def getName(self):
return self.name
def getOutput(self):
self.output = self.calcLogicOutput()
return self.output
class BinaryGate(LogicGate):
def __init__(s... | bsd-2-clause | 6,697,281,215,483,313,000 | 23.104712 | 72 | 0.54735 | false | 3.256011 | false | false | false |
itucsdb1616/itucsdb1616 | messageList.py | 1 | 2294 | import psycopg2 as dbapi2
from flask import current_app
from message import Message
from flask_login import current_user
class MessageList:
def __init__(self):
self.messages = {}
self.last_key = 0
def add_message(self, message):
connection = dbapi2.connect(current_app.config['dsn'])
... | gpl-3.0 | 7,035,937,284,581,702,000 | 52.372093 | 324 | 0.677855 | false | 3.652866 | false | false | false |
imsut/commons | src/python/twitter/pants/commands/filemap.py | 2 | 1912 | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 | -1,253,404,614,502,270,200 | 39.680851 | 100 | 0.600418 | false | 4.552381 | false | false | false |
simvisage/aramis_cdt | aramis_cdt/npy_gen/aramis_npy_gen.py | 1 | 8720 | #-------------------------------------------------------------------------------
#
# Copyright (c) 2013
# IMB, RWTH Aachen University,
# ISM, Brno University of Technology
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in the AramisCDT top directory "... | bsd-3-clause | 3,170,812,733,524,312,600 | 35.033058 | 91 | 0.54656 | false | 3.489396 | false | false | false |
sserrot/champion_relationships | venv/Lib/site-packages/networkx/algorithms/bipartite/basic.py | 1 | 8118 | # -*- coding: utf-8 -*-
"""
==========================
Bipartite Graph Algorithms
==========================
"""
# Copyright (C) 2013-2019 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx... | mit | -4,047,282,145,665,920,000 | 25.442997 | 78 | 0.574526 | false | 3.852871 | false | false | false |
mstojek/pms5003-logger | pmlog.py | 1 | 8814 | #!/usr/bin/python
import sys
import os
import time
import signal
import struct
import logging
import argparse
from collections import namedtuple
from threading import Event
from periphery import GPIO, Serial
import urllib
import urllib2
logging.basicConfig(level=logging.DEBUG, stream=sys.stderr,
... | bsd-3-clause | -835,108,918,223,888,900 | 32.513308 | 130 | 0.609145 | false | 3.263236 | false | false | false |
masayukig/tempest | tempest/lib/services/volume/v3/versions_client.py | 1 | 2391 | # Copyright 2017 NEC Corporation. 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 ... | apache-2.0 | -7,938,392,986,946,735,000 | 37.564516 | 82 | 0.675031 | false | 3.998328 | false | false | false |
Samfox2/motioneye | setup.py | 1 | 2175 |
import os.path
import subprocess
from codecs import open
from setuptools.command.sdist import sdist
from setuptools import setup
import motioneye
here = os.path.abspath(os.path.dirname(__file__))
name = 'motioneye'
version = motioneye.VERSION
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
... | gpl-3.0 | -6,330,338,415,794,202,000 | 21.894737 | 113 | 0.594023 | false | 3.717949 | false | false | false |
jcastrojob/kata_tucan | main.py | 1 | 1738 | __author__ = 'jcastro'
from tournament import Tournament
import abc
class Game(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def calculate_score(self, score):
"""Returns final score for player"""
class Basketball(Game):
point_position = {
'G': [2, 3, 1],
'F': [... | apache-2.0 | 8,572,080,306,230,914,000 | 27.508197 | 76 | 0.662831 | false | 2.767516 | false | false | false |
mayfield/ecmcli | ecmcli/commands/clients.py | 1 | 6055 | """
Harvest a detailed list of clients seen by online routers.
"""
import itertools
import pickle
import pkg_resources
from . import base
class List(base.ECMCommand):
""" Show the currently connected clients on a router. The router must be
connected to ECM for this to work. """
# XXX Broken when len(clie... | mit | -3,376,188,361,616,969,000 | 32.826816 | 76 | 0.490834 | false | 3.687576 | false | false | false |
josh-willis/pycbc | pycbc/inference/io/emcee_pt.py | 4 | 4898 | # Copyright (C) 2018 Collin Capano
# 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
# self.option) any later version.
#
# This program is distributed ... | gpl-3.0 | 7,250,579,334,593,895,000 | 34.751825 | 78 | 0.621478 | false | 4.25543 | false | false | false |
davidparks21/qso_lya_detection_pipeline | dla_cnn/scripts/analyze_sl.py | 1 | 1607 | #!/usr/bin/env python
"""
Script to generate a PDF of desired sightline
Requires specdb for the spectral data
"""
import pdb
def parser(options=None):
import argparse
# Parse
parser = argparse.ArgumentParser(
description='Analyze the desired sightline and generate a PDF (v1.0)')
parser.add_ar... | mit | 1,677,781,577,510,265,600 | 30.509804 | 82 | 0.625389 | false | 3.587054 | false | false | false |
jwalgran/otm-core | opentreemap/treemap/search_fields.py | 4 | 12102 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext_noop
import copy
import re
from tree... | gpl-3.0 | -6,159,999,500,896,712,000 | 35.451807 | 79 | 0.580648 | false | 3.841905 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.