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
zsiciarz/django-briefcase
briefcase/migrations/0002_auto__chg_field_document_file.py
1
5068
# encoding: 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): # Changing field 'Document.file' db.alter_column('briefcase_document', 'file', self.gf('django.db.models.f...
mit
4,813,694,187,323,698,000
65.684211
182
0.557616
false
3.69927
false
false
false
jason-neal/companion_simulations
tests/utilities/test_simulation_utils.py
1
2347
import numpy as np import pytest from spectrum_overload import Spectrum from mingle.utilities.simulation_utilities import (check_inputs, max_delta, spec_max_delta) c = 299792.458 @pytest.mark.parametrize("xaxis, rv, gamma", [ ([1, 2, 3, 4, 5], 3, 5), ([1.1,...
mit
349,818,910,205,054,500
26.611765
82
0.587985
false
2.827711
true
false
false
ctk3b/InterMol
intermol/forces/improper_harmonic_dihedral_type.py
1
1544
import simtk.unit as units from intermol.decorators import accepts_compatible_units from intermol.forces.abstract_dihedral_type import AbstractDihedralType class ImproperHarmonicDihedralType(AbstractDihedralType): __slots__ = ['xi', 'k', 'improper'] @accepts_compatible_units(None, None, None, None, ...
mit
6,281,790,483,259,286,000
39.657895
127
0.600389
false
3.533181
false
false
false
ndparker/rjsmin
tasks/clean.py
1
1478
# -*- encoding: ascii -*- """ Cleanup tasks ~~~~~~~~~~~~~ """ import invoke as _invoke @_invoke.task() def py(ctx): """ Wipe *.py[co] files """ for name in ctx.shell.files('.', '*.py[co]'): ctx.shell.rm(name) for name in ctx.shell.dirs('.', '__pycache__'): ctx.shell.rm_rf(name) @_invok...
apache-2.0
-2,030,500,452,548,452,400
20.42029
68
0.523004
false
3.206074
false
false
false
google/it-cert-automation
Course2/snippets/C2M3.py
1
8908
#!/usr/bin/env python3 # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-5,175,144,962,532,922,000
30.038328
98
0.584306
false
2.588782
false
false
false
wangzheng0822/algo
python/31_bfs_dfs/bfs_dfs.py
1
2500
""" Breadth-first search and depth-first search. Author: Wenru Dong """ from typing import List, Optional, Generator, IO from collections import deque class Graph: """Undirected graph.""" def __init__(self, num_vertices: int): self._num_vertices = num_vertices self._adjacency = [[] fo...
apache-2.0
5,939,056,272,822,307,000
27.409091
102
0.5048
false
3.531073
false
false
false
MPIBGC-TEE/CompartmentalSystems
tests/Test_pwc_model_run_14C.py
1
5264
import unittest import numpy as np from sympy import Function, Matrix, symbols from CompartmentalSystems.smooth_reservoir_model import SmoothReservoirModel from CompartmentalSystems.smooth_model_run import SmoothModelRun from CompartmentalSystems.pwc_model_run import PWCModelRun from CompartmentalSystems.smooth_model...
mit
-2,940,710,178,508,901,000
29.427746
79
0.494111
false
3.348601
true
false
false
kurik/uPython-DHT22
DHT22.py
1
3132
import pyb from pyb import Pin from pyb import ExtInt # We need to use global properties here as any allocation of a memory (aka declaration of a variable) # during the read cycle causes non-acceptable delay and we are loosing data than nc = None gnd = None vcc = None data = None timer = None micros = None FALL_EDGES...
mit
4,539,732,337,879,561,000
26.716814
101
0.611111
false
3.186165
false
false
false
pepetreshere/odoo
addons/account/tests/common.py
1
31193
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields from odoo.tests.common import SavepointCase, HttpSavepointCase, tagged, Form import time import base64 from lxml import etree @tagged('post_install', '-at_install') class AccountTestInvoicingComm...
agpl-3.0
-5,320,034,106,050,978,000
43.622318
189
0.523292
false
3.949728
true
false
false
lipschultz/gnumeric-py
gnumeric/expression.py
1
5340
""" Gnumeric-py: Reading and writing gnumeric files with python Copyright (C) 2017 Michael Lipschultz 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 opti...
gpl-3.0
175,873,206,152,406,270
39.763359
133
0.650375
false
4.241461
false
false
false
tedye/leetcode
tools/leetcode.085.Maximal Rectangle/leetcode.085.Maximal Rectangle.submission11.py
1
1212
class Solution: # @param matrix, a list of lists of 1 length string # @return an integer def maximalRectangle(self, matrix): if not matrix: return 0 res = 0 line = [0] * len(matrix[0]) for i in matrix: for j in range(len(matrix[0])): if i[j] == '0'...
mit
-4,798,966,097,510,817,000
30.921053
77
0.453795
false
3.523256
false
false
false
sassoftware/rbuild
rbuild_test/unit_test/pluginstest/imagestest.py
1
30355
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
6,391,575,988,577,512,000
35.883354
228
0.597035
false
3.870824
true
false
false
polltooh/FineGrainedAction
data/crawler.py
1
2670
#! /usr/bin/env python import urllib2 import os import json from bing_search_api import BingSearchAPI import string import sys def read_bing_key(): with open('bing_key.txt', 'r') as f: bing_key = f.read() bing_key = bing_key.replace('\n','') return bing_key def get_format(format): ...
mit
-8,592,267,490,842,399,000
30.168675
129
0.549438
false
3.31677
false
false
false
agarciamontoro/TFG
Software/RK4/eqparser.py
1
2387
import re class EquationSystem(): def __init__(self,equations): self.raw_equations = equations self.left_hand_sides = [] self.right_hand_sides = [] self.independent_variable = None self.derivarives = [] self.left_form1 = re.compile(r"^\s*(.)\'\s*$") self....
gpl-2.0
2,274,514,264,007,813,600
33.1
114
0.558023
false
3.951987
false
false
false
afrolov1/nova
nova/virt/vmwareapi/ds_util.py
1
5598
# Copyright (c) 2014 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-6,792,156,168,277,028,000
37.342466
78
0.629332
false
4.16828
false
false
false
k33k00/tesseract_infinity
t_infinity.superold/logistics_create.py
1
18966
# -*- coding: utf-8 -*- import os import time from datetime import datetime import click import pythoncom from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.alert import Alert from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.w...
mit
-3,056,260,277,002,699,300
47.01519
162
0.654856
false
3.438361
false
false
false
akrherz/pyWWA
parsers/pywwa/cmdline.py
1
1790
"""Our standardized pyWWA command line.""" # stdlib import argparse from datetime import datetime, timezone def parse_cmdline(argv): """Parse command line for context settings.""" parser = argparse.ArgumentParser(description="pyWWA Parser.") parser.add_argument( "-c", "--custom-args", ...
mit
-8,456,757,229,882,486,000
25.323529
75
0.543017
false
4.162791
false
false
false
CN-UPB/OpenBarista
components/decaf-specification/test/validator_test.py
1
2352
import unittest import os import logging import traceback from jsonschema import validate as json_validate, ValidationError as json_validateError from decaf_specification import Specification class DescriptorValidatorTest(unittest.TestCase): def setUp(self): self.logger = logging.getLogger(__name__) ...
mpl-2.0
-8,218,582,717,480,867,000
28.772152
87
0.522959
false
5.180617
true
false
false
mattvonrocketstein/smash
smashlib/ipy3x/utils/wildcard.py
1
4628
# -*- coding: utf-8 -*- """Support for wildcard pattern matching in object inspection. Authors ------- - Jörgen Stenarson <jorgen.stenarson@bostream.nu> - Thomas Kluyver """ #***************************************************************************** # Copyright (C) 2005 Jörgen Stenarson <jorgen.stenarson@bos...
mit
-6,171,735,956,378,141,000
38.20339
87
0.607652
false
3.910397
false
false
false
hfp/libxsmm
samples/deeplearning/sparse_training/fairseq/fairseq/hub_utils.py
1
10042
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import copy import logging import os from typing import List, Dict, Iterator, Tuple, Any import tor...
bsd-3-clause
-6,086,778,830,432,588,000
36.330855
114
0.60964
false
3.874228
false
false
false
floli/prbf
prbf.py
1
4348
#!env python3 import ipdb import sys import petsc4py petsc4py.init(sys.argv) from petsc4py import PETSc from mpi4py import MPI import numpy as np from phelper import * eMesh = {1: [np.linspace(0, 1, 4) ], 2: [np.linspace(0, 0.5, 5, False), # False == Do no include endpoint in range np.linspace(0...
lgpl-3.0
-1,361,749,080,802,548,700
34.933884
127
0.618445
false
3.213599
false
false
false
spraints/for-example
mercurial/obsolete.py
1
30427
# obsolete.py - obsolete markers handling # # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> # Logilab SA <contact@logilab.fr> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Obsolete ma...
gpl-2.0
-6,756,349,244,520,645,000
35.570913
79
0.602656
false
4.211932
false
false
false
dan-passaro/django-recommend
tests/test_models/test_object_similarity.py
1
6649
# coding: utf-8 """Tests for ObjectSimilarity.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import mock import pytest from django.contrib.contenttypes import models as ct_models import django_recommend.tasks import quotes.models from django_recommend ...
mit
-818,364,985,226,614,300
33.630208
76
0.67183
false
3.104108
true
false
false
NervanaSystems/neon
examples/mnist_mlp.py
1
3202
#!/usr/bin/env python # ****************************************************************************** # Copyright 2014-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at ...
apache-2.0
-2,849,390,297,457,863,700
34.186813
84
0.718613
false
3.948212
false
false
false
catsky/rebang
1/chartnet/view/views.py
1
19356
#-*- coding:utf-8 -*- from flask import g, render_template, request, url_for, redirect, session from chartnet import app from chartnet import setting from models import operatorDB from common import login_required from werkzeug import secure_filename import os import re import time from PIL import Image from StringIO ...
mit
-5,900,452,819,933,207,000
39.970021
353
0.58802
false
3.335425
false
false
false
bob-anderson-ok/py-ote
src/pyoteapp/csvreader.py
1
8060
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue May 23 07:24:21 2017 @author: Bob Anderson """ import os tangraNeedsBackgroundSubtraction = True pymovieSignalColumnCount = 0 def readLightCurve(filepath): """ Reads the intensities and timestamps from Limovie, Tangra, PYOTE, or R-OTE c...
mit
7,009,879,351,355,001,000
31.897959
115
0.518734
false
3.816288
false
false
false
fooelisa/netmiko
netmiko/huawei/huawei_ssh.py
1
3989
from __future__ import print_function from __future__ import unicode_literals import time import re from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko import log class HuaweiSSH(CiscoSSHConnection): def session_preparation(self): """Prepare the session after the connection has been...
mit
2,947,721,045,689,463,300
33.991228
96
0.626723
false
4.194532
true
false
false
USGSDenverPychron/pychron
pychron/core/ui/qt/stage_component_editor.py
1
2697
# =============================================================================== # Copyright 2011 Jake Ross # # 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/licens...
apache-2.0
-3,721,529,640,734,366,700
29.647727
81
0.533556
false
4.578947
false
false
false
google/fedjax
fedjax/legacy/training/logging_test.py
1
1361
# 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 agreed to in writing, ...
apache-2.0
2,890,281,021,728,383,500
29.931818
79
0.703894
false
3.591029
true
false
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/string.py
1
10950
"""A collection of string operations (most are no longer used in Python 1.6). Warning: most of the code you see here isn't normally used nowadays. With Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop...
mit
8,775,389,307,668,730,000
27.740157
77
0.67379
false
3.843454
false
false
false
grlee77/numpy
numpy/lib/utils.py
1
31655
import os import sys import textwrap import types import re import warnings from numpy.core.numerictypes import issubclass_, issubsctype, issubdtype from numpy.core.overrides import set_module from numpy.core import ndarray, ufunc, asarray import numpy as np __all__ = [ 'issubclass_', 'issubsctype', 'issubdtype',...
bsd-3-clause
2,800,243,081,563,033,600
30.034314
79
0.527184
false
4.199947
false
false
false
EuropeanSocialInnovationDatabase/ESID-main
ESIDcrawlers/ESIDcrawlers/spiders/MOPACT.py
1
5898
#!/usr/bin/env python # -*- coding: utf-8 -*- import scrapy from HTMLParser import HTMLParser import MySQLdb from database_access import * import re class MLStripper(HTMLParser): def __init__(self): self.reset() self.fed = [] def handle_data(self, d): self.fed.append(d) def get_data...
gpl-3.0
-5,503,429,203,674,280,000
46.16
346
0.511876
false
3.516706
false
false
false
Microsoft/hummingbird
hummingbird/ml/supported.py
1
10457
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ All o...
mit
5,985,921,669,037,165,000
27.493188
117
0.643588
false
4.237034
false
false
false
sbrodeur/ros-icreate-bbb
src/action/scripts/record/autonomous_control.py
1
2407
#!/usr/bin/env python # Copyright (c) 2016, Simon Brodeur # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, th...
bsd-3-clause
1,156,342,221,365,033,700
47.14
103
0.74865
false
4.11453
false
false
false
joe-eklund/cs460
bene/examples/transfer.py
1
2999
import sys sys.path.append('..') from src.sim import Sim from src.node import Node from src.link import Link from src.transport import Transport from src.tcp import TCP from networks.network import Network import optparse import os import subprocess class AppHandler(object): def __init__(self,filename): ...
gpl-3.0
263,981,328,076,515,230
28.401961
81
0.552184
false
3.781841
false
false
false
d-li14/CS231n-Assignments
assignment2/cs231n/classifiers/fc_net.py
1
16265
# from builtins import range # from builtins import object import numpy as np from cs231n.layers import * from cs231n.layer_utils import * class TwoLayerNet(object): """ A two-layer fully-connected neural network with ReLU nonlinearity and softmax loss that uses a modular layer design. We assume an input...
gpl-3.0
4,564,913,642,847,883,300
53.397993
177
0.508269
false
4.457386
true
false
false
Richard-Mathie/xml_xls_loader
setup.py
1
1452
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip.req import parse_requirements from io import open try: from setuptools import setup except ImportError: from distutils.core import setup with open('Version', 'r', encoding='utf-8') as f: version = next(f).strip() with open('README.rst', encoding='utf...
gpl-3.0
5,534,715,379,339,304,000
28.632653
75
0.632231
false
3.761658
false
false
false
michelesr/network-monitor-server
src/netmapping.py
1
2263
#! /usr/bin/env python """ Framework per il monitoraggio della rete Modulo per la scansione multithread della rete """ from threading import Thread from addresses import get_network_address from scan import host_discovery from host import Host from time import sleep from sys import argv, exit # classe che rappresen...
gpl-3.0
-3,415,007,167,212,665,300
30.430556
105
0.593902
false
3.998233
false
false
false
kaushik94/sympy
sympy/utilities/tests/test_autowrap.py
4
14713
# Tests that require installed backends go into # sympy/test_external/test_autowrap import os import tempfile import shutil from sympy.core import symbols, Eq from sympy.core.compatibility import StringIO from sympy.utilities.autowrap import (autowrap, binary_function, CythonCodeWrapper, UfuncifyCodeWrapp...
bsd-3-clause
7,184,166,077,250,997,000
30.371002
122
0.601373
false
3.089668
true
false
false
bsautrey/python-mapreduce
mapper.py
1
6535
# mapper.py is the map step of mapreduce. import sys,random,uuid,os,fcntl,gzip,errno from time import time from glob import glob from math import fmod import ujson from shuffler import Shuffle from configs_parser import get_configs class Map(): def __init__(self,map_function_name,project_name,input_dirs,se...
mit
-6,503,421,937,321,776,000
34.521739
225
0.55088
false
3.826112
true
false
false
drewcsillag/skunkweb
pylibs/pargen/LALR.py
1
2138
# # Copyright (C) 2001 Andrew T. Csillag <drew_csillag@geocities.com> # # You may distribute under the terms of either the GNU General # Public License or the SkunkWeb License, as specified in the # README file. # """LALR(1) operations""" import LR0 import LR1 import copy from Common import * de...
gpl-2.0
8,353,669,085,466,037,000
28.287671
68
0.563611
false
3.593277
false
false
false
openatv/enigma2
lib/python/Components/FileTransfer.py
2
3044
# -*- coding: utf-8 -*- from Components.Task import Task, Job, job_manager, AbortedPostcondition, ReturncodePostcondition from Tools.Directories import fileExists, shellquote from Components.MovieList import MOVIE_EXTENSIONS from enigma import eTimer import os ALL_MOVIE_EXTENSIONS = MOVIE_EXTENSIONS.union((".ts",)) c...
gpl-2.0
764,602,600,391,465,300
32.450549
113
0.692181
false
2.84486
false
false
false
CityOfPhiladelphia/myphillyrising
website/alexander/models.py
1
7341
from django.conf import settings from django.db import models from django.db.models import query from django.utils.translation import ugettext as _ from django.utils.timezone import now, timedelta from geopy import geocoders from .feed_readers import get_feed_reader import logging logger = logging.getLogger(__name__)...
gpl-3.0
2,756,117,078,917,034,500
34.124402
95
0.594197
false
4.133446
false
false
false
tekton/DocuCanvas
nodes/migrations/0001_initial.py
1
3181
# -*- 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): # Adding model 'Node' db.create_table(u'nodes_node', ( (u'id', self.gf('django.db.models.fields....
gpl-3.0
-5,484,230,721,921,663,000
54.824561
143
0.57309
false
3.61067
false
false
false
scholer/cadnano2.5
cadnano/document.py
2
34764
# -*- coding: utf-8 -*- from operator import itemgetter from uuid import uuid4 from typing import ( Set, List, Tuple, Iterable, Iterator, Optional ) from cadnano import ( app, setBatch, util ) from cadnano.addinstancecmd import AddInstanceCommand from cadnano.proxies.cnenum import ...
mit
2,171,655,359,132,237,600
32.491329
107
0.561529
false
4.123354
false
false
false
digistam/recon-ng
modules/recon/domains-hosts/ssl_san.py
1
1509
import module # unique to module import re class Module(module.Module): def __init__(self, params): module.Module.__init__(self, params, query='SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain') self.info = { 'Name': 'SSL SAN Lookup', ...
gpl-3.0
-5,221,244,545,110,486,000
40.916667
165
0.520875
false
4.42522
false
false
false
getsentry/zeus
zeus/models/artifact.py
1
1714
from base64 import b64decode from io import BytesIO from zeus.config import db from zeus.constants import Status from zeus.db.mixins import RepositoryBoundMixin, StandardAttributes from zeus.db.types import Enum, File, FileData, GUID from zeus.utils import timezone class Artifact(RepositoryBoundMixin, StandardAttrib...
apache-2.0
2,436,007,010,914,828,300
37.088889
79
0.672112
false
3.623679
false
false
false
cduvedi/CS229-project
deeplearning/preprocess.py
1
4296
#!/usr/bin/env python # preprocess.py - Preprocess the data # Common imports import os import sys import time import numpy import csv from sklearn.preprocessing import normalize # Imorts from other custom modules def load_set(file): X = list() Y = list() filehandle = open(file, 'r') reader = csv.reader(filehan...
gpl-2.0
6,570,296,486,117,475,000
28.627586
95
0.664804
false
2.534513
true
false
false
abinit/abinit
developers/pltdiff.py
1
5645
#!/usr/bin/env python """ This script uses matplotlib to compare reference output file(s) with data in tabular form with the corresponding file(s) generated by the automatic test. Multiple files can be specified via the command line interface. Example: pltdiff.py t88o_DS2_PHDOS Usage: pltdiff.py file1 [file2, .....
gpl-3.0
-4,034,028,275,814,302,700
34.727848
103
0.586891
false
3.368138
false
false
false
melqkiades/yelp
source/python/topicmodeling/context/topic_latex_generator.py
1
19831
import colorsys import time import nltk import re from pylatex.base_classes import CommandBase, Arguments from pylatex import Document, Section, Subsection, Command, UnsafeCommand, Tabular, LongTabu, Itemize, NoEscape from pylatex.package import Package import pattern from etl import ETLUtils from nlp import nlp_uti...
lgpl-2.1
-1,867,325,663,289,591,000
37.136538
111
0.517977
false
3.888431
false
false
false
sajeeshcs/nested_quota_final
nova/compute/rpcapi.py
1
46820
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
4,497,065,453,178,087,000
44.857003
79
0.59293
false
4.102699
false
false
false
aaltay/beam
sdks/python/apache_beam/transforms/trigger.py
1
50821
# # 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 us...
apache-2.0
1,498,664,546,685,120,800
31.851325
87
0.669625
false
3.725607
false
false
false
ipedrazas/plano
python/run.py
1
1670
from eve import Eve from flask import request from flask.ext.cors import CORS import plano_utils def after_insert_application(documents): for doc in documents: plano_utils.add_application(doc) def after_insert_component(documents): for doc in documents: plano_utils.add_component(doc) app =...
apache-2.0
-3,332,283,286,137,989,600
28.298246
102
0.659281
false
3.479167
false
false
false
frederic-mahe/FROGS
tools/preprocess.py
1
43108
#!/usr/bin/env python2.7 # # Copyright (C) 2014 INRA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program ...
gpl-3.0
-5,037,706,322,682,687,000
50.626347
278
0.594994
false
3.553833
false
false
false
NejcZupec/ggrc-core
test/selenium/src/lib/page/dashboard.py
1
4647
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from selenium.common import exceptions from lib import base from lib.constants import url from lib.constants import locator from lib import environment from lib import decorator from lib.page import widget_...
apache-2.0
-4,973,490,085,282,803,000
28.598726
78
0.655907
false
3.771916
false
false
false
docusign/docusign-python-client
docusign_esign/models/group_brands.py
1
5695
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
mit
-3,798,903,295,641,539,000
31.919075
140
0.599473
false
3.919477
false
false
false
scheunemann/robotActionController
robotActionController/ActionRunner/groupRunner.py
1
2761
import logging from base import ActionRunner, ActionManager from collections import namedtuple from gevent.pool import Group from gevent import sleep from robotActionController.Data.storage import StorageFactory from robotActionController.Data.Model import Action class GroupRunner(ActionRunner): supportedClass = ...
mit
-2,707,494,878,154,074,600
40.208955
98
0.586382
false
4.59401
false
false
false
ahirner/TabulaRazr-OS
deprecated/GetMuniBondData.py
1
2921
import ConfigParser import gc import glob import io import os import cStringIO import re import subprocess import string import sys import numpy as np import pandas as pd def GetConfigParm(section): dict1 = {} options = Config.options(section) for option in options: try: dict1[option] = Con...
agpl-3.0
1,245,297,047,318,944,500
26.637255
92
0.65457
false
3.14086
true
false
false
ncbray/pystream
bin/translator/dataflowtransform/glsltranslator/poolimplementation.py
1
2229
# Copyright 2011 Nicholas Bray # # 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,869,629,408,877,145,000
25.855422
74
0.716016
false
3.19341
false
false
false
Tooskich/python_core
rankings/views.py
1
2284
#-*- coding: utf-8 -*- import ujson from django.http import HttpResponse, Http404 from django.core.cache import cache from django.core.management import call_command from django.db import connection RACES_PER_VIEW = 25 def last_races(request): cursor = connection.cursor() query = "SELECT id, info, category,...
apache-2.0
-1,774,803,645,420,551,400
30.287671
138
0.648424
false
3.503067
false
false
false
JohnDickerson/EnvyFree
driver.py
1
10238
#!/usr/bin/env python from model import Model from model import DupValues from model import DistTypes from model import ObjType import allocator import bounds from allocator import DoesNotExistException import argparse import random import time import csv import sys current_ms_time = lambda: int(round(time.time() * ...
gpl-2.0
-7,730,505,672,266,138,000
53.169312
152
0.574526
false
3.828721
false
false
false
bhenne/MoSP
mosp_examples/random_wiggler.py
1
1499
#!/bin/env python """ Beginners' example: random movement - random movement - output to visual player, which is executed as child process - you may try the other commented monitor examples - you can choose a single or multiple monitors """ import sys sys.path.append("..") import time import random from m...
gpl-3.0
4,466,338,805,413,161,000
29.591837
101
0.693129
false
3.196162
false
false
false
ytisf/PyExfil
pyexfil/Comm/GQUIC/__init__.py
1
1560
import zlib import socket import struct from pyexfil.includes.prepare import PrepFile, DEFAULT_KEY GQUIC_PORT = 443 def _send_one(data, pckt_counter, dest_ip, dest_port=GQUIC_PORT, ccc=None): """ Send out one packet of data :param data: Data to send [str] :param pckt_counter: Counter of file/comm [int] :param...
mit
7,913,941,341,791,180,000
25.896552
114
0.670513
false
2.47619
false
false
false
icse18-FAST/FAST
tools/clean-preprocessed-input.py
1
1377
''' This file is part of an ICSE'18 submission that is currently under review. For more information visit: https://github.com/icse18-FAST/FAST. This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either ve...
gpl-3.0
-6,610,629,189,178,085,000
36.216216
75
0.615105
false
4.223926
false
false
false
atkvo/masters-bot
src/autobot/src/capture_image.py
1
2117
#!/usr/bin/env python from std_msgs.msg import String #import roslib import sys import datetime import time import numpy as np from cv_bridge import CvBridge, CvBridgeError import cv2 import rospy from autobot.msg import drive_param from sensor_msgs.msg import Image bridge = CvBridge() i = 0 bridge = CvBridge();...
mit
5,722,113,862,861,524,000
25.4625
91
0.632971
false
3.392628
false
false
false
GoodYk/formula-editor-
FormulaShow/asciimathmll.py
1
23678
# Copyright (c) 2010-2011, Gabriele Favalessa # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distr...
gpl-3.0
-8,934,841,912,234,516,000
34.875758
104
0.579948
false
2.766768
false
false
false
ExCiteS/geokey-checklist
geokey_checklist/models.py
1
3037
from django.conf import settings from django.db import models from .base import TYPE from .base import ITEM_TYPE from .base import EXPIRY_FACTOR from .base import PER_TYPE from .base import FREQUENCY_EXPIRED_REMINDER from .base import REMINDER_BEFORE_EXPIRATION class Checklist(models.Model): """ Stores a sing...
mit
-7,941,475,644,263,964,000
37.935897
148
0.691801
false
3.964752
false
false
false
SimBil91/pyTenvis
modules/TenvisAudio.py
1
1178
import subprocess import pyaudio import os class TenvisAudio(): def __init__(self,ip): self.command=['avconv','-i','rtsp://'+ip+'/11','-ar', '16000','-vn','-f','wav', 'pipe:1'] self.FNULL = open(os.devnull, 'w') self.start_stream() def start_stream(self): self.pipe = subprocess....
mit
-1,959,038,631,366,071,000
29.230769
97
0.523769
false
3.591463
false
false
false
ma2rten/kaggle-evergreen
src/data.py
1
1582
import csv, json, re from collections import defaultdict, Counter from unidecode import unidecode from util import * def extract_domain(url): # extract domains domain = url.lower().split('/')[2] domain_parts = domain.split('.') # e.g. co.uk if domain_parts[-2] not in ['com', 'co']: retur...
mit
-5,455,935,004,014,464,000
22.969697
70
0.553097
false
3.571106
false
false
false
drewcsillag/skunkweb
pylibs/pargen/Common.py
1
9798
# # Copyright (C) 2001 Andrew T. Csillag <drew_csillag@geocities.com> # # You may distribute under the terms of either the GNU General # Public License or the SkunkWeb License, as specified in the # README file. # from CONSTANTS import * import RuleItems Set = RuleItems.Set startItem = RuleItems...
gpl-2.0
599,409,482,687,697,200
29.714734
84
0.508675
false
3.441517
false
false
false
patrickmelix/Python4ChemistryTools
geometryAnalyzer.py
1
7994
import numpy as np from ase import io, Atoms def convertNames(inFile, outFile): xyz = open(outFile,'w') with open(inFile) as f: for line in f: split = line.strip().split() if len(split) < 4: xyz.write(line) continue name = split[0] ...
mit
7,997,418,269,323,740,000
30.848606
103
0.523893
false
3.430901
false
false
false
cwm-kylin/kylin_ops
permission/models.py
1
2259
import datetime from django.db import models from asset.models import Asset, AssetGroup from usermanagers.models import User, UserGroup class PermLog(models.Model): datetime = models.DateTimeField(auto_now_add=True) action = models.CharField(max_length=100, null=True, blank=True, default='') results = mo...
lgpl-3.0
8,404,812,628,688,477,000
36.65
82
0.722001
false
3.703279
false
false
false
Scienziatopazzo/machine-learning
simple_perceptron.py
1
2836
import math import random import operator import numpy as np class Perceptron: ''' Implements the Perceptron Learning Algorithm fields: int dim Dimensionality of the data List weights Array (dim+1 x 1) of the weights List data Array (N x 1) of tuples (x, y) composed of vectors x and results y=f(x) int ite...
mit
191,354,775,047,642,500
29.494624
87
0.674542
false
2.975866
false
false
false
allanlei/django-saas
saas/multidb/middleware.py
1
1173
from django.utils.functional import curry from django.conf import settings from django.core.exceptions import MiddlewareNotUsed from saas.multidb.signals import db_route_read, db_route_write from saas.multidb.models import Database class ModelRoutingMiddleware(object): @classmethod def request_router_info(cl...
bsd-3-clause
-4,862,116,266,822,954,000
34.545455
107
0.70844
false
3.936242
false
false
false
kernelci/kernelci-backend
app/models/tests/test_bisect_model.py
1
9506
# Copyright (C) Collabora Limited 2018,2019 # Author: Guillaume Tucker <guillaume.tucker@collabora.com> # # Copyright (C) Linaro Limited 2014,2015,2017 # Author: Milo Casagrande <milo.casagrande@linaro.org> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser G...
lgpl-2.1
3,625,843,801,229,218,300
35.144487
79
0.554387
false
3.680217
true
false
false
alabarga/SocialLearning
SocialLearning/apps/learningobjects/utils/search.py
1
8616
from learningobjects.utils.google import search as search_google import sha import xml.etree.ElementTree as ET import unfurl import urllib2, urllib import json import time from urlunshort import resolve import wikipedia import re import requests class SearchEngine(object): def __init__(self, engine): self...
gpl-3.0
6,216,194,071,072,516,000
29.125874
305
0.565692
false
3.412277
false
false
false
hammerlab/immuno_research
eluted_peptide_prediction.py
1
1459
#!/usr/bin/python import pandas as pd from sklearn import ensemble from sklearn import linear_model from sklearn.cross_validation import cross_val_score import data import reduced_alphabet """ Build models off Dana-Farber Repository for Machine Learning in Immunology For details of the repository, please refer to th...
gpl-2.0
-2,094,679,284,893,819,600
31.422222
159
0.718986
false
2.872047
false
false
false
manuelli/director
src/python/director/cameracontrol.py
1
15095
import vtk import time import numpy as np from director import transformUtils from director.timercallback import TimerCallback from director import propertyset from collections import OrderedDict class OrbitController(TimerCallback): def __init__(self, view): TimerCallback.__init__(self) self.view...
bsd-3-clause
-7,207,181,618,333,525,000
28.656189
155
0.645711
false
3.926899
false
false
false
GreenVars/diary
diary/diary.py
1
7909
from __future__ import absolute_import from __future__ import print_function import atexit import os.path import codecs import sys from diary import logdb from diary import levels from diary import formats from diary import events _PY2 = sys.version_info[0] == 2 class Diary(object): """Diary is a low-dependency...
mit
-2,702,960,208,736,069,000
35.114155
122
0.561259
false
4.169215
false
false
false
iDigBio/idigbio-python-client
examples/fetch_media/fetch_media.py
1
9969
from __future__ import print_function try: from idigbio.json_client import iDbApiJson import requests import shutil import os import sys import time import argparse import json except ImportError as e: print ("IMPORT ERROR (This exception is likely caused by a missing module): '{0}'"...
mit
-8,380,299,812,791,761,000
36.618868
171
0.657438
false
3.611957
false
false
false
yousrabk/mne-python
mne/io/constants.py
1
32419
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) class Bunch(dict): """ Container object for datasets: dictionnary-like object that exposes its keys as attributes. """ def __init__(self, **kwa...
bsd-3-clause
-6,057,507,269,390,150,000
39.52375
130
0.643573
false
2.775124
false
false
false
anotherjesse/nova
nova/api/direct.py
1
7794
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
1,636,530,801,207,467,800
31.475
78
0.564665
false
4.381113
false
false
false
zestyr/lbry
build/release.py
1
6531
"""Bump version and create Github release This script should be run locally, not on a build server. """ import argparse import contextlib import os import re import subprocess import sys import git import github import changelog ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) def main(): b...
mit
-1,668,162,865,751,404,800
31.014706
97
0.623947
false
3.584523
false
false
false
yaras/BCalc
setup.py
1
2644
from setuptools import setup, find_packages setup( name='BCalc', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html version='0.1.0', de...
mit
6,277,856,458,397,335,000
33.72973
111
0.636914
false
4.024353
false
false
false
akrherz/iem
scripts/GIS/wwa2shp.py
1
5518
"""Something to dump current warnings to a shapefile.""" import zipfile import os import shutil import subprocess from osgeo import ogr from pyiem.util import utc def main(): """Go Main Go""" utcnow = utc() os.chdir("/tmp") fp = "current_ww" for suffix in ["shp", "shx", "dbf"]: if os.pat...
mit
-8,800,740,664,368,985,000
30.175141
79
0.623233
false
2.976268
false
false
false
bwillis32/inclusionRE
appreciation/models.py
1
1075
from __future__ import unicode_literals from django.db import models # Create your models here. class Property(models.Model): id = models.AutoField(primary_key = True) streetAddress = models.CharField(max_length=200) borough = models.CharField(max_length=65) state = models.CharField(max_length= 65) zip = mo...
apache-2.0
-3,489,742,085,480,704,500
32.59375
73
0.733023
false
3.571429
false
false
false
andreyto/YAP
bits/logging_helper.py
1
1032
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the MGTAXA package for the # copyright and license terms. # ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## """Some support for logging""" import logging def ...
mit
1,184,815,785,125,451,000
33.4
78
0.511628
false
3.698925
false
false
false
BryceSchroeder/delvmod
redelv/redelvlib/script_editor.py
1
11007
#!/usr/bin/env python # Copyright 2015-16 Bryce Schroeder, www.bryce.pw, bryce.schroeder@gmail.com # Wiki: http://www.ferazelhosting.net/wiki/delv # # 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...
gpl-3.0
-2,756,007,720,885,981,000
40.535849
79
0.568093
false
3.681271
false
false
false
alexei-matveev/ccp1gui
interfaces/smeagolio.py
1
9939
# # This file is part of the CCP1 Graphical User Interface (ccp1gui) # # (C) 2002-2005 CCLRC Daresbury Laboratory # # 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 2 ...
gpl-2.0
6,608,747,880,550,937,000
33.037671
98
0.542912
false
3.712738
true
false
false
bansallab/roundup
_164_scrape.py
1
8322
import csv from urllib.request import Request, urlopen import re from datetime import date import dateutil.parser from sys import argv from bs4 import BeautifulSoup from dateutil.relativedelta import relativedelta from os import system import scrape_util default_sale, base_url, prefix = scrape_util.get_market(argv) t...
mit
-6,300,331,700,896,759,000
30.052239
107
0.56597
false
3.559453
false
false
false
anhaidgroup/py_entitymatching
py_entitymatching/blocker/attr_equiv_blocker.py
1
25900
import logging import pandas as pd import numpy as np import pyprind import six from joblib import Parallel, delayed import py_entitymatching.catalog.catalog_manager as cm from py_entitymatching.blocker.blocker import Blocker from py_entitymatching.utils.catalog_helper import log_info, get_name_for_key, add_key_colum...
bsd-3-clause
11,388,610,606,417,046
44.359019
134
0.526641
false
4.266183
false
false
false
USGSDenverPychron/pychron
pychron/core/helpers/archiver.py
1
5290
# =============================================================================== # Copyright 2011 Jake Ross # # 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/licens...
apache-2.0
1,956,422,334,840,348,400
34.743243
111
0.540832
false
3.944817
false
false
false
fandemonium/code
seq_util/separate_seqs_into_different_files.py
1
1224
import sys from Bio import SeqIO def seq_range(s_start, s_end): return str(s_start) + "-" + str(s_end) if s_end - s_start > 0 else str(s_end) + "-" + str(s_start) def parse_seqid(fasta): seq_d = {} for records in fasta: header = records.id.strip().split(" ") ID = header[0] seq_d[ID] = records.seq return se...
mit
-321,727,026,953,268,030
24.5
99
0.593954
false
2.508197
false
false
false
ProgramFan/bentoo
bentoo/tools/svgconvert.py
1
2977
#!/usr/bin/env python # -*- coding: utf-8 -*- # ''' svgconvert - Simple tool to convert svg to pdf and png This tool converts svg to pdf and png using phantomjs. It handles mising fonts correctly, so svgs with unicode text objects are handled gracefuly. ''' import argparse import os import subprocess import xml.etree...
mit
-1,256,241,127,294,511,400
31.358696
78
0.567014
false
3.604116
false
false
false
tvalacarta/tvalacarta
python/main-classic/servers/canal10.py
1
1649
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para canal10 # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impor...
gpl-3.0
-6,697,105,664,156,559,000
34.826087
127
0.614078
false
3.263366
false
false
false
natko1412/script.module.dudehere.routines
lib/dudehere/routines/scrapers/alluc_api.py
1
2538
import sys import os import re import urllib from dudehere.routines import * from dudehere.routines.scrapers import CommonScraper, ScraperResult class alluc_apiScraper(CommonScraper): def __init__(self): self._settings = {} self.service='alluc_api' self.name = 'alluc.com' self.referrer = 'https://www.alluc.com...
gpl-3.0
-4,392,441,383,119,036,000
32.407895
100
0.663515
false
3.050481
false
false
false
axxiao/tuobi
axtools/connector-i2c.py
1
2524
""" The connector for i2c __author__ = "Alex Xiao <http://www.alexxiao.me/>" __date__ = "2017-04-22" __version__ = "0.5" """ import smbus class connector_i2c(): ''' The standard I2c connector implementation ''' def __init__(self,bus_num): ''' bus_num: i2c bus number, start from ...
mit
5,864,206,459,583,922,000
26.445652
88
0.516244
false
3.420054
false
false
false
jreinhardt/manual-labour
src/manuallabour/exporters/html.py
1
3684
# Manual labour - a library for step-by-step instructions # Copyright (C) 2014 Johannes Reinhardt <jreinhardt@ist-dein-freund.de> # # 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; eith...
lgpl-2.1
7,247,617,497,565,202,000
35.117647
76
0.649566
false
3.877895
false
false
false
kozak127/gherkins
app/oauth.py
1
2315
from rauth import OAuth2Service from flask import current_app, url_for, request, redirect class OAuthSignIn(object): providers = None def __init__(self, provider_name): self.provider_name = provider_name credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name] self.consume...
mit
-1,819,415,229,331,384,800
33.044118
77
0.558963
false
4.376181
false
false
false
juanchopanza/pyhistuples
pyhistuples/pyhistoplots.py
1
3940
'''Helper functions for plotting histograms, sequences, and ntuple columns Copyright (c) 2010 Juan Palacios juan.palacios.puyana@gmail.com Subject to the Lesser GNU Public License - see < http://www.gnu.org/licenses/lgpl.html> ''' # This program is free software: you can redistribute it and/or modify # it under...
gpl-3.0
-8,844,344,140,079,734,000
34.178571
148
0.601523
false
3.627993
false
false
false