repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
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
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
updownlife/multipleK
dependencies/biopython-1.65/Tests/test_Phylo_NeXML.py
1
4000
# Copyright (C) 2013 by Ben Morris (ben@bendmorris.com) # based on code by Eric Talevich (eric.talevich@gmail.com) # 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. """Unit tests for the NeXML and NeXML...
gpl-2.0
-7,884,696,575,435,090,000
29.534351
101
0.5825
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
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
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
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
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
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
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
tartley/flyinghigh-opengl-from-python
flyinghigh/component/camera.py
1
1205
from __future__ import division from math import sin, cos from .. import gl, glu class CameraBase(object): def __init__(self): self.item = None def reset(self): gl.glMatrixMode(gl.GL_MODELVIEW) gl.glLoadIdentity() class Camera(CameraBase): def __init__(self): super(C...
bsd-3-clause
3,079,669,999,636,923,400
22.173077
74
0.556846
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
openstack/vitrage
vitrage/tests/unit/datasources/aodh/test_aodh_driver.py
1
35245
# Copyright 2016 - ZTE, Nokia # # 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
2,648,268,639,343,504,000
39.326087
78
0.558632
false
rjschwei/azure-sdk-for-python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/operations/schedule_operations.py
1
21161
# 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,449,993,796,146,375,000
44.704104
153
0.630972
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
UnitexGramLab/unitex-library
docs/fr/conf.py
1
10744
# -*- coding: utf-8 -*- # # unitex-library documentation build configuration file, created by # sphinx-quickstart on Mon Jun 23 17:35:11 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
lgpl-2.1
-547,079,259,875,797,700
30.675516
92
0.709257
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
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
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
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
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
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
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
ZeitOnline/zeit.edit
src/zeit/edit/meta.py
1
2283
import gocept.lxml.interfaces import grokcore.component import martian import zeit.edit.block import zeit.edit.interfaces import zope.component.zcml import zope.interface class NoneGuard(object): """An IRuleGlob must never return None, because then it would not show up in the getAdapters() result, so its name...
bsd-3-clause
3,401,236,150,200,274,400
30.708333
78
0.645642
false
DavidPurcell/murano_temp
murano/tests/unit/dsl/test_dsl.py
1
6877
# Copyright (c) 2015 Mirantis, 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...
apache-2.0
-4,086,422,080,617,058,000
44.846667
87
0.67544
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
dimtruck/magnum
magnum/tests/unit/conductor/tasks/test_heat_tasks.py
1
4943
# Copyright 2015 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
6,042,682,037,558,177,000
33.566434
76
0.588711
false
metno/gridpp
tests/neighbourhood_quantile_test.py
1
1596
from __future__ import print_function import unittest import gridpp import numpy as np lats = [60, 60, 60, 60, 60, 70] lons = [10,10.1,10.2,10.3,10.4, 10] """Simple check 20 21 22 23 24 15 16 17 18 19 10 11 12 13 nan 5 6 7 nan 9 0 1 2 3 4 """ values = np.reshape(range(25), [5, 5]).astype(float) values[1, 3] ...
gpl-2.0
3,947,422,046,611,754,500
28.018182
77
0.600877
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
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
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
mistercrunch/panoramix
superset/queries/saved_queries/commands/importers/v1/__init__.py
2
2947
# 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...
apache-2.0
-8,466,057,296,013,901,000
40.507042
87
0.707499
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
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
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
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
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
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
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
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
slipcon/gitlint
gitlint/cli.py
1
7127
import os import sys import click import gitlint from gitlint.lint import GitLinter from gitlint.config import LintConfig, LintConfigError, LintConfigGenerator from gitlint.git import GitContext, GitContextError from gitlint import hooks DEFAULT_CONFIG_FILE = ".gitlint" # Error codes MAX_VIOLATION_ERROR_CODE = 252 ...
mit
-7,511,260,571,122,820,000
38.815642
120
0.672232
false
azunite/pdfium_ch
testing/tools/run_javascript_tests.py
1
4010
#!/usr/bin/env python # Copyright 2015 The PDFium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import os import re import subprocess import sys # Nomenclature: # x_root - "x" # x_filename - "x.ext" # x_path - ...
bsd-3-clause
-8,676,647,283,513,023,000
37.190476
80
0.667332
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
Asana/boto
tests/unit/auth/test_sigv4.py
4
23947
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
-4,269,395,807,772,690,400
38.516502
107
0.585543
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
AgalmicVentures/Environment
scripts/Parallelize.py
1
3978
#!/usr/bin/env python3 # Copyright (c) 2015-2021 Agalmic Ventures LLC (www.agalmicventures.com) # # 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 limit...
mit
-460,820,537,746,613,000
36.17757
110
0.726244
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
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
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
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
nuagenetworks/tempest
tempest/tests/lib/common/utils/test_data_utils.py
1
6367
# Copyright 2014 NEC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
-8,855,882,504,040,678,000
38.302469
78
0.614732
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
openstack/manila
manila/tests/api/middleware/test_faults.py
1
7228
# Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
-5,745,190,838,005,838,000
36.257732
79
0.612756
false
davidwilson-85/easymap
graphic_output/Pillow-4.2.1/Tests/test_file_palm.py
1
1353
from helper import unittest, PillowTestCase, hopper, imagemagick_available import os.path class TestFilePalm(PillowTestCase): _roundtrip = imagemagick_available() def helper_save_as_palm(self, mode): # Arrange im = hopper(mode) outfile = self.tempfile("temp_" + mode + ".palm") ...
gpl-3.0
5,463,711,442,434,968,000
22.327586
74
0.583149
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
Katello/katello-cli
test/katello/tests/core/filters/filter_add_remove_product_test.py
1
3943
import unittest from mock import Mock import os from katello.tests.core.action_test_utils import CLIOptionTestCase,\ CLIActionTestCase from katello.tests.core.content_view_definition import content_view_definition_data from katello.tests.core.organization import organization_data from katello.tests.core.repo i...
gpl-2.0
6,877,199,297,364,418,000
39.234694
85
0.684758
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
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
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
FedoraScientific/salome-geom
doc/salome/examples/transformation_operations_ex07.py
1
1374
# Projection import salome salome.salome_init() import GEOM from salome.geom import geomBuilder geompy = geomBuilder.New(salome.myStudy) # create a cylindric face and a curve(edge) cylinder = geompy.MakeCylinderRH(100, 300) [face_cyl] = geompy.SubShapes(cylinder, [3]) p1 = geompy.MakeVertex(200, 0, 100) p2 = geompy....
lgpl-2.1
-6,514,882,863,137,631,000
27.625
63
0.739447
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
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
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
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
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
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
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
pescobar/easybuild-easyblocks
easybuild/easyblocks/l/libqglviewer.py
1
2297
## # Copyright 2009-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-8,200,181,824,849,117,000
40.017857
96
0.696561
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
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
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
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
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
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
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
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
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
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
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
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
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
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
blamarvt/quark
quark/drivers/nvp_driver.py
1
23423
# Copyright 2013 Openstack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
3,469,498,176,643,507,700
41.664845
79
0.564915
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
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
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
cs-chan/FuzzyComputerVision
FCVT.py
1
11861
# -*- coding: utf-8 -*- """ @author: ChernHong Lim """ import numpy as np import copy import os import matplotlib.pyplot as plt import cv2 from scipy import stats from skimage.feature import local_binary_pattern #from skimage import io from sklearn.cluster import KMeans from sklearn.svm import SVC ...
gpl-3.0
-4,393,226,043,624,216,600
28.257653
115
0.548942
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
phlax/translate
translate/storage/test_aresource.py
1
17503
# -*- coding: utf-8 -*- from __future__ import print_function from lxml import etree from translate.storage import aresource, test_monolingual from translate.misc.multistring import multistring from translate.storage.base import TranslationStore class TestAndroidResourceUnit(test_monolingual.TestMonolingualUnit): ...
gpl-2.0
-5,462,796,748,261,070,000
39.422633
114
0.575273
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
miku/siskin
siskin/task.py
1
5779
# coding: utf-8 # pylint: disable=C0103,W0232,C0301,W0703 # Copyright 2015 by Leipzig University Library, http://ub.uni-leipzig.de # The Finc Authors, http://finc.info # Martin Czygan, <martin.czygan@uni-leipzig.de> # # This file is part of some open source application. # # Some ope...
gpl-3.0
-1,744,374,796,712,234,000
31.649718
127
0.6181
false
PYPIT/PYPIT
pypeit/tests/test_bpmimage.py
1
2180
# Module to run tests on BPMImage class # Requires files in Development suite and an Environmental variable from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals # TEST_UNICODE_LITERALS import os import pytest import glo...
gpl-3.0
5,104,313,725,190,529,000
27.684211
98
0.668349
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
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
PetukhovVictor/compiler
src/VM/conf.py
1
1054
# -*- coding: utf-8 -*- from .commands import * # Мапа соответствий: строковое представление команды VM - класс команды VM commands_map = { 'PUSH': Push, 'POP': Pop, 'NOP': Nop, 'DUP': Dup, 'LOAD': Load, 'PLOAD': PLoad, 'BLOAD': BLoad, 'BPLOAD': BPLoad, 'DLOAD': DLoad, 'DBLOAD...
mit
-3,168,778,966,710,100,500
18.06
74
0.545645
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
benallard/pythoncard
test/testMessageDigest.py
1
2295
import unittest from pythoncard.security import MessageDigest from pythoncard.security.key import _binaryToarray class testMessageDigest(unittest.TestCase): def testEmptySHA1(self): md = MessageDigest.getInstance(MessageDigest.ALG_SHA, False) self.assertEqual(MessageDigest.ALG_SHA, md.getAlgorithm...
lgpl-3.0
3,411,043,323,126,917,000
53.642857
165
0.672331
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
pikpok/calibre-helion
__init__.py
1
4162
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) import time from urllib import quote from lxml.html import fromstring, tostring from calibre.ebooks.metadata.sources.base import Source from calibre import brows...
mit
-1,299,868,961,320,810,200
32.5
141
0.557053
false
OpenISA/riscv-sbt
scripts/auto/genmake.py
1
14624
#!/usr/bin/env python3 from auto.config import ARM, GOPTS, RV32, SBT, TOOLS, X86 from auto.utils import cat, path, unique class ArchAndMode: def __init__(self, farch, narch, mode=None): self.farch = farch self.narch = narch self.mode = mode # get arch prefix string def prefix(self...
mit
7,877,738,385,158,393,000
24.213793
89
0.484546
false