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
whiterabbitengine/fifeplusplus
tests/extension_tests/modelview_tests.py
1
2883
#!/usr/bin/env python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of ...
lgpl-2.1
-7,791,245,036,448,926,000
33.592593
97
0.673257
false
3.302405
true
false
false
sergei-maertens/bfeu.net
src/bfeu/conf/settings.py
1
8042
import os import django.conf.global_settings as DEFAULT_SETTINGS # Automatically figure out the ROOT_DIR and PROJECT_DIR. DJANGO_PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) ROOT_DIR = os.path.abspath(os.path.join(DJANGO_PROJECT_DIR, os.path.pardir, os.path.pardir)) # # Stan...
mit
-1,098,656,257,339,263,600
30.912698
127
0.642502
false
3.653794
false
false
false
wmttom/rehichao
rehichao.py
1
1326
# -*- coding: utf-8 -*- from intstr import IntStr from redis import StrictRedis redis_keyer = IntStr( '!"#$&()+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~' ) REDIS_KEY_ID = 'RedisKeyId' REDIS_KEY = 'RedisKey' REDIS_ID_KEY = 'RedisIdKey' _EXIST = set() class RedisKey(object): ...
apache-2.0
6,936,459,794,541,497,000
25.52
90
0.520362
false
3.444156
false
false
false
terrai/rastercube
rastercube/jgrid/utils.py
1
10119
""" Utility functions related to jGrid2 """ import gdal import numpy as np import numpy.ma as ma import rastercube.imutils as imutils import rastercube.gdal_utils as gdal_utils def fracs_for_poly_bbox_xy(header, polygon_xy): """ Returns fractions covered by the given polygon. This is based on the polygon'...
mit
5,451,843,363,966,093,000
35.139286
78
0.615278
false
3.357332
false
false
false
gfyoung/pandas
pandas/tests/strings/test_find_replace.py
1
20811
from datetime import datetime import re import numpy as np import pytest import pandas as pd from pandas import Index, Series, _testing as tm def test_contains(): values = np.array( ["foo", np.nan, "fooommm__foo", "mmm_", "foommm[_]+bar"], dtype=np.object_ ) values = Series(values) pat = "mm...
bsd-3-clause
6,857,426,806,594,123,000
31.824921
88
0.587478
false
3.169027
true
false
false
Rosuav/shed
BL1_find_items.py
1
17462
import argparse import os.path import struct import inspect from dataclasses import dataclass # ImportError? Upgrade to Python 3.7 or pip install dataclasses class FunctionArg: def __init__(self, desc="keyword", other_args=0): self.desc = desc self.functions = {} self.other_args = other_args # Number of args gi...
mit
1,392,985,254,175,123,700
35.684874
172
0.70181
false
2.863562
false
false
false
j-be/laundry-dudes
server/laundrydude-server.py
1
5181
#!flask/bin/python import datetime import time import smtplib from email.mime.text import MIMEText import domain from sqlobject import SQLObjectNotFound from flask import Flask, request, jsonify, abort LED_THRESHOLD = 600 data_types = None app = Flask(__name__) washer_state = None def _getTimeOfDay(dt): return ...
mit
107,147,871,397,105,260
25.569231
82
0.691565
false
2.805089
false
false
false
jut-io/jut-python-tools
jut/api/integrations.py
1
1068
""" jut integrations api """ from jut import defaults from jut.api import deployments, data_engine def get_webhook_url(deployment_name, space='default', data_source='webhook', token_manager=None, app_url=defaults.APP_URL, ...
mit
4,401,881,427,402,692,000
29.514286
80
0.4897
false
4.25498
false
false
false
simright/flask-security
flask_security/decorators.py
1
8042
# -*- coding: utf-8 -*- """ flask_security.decorators ~~~~~~~~~~~~~~~~~~~~~~~~~ Flask-Security decorators module :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ import re from collections import namedtuple from functools import wraps from flask import (abort...
mit
5,692,127,315,478,371,000
30.490196
92
0.615318
false
4.219653
false
false
false
arantes555/oblivious-movie-gharial
config.py
1
1105
import os from sys import maxsize # Minimum relevance (in per cent of the total amount of documents) to accept a classifier MIN_RELEVANCE = 0.001 # Max amount of reviews to retrieve MAX_REVIEWS = maxsize # Max amount of movies to analyze MOVIES_TO_ANALYZE = 1500 # Movies to classify after the model is trained MOVIE...
mit
660,543,326,210,007,400
23.555556
89
0.751131
false
3.130312
false
false
false
alexoneill/py3status
py3status/modules/github.py
1
9985
# -*- coding: utf-8 -*- """ Display Github notifications and issue/pull requests for a repo. To check notifications a Github `username` and `personal access token` are required. You can create a personal access token at https://github.com/settings/tokens The only `scope` needed is `notifications`, which provides read...
bsd-3-clause
7,620,734,784,100,960,000
35.441606
94
0.576565
false
4.254367
false
false
false
slachiewicz/teryt2osm
teryt2osm/reporting.py
1
8621
# vi: encoding=utf-8 # teryt2osm - tool to merge TERYT data with OSM maps # Copyright (C) 2009 Jacek Konieczny <jajcus@jajcus.net> # # 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 versi...
gpl-2.0
-6,645,002,260,093,666,000
33.035573
96
0.569272
false
3.944572
false
false
false
zjuchenyuan/BioWeb
Lib/Bio/SVDSuperimposer/__init__.py
1
5375
# Copyright (C) 2002, Thomas Hamelryck (thamelry@vub.ac.be) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Align on protein structure onto another using SVD alignment. SVDSuperimposer finds the b...
mit
-6,332,052,390,746,206,000
30.432749
76
0.610977
false
3.748257
false
false
false
jiadaizhao/LeetCode
0201-0300/0269-Alien Dictionary/0269-Alien Dictionary.py
1
1091
import collections class Solution: def alienOrder(self, words: List[str]) -> str: letters = set() prev = '' graph = collections.defaultdict(set) for word in words: for c in word: letters.add(c) for a, b in zip(prev, word): if a...
mit
-724,017,005,088,899,200
25.609756
69
0.409716
false
4.417004
false
false
false
fevxie/odoo-infrastructure
infrastructure/models/environment.py
1
9464
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## import string from openerp import models, fields, ...
agpl-3.0
-3,885,337,799,388,930,600
31.190476
78
0.533707
false
4.061803
false
false
false
basmot/futsal_management
base/models/person_address.py
1
1675
############################################################################## # # Copyright 2015-2016 Bastien Mottiaux # # 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.apac...
apache-2.0
-7,179,946,004,434,599,000
38.880952
104
0.647761
false
4.156328
false
false
false
Zuckonit/devent
devent/event.py
1
1423
#!/usr/bin/env python # encoding: utf-8 """ use a global dict to store the events, and here put event related operations wrapper ~~~~~~~~ event.py """ from gevent.event import AsyncResult from .errors import ( EventKeyAlreadyExisted, EventKeyTypeError, ) __all__ = [ 'set_event', ...
mit
4,389,554,712,849,286,000
19.623188
49
0.624034
false
3.620865
false
false
false
Azure/azure-sdk-for-python
sdk/storage/azure-storage-blob/azure/storage/blob/aio/_download_async.py
1
22010
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
mit
-8,986,826,406,296,550,000
39.23766
107
0.581645
false
4.631734
true
false
false
Naereen/mazhe
phystricksExoXLVL.py
1
1188
from phystricks import * def ExoXLVL(): pspict,fig = SinglePicture("ExoXLVL") x=var('x') dist=0.1 l=2.5 C1=Rectangle( Point(-l,l),Point(-dist,dist) ) C2=Rectangle( Point(0,0),Point(l,l) ) C3=Rectangle( Point(0,0),Point(-l,-l) ) C4=Rectangle( Point(dist,-dist),Point(l,-l) ) C1.para...
gpl-3.0
8,272,567,932,617,199,000
26
55
0.637205
false
2.501053
false
false
false
chaincoin/chaincoin
contrib/devtools/update-translations.py
1
8664
#!/usr/bin/env python3 # 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. ''' Run this script from the root of the repository to update all translations from transifex. It will do the foll...
mit
1,825,707,706,652,677,600
38.381818
140
0.622807
false
4.151414
false
false
false
rosalindfdt/huzzahbadge
huzzah/register/adafruit_register/i2c_bcd_alarm.py
1
6391
# The MIT License (MIT) # # Copyright (c) 2016 Scott Shawcroft for Adafruit Industries # # 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 ...
artistic-2.0
7,971,070,526,889,591,000
37.733333
112
0.610703
false
3.596511
false
false
false
RincewindWizzard/django_digisys
django_digisys/settings.py
1
2561
""" Django settings for django_digisys project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...
gpl-2.0
5,638,799,035,028,847,000
23.625
77
0.696212
false
3.237674
false
false
false
sbuss/TigerShark
tigershark/parsers/M278_4010_X094_27_A1.py
1
129238
# # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.981434 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties parsed_278_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Prop...
bsd-3-clause
3,310,170,976,286,571,500
69.009751
707
0.610316
false
2.496195
false
false
false
chrislit/abydos
abydos/distance/_yjhhr.py
1
5217
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
6,945,651,139,748,284,000
26.75
78
0.553575
false
3.997701
false
false
false
lovelysystems/pyjamas
examples/libtest/BuiltinTest.py
1
4923
from UnitTest import UnitTest try: builtin_value = builtin.value except: builtin_value = None if False: import builtin import builtin class Foo: pass class BuiltinTest(UnitTest): def testMinMax(self): self.assertEqual(max(1,2,3,4), 4) self.assertEqual(min(1,2,3,4), 1) sel...
apache-2.0
842,479,220,760,072,800
33.1875
129
0.530977
false
3.174081
true
false
false
levilucio/SyVOLT
ExFamToPerson/contracts/HPos_ChildSchool_ConnectedLHS.py
1
11680
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HPos_ChildSchool_ConnectedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HPos_ChildSchool_ConnectedLHS. """ ...
mit
-8,973,953,865,711,570,000
50.681416
128
0.469863
false
5.149912
false
false
false
leedsEM/movement
reorder4LMBFGS.py
1
2635
#!/usr/bin/python import glob import os import sys ## find the labels and identify the right columns; put in labeldic # vers = "0.3" # vers 0.3 updated to output in fortran formatted numbers print "**** reorder starfile for individual particle correction using LMBFGS v {0}".format(vers) ### ---- function: reorde...
gpl-2.0
8,108,566,278,060,007,000
30
97
0.476281
false
3.85798
false
false
false
chjost/analysis-code
analysis/fitresults.py
1
12123
# a class to contain the fit results import numpy as np from analyze_fcts import calc_error from ensemble import LatticeEnsemble from fit import genfit, genfit_comb, set_fit_interval from fit import fit as fit1 from plot import genplot, genplot_comb from input_output import write_fitresults, read_fitresults from modu...
gpl-3.0
-143,162,281,004,933,150
38.23301
89
0.541203
false
3.625299
false
false
false
guzmonne/meraki_api
meraki_api/networks.py
1
4729
""" Meraki Networks API Resource """ import urllib from .meraki_api_resource import MerakiAPIResource from .devices import Devices from .ssids import SSIDs from .site_to_site_vpn import SiteToSiteVPN from .phone_contacts import PhoneContacts from .sm import SM from .static_routes import StaticRoutes from .vlans import...
mit
-4,322,985,330,267,941,400
35.376923
244
0.642842
false
3.866721
false
false
false
bjuvensjo/scripts
vang/misc/basic.py
1
1626
#!/usr/bin/env python3 from argparse import ArgumentParser from base64 import encodebytes from os import environ, name, system from sys import argv def get_basic_auth(username, password): """Returns basic authentication. Args: username (str): the username (defaults to environment variable 'U') ...
apache-2.0
8,338,868,900,330,906,000
29.111111
80
0.641451
false
3.799065
false
false
false
qisanstudio/qsapp-express
src/express/panel/account.py
1
2438
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask import request, url_for, flash, redirect from flask.ext.admin import expose from flask.ext.admin.babel import gettext from flask.ext.admin.actions import action from studio.core.engines import db from express.models.account import (...
mit
-9,158,380,060,821,169,000
26.682353
77
0.597621
false
3.705167
false
false
false
tcpcloud/openvstorage
webapps/api/backend/views/tasks.py
1
2521
# Copyright 2014 Open vStorage NV # # 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 writ...
apache-2.0
-2,150,323,591,975,315,000
30.911392
83
0.623165
false
4.215719
false
false
false
gregunz/ada2017
project/src/fetch_source_country.py
1
11025
# -*- coding: utf-8 -*- import csv import os import re import pandas as pd import requests from bs4 import BeautifulSoup def get_all_newspapers_to_country_dict(v2=True): """Get the country associated to each newspapers url in a dict following the format: {'Clean URL' : 'Country name'} This fu...
mit
7,856,140,663,845,053,000
49.27907
231
0.524444
false
4.019322
false
false
false
ksetyadi/Sahana-Eden
models/assess.py
1
92989
# -*- coding: utf-8 -*- """ Assessment - Model @author: Fran Boon @author: Dominic König @author: Michael Howden This module currently contains 2 types of Assessments * Flexible Impact Assessments * Rapid Assessment Tool (from ECB: http://www.ecbproject.org/page/48) @ToDo Validati...
mit
-4,170,479,478,176,753,000
49.84199
206
0.582585
false
3.836655
false
false
false
HybridF5/jacket
jacket/api/compute/openstack/compute/legacy_v2/contrib/certificates.py
1
2777
# Copyright (c) 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 ...
apache-2.0
5,370,336,433,982,505,000
34.151899
78
0.658264
false
4.213961
false
false
false
LaserTron/web-crs
control.py
1
8891
import web import gradebook import hashlib import time # #Requires a DB with a table called 'States' with columns 'state' and 'page' #Requires a DB with a tabe called 'Users' with columns 'username' and 'section' def sha1digest(s): salt = "boy this is salty frdew34567uhygfrer6uhgfrtyuhijhbgftrdfg" ho = hashli...
lgpl-3.0
3,575,754,073,379,911,000
27.225397
79
0.637611
false
3.62898
false
false
false
kmunve/processgpr
core/picks.py
1
1331
''' The I{PICKS} class handles picked data. Created on 20.10.2010 @author: Karsten Mueller ''' class PICKS(): def __init__(self): self.trace = [] self.twt = [] self.x = [] self.y = [] self.elev = [] self.tell = 0 # counts the picks self.pltid = 0 # contr...
gpl-2.0
-3,223,778,338,680,800,000
27.340426
75
0.464313
false
3.33584
false
false
false
ReCodEx/monitor
monitor/zeromq_connection.py
1
3194
#!/usr/bin/env python3 """ Handle zeromq socket. """ import zmq import json class ServerConnection: """ Class responsible for creating zeromq socket (server) and receiving messages from connected clients. The message should be text with format <ID>,<MESSAGE>, where text <MESSAGE> will be sent to webs...
mit
1,098,159,602,580,343,600
39.948718
87
0.576706
false
4.752976
false
false
false
any1m1c/ipc20161
lista4/ipc_lista4.19.py
1
1551
# EQUIPE 2 # # Ana Beatriz Frota - 1615310027 # # # #Kylciane Cristiny Lopes Freitas - 1615310052 #Questao 19 votos = [0 ,0, 0, 0, 0, 0] sistemas =["1- Windows Server", "2- Unix", "3- Linux","4- Netware","5- Mac OS","6- Outro","0- Sair da enquete"] continua = True total = 0 porc_votos = [] while(continua): p...
apache-2.0
-2,458,113,463,606,470,700
21.794118
111
0.53871
false
2.516234
false
false
false
TristanCacqueray/tbac-reg
main/tools/src/scripts/tbac_get_attr.py
1
1404
#!/usr/bin/python -OO # -*- coding: utf8 -*- ############################################################################ # (c) 2005-2010 freenode#rsbac # # 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 Fou...
gpl-2.0
8,475,136,004,425,136,000
32.428571
76
0.626781
false
3.6
false
false
false
auready/django
django/contrib/gis/feeds.py
1
5765
from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin: """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C Geo elements. """ def georss_coords(self...
bsd-3-clause
-6,600,715,152,181,236,000
39.598592
101
0.57294
false
4.077086
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-datafactory/azure/mgmt/datafactory/models/amazon_redshift_linked_service.py
1
3598
# 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
-5,348,006,601,177,244,000
46.342105
173
0.660367
false
4.520101
false
false
false
boshmaf/sypy
sypy/results.py
1
2512
# SyPy: A Python framework for evaluating graph-based Sybil detection # algorithms in social and information networks. # # Copyright (C) 2013 Yazan Boshmaf # # 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 # ...
gpl-3.0
-5,480,218,016,483,117,000
30.4
74
0.556927
false
3.800303
false
false
false
bmaggard/luigi
luigi/contrib/bigquery.py
1
18778
# -*- coding: utf-8 -*- # # Copyright 2015 Twitter 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 ...
apache-2.0
4,507,529,935,092,633,600
32.834234
126
0.578017
false
4.424599
false
false
false
gjhiggins/elixir
elixir/collection.py
1
4508
''' Default entity collection implementation ''' import sys import re class BaseCollection(list): def __init__(self, entities=None): list.__init__(self) if entities is not None: self.extend(entities) def extend(self, entities): for e in entities: self.append(e)...
mit
-6,948,553,760,769,409,000
34.21875
79
0.537045
false
4.671503
false
false
false
a1ezzz/wasp-general
wasp_general/os/linux/lvm.py
1
15583
# -*- coding: utf-8 -*- # wasp_general/os/linux/lvm.py # # Copyright (C) 2017 the wasp-general authors and contributors # <see AUTHORS file> # # This file is part of wasp-general. # # Wasp-general is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as pu...
lgpl-3.0
-1,874,695,065,266,353,400
28.072761
108
0.687416
false
3.305685
false
false
false
mountainpenguin/BySH
server/lib/tornado/web.py
1
85300
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
7,279,264,925,478,021,000
38.822596
96
0.590973
false
4.360718
false
false
false
black-silence/PlanetNomadsSavegameEditor
PlanetNomads/Savegame.py
1
30585
#!/usr/bin/python # -*- coding: utf-8 -*- import sqlite3 import xml.etree.ElementTree as ETree import re import random import zipfile import os import atexit from math import sqrt from collections import OrderedDict class Savegame: def __init__(self): self.filename = "" self.temp_extracted_file = ...
mit
-1,921,983,318,273,434,600
32.064865
189
0.534935
false
3.63804
false
false
false
sidorov-si/TADStates
calc_enr.py
1
6053
#!/usr/bin/env python """ Calculate enrichment of regions with states using ChromHMM. Usage: calc_enr.py (-r <regions_file> | -R <directory_with_regions_files>) (-s <segmentation_directory> | -S <directory_with_segmentation_directories>) -c <ChromHMM_directory> -o <output_directory> Options: -h --help ...
gpl-2.0
-5,044,784,646,270,650,000
38.822368
192
0.594581
false
3.895109
false
false
false
SopaXorzTaker/pypowder
thepowdertoy/thepowdertoy.py
1
18583
import hashlib import requests # Servers DEFAULT_SERVER = "powdertoy.co.uk" DEFAULT_STATIC_SERVER = "static.powdertoy.co.uk" # Check for version updates UPDATE_VERSION_STABLE = "Stable" UPDATE_VERSION_BETA = "Beta" UPDATE_VERSION_SNAPSHOT = "Snapshot" # User elevations USER_ELEVATION_NONE = "" USER_ELEVATION_MOD = "...
gpl-3.0
3,383,186,490,061,603,000
30.49661
115
0.544745
false
3.986057
false
false
false
jhallock7/SparseBayes-Python
SB2_ParameterSettings.py
1
3373
# The following is a Python translation of a MATLAB file originally written principally by Mike Tipping # as part of his SparseBayes software library. Initially published on GitHub on July 21st, 2015. # SB2_PARAMETERSETTINGS User parameter initialisation for SPARSEBAYES # # SETTINGS = SB2_PARAMETERSETTINGS(parameter...
gpl-2.0
-5,058,282,655,556,856,000
31.432692
103
0.660243
false
3.670294
false
false
false
nickwolensky/mayaunittest
testcode_inspect_ui.py
1
4789
"""User interface to help test maya tool code. Will work from within Maya UI as well as standalone and can be run from an external interpreter such as mayapy. Example:: Todo: """ import os import sys from nw_tools.Qt import QtWidgets, QtGui, QtCore from nw_tools.ui.tools import get_maya_window, SuperWindow import run...
mit
5,874,005,164,232,687,000
29.698718
79
0.622886
false
3.756078
true
false
false
valohai/minique
minique/encoding.py
1
1624
import json from typing import Union, Any registry = {} default_encoding_name = None def register_encoding(name, *, default=False): def decorator(cls): global default_encoding_name registry[name] = cls if default: default_encoding_name = name return cls return dec...
mit
2,236,752,375,533,370,600
26.525424
85
0.602217
false
4.240209
false
false
false
edx/i18n-tools
i18n/main.py
1
1437
#!/usr/bin/env python """ Main function for internationalization tools. """ import importlib import sys from path import Path def get_valid_commands(): """ Returns valid commands. Returns: commands (list): List of valid commands """ modules = [m.basename().split('.')[0] for m in Path(__f...
apache-2.0
5,347,723,365,741,315,000
21.453125
90
0.601253
false
4.070822
false
false
false
OpenEdition/bilbo
src/bilbo/reference/Word.py
1
4264
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Created on April 18, 2012 @author: Young-Min Kim, Jade Tavernier """ from bilbo.reference.Balise import Balise from bilbo.reference.Feature import Feature class Word(object): """ A class corresponding to a word in a reference. It contains word na...
gpl-2.0
7,075,776,964,256,177,000
19.113208
92
0.645403
false
2.898708
false
false
false
fluxer/spm
nuitka/nuitka/containers/odict.py
1
6241
# :copyright: (c) 2008 by Armin Ronacher and PEP 273 authors. # :license: modified BSD license. # # 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...
gpl-2.0
-8,327,234,843,170,627,000
33.480663
83
0.579875
false
4.4867
false
false
false
Tiimber/terminal-notification
growl_notifier.py
1
1544
try: import gntp.notifier except ImportError: pass class GrowlNotifier(): growl = None @staticmethod def register(): if GrowlNotifier.growl is None: GrowlNotifier.growl = gntp.notifier.GrowlNotifier( applicationName='Terminal Notification', noti...
gpl-2.0
2,967,684,299,168,456,000
32.586957
94
0.588731
false
4.568047
false
false
false
lyubent/CassTor
cassandra/pylib/cqlshlib/formatting.py
1
8617
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
mit
-2,934,228,930,725,762,600
39.455399
101
0.659278
false
3.456478
false
false
false
genialis/resolwe-bio
resolwe_bio/tools/demultiplex.py
1
11588
#!/usr/bin/env python3 # XXX: Refactor to a comand line tool and remove pylint disable """NGS reads demultiplexer.""" import argparse import gzip import json import os import subprocess import sys from resolwe_runtime_utils import error, export_file, progress, run, save, send_message from six import iteritems parser...
apache-2.0
-835,447,415,483,483,300
31.827195
88
0.427166
false
4.060266
false
false
false
aimas/TuniErp-8.0
addons/pad_project/__openerp__.py
1
1503
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-4,788,185,978,103,792,000
38.552632
78
0.578177
false
4.245763
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_operation.py
1
4797
# 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
-3,615,658,341,865,835,000
41.078947
103
0.608505
false
4.058376
false
false
false
yesudeep/cmc
app/models.py
1
7739
#!/usr/bin/env python # -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; -*- # Models for the datastore. # Copyright (c) 2009 happychickoo. # # The MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the...
mit
-3,802,891,922,520,883,000
31.931915
111
0.671663
false
3.888945
false
false
false
msimacek/koschei
alembic/versions/14ef9d47d314_split_dependency_changes_table.py
1
1760
"""Split dependency changes table Revision ID: 14ef9d47d314 Revises: 31d647dbc4c5 Create Date: 2015-09-07 16:23:42.789628 """ # revision identifiers, used by Alembic. revision = '14ef9d47d314' down_revision = '31d647dbc4c5' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('unappli...
gpl-2.0
2,047,308,295,171,628,800
38.111111
109
0.667614
false
3.562753
false
false
false
alokjani/contrail-datapipeline
tools/dummy-http-receiver.py
1
1358
#!/usr/bin/env python """ Very simple HTTP server in python. Usage:: ./dummy-web-server.py [<port>] Send a GET request:: curl http://localhost Send a HEAD request:: curl -I http://localhost Send a POST request:: curl -d "foo=bar&bin=baz" http://localhost """ from BaseHTTPServer import BaseHTTPRequ...
apache-2.0
-7,341,904,458,939,571,000
24.148148
89
0.616348
false
3.621333
false
false
false
PermutaTriangle/PermStruct
examples/classical_3_4/321_2134.py
1
1261
from __future__ import print_function from permuta import * import permstruct import permstruct.dag from permstruct import * from permstruct.dag import taylor_dag import sys is_classical = True # -- Wilf-class 2 in http://wikipedia.org/wiki/Enumerations_of_specific_permutation_classes -- # # STATUS ================...
bsd-3-clause
245,150,646,829,064,480
25.270833
96
0.59318
false
3.380697
false
false
false
CZ-NIC/foris
foris/config_handlers/profile.py
1
2032
# coding=utf-8 # Foris - web administration interface # Copyright (C) 2018 CZ.NIC, z.s.p.o. <http://www.nic.cz> # # 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...
gpl-3.0
8,376,547,051,335,723,000
33.440678
93
0.682579
false
3.863118
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/lib/ops/cmd/drivers.py
1
3371
import ops.cmd import ops import ops.env import ops.cmd.safetychecks from ops.cmd import getBoolOption, setBoolOption, getValueOption, setListOption, setStringOption OpsCommandException = ops.cmd.OpsCommandException VALID_OPTIONS = ['minimal', 'load', 'unload', 'list', 'minimal', 'nosignature', 'noversion'] class Dri...
unlicense
-1,865,745,882,127,163,600
47.171429
125
0.646099
false
3.518789
false
false
false
cosurgi/trunk
examples/mpi/testMPI_3D_bisection.py
1
2164
# Possible executions of this script # ./yadempi script.py #interactive will spawn additional workers # mpiexec -n 4 ./yadempi script.py #non interactive NSTEPS=100 #turn it >0 to see time iterations, else only initilization TODO!HACK import os from yade import mpy as mp numThreads = 6 #add spheres young = 5e6 co...
gpl-2.0
2,623,087,043,722,613,000
30.823529
182
0.719963
false
2.610374
false
false
false
cloudxaas/cloudauth
lib/libauthz.py
1
3763
#!/usr/bin/python import os import sys import pwd import uuid import struct import socket import logging import base64 import urlparse import time import datetime import json import grp, pwd import libauthn from M2Crypto import EVP, EC, util logger = logging.getLogger("libauthz") def assert_authz(qstr, authn_cer...
apache-2.0
6,111,352,499,256,282,000
21.806061
105
0.577199
false
3.056864
false
false
false
thtrieu/essence
src/optimizer.py
1
2211
import numpy as np from .utils import extract class Optimizer(object): def __init__(self, lr = 1e-3, *args, **kwargs): minimize, kwargs = extract('minimize', True, **kwargs) self._lr = lr * (2. * np.float64(minimize) - 1.) self._construct(*args, **kwargs) def apply(self, var_slot): ...
gpl-3.0
-509,026,370,414,560,960
25.97561
62
0.509272
false
3.049655
false
false
false
kwoodhouse93/astro-bomber
source/bomber.py
1
5440
import pygame from pygame.locals import * import pymunk from source import game from source.constants import * from source.utilities import * from source.weapon import * class Bomber: def __init__(self): self.width = width = BOMBER_WIDTH self.height = height = BOMBER_HEIGHT vertices = [ ...
mit
-653,415,825,549,484,000
36.777778
111
0.627206
false
3.37469
false
false
false
rebase-helper/rebase-helper
rebasehelper/tests/functional/test_rebase.py
1
10429
# -*- coding: utf-8 -*- # # This tool helps you rebase your package to the latest version # Copyright (C) 2013-2019 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version...
gpl-2.0
1,191,313,108,908,472,000
46.807339
103
0.613702
false
3.857143
true
false
false
dssg/wikienergy
proto/pylearn2/create_appliance_detection_dataset.py
1
1872
import sys import os.path sys.path.append(os.path.abspath(os.path.join(os.pardir,os.pardir))) import disaggregator as da import disaggregator.PecanStreetDatasetAdapter as psda import pylearn2.datasets as ds import pickle import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='crea...
mit
-4,833,271,291,454,625,000
36.44
101
0.657585
false
3.379061
true
false
false
diana-hep/carl
tests/distributions/test_join.py
1
1471
# Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. import numpy as np from numpy.testing import assert_array_almost_equal from carl.distributions import Join from carl.distributions import Normal from carl.distributions...
bsd-3-clause
550,063,724,693,675,600
31.688889
67
0.635622
false
2.839768
false
false
false
Azure/azure-sdk-for-python
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/data_lake_analytics_account_basic_py3.py
1
3694
# 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
5,611,381,449,626,307,000
40.977273
112
0.615864
false
4.077263
false
false
false
Mugginz/Thermofun
thermostat/subroutine.py
1
2625
# Helper functions for controller import time, os, sys, threading, socket THERMOMETER_URI = '/sys/bus/w1/devices/28-0000054b97a5/w1_slave' LOGFILE = 'incidents.log' # Change argument to 'w' to clear logs on startup. with open(LOGFILE, 'a') as f: pass def eventLog(message): try: # Limit file size. with open(LOGF...
gpl-2.0
-4,010,749,887,447,146,000
24.240385
72
0.663238
false
2.890969
false
false
false
glabilloy/fabrydb
fabrydb/conf/settings.py
1
1697
import os from global_settings import * try: from local_settings import * from local_settings_secret import * except ImportError: import warnings warnings.warn('Local settings have not been found (src.conf.local_settings). Trying to import Heroku config...') try: from local_settings_heroku...
bsd-2-clause
-1,389,080,983,223,519,000
33.632653
116
0.713612
false
3.449187
false
false
false
dibaunaumh/tikal-corp-website
cms/menu.py
1
8499
from menus.menu_pool import menu_pool from menus.base import Menu, NavigationNode, Modifier from cms.utils import get_language_from_request from cms.utils.moderator import get_page_queryset, get_title_queryset from django.conf import settings from django.contrib.sites.models import Site from cms.utils.i18n import get_f...
bsd-3-clause
-5,967,053,210,868,146,000
37.986239
117
0.53218
false
4.273002
false
false
false
AdirShemesh/LibraryWiki
app/node_entities.py
1
3155
import json from app.authorities import CODES from requests import get import xmltodict class Entity: def __init__(self, data): self.data = data self.properties = self._build_properties() self.labels = self._build_labels() def _build_properties(self): raise NotImplemented ...
gpl-2.0
9,033,349,775,582,352,000
28.485981
100
0.562282
false
3.899876
false
false
false
cloudify-cosmo/cloudify-plugins-common
cloudify/utils.py
1
15485
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
3,845,092,131,709,111,300
30.473577
79
0.613174
false
4.276443
false
false
false
bodylabs/blmath
blmath/geometry/transform/rigid_transform.py
1
2624
def find_rigid_transform(a, b, visualize=False): """ Args: a: a 3xN array of vertex locations b: a 3xN array of vertex locations Returns: (R,T) such that R.dot(a)+T ~= b Based on Arun et al, "Least-squares fitting of two 3-D point sets," 1987. See also Eggert et al, "Estimating 3-D ...
bsd-2-clause
5,908,274,546,677,623,000
27.521739
127
0.552973
false
3.009174
false
false
false
Colin-b/pyconfigparser
setup.py
1
1185
import os from setuptools import setup, find_packages this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, 'README.md'), 'r') as f: long_description = f.read() setup(name='pyconfigparser', version='0.1', author='Bounouar Colin', maintainer='Bounouar Colin', ...
mit
2,933,620,478,361,313,300
31.916667
65
0.587342
false
4.157895
false
true
false
UCSD-E4E/aerial_lidar
catkin_ws/src/laser_tfs/src/nodes/plot.py
1
1482
#!/usr/bin/env python import roslib roslib.load_manifest('laser_tfs') import rospy import math import matplotlib.pyplot as plt import numpy as np import tf from geometry_msgs.msg import PoseWithCovarianceStamped def handle_fcu_pose(msg): br = tf.TransformBroadcaster() global count p = msg.pose.pose.posi...
mit
5,908,898,019,131,150,000
24.118644
66
0.597841
false
3.049383
false
false
false
nityansuman/Python-3
data_structures/tuples.py
1
1373
# Tuple data structure sample_tuple = ('Glenn', 'Sally', 'John') print(sample_tuple) # First Element of the tuple print(sample_tuple[0]) y = (1, 9, 15) # New tuple print(max(y)) # Max value of the tuple # Tuples are immutable like strings, cannot change the value of tuples # You cannot sort, reverse or ...
gpl-3.0
3,198,536,309,866,640,000
21.672414
126
0.622724
false
2.671206
false
false
false
SKIRT/PTS
magic/misc/imfit.py
1
12412
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
agpl-3.0
-2,269,840,293,426,458,600
35.395894
102
0.593183
false
4.021711
false
false
false
google/iree
third_party/format_diff/format_diff.py
1
5904
#!/usr/bin/env python3 # #===- format_diff.py - Diff Reformatter ----*- python3 -*--===# # # This file is licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===-----------------------------...
apache-2.0
-8,796,428,589,158,364,000
34.781818
94
0.612297
false
3.762906
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/py-python-gitlab/package.py
1
1868
############################################################################## # 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
5,940,696,918,200,540,000
44.560976
90
0.67773
false
3.585413
false
false
false
troywatson/Python-Grammar-Checker
fartherVsFurther/CountSyllables.py
1
2787
''' Count Syllables v1.0 A simple class to count syllables using a dictionary method This class will attempt to calculate syllables of words not found in dictionary ''' class CountSyllables(object): ...
mit
-3,347,954,875,784,145,400
35.671053
116
0.425188
false
4.985689
false
false
false
lgarren/spack
var/spack/repos/builtin/packages/opencv/package.py
1
10399
############################################################################## # 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
-4,794,252,325,094,675,000
44.017316
104
0.561689
false
3.711278
false
false
false
gam17/QAD
qad_circle_fun.py
1
63798
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin funzioni per creare cerchi ------------------- begin : 2018-04-08 copyright : iiiii emai...
gpl-3.0
9,054,910,789,273,340,000
39.761468
118
0.607645
false
3.153603
false
false
false
hortonworks/hortonworks-sandbox
desktop/core/src/desktop/middleware_test.py
1
1593
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
5,882,152,061,198,778,000
36.046512
74
0.733208
false
3.367865
false
false
false
corumcorp/redsentir
redsentir/lineatiempo/migrations/0001_initial.py
1
2480
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2018-04-04 18:06 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): initial = True dependencies = [ migratio...
gpl-3.0
3,658,711,810,807,085,600
39
121
0.587097
false
4.112769
false
false
false
bdunnette/djecks
migrations/0005_auto__add_field_case_source__chg_field_case_title__chg_field_deck_titl.py
1
3187
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Case.source' db.add_column(u'djecks_case', 'source', ...
agpl-3.0
-5,144,000,211,033,142,000
50.419355
165
0.564481
false
3.513782
false
false
false
jreades/starspy
stars/visualization/kernelDensityTime.py
1
7148
""" Yet Another Kernel Density Implementation in Python This one supports updating the raster one event at a time, to allow for time series visualization. """ from sys import stdout import pysal import numpy from math import exp,pi,ceil,floor,sqrt #try: # from osgeo import gdal, gdal_array # from osgeo.gdalcon...
gpl-2.0
3,872,030,793,151,872,500
35.284264
145
0.559177
false
3.357445
false
false
false
hayj/WorkspaceManager
workspacemanager/test/setuptest.py
1
1453
# coding: utf-8 import unittest import doctest import os from workspacemanager import setup from workspacemanager import generateSetup from workspacemanager.utils import * from shutil import * from workspacemanager.test.utils import * # The level allow the unit test execution to choose only the top level test min = ...
mit
-396,985,961,022,106,430
25.418182
101
0.613902
false
4.350299
true
false
false
michaelkuty/feincms
feincms/module/extensions/ct_tracker.py
1
6323
# ------------------------------------------------------------------------ # coding=utf-8 # ------------------------------------------------------------------------ # # ct_tracker.py # FeinCMS # # Created by Martin J. Laubach on 02.10.09. # Copyright (c) 2009 Martin J. Laubach. All rights reserved. # Updated in 20...
bsd-3-clause
-4,565,303,736,663,644,700
38.030864
79
0.558754
false
4.622076
false
false
false
avalentino/gsdview
exectools/tests/gtkshell.py
1
9226
#!/usr/bin/env python # GSDView - Geo-Spatial Data Viewer # Copyright (C) 2008-2021 Antonio Valentino <antonio.valentino@tiscali.it> # # This module 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 versio...
gpl-2.0
-1,603,177,992,602,668,000
33.94697
78
0.609365
false
3.832987
false
false
false
helixyte/TheLMA
thelma/resources/experiment.py
1
12060
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Experiment resources. """ from datetime import datetime import logging from pyramid.httpexceptions import HTTPBadRequest from everest.querying.specificatio...
mit
-6,446,421,184,529,573,000
43.832714
80
0.646186
false
4.273565
false
false
false
ArcasProject/Arcas
src/arcas/PLOS/main.py
1
3663
from arcas.tools import Api import xml.etree.ElementTree as etree from xml.etree import ElementTree class Plos(Api): def __init__(self): self.standard = 'http://api.plos.org/search?q=' def create_url_search(self, parameters): """Creates the search url, combining the standard url and various ...
mit
3,411,965,802,518,887,400
36.762887
89
0.555283
false
4.143665
false
false
false
flavour/ifrc_qa
modules/s3db/ocr.py
1
7350
# -*- coding: utf-8 -*- """ OCR Utility Functions @copyright: 2009-2016 (c) Sahana Software Foundation @license: MIT 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 ...
mit
1,902,842,553,426,639,000
34.167464
79
0.428027
false
5.13986
false
false
false