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
skipmodea1/plugin.video.xbmctorrent
resources/site-packages/xbmcswift2/listitem.py
1
7446
''' xbmcswift2.listitem ------------------ This module contains the ListItem class, which acts as a wrapper for xbmcgui.ListItem. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from xbmcswift2 import xbmcgui class ListItem(object): '''A wrapper...
gpl-3.0
-4,435,313,053,114,563,600
32.241071
79
0.60274
false
4.088962
false
false
false
markkorput/py2030
tests/test_omxvideo.py
1
7634
#!/usr/bin/env python import unittest from py2030.components.omxvideo import OmxVideo from py2030.event_manager import EventManager class TestOmxVideo(unittest.TestCase): def test_init(self): omxvideo = OmxVideo() self.assertEqual(omxvideo.player, None) self.assertIsNone(omxvideo.event_man...
mit
-3,664,988,029,826,936,300
43.127168
103
0.631124
false
3.54575
true
false
false
hcuffy/concourse
concourse-driver-python/tests/utils_tests.py
1
2664
# Copyright (c) 2015 Cinchapi Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-8,572,895,711,197,043,000
33.153846
85
0.646772
false
3.705146
true
false
false
gumblex/zhconv
zhconv/zhconv.py
1
19496
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module implements a simple conversion and localization between simplified and traditional Chinese using tables from MediaWiki. It doesn't contains a segmentation function and uses maximal forward matching, so it's simple. For a complete and accurate solution, see O...
mit
6,765,431,804,391,552,000
34.587866
198
0.505967
false
2.446218
false
false
false
jmah/cinesync_python
cinesync/event_handler.py
1
1815
import cinesync import sys, os from optparse import OptionParser class EventHandler: def __init__(self, argv=sys.argv, stdin=sys.stdin): try: self.session = cinesync.Session.load(stdin) except Exception: self.session = None parser = OptionParser() parser.a...
bsd-3-clause
8,719,700,762,281,527,000
33.245283
106
0.592837
false
3.681542
false
false
false
StephenLujan/Naith
game/plugins/cullaabb/aabb.py
1
10362
# Copyright Tom SF Haines # # 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, soft...
apache-2.0
1,652,840,935,139,971,000
36.817518
425
0.615422
false
3.305263
false
false
false
ryanss/holidays.py
holidays/countries/mexico.py
1
4211
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
mit
-2,919,136,386,831,123,500
37.888889
78
0.562619
false
3.211009
false
false
false
Mausy5043/ubundiagd
daemon98.py
1
4199
#!/usr/bin/env python # Based on previous work by # Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process) # and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/) # Adapted by M.Hendrix [2015] (deprecated)...
mit
4,576,095,632,037,689,300
29.875
120
0.6392
false
3.413821
false
false
false
Polarcraft/KbveBot
commands/timeuntil.py
1
2038
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 ve...
gpl-2.0
7,107,087,741,139,688,000
36.740741
134
0.679588
false
3.781076
false
false
false
seewindcn/tortoisehg
src/tortoisehg/util/menuthg.py
1
11553
# menuthg.py - TortoiseHg shell extension menu # # Copyright 2009 Steve Borho <steve@borho.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. import os from mercurial import hg, ui, node, error from tortoisehg.uti...
gpl-2.0
6,529,017,472,903,865,000
33.281899
83
0.515624
false
3.880752
false
false
false
google/transperf
outparser.py
1
14206
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-1,043,250,681,706,200,200
29.815618
80
0.518795
false
3.827047
false
false
false
mnahm5/django-estore
Lib/site-packages/awscli/customizations/ec2/protocolarg.py
1
1400
# Copyright 2013 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
mit
-8,376,659,984,141,722,000
36.837838
73
0.664286
false
3.763441
false
false
false
nce/sedater
sedater/test/test_options.py
1
2109
# ./sedater/test/test_options.py # Author: Ulli Goschler <ulligoschler@gmail.com> # Created: Mon, 05.10.2015 - 12:59:56 # Modified: Thu, 10.12.2015 - 19:41:38 import unittest from sedater.options import CLIParser class TestCommandLineParameters(unittest.TestCase): def setUp(self): self.cli = CLIParse...
mit
4,717,097,843,753,090,000
41.18
72
0.655287
false
3.300469
true
false
false
JohnReid/biopsy
Python/site_dpm/check-programs/map_factors.py
1
2225
# # Copyright John Reid 2009 # tp_indices = [ 1, 6, 14, 17, 24, 28 ] def go_ids_for_genes(genes): import biopsy.identifiers.biomart as B for row in B.quick_query( dataset='mmusculus_gene_ensembl', attributes=[ 'ensembl_gene_id', ...
mit
6,979,182,918,673,666,000
24.872093
82
0.571236
false
3.407351
false
false
false
jeffh/describe
describe/flags.py
1
5303
""" flags.py - Various constants that have special meaning in describe. INIT - Represents a matcher be instanciated for initialization purposes only NO_ARG - Represents no argument. This is Noner than None. """ __all__ = ( 'NO_ARG', 'NO_ARGS', 'ANY_ARG', 'ANYTHING', 'ANY_ARGS', 'ANY_KWARGS', 'is_flag', ...
mit
4,358,649,939,190,283,000
27.461111
171
0.593815
false
3.795991
false
false
false
werdeil/pibooth
pibooth/controls/light.py
1
2328
# -*- coding: utf-8 -*- import threading from pibooth.controls import GPIO class BlinkingThread(threading.Thread): """Thread which manage blinking LEDs synchronously. """ def __init__(self): threading.Thread.__init__(self) self.daemon = True self._leds = [] self._tick =...
mit
8,372,595,440,265,631,000
24.866667
68
0.531357
false
3.854305
false
false
false
agconti/njode
env/lib/python2.7/site-packages/allauth/account/adapter.py
1
11030
import warnings import json from django.conf import settings from django.http import HttpResponse from django.template.loader import render_to_string from django.template import TemplateDoesNotExist from django.contrib.sites.models import Site from django.core.mail import EmailMultiAlternatives, EmailMessage from djan...
bsd-3-clause
4,666,278,003,445,794,000
37.566434
89
0.568722
false
4.661877
false
false
false
uclouvain/osis
base/migrations/0577_auto_20210201_1741.py
1
4928
# Generated by Django 2.2.14 on 2021-02-01 17:41 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0576_populate_not_null_fields'), # ('continuing_education', '0084_auto_20210127_1119'), ('dissertat...
agpl-3.0
-2,530,800,407,347,505,000
28.508982
111
0.52638
false
4.550323
false
false
false
mleger45/turnex
turnex/urls.py
1
1209
"""turnex URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
mit
-6,026,112,504,968,619,000
39.3
79
0.656741
false
3.524781
false
false
false
ehliang/myo-unlock
Myo_unlock.py
1
5681
#This program takes simple input from the Mio to unlock a complex password string and log in to email #Further developement would allow it to log into social media accounts/computerss #A program by Ethan Liang from __future__ import print_function import myo as libmyo; libmyo.init() import time import sys import smtp...
mit
8,310,767,131,224,216,000
28.588542
172
0.556064
false
4.131636
false
false
false
techinc/techinc_badge
pathtokicad/pathtokicad.py
1
6404
#!/usr/bin/python import sys, math fill_paths = [ ("23", "soldermask.path"), # soldermask front # ("21", "silkscreen.path"), # ("15", "copper_top.path"), ("15", "copper_top_x.path"), ("0", "copper_bottom.path"), ("0", "battery_holder.path"), ("22", "battery_holder_mask.path"), ("21", "ispmark.path"), ("0", "...
mit
-4,837,021,785,273,147,000
20.275748
113
0.593379
false
2.459293
false
false
false
tobetter/linaro-image-tools
linaro_image_tools/hwpack/package_unpacker.py
1
2545
# Copyright (C) 2010, 2011, 2013 Linaro # # This file is part of Linaro Image Tools. # # Linaro Image Tools is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option...
gpl-3.0
7,460,180,015,763,455,000
37.560606
77
0.669155
false
3.873668
false
false
false
SCUEvals/scuevals-api
scuevals_api/models/api_key.py
1
1666
from sqlalchemy import func from . import db from .assoc import api_key_permission from .permission import Permission API_KEY_TYPE = 'api_key' class APIKey(db.Model): __tablename__ = 'api_keys' id = db.Column(db.Integer, primary_key=True) key = db.Column(db.Text, nullable=False, unique=True) issue...
agpl-3.0
-8,820,916,295,296,028,000
33
108
0.62425
false
4.175439
false
false
false
AI-comp/Orientation2015Problems
rime/basic/consts.py
1
3991
#!/usr/bin/python # # Copyright (c) 2011 Rime Project. # # 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, m...
mit
1,220,425,375,560,909,600
34.008772
79
0.761964
false
3.815488
true
false
false
wengzhilai/family
iSoft/entity/model.py
1
28429
# coding: utf-8 from sqlalchemy import Column, DateTime, ForeignKey, Integer, Numeric, String, Table, Text from sqlalchemy.orm import relationship from sqlalchemy.schema import FetchedValue from flask_sqlalchemy import SQLAlchemy from iSoft import db class FaAppVersion(db.Model): __tablename__ = 'fa_app_version' ...
bsd-3-clause
1,656,765,812,792,908,000
35.307791
164
0.679236
false
2.863806
false
false
false
Just-D/chromium-1
tools/telemetry/telemetry/page/shared_page_state.py
1
19615
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import shutil import sys import tempfile import zipfile from catapult_base import cloud_storage from telemetry.core import exception...
bsd-3-clause
8,667,519,244,234,333,000
39.277207
80
0.69248
false
4.03767
true
false
false
AusTac/parma
b3/lib/corestats.py
1
5732
#!/usr/bin/env python # corestats.py (COREy STATS) # Copyright (c) 2006-2007, Corey Goldberg (corey@goldb.org) # updated on 2010-09 by GrosBedo # # statistical calculation class # for processing numeric sequences # # license: GNU LGPL # # This library is free software; you can redistribute it and/or # mod...
gpl-2.0
-1,045,647,948,741,987,700
31.948276
221
0.565422
false
4.022456
false
false
false
kyuridenamida/atcoder-tools
tests/utils/gzip_controller.py
2
1295
import os import shutil import tarfile class GZipController: def __init__(self, target_dir, gzip_file_path, main_dirname): self.target_dir = target_dir self.gzip_file_path = gzip_file_path self.main_dirname = main_dirname def create_dir(self): tf = tarfile.open(self.gzip_file...
mit
-8,670,779,840,069,245,000
29.833333
74
0.579151
false
3.7
false
false
false
davidhdz/crits
crits/domains/handlers.py
2
33476
import json import re import datetime from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from mongoengine.base import ValidationError from crits.core import form_c...
mit
5,617,783,682,987,655,000
36.613483
119
0.549588
false
4.25795
false
false
false
JonathanSchmalhofer/RecursiveStereoUAV
js_recursive_stereo/python_vs_matlab/airsim/generate_pcl_calib.py
1
2784
import numpy as np import cv2 # Copied from https://github.com/utiasSTARS/pykitti/blob/master/pykitti/utils.py def read_calib_file(filepath): """Read in a calibration file and parse into a dictionary.""" data = {} with open(filepath, 'r') as f: for line in f.readlines(): key, value = li...
mit
6,907,530,882,995,174,000
31.383721
92
0.602011
false
3.093333
false
false
false
Tanych/CodeTracking
312-Burst-Balloons/solution.py
1
2616
class Solution(object): def bursthelper(self,memo,nums,left,right): if left+1==right: return 0 if memo[left][right]>0: return memo[left][right] res=0 for i in xrange(left+1,right): res=max(res,nums[left]*nums[i]*nums[right]+self.bursthelper(memo,nums,left,i)+\ ...
mit
2,221,113,808,342,528,500
32.126582
124
0.495413
false
3.379845
false
false
false
JoeJasinski/evesch
evesch/org/views.py
1
22743
# Create your views here. from datetime import datetime from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render_to_response from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect from django.template import RequestContext from django.contri...
gpl-2.0
-6,959,863,144,797,156,000
47.804721
236
0.617597
false
3.901029
false
false
false
jamesp/jpy
jpy/maths/pde.py
1
2463
#!/usr/bin/env python # -*- coding: utf-8 -*- """Numerical Methods of Partial Differential Equations. Provides integration methods and other utility functions such as the RA & RAW time filters for numerical integration of PDEs. """ import numpy as np def RA_filter(phi, epsilon=0.1): """Robert-Asselin-Williams ti...
mit
-3,893,353,240,602,028,000
27.172414
93
0.565891
false
2.635484
false
false
false
Aipakazuma/b_scouter
src/preprocess.py
1
4275
# -*- coding: utf8 -*- import cv2 import numpy as np import glob import os ASSETS_PATH = os.path.join(os.path.dirname(__file__), 'assets', 'calibrate') calibrate_files = [] def preprocess_calibrate(): """preprocess calibrate.""" global calibrate_files for file in glob.glob(os.path.join(ASSETS_PATH, 'l...
mit
-8,244,897,975,416,989,000
29.40146
125
0.617527
false
2.920757
false
false
false
gmt/overlay-upstream-tracking
OUT/__init__.py
1
5112
from __future__ import print_function from FixPython import is_string __all__ = [ "Ephemeral", "FixPython", "OOParsing", "OUTDate", "OUTDbgPrint", "OUTDebug", "OUTDebugModes", "OUTUpdated", "OUTVerboseModes", "OUTVersion", "Repo", "Rules", "RulesParser" ] __version...
gpl-2.0
1,658,684,616,275,879,200
27.4
100
0.52856
false
3.80924
false
false
false
justinvforvendetta/electrum-rby
gui/qt/main_window.py
1
110670
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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...
gpl-3.0
5,672,153,572,525,321,000
39.039797
454
0.585696
false
3.895322
true
false
false
binary-signal/mass-apk-installer
mass_apk/helpers.py
1
1688
"""Mass apk helper functions module.""" import functools import logging import os import platform from enum import Enum, unique from timeit import default_timer as timer __all__ = ["Platform", "detect_platform", "human_time", "elapsed_time", "MB"] log = logging.getLogger(__name__) MB = 1024 * 1024 @unique class P...
bsd-3-clause
1,378,833,015,522,749,400
24.19403
79
0.637441
false
3.925581
false
false
false
optimamodel/Optima
tests/testproject.py
1
5062
#!/usr/bin/env python """ Test script to see if Optima works. To use: comment out lines in the definition of 'tests' to not run those tests. NOTE: for best results, run in interactive mode, e.g. python -i tests.py Version: 2016feb03 by cliffk """ ## Define tests to run here!!! tests = [ 'makeproject', 'paramete...
lgpl-3.0
5,239,596,296,055,542,000
21.801802
164
0.585539
false
3.515278
true
false
false
ylzmax/vncmanager
site1/settings.py
1
2938
""" Django settings for site1 project. Generated by 'django-admin startproject' using Django 1.8.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
gpl-3.0
8,641,891,417,207,550,000
25
71
0.677672
false
3.316027
false
false
false
mishka28/NYU-Python
intro-programming/final_project/binomial_tree.py
1
1850
#!/usr/bin/env python3 from datetime import date import math import numpy as np import sys today = date(2015, 11, 20) expiry = date(2017, 1, 20) #Global inputs s = 138.65 k = 133 t = (expiry - today).days / 365 r = 0.0106161830925 sig = 0.22545538993 div = .027000 def tree(steps, flavor): Dt = t / steps r_D...
mit
-1,405,318,716,439,187,000
22.125
78
0.471892
false
2.583799
false
false
false
lukius/mts
set1/challenge8.py
1
1567
from common.challenge import MatasanoChallenge from common.tools.misc import FileLines class ECBEncryptionFinder(object): BLOCK_SIZE = 16 def __init__(self, hex_strings): self.hex_strings = hex_strings def _less_than(self, number1, number2): return number2 is None or num...
mit
7,581,138,453,766,070,000
34.636364
79
0.640715
false
3.048638
false
false
false
DaveA50/lbry
lbrynet/lbrylive/StdinUploader.py
1
5224
# pylint: skip-file # This file is not maintained, but might be used in the future # import logging import sys from lbrynet.lbrylive.LiveStreamCreator import StdOutLiveStreamCreator from lbrynet.core.BlobManager import TempBlobManager from lbrynet.core.Session import Session from lbrynet.core.server.BlobAvailabilityHan...
mit
-3,413,635,974,544,798,000
42.173554
108
0.647779
false
4.037094
false
false
false
dukekuang/thinkpython2e-solution
chapter 7/7.3.py
1
1155
# -*- coding: utf-8 -*- """ Created on Sat Mar 18 13:28:29 2017 @author: dukekuang """ #Exercise 7.3. The mathematician Srinivasa Ramanujan #found an infinite series that can be used to #generate a numerical approximation of 1/p: #Write a function called estimate_pi that uses this formula to compute #a...
gpl-3.0
634,642,464,086,977,000
26.85
75
0.611979
false
3.217877
false
false
false
CptDemocracy/Python
MITx-6.00.1x-EDX-Introduction-to-Computer-Science/Week-4/PSET-4/game.py
1
2366
""" PSET-4 Word Game Part 9: You and your Computer """ PROMPT_STR = "Enter n to deal a new hand, r to replay the last hand, or e to end game: " NO_REPL_AVAIL_STR = "You have not played a hand yet. Please play a new hand first!" INVALID_CMD = "Invalid command." CHOOSE_PLAYER_STR = "Enter u to have yourself play, c to h...
mit
-341,466,025,357,899,300
34.848485
90
0.587067
false
3.662539
false
false
false
lgfausak/sqlbridge
sqlbridge/twisted/db/ausqlite3.py
1
6540
############################################################################### ## ## Copyright (C) 2014 Greg Fausak ## ## 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:...
apache-2.0
6,459,614,035,259,180,000
32.88601
104
0.562997
false
3.867534
false
false
false
jdfreder/leaftletwidget
leafletwidget/notebook.py
1
1202
from __future__ import print_function import os from IPython.display import display, HTML, Javascript leaflet_css = '//cdn.leafletjs.com/leaflet-0.7.2/leaflet.css' # leaftlet_js = "//cdn.leafletjs.com/leaflet-0.7.2/leaflet" # leaflet_draw_js = ['//cdnjs.cloudflare.com/ajax/libs/leaflet.draw/0.2.3/leaflet.draw-src.j...
mit
2,223,657,766,573,104,400
36.5625
102
0.680532
false
2.713318
false
false
false
fluxcapacitor/pipeline
libs/pipeline_runtime/setup.py
1
1300
# -*- coding: utf-8 -*- """setup.py: setuptools control.""" import re from setuptools import setup #import sys #if not sys.version_info[0] == 3: # print("\n \ # sys.exit("\n \ # ****************************************************************\n \ # * The CLI has only been tested with ...
apache-2.0
2,087,528,225,292,709,600
29.952381
84
0.540769
false
3.714286
false
false
false
Zhenxingzhang/kaggle-cdiscount-classification
src/misc/inception_bson.py
1
1345
from src.freezing import inception from src.freezing.inception import NodeLookup import tensorflow as tf import bson from tqdm import tqdm import numpy as np if __name__ == '__main__': input_bson_filename = "/data/data/train_example.bson" node_lookup = NodeLookup() inception_graph = tf.Graph() incep...
apache-2.0
7,757,940,009,184,435,000
34.394737
92
0.565056
false
3.558201
false
false
false
moniker-dns/contractor
contractor/openstack/common/gettextutils.py
1
13133
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
apache-2.0
4,492,199,157,041,093,000
34.398922
79
0.60565
false
4.477668
false
false
false
hwroitzsch/DayLikeTodayClone
examples/main.py
1
1357
import json from urllib.parse import urlencode from urllib.request import urlopen, Request # HTTP URL is constructed accordingly with JSON query results format in mind. def sparqlQuery(query, baseURL, format="application/json"): params = { "default-graph": "", "should-sponge": "soft", "que...
mit
3,912,693,555,853,568,500
28.5
102
0.666912
false
3.301703
false
false
false
brendannee/Bikesy-Backend
misc/tripplanner/main.py
2
1089
from graphserver.graphdb import GraphDatabase from graphserver.ext.osm.osmdb import OSMDB from graphserver.core import State, WalkOptions, Graph, Street, Combination, EdgePayload, ContractionHierarchy import sys def make_native_ch(basename): gdb = GraphDatabase( basename+".gdb" ) gg = gdb.incarnate() ...
bsd-3-clause
4,947,394,258,959,224,000
30.114286
110
0.676768
false
3.413793
false
false
false
jimblandy/plife
setup.py
1
1112
from distutils.core import setup, Extension from glob import glob from os.path import join version = "0.4.1" bindir = "bin" docdir = join ("share", "doc", "plife-" + version) setup ( name = "plife-python", version = version, description = "Pattern construction tool for Conway's Game of Life", long_description = ...
gpl-2.0
8,316,089,656,023,166,000
32.69697
97
0.666367
false
3.029973
false
false
false
NikNitro/Python-iBeacon-Scan
sympy/core/decorators.py
1
4111
""" SymPy core decorators. The purpose of this module is to expose decorators without any other dependencies, so that they can be easily imported anywhere in sympy/core. """ from __future__ import print_function, division from functools import wraps from .sympify import SympifyError, sympify from sympy.core.compatib...
gpl-3.0
-6,863,624,794,790,311,000
32.975207
78
0.620044
false
4.392094
false
false
false
impactlab/jps-handoff
model/postgres_dump_recent.py
1
1839
#!/usr/bin/env python import psycopg2 import csv, sys, os, datetime datadir = '/data/extract/' with open('meter_list.csv', 'r') as f: fcsv = csv.reader(f) meters = fcsv.next() stop_date = datetime.datetime.now() start_date = stop_date - datetime.timedelta(days=365) start_date_evt = stop_date - datetime.timed...
mit
6,000,819,424,975,845,000
40.795455
112
0.586188
false
2.923688
false
false
false
iceflow/aws-demo
es/cf_logs_to_es/cf_logs_to_es.py
1
4234
#!/usr/bin/python # -*- coding: utf8 -*- import sys import json from log import * from es_put import * from ip2geo import * ### 常量定义 DUMP_PROCESS_NUM = 2000 # 当日志条数累计到DUMP_PROCESS_NUM数量,触发入库 INDICES_PREFIX = "cf-logs-" DEFAULT_TYPE = "log" CF_LOGS_WEB_FORMAT_SIZE = 24 CF_LOGS_RTMP_FORMAT_SIZE = 13 ########...
gpl-3.0
3,759,973,895,854,942,700
25.575342
123
0.515722
false
2.574652
false
false
false
rhdedgar/openshift-tools
openshift/installer/vendored/openshift-ansible-3.6.173/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
1
9598
"""Check that required Docker images are available.""" from openshift_checks import OpenShiftCheck from openshift_checks.mixins import DockerHostMixin NODE_IMAGE_SUFFIXES = ["haproxy-router", "docker-registry", "deployer", "pod"] DEPLOYMENT_IMAGE_INFO = { "origin": { "namespace": "openshift", "na...
apache-2.0
5,285,902,716,826,715,000
44.704762
115
0.627735
false
4.279091
false
false
false
tim-clifford/py-cipher
src/core.py
1
3094
''' A few common functions for cipher cracking Functionality: - Return a list of letter frequency from a given string - Sort a string with a given linear function into a list of inputs based on letter frequency - Shift a given string based on a linear function and inputs Sample Usage: >>> from cipher import core >>>...
mit
1,851,057,241,019,089,200
35.4
227
0.641241
false
2.523654
false
false
false
mrtumnus/scrape-tedtalks
download_tedtalk.py
1
1586
# File: download_tedtalk.py # Author: E. Partridge # Date: 8 August 2012 # Description: # This script parses the TED Talk audio feed and proceeds to # download all audio files into the same directory that # this script is located in. Files are prepended with the publication # date for convenience. # ...
gpl-3.0
-5,137,724,765,449,738,000
37.7
94
0.703026
false
2.894161
false
false
false
carlgao/lenga
images/lenny64-peon/usr/share/python-support/mercurial-common/mercurial/context.py
1
21456
# context.py - changeset and file context objects for mercurial # # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. from node import nullid, nullrev, short from i18n import _ ...
mit
-2,856,619,026,517,189,000
33.220096
81
0.546001
false
4.023251
false
false
false
dimtruck/magnum
magnum/api/controllers/v1/service.py
1
13306
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
apache-2.0
-2,565,025,987,527,595,000
38.48368
79
0.55118
false
4.40596
false
false
false
Altair3/Tanks
bzagents/PigeonAgent.py
1
2822
import sys import math import time import random from bzrc import BZRC, Command class PigeonAgent(object): def __init__(self, bzrc, mode, time): self.bzrc = bzrc self.mode = mode self.num_tanks = 1 self.cur_time = time self.const_velocity = .5 ...
gpl-3.0
8,886,061,043,608,434,000
26.398058
84
0.488661
false
3.946853
false
false
false
hybrid-storage-dev/cinder-fs-111t-hybrid-cherry
api/v2/views/volumes.py
1
5777
# Copyright 2012 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
6,775,183,563,880,163,000
40.561151
78
0.556344
false
4.651369
false
false
false
ragupta-git/ImcSdk
imcsdk/mometa/bios/BiosVfCDNEnable.py
1
3109
"""This module contains the general information for BiosVfCDNEnable ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class BiosVfCDNEnableConsts: VP_CDNENABLE_DISABLED = "Disabled" VP_CDNENABLE_ENABLED = "Enabled" _V...
apache-2.0
-6,090,074,951,718,473,000
43.414286
236
0.602766
false
3.307447
false
false
false
deljus/predictor
MWUI/API/resources.py
1
37011
# -*- coding: utf-8 -*- # # Copyright 2016, 2017 Ramil Nugmanov <stsouko@live.ru> # This file is part of MWUI. # # MWUI is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the Licen...
agpl-3.0
-434,087,189,328,953,200
44.523985
120
0.574559
false
4.285168
false
false
false
emanuele-f/python-pesci
pesci/environment.py
1
3727
#!/bin/env python2 # -*- coding: utf-8 -*- # # Emanuele Faranda <black.silver@hotmail.it> # # 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 Lic...
gpl-3.0
7,393,122,344,925,203,000
28.346457
82
0.579823
false
3.842268
false
false
false
pudo-attic/docstash
docstash/util.py
1
2772
from os import path from hashlib import sha1 from httplib import HTTPResponse from urllib2 import urlopen from StringIO import StringIO from urlparse import urlparse from werkzeug import secure_filename MANIFEST_FILE = 'manifest.yaml' def fullpath(filename): # a happy tour through stdlib filename = path.ex...
mit
-3,031,235,047,868,030,000
26.445545
59
0.599206
false
4.137313
false
false
false
Vrekrer/PycuBLAS
codeUtils.py
1
5234
#Published symbols @7.0 #readelf -Ds /usr/lib/x86_64-linux-gnu/libcublas.so.7.0 from subprocess import Popen, PIPE import pyperclip libDir = '/usr/lib/x86_64-linux-gnu/' c_types_reps = {'int' :'c_int', 'size_t' :'c_size_t', 'char' :'c_char', ...
bsd-3-clause
1,705,460,581,328,154,400
31.7125
84
0.509171
false
3.13789
false
false
false
mostaphaRoudsari/Honeybee
src/Honeybee_Load OpenStudio Measure.py
1
15679
# # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools> # Honeybee is free software; you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
6,137,310,421,724,974,000
38.696203
145
0.649085
false
3.848552
false
false
false
openstack/rally
tests/unit/doc/test_format.py
1
3089
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
-7,617,275,831,751,958,000
37.135802
78
0.556167
false
4.163073
false
false
false
CXWorks/compilerLab
lab1/lex/recore.py
1
7297
import networkx as nx from collections import deque import matplotlib.pyplot as plt def re2dfa(re,debug=False): def isChar(c): return (c>='a' and c<='z') or (c>='A' and c<='Z') or (c>='0' and c<='9') way=[] def re2nfa(re): _op_={'.':6,'|':7,'(':10} #add . full=[] ski...
mit
3,387,408,629,161,329,000
27.396887
111
0.371386
false
3.531946
false
false
false
OndinaHQ/Tracker
plugins/s3.py
1
3045
# Copyright (C) 2012 Stefano Palazzo <stefano.palazzo@gmail.com> # Copyright (C) 2012 Ondina, LLC. <http://ondina.co> # 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 ver...
gpl-3.0
6,556,845,181,018,682,000
36.592593
79
0.611494
false
3.754624
false
false
false
gioman/QGIS
python/plugins/processing/algs/gdal/buildvrt.py
1
4226
# -*- coding: utf-8 -*- """ *************************************************************************** merge.py --------------------- Date : October 2014 Copyright : (C) 2014 by Radoslaw Guzinski Email : rmgu at dhi-gras dot com ***************************...
gpl-2.0
2,611,517,822,219,813,400
40.841584
99
0.58424
false
4.343268
false
false
false
boffi/boffi.github.io
dati_2014/08/exercise1.py
1
3923
###################################################################### # Preliminaries, import scipy as sp mat=sp.matrix from scipy.linalg import inv ###################################################################### # an utility function to format a matrix for inclusion in a LaTeX file def latex_print(data,name,fm...
mit
-4,355,237,838,158,614,000
32.818966
131
0.559266
false
2.657859
false
false
false
mattyowl/fitScalingRelation
fitScalingRelation/fitScalingRelationLib.py
1
62047
""" The MCMC fitting code used in Hilton et al. (2012), in a more general purpose form Copyright 2015 Matt Hilton (matt.hilton@mykolab.com) This file is part of fitScalingRelation. fitScalingRelation is free software: you can redistribute it and/or modify it under the terms of the GNU Genera...
gpl-3.0
6,037,897,584,997,941,000
42.088194
287
0.585862
false
3.322107
false
false
false
mtwestra/akvo-wandelenvoorwater
wvw/urls.py
1
1878
from django.conf.urls.defaults import * from django.views.static import serve from W4W.models import school, inschrijving,steunpunt from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() info_dict_list_scholen = { 'queryset': scho...
agpl-3.0
-2,006,749,946,259,257,000
37.326531
108
0.685836
false
2.79049
false
true
false
junwoo091400/MyCODES
Projects/FootPad_Logger/logged_data_analyzer_LSTM/Data_manipulation.py
1
1131
from Base import FootLog def Datestr_to_Int(datestr): bigStr = ''.join(datestr.split('-')) return int(bigStr[2:])#'20' is eliminated![We live in 20th century.] ''' def Time2Float(timestr,state): if(state == DateHandler.BREAKFAST): elif(state == DateHandler.LUNCH): elif(state == DateHandler.DINNER): return Time...
gpl-3.0
-3,336,045,622,675,393,500
19.214286
69
0.609195
false
2.252988
false
false
false
MrNeon/qbittorrent-search-plugins
strikesearch.py
1
1268
#VERSION: 1.03 #AUTHORS: MrNeon from novaprinter import prettyPrinter from helpers import retrieve_url, download_file import json class strikesearch(object): url = 'https://getstrike.net/' name = 'Strike Search' supported_categories = {'all': '', 'movies': 'Movies', 'tv': 'TV', 'anime': 'Anime', 'books':...
mit
2,467,185,917,792,230,400
33.27027
106
0.501577
false
3.77381
false
false
false
szarroug3/X-Ray_Calibre_Plugin
lib/book.py
1
48525
# Book.py '''Controls book functions and holds book data''' import os import json import struct from sqlite3 import connect from datetime import datetime from cStringIO import StringIO from shutil import copy from calibre.ebooks.mobi import MobiError from calibre.ebooks.metadata.mobi import MetadataUpdater from cali...
gpl-3.0
4,600,604,134,167,618,000
53.64527
124
0.593673
false
3.900096
false
false
false
gisdev-km/pyras
pyras/io/hecras/read_ras.py
1
2308
""" """ class SimpleAttribute: """ """ def __init__(self, name, options=['SI Units', 'English Units']): pass class NamedAttribute: """ """ def __init__(self, name, type_, value=None, separator='=', max_length=None): pass class TagAttribute: """ ...
mit
6,103,303,954,101,331,000
18.726496
89
0.526863
false
3.33526
false
false
false
pism/pism
examples/python/ssa_tests/ssa_testj.py
1
4091
#! /usr/bin/env python3 # # Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2018 Ed Bueler and Constantine Khroulev and David Maxwell # # This file is part of PISM. # # PISM 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...
gpl-3.0
8,439,416,760,993,107,000
37.233645
109
0.599364
false
3.364309
true
false
false
dimtion/jml
inputFiles/ourIA/old_ias/dijkstra.py
1
8663
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################################################################################## #################################################### PRE-DEFINED IMPORTS #################################################### ################################...
mit
4,362,299,323,070,154,000
48.221591
195
0.461618
false
5.9295
false
false
false
CuonDeveloper/cuon
cuon_client/cuon_newclient/bin/cuon/Bank/bank.py
1
8104
# -*- coding: utf-8 -*- ##Copyright (C) [2005] [Jürgen Hamel, D-32584 Löhne] ##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) any later versi...
gpl-3.0
6,315,108,617,176,841,000
28.786765
134
0.613182
false
3.938746
false
false
false
rtucker-mozilla/mozilla_inventory
api_v1/keyvalue_handler.py
1
24912
from piston.handler import BaseHandler, rc from systems.models import System, SystemRack,SystemStatus,NetworkAdapter,KeyValue from truth.models import Truth, KeyValue as TruthKeyValue from dhcp.DHCP import DHCP as DHCPInterface from dhcp.models import DHCP from MacroExpansion import MacroExpansion from KeyValueTree imp...
bsd-3-clause
-5,242,016,272,190,501,000
47.943026
259
0.504978
false
4.062622
false
false
false
karstenw/nodebox-pyobjc
art/nodeboxlogo_larger.py
1
2485
size(512,512) background(None) def bar(x, y, w, depth, filled=1.0): d1 = depth*filled colormode(HSB) f = fill() s = stroke() if f != None and f.brightness != 1: s = color(f.hue, f.saturation+0.2, f.brightness-0.4) nostroke() #front if f != None: fill(f) rect(x, y...
mit
-5,216,147,913,592,614,000
19.890756
64
0.440241
false
2.326779
false
false
false
notapresent/rbm2m
rbm2m/action/scan_manager.py
1
3426
# -*- coding: utf-8 -*- import datetime import logging from sqlalchemy import and_, func from base_manager import BaseManager from ..models import Scan, scan_records, Genre # All scans with no activity for this long are considered stalled INACTIVITY_PERIOD = datetime.timedelta(seconds=600) # Update interval UPDATE_...
apache-2.0
1,392,480,987,541,680,600
28.534483
90
0.542323
false
3.969873
false
false
false
pdarragh/EMC-Mars-Challenge
Hackpack/db.py
1
2571
import json import pymongo from pymongo import MongoClient client = MongoClient('mongodb://107.170.244.164/', 27017) db = client.mars_db game_coll = db.game_data sensor_coll = db.sensor_data log_coll = db.log_data db2 = client.mars_db2 game_coll2 = db2.game_data sensor_coll2 = db2.sensor_data log_coll2 = db2.log_dat...
mit
-148,093,916,572,310,200
22.381818
61
0.702839
false
3.105072
false
false
false
kustomzone/Fuzium
core/src/Site/SiteStorage.py
1
18598
import os import re import shutil import json import time import sys import sqlite3 import gevent.event from Db import Db from Debug import Debug from Config import config from util import helper from Plugin import PluginManager @PluginManager.acceptPlugins class SiteStorage(object): def __init__(self, site, al...
mit
-2,596,954,781,683,501,000
41.364465
130
0.561136
false
3.941089
true
false
false
migasfree/migasfree-backend
migasfree/settings/base.py
1
7965
# -*- coding: utf-8 -*- # Copyright (c) 2015-2021 Jose Antonio Chavarría <jachavar@gmail.com> # Copyright (c) 2015-2021 Alberto Gacías <alberto@migasfree.org> # # 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 Softw...
gpl-3.0
-5,171,708,381,460,351,000
29.864341
91
0.656662
false
3.585322
false
false
false
Spanarchie/pyRest
pyRest/lib/python2.7/site-packages/py/_path/common.py
1
12572
""" """ import os, sys import py class Checkers: _depend_on_existence = 'exists', 'link', 'dir', 'file' def __init__(self, path): self.path = path def dir(self): raise NotImplementedError def file(self): raise NotImplementedError def dotfile(self): return self.pa...
unlicense
-194,356,141,815,722,620
30.989822
82
0.529271
false
4.37287
false
false
false
jgr208/stig-fix-el6-kickstart
config/stig-fix/menu.py
1
49277
#!/usr/bin/python # Graphical Kickstart Script # # This script was written by Frank Caviggia, Red Hat Consulting # edit by Jason Ricles, Mikros Systems Corp # Last update was 7 December 2015 # This script is NOT SUPPORTED by Red Hat Global Support Services. # Please contact Josh Waldman for more information. # # Author...
apache-2.0
9,098,609,482,478,488,000
40.409244
586
0.604542
false
3.025356
true
false
false
spooky/lobby
src/widgets.py
1
6282
import logging import os import re import asyncio from collections import OrderedDict from PyQt5.QtCore import QObject, QCoreApplication, QUrl, pyqtSignal, pyqtSlot from PyQt5.QtQml import QQmlApplicationEngine from PyQt5.QtGui import QGuiApplication, QIcon from PyQt5.QtQuick import QQuickItem import settings import f...
gpl-3.0
-6,388,136,681,272,199,000
34.491525
124
0.646769
false
4.05029
false
false
false
aristanetworks/arista-ovs-nova
nova/virt/netutils.py
1
3524
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
apache-2.0
-1,055,264,008,260,136,000
29.37931
78
0.61975
false
3.859803
false
false
false
Outernet-Project/tekhenu
tekhenu/routes/content_list.py
1
5442
""" content_list.py: Content list request handler, and suggestion form handler Tekhenu (c) 2014, Outernet Inc All rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ from __future__ import uni...
gpl-3.0
883,379,827,784,138,000
34.109677
79
0.610437
false
4.07946
false
false
false
pearpai/TensorFlow-action
deep_learning_with_tensorFlow/Chapter04/p7902.py
1
1719
import tensorflow as tf from numpy.random import RandomState batch_size = 8 # 两个输入节点 x = tf.placeholder(tf.float32, shape=(None, 2), name='x-input') # 回归问题一般只有一个输出节点 y_ = tf.placeholder(tf.float32, shape=(None, 1), name='y-input') # 定义了一个单层的神经网络前向传播过程,这里就是简单加权和 w1 = tf.Variable(tf.random_normal([2, 1], stddev=1, see...
apache-2.0
-4,511,052,033,741,601,000
29.813953
93
0.638491
false
1.743421
false
false
false
ThoriumGroup/thorium
thorium/utils/flags.py
1
13209
#!/usr/bin/env python """ Thorium Utils Flags =================== Nuke Knob Flags which can be difficult to access due to Nuke not storing readily available variables for them, forcing the use the integer values as seen below. Any of these flags can now be used with: :: from thorium.utils import flags And then ...
mit
-3,900,856,096,993,762,300
44.705882
106
0.532516
false
4.491329
false
false
false
jianmingtang/PIC-tools
Python/PIC/DistNASA.py
1
4991
# Copyright (C) 2014 Jian-Ming Tang <jmtang@mailaps.org> # # 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) any later versio...
gpl-3.0
4,494,715,066,244,990,000
31.620915
75
0.47766
false
3.156863
false
false
false
porolakka/motioneye-jp
src/v4l2ctl.py
1
11358
# Copyright (c) 2013 Calin Crisan # This file is part of motionEye. # # motionEye 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. # #...
gpl-3.0
-6,950,108,781,523,003,000
26.302885
127
0.569202
false
3.817815
false
false
false
intelxed/xed
pysrc/regmap.py
1
3763
#!/usr/bin/env python #BEGIN_LEGAL # #Copyright (c) 2019 Intel 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 # # Unless r...
apache-2.0
-6,261,212,164,540,289,000
27.725191
97
0.560723
false
3.474608
false
false
false
gaoxiaofeng/troubleShooting
templates/keywords/Disk.py
1
1949
# -*- coding: utf-8 -*- from troubleshooting.framework.libraries.library import singleton import re from troubleshooting.framework.template.Keyword import * import traceback @singleton class Disk(Keyword): def __init__(self): super(self.__class__,self).__init__() self._diskSize = {} self._di...
apache-2.0
1,576,557,107,511,169,300
30.435484
66
0.518214
false
3.68431
false
false
false
bbc/ebu-tt-live-toolkit
testing/bdd/test_ebuttd_multiple_active_regions_overlapping.py
1
5826
import pytest from pytest_bdd import scenarios, when, then, parsers from ebu_tt_live.errors import OverlappingActiveElementsError, RegionExtendingOutsideDocumentError from ebu_tt_live.documents.converters import EBUTT3EBUTTDConverter from ebu_tt_live.documents import EBUTT3Document from ebu_tt_live.documents import EBU...
bsd-3-clause
-1,952,068,880,815,068,000
50.105263
100
0.706831
false
3.297114
true
false
false