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
alanamarzoev/ray
examples/resnet/resnet_main.py
1
10342
"""ResNet training script, with some code from https://github.com/tensorflow/models/tree/master/resnet. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import numpy as np import ray import tensorflow as tf import cifar_input i...
apache-2.0
-5,645,280,256,001,279,000
40.870445
79
0.582092
false
cloudpassage/cloudpassage-halo-python-sdk
tests/unit/test_unit_time_series.py
1
4989
import imp import os import sys module_name = 'cloudpassage' here_dir = os.path.dirname(os.path.abspath(__file__)) module_path = os.path.join(here_dir, '../../') sys.path.append(module_path) fp, pathname, description = imp.find_module(module_name) cloudpassage = imp.load_module(module_name, fp, pathname, description)...
bsd-3-clause
6,205,206,224,620,900,000
36.511278
79
0.479254
false
bhallen/pyparadigms
hypothesize.py
1
15896
#!/usr/bin/env python # -*- coding: utf-8 -*- ## Based on learner.js (by Blake Allen and Michael Becker) import itertools import collections from collections import defaultdict import pdb import phoment class Change(object): def __init__(self, change_type, position, input_material, output_material): ...
bsd-3-clause
7,371,574,551,307,887,000
40.288312
168
0.631605
false
soycode/moodrec
moodrun1k/moods.py
1
3691
import csv import shelve import sys csv.field_size_limit(sys.maxsize) artistmoods = shelve.open('../artistmoods') moods = set() for artist in artistmoods.iterkeys(): artistmood = artistmoods[artist] for mood in artistmood: moods.add(mood['name']) moods = list(moods) moods.sort() # Extended from the User cl...
gpl-2.0
-5,225,232,916,888,518,000
28.062992
96
0.642915
false
amsjavan/nazarkav
nazarkav/webkit2png.py
1
16613
# # webkit2png.py # # Creates screenshots of webpages using by QtWebkit. # # Copyright (c) 2014 Roland Tapken <roland@dau-sicher.de> # # 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 vers...
mit
-625,004,899,157,084,000
38.649165
117
0.625293
false
tsl143/addons-server
src/olympia/devhub/urls.py
1
9375
from django.conf.urls import include, url from django.shortcuts import redirect from olympia.addons.urls import ADDON_ID from olympia.amo.decorators import write from olympia.amo.utils import partial from olympia.lib.misc.urlconf_decorator import decorate from . import views # These will all start with /theme/<slug...
bsd-3-clause
478,325,609,368,912,600
41.22973
79
0.63936
false
micahflee/onionshare
desktop/src/onionshare/gui_common.py
1
16248
# -*- coding: utf-8 -*- """ OnionShare | https://onionshare.org/ Copyright (C) 2014-2021 Micah Lee, et al. <micah@micahflee.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, either version 3 of t...
gpl-3.0
2,617,138,760,176,123,000
34.017241
87
0.44824
false
adapt-sjtu/novelner
tagger/model.py
1
17080
import os import re import numpy as np import scipy.io import theano import theano.tensor as T import codecs import cPickle from utils import shared, set_values, get_name from nn import HiddenLayer, EmbeddingLayer, DropoutLayer, LSTM, forward from optimization import Optimization class Model(object): """ Net...
apache-2.0
300,547,003,319,218,800
35.810345
136
0.508255
false
motmot/imops
setup.py
1
1066
import sys, os from setuptools import setup, Extension, find_packages from Cython.Build import cythonize from os import path from io import open import numpy # read the contents of README.md this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:...
bsd-3-clause
553,663,294,325,229,500
29.457143
80
0.642589
false
TheAlgorithms/Python
graphs/even_tree.py
1
1298
""" You are given a tree(a simple connected graph with no cycles). The tree has N nodes numbered from 1 to N and is rooted at node 1. Find the maximum number of edges you can remove from the tree to get a forest such that each connected component of the forest contains an even number of nodes. Constraints 2 <= 2 <= 1...
mit
1,298,205,461,650,645,500
21
85
0.581664
false
dudenzz/word_embedding
SimilarityClassification/answerQuestions.py
1
3433
__author__ = 'Asus' import sys import getopt from QuestionsHandling.QuestionBase import QuestionBase from Classifiers.GloveCenteredESLExtendedClassifier import GloveClassifier from Utils.utilities import load_stf from Utils.retrofitNew_gloveInstance import retrofit_new from Utils.retrofitNew_gloveInstance im...
mit
7,637,306,048,456,511,000
36.573034
158
0.615497
false
mgymrek/pybeeswarm
beeswarm/beeswarm.py
1
10563
""" The MIT License (MIT) Copyright (c) 2014 Melissa Gymrek <mgymrek@mit.edu> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
mit
3,856,150,292,374,446,600
39.163498
126
0.584304
false
cwharland/data-science-from-scratch
wwd.py
1
7248
from __future__ import division from collections import defaultdict import math from sgd import * from collections import Counter import random import matplotlib.pyplot as plt from probability import * from stats import * from functools import partial def bucketize(point, bucket_size): return bucket_...
mit
5,590,543,377,666,559,000
30.954545
102
0.604719
false
great-expectations/great_expectations
tests/datasource/batch_kwarg_generator/test_query_generator.py
1
4512
import os import shutil import pytest try: sqlalchemy = pytest.importorskip("sqlalchemy") except ImportError: sqlalchemy = None from great_expectations.data_context.util import file_relative_path from great_expectations.datasource import LegacyDatasource from great_expectations.datasource.batch_kwargs_genera...
apache-2.0
7,402,126,259,185,612,000
36.915966
88
0.712766
false
smsolivier/VEF
tex/paper/hlimit.py
1
2458
#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt import sys sys.path.append('../../code') import ld as LD from hidespines import * ''' compares difference between Sn and moment equations as cell width --> 0 ''' if (len(sys.argv) > 1): outfile = sys.argv[1] else: outfile = None de...
mit
5,748,935,003,737,435,000
24.340206
83
0.615541
false
mfalesni/cfme_tests
cfme/tests/cloud_infra_common/test_power_control_rest.py
1
6593
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.common.provider import BaseProvider from cfme.common.vm import VM from cfme.utils.generators import random_vm_name from cfme.utils.wait import wait_for from cfme.utils.log import logger from cfme.cloud.provider.azure import AzureProvide...
gpl-2.0
-5,090,317,543,301,633,000
29.523148
98
0.652359
false
teddavis4/colette
search.py
1
1090
#!/usr/bin/env python """Colette search.""" from telegram.ext.dispatcher import run_async from yahoo_finance import Share from google import google class Search: """Do searches for things (google, stocks, images, etc).""" def __init__(self, testing=False): """Assign variables.""" self.testin...
gpl-3.0
2,334,442,321,090,832,400
32.030303
75
0.597248
false
datapythonista/pandas
pandas/tests/reshape/concat/test_series.py
3
5130
import numpy as np import pytest from pandas import ( DataFrame, DatetimeIndex, Index, MultiIndex, Series, concat, date_range, ) import pandas._testing as tm @pytest.fixture(params=[True, False]) def sort(request): """Boolean sort keyword for concat and DataFrame.append.""" return...
bsd-3-clause
-8,145,027,820,987,096,000
33.2
88
0.547173
false
blancltd/blanc-basic-events
blanc_basic_events/migrations/0001_initial.py
1
2350
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import blanc_basic_assets.fields class Migration(migrations.Migration): dependencies = [ ('assets', '__first__'), ] operations = [ migrations.CreateModel( name='Recurring...
bsd-3-clause
-8,498,544,057,141,926,000
46.959184
223
0.555319
false
openregister/schools
application/views.py
1
2272
import requests from flask import ( Blueprint, render_template, abort, current_app ) from application.utils import log_traceback application = Blueprint('application', __name__) headers = {'Content-Type': 'application/json'} def get_address(school): address = school['entry']['address'] url...
mit
4,491,672,232,783,377,000
28.128205
71
0.605194
false
ViennaRNA/forgi
examples/graph_to_rosetta_adjacent_stems.py
1
4339
#!/usr/bin/python from __future__ import print_function from builtins import zip from builtins import range import sys import math import os import forgi.graph.bulge_graph as cgb import forgi.utilities.debug as cud import forgi.utilities.stuff as cus from optparse import OptionParser def print_rosetta_constraints(b...
gpl-3.0
405,576,846,313,812,400
31.140741
109
0.563494
false
code-iai/semrec
scripts/bstools/Beliefstate Tools/ExperienceProcessor/expproc/Visualization_ui.py
1
4617
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Processor.ui' # # Created: Wed Jul 29 08:15:05 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
bsd-2-clause
-2,965,202,111,415,315,000
49.736264
103
0.727096
false
heniancheng/FRODO
experiments/party_experiment.py
1
4431
""" FRODO: a FRamework for Open/Distributed Optimization Copyright (C) 2008-2013 Thomas Leaute, Brammert Ottens & Radoslaw Szymanek FRODO is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 o...
agpl-3.0
6,178,170,138,184,121,000
46.645161
130
0.738885
false
skosukhin/spack
var/spack/repos/builtin/packages/libgpuarray/package.py
1
1884
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
7,487,290,424,120,790,000
42.813953
78
0.681529
false
rh-s/heat
heat/tests/test_stack.py
1
94598
# # 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 # ...
apache-2.0
4,650,135,444,307,856,000
40.74669
79
0.559208
false
jjdmol/LOFAR
RTCP/Cobalt/GPUProc/test/t_generate_globalfs_locations.py
1
1706
#!/usr/bin/env python import unittest # Be able to find service python file import sys, os sys.path.insert(0, "{srcdir}/../src/scripts".format(**os.environ)) import generate_globalfs_locations as ggl from lofar.parameterset import PyParameterSet class ReplaceHost(unittest.TestCase): def test_replace(self): #...
gpl-3.0
7,301,227,709,670,433,000
31.188679
106
0.684642
false
PU-Crypto/RSA
verschlüsseln.py
1
2550
#Verschlüsselung import sys #implemention begin # source : https://gist.github.com/avalonalex/2122098 def int2baseTwo(x): #ermöglicht rechnung mit sehr großen zahlen bei geringen ressourcen # x is a positive integer. Convert it to base two as a list of integers in reverse order.""" # repeating x >>= 1 and x ...
lgpl-3.0
3,790,945,514,735,416,300
38.625
181
0.689941
false
sergpolly/Thermal_adapt_scripts
BOOTSTRAPS/Equal_Cherry_composition_analysis_Thermo_Rnd.py
1
9800
import pandas as pd import os import subprocess as sub import re import sys from Bio import SeqUtils import matplotlib.pyplot as plt import numpy as np from scipy import stats path = os.path.join(os.path.expanduser('~'),'GENOMES_BACTER_RELEASE69/genbank') # ['DbxRefs','Description','FeaturesNum','GenomicID','Genomi...
mit
-8,209,443,349,677,610,000
32.333333
214
0.657653
false
serverboards/serverboards
plugins/core-notifications/serverboards_email.py
1
6092
#!/usr/bin/python3 import sys import os import smtplib import email import markdown import yaml import jinja2 from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from serverboards_aio import print import serverboards_aio as serverboards email_utils = email.utils settings = {} @serverb...
apache-2.0
6,214,992,457,247,580,000
28.288462
86
0.566481
false
cosven/pat_play
leetcode/011.py
1
2588
class Solution(object): def maxArea(self, height): if len(height) == 2: return min(height) lenght = len(height) f_index = 0 b_index = lenght - 1 max_v = 0 h_list = height while (f_index < b_index): value = self.cal_value(f_index, b...
gpl-3.0
3,642,773,241,438,115,000
25.408163
64
0.447836
false
marisn/timlab
src/images/management/commands/export_images.py
1
3175
# -*- coding: utf-8 -*- import os from shutil import copy from random import shuffle from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from projects.models import Project from images.models import ImageLabel class Command(BaseCommand): """ Usage ex...
gpl-3.0
-8,213,918,409,897,843,000
37.719512
101
0.56063
false
Azure/azure-sdk-for-python
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py
1
19576
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-8,169,113,912,672,847,000
49.583979
224
0.651512
false
jorshua/MusicCollectionLibrary
TestMusicCollection.py
1
2291
import unittest from MusicCollection import MusicCollection class TestMusicCollection(unittest.TestCase): # def test_all(self): mc = MusicCollection("./test_collection/", flac=True, ogg=True) self.assertEqual(len(mc.audio_files), 9) def test_flac(self): mc = MusicCollection("./t...
gpl-3.0
2,691,889,522,478,000,600
34.246154
71
0.577477
false
rahuldave/pycco
pycco/main.py
1
18307
#!/usr/bin/env python """ "**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/): the original quick-and-dirty, hundred-line-long, literate-programming-style documentation generator. It produces HTML that displays your comments alongside your code. Comments are passed through [Markdown](http://dar...
mit
-2,487,624,696,677,133,000
34.896078
117
0.592943
false
nelsonw2014/watershed
pump_client/__main__.py
1
4777
#!/usr/bin/env python3 # Copyright (C) 2015 Commerce Technologies, 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 b...
apache-2.0
-24,517,977,811,975,270
41.283186
135
0.667364
false
saaros/pghoard
pghoard/rohmu/object_storage/base.py
1
2149
""" rohmu - object_storage.base Copyright (c) 2016 Ohmu Ltd See LICENSE for details """ from ..errors import StorageError import logging class BaseTransfer: def __init__(self, prefix): self.log = logging.getLogger(self.__class__.__name__) if not prefix: prefix = "" elif prefix...
apache-2.0
8,044,815,886,431,289,000
31.560606
108
0.614239
false
paultag/monomoy
monomoy/utils.py
1
2506
# Copyright (c) 2012 Paul Tagliamonte <paultag@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modif...
mit
1,394,074,766,416,802,300
34.8
78
0.678372
false
zachdj/ultimate-tic-tac-toe
scenes/PlayGame.py
1
11800
import pygame, numpy, threading, timeit from .SceneBase import SceneBase from .DrawingUtils import * from models.game import Game, Board, Move, TimeLimitedBot from services import ImageService, FontService, SceneManager, SettingsService as Settings class PlayGame(SceneBase): """ This scene shows a graphical re...
mit
-7,724,562,142,268,434,000
51.444444
148
0.591102
false
bczmufrn/frequencia
frequencia/accounts/views.py
1
4409
from rules.contrib.views import PermissionRequiredMixin, permission_required from django.urls import reverse from django.contrib import messages from django.views.generic import ListView from django.contrib.auth.models import Group from django.http import HttpResponseRedirect from django.views.generic.base import Redi...
mit
-7,101,107,630,930,833,000
35.716667
125
0.765494
false
jeroyang/mcgocr
ncgocr/learning.py
1
5219
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from collections import OrderedDict, defaultdict, ChainMap from intervaltree import Interval, IntervalTree import numpy as np from txttk.re...
mit
6,637,057,444,244,941,000
32.88961
91
0.623874
false
i5o/sugar
src/jarabe/controlpanel/gui.py
1
20172
# Copyright (C) 2008 One Laptop Per Child # # 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 distribu...
gpl-2.0
-3,829,276,548,603,032,600
36.217712
79
0.556712
false
aroig/async
async/hosts/__init__.py
1
1169
#!/usr/bin/env python # -*- coding: utf-8 -*- # # async - A tool to manage and sync different machines # Copyright 2012,2013 Abdó Roig-Maranges <abdo.roig@gmail.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 # th...
gpl-3.0
-1,997,543,321,602,057,700
36.677419
73
0.760274
false
nsauder/treeano
treeano/nodes/theanode.py
1
4947
""" nodes which behave similar to theano functions """ import theano import theano.tensor as T from .. import core from .. import theano_extensions fX = theano.config.floatX @core.register_node("sqr") class SqrNode(core.NodeImpl): """ like theano.tensor.sqr """ def compute_output(self, network, i...
apache-2.0
-4,294,153,389,137,453,000
23.490099
79
0.542349
false
DamnWidget/txorm
txorm/test/test_expressions.py
1
99429
# Copyright (c) 2014 Oscar Campos <oscar.campos@member.fsf.org> # See LICENSE for details """TxORM Expressions Unit Tests """ from __future__ import unicode_literals from datetime import datetime, date, time, timedelta from twisted.trial import unittest from txorm import Undef from txorm.variable import Variable ...
lgpl-3.0
-5,808,670,647,757,657,000
38.534394
79
0.630068
false
michelp/xodb
xodb/xaql.py
1
1060
import pyparsing """ The query language that won't die. Syntax: Typical search engine query language, terms with boolean operators and parenthesized grouping: (term AND (term OR term OR ...) AND NOT term ...) In it's simplest case, xaql searches for a list of terms: term term term ... ...
mit
6,362,063,249,554,264,000
21.083333
70
0.683962
false
Sharadh/prog-square
src/so_crawl/crawl.py
1
4884
from datetime import datetime, timedelta from io import StringIO from lxml import etree import requests from order.source_handler import check_source from utils import ( log, success, warn ) from api_utils import ( build_url, MAX_PAGE_SIZE, ANSWER_BATCH_SIZE ) from custom_filters import load_...
mit
-7,150,260,538,557,537,000
29.148148
91
0.582924
false
summychou/GGFilm
WeRoBot/myrobot/views.py
1
12582
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import os import re import requests import urllib import urllib2 import redis redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=0) redis_context = redis.Redis(connection_pool=redis_pool) from django.conf import settings from ...
apache-2.0
1,657,857,180,738,459,000
42.806452
152
0.570692
false
jcmgray/xyzpy
xyzpy/gen/farming.py
1
30481
"""Objects for labelling and succesively running functions. """ import os import shutil import functools import numpy as np import pandas as pd import xarray as xr from .prepare import ( _parse_fn_args, _parse_var_names, _parse_var_dims, _parse_var_coords, _parse_constants, _parse_resources, ...
mit
-5,098,163,279,879,569,000
33.915235
79
0.546832
false
mmasaki/trove
trove/tests/unittests/guestagent/test_manager.py
1
21350
# Copyright 2015 Tesora Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
5,228,886,502,972,602,000
43.75891
79
0.52103
false
beeftornado/sentry
tests/sentry/grouping/test_fingerprinting.py
1
6100
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest from sentry.grouping.fingerprinting import FingerprintingRules, InvalidFingerprintingConfig from tests.sentry.grouping import with_fingerprint_input def test_basic_parsing(insta_snapshot): rules = FingerprintingRules.from_config_stri...
bsd-3-clause
-943,522,396,201,147,100
34.465116
105
0.45459
false
hsr-ba-fs15-dat/python-social-auth
setup.py
1
2666
# -*- coding: utf-8 -*- """Setup file for easy installation""" import sys import os from os.path import join, dirname, split from setuptools import setup PY3 = sys.version_info[0] == 3 version = __import__('social').__version__ LONG_DESCRIPTION = """ Python Social Auth is an easy to setup social authentication/regi...
bsd-3-clause
7,865,004,732,053,510,000
31.91358
79
0.612903
false
TheNeuralBit/gottengeography
tests/test_photos.py
1
16202
"""Test the classes and functions defined by gg/photos.py""" from time import struct_time from mock import Mock, call from tests import BaseTestCase class point: def __init__(self, lat, lon, ele): self.lat = lat self.lon = lon self.ele = ele class GError(Exception): pass class Ph...
gpl-3.0
-308,529,036,703,869,950
41.862434
79
0.621837
false
efiop/dvc
dvc/command/get_url.py
1
1418
import argparse import logging from dvc.exceptions import DvcException from . import completion from .base import CmdBaseNoRepo, append_doc_link logger = logging.getLogger(__name__) class CmdGetUrl(CmdBaseNoRepo): def run(self): from dvc.repo import Repo try: Repo.get_url(self.args...
apache-2.0
-515,336,444,671,809,100
27.36
79
0.606488
false
MollicaF/LogicalWordLearning
Model/Grammar.py
1
9416
from LOTlib.Grammar import Grammar from LOTlib.Miscellaneous import q def makeGrammar(objects, nterms=['Tree', 'Set', 'Gender', 'Generation', 'Ancestry', 'Paternity', 'English'], terms=['X', 'objects', 'all'], recursive=False, words=None, compositional=True, abstractP=10.0): """ Define a unif...
gpl-2.0
-6,572,479,382,486,136,000
40.117904
120
0.546941
false
61352151511/61352151511.github.io
adcapcalc/parseGameState.py
1
6118
from decimal import * import re, sys parseObj = {} parsing = 0 planets = ['earth', 'moon', 'mars'] regexObj = {} def checkLine(line): checkArr = ['angelAccumulation', 'managers', 'unlocks', 'upgrades', 'venture'] for idx, check in enumerate(checkArr): if regexObj[check].match(line): return idx + 1 return 0 de...
gpl-3.0
-2,889,542,826,086,740,500
41.493056
209
0.634194
false
antonszilasi/honeybeex
honeybeex/honeybee/radiance/recipe/annual.py
1
9501
from ._gridbasedbase import HBGenericGridBasedAnalysisRecipe from ..postprocess.annualresults import LoadAnnualsResults from ..parameters.rfluxmtx import RfluxmtxParameters from ..command.rfluxmtx import Rfluxmtx from ..command.epw2wea import Epw2wea from ..command.gendaymtx import Gendaymtx from ..command.rmtxop impor...
gpl-3.0
4,754,961,326,961,905,000
38.920168
118
0.633933
false
xia2/xia2
src/xia2/Modules/Indexer/IndexerSelectImages.py
1
1964
# Code for the selection of images for autoindexing - selecting lone images # from a list or wedges from a list, for XDS. import logging logger = logging.getLogger("xia2.Modules.Indexer.IndexerSelectImages") def index_select_images_lone(phi_width, images): """Select images close to 0, 45 and 90 degrees from th...
bsd-3-clause
-3,302,935,672,094,419,500
27.882353
86
0.598269
false
mmcdermo/RedLeader
redleader/resources/sqs.py
1
2259
from redleader.resources import Resource import redleader.exceptions as exceptions class SQSQueueResource(Resource): """ Resource modeling an S3 Bucket """ def __init__(self, context, queue_name, dead_letter_queue=None, dead_letter_que...
apache-2.0
-2,137,182,136,920,169,200
33.227273
91
0.547587
false
trmznt/msaf
msaf/lib/fatools/dpalign.py
1
7975
import numpy as np import math import pprint # dynamic programming for peak alignment # # dp: y -> sizes # x -> retention_time # # # def estimate_z( peak_pairs, degree = 3 ): """ estimate z and rss based on [y, x] x: rtime y: ladder sizes return (z, rss) z is polynomial coeff...
lgpl-3.0
7,945,830,382,347,585,000
28.868914
90
0.501693
false
google/mirandum
alerts/beam/tests.py
1
3759
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-4,719,269,161,047,127,000
38.568421
176
0.619048
false
hasanalom/ggrc-core
src/ggrc/converters/handlers.py
1
26731
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from dateutil.parser import parse from flask import current_app from sqlalchemy ...
apache-2.0
3,213,505,808,976,734,000
31.244873
79
0.667353
false
nop33/indico-plugins
search/indico_search/views.py
1
1253
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
7,698,118,628,729,841,000
39.419355
87
0.779729
false
unreal666/outwiker
plugins/markdown/markdown/markdownparser/parser.py
3
1462
# -*- coding: UTF-8 -*- from markdown_plugin_libs.markdown import markdown from markdown_plugin_libs.markdown.extensions.fenced_code import FencedCodeExtension from markdown_plugin_libs.markdown.extensions.codehilite import CodeHiliteExtension from markdown_plugin_libs.markdown.extensions.tables import TableExtension ...
gpl-3.0
2,803,704,157,343,723,500
29.458333
90
0.624487
false
ai-se/XTREE
src/Planners/XTREE/Planner/CROSSTREES.py
1
8040
#! /Users/rkrsn/anaconda/bin/python from __future__ import print_function from __future__ import division from pdb import set_trace from os import environ, getcwd from os import walk from os import remove as rm from os.path import expanduser from pdb import set_trace import sys # Update PYTHONPATH HOME = expanduser('...
mit
-8,677,514,913,918,994,000
26.070707
80
0.569403
false
jmakov/ggrc-core
test/selenium/src/lib/constants/element.py
1
1929
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: jernej@reciprocitylabs.com # Maintained By: jernej@reciprocitylabs.com class LandingPage(object): BUTTON_LOGIN = "Login" PROGRAM_INFO_TAB = "P...
apache-2.0
-8,647,108,671,316,192,000
24.72
78
0.697771
false
annayqho/TheCannon
code/apokasc_lamost/kepler_apogee_lamost_overlap.py
1
2584
import numpy as np import os # APOGEE-APOKASC overlap inputf = "/home/annaho/TheCannon/examples/example_apokasc/apokasc_DR12_overlap.npz" apogee_apokasc = np.load(inputf)['arr_0'] # APOGEE-LAMOST overlap inputf = "/home/annaho/TheCannon/examples/example_DR12/Data" apogee_lamost = np.array(os.listdir(inputf)) # APO...
mit
-5,554,236,728,631,260,000
30.901235
104
0.683824
false
SaintGimp/BeagleBoneHardware
simon_says/seven_segment.py
1
1123
import gimpbbio.gpio as gpio pins = [gpio.pins.p9_21, gpio.pins.p9_22, gpio.pins.p9_23, gpio.pins.p9_24, gpio.pins.p9_25, gpio.pins.p9_26, gpio.pins.p9_27, gpio.pins.p9_28] segments = [[pins[0], pins[1], pins[2], pins[3], pins[4], pins[5]], # 0 [pins[1], pins[2]], ...
mit
-4,058,938,497,526,775,000
47.826087
143
0.429207
false
lynnlyc/for-honeynet-reviewers
dsfsSensorOpt/SensorOpt/androguard/core/bytecode.py
1
11955
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
gpl-3.0
4,943,805,858,265,732,000
27.198113
149
0.538101
false
miurahr/symposion
symposion/speakers/views.py
1
4354
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.http import Http404 from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models im...
bsd-3-clause
-4,971,493,190,427,245,000
30.550725
81
0.625632
false
retspen/virtmgr
vnc/views.py
1
2640
import libvirt from django.shortcuts import render_to_response from django.http import Http404, HttpResponse, HttpResponseRedirect import virtinst.util as util from virtmgr.model.models import * def vm_conn(host_ip, creds): try: flags = [libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE] auth = [fl...
apache-2.0
2,855,562,974,099,879,400
29.344828
71
0.601515
false
google/deepvariant
third_party/nucleus/io/genomics_writer.py
1
6832
# Copyright 2018 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
bsd-3-clause
-5,658,295,128,517,875,000
33.505051
80
0.717652
false
mpsonic/MarchMadnessRandomForest
model.py
1
5595
from loadTeamData import loadTeamData, loadReverseTeamLookup from loadTourneyData import loadTourneyData from loadRatingData import loadRatingData from sklearn.ensemble import RandomForestClassifier from sklearn.externals import joblib from sklearn.model_selection import train_test_split import random import ast import...
mit
3,861,227,702,344,453,000
37.586207
84
0.62109
false
blade2005/dosage
dosagelib/plugins/arcamax.py
1
6490
# -*- coding: utf-8 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2016 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from ..scraper import _ParserScraper class Arcamax(_ParserScraper): ...
mit
-3,171,981,798,737,173,500
52.196721
93
0.638367
false
thejoeejoee/VUT-FIT-IFJ-2017-toolkit
ifj2017/test/logger.py
1
4720
# coding=utf-8 import os import shutil import sys from operator import attrgetter from typing import Optional from ifj2017.interpreter.state import State def disable_color(): """ Return True if the running system's terminal supports color, and False otherwise. """ # windows dark magic via https:...
gpl-3.0
-945,788,138,724,140,900
28.111111
93
0.538804
false
sigdotcom/acm.mst.edu
ACM_General/sigs/migrations/0001_initial.py
1
1690
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-03 03:24 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import sigs.managers class Migration(migrations.Migration): initial = True dependencies...
gpl-3.0
4,508,287,121,375,954,400
48.705882
218
0.650888
false
dyermd/legos
scripts/QC/Backup/QC_sample_backup.py
1
11795
#! /usr/bin/env python from optparse import OptionParser import os import os.path import sys import re import json from alignment_stats import Align_Stats class QC_Sample: def __init__(self, options): self.options = options self.sample_json = json.load(open(options.json)) self.__softwareDirectory = "/rawdata/l...
gpl-2.0
-492,979,214,955,907,140
45.074219
278
0.661721
false
GammaC0de/pyload
src/pyload/plugins/downloaders/RapidgatorNet.py
1
7100
# -*- coding: utf-8 -*- import json import re from datetime import timedelta import pycurl from pyload.core.network.http.exceptions import BadHeader from pyload.core.utils import seconds from ..anticaptchas.ReCaptcha import ReCaptcha from ..anticaptchas.SolveMedia import SolveMedia from ..base.simple_downloader impor...
agpl-3.0
4,630,701,275,883,222,000
33.299517
102
0.567465
false
zetaops/ulakbus
tests/test_parolami_unuttum.py
1
5573
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. from ulakbus.models import User from zengine.lib.test_utils import BaseTestCase from ulakbus.lib.common import ParolaSifirlama from .test_profil_islemler...
gpl-3.0
-2,550,266,068,936,536,000
50.171429
97
0.67895
false
qbuat/rootpy
rootpy/logger/multilogging.py
1
6264
# rootpy license excluded in this source file # Copyright (C) 2010 Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # bo...
gpl-3.0
-5,471,062,410,081,626,000
34.191011
80
0.650383
false
sernst/Trackway-Gait-Analysis
tracksim/coupling/__init__.py
1
2390
import math import numpy as np import measurement_stats as mstats import functools import pandas as pd def compute_fitness_rankings(df): """ :param df: :return: """ fitness_values = [] for index, row in df.iterrows(): fitness_values.append( compute_fitness(row['swing'], r...
mit
-1,998,226,616,701,985,500
21.980769
74
0.587448
false
etkirsch/gmusic
gmusic/core/StateManager.py
1
4637
from gmusic.model.MenuElement import MenuElement from gmusic.model.State import State from gmusic.model.commands import * class StateManager(object): '''Handles a bulk majority of state-based logic in the UI.''' def __init__(self): self.state = "" self.title = "" self.subtitle = "" ...
gpl-2.0
4,856,244,833,451,204,000
35.511811
132
0.599741
false
lamby/pkg-reinteract
lib/reinteract/shell_view.py
1
29573
# Copyright 2007-2009 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import gobject import gtk import re from shell_b...
bsd-2-clause
-5,751,253,502,139,091,000
38.378162
123
0.569269
false
borkit/scriptdump
AWS/lambda_python/delete-rds.py
1
1210
# coding: utf-8 # RDS delete import boto3 # nodelete,trueを変数化 ND = 'nodelete' TR = 'true' #def lambda_handler(event, context): if __name__ == '__main__': client = boto3.client('rds', "ap-northeast-1") resp = client.describe_db_instances() all_list = [] del_list = [] for rds in resp...
mit
-1,630,935,105,991,957,500
25.534884
98
0.558277
false
v-legoff/pa-poc3
src/service/default/__init__.py
1
2149
# Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and th...
bsd-3-clause
948,925,319,708,079,600
45.717391
79
0.792927
false
karrtikr/ete
ete3/phylomedb/phylomeDB3.py
1
61032
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
gpl-3.0
-690,950,755,839,951,200
39.499005
117
0.63316
false
paepcke/json_to_relation
json_to_relation/ipToCountry.py
1
9520
# Copyright (c) 2014, Stanford University # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
bsd-3-clause
-6,915,075,060,546,008,000
48.588542
757
0.627206
false
poppogbr/genropy
gnrpy/gnr/web/gnrwebpage_proxy/frontend/dojo_11.py
1
1262
#!/usr/bin/env pythonw # -*- coding: UTF-8 -*- # # dojo_11.py # # Created by Giovanni Porcari on 2007-03-24. # Copyright (c) 2007 Softwell. All rights reserved. # --------------------------- GnrWebPage subclass --------------------------- from gnr.web.gnrwebpage_proxy.frontend.dojo_base import GnrBaseDojoFrontend f...
lgpl-2.1
1,519,763,607,247,626,500
36.117647
77
0.579239
false
xianjunzhengbackup/code
http/REST/Building-RESTful-Python-Web-Services-master/Chapter 4/restful_python_chapter_04_01/gamesapi/gamesapi/settings.py
1
4028
""" Book: Building RESTful Python Web Services Chapter 4: Throttling, Filtering, Testing and Deploying an API with Django Author: Gaston C. Hillar - Twitter.com/gastonhillar Publisher: Packt Publishing Ltd. - http://www.packtpub.com """ """ Django settings for gamesapi project. Generated by 'django-admin startproject'...
mit
-3,196,714,163,656,158,700
26.033557
91
0.683466
false
elbaschid/will-iam
setup.py
1
1613
# -*- coding: utf-8 -*- import sys from setuptools import setup from setuptools.command.test import test as TestCommand requires = ['click', 'boto3', 'six'] tests_require = ['pytest', 'pytest-cache', 'pytest-cov'] dev_require = ['tox', 'bumpversion', 'twine'] class PyTest(TestCommand): def finalize_options(self...
mit
59,345,356,588,156,136
31.26
71
0.608803
false
RNAcentral/rnacentral-import-pipeline
rnacentral_pipeline/databases/ensembl/vertebrates/__init__.py
1
1101
# -*- coding: utf-8 -*- """ Copyright [2009-2020] EMBL-European Bioinformatics Institute 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,086,745,012,375,599,600
35.7
72
0.784741
false
azariven/BioSig_SEAS
bin_stable/mixing_ratio/generate_mixing_ratio.py
1
4829
#!/usr/bin/env python # # Copyright (C) 2017 - Massachusetts Institute of Technology (MIT) # # 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...
gpl-3.0
1,760,607,349,134,250,500
35.870229
249
0.547732
false
Azure/azure-sdk-for-python
sdk/graphrbac/azure-graphrbac/azure/graphrbac/models/pre_authorized_application_extension_py3.py
1
1032
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-1,691,554,542,163,815,400
34.586207
79
0.602713
false
sjdines/mezzanine-fluent-pages
mezzanine_fluent_pages/mezzanine_layout_page/forms.py
1
2116
import os from django import forms from . import appsettings class TemplateFilePathFieldForm(forms.FilePathField): """ The associated formfield to select a template path. This was adapted from `fluent_pages/forms/fields.py` in the `django-fluent-pages` app. """ def __init__(self, *args, **kw...
bsd-2-clause
-5,282,804,800,749,601,000
36.122807
95
0.60775
false
nzinov/maze
reader.py
1
2456
from collections import defaultdict from squares import * from effects import * from objects import * from custom import * from game import Subfield, Field from position import Position import io LEFT = (0, -1) RIGHT = (0, 1) UP = (-1, 0) DOWN = (1, 0) def read_field(fname): # solution from http://stackoverflow.c...
gpl-3.0
379,095,149,324,863,500
34.085714
103
0.539902
false
strapdata/elassandra5-rc
docs/elassandra/source/conf.py
1
13000
# -*- coding: utf-8 -*- # # Elassandra documentation build configuration file, created by # sphinx-quickstart on Sat May 28 19:29:13 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
apache-2.0
2,228,696,799,725,739,000
31.338308
112
0.707615
false
JustusSchwan/MasterThesis
trash/generate_raw_features.py
1
5184
import cPickle import csv import math import cv2 import numpy as np import expressivity import face_extractor import filter from trash import utility_positional def draw_face(image, pts, color, thickness=1): open_ranges = [[0, 17], [17, 22], [22, 27], [27, 31], [31, 36]] closed_ranges = [[36, 42], [42, 48],...
mit
-1,363,165,421,150,685,400
35
120
0.546489
false
datastore/datastore.objects
setup.py
1
1141
#!/usr/bin/env python import re from setuptools import setup, find_packages pkgname = 'datastore.objects' # gather the package information main_py = open('datastore/objects/__init__.py').read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", main_py)) packages = filter(lambda p: p.startswith('datastore'), fin...
mit
5,340,465,337,564,310,000
23.804348
71
0.676599
false
KDE/ginkgo
src/ginkgo/views/suggestionview.py
1
6713
#!/usr/bin/env python # -*- coding: utf-8 -*- ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundation ## and appearing in the file LICENSE included in the packaging of ## this file. ## ## This file is provided AS IS with NO WARRANTY OF ANY...
gpl-2.0
5,829,266,013,391,520,000
36.502793
135
0.661999
false
raymondberg/btray
btray/models/user.py
1
1158
from btray import db from btray.models.webhook_config import WebhookConfig class User(db.Model): user_id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True) email = db.Column(db.String(120), unique=True) password = db.Column(db.PasswordType(schemes=['pbkdf2_sha512...
mit
2,336,528,430,703,117,300
25.930233
84
0.630397
false
ArcherSys/ArcherSys
Lib/lib2to3/fixes/fix_paren.py
1
3821
<<<<<<< HEAD <<<<<<< HEAD """Fixer that addes parentheses where they are required This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.""" # By Taek Joo Kim and Benjamin Peterson # Local imports from .. import fixer_base from ..fixer_util import LParen, RParen # XXX This doesn't support nested for loops l...
mit
4,850,586,695,565,860,000
26.688406
80
0.461136
false