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
egabancho/invenio
invenio/modules/knowledge/api.py
1
26116
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Licens...
gpl-2.0
-6,103,226,367,035,997,000
32.142132
79
0.607559
false
3.753377
false
false
false
jopohl/urh
src/urh/models/ProtocolTableModel.py
1
2539
from collections import defaultdict from PyQt5.QtCore import pyqtSignal, QModelIndex, Qt from urh import settings from urh.models.TableModel import TableModel from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer from urh.ui.actions.DeleteBitsAndPauses import DeleteBitsAndPauses class ProtocolTableMode...
gpl-3.0
7,597,071,940,439,484,000
35.797101
114
0.634108
false
3.979624
false
false
false
dsparrow27/vortex
src/ds/vortex/nodes/conversion/toArray.py
1
1063
from ds.vortex.core import baseNode from ds.vortex.core import plug as plugs class ToArray(baseNode.BaseNode): def __init__(self, name): """ :param name: str, the name of the node """ baseNode.BaseNode.__init__(self, name) def initialize(self): baseNode.BaseNode.initia...
mit
5,942,302,473,169,311,000
29.371429
85
0.638758
false
3.837545
false
false
false
SCM-NV/qmworks-namd
nanoqm/workflows/schemas.py
1
9939
"""Schemas to valid user input. Index ----- .. currentmodule:: nanoqm.workflows.schemas .. autosummary:: {autosummary} API --- {autodata} """ __all__ = [ 'schema_cp2k_general_settings', 'schema_derivative_couplings', 'schema_single_points', 'schema_distribute_absorption_spectrum', 'schema_dis...
mit
6,000,909,809,273,182,000
29.770898
105
0.683268
false
3.809506
false
false
false
dekked/dynamodb-mock
tests/functional/pyramid/test_scan.py
1
4232
# -*- coding: utf-8 -*- import unittest, json TABLE_NAME1 = 'Table-1' TABLE_RT = 45 TABLE_WT = 123 TABLE_NAME = 'Table-HR' TABLE_RT = 45 TABLE_WT = 123 TABLE_RT2 = 10 TABLE_WT2 = 10 TABLE_HK_NAME = u'hash_key' TABLE_HK_TYPE = u'N' TABLE_RK_NAME = u'range_key' TABLE_RK_TYPE = u'S' HK_VALUE1 = u'123' HK_VALUE2 = u'4...
lgpl-3.0
-856,757,890,835,981,000
27.986301
98
0.559074
false
2.982382
true
false
false
yancz1989/cancer
utilities.py
1
4491
import SimpleITK as sitk import numpy as np import csv import os import json from PIL import Image import matplotlib.pyplot as plt import SimpleITK as sitk from cv2 import imread, imwrite def load_itk_image(filename): itkimage = sitk.ReadImage(filename) numpyImage = sitk.GetArrayFromImage(itkimage) numpyOrigin =...
mit
5,996,328,860,083,202,000
25.417647
83
0.643732
false
2.988024
false
false
false
go-bears/Final-Project
weblogo-3.4_rd/corebio/secstruc/__init__.py
1
1920
""" Protein secondary structure and associated tools and data. Constants: - secstruc_alphabet -- Secondary structure alphabet: 'HGIEBbTSC _-L?X' Contains a complete set of secondary structure codes generated by both STRIDE and DSSP - secstruc_ehl_alphabet -- Standard 3 s...
mit
-110,092,327,526,944,400
32.684211
79
0.655729
false
3.194676
false
true
false
hasgeek/funnel
migrations/versions/daeb6753652a_add_profile_protected_and_verified_flags.py
1
1186
"""Add profile protected and verified flags. Revision ID: daeb6753652a Revises: 8b46a8a8ca17 Create Date: 2020-11-06 02:57:05.891627 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'daeb6753652a' down_revision = '8b46a8a8ca17' branch_labels = None depends_on = ...
agpl-3.0
-5,126,532,979,559,593,000
23.708333
80
0.607926
false
3.378917
false
false
false
xen0l/ansible
lib/ansible/cli/__init__.py
1
40009
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible 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, eithe...
gpl-3.0
-3,480,482,311,501,332,000
46.972422
160
0.573721
false
4.246338
false
false
false
3people/dropship_project
code/Dmok.py
1
5356
import os class Board: SIZE = 15 def __init__(self): self.board = [['+' for _ in range(self.SIZE)] for _ in range(self.SIZE)] self.player1 = input("player1의 이름을 입력하시오 : ") self.player2 = input("player2의 이름을 입력하시오 : ") self.startgame() def printboard(self): """Prin...
mit
-7,690,093,707,582,379,000
34.013514
109
0.412582
false
3.106715
false
false
false
eirmag/weboob
modules/ebonics/backend.py
1
2047
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob 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 License, or # (at your opt...
agpl-3.0
4,084,087,417,472,269,000
33.116667
107
0.686859
false
3.959381
false
false
false
jdereus/labman
labcontrol/gui/handlers/study.py
1
2270
# ---------------------------------------------------------------------------- # Copyright (c) 2017-, LabControl development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # -------------------------------------------------...
bsd-3-clause
-1,625,448,089,754,203,400
31.428571
78
0.586784
false
4.180479
false
false
false
eBay/cronus-agent
agent/agent/lib/security/agentauth.py
1
5600
#pylint: disable=E1121,W0105 ''' Copyright 2014 eBay Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicabl...
apache-2.0
-3,431,015,109,863,174,000
37.895833
124
0.601964
false
4.505229
true
false
false
ctjacobs/pyqso
pyqso/log.py
1
15133
#!/usr/bin/env python3 # Copyright (C) 2013-2017 Christian Thomas Jacobs. # This file is part of PyQSO. # PyQSO is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
gpl-3.0
-7,163,945,879,374,536,000
44.308383
214
0.606489
false
4.297927
false
false
false
jalr/privacyidea
privacyidea/lib/tokens/yubicotoken.py
1
7718
# -*- coding: utf-8 -*- # # privacyIDEA is a fork of LinOTP # May 08, 2014 Cornelius Kölbel # License: AGPLv3 # contact: http://www.privacyidea.org # # 2016-04-04 Cornelius Kölbel <cornelius@privacyidea.org> # Use central yubico_api_signature function # 2015-01-28 Rewrite during flask migration # ...
agpl-3.0
-2,784,637,375,835,404,300
36.818627
108
0.552301
false
3.882738
true
false
false
cachance7/BattleQuip
battlequip/util.py
1
2470
import collections import re def namedtuple_with_defaults(typename, field_names, default_values=[]): T = collections.namedtuple(typename, field_names) T.__new__.__defaults__ = (None,) * len(T._fields) if isinstance(default_values, collections.Mapping): prototype = T(**default_values) else: ...
mit
-7,643,095,019,502,245,000
33.305556
81
0.615385
false
3.736762
false
false
false
m16Takahiro/kakeibo
kakeibo/settings.py
1
3863
""" Django settings for kakeibo project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
mit
-4,153,100,942,513,246,700
25.985816
91
0.684363
false
3.297227
false
false
false
ltowarek/budget-supervisor
third_party/saltedge/swagger_client/models/removed_customer_response_data.py
1
3772
# coding: utf-8 """ Salt Edge Account Information API API Reference for services # noqa: E501 OpenAPI spec version: 5.0.0 Contact: support@saltedge.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class RemovedCustomerRe...
mit
-6,301,179,382,600,332,000
26.735294
86
0.552227
false
4.24297
false
false
false
iofun/spider
spider/system/campaigns.py
1
5125
# -*- coding: utf-8 -*- ''' Spider campaigns system logic. ''' # This file is part of spider. # Distributed under the terms of the last AGPL License. # The full license is in the file LICENCE, distributed as part of this software. __author__ = 'Team Machine' import arrow import motor import uuid import loggin...
agpl-3.0
1,334,203,877,906,721,300
24.758794
86
0.50478
false
4.472077
false
false
false
dksr/graph_utils
weisfeiler_lehman_graph_isomorphism_test.py
1
1864
from igraph import Graph def weisfeiler_lehman_graph_isomorphism_test(G1,G2): """ Performs the Weisfeiler-Lehman test of Isomorphism: Weisfeiler and Lehman: A reduction of a graph to a canonical form and an algebra arising during this reduction, Nauchno-Technicheskaya Informatsiya, Ser. 2, no. 9 (196...
mit
-2,112,818,726,911,263,500
37.854167
106
0.521459
false
3.055738
false
false
false
jnewland/ha-config
custom_components/senseme/config_flow.py
1
2995
"""Config flow for SenseME.""" import ipaddress import voluptuous as vol from aiosenseme import async_get_device_by_ip_address, discover_all from homeassistant import config_entries from homeassistant.const import CONF_HOST from .const import CONF_HOST_MANUAL, CONF_INFO, DOMAIN DISCOVER_TIMEOUT = 5 class SensemeFl...
mit
3,527,471,452,215,158,000
32.277778
81
0.582638
false
4.200561
true
false
false
ssls/beetle-agent
tests/modules/teams/resources/test_modifying_teams.py
1
4600
# encoding: utf-8 # pylint: disable=missing-docstring import json from app.modules.teams import models def test_new_team_creation(flask_app_client, db, regular_user): # pylint: disable=invalid-name team_title = "Test Team Title" with flask_app_client.login(regular_user, auth_scopes=('teams:write', )): ...
mit
1,529,536,958,977,042,000
35.220472
100
0.61587
false
3.588144
true
false
false
spiside/pdb-tutorial
solutions/dicegame/runner.py
1
1693
from .die import Die from .utils import i_just_throw_an_exception class GameRunner: def __init__(self): self.dice = Die.create_dice(5) self.reset() def reset(self): self.round = 1 self.wins = 0 self.loses = 0 @property def answer(self): ...
mit
-5,400,822,887,541,992,000
26.216667
72
0.453042
false
4.408854
false
false
false
joseandro/liToCNF
sValidator.py
1
1230
# This module validates inequations along with their solutions # Author: Joseandro Luiz def isValid(cnf, res): """ This function validates a CNF @rtype: bool """ # Turn all variables from CNF positive (we have to compare them later) andBoolClause = None for i in cnf : orBoolClaus...
gpl-3.0
-8,536,422,730,506,171,000
25.76087
74
0.481301
false
4.641509
false
false
false
manashmndl/LearningPyQt
pyqt/chap11/contactdlg.py
1
5621
#!/usr/bin/env python # Copyright (c) 2008-14 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 2 of the License, or # version 3 of the Lic...
mit
7,333,913,285,468,876,000
38.584507
74
0.654688
false
3.906185
false
false
false
tylerclair/py3canvas
py3canvas/apis/user_observees.py
1
5486
"""UserObservees API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI class UserObserveesAPI(BaseCanvasAPI): """UserObservees API Version 1.0.""" def __init__(sel...
mit
-4,811,413,284,564,236,000
36.834483
174
0.603172
false
3.640345
false
false
false
caoziyao/weibo
models/messageCopy.py
1
1245
import hashlib import os from . import ModelMixin from . import db from utils import timestamp from utils import log from utils import sh1hexdigest class MessageCopy(db.Model, ModelMixin): __tablename__ = 'messageCopys' Cid = db.Column(db.Integer, primary_key=True) # 转发编号 # Ccontent = db.Column(db.Str...
mit
-8,593,585,503,986,119,000
35.03125
110
0.651344
false
2.933842
false
false
false
google/graphicsfuzz
gfauto/gfauto/run_bin.py
1
2346
# -*- coding: utf-8 -*- # Copyright 2019 The GraphicsFuzz Project Authors # # 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 requi...
apache-2.0
3,527,463,983,964,285,000
29.868421
83
0.684996
false
3.884106
false
false
false
masayuko/nikola
nikola/post.py
1
47243
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
mit
5,035,294,736,049,951,000
38.76431
159
0.582409
false
4.003729
true
false
false
GETLIMS/LIMS-Backend
lims/inventory/migrations/0001_initial.py
1
6145
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import mptt.fields import gm2m.fields class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('con...
mit
7,413,653,602,382,370,000
46.269231
142
0.559642
false
4.398712
false
false
false
MKaptein/streamingbandit
app/handlers/adminhandlers.py
1
19180
# -* coding: utf-8 -*- import tornado.escape import tornado.ioloop import tornado.web import json import random import os from handlers.basehandler import BaseHandler, ExceptionHandler from core.experiment import Experiment from db.database import Database from db.mongolog import MongoLog from db.users import Users ...
mit
3,692,329,213,822,720,500
49.209424
151
0.4756
false
4.863083
false
false
false
madhav-datt/spell-check
pdf_text/pdf2txt.py
1
4620
# # pdf2txt.py from the FOSS python PDFMiner package # http://euske.github.io/pdfminer/index.html#pdf2txt # Extract text from PDF to text files # # Has to be run separately with python2.X (not compatible with python3.X) # import sys from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfparser import PDFParser ...
gpl-2.0
2,343,243,574,910,225,400
30.643836
87
0.540693
false
3.77451
false
false
false
cedadev/ndg_security_common
setup.py
1
2632
#!/usr/bin/env python """Distribution Utilities setup program for NDG Security Package NERC Data Grid Project """ __author__ = "P J Kershaw" __date__ = "24/04/06" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Ke...
bsd-3-clause
2,917,347,022,940,199,400
34.093333
79
0.628799
false
3.518717
false
false
false
ByteInternet/libcloud
libcloud/compute/drivers/openstack.py
1
143549
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
-4,344,738,230,865,552,400
34.097555
120
0.538004
false
4.261132
false
false
false
drtuxwang/system-config
bin/tocapital.py
1
2244
#!/usr/bin/env python3 """ Print arguments with first letter in upper case (camel case). """ import argparse import glob import os import signal import sys from typing import List class Options: """ Options class """ def __init__(self) -> None: self._args: argparse.Namespace = None s...
gpl-2.0
-7,888,770,518,914,146,000
21.44
79
0.499554
false
4.171004
false
false
false
staugur/SwarmOps
src/config.py
1
3033
# -*- coding: utf-8 -*- """ SwarmOps.config ~~~~~~~~~~~~~~ The program configuration file, the preferred configuration item, reads the system environment variable first. :copyright: (c) 2018 by staugur. :license: MIT, see LICENSE for more details. """ from os import getenv GLOBAL = { "Proce...
bsd-3-clause
-8,325,207,699,234,633,000
25.178947
114
0.673904
false
2.170157
false
false
false
richardingham/octopus
octopus/notifier/sms.py
1
1629
# Twisted Imports from twisted.internet import reactor, protocol, defer from twisted.web.client import Agent from twisted.web.http_headers import Headers from twisted.internet.ssl import ClientContextFactory from twisted.python import log # System Imports try: from urllib.parse import urlencode except ImportError: f...
mit
-5,075,994,737,181,868,000
21.943662
82
0.711479
false
3.331288
false
false
false
OpenClovis/SAFplus-Availability-Scalability-Platform
doc/doclayout/jsclassindexpage.py
1
1381
"""<module> This module generates an html page that lists all classes """ import pdb from PyHtmlGen.gen import * from PyHtmlGen.document import * from PyHtmlGen.htmldoc import * from PyHtmlGen.bar import * # from layoutstyle import * from PyHtmlGen.layouttable import * from PyHtmlGen.table import * from PyHtmlGen.imag...
gpl-2.0
4,678,383,709,413,481,000
26.078431
128
0.737871
false
3.219114
false
false
false
jj4jj/sdv
ws_server.py
1
2339
#-*-coding:utf8-*- from threading import Thread import tornado.ioloop import tornado.web import tornado.websocket import json import log import config try: # py2 from urllib.parse import urlparse except ImportError: # py3 from urlparse import urlparse class WebSocketMsgHandler(): def __init__(sel...
mit
4,949,130,193,569,616,000
24.703297
99
0.568619
false
3.924497
false
false
false
dzolnierz/mysql-utilities
mysql/utilities/__init__.py
1
2324
# # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in th...
gpl-2.0
2,112,526,006,098,551,300
31.277778
78
0.667384
false
3.42268
false
false
false
syagev/kaggle_dsb
luna16/src/deep/unet/unet.py
1
7592
import theano import theano.tensor as T import lasagne from lasagne.layers import InputLayer, Conv2DLayer, MaxPool2DLayer, batch_norm, DropoutLayer, GaussianNoiseLayer from lasagne.init import HeNormal from lasagne import nonlinearities from lasagne.layers import ConcatLayer, Upscale2DLayer from lasagne.regularization ...
apache-2.0
8,048,763,956,391,622,000
40.037838
126
0.597208
false
3.521336
false
false
false
kbsezginel/tee_mof
thermof/initialize/job.py
1
2422
# Date: September 2017 # Author: Kutay B. Sezginel """ Initializing job submission files for computing cluster """ import os from thermof.sample import slurm_file, slurm_scratch_file, pbs_file from . import read_lines, write_lines def job_submission_file(simdir, parameters, verbose=True): """ Generate job submiss...
mit
3,736,780,771,206,809,600
45.576923
110
0.618084
false
2.813008
false
false
false
mcroydon/django-tumbleweed
tumbleweed/views.py
1
11972
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.core.paginator import Paginator from django.http import Http404, HttpResponseServerError from haystack.query import SearchQuerySet from django.conf import settings import datetime, time RESULTS_PER_PAGE = get...
bsd-3-clause
96,717,738,742,192,700
39.040134
139
0.635483
false
4.171429
false
false
false
Southpaw-TACTIC/TACTIC
src/pyasm/prod/web/prod_wdg.py
1
7380
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-2,703,030,322,963,593,000
34.652174
93
0.595799
false
3.806086
false
false
false
k0001/mediasancion
extras/importers/mscrap_import.py
1
18027
# coding: utf8 # MediaSanción, aplicación web para acceder a los datos públicos de la # actividad legislativa en Argentina. # Copyright (C) 2010,2011,2012 Renzo Carbonara <renzo @carbonara .com .ar> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General ...
agpl-3.0
3,245,439,087,975,844,000
35.265594
104
0.563249
false
3.455521
false
false
false
flisboac/uksat
wafbuild.py
1
3974
#!/usr/bin/env python #from waflib.Configure import conf #from waflib.TaskGen import feature def options(ctx): ctx.add_option('-B', '--build', action='store', default="release", help='Specifies which build to run.') ctx.add_option('--list-builds', action='store_true', help='Lists all available builds and the...
mit
3,694,323,395,176,270,000
23.231707
82
0.694766
false
3.059276
false
false
false
joshuamorton/calc_three_proj
plot.py
1
1969
from matplotlib import pyplot as plt import numpy as np import iterative import pascal import power plt.style.use('ggplot') qr = [] lu = [] for i in range(2, 13): q = pascal.solve_qr_b(pascal.pascal_matrix(i), pascal.harmonic_vector(i)) l = pascal.solve_lu_b(pascal.pascal_matrix(i), pascal.harmonic_vector(i)) ...
mit
-2,766,495,094,339,962,000
25.621622
90
0.648045
false
2.311033
false
false
false
fonttools/skia-pathops
ci/download_libskia.py
1
2713
import argparse import glob import logging import platform import os import shutil import struct import tempfile __requires__ = ["github_release"] import github_release GITHUB_REPO = "fonttools/skia-builder" ASSET_TEMPLATE = "libskia-{plat}-{arch}.zip" DOWNLOAD_DIR = os.path.join("build", "download") CPU_ARCH = "x6...
bsd-3-clause
2,709,180,981,875,565,000
27.260417
87
0.596756
false
3.646505
false
false
false
biothings/biothings_explorer
biothings_explorer/smartapi_kg/__init__.py
1
1114
import sys from .dataload import load_specs from .smartapi_parser import SmartAPIParser from .filter import filterOps import traceback class MetaKG: def __init__(self): self.ops = [] self.parser = SmartAPIParser() def populateOpsFromSpecs(self, specs, verbose=False): """Populate meta...
apache-2.0
8,065,000,017,719,369,000
31.764706
87
0.590664
false
4.420635
false
false
false
dbcli/vcli
vcli/packages/sqlcompletion.py
1
13865
from __future__ import print_function import sys import sqlparse from sqlparse.sql import Comparison, Identifier, Where from .parseutils import last_word, extract_tables, find_prev_keyword from .vspecial import parse_special_command PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 if PY3: string_type...
bsd-3-clause
-1,566,311,390,984,765,200
41.015152
82
0.560765
false
4.185029
false
false
false
mgh14/470ai
bzagents/Agent.py
1
7556
import telnetlib import sys import time import random import math import GnuplotUtil from tankUtil import * class Agent(object): # constants SERVER_DELIMITER = "\n" LIST_START = "start" + SERVER_DELIMITER LIST_END = "end" + SERVER_DELIMITER SERVER_CONNECT_ACKNOWLEDGED = "bzrobots 1" + SERVER_DELIMITER NOT_SET ...
gpl-3.0
-7,796,457,630,180,964,000
27.730038
110
0.69468
false
2.861037
false
false
false
ssindow/ZMeter
MeterGUI.py
1
29977
# -*- coding: utf-8 -*- """ GUI Code """ import LinkGPIB import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore from pyqtgraph.widgets.RemoteGraphicsView import RemoteGraphicsView import numpy as np from time import sleep, strftime ## Constants versionTxt = 'CellShot V2.6.3' observerModel = 2602 #2461 sourceMo...
mit
-8,308,357,177,591,892,000
42.695335
122
0.598766
false
3.717599
false
false
false
edx-solutions/api-integration
edx_solutions_api_integration/management/commands/convert_ooyala_to_bcove.py
1
3014
import datetime import logging from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from edx_solutions_api_integration.tasks import convert_ooyala_to_bcove from openedx.core.djangoapps.content.cours...
agpl-3.0
-6,302,106,137,230,728,000
35.756098
112
0.584605
false
4.197772
false
false
false
kamyu104/GoogleCodeJam-2014
World Finals/aram.py
1
1450
# Copyright (c) 2015 kamyu. All rights reserved. # # Google Code Jam 2014 World Finals - Problem F. ARAM # https://code.google.com/codejam/contest/7214486/dashboard#s=p5 # # Time: O(60 * N * R * G) # Space: O(1) # # Can you win at least X fraction of the time? def CanWin(X): A = [] last_G_values = 0 # C ...
mit
4,796,693,524,528,156,000
26.377358
64
0.522759
false
2.799228
false
false
false
Intel-Corporation/tensorflow
tensorflow/python/framework/func_graph.py
1
42379
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-8,036,142,726,043,407,000
41.763875
97
0.676845
false
4.197603
false
false
false
mrcrgl/django_distributed_task
distributed_task/broker/backends/db.py
1
1101
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..interface import BrokerInterface from distributed_task import settings from distributed_task.core.serializer import serialize, deserialize from distributed_task.models import Message import time class DatabaseMessageBroker(BrokerInterface): ...
mit
4,212,467,058,290,029,600
26.55
87
0.64396
false
4.317647
false
false
false
gazpachoking/deluge-old
deluge/ui/gtkui/createtorrentdialog.py
1
18151
# # createtorrentdialog.py # # Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either version 3 of the License, or (at your option) # any...
gpl-3.0
-3,731,345,788,369,979,000
37.455508
111
0.590381
false
3.8959
true
false
false
partofthething/laserComm
laserComm/receiver.py
1
2975
''' receiver runs the ADC and photoresistor to receive an input signal. USes MCP3008 ADC via the hardware SPI interface. Connections are: MCP3008 VDD -> 3.3V (red) MCP3008 VREF -> 3.3V (red) MCP3008 AGND -> GND (orange) MCP3008 CLK -> SCLK (yellow) MCP3008 DOUT -> MISO (green) MCP3008 DIN -> ...
mit
-8,309,013,175,638,978,000
23.791667
88
0.572437
false
3.331467
false
false
false
mikeh77/mi-instrument
mi/core/instrument/instrument_driver.py
1
46251
#!/usr/bin/env python """ @package ion.services.mi.instrument_driver Instrument driver structures @file ion/services/mi/instrument_driver.py @author Edward Hunter @brief Instrument driver classes that provide structure towards interaction with individual instruments in the system. """ __author__ = 'Steve Foley' __lic...
bsd-2-clause
7,355,743,505,821,260,000
41.122951
144
0.632224
false
4.7471
true
false
false
fvbock/gDBPool
gdbpool/connection_pool.py
1
6127
# -*- coding: utf-8 -*- # Copyright 2011-2012 Florian von Bock (f at vonbock dot info) # # gDBPool - db connection pooling for gevent __author__ = "Florian von Bock" __email__ = "f at vonbock dot info" __version__ = "0.1.3" import gevent from gevent import monkey; monkey.patch_all() import psycopg2 import sys, tra...
mit
-6,869,467,594,450,040,000
40.120805
273
0.610903
false
4.087392
false
false
false
nachowski/csv2sqlite
csv2sqlite.py
1
3373
# Converts a CSV file (typically exported from individual .xls sheets) to a sqlite db as a new table # # - The CSV filename (without .csv extension) is used as the table name. # - The columns from the first row are used as column names in the table. # - You can store multiple tables (from multiple csv files) in the sam...
mit
-521,818,109,497,795,300
37.781609
124
0.636525
false
3.963572
false
false
false
razziel89/ManipulateAggregates
ManipulateAggregates/collection/gnuplot/__init__.py
1
33249
"""Class definition to control Gnuplot from Python. """ # This file is part of ManipulateAggregates. # # Copyright (C) 2016 by Torsten Sachse # # ManipulateAggregates 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 Found...
gpl-3.0
6,274,585,563,111,448,000
36.48478
124
0.512045
false
4.428476
false
false
false
relekang/python-semantic-release
semantic_release/settings.py
1
4061
"""Helpers to read settings from setup.cfg or pyproject.toml """ import configparser import importlib import logging import os from collections import UserDict from functools import wraps from os import getcwd from typing import Callable, List import tomlkit from tomlkit.exceptions import TOMLKitError from .errors im...
mit
-702,771,670,662,746,500
28.860294
90
0.628417
false
4.097881
true
false
false
Azure/WALinuxAgent
tests/protocol/mocks.py
1
9717
# Copyright 2020 Microsoft 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 required by applicable law or agreed to in...
apache-2.0
-2,802,583,881,621,370,000
43.573394
144
0.678605
false
3.966122
false
false
false
Hanaasagi/sorator
orator/query/grammars/postgres_grammar.py
1
4336
# -*- coding: utf-8 -*- from .grammar import QueryGrammar class PostgresQueryGrammar(QueryGrammar): _operators = [ '=', '<', '>', '<=', '>=', '<>', '!=', 'like', 'not like', 'between', 'ilike', '&', '|', '#', '<<', '>>' ] marker = '%s' def _compile_lock(self, query, value):...
mit
5,993,220,880,501,831,000
23.777143
79
0.545895
false
4.271921
false
false
false
jianghuaw/nova
nova/tests/unit/api/openstack/compute/test_block_device_mapping.py
1
17244
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-440,329,227,146,488,260
39.478873
79
0.587799
false
3.903124
true
false
false
spadae22/odoo
addons/stock_account/wizard/stock_invoice_onshipping.py
1
6916
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-8,529,741,307,361,504,000
45.106667
143
0.590081
false
3.754615
false
false
false
Ecogenomics/GTDBNCBI
scripts_dev/lpsn_scrape/lpsn_to_database.py
1
4370
#!/usr/bin/env python ############################################################################### # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License...
gpl-3.0
6,039,277,418,561,814,000
41.019231
135
0.545538
false
3.770492
false
false
false
openvenues/libpostal
scripts/geodata/osm/definitions.py
1
2511
import os import re import six from collections import defaultdict from geodata.graph.topsort import topsort this_dir = os.path.realpath(os.path.dirname(__file__)) DEFAULT_SCRIPT_PATH = os.path.join(this_dir, 'fetch_osm_address_data.sh') valid_key_regex = re.compile('VALID_(.*?)_KEYS="(.*)"') variable_regex = re.c...
mit
-6,333,495,864,088,283,000
27.213483
86
0.571485
false
3.70901
false
false
false
allanlei/django-saas
saas/multidb/models.py
1
4469
from django.db import models from django.conf import settings from django.utils import simplejson as json from django.db import connections from django.core.exceptions import ValidationError from django.db.utils import ConnectionDoesNotExist import managers from signals import db_pre_load, db_post_load, db_pre_unload,...
bsd-3-clause
302,155,965,839,929,400
34.188976
129
0.653166
false
3.906469
false
false
false
opencorato/sayit
speeches/south_migrations/0054__rename_popolospeaker.py
1
19144
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.rename_table('speeches_popolospeaker', 'speeches_speaker') db.alter_column('speeches_recordingtimestamp',...
agpl-3.0
8,611,772,012,662,599,000
84.464286
195
0.558765
false
3.613439
false
false
false
hcs/mailman
src/mailman/core/switchboard.py
1
11246
# Copyright (C) 2001-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
-6,313,387,617,212,159,000
40.043796
78
0.599057
false
4.234187
true
false
false
all-of-us/raw-data-repository
rdr_service/services/google_sheets_client.py
1
13026
import backoff from googleapiclient import discovery from googleapiclient.errors import HttpError from oauth2client.service_account import ServiceAccountCredentials import socket from rdr_service.services.gcp_utils import gcp_get_iam_service_key_info class GoogleSheetsClient: """ Allows for interacting with ...
bsd-3-clause
-8,798,723,942,164,269,000
45.355872
120
0.63189
false
4.120848
false
false
false
w0rp/w0rpzone
blog/urls.py
1
2639
from django.conf.urls import re_path from django.contrib.auth.decorators import login_required from w0rplib.url import redir from .feed import LatestArticleFeed from .views import ( ArticleBanCommenterView, ArticleDeleteCommentView, ArticleDetailView, ArticleEditPageView, ArticleMonthArchiveView, ...
bsd-2-clause
-3,337,851,615,868,272,000
26.489583
72
0.558924
false
3.418394
false
false
false
hbenarab/mt-iebkg
run_on_ollie_dataset.py
1
8580
__author__ = 'heni' import datetime import math import numpy import pickle from utils.tools import get_accuracy from ollie_comparison.utils.training_tools import create_word2ind,create_network,get_labeled_data from utils.tools import shuffle def run_on_ollie_dataset(iob_ollie_dataset_path,use_cross_validation): ...
mit
-4,446,617,290,510,862,000
44.163158
134
0.583217
false
3.864865
true
false
false
righetz/pyurl
pyurl.py
1
4354
#!/usr/bin/python3 """Simple CUrl porting for Python3 """ import urllib.request, re import sys import argparse from urllib.parse import urlencode import gettext import locale def main(): """"main method""" language_set() parser = argparse.ArgumentParser() #setting possible arguments parser.add_argumen...
gpl-2.0
-7,379,587,351,273,032,000
32.492308
95
0.602205
false
3.705532
false
false
false
mstone/vscan
cpplint.py
1
123523
#!/usr/bin/python2.4 # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
bsd-3-clause
-166,617,796,872,889,120
38.502079
86
0.64915
false
3.735763
false
false
false
idaholab/raven
plugins/ExamplePlugin/src/SumOfExponential.py
1
5349
""" Author: A. Alfonsi Date : 11/17/2017 """ import numpy as np import math from PluginBaseClasses.ExternalModelPluginBase import ExternalModelPluginBase class SumOfExponential(ExternalModelPluginBase): # Example External Model plugin class ################################# #### RAVEN API methods BEGIN ...
apache-2.0
-1,037,211,517,340,434,800
49.462264
158
0.689849
false
4.120955
false
false
false
jtrain/django-cloud-media
cloud_media/forms.py
1
7970
""" A collection of forms for adding a new resource in the admin. """ from django import forms from django.conf import settings from django.contrib.admin.helpers import AdminForm from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from django.utils.importlib ...
bsd-3-clause
5,641,450,394,097,979,000
33.353448
80
0.572146
false
4.62029
false
false
false
twitter/pants
src/python/pants/task/task.py
1
28963
# 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, print_function, unicode_literals import os import sys from abc import abstractmethod from builtins import filter, map, obj...
apache-2.0
8,560,133,421,249,656,000
38.621067
100
0.686497
false
4.163744
false
false
false
coderbone/SickRage-alt
setup.py
1
2381
# -*- coding: utf-8 -* """ Use setup tools to install sickchill """ import os from setuptools import find_packages, setup from requirements.sort import file_to_dict try: from babel.messages import frontend as babel except ImportError: babel = None ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__...
gpl-3.0
890,928,035,765,774,600
24.329787
70
0.582948
false
3.580451
false
false
false
alphagov/notifications-api
tests/app/v2/notifications/test_post_notifications.py
1
48523
import uuid from unittest import mock from unittest.mock import call import pytest from boto.exception import SQSError from flask import current_app, json from app.dao import templates_dao from app.dao.service_sms_sender_dao import dao_update_service_sms_sender from app.models import ( EMAIL_TYPE, INTERNATION...
mit
2,010,469,411,737,156,000
40.224299
120
0.655139
false
3.707006
true
false
false
CnPaMeng/WeiboMsgBackupGUI
sina/loginsinacom.py
1
22729
#!/usr/bin/python #-*- encoding: utf-8 -*- # This file is part of the Pameng, # Pameng website: http://www.cnpameng.com/, # Sina weibo: http://weibo.com/cnpameng. # This file is part of WeiboMsgBackup. # Copyright (C) 2013 Pameng. # Pameng <pameng.cn@gmail.com>, 2013. # WeiboMsgBackup is free software; you can red...
gpl-2.0
-5,311,268,990,533,459,000
39.214669
186
0.492904
false
3.766588
false
false
false
FrodeSolheim/fs-uae-launcher
system/tools/filescanner.py
1
9278
from typing import Optional import fsui from fsgamesys.amiga.amiga import Amiga from fsgamesys.context import fsgs from fsgamesys.product import Product from fswidgets.panel import Panel from fswidgets.widget import Widget from launcher.i18n import gettext from launcher.launcher_signal import LauncherSignal from launc...
gpl-2.0
-2,840,898,757,939,423,000
32.135714
78
0.598513
false
3.74566
false
false
false
freenas/py-bsd
bsd/pty.py
1
5200
"""Pseudo terminal utilities. (Slightly modified to work on FreeBSD)""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. # Author: Steen Lumholt -- with additions ...
bsd-3-clause
6,431,780,181,907,985,000
27.571429
76
0.57
false
3.586207
false
false
false
arrti/proxypooler
tests/test_db.py
1
1559
import pytest from proxypooler.errors import ProxyPoolerEmptyError def test_db(conn): conn.put('127.0.0.1:80', 15) conn.put('127.0.0.1:81', 14) conn.put('127.0.0.1:82', 210) conn.put('127.0.0.1:83', 2) conn.put('127.0.0.1:84', 100) assert conn.size == 5 ip = conn.get()[0].decode('utf-8') ...
apache-2.0
-7,760,928,809,844,205,000
27.87037
87
0.546504
false
2.435938
false
false
false
xsleonard/wsgisubdomain
wsgisubdomain.py
1
2974
import socket from threading import Lock from __about__ import __version__, __title__, __description__ __all__ = ['__version__', '__title__', '__description__', 'SubdomainDispatcher'] class SubdomainDispatcher(object): """ A WSGI application that gets or creates other WSGI applications based on t...
mit
1,412,791,263,099,934,500
34.404762
76
0.62273
false
4.589506
false
false
false
olysonek/tuned
tests/unit/hardware/test_device_matcher_udev.py
1
1221
import unittest2 import pyudev from tuned.hardware.device_matcher_udev import DeviceMatcherUdev class DeviceMatcherUdevTestCase(unittest2.TestCase): @classmethod def setUpClass(cls): cls.udev_context = pyudev.Context() cls.matcher = DeviceMatcherUdev() def test_simple_search(self): try: device = pyudev.D...
gpl-2.0
-4,724,523,557,095,025,000
32.916667
64
0.736282
false
2.907143
true
false
false
TheDSCPL/SSRE_2017-2018_group8
Projeto/Python/cryptopy/crypto/cipher/arc4.py
1
2710
# -*- coding: utf-8 -*- """ crypto.cipher.arc4 A Stream Cipher Encryption Algorithm 'Arcfour' A few lines of code/ideas borrowed from [PING] [PING] CipherSaber implementation by Ka-Ping Yee <ping@lfw.org>, 5 May 2000. Some documentation text and test vectors taken from [IDARC4] [IDARC...
mit
-4,618,640,495,810,670,000
34.657895
91
0.586716
false
3.697135
false
false
false
lochiiconnectivity/exabgp
lib/exabgp/application/cli.py
1
4426
#!/usr/bin/env python # encoding: utf-8 """ cli.py Created by Thomas Mangin on 2014-12-22. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import sys from exabgp.dep.cmd2 import cmd from exabgp.version import version class Completed (cmd.Cmd): # use_rawinput = False # prompt = '' # doc_header =...
bsd-3-clause
2,480,145,758,677,052,400
17.596639
113
0.604383
false
2.874026
false
false
false
taiwenko/python
acs/acs_cold_start.py
1
7587
#!/usr/bin/env python from time import sleep import twk_utils import math import sys import xpf6020 import tools.utils as tools import watlowf4 from tools import shell from blessings import Terminal t = Terminal() franz_num = raw_input('How many Franz are you testing? [1,2,3,or 4]: ').strip() cycle_num = raw_input('...
mit
3,195,352,635,429,763,000
26.791209
113
0.652827
false
2.580612
true
false
false
SmileyJames/shopify_python_api
setup.py
1
1764
from setuptools import setup NAME='ShopifyAPI' exec(open('shopify/version.py').read()) DESCRIPTION='Shopify API for Python' LONG_DESCRIPTION="""\ The ShopifyAPI library allows python developers to programmatically access the admin section of stores using an ActiveResource like interface similar the ruby Shopify API ge...
mit
-7,996,432,185,524,814,000
38.2
82
0.594671
false
4.59375
false
false
false
MDAnalysis/pyQuteMol
python/OctaMap.py
1
5260
import numpy def Area(a, b, c): v = numpy.cross(b-a,c-a) return numpy.sqrt(numpy.dot(v,v))*0.5 class OctaMapSamp: def __init__(self): self.size = 0 self.dir = None self.dirrot = None self.weight = None def nsamp(self): return len(self.dir) def DuplicateT...
gpl-2.0
-3,011,985,873,142,060,000
28.886364
87
0.384221
false
2.748171
false
false
false
3ev0/android-whitelist
blackswan/core/modularity.py
1
1286
__author__ = 'ivo' import logging import argparse from blackswan import config _log = logging.getLogger(__name__) class ModuleBase(): argparser = None def __init__(self): self.config = {} @classmethod def register(cls): cls.argparser = argparse.ArgumentParser(description=cls.descri...
apache-2.0
-8,348,951,146,452,041,000
26.956522
136
0.624417
false
3.716763
true
false
false
rbuffat/pyidf
tests/test_surfacecontaminantsourceandsinkgenericboundarylayerdiffusion.py
1
2309
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.internal_gains import SurfaceContaminantSourceAndSinkGenericBoundaryLayerDiffusion log = logging.getLogger(__name__) class TestSurfaceContaminantSourceAndSinkGenericBoundaryLaye...
apache-2.0
6,754,138,350,835,265,000
41.777778
208
0.737982
false
3.816529
false
false
false
drammock/pyeparse
pyeparse/utils.py
1
3374
# Authors: Denis Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) import numpy as np from os import path as op import glob import tempfile from shutil import rmtree import atexit def create_chunks(sequence, size): """Generate chunks from a sequence Note. copied from MNE-Python Parameters...
bsd-3-clause
-3,761,224,465,408,458,000
24.560606
79
0.603734
false
3.536688
true
false
false
gzorin/RSXGL
extsrc/mesa/src/mapi/glapi/gen/gl_XML.py
1
25960
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # ...
bsd-2-clause
8,469,495,609,065,517,000
24.985986
210
0.667874
false
3.147048
false
false
false
wesleywerner/conspire
src/const.py
1
7542
STATE_MENU = 1 STATE_BUILD = 2 STATE_UFO = 3 STATE_FLIGHT = 4 STATE_RESULTS = 5 STATE_END = 100 # parts available for use per level number. LEVEL_PARTS = { 1: ('tax returns', 'shopping list', 'todo list', 'ludum dare comments', 'bank accounts', 'website passwords', 'IP address scamlist', ),...
gpl-3.0
5,350,094,556,457,263,000
34.408451
82
0.609122
false
3.386619
false
false
false
vIiRuS/Lagerregal
devices/migrations/0002_auto_20151105_0513.py
1
5237
from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('users', '0006_auto_20151105_0513'), ('devices', '0001_initial'), ('devicetypes', '0001_initial'), migrations.swappab...
bsd-3-clause
7,381,653,905,418,718,000
41.577236
160
0.596525
false
4.209807
false
false
false
akshaybabloo/Car-ND
Project_5/laneline.py
1
21371
import cv2 import glob import pickle import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from sklearn.metrics import mean_squared_error x_cor = 9 #Number of corners to find y_cor = 6 # Prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((y_cor*x_cor,3), np...
mit
4,058,978,250,439,783,000
36.42732
156
0.575406
false
2.704847
false
false
false