repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
OmeGak/indico-plugins
vc_vidyo/indico_vc_vidyo/api/cache.py
1
1207
# This file is part of Indico. # Copyright (C) 2002 - 2016 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
5,846,497,963,158,314,000
31.621622
78
0.710853
false
3.795597
false
false
false
AndrewGoldstein/grasshopper
tests/test_models.py
1
1954
# -*- coding: utf-8 -*- """Model unit tests.""" import datetime as dt import pytest from grasshopper.user.models import Role, User from .factories import UserFactory @pytest.mark.usefixtures('db') class TestUser: """User tests.""" def test_get_by_id(self): """Get user by ID.""" user = User...
bsd-3-clause
1,862,980,038,182,105,900
28.164179
63
0.589048
false
3.908
true
false
false
rodluger/everest
docs/mcmc.py
1
2721
"""MCMC example for transit fitting.""" import matplotlib.pyplot as pl from everest import Everest, TransitModel import numpy as np import emcee from tqdm import tqdm from corner import corner def lnprior(x): """Return the log prior given parameter vector `x`.""" per, t0, b = x if b < -1 or b > 1: ...
mit
202,969,213,362,555,870
28.901099
72
0.632488
false
2.858193
false
false
false
cxcsds/ciao-contrib
crates_contrib/images.py
1
4630
# # Copyright (C) 2012, 2015, 2016, 2019 # Smithsonian Astrophysical Observatory # # # 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 you...
gpl-3.0
6,630,351,362,508,218,000
30.496599
86
0.630886
false
3.605919
false
false
false
lintrace/GravityFalls3
gravity_falls.py
1
1529
#!/usr/bin/python3 """ Главный файл для запуска Решение шифрограмм из книги "Дневник Гравити Фоллз 3" """ import atbash_chiper, caesar_cipher, vigenere_cipher print('='*80) print('Зашифровано шифром Цезаря, см. коментарии к строкам выше (место в книге)') print('='*80) for line in open('caesar.txt'): if line[0] ==...
gpl-3.0
8,400,138,516,059,571,000
34.766667
207
0.689655
false
1.53505
false
false
false
ucb-sejits/ctree
ctree/c/codegen.py
1
6213
""" Code generator for C constructs. """ from ctree.codegen import CodeGenVisitor from ctree.c.nodes import Op from ctree.types import codegen_type, get_suffix from ctree.precedence import UnaryOp, BinaryOp, TernaryOp, Cast from ctree.precedence import get_precedence, is_left_associative from numbers import Number f...
bsd-2-clause
4,827,430,226,630,825,000
33.325967
99
0.55062
false
3.540171
false
false
false
nuagenetworks/vspk-python
vspk/v6/nuegressauditacltemplate.py
1
21660
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
4,749,001,960,045,595,000
32.792512
772
0.605263
false
4.683243
false
false
false
mbartling/TAMU_senior_design
Python/gps2local.py
1
1458
#! /usr/bin/env python from numpy import * import sys #p1 = [30.625621, -96.336753] #p2 = [30.624388, -96.335755] #p3 = [30.626050, -96.333368] #p4 = [30.627195, -96.334945] xres = 300 yres = 500 lat = [] lon = [] for line in sys.stdin: line.strip() (latS, lonS, dummy) = line.split(',') lat.appe...
mit
-899,562,376,890,822,100
20.78125
66
0.593964
false
2.036313
false
false
false
gengwg/leetcode
179_largest_number.py
1
1445
# -*- coding: utf-8 -*- # 179. Largest Number # Given a list of non negative integers, # arrange them such that they form the largest number. # # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. # # Note: The result may be very large, # so you need to return a string instead of an integer. # ...
apache-2.0
-4,658,683,190,685,438,000
25.098039
77
0.57701
false
2.497186
false
false
false
alex-bauer/kelvin-power-challenge
src/features/features_saaf.py
1
1680
"""Concatenate and resample SAAF data""" import sys import os sys.path.append("../") from utils.utils import * folder = config.features_folder if not os.path.exists(folder): os.makedirs(folder) def parse_saaf(filename, dropna=True): df = pd.read_csv(config.data_folder + '/' + filename) df = convert_t...
mit
8,595,800,424,774,629,000
27.982759
102
0.683333
false
2.612753
false
false
false
heray1990/google-python-exercises
babynames/babynames.py
1
2636
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
apache-2.0
2,648,205,463,664,366,600
25.626263
82
0.647951
false
3.172082
false
false
false
ryanjoneil/docker-image-construction
dicp/solvers/most_common.py
1
1247
from collections import defaultdict class MostCommonHeuristic(object): '''Heuristic that shares the most common command at any point''' _slug = 'most-common' def slug(self): return MostCommonHeuristic._slug def solve(self, problem, saver): # Keep track of what hasn't been assigned and...
mit
5,420,271,509,696,158,000
30.974359
87
0.588613
false
4.048701
false
false
false
Balannen/LSMASOMM
atom3/Kernel/ErrorHandlers/exceptionStreamHook.py
1
1233
""" exceptionStreamHook.py A custom stderr hook by Denis Dube, http://msdl.cs.mcgill.ca/people/denis/ """ import tkMessageBox, sys class exceptionStreamHook: """ This class pretends to be an open stderr file stream Perhaps it should subclass File to be safer... but what would be the default ...
gpl-3.0
469,603,371,962,662,600
23.729167
78
0.607461
false
3.96463
false
false
false
yuanming-hu/taichi
python/taichi/lang/shell.py
1
1472
import atexit import functools import os import sys from taichi.core.util import ti_core as _ti_core import taichi as ti try: import sourceinspect as oinspect except ImportError: ti.warn('`sourceinspect` not installed!') ti.warn( 'Without this package Taichi may not function well in Python IDLE i...
mit
6,888,034,702,434,073,000
31
94
0.686821
false
3.521531
false
false
false
leeopop/2015-CS570-Project
lda_preprocess.py
1
2532
import csv from loader import load_single_file num_of_topics__criteria_for_cut_words = 20 num_of_appearance__criteria_for_cut_words = 10 output_num_of_words_per_topic = 50 def load_vocab(): vocab = {} inverse_dict = load_single_file('keyword_table.csv') num = max([int(x['unique']) for x in inverse_dict.values()])...
mit
6,811,511,562,006,119,000
27.460674
92
0.651659
false
2.648536
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/exploits/ZIBE/plugin_manager.py
1
2051
# uncompyle6 version 2.9.10 # Python bytecode 2.6 (62161) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: c:\Temp\build\ZIBE\plugin_manager.py # Compiled at: 2013-02-27 18:02:46 from plugins import * class PluginManager(object): __plugins__ = {} ...
unlicense
1,598,297,665,892,283,400
32.096774
78
0.561677
false
3.88447
false
false
false
alekz112/xlwings
xlwings/tests/test_xlwings.py
1
33895
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import sys import shutil import pytz import nose from nose.tools import assert_equal, raises, assert_true, assert_false, assert_not_equal from datetime import datetime, date from xlwings import Application, Workbook, Sheet, Range, Chart, ChartTy...
apache-2.0
8,551,476,815,334,439,000
33.782341
142
0.574001
false
3.208144
true
false
false
Zomboided/VPN-Manager
resetVPN.py
1
4136
#!/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 option)...
gpl-2.0
245,625,491,115,489,120
43.010638
160
0.629594
false
4.358272
false
false
false
jskDr/keraspp
old/gan_cnn_mse.py
1
6490
################################ # 공통 패키지 불러오기 ################################ from keras.datasets import mnist import numpy as np from PIL import Image import math import os import keras.backend as K K.set_image_data_format('channels_first') print(K.image_data_format) ################################ # GAN 모델링 ###...
mit
1,528,142,904,994,182,000
30.758621
81
0.57431
false
3.25063
false
false
false
StrongBoy998/ihome-project
Tornado_Project/utils/image_storage.py
1
1089
# -*- coding: utf-8 -*- import qiniu.config import logging from qiniu import Auth, put_data, etag, urlsafe_base64_encode #需要填写你的 Access Key 和 Secret Key access_key = 'btZDjv_qjI4O1P5-KKeaZXBGLJcM-AZfigN8HjQf' secret_key = 'j2Sgq1Pz-1O90OoFSKr24Xa80mVWqzpqbo-byiN5' #要上传的空间 bucket_name = 'ihome' def storage(data): ...
apache-2.0
-76,605,809,266,359,420
18.408163
61
0.615142
false
2.389447
false
false
false
fapable/pygameproject2
Menu/Opties.py
1
1096
import pygame import Game as dm def opties(): pygame.mixer.music.load("music.mp3") pygame.mixer.music.play(loops=0, start=0.0) size = width, height = 340,240 screen = pygame.display.set_mode(size) redSquare = pygame.image.load('achtergrondSpelers.png').convert() white = (255,255,255) w = ...
apache-2.0
-6,016,865,642,873,361,000
27.102564
71
0.556569
false
3.140401
false
false
false
OnroerendErfgoed/pyramid_urireferencer
tests/test_renderers.py
1
2787
# -*- coding: utf-8 -*- from pyramid_urireferencer.models import ( RegistryResponse, ApplicationResponse, Item ) class TestRenderers: def test_empty_registry_renderer(self): rr = RegistryResponse('http://id.example.org/foo/1', True, False, 0, []) from pyramid_urireferencer.renderers i...
mit
6,088,043,973,341,636,000
33.8375
82
0.558306
false
3.936441
false
false
false
torehc/sinucha
web/sinucha/control/models.py
1
5334
from django.db import models from django.contrib.auth.models import User import datetime from django.db.models.signals import post_save from django.dispatch import receiver class User_Data(models.Model): USER = 'user' ADMIN = 'admin' ROL_CHOICES = ( (USER, 'USER'), (ADMIN, 'ADMIN'), ...
gpl-3.0
2,278,878,880,838,755,800
30.382353
96
0.553056
false
3.939439
false
false
false
joequant/pyswagger
pyswagger/tests/v2_0/test_circular.py
1
3163
from pyswagger import SwaggerApp, utils, primitives, errs from ..utils import get_test_data_folder from ...scanner import CycleDetector from ...scan import Scanner import unittest import os import six class CircularRefTestCase(unittest.TestCase): """ test for circular reference guard """ def test_path_item_...
mit
7,400,816,715,443,850,000
30.009804
133
0.510907
false
3.824667
true
false
false
rocktavious/DevToolsLib
DTL/api/bases.py
1
3894
import inspect #------------------------------------------------------------ #------------------------------------------------------------ class BaseStruct(object): #------------------------------------------------------------ def __init__(self, *args, **kwds): self.deserialize(*args, **kwds) ...
mit
-2,309,170,053,516,535,000
38.734694
112
0.362866
false
5.760355
false
false
false
aristanetworks/arista-ovs-nova
nova/utils.py
1
38397
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
-4,965,048,132,937,103,000
31.104515
79
0.587963
false
4.086961
false
false
false
larsbutler/swift
swift/obj/expirer.py
1
12641
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-1,666,015,285,613,331,700
40.445902
79
0.537616
false
4.652558
false
false
false
krivenko/som
python/som.py
1
1706
############################################################################## # # SOM: Stochastic Optimization Method for Analytic Continuation # # Copyright (C) 2016-2020 Igor Krivenko <igor.s.krivenko@gmail.com> # # SOM is free software: you can redistribute it and/or modify it under the # terms of the GNU General P...
gpl-3.0
-1,575,309,946,060,850,000
36.911111
86
0.611958
false
3.676724
false
false
false
atumanov/ray
python/ray/exceptions.py
1
3236
import os import colorama try: import setproctitle except ImportError: setproctitle = None class RayError(Exception): """Super class of all ray exception types.""" pass class RayTaskError(RayError): """Indicates that a task threw an exception during execution. If a task throws an exceptio...
apache-2.0
-4,839,456,202,281,432,000
29.819048
79
0.635352
false
4.263505
false
false
false
mysociety/barnetplanning
alerts/forms.py
1
2895
import urllib2 import simplejson from django import forms from django.contrib.localflavor.uk.forms import UKPostcodeField from models import Alert # Due to a bug in UKPostcodeField, can't override error message. This is # fixed in: http://code.djangoproject.com/ticket/12017 # So remove this extra class when we have...
agpl-3.0
-3,994,539,111,728,237,600
40.357143
131
0.656995
false
3.683206
false
false
false
jiaphuan/models
research/slim/nets/mobilenet/mobilenet.py
1
16178
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
7,967,390,960,214,579,000
36.710956
80
0.665657
false
3.862942
false
false
false
Autodesk/molecular-design-toolkit
moldesign/interfaces/nbo_interface.py
1
9611
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
apache-2.0
3,648,654,696,899,533,000
35.405303
110
0.553949
false
3.169855
false
false
false
wufangjie/leetcode
187. Repeated DNA Sequences.py
1
1241
class Solution(object): def findRepeatedDnaSequences(self, s): """ :type s: str :rtype: List[str] """ more_than_once, once = set(), set() for i in range(len(s) - 9): t = s[i:i+10] if t not in more_than_once: if t in once: ...
gpl-3.0
-132,350,777,096,766,640
36.606061
122
0.48751
false
3.447222
false
false
false
ging/keystone
keystone/contrib/keystone_scim/routers.py
1
11710
# # Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U # # 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 unde...
apache-2.0
2,083,376,882,307,337,700
40.378092
80
0.514944
false
4.812988
false
false
false
openid/python-openid
openid/yadis/manager.py
1
6142
from __future__ import unicode_literals class YadisServiceManager(object): """Holds the state of a list of selected Yadis services, managing storing it in a session and iterating over the services in order.""" def __init__(self, starting_url, yadis_url, services, session_key): # The URL that was ...
apache-2.0
8,008,034,754,780,183,000
30.020202
73
0.620156
false
4.542899
false
false
false
mojodna/debian-mapnik
plugins/input/osm/build.py
1
1631
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon # # Mapnik 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 2.1 of the Li...
lgpl-2.1
7,205,425,582,168,794,000
30.980392
152
0.72103
false
3.369835
false
false
false
dudulianangang/vps
EneConsTest.py
1
5969
import sdf import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl plt.style.use('seaborn-white') # plt.rcParams['font.family'] = 'sans-serif' # plt.rcParams['font.sans-serif'] = 'Tahoma' # # plt.rcParams['font.monospace'] = 'Ubuntu Mono' plt.rcParams['font.size'] = 16 # plt.rcParams['axes.labelsiz...
apache-2.0
-2,299,900,135,137,136,400
26.892523
100
0.675658
false
2.017236
false
false
false
Adamssss/projectEuler
pb347.py
1
1198
import math import time t1 = time.time() N = 10000000 prime = [] def primeSieve(n): global prime n = (n+1)//2 p = [True]*(n) i = 1 prime.append(2) while i < n: if p[i]: t = 2*i+1 prime.append(t) p[i] = False j = 2*i*i+2*i wh...
mit
9,094,591,799,074,366,000
14.558442
44
0.3798
false
2.812207
false
false
false
tisnik/fabric8-analytics-common
integration-tests/features/steps/jobs_api.py
1
14506
"""Tests for jobs API endpoints.""" import os import requests import uuid from behave import given, then, when from src.attribute_checks import check_timestamp, check_job_token_attributes from src.parsing import parse_token_clause from src.authorization_tokens import jobs_api_authorization @given('Jobs debug API is...
apache-2.0
-6,514,030,452,853,019,000
35.539043
96
0.674411
false
3.595935
false
false
false
IdeaSolutionsOnline/ERP4R
core/objs/sai_pesquisacont.py
1
4546
# !/usr/bin/env python3 # -*- encoding: utf-8 -*- """ ERP+ """ __author__ = ['António Anacleto', 'Jair Medina'] __credits__ = [] __version__ = "1.0" __maintainer__ = ['António Anacleto', 'Jair Medina'] __status__ = "Development" __model_name__= 'sai_pesquisacont.SaiPesquisacont' #import base_models#auth, from orm impo...
mit
-1,430,141,858,512,203,300
35.328
426
0.558027
false
3.1822
false
false
false
linkslice/ZenPacks.community.EMCIsilon
ZenPacks/community/EMCIsilon/modeler/plugins/community/snmp/EMCIsilonDiskPerfs.py
1
1526
from Products.DataCollector.plugins.CollectorPlugin import ( SnmpPlugin, GetTableMap, ) class EMCIsilonDiskPerfs(SnmpPlugin): relname = 'emcisilon_diskperfs' modname = 'ZenPacks.community.EMCIsilon.EMCIsilonDiskPerf' snmpGetTableMaps = ( GetTableMap( 'diskPerfTable', '.1.3.6.1...
mit
513,000,661,527,704,640
34.488372
85
0.542595
false
3.740196
false
false
false
ellak-monades-aristeias/enhydris
enhydris/hcore/migrations/0006_offset_help.py
1
2090
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('hcore', '0005_remove_is_active'), ] operations = [ migrations.AlterField( model_name='timeseries', n...
agpl-3.0
-1,065,025,794,875,866,500
60.470588
362
0.673206
false
4.058252
false
false
false
crackcell/www-entity-mining
software/game/17173.com/crawler.py
1
1873
#!/usr/bin/env python # -*- encoding: utf-8; indent-tabs-mode: nil -*- """ crawler ~~~~~~~ desc :copyright: (c) 2015 Menglong TAN. """ import os import sys import re import urllib2 import time import BeautifulSoup import logging logger = logging.getLogger(__file__) logger.setLevel(logging.DEBUG) ch ...
bsd-3-clause
-3,796,389,506,530,348,000
23.973333
116
0.566471
false
3.320922
false
false
false
JungeAlexander/cocoscore
ci/bootstrap.py
1
2124
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import sys from os.path import abspath from os.path import dirname from os.path import exists from os.path import join if __name__ == "__main__": base_path = dirname(dirname(abspath(__...
mit
5,956,504,451,291,047,000
35.62069
110
0.636064
false
3.75265
false
false
false
wiredrive/wtframework
wtframework/wtf/testobjects/tests/test_watched_test_case.py
1
5126
########################################################################## # This file is part of WTFramework. # # WTFramework 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 L...
gpl-3.0
-9,188,379,825,369,977,000
29.331361
78
0.588958
false
4.045777
true
false
false
ljmanso/AGM2
tools/agmdsr/src/genericworker.py
1
3256
# # Copyright (C) 2017 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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...
gpl-3.0
1,309,409,873,425,347,300
28.333333
106
0.727273
false
3.014815
false
false
false
raphaelvalentin/Utils
ngspice/syntax/nport.py
1
5197
from ngspice.syntax import * from functions.science import flatten from rawdata import touchstone from interpolate import interp1d __all__ = ['Nport'] class VCVSx(Netlist): __name__ = "vcvs" __type__ = "instance" __indent__ = "" def __init__(self, name='E1', nodes=('in', 'out', 'sensp', 'sensm...
gpl-2.0
2,556,812,261,765,248,500
34.59589
103
0.557629
false
2.655595
false
false
false
kylef/pyppp
pyppp/django/forms.py
1
3810
from django import forms from django.conf import settings from django.http import HttpResponseRedirect from django.views.decorators.cache import never_cache from django.contrib.auth import authenticate, REDIRECT_FIELD_NAME from django.contrib.formtools.wizard import FormWizard from pyppp.django import login from pyppp...
bsd-2-clause
4,494,156,654,408,472,000
38.6875
134
0.623622
false
4.127844
false
false
false
google/nerfactor
nerfactor/models/base.py
1
5484
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-6,663,748,743,042,805,000
37.34965
80
0.578957
false
4.335178
false
false
false
dials/dials
command_line/apply_mask.py
1
3188
import pickle from dxtbx.format.image import ImageBool from iotbx.phil import parse import dials.util help_message = """ This program augments a experiments JSON file with one or more masks specified by the user. Its only function is to input the mask file paths to the experiments JSON file, but means that the use...
bsd-3-clause
306,330,743,678,722,560
29.951456
86
0.620452
false
4.015113
false
false
false
WGBH/django-textplusstuff
textplusstuff/datastructures.py
1
5466
from __future__ import unicode_literals import json from django.utils.encoding import force_text from django.utils.safestring import mark_safe from .parser import ( MarkdownFlavoredTextNode, ModelStuffNode, TextPlusStuffLexer, TextPlusStuffParser ) class TextPlusStuff(object): def __init__(self...
mit
2,719,036,316,729,344,000
35.932432
79
0.5397
false
4.3728
false
false
false
prophile/jacquard
jacquard/directory/base.py
1
1451
"""Base class for directory implementations.""" import abc import collections UserEntry = collections.namedtuple("UserEntry", "id join_date tags") UserEntry.__doc__ = """ Description of attributes of a single user. Internally this is a `collections.namedtuple`. """ UserEntry.id.__doc__ = """String user ID.""" User...
mit
-3,654,069,613,207,161,300
27.45098
100
0.645762
false
4.635783
false
false
false
UfSoft/trac-google-search
tracext/google/search/__init__.py
1
3529
# -*- coding: utf-8 -*- # vim: sw=4 ts=4 fenc=utf-8 et # ============================================================================== # Copyright © 2008 UfSoft.org - Pedro Algarvio <ufs@ufsoft.org> # # Please view LICENSE for additional licensing information. # ========================================================...
bsd-3-clause
4,980,436,316,728,324,000
42.02439
80
0.55924
false
4.55814
false
false
false
pombredanne/dask
dask/tests/test_async.py
1
5236
from __future__ import absolute_import, division, print_function from operator import add from copy import deepcopy import dask import pytest from dask.async import * fib_dask = {'f0': 0, 'f1': 1, 'f2': 1, 'f3': 2, 'f4': 3, 'f5': 5, 'f6': 8} def test_start_state(): dsk = {'x': 1, 'y': 2, 'z': (inc, 'x'), 'w'...
bsd-3-clause
5,824,641,980,801,946,000
27.456522
75
0.442704
false
3.230105
true
false
false
nagordon/mechpy
mechpy/composites.py
1
71681
# coding: utf-8 ''' Module for composite material analysis Hyer-Stress Analysis of Fiber-Reinforced Composite Materials Herakovich-Mechanics of Fibrous Composites Daniel-Engineering Mechanics of Composite Materials Kollar-Mechanics of COmposite Structures NASA- Basic Mechancis of Lamianted Composites ht...
mit
4,286,907,931,120,713,000
37.298794
238
0.518464
false
2.876906
false
false
false
StoneyJackson/unzipR
unzipr.py
1
4368
# unzipR - A library for recursively extracting files. # Copyright (C) 2014 Stoney Jackson <dr.stoney@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 # the Free Software Foundation, either version 3 of ...
gpl-3.0
7,436,011,763,455,285,000
31.117647
80
0.695971
false
3.903485
false
false
false
aio-libs/aioredis
aioredis/connection.py
1
59561
import asyncio import errno import inspect import io import os import socket import ssl import threading import time import warnings from distutils.version import StrictVersion from itertools import chain from typing import ( Any, Iterable, List, Mapping, Optional, Set, Tuple, Type, ...
mit
5,627,629,003,666,229,000
36.155958
97
0.589312
false
4.512539
false
false
false
SmartCash/smartcash
contrib/seeds/generate-seeds.py
1
4382
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
mit
-8,129,644,415,492,418,000
30.753623
98
0.573026
false
3.18228
false
false
false
mathandy/Classifiers2LearnWith
experiments/vgg16_pre-trained/vgg16_pre-trained.py
1
9463
"""A pre-trained implimentation of VGG16 with weights trained on ImageNet.""" ########################################################################## # Special thanks to # http://www.cs.toronto.edu/~frossard/post/vgg16/ # for converting the caffe VGG16 pre-trained weights to TensorFlow # this file is essentially ju...
mit
468,354,589,904,741,300
43.219626
87
0.594843
false
3.298362
false
false
false
burgerdev/volumina
volumina/utility/preferencesManager.py
1
4045
############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # modify it und...
lgpl-3.0
-6,503,057,252,922,043,000
36.453704
93
0.578245
false
4.235602
false
false
false
pydanny/dj-stripe
tests/test_source.py
1
3473
""" dj-stripe Card Model Tests. """ import sys from copy import deepcopy from unittest.mock import patch from django.contrib.auth import get_user_model from django.test import TestCase from djstripe.models import Source from . import ( FAKE_CUSTOMER_III, FAKE_SOURCE, FAKE_SOURCE_II, AssertStripeFksMi...
bsd-3-clause
3,751,142,363,640,409,000
29.734513
87
0.610135
false
4.029002
true
false
false
Mause/pyalp
pyalp/gs_interface/interface.py
1
2747
from os.path import join, dirname HERE = dirname(__file__) import logging from apps.tournaments.models import Server, GameRequest from .rpc_client import get_interface import yaml resource_load = lambda name: yaml.load(open( join(HERE, 'resources', name) )) game_ports = resource_load('game_ports.yaml') game_nam...
mit
-7,299,512,025,326,176,000
22.478632
78
0.626866
false
3.768176
false
false
false
guziy/basemap
setup.py
1
6013
from __future__ import (absolute_import, division, print_function) import glob import io import os import sys from setuptools.dist import Distribution if sys.version_info < (2, 6): raise SystemExit("""matplotlib and the basemap toolkit require Python 2.6 or later.""") # Do not require numpy for just querying the...
gpl-2.0
8,225,000,807,982,011,000
38.559211
111
0.634791
false
3.653098
false
false
false
alexandrul-ci/robotframework
src/robot/utils/normalizing.py
1
3987
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
-7,067,595,486,309,116,000
31.680328
79
0.635566
false
4.035425
false
false
false
joshishungry/artificial_intel
assignments/lab4/map_coloring_csp.py
1
2656
#!/usr/bin/env python """ Implementation of the Map coloring problem from 2006 Quiz 2 """ import sys from csp import CSP, Variable, BinaryConstraint, solve_csp_problem, \ basic_constraint_checker def map_coloring_csp_problem(): constraints = [] variables = [] # order of the variables here is the order...
apache-2.0
-4,624,747,162,642,793,000
31
70
0.508283
false
3.613605
false
false
false
ianrenton/playbulb-tools
weathercheck/weathercheck.py
1
1370
# Python script to set a Playbulb LED colour based on the current weather. # Run me as a cron job for ambient weather information! # by Ian Renton # https://github.com/ianrenton/playbulb-tools # Uses python OpenWeatherMap wrapper from https://github.com/csparpa/pyowm import pyowm, re, subprocess #### Config #### # Y...
bsd-3-clause
7,456,926,169,413,411,000
34.128205
121
0.651095
false
3.051225
false
false
false
gogoair/foremast
src/foremast/securitygroup/create_securitygroup.py
1
11172
# Foremast - Pipeline Tooling # # Copyright 2018 Gogo, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
-642,778,247,066,717,200
33.481481
113
0.568654
false
4.372603
true
false
false
ReactiveX/RxPY
rx/core/operators/merge.py
1
4401
from typing import Callable, Optional import rx from rx import from_future from rx.core import Observable from rx.disposable import CompositeDisposable, SingleAssignmentDisposable from rx.internal.concurrency import synchronized from rx.internal.utils import is_future def _merge(*sources: Observable, max_...
mit
6,199,957,247,772,746,000
34.208
101
0.561918
false
4.757838
false
false
false
ioam/paramtk
paramtk/odict.py
1
46083
from __future__ import generators # odict.py # An Ordered Dictionary object # Copyright (C) 2005 Nicola Larosa, Michael Foord # E-mail: nico AT tekNico DOT net, fuzzyman AT voidspace DOT org DOT uk # This software is licensed under the terms of the BSD license. # http://www.voidspace.org.uk/python/license.shtml # Bas...
bsd-3-clause
3,860,535,775,826,466,300
32.248918
93
0.493306
false
3.779774
false
false
false
Rosebotics/pymata-aio
examples/sparkfun_redbot/sparkfun_experiments/Exp5_Bumpers.py
1
2908
#!/usr/bin/python """ Exp5_Bumpers -- RedBot Experiment 5 Now let's experiment with the whisker bumpers. These super-simple switches let you detect a collision before it really happens- the whisker will bump something before your robot crashes into it. This sketch was written by SparkFun Electronics, with l...
gpl-3.0
8,720,228,147,168,475,000
25.436364
95
0.671939
false
3.16087
false
false
false
pgr-me/metis_projects
04-marijuana/library/utilities.py
1
3623
from nytimesarticle import articleAPI import collections import math import datetime import re import pickle # api keys prasmuss = '7b4597b0dc6845688a8f90c00f3e60b6' peter_gray_rasmussen = '67391c8a5c6c2d8926eb3d9c5d136c59:7:72273330' proton = 'f8c34c7cda7848f997a9c273815d28a9' api = articleAPI(proton) def convert(d...
gpl-3.0
5,287,285,362,401,634,000
35.979592
114
0.645598
false
3.317766
false
false
false
gmelenka/BraidedCompositeDesign
main.py
1
49822
from kivy.app import App from kivy.lang import Builder from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.floatlayout import FloatLayout from kivy.properties import ObjectProperty from kivy.uix.spinner import Spinner from kivy.uix.listview import ListItemButton from kivy....
mit
7,503,996,245,676,990,000
37.383667
164
0.571615
false
3.559731
false
false
false
rpetrenko/test-reporter
server/api/common.py
1
1323
# This source code is licensed under the Apache license found in the # LICENSE file in the root directory of this project. import logging from flask_restplus import Api from server import settings from bson import json_util import json log = logging.getLogger(__name__) api = Api(version='1.0', title='Test...
apache-2.0
-776,886,979,894,500,600
23.962264
68
0.643991
false
3.472441
false
false
false
anisotropi4/goldfinch
bin/dump-tree.py
1
1613
#!/usr/bin/python3 import xml.etree.cElementTree as ET import sys import argparse parser = argparse.ArgumentParser(description='Strip namespace and a list of xml-tags in a tsv format') parser.add_argument('--path', dest='path', type=str, default='', help='output directory file') parser.add_argume...
mit
1,958,677,056,999,847,400
22.376812
102
0.555487
false
3.374477
false
false
false
pydio/pydio-sync
src/pydio/res/i18n/html_strings.py
1
9431
def _(a_string): return a_string var_1=_('How can I find my server URL?') var_2=_('The server URL is the adress that you can see in your browser when accessing Pydio via the web.') var_3=_('It starts with http or https depending on your server configuration.') var_4=_('If you are logged in Pydio and you see the last pa...
gpl-3.0
-2,384,637,885,232,840,700
37.493878
184
0.693564
false
3.507252
false
false
false
Neurita/boyle
boyle/files/utils.py
1
1412
# coding=utf-8 """ Utilities for file management. """ # ------------------------------------------------------------------------------ # Author: Alexandre Manhaes Savio <alexsavio@gmail.com> # # 2015, Alexandre Manhaes Savio # Use this at your own risk! # ----------------------------------------------------------------...
bsd-3-clause
4,066,195,155,547,318,300
20.723077
96
0.550992
false
3.911357
false
false
false
hguemar/cinder
cinder/api/contrib/admin_actions.py
1
11497
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-87,235,681,852,157,700
36.449511
79
0.596677
false
4.368161
false
false
false
litedesk/litedesk-webserver-provision
src/provisioning/models.py
1
20144
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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...
apache-2.0
4,245,768,454,504,376,300
32.186161
90
0.610653
false
3.993656
false
false
false
bender-bot/bender
bender/_tests/test_main.py
1
2381
from io import StringIO import pkg_resources import pytest import threading import bender._main from bender.backbones.console import BenderConsole from bender.decorators import backbone_start from bender.testing import VolatileBrain, DumbMessage @pytest.mark.timeout(3.0) def test_main(mock): stdout = StringIO() ...
lgpl-3.0
-8,346,947,514,074,849,000
28.395062
78
0.677866
false
3.640673
true
false
false
gaccardo/buxfer_api
api/reporter.py
1
16970
import os import math from reportlab.pdfgen import canvas from reportlab.graphics.shapes import Drawing from reportlab.graphics.charts.piecharts import Pie from reportlab.graphics.charts.legends import Legend from reportlab.lib.colors import black, red, purple, green, \ maroon, brown, pink, white, HexColor from re...
gpl-2.0
-7,674,272,941,585,014,000
32.537549
81
0.478197
false
3.387902
false
false
false
stephanie-wang/ray
python/ray/tune/suggest/variant_generator.py
1
8452
import copy import logging import numpy import random from ray.tune import TuneError from ray.tune.sample import sample_from logger = logging.getLogger(__name__) def generate_variants(unresolved_spec): """Generates variants from a spec (dict) with unresolved values. There are two types of unresolved values...
apache-2.0
5,152,314,125,364,362,000
29.846715
78
0.57442
false
4.045955
false
false
false
rwl/PyCIM
CIM14/IEC61968/AssetModels/ToWindingSpec.py
1
6782
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
mit
7,964,606,802,234,008,000
48.867647
328
0.696697
false
3.769872
true
false
false
walterbender/infoslicer
infoslicer/widgets/Gallery_View.py
1
8660
# Copyright (C) IBM Corporation 2008 from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf import os import cPickle import logging from Editable_Textbox import Editable_Textbox from infoslicer.processing.Article_Data import * from ...
gpl-2.0
-250,266,366,728,502,240
45.065217
111
0.600577
false
3.694539
false
false
false
mrchristine/dbc-notebooks
tools/pyspark_sync/workspace.py
1
12134
import base64 import argparse import json import requests import sys import os import fnmatch WS_LIST = "/workspace/list" WS_STATUS = "/workspace/get-status" WS_MKDIRS = "/workspace/mkdirs" WS_IMPORT = "/workspace/import" WS_EXPORT = "/workspace/export" LS_ZONES = "/clusters/list-zones" error_401 = """ Credentials ar...
apache-2.0
-2,087,793,057,794,017,300
39.178808
120
0.589171
false
3.853287
false
false
false
tkanemoto/unittest-xml-reporting
xmlrunner/result.py
1
18019
import os import sys import time import traceback import six import re from os import path from six import unichr from six.moves import StringIO from .unittest import TestResult, _TextTestResult # Matches invalid XML1.0 unicode characters, like control characters: # http://www.w3.org/TR/2006/REC-xml-20060816/#chars...
bsd-2-clause
3,852,937,358,608,100,400
33.191651
99
0.571896
false
4.121455
true
false
false
googleads/google-ads-python
google/ads/googleads/v8/services/services/domain_category_service/transports/base.py
1
3692
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-2,947,684,209,471,778,000
35.92
78
0.660347
false
4.308051
false
false
false
ask/kamqp
kamqp/client_0_8/basic_message.py
1
3707
# Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # ...
lgpl-2.1
-81,401,606,623,979,250
29.385246
75
0.642029
false
4.45018
false
false
false
openearth/aeolis-python
aeolis/gridparams.py
1
6901
'''This file is part of AeoLiS. AeoLiS 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. AeoLiS is distributed in the hope that it will...
gpl-3.0
-2,599,561,361,544,794,000
34.947917
114
0.409941
false
2.421404
false
false
false
sony/nnabla
python/src/nnabla/utils/nnp_graph.py
1
10867
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
apache-2.0
1,661,325,578,871,901,400
34.168285
105
0.594092
false
3.886624
false
false
false
eduardoneira/SistemasDistribuidos_TPFinal
CentroMonitoreoCiudad/FaceRecognizer/modules/old_feature_matcher.py
1
4628
#!/bin/python3 import numpy as np import cv2 import base64 import pdb from tkinter import * from matplotlib import pyplot as plt class FeatureMatcher: __PORC_DISTANCE = 0.7 def __init__(self,feature_extractor='SURF',upright=True,min_match_count=10,threshold=400): self.MIN_MATCH_COUNT = min_match_count ...
gpl-3.0
3,252,840,999,377,199,600
36.942623
123
0.645635
false
2.848
false
false
false
mpdehaan/camp
camp/core/scale.py
1
3292
""" Copyright 2016, Michael DeHaan <michael.dehaan@gmail.com> 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...
apache-2.0
5,020,501,145,689,694,000
29.766355
89
0.536148
false
3.171484
false
false
false
ingkebil/trost
scripts/process_xls.py
1
1832
#!/usr/bin/python # -*- coding: utf8 -*- import os import sys import math import xlrd import data_objects as DO import cast """ Excel cell type decides which cast function to use. """ CAST_FUNC = {xlrd.XL_CELL_EMPTY: str, xlrd.XL_CELL_TEXT: cast.cast_str, xlrd.XL_CELL_NUMBER: float, ...
gpl-2.0
-938,439,755,346,230,800
30.050847
97
0.566048
false
3.214035
false
false
false
induane/stomp.py3
stomp/test/threading_test.py
1
3873
try: from queue import Queue, Empty, Full except ImportError: from Queue import Queue, Empty, Full import threading import sys import time import unittest import stomp from testutils import * class MQ(object): def __init__(self): self.connection = stomp.Connection(get_standard_host(), 'admin', 'p...
apache-2.0
8,511,249,930,972,715,000
30.745902
84
0.46992
false
4.416192
true
false
false
Dziolas/invenio
modules/bibformat/lib/elements/bfe_keywords.py
1
2158
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 ## ...
gpl-2.0
7,402,563,837,806,346,000
34.966667
85
0.616775
false
4.15
false
false
false
oudalab/phyllo
phyllo/extractors/frodebertusDB.py
1
2443
import sqlite3 import urllib from urllib.request import urlopen from bs4 import BeautifulSoup, NavigableString import nltk nltk.download('punkt') from nltk import sent_tokenize def parseRes2(soup, title, url, cur, author, date, collectiontitle): chapter = '-' sen = "" num = 1 [e.extract() for e in s...
apache-2.0
8,485,862,798,001,893,000
31.573333
103
0.548506
false
3.787597
false
false
false
anrl/gini3
frontend/src/gbuilder/UI/Edge.py
1
4871
"""The graphical representation of connections of nodes""" import math from PyQt4 import QtCore, QtGui from Core.Item import * from Core.globals import options, mainWidgets, defaultOptions class Edge(QtGui.QGraphicsLineItem, Item): def __init__(self, startItem, endItem, parent=None, scene=None): ...
mit
1,296,057,378,893,043,700
29.836601
133
0.554917
false
4.018977
false
false
false
seanjh/CanadianInsiderTransactions
__main__.py
1
1156
"""Canadian Insider Transactions. Usage: sedi_transactions <issuer_num>... Options: -h --help Show this screen. --version Show version. """ import os from docopt import docopt from sedi_transactions.transactions import SEDIView OUTPUT_PATH = os.path.abspath( os.path.join(os.path.abspath(__f...
mit
6,034,782,397,232,671,000
25.906977
76
0.595156
false
3.492447
false
false
false
eyp-developers/statistics
statistics/migrations/0044_topic_overview_link.py
1
2256
# Generated by Django 2.0.1 on 2018-07-25 07:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statistics', '0043_merge_20180207_1821'), ] operations = [ migrations.AddField( model_name='session', name='topic_ov...
gpl-3.0
-440,385,167,275,794,300
58.368421
864
0.542996
false
3.241379
false
false
false
f-prettyland/angr
angr/state_plugins/fast_memory.py
1
8768
import logging import claripy from ..storage.memory import SimMemory from ..errors import SimFastMemoryError l = logging.getLogger("angr.state_plugins.fast_memory") l.setLevel(logging.DEBUG) class SimFastMemory(SimMemory): def __init__(self, memory_backer=None, memory_id=None, endness=None, contents=None, width...
bsd-2-clause
-5,351,947,909,110,622,000
37.28821
171
0.591811
false
3.740614
false
false
false
JohnLunzer/flexx
flexx/event/__init__.py
1
11458
""" The event module provides a simple system for properties and events, to let different components of an application react to each-other and to user input. In short: * The :class:`HasEvents <flexx.event.HasEvents>` class provides objects that have properties and can emit events. * There are three decorators to cr...
bsd-2-clause
7,249,233,369,221,251,000
32.211594
82
0.710159
false
3.972954
false
false
false