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
echinopsii/net.echinopsii.ariane.community.core.injector
messaging/src/test/resources/InjectorComponentActionTest.py
1
4228
import uuid import pika import json from pprint import pprint __author__ = 'mffrench' class Requestor(object): def __init__(self, connection_, requestQ_): self.connection = connection_ self.channel = connection.channel() self.requestQ = requestQ_ self.channel.queue_declare(queue=r...
agpl-3.0
9,007,169,291,546,052,000
35.773913
134
0.581362
false
4.202783
false
false
false
ariestiyansyah/atlas
users/__init__.py
1
2699
# coding=utf-8 """This is the main package for the application. :copyright: (c) 2013 by Tim Sutton :license: GPLv3, see LICENSE for more details. """ import os import logging from flask import Flask from flask_mail import Mail from flask.ext.appconfig import AppConfig from users.database import db, migrate APP = F...
gpl-2.0
-3,178,633,222,398,445,600
28.336957
79
0.702482
false
3.759053
true
false
false
pgroudas/pants
src/python/pants/base/payload_field.py
1
9112
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import json import o...
apache-2.0
-8,005,049,777,657,307,000
31.312057
102
0.712028
false
4.126812
false
false
false
nmoutschen/linux-utils
debian/checkup.py
1
2457
#!/usr/bin/env python3 """ This script checks up the general state of the system (updates required, CPU usage, etc.) and returns a string that can be used in an MOTD file. You can use this script as part of a cron job to update the MOTD file in order to display relevant system information to sysadmins upon login. ""...
mit
-1,833,325,935,985,679,600
23.57
93
0.625967
false
3.566038
false
false
false
jsbitcoin/bpp-client
lib/deterministic.py
1
4488
from pybitcointools import * import hmac, hashlib ### Electrum wallets def electrum_stretch(seed): return slowsha(seed) # Accepts seed or stretched seed, returns master public key def electrum_mpk(seed): if len(seed) == 32: seed = electrum_stretch(seed) return privkey_to_pubkey(seed)[2:] # Accepts (seed or ...
gpl-3.0
-7,851,304,233,098,060,000
34.904
88
0.649287
false
2.956522
false
false
false
shadowmint/nwidget
samples/snake/model/game.py
1
1498
# Copyright 2013 Douglas Linder # 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
7,245,439,001,718,751,000
26.740741
74
0.712951
false
3.68059
false
false
false
emattiza/maya
tests/test_maya.py
1
5853
import pytest import copy from datetime import timedelta import maya from maya.core import _seconds_or_timedelta # import private function def test_rfc2822(): r = maya.parse('February 21, 1994').rfc2822() d = maya.MayaDT.from_rfc2822(r) assert r == 'Mon, 21 Feb 1994 00:00:00 GMT' assert r == d.rfc28...
mit
5,969,255,941,538,656,000
23.286307
74
0.619341
false
2.939729
true
false
false
electronick1/todoist-python
todoist/managers/biz_invitations.py
1
1220
# -*- coding: utf-8 -*- from .generic import Manager class BizInvitationsManager(Manager): state_name = None # there is no local state associated object_type = None # there is no object type associated resource_type = None # there is no resource type associated def accept(self, invitation_id, inv...
mit
-8,422,246,199,426,850,000
30.282051
74
0.548361
false
4.163823
false
false
false
googleads/googleads-python-lib
examples/ad_manager/v202011/inventory_service/get_all_ad_units.py
1
1750
#!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-7,039,397,890,105,975,000
34.714286
77
0.713714
false
3.995434
false
false
false
mscuthbert/abjad
abjad/tools/scoretools/FixedDurationContainer.py
1
3389
# -*- encoding: utf-8 -*- from abjad.tools import durationtools from abjad.tools.scoretools.Container import Container class FixedDurationContainer(Container): r'''A fixed-duration container. :: >>> container = scoretools.FixedDurationContainer( ... (3, 8), "c'8 d'8 e'8") >>> sho...
gpl-3.0
-9,112,601,096,330,817,000
25.484375
79
0.605783
false
4.506649
false
false
false
bnbowman/HlaTools
src/pbhla/references/fofn.py
1
2835
import os, re, logging from pbcore.io.FastaIO import FastaReader log = logging.getLogger() def parse_reference_fofn( fofn_file ): basename = os.path.basename( fofn_file ) log.info('Parsing the reference FOFN: "%s"' % basename) sequences = _parse_reference_sequences( fofn_file ) metadata = _parse_refe...
bsd-3-clause
-9,052,151,865,152,977,000
36.302632
91
0.564374
false
3.948468
false
false
false
dcbaker/alot
alot/account.py
1
7204
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import abc import glob import logging import mailbox import os from .helper import call_cmd_async from .helper import split_commandstr...
gpl-3.0
6,802,126,089,319,658,000
33.634615
79
0.594531
false
4.107184
false
false
false
thonkify/thonkify
src/lib/telegram/inlinequeryresultgame.py
1
1573
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
mit
5,235,290,454,981,283,000
37.365854
90
0.72473
false
3.912935
false
false
false
devttys0/binwalk
src/binwalk/plugins/jffs2valid.py
1
1762
import struct import binascii import binwalk.core.plugin class JFFS2ValidPlugin(binwalk.core.plugin.Plugin): ''' Helps validate JFFS2 signature results. The JFFS2 signature rules catch obvious cases, but inadvertently mark some valid JFFS2 nodes as invalid due to padding (0xFF's or 0x00's) in b...
mit
-9,069,981,298,579,970,000
36.489362
88
0.635074
false
3.781116
false
false
false
phenoxim/nova
nova/tests/unit/scheduler/fakes.py
1
7133
# Copyright 2011 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
8,389,918,362,189,295,000
37.556757
78
0.582644
false
3.424388
false
false
false
dekatzenel/team-k
mds/urls.py
1
4352
"""The Django url to handler mappings for mDS. :Authors: Sana dev team :Version: 2.0 """ from django.conf import settings from django.conf.urls.defaults import patterns, url, include from django.views.generic.simple import redirect_to from django.contrib import admin #from piston.authentication import HttpBasicAuthe...
bsd-3-clause
-9,044,449,508,689,583,000
30.773723
112
0.580423
false
4
false
false
false
UUDigitalHumanitieslab/timealign
annotations/management/commands/import_tenses.py
1
4002
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from annotations.models import Language, Tense, Annotation, Fragment, LabelKey, Label from selections.models import Selection class Command(BaseCommand): help = 'Imports Tenses/Labels for Annotations, Selections, and Fragm...
mit
-8,120,638,896,575,483,000
32.35
103
0.57921
false
4.331169
false
false
false
vslavik/bakefile
src/bkl/interpreter/__init__.py
1
9662
# # This file is part of Bakefile (http://bakefile.org) # # Copyright (C) 2008-2013 Vaclav Slavik # # 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...
mit
574,072,912,695,532,500
36.449612
101
0.630718
false
4.277114
false
false
false
GoogleCloudPlatform/training-data-analyst
blogs/babyweight/babyweight/trainer/model.py
1
9383
#!/usr/bin/env python # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
4,712,138,857,744,311,000
32.038732
80
0.655121
false
3.765249
false
false
false
torrances/alchemy-api
taxonomy/create-tsv.py
1
1548
#!/usr/bin/python from __future__ import print_function from alchemyapi import AlchemyAPI import argparse import file_utils import json import sys import os from collections import namedtuple alchemyapi = AlchemyAPI() ## ARGPARSE USAGE ## <https://docs.python.org/2/howto/argparse.html> parser = argparse.Ar...
apache-2.0
-4,775,753,114,986,026,000
27.685185
108
0.685401
false
3.165644
false
false
false
serge-sans-paille/pythran
pythran/analyses/inlinable.py
1
1221
""" Inlinable list function that may be inlined. """ from pythran.passmanager import ModuleAnalysis from pythran.analyses import Identifiers from pythran.analyses.pure_expressions import PureExpressions import pythran.metadata as metadata import gast as ast import copy class Inlinable(ModuleAnalysis): """ Dete...
bsd-3-clause
3,000,972,377,086,779,000
28.780488
70
0.651106
false
4.003279
false
false
false
martijnkoopman/thesis
3_4_compress_cells.py
1
2720
# Flatten navigable space to one voxel thick layer # For walking and driving actors # May 2016 - Martijn Koopman # Input idi = self.GetInput() dims = idi.GetDimensions() numTuples = dims[0]*dims[1]*dims[2] cellsArr = idi.GetPointData().GetArray('cell_id') typesArr = idi.GetPointData().GetArray('cell_type')...
gpl-3.0
7,206,716,420,459,701,000
31.604938
109
0.606985
false
2.872228
false
false
false
M157q/zdict
zdict/dictionaries/moe.py
1
5222
import json import unicodedata # to detect Unicode category from zdict.dictionary import DictBase from zdict.exceptions import QueryError, NotFoundError from zdict.models import Record class MoeDict(DictBase): API = 'https://www.moedict.tw/uni/{word}' @property def provider(self): return 'moe'...
gpl-3.0
-3,188,912,346,079,816,000
25.080808
77
0.431255
false
4.321339
false
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/apport/general-hooks/ubuntu.py
1
14954
'''Attach generally useful information, not specific to any package. Copyright (C) 2009 Canonical Ltd. Authors: Matt Zimmerman <mdz@canonical.com>, Brian Murray <brian@ubuntu.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
gpl-3.0
9,189,838,139,298,959,000
41.482955
280
0.600976
false
3.994124
false
false
false
qiubit/luminis
backend/api/series_attribute.py
1
3125
# # Copyright (C) 2017 Rafał Michaluk # Copyright (C) 2017 Dominik Murzynowski # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # import time from pycnic.core import Handler from pycnic.utils import requires_validation from voluptuous import Sch...
mit
3,283,949,692,257,291,000
37.097561
115
0.634123
false
3.675294
false
false
false
madebr/ADuC832_demoproject
loader/dumphex.py
1
1060
#!/usr/bin/env python3 #============================================================================= #Copyright (C) 2016, Anonymous Maarten # #This file is part of ADuC832 demoproject. # #This program is free software; you can redistribute it and/or #modify it under the terms of the GNU General Public License #as publ...
gpl-2.0
1,634,500,598,061,975,600
38.259259
80
0.653774
false
4.223108
false
false
false
data-tsunami/museo-cachi
cachi/fields.py
1
3734
# -*- coding: utf-8 -*- #====================================================================== # This file is part of "Museo-Cachi". # # Museo-Cachi 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,...
gpl-3.0
-3,690,911,213,907,208,000
36.676768
80
0.530831
false
3.833505
false
false
false
odoo-brazil/l10n-brazil-wip
sped/models/sped_documento.py
1
40174
# -*- coding: utf-8 -*- # # Copyright 2016 Taŭga Tecnologia # Aristides Caldeira <aristides.caldeira@tauga.com.br> # License AGPL-3 or later (http://www.gnu.org/licenses/agpl) # from __future__ import division, print_function, unicode_literals import logging from odoo import api, fields, models, _ from odoo.except...
agpl-3.0
-4,344,500,498,646,205,000
30.356078
78
0.577578
false
3.064464
false
false
false
tungvx/deploy
.google_appengine/google/appengine/ext/mapreduce/mapreduce_pipeline.py
1
5809
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
apache-2.0
-3,015,711,878,670,997,000
26.661905
80
0.646583
false
4.387462
false
false
false
manassolanki/erpnext
erpnext/education/api.py
1
12440
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.utils import flt, cstr from frappe.email...
gpl-3.0
7,010,205,001,467,477,000
31.997347
129
0.727251
false
3.329764
false
false
false
Strepto/sumatrapdf
scripts/obsolete/buildbot-obsolete.py
1
22375
""" Builds sumatra and uploads results to s3 for easy analysis, viewable at: https://kjkpub.s3.amazonaws.com/sumatrapdf/buildbot/index.html """ import sys import os # assumes is being run as ./scripts/buildbot.py efi_scripts_dir = os.path.join("tools", "efi") sys.path.append(efi_scripts_dir) import shutil i...
gpl-3.0
-7,628,664,021,878,116,000
32.056317
100
0.59857
false
3.290441
true
false
false
BioinfUD/K-mersCL
src/multiple_execution.py
1
9155
import argparse import os from shutil import copyfile import subprocess import sys from utils.analyze_taken_metrics import merge_metrics import config from config import MSPK_PARTITION_PATH, THREADS, TOTAL_CORES, KMC_PATH, CLEAR_MEM_SCRIPT_PATH def parse_arguments(): parser = argparse.ArgumentParser( desc...
mit
5,334,840,391,572,585,000
50.723164
181
0.6497
false
3.347349
false
false
false
redox-alpha/omorfi
src/python/omorfi/twolc_formatter.py
1
6872
#!/usr/bin/env python3 from sys import exit, stderr from .settings import (common_multichars, fin_consonants, fin_lowercase, fin_symbols, fin_uppercase, fin_vowels, newword_boundary, optional_hyphen, word_boundary) def format_copyright_twolc(): return """ ! This automatically generated tw...
gpl-3.0
-770,607,448,415,127,000
43.16129
128
0.582177
false
3.121295
false
false
false
efforia/eos-dashboard
cloud/nexgyn/adminx.py
1
1067
import xadmin from models import * class MenstruacaoAdmin(object): list_display = Menstruacao._meta.get_all_field_names() class AntecedenteAdmin(object): list_display = Antecedente._meta.get_all_field_names() class OutroAdmin(object): list_display = Outro._meta.get_all_field_names() class AtividadeA...
lgpl-3.0
-8,351,986,618,758,862,000
27.078947
65
0.789128
false
2.7289
false
false
false
HybridF5/jacket
jacket/tests/storage/unit/volume/drivers/emc/scaleio/test_create_volume.py
1
4940
# Copyright (c) 2013 - 2015 EMC 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 # # Unle...
apache-2.0
3,500,929,685,928,871,000
41.956522
78
0.619636
false
4.089404
true
false
false
kichkasch/pygls
src/pygls/GLSCommands.py
1
2417
""" Python library for GPS Location Sharing - collection of constants for commands and replies for the GLS server. All constants starting with "co" are commands sent from the client to the server. All constants starting with "re" are replies, which are sent back from the server to the client in reply to a request. ht...
gpl-3.0
-3,231,831,272,823,069,000
36.184615
110
0.745966
false
3.192867
false
false
false
richteer/xmpp-bot
modules/quote.py
1
1424
import random import os quotes = [] def init(): global quotes quotes = [] with open("quotes.txt","r")as f: quotes = f.read().splitlines() def quote_handler(string): if len(quotes) == 0: return "Error: quotes.txt wasn't initialized properly?" if string == None: return quotes[random.randint(0, len(quotes)-1...
bsd-3-clause
-1,621,905,694,427,489,300
26.384615
193
0.691713
false
3.049251
false
false
false
getsentry/zeus
zeus/api/resources/base_change_request.py
1
1467
from flask import request, Response from sqlalchemy.orm import contains_eager from zeus import auth from zeus.constants import PERMISSION_MAP from zeus.models import ChangeRequest, Repository, RepositoryProvider from .base import Resource class BaseChangeRequestResource(Resource): def dispatch_request( ...
apache-2.0
8,692,239,293,364,636,000
33.116279
87
0.628494
false
4.379104
false
false
false
Azure/azure-sdk-for-python
sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py
1
5693
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
1,462,007,640,238,916,400
47.65812
188
0.641841
false
4.503956
true
false
false
simondona/exp-control-bec-tn
libraries/parser.py
1
15808
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2015-2016 Simone Donadello # # 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) an...
gpl-3.0
-3,721,115,896,549,885,400
42.309589
118
0.441802
false
4.273587
false
false
false
doron2402/CameraControlXYRoboticArm
PythonTemp/huoghTransform.py
1
1195
import cv2 import numpy as np img = cv2.imread('image4_with_sample.jpg',0) img1 = cv2.medianBlur(img,5) cv2.imwrite('image4_gray_and_blur.jpg',img1) #circles = cv2.HoughCircles(img1,cv2.HOUGH_GRADIENT,1,20,param1=50,param2=30,minRadius=0,maxRadius=0) circles = cv2.HoughCircles(img1, cv2.HOUGH_GRADIENT, 1.2, 100) ...
mit
-4,046,292,917,451,260,400
29.641026
101
0.654393
false
2.505241
false
false
false
chichan01/xbob.measure.Bootstraps
setup.py
1
2723
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Chi ho CHAN <c.chan@surrey.ac.uk> # Wed Jan 29 16:29 CEST 2014 # This file contains the python (distutils/setuptools) instructions so your # package can be installed on **any** host system. It defines some basic # information like the package name for instance, o...
gpl-3.0
2,788,399,006,084,333,000
39.044118
84
0.718325
false
4.046062
false
false
false
edx/course-discovery
course_discovery/apps/api/filters.py
1
7646
import datetime import logging import pytz from django.contrib.auth import get_user_model from django.db.models import Q, QuerySet from django.utils.translation import ugettext as _ from django_filters import rest_framework as filters from dry_rest_permissions.generics import DRYPermissionFiltersBase from guardian.sho...
agpl-3.0
-7,183,579,204,389,890,000
34.896714
117
0.670154
false
4.24071
false
false
false
oerdnj/json-glib
build/win32/gen-file-list-jsonglib.py
1
3552
#!/usr/bin/python # vim: encoding=utf-8 # Generate the file lists for processing with g-ir-scanner import os import sys import re import string import subprocess import optparse def gen_jsonglib_filelist(srcroot, subdir, dest): vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'), ...
lgpl-2.1
9,128,459,780,183,954,000
30.157895
95
0.50366
false
3.46875
false
false
false
postalXdude/PySplash
py_splash/driver.py
1
10769
import json try: from urllib.parse import quote_plus except ImportError: from urllib import quote_plus from py_splash.static import ( LUA_SOURCE, GET_HTML_ONLY, GET_ALL_DATA, RETURN_HTML_ONLY, RETURN_ALL_DATA, PREPARE_COOKIES, JS_PIECE, SET_PROXY, USER_AGENT, GO ) from...
mit
8,227,596,697,306,968,000
42.955102
118
0.558919
false
4.201717
false
false
false
knipknap/SpiffWorkflow
SpiffWorkflow/serializer/json.py
1
2405
# -*- coding: utf-8 -*- from __future__ import division, absolute_import # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later...
lgpl-3.0
4,921,409,628,840,042,000
30.233766
70
0.672765
false
4.028476
false
false
false
xelphene/nmurl
nmurl/parsedns.py
1
4660
#!/usr/bin/env python import re import sys class ParseError: def setDefaults(self): if self.format==None: self.format='dig' class RRSet(object): """an RRSet contains one or more resource records of the same name, type and class (and possibly TTL, not sure what to do with that yet.""" def __init__(self, ...
gpl-3.0
633,926,550,901,782,000
21.848039
74
0.625751
false
2.750885
false
false
false
mivok/bear_backup
bear_backup.py
1
7256
#!/usr/bin/env python3 import argparse import datetime import glob import json import os.path import pathlib import re import sqlite3 import subprocess import sys import zipfile # Paths to various files approot = os.path.expanduser("~/Library/Containers/net.shinyfrog.bear/Data") dbpath = os.path.join(approot, "Documen...
mit
2,395,900,684,026,304,500
35.646465
80
0.577729
false
4.024404
false
false
false
cedrick-f/pySyLiC
src/fitting.py
1
10186
#!/usr/bin/env python # -*- coding: ISO-8859-1 -*- ##This file is part of pySylic ############################################################################# ############################################################################# ## ## ## ...
gpl-3.0
8,334,137,796,830,296,000
31.752412
137
0.461614
false
3.708045
false
false
false
octacoin-project/beta
contrib/seeds/makeseeds.py
1
3747
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "130.211.129.106", "178.63.107.226", "83.81.1...
mit
-5,786,766,114,597,601,000
30.754237
186
0.57139
false
2.988038
false
false
false
dakcarto/suite-qgis-plugin
src/opengeo/test/integrationtest.py
1
3347
import unittest from PyQt4.QtCore import QSettings from opengeo.gui.explorer import OpenGeoExplorer from opengeo.test import utils from opengeo.gui.gsexploreritems import GsCatalogItem from opengeo.gui.pgexploreritems import PgConnectionItem class ExplorerIntegrationTest(unittest.TestCase): @classmethod def...
gpl-2.0
-6,925,303,547,348,892,000
32.148515
93
0.684195
false
3.739665
true
false
false
googleapis/googleapis-gen
google/cloud/resourcemanager/v3/resourcemanager-v3-py/google/cloud/resourcemanager_v3/services/tag_values/pagers.py
1
5794
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-632,609,721,965,289,900
40.385714
95
0.656196
false
4.409437
false
false
false
therealkbhat/mazerunner
mazerunner/mazerunner.py
1
8720
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ Usage: mazerunner.py -m <filename> """ import signal import random import curses import time import sys import pdb import os import threading import atexit import locale from docopt import docopt locale.setlocale(locale.LC_ALL,"") # necessary to get curses to work w...
mit
-4,523,575,646,898,852,000
28.306397
111
0.507927
false
3.470494
false
false
false
cpausmit/FiBS
bin/fibsLastLogs.py
1
1634
#!/usr/bin/env python #--------------------------------------------------------------------------------------------------- # Script to find the youngest logfiles of completed jobs for a given FiBS task. #--------------------------------------------------------------------------------------------------- import os,sys im...
mit
-2,247,456,938,416,008,200
28.178571
107
0.479804
false
3.498929
false
false
false
erigones/esdc-ce
gui/widgets.py
1
7361
import json import phonenumbers from django import forms from django.forms import widgets from django.utils import six from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from frozendict import frozendict from taggit.for...
apache-2.0
8,442,338,872,305,309,000
30.728448
112
0.645836
false
3.823896
false
false
false
danielelinaro/BAL
python/examples/solver.py
1
1024
#!/usr/bin/env python from pybal import bal from pylab import figure, plot, xlabel, ylabel, title, show, axis # create a dynamical system and load the equations of the Hindmarsh-Rose neuron model hr = bal.DynamicalSystem() hr.create('HindmarshRose') # create the parameters of the model par = bal.Parameters(hr.npar) ...
mit
-7,904,466,974,603,930,000
25.947368
85
0.661133
false
2.828729
false
false
false
wangyang59/tf_models
video_prediction/prediction_train_flo_edge.py
1
17341
# Copyright 2016 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-8,993,515,519,394,201,000
37.707589
156
0.61098
false
3.380312
false
false
false
lokokung/Starburst-Front-End-Control-System
core/feanta_server.py
1
8262
""" STARBURST ACC/FEANTA Middle Server Author: Lokbondo Kung Email: lkkung@caltech.edu """ import datetime import socket import sys import time import threading import gen_fem_sf import traceback # Logging information. TIMESTAMP_FMT = '%Y-%m-%d %H:%M:%S' LOG_FILE = 'bridge_server.log' # Define all consta...
mit
-2,742,736,555,021,004,000
31.527559
78
0.549141
false
4.217458
false
false
false
shendri4/devil_wgs
BQSR_perInd_Devils.py
1
3647
#!/usr/bin/env python #import argparse #from glob import glob #-s test_samples.txt #-b /mnt/lfs2/hend6746/devils/reference/sarHar1.fa #-k /mnt/lfs2/hend6746/taz/filtered_plink_files/export_data_150907/seventy.1-2.nodoubletons.noparalogs.noX.plink.oneperlocus.vcf from os.path import join as jp from os.path import absp...
apache-2.0
2,987,812,366,922,128,000
33.733333
158
0.635043
false
2.915268
false
false
false
vesellov/bitdust.devel
system/bpio.py
1
34436
#!/usr/bin/python # bpio.py # # Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io # # This file (bpio.py) is part of BitDust Software. # # BitDust 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,...
agpl-3.0
287,642,250,189,792,000
26.351867
96
0.544895
false
3.906523
false
false
false
dbiesecke/dbiesecke.github.io
repo/script.video.F4mProxy/lib/TSDownloader.py
1
34131
import xml.etree.ElementTree as etree import base64 from struct import unpack, pack import sys import io import os import time import itertools import xbmcaddon import xbmc import urllib2,urllib import traceback import urlparse import posixpath import re import socket, struct from flvlib import tags...
mit
-3,784,030,089,646,129,700
44.627049
156
0.398875
false
5.070718
false
false
false
hydroshare/hydroshare
hs_tracking/models.py
1
11384
from datetime import datetime, timedelta from django.db import models from django.db.models import F from django.core import signing from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.contrib.auth.models import User from theme.models import UserProfile from .utils imp...
bsd-3-clause
-4,601,846,985,342,638,000
38.804196
92
0.586174
false
4.497827
false
false
false
Nesiehr/osf.io
api/preprints/views.py
1
14649
import re from django.db.models import Q from rest_framework import generics from rest_framework.exceptions import NotFound, PermissionDenied, NotAuthenticated from rest_framework import permissions as drf_permissions from website.models import PreprintService from framework.auth.oauth_scopes import CoreScopes from...
apache-2.0
1,803,590,385,282,628,000
41.46087
170
0.562837
false
4.886258
false
false
false
macarthur-lab/exac_readviz_scripts
scripts/reset_failed_db_records.py
1
27810
""" This script updates database records in the interval, variant, sample tables to recover from various kinds of transient errors fixable errors such as cluster filesystem problems, some previously-generated files being deleted, etc. """ import os import sys from mysql.connector import MySQLConnection from utils.cons...
mit
-1,797,212,239,246,498,000
61.918552
216
0.57091
false
3.386508
false
false
false
parkrrr/skybot
plugins/stock.py
1
1208
import json, urllib2 from util import hook, http @hook.command def stock(inp): '''.stock <symbol> -- gets stock information''' symbols = inp.split(',') # who needs more than 3 symbols url = ('http://finance.google.com/finance/info?client=ig&q=%s' % ','.join(symbols[:3])) try: raw = ht...
unlicense
2,358,894,156,922,569,000
27.761905
110
0.52649
false
3.573964
false
false
false
onjin/docker
sentry/sentry.conf.py
1
1182
# /etc/sentry.conf.py import os dbname = os.environ.get('SENTRY_DBNAME', 'sentry') dbuser = os.environ.get('SENTRY_DBUSER', 'sentry') dbpass = os.environ.get('SENTRY_DBPASS', 'sentry') dbhost = os.environ.get('SENTRY_DBHOST', '127.0.0.1') dbport = os.environ.get('SENTRY_DBPORT', '') sentry_workers = os.environ.get('SE...
bsd-2-clause
2,162,608,814,997,409,800
25.863636
78
0.664129
false
2.940299
false
false
false
djsilenceboy/LearnTest
Python_Test/PySample1/com/djs/learn/metaclass/TestMetaSerialize.py
1
1732
''' Created on Apr 15, 2016 @author: dj ''' import json registry = {} def register_class(target_class): print("register_class: class name =", target_class.__name__) registry[target_class.__name__] = target_class class Serializable(object): def __init__(self, *args): print("Serializable: {0}...
apache-2.0
9,222,040,938,374,815,000
19.619048
76
0.57679
false
3.350097
false
false
false
pyspace/test
pySPACE/missions/nodes/spatial_filtering/ica.py
1
6780
""" Independent Component Analysis variants """ import os import cPickle from copy import deepcopy import numpy try: import mdp from mdp.nodes import FastICANode except: pass from pySPACE.missions.nodes.spatial_filtering.spatial_filtering import SpatialFilteringNode from pySPACE.resources.data_types.time...
gpl-3.0
8,658,471,178,082,416,000
38.649123
126
0.60118
false
4.460526
false
false
false
christianlundkvist/pybitcointools
bitcoin/main.py
1
14700
#!/usr/bin/python import hashlib, re, sys, os, base64, time, random, hmac import ripemd ### Elliptic curve parameters (secp256k1) P = 2**256-2**32-2**9-2**8-2**7-2**6-2**4-1 N = 115792089237316195423570985008687907852837564279074904382605163141518161494337 A = 0 B = 7 Gx = 55066263022277343669578718895168534326250603...
mit
2,564,641,832,011,280,000
33.106729
89
0.639864
false
2.760563
false
false
false
robmcmullen/peppy
i18n.in/make-podict.py
1
13109
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- """Generate python dictionaries catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a python dictionary Based on msgfmt.py by Martin v. Löwis <loewis@informatik.hu-berlin.de> """ import sys...
gpl-2.0
8,741,893,544,413,561,000
35.823034
153
0.493859
false
4.268642
false
false
false
JWDebelius/scikit-bio
skbio/stats/_subsample/subsample.py
1
4259
r""" Subsampling (:mod:`skbio.math.subsample`) ========================================= .. currentmodule:: skbio.math.subsample This module provides functionality for subsampling from vectors of counts. Functions --------- .. autosummary:: :toctree: generated/ subsample """ # -----------------------------...
bsd-3-clause
-945,406,261,290,175,600
27.972789
79
0.57854
false
4.345918
false
false
false
yl565/statsmodels
statsmodels/tsa/vector_ar/tests/test_var.py
1
18926
""" Test VAR Model """ from __future__ import print_function # pylint: disable=W0612,W0231 from statsmodels.compat.python import (iteritems, StringIO, lrange, BytesIO, range) from nose.tools import assert_raises import nose import os import sys import numpy as np import statsmod...
bsd-3-clause
-8,557,128,009,497,108,000
28.342636
100
0.558227
false
3.256366
true
false
false
alexforencich/xfcp
python/xfcp/gty_node.py
1
13912
""" Copyright (c) 2017 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
mit
-4,510,853,304,519,722,500
27.105051
83
0.643186
false
2.598916
false
false
false
phatblat/AbletonLiveMIDIRemoteScripts
Push2/item_lister_component.py
1
9031
# Source Generated with Decompyle++ # File: item_lister_component.pyc (Python 2.5) from __future__ import absolute_import from ableton.v2.base import forward_property, index_if, listens, SlotManager, Subject from ableton.v2.control_surface import Component, CompoundComponent from ableton.v2.control_surface.control imp...
mit
8,494,214,371,004,027,000
30.034364
197
0.618758
false
3.933362
false
false
false
gadsbyfly/PyBioMed
PyBioMed/PyMolecule/fingerprint.py
1
20276
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ #####...
bsd-3-clause
1,747,260,672,386,670,300
28.090387
120
0.584435
false
3.942446
false
false
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/invited_positions_v30.py
1
5255
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
465,823,469,642,113,860
30.848485
146
0.603616
false
3.881093
false
false
false
BitTigerInst/MonkeyKing_crawler_recommender
crawler/xiaomi_appstore_crawler/xiaomi_appstore_crawler/spiders/xiaomi_spider.py
1
1999
import scrapy from scrapy.spiders import Spider from scrapy import Request import re from scrapy.selector import Selector from xiaomi_appstore_crawler.items import XiaomiAppstoreCrawlerItem class XiaomiSpider(Spider): name = "xiaomi" allowed_domains = ["app.mi.com"] start_urls = [ "http://app.mi.c...
mit
-4,969,427,099,541,880,000
31.770492
85
0.550775
false
3.544326
false
false
false
manahl/PythonTrainingExercises
Beginners/BuiltinFunctions/solution.py
1
2913
"""Builtin functions problems. It might be useful to browse here (adjust your version to suit): https://docs.python.org/2.7/library/functions.html 1. Create the sequence [0, 3, 6, 9, ... N]. What is the problem if N is very large? Is there a better way if N is very large? 2. Find the difference between the biggest an...
bsd-3-clause
-5,869,194,093,357,374,000
24.778761
91
0.567113
false
3.003093
true
false
false
RevanProdigalKnight/sublimetext-codeformatter
codeformatter/lib/coldfusionbeautifier/__init__.py
1
10949
from __future__ import print_function import sys import re import sublime try: # Python 3 from .__version__ import __version__ except (ValueError): # Python 2 from __version__ import __version__ class BeautifierOptions: def __init__(self): self.indent_size = 4 self.indent_char = ' '...
mit
-7,164,027,467,788,904,000
50.646226
531
0.60179
false
3.519447
false
false
false
spwilson2/cache-my-subreddit
cms/reddit.py
1
6083
import requests import time import re import praw from cms.util import BeautifulSoup, _FAKE_HEADERS SUBMITTED_FMT = 'https://www.reddit.com/user/%s/submitted/' SUBREDDIT_FMT = 'https://www.reddit.com/r/%s/' USER_AGENT='sheenrocks\' user agent' RATE_LIMIT = 1 class Reddit(object): def __init__(self, username=No...
mit
4,649,188,721,936,869,000
36.319018
432
0.616143
false
3.495977
false
false
false
datawire/ambassador
vendor/github.com/envoyproxy/protoc-gen-validate/validate/validator.py
1
42082
import re from validate_email import validate_email import ipaddress try: import urlparse except ImportError: import urllib.parse as urlparse import uuid import struct from jinja2 import Template import time import sys printer = "" # Well known regex mapping. regex_map = { "UNKNOWN": "", "HTTP_HEADER_...
apache-2.0
-1,249,293,611,258,870,500
43.43717
384
0.519557
false
3.42799
false
false
false
Connexions/nebuchadnezzar
nebu/tests/models/test_document.py
1
5799
from copy import copy from lxml import etree from cnxepub.html_parsers import HTML_DOCUMENT_NAMESPACES from nebu.models.document import Document REFERENCE_MARKER = '#!--testing--' M46882_METADATA = { 'authors': [{'id': 'OpenStaxCollege', 'name': 'OpenStaxCollege', 'type': 'cnx-...
agpl-3.0
3,357,162,293,099,597,300
34.796296
78
0.591999
false
3.812623
true
false
false
Abhino/GamifiedTodoList
apis/userInfoApi.py
1
1973
import logging from flask_restplus import Namespace, Resource, fields from flask import jsonify, request from Service.userInfoService import * api = Namespace('user', description='User Info API related operations') LOG = logging.getLogger("userInfoApi") user_fields = api.model('UserModel', { 'lastLogin': fields.Dat...
mit
-959,042,493,399,824,600
33.034483
116
0.660922
false
3.736742
false
false
false
Johnzero/erp
openerp/addons/base/ir/ir_cron.py
1
15239
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
-7,828,882,223,435,639,000
46.072555
146
0.57425
false
4.301157
false
false
false
olivier-m/Tamia
tamia/api.py
1
9186
# -*- coding: utf-8 -*- # # This file is part of Tamia released under the MIT license. # See the LICENSE for more information. from __future__ import (print_function, division, absolute_import, unicode_literals) from datetime import datetime import os.path from StringIO import StringIO import pygit2 from .errors imp...
mit
-8,687,526,702,763,049,000
27.70625
101
0.554213
false
3.824313
false
false
false
IMIO/django-fixmystreet
django_fixmystreet/fixmystreet/migrations/0045_migrate_mark_as_done_motivation_to_comment.py
1
45757
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
agpl-3.0
8,207,752,784,111,992,000
93.34433
238
0.566558
false
3.585972
false
false
false
openpli-arm/bitbake
lib/bb/parse/parse_py/BBHandler.py
1
7448
#!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ class for handling .bb files Reads a .bb file and obtains its metadata """ # Copyright (C) 2003, 2004 Chris Larson # Copyright (C) 2003, 2004 Phil Blundell # # This program is free softwar...
gpl-2.0
2,966,996,180,090,194,000
30.033333
220
0.575054
false
3.440185
false
false
false
KVM-VMI/nitro
nitro/backends/linux/backend.py
1
7468
""" Backend for extracting information about system calls from Linux guests. """ import logging import re from ctypes import sizeof, c_void_p from libvmi import LibvmiError from nitro.syscall import Syscall from nitro.event import SyscallDirection from nitro.backends.linux.process import LinuxProcess from nitro.back...
gpl-3.0
-2,482,266,364,801,742,000
38.513228
104
0.615158
false
3.855447
false
false
false
ttreeagency/PootleTypo3Org
pootle/apps/pootle_misc/dispatch.py
1
2131
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009-2012 Zuza Software Foundation # # This file is part of Pootle. # # Pootle 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 th...
gpl-2.0
-5,951,156,004,610,860,000
28.597222
75
0.678085
false
3.545757
false
false
false
sekikn/ambari
ambari-agent/src/main/python/ambari_agent/listeners/AgentActionsListener.py
2
2270
#!/usr/bin/env python ''' 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")...
apache-2.0
-5,151,192,752,702,581,000
33.393939
94
0.753304
false
4.195933
false
false
false
corpnewt/CorpBot.py
Cogs/DL.py
1
2147
import asyncio, aiohttp, json def setup(bot): # Not a cog pass async def async_post_json(url, data = None, headers = None): async with aiohttp.ClientSession(headers=headers) as session: async with session.post(url, data=data) as response: return await response.json() async def as...
mit
-6,453,324,823,601,828,000
34.389831
75
0.588728
false
4.136802
false
false
false
fangeugene/the-blue-alliance
controllers/main_controller.py
1
13263
import datetime import logging import os import webapp2 from google.appengine.api import memcache from google.appengine.ext import ndb from google.appengine.ext.webapp import template import tba_config from base_controller import CacheableHandler from consts.event_type import EventType from helpers.event_helper impor...
mit
-4,248,073,567,319,141,400
34.087302
146
0.61238
false
3.514308
false
false
false
luwei0917/awsemmd_script
AAWSEM/getSS.py
1
1701
#!/usr/bin/env python3 import glob import os os.system("mkdir -p _data") os.chdir("_output") folder_list = glob.glob("*.jnet") # print(folder_list, len(folder_list)) # folder_list = ['T0759.jnet'] ssdata = "../_data/" for protein in folder_list: with open(protein) as input_data: protein_name = protein.spli...
mit
2,126,273,118,975,896,800
25.578125
58
0.429747
false
2.953125
false
false
false
malept/js-sphinx-inventory
sphinx_inventory/js/mdn.py
1
1705
# -*- coding: utf-8 -*- from collections import defaultdict import json import logging from ._compat import ElementTree, urlopen MDN_SITEMAP = 'https://developer.mozilla.org/sitemaps/en-US/sitemap.xml' SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9' log = logging.getLogger(__name__) def parse(): """...
apache-2.0
-7,696,636,293,475,174,000
31.788462
77
0.539589
false
3.788889
false
false
false
gitcoinco/web
app/grants/migrations/0014_matchpledge.py
1
1354
# Generated by Django 2.1.2 on 2019-02-25 03:13 from django.db import migrations, models import django.db.models.deletion import economy.models class Migration(migrations.Migration): dependencies = [ ('grants', '0013_subscription_amount_per_period_usdt'), ] operations = [ migrations.Cre...
agpl-3.0
-1,993,627,749,603,662,300
44.133333
199
0.6226
false
4.041791
false
false
false
carver/ens.py
ens/abis.py
1
22493
ENS = [ { "constant": True, "inputs": [ { "name": "node", "type": "bytes32" } ], "name": "resolver", "outputs": [ { "name": "", "type": "address" } ], "payable": False, "type": "function" }, { "constant": True, "inputs...
mit
5,709,209,485,505,465,000
15.158764
38
0.365447
false
3.423592
false
true
false
graphite-server/graphite-web
webapp/graphite/render/views.py
1
16273
"""Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
apache-2.0
521,230,743,486,547,700
36.068337
125
0.676212
false
3.9729
false
false
false
rcocetta/kano-toolset
kano/xwindow.py
1
1767
#!/usr/bin/env python # xwindow.py # # Copyright (C) 2015 Kano Computing Ltd. # License: GNU General Public License v2 http://www.gnu.org/licenses/gpl-2.0.txt # # low level Xlib utilities # # Be careful mixing calls to this with Gtk. from contextlib import contextmanager import Xlib.display from kano.logging import l...
gpl-2.0
-7,121,769,970,949,436,000
23.205479
80
0.614601
false
3.696653
false
false
false
dmccloskey/python_statistics
python_statistics/calculate_importantFeatures.py
1
5116
from .calculate_dependencies import * from .calculate_base import calculate_base class calculate_importantFeatures(calculate_base): def extract_importantFeatures(self,data_model_I=None,raise_I=False): ''' INPUT: data_model_I = classification or regression model ''' if data_m...
mit
5,074,370,880,379,480,000
38.658915
105
0.584246
false
3.707246
false
false
false
maxhutch/nek-workflow
ui.py
1
4622
""" User interfaces for the nek-workflow script Currently, there is only a command line interface """ def command_line_ui(): """ Command line interface for nek-workflow Uses python's ArgumentParser to read the command line and then creates shortcuts for common argument combinations """ # grab defaults ...
gpl-3.0
3,446,579,655,806,012,000
43.873786
98
0.577239
false
3.736459
false
false
false