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
GeosoftInc/gxpy
geosoft/gxapi/GXDOCU.py
1
10991
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### end...
bsd-2-clause
653,045,108,704,022,000
27.257069
135
0.589937
false
3.710668
false
false
false
nealegibson/GeePea
src/GPUtils.py
1
6261
""" Some non-core utility functions for GPs """ from __future__ import print_function import numpy as np import pylab try: import dill dill_available = 'yes' except ImportError: dill_available = 'no' #################################################################################################### def load(fi...
gpl-3.0
-4,645,364,629,243,388,000
30.305
114
0.612362
false
2.68482
false
false
false
KHP-Informatics/sleepsight-analytics
generate_thesis_outputs.py
1
5023
import numpy as np from tools import Logger, Participant import thesis as T path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/data/' plot_path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/plots/' log_path = '/Users/Kerz/Documents/projects/SleepSight/ANALYSIS/logs/' options = {'periodicity': False,...
apache-2.0
-5,265,038,417,409,206,000
31.198718
80
0.643241
false
3.405424
false
false
false
platinhom/CADDHom
python/format/HHmol2.py
1
4222
# -*- coding: utf-8 -*- """ Created on 2015-10-05 @author: Zhixiong Zhao """ import __init__ from HHFormat import * import molecule.HHMolecule import molecule.HHAtom import molecule.HHResidue import molecule.HHBond import geometry.HHPoint Mol=molecule.HHMolecule.Molecule Atom=molecule.HHAtom.Atom Res=molecule.HHRes...
gpl-2.0
2,584,344,862,297,078,300
30.044118
143
0.541686
false
3.361465
false
false
false
ondrokrc/gramps
gramps/gui/editors/displaytabs/backreflist.py
1
4638
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2009-2011 Gary Burton # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
2,038,408,885,428,916,200
32.854015
83
0.544631
false
4.061296
false
false
false
initNirvana/Easyphotos
env/lib/python3.4/site-packages/pymongo/database.py
1
44607
# Copyright 2009-2014 MongoDB, 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 writin...
mit
-8,870,270,720,626,688,000
39.114209
109
0.571749
false
4.678729
false
false
false
jr0d/mercury
src/mercury/backend/service.py
1
7176
# Copyright 2015 Jared Rodriguez (jared.rodriguez@rackspace.com) # 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/LICENS...
apache-2.0
5,274,209,554,630,983,000
36.181347
79
0.603122
false
4.462687
true
false
false
googleads/googleads-python-lib
examples/ad_manager/v202105/forecast_service/get_delivery_forecast_for_line_items.py
1
1934
#!/usr/bin/env python # # Copyright 2015 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
-8,936,408,167,704,282,000
36.192308
78
0.718201
false
3.561694
false
false
false
CMLL/Flask-Fixtures
setup.py
1
1677
""" Flask-Fixtures -------------- A fixtures library for testing Flask apps. """ import os import subprocess from setuptools import setup root_dir = os.path.abspath(os.path.dirname(__file__)) package_dir = os.path.join(root_dir, 'flask_fixtures') # Try to get the long description from the README file or the modul...
mit
-2,382,888,362,794,428,000
28.421053
111
0.648778
false
3.955189
false
false
false
sklam/numba
numba/core/typing/typeof.py
1
6676
from collections import namedtuple from functools import singledispatch import ctypes import enum import numpy as np from numba.core import types, utils, errors from numba.np import numpy_support # terminal color markup _termcolor = errors.termcolor() class Purpose(enum.Enum): # Value being typed is used as an ...
bsd-2-clause
5,694,277,277,401,790,000
26.02834
76
0.658778
false
3.400917
false
false
false
xingnix/learning
imageprocessing/python/10/segment.py
1
1154
import matplotlib.pyplot as plt import numpy as np import cv2 from skimage import io,color,data,filters,exposure,util,transform #plt.switch_backend('qt5agg') def otsu(): im=data.coins() f=np.zeros(255) minf=0 mini=0 for i in range(100,200): c1=im[im<=i] c2=im[im>i] m1=np....
gpl-3.0
4,045,463,473,780,565,500
23.0625
87
0.571057
false
2.364754
false
false
false
AstroMatt/esa-time-perception
backend/api_v2/models/trial.py
1
9704
import json import statistics from django.db import models from django.db.models import DateTimeField from django.db.models import CharField from django.db.models import FloatField from django.db.models import EmailField from django.db.models import BooleanField from django.db.models import PositiveSmallIntegerField f...
mit
3,254,712,368,374,055,000
40.991304
190
0.640609
false
3.380469
false
false
false
fatiherikli/komposto.org
auth/views.py
1
2165
import json from django.contrib.auth import logout, login, authenticate from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.http import HttpResponse from django.db.models import Q, Count from django.views.generic import ( FormView, CreateView, RedirectView, DetailVie...
mit
2,634,806,515,822,161,400
29.069444
68
0.684988
false
4.024164
false
false
false
coolcooldool/tencent-weibo-exporter
version15/tencent_util.py
1
12471
# -*- coding: utf-8 -*- ''' Created on 2017/12/21 @author: yuyang ''' import os from urllib import request import uuid import re import docx_ext from docx.shared import Pt from docx.shared import RGBColor from docx.shared import Inches JPEG_EXTENSION = '.jpg' PNG_EXTENSION = '.png' GIF_EXTENSION = '.gif' SPLIT_STR...
apache-2.0
-2,133,465,114,962,808,600
38.012739
118
0.580292
false
3.196503
false
false
false
morrillo/hr_loans
hr.py
1
1465
# -*- 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
-1,966,382,299,273,435,600
37.552632
78
0.604778
false
4.035813
false
false
false
kipe/pycron
tests/test_minute.py
1
3235
from datetime import datetime import pycron from pytz import utc import pendulum import arrow import udatetime from delorean import Delorean def test_minute(): def run(now): assert pycron.is_now('* * * * *', now) assert pycron.is_now('9 * * * *', now) assert pycron.is_now('*/1 * * * *', no...
mit
4,184,455,455,338,272,000
39.949367
104
0.550541
false
2.917042
false
false
false
chrisng93/todo-app
server/app/api/lists.py
1
1669
from flask import Blueprint, request, jsonify from sqlalchemy.exc import IntegrityError from ..models.List import List from ..extensions import db list_api = Blueprint('list', __name__, url_prefix='/api/list') @list_api.route('/', methods=['GET']) def get_lists(): lists = List.query return jsonify({'lists':...
mit
5,324,590,652,803,928,000
27.288136
75
0.630917
false
3.272549
false
false
false
meizhoubao/pyimagesearch
Pokedex/find_screen.py
1
2248
from pyimagesearch import imutils from skimage import exposure import numpy as np import argparse import cv2 ap = argparse.ArgumentParser() ap.add_argument("-q", "--query", required=True, help = "Path to the query image") args = vars(ap.parse_args()) image = cv2.imread(args["query"]) ratio = image.shape[0] / ...
gpl-3.0
-7,678,565,435,378,642,000
27.455696
82
0.626335
false
2.414608
false
false
false
jeremy-c/unusualbusiness
unusualbusiness/articles/models.py
1
13076
from __future__ import unicode_literals from django.db import models from django.db.models import Model from django.utils import timezone from django.utils.translation import ugettext as _ from modelcluster.fields import ParentalKey from taggit.models import TaggedItemBase, CommonGenericTaggedItemBase, GenericUUIDTagg...
bsd-3-clause
738,842,656,338,968,400
32.875648
112
0.643698
false
4.08625
false
false
false
Samweli/inasafe
safe/impact_functions/inundation/flood_raster_population/impact_function.py
1
8986
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Flood Raster Impact Function on Population. Contact : ole.moller.nielsen@gmail.com .. note:: 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 Sof...
gpl-3.0
-2,536,155,877,016,420,000
35.677551
79
0.620632
false
4.154415
false
false
false
Joev-/Streaman
streaman/stream.py
1
3561
""" streaman.stream --------------- Provides the base `Stream` and `Channel` classes which must be overridden by implemented services. """ import time import os try: import cPickle as pickle except ImportError: import pickle from types import MethodType from streaman.common import * class Stream(object): ...
mit
-3,287,934,114,056,025,600
28.92437
84
0.596462
false
4.423602
false
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/ubuntuone-client/ubuntuone/status/messaging.py
1
1398
# ubuntuone.status.messaging - Messages to the user # # Author: Eric Casteleijn <eric.casteleijn@canonical.com> # # Copyright 2011 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software...
gpl-3.0
-7,006,785,282,109,029,000
34.846154
75
0.726037
false
4.052174
false
false
false
RENCI/xDCIShare
hs_core/discovery_form.py
1
4927
from haystack.forms import FacetedSearchForm from haystack.query import SQ, SearchQuerySet from crispy_forms.layout import * from crispy_forms.bootstrap import * from django import forms class DiscoveryForm(FacetedSearchForm): NElat = forms.CharField(widget = forms.HiddenInput(), required=False) NElng = forms....
bsd-3-clause
-1,619,511,691,017,527,800
39.393443
112
0.574995
false
3.526843
false
false
false
thinksabin/lazy-devops
S3 bucket Maker/Mailer.py
1
1471
import datetime import time import smtplib import os from email.mime.text import MIMEText from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from smtplib import SMTP class Mailer(): smtp_server = '' smtp_username = '' smtp_password = '' smtp_port = '...
apache-2.0
7,089,824,654,200,791,000
29.020408
89
0.639701
false
3.771795
false
false
false
mph-/lcapy
lcapy/parser.py
1
8849
"""This module performs parsing of SPICE-like netlists. It uses a custom parser rather than lex/yacc to give better error messages. Copyright 2015--2020 Michael Hayes, UCECE """ import re # Could use a script to generate parser and parsing tables if speed # was important. def split(s, delimiters): """Split st...
lgpl-2.1
5,817,020,142,593,945,000
30.716846
119
0.508984
false
4.191852
false
false
false
OSEHRA/VistA
Scripts/ExternalDownloader.py
1
4599
#--------------------------------------------------------------------------- # Copyright 2013-2019 The Open Source Electronic Health Record Alliance # # 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 Licen...
apache-2.0
1,417,033,469,209,968,000
36.08871
82
0.702979
false
3.720874
false
false
false
PnCevennes/SaisieChasse
modules/chasse/routes.py
1
2687
#coding: utf8 from flask import Blueprint, request import json from sqlalchemy import select from server import db from .models import VLieuTirSynonymes, PlanChasse, SaisonChasse from ..utils.utilssqlalchemy import json_resp ltroutes = Blueprint('lieux_tir', __name__) @ltroutes.route('/', methods=['GET']) @ltrout...
gpl-3.0
5,255,791,992,090,212,000
31.361446
142
0.661579
false
2.94195
false
false
false
yehudagale/fuzzyJoiner
old/matcher.py
1
1840
#using tutorial https://suhas.org/sqlalchemy-tutorial/ from sys import argv from matcher_functions import * #establish connection to database con, meta = connect(argv[1], argv[2], argv[3]) #load pairs from database aliases = get_aliases(con, meta) #create dictionaries assingning serial numbers to names and names from s...
epl-1.0
5,213,486,929,230,568,000
62.482759
152
0.756522
false
3.309353
true
false
false
chiffa/PolyPharma
bioflow/db_importers/hint_importer.py
2
1976
""" Set of tools to work with HiNT database """ from bioflow.bio_db_parsers.proteinRelParsers import parse_hint from bioflow.configs.main_configs import hint_csv_path from bioflow.neo4j_db.GraphDeclarator import DatabaseGraph from bioflow.utils.log_behavior import get_logger log = get_logger(__name__) def get_unipr...
bsd-3-clause
8,683,032,263,872,799,000
30.870968
101
0.610324
false
3.659259
false
false
false
pni-libraries/python-pni
pkgconfig.py
1
3517
from __future__ import print_function import sys try: from subprocess import check_output def execute(lt): return check_output(lt) except Exception: from subprocess import Popen from subprocess import PIPE def execute(lt): p = Popen(lt, stdout=PIPE) result = "" ...
gpl-2.0
9,147,892,070,350,756,000
23.943262
79
0.598521
false
3.987528
false
false
false
tonybaloney/st2
st2api/st2api/controllers/v1/packviews.py
1
8858
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
-378,968,515,113,438,460
35.00813
99
0.623166
false
4.033698
false
false
false
rafaelperazzo/iCalcNum
interpolacao.main.py
1
10021
# -*- coding: utf-8 -*- import sys import interpolacao as z from interpolacaoUi import * import numpy as np import pylab as plt from sympy import * from PyQt4.QtGui import * reload(sys) sys.setdefaultencoding('utf8') def str2list(texto): resultado = map(float,texto.split()) if type(resultado) is list: ...
gpl-3.0
3,902,660,676,013,172,000
36.732075
99
0.563256
false
3.112045
false
false
false
bendudson/pyxpad
pyxpad/calculus.py
1
1993
""" Calculus on XPadDataItem objects """ from .pyxpad_utils import XPadDataItem from numpy import zeros, cumsum def integrate(item): """ Integrate the given trace Inputs ------ item - an XPadDataItem object (or equivalent) Returns ------- an XPadDataItem object """ if ...
gpl-3.0
-439,367,664,206,884,740
20.202128
89
0.583041
false
3.34396
false
false
false
GuessWhoSamFoo/pandas
pandas/core/panel.py
1
55911
""" Contains data structures designed for manipulating panel (3-dimensional) data """ # pylint: disable=E1103,W0231,W0212,W0621 from __future__ import division import warnings import numpy as np import pandas.compat as compat from pandas.compat import OrderedDict, map, range, u, zip from pandas.compat.numpy import f...
bsd-3-clause
-7,667,139,979,059,347,000
34.208438
79
0.545581
false
4.175267
false
false
false
Drummersbrother/rocket-snake
tests/experiments.py
1
7041
import asyncio import json import time import unittest from pprint import pprint import rocket_snake with open("tests/config.json", "r") as config_file: config = json.load(config_file) def async_test(f): def wrapper(*args, **kwargs): future = f(*args, **kwargs) loop = args[0].running_loop ...
apache-2.0
-4,465,343,280,217,194,500
37.26087
157
0.640767
false
3.762694
true
false
false
MobSF/Mobile-Security-Framework-MobSF
setup.py
1
1749
#!/usr/bin/env python3 """Setup for MobSF.""" from setuptools import ( find_packages, setup, ) from pathlib import Path def read(rel_path): init = Path(__file__).resolve().parent / rel_path return init.read_text('utf-8', 'ignore') def get_version(): ver_path = 'mobsf/MobSF/init.py' for li...
gpl-3.0
-4,701,759,006,805,439,000
27.672131
75
0.621498
false
3.729211
false
false
false
eesatfan/vuplus-enigma2
lib/python/Screens/ServiceInfo.py
1
9869
from Components.HTMLComponent import HTMLComponent from Components.GUIComponent import GUIComponent from Screen import Screen from Components.ActionMap import ActionMap from Components.Label import Label from ServiceReference import ServiceReference from enigma import eListboxPythonMultiContent, eListbox, gFont, iServi...
gpl-2.0
-2,097,492,960,710,691,000
38.794355
111
0.644544
false
3.121126
false
false
false
mpunkenhofer/irc-telegram-bot
telepot/telepot/aio/delegate.py
1
3780
""" Like :mod:`telepot.delegate`, this module has a bunch of seeder factories and delegator factories. .. autofunction:: per_chat_id .. autofunction:: per_chat_id_in .. autofunction:: per_chat_id_except .. autofunction:: per_from_id .. autofunction:: per_from_id_in .. autofunction:: per_from_id_except .. autofunction:...
mit
-7,109,834,925,645,704,000
35
87
0.643915
false
3.757455
false
false
false
rentlytics/django-zerodowntime
zerodowntime/management/commands/install_git_hooks.py
1
1517
import os import stat from django.core.management import BaseCommand COMMIT_MSG_HOOK = """ # BEGIN ZERODOWNTIME_COMMIT_MSG_HOOK commit_regex='(\[allow\-unsafe\-migrations]|merge)' if ! grep -iqE "$commit_regex" "$1"; then source ./venv/bin/activate ./manage.py check_migrations migration_check=$? if...
isc
-4,212,104,457,324,079,600
28.745098
99
0.616348
false
3.503464
false
false
false
lishubing/zhihu-py3
zhihu/topic.py
1
3749
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = '7sDream' from .common import * class Topic: """答案类,请使用``ZhihuClient.topic``方法构造对象.""" @class_common_init(re_topic_url) def __init__(self, url, name=None, session=None): """创建话题类实例. :param url: 话题url :param name: 话题名称...
mit
1,154,990,247,466,391,800
28.615385
78
0.516883
false
3.158614
false
false
false
gems-uff/noworkflow
capture/noworkflow/now/ipython/__init__.py
1
1194
# Copyright (c) 2016 Universidade Federal Fluminense (UFF) # Copyright (c) 2016 Polytechnic Institute of New York University. # This file is part of noWorkflow. # Please, consult the license terms in the LICENSE file. """IPython Module""" from __future__ import (absolute_import, print_function, ...
mit
-3,581,050,087,282,086,000
29.615385
114
0.659966
false
4.234043
false
false
false
bartekbp/intelidzentaj
choregraphe-dir/personRecognizerProxy.py
1
2453
import httplib import random import string import sys import mimetypes import urllib2 import httplib import time import re def random_string(length): return ''.join(random.choice(string.letters) for ii in range(length + 1)) def encode_multipart_data(data, files, binary): boundary = random_stri...
mit
-1,507,222,798,856,588,800
29.050633
102
0.576845
false
3.995114
false
false
false
google/dl_bounds
dl_bounds/src/experiments/exp_sharpness.py
1
3102
# coding=utf-8 # Copyright 2018 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 t...
apache-2.0
-123,532,413,234,264,400
32.717391
74
0.661186
false
3.517007
false
false
false
ITOO-UrFU/open-programs
open_programs/apps/programs/migrations/0001_initial.py
1
12004
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-02 09:11 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): initial = True dependencies = [ ('competences', '__first__'), ...
unlicense
-2,469,500,295,048,216,000
60.683616
189
0.588478
false
3.264952
false
false
false
d3m3vilurr/Veil
modules/payloads/powershell/psPsexecVirtualAlloc.py
1
2739
""" Powershell method to inject inline shellcode. Builds a metasploit .rc resource file to psexec the powershell command easily Original concept from Matthew Graeber: http://www.exploit-monday.com/2011/10/exploiting-powershells-features-not.html Note: the architecture independent invoker was developed independently ...
gpl-3.0
6,437,733,450,173,481,000
45.423729
411
0.706462
false
3.05692
false
false
false
Artemkaaas/indy-sdk
vcx/wrappers/python3/vcx/api/issuer_credential.py
1
17127
from ctypes import * from vcx.common import do_call, create_cb from vcx.api.connection import Connection from vcx.api.vcx_stateful import VcxStateful import json class IssuerCredential(VcxStateful): """ The object of the VCX API representing an Issuer side in the credential issuance process. Assumes that ...
apache-2.0
-1,800,778,143,822,007,800
45.667575
172
0.624803
false
3.860041
false
false
false
PythonOptimizers/NLP.py
nlp/model/cysparsemodel.py
1
5725
try: from cysparse.sparse.ll_mat import LLSparseMatrix import cysparse.common_types.cysparse_types as types except: print "CySparse is not installed!" from nlp.model.nlpmodel import NLPModel from nlp.model.snlp import SlackModel from nlp.model.qnmodel import QuasiNewtonModel from pykrylov.linop import Cysp...
lgpl-3.0
-1,697,829,370,414,543,000
35.464968
80
0.591441
false
3.605164
false
false
false
jeremiah-c-leary/vhdl-style-guide
vsg/vhdlFile/classify/association_element.py
1
1756
from vsg.token import association_element as token from vsg.vhdlFile import utils def detect(iCurrent, lObjects): ''' association_element ::= [ formal_part => ] actual_part An association element will either end in a close parenthesis or a comma that is not within paranthesis. accociation_...
gpl-3.0
-9,160,156,864,442,821,000
32.769231
108
0.646355
false
3.605749
false
false
false
sivareddyg/UDepLambda
scripts/graphquestions/dump_to_database.py
1
1094
import sys import json import random import os import sqlite3 items = [] for line in sys.stdin: sent = json.loads(line) items.append((sent['id'], sent['sentence'])) random.seed(1) random.shuffle(items) random.shuffle(items) random.shuffle(items) random.shuffle(items) conn = sqlite3.connect('working/annotatio...
apache-2.0
8,913,069,452,210,691,000
27.051282
194
0.71298
false
3.50641
false
false
false
trosa/forca
applications/ForCA/controllers/profile.py
1
2821
from operator import itemgetter @auth.requires_login() def home(): if auth.has_membership('Professor') and not request.vars: prof_id = get_prof_id() redirect(URL(request.application, 'prof', 'home', vars=dict(prof_id=prof_id))) else: if request.vars: aluno_id = request....
gpl-2.0
2,363,282,468,083,769,000
39.085714
149
0.618674
false
2.814443
false
false
false
alejo8591/maker
sales/models.py
1
18836
# encoding: utf-8 # Copyright 2013 maker # License """ Sales module objects. """ from django.db import models from maker.core.models import Object, User, ModuleSetting from maker.identities.models import Contact from maker.finance.models import Transaction, Currency, Tax from django.core.urlresolvers import revers...
mit
-7,272,710,793,605,936,000
36.151874
124
0.552771
false
4.223318
false
false
false
PhilippMundhenk/IVNS
ECUInteraction/gui/plugins/views/event_line_view_impl.py
1
21119
''' Created on 27 Apr, 2015 @author: artur.mrowca ''' from gui.plugins.views.abstract_viewer_plug import AbstractViewerPlugin from PyQt4.Qt import QWidget from PyQt4 import QtGui import pyqtgraph as pg import numpy as np from numpy.core.defchararray import isnumeric from config import can_registration from io_processi...
mit
-4,896,457,529,280,774,000
41.751012
253
0.551541
false
3.777996
false
false
false
NECCSiPortal/NECCSPortal-dashboard
nec_portal/dashboards/project/history/forms.py
1
2741
# -*- coding: utf-8 -*- # 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
-1,124,052,965,189,229,300
43.209677
76
0.551988
false
4.478758
false
false
false
thefourtheye/elasticsearch-monitoring
url_checker.py
1
2079
from master import get_conn try: import simplejson as json except ImportError: import json with open("urls.json") as f: urls_data = json.load(f) def sort(x): return (x.get("success", False), x.get("url", "")) def table(title, l): temp = """ <table width='100%' border=1 cellpadding=3 ce...
mit
-1,274,268,218,179,104,300
26.72
77
0.46176
false
3.930057
false
false
false
MagazinnikIvan/pywinauto
pywinauto/timings.py
1
14481
# GUI Application automation and testing library # Copyright (C) 2006-2017 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
bsd-3-clause
-3,935,834,530,646,250,000
31.676744
94
0.585181
false
4.151663
false
false
false
cpaxton/predicator
predicator_robotiq/src/predicator_robotiq/s_model.py
1
5702
# predicator (c) 2014-2016, Chris Paxton # # based on some code taken from Robotiq's s_model_control package: # Software License Agreement (BSD License) # # Copyright (c) 2012, Robotiq, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
bsd-2-clause
-316,624,933,566,636,700
36.025974
136
0.639951
false
3.839731
false
false
false
wkz/ccp
ccp.py
1
2743
#!/usr/bin/env python import argparse import base64 import re import sys import time import pexpect class StdioStream(object): def pull(self): return sys.stdin.read() def push(self, data): return sys.stdout.write(data) class LocalStream(object): def __init__(self, spec): self.sp...
mit
-219,096,259,822,455,140
22.646552
75
0.593146
false
3.424469
false
false
false
sio2project/oioioi
oioioi/evalmgr/utils.py
1
1149
import logging import six from oioioi.base.utils.db import require_transaction from oioioi.contests.models import Submission from oioioi.evalmgr.models import QueuedJob logger = logging.getLogger(__name__) @require_transaction def mark_job_state(environ, state, **kwargs): """Sets status of given environ in job...
gpl-3.0
-7,408,691,713,724,728,000
30.916667
75
0.642298
false
3.868687
false
false
false
google-research/google-research
eim/models/base.py
1
9889
# coding=utf-8 # Copyright 2021 The Google Research 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-6,552,935,640,835,127,000
35.899254
80
0.631914
false
3.67075
false
false
false
stscieisenhamer/ginga
ginga/qtw/QtHelp.py
1
9071
# # QtHelp.py -- customized Qt widgets and convenience functions # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import glob import os import math import ginga.toolkit from ginga.util import iohelper configured = False toolkit = ginga.toolkit.toolkit #...
bsd-3-clause
8,053,044,321,151,345,000
25.837278
113
0.584169
false
3.675446
false
false
false
meyersbs/misc_nlp_scripts
Prosodylab-Aligner-master/eval.py
1
2762
#!/usr/bin/env python3 # eval.py: instrinsic evaluation for forced alignment using Praat TextGrids # Kyle Gorman <gormanky@ohsu.edu> from __future__ import division from aligner import TextGrid from sys import argv, stderr from collections import namedtuple from argparse import ArgumentParser CLOSE_ENOUGH = 20 TIE...
mit
5,643,734,626,767,116,000
32.682927
75
0.625272
false
3.742547
false
false
false
jbarnoud/panedr
tests/test_edr.py
1
8096
#-*- coding: utf-8 -*- """ Tests for panedr """ from __future__ import print_function, division import six import os import sys import unittest import pytest import contextlib import numpy import pandas import panedr import re # On python 2, cStringIO is a faster version of StringIO. It may not be # available on im...
lgpl-2.1
5,920,553,386,538,837,000
33.451064
81
0.600173
false
3.693431
true
false
false
whereaswhile/DLSR
common/SimPrvd.py
1
2133
#simulated regression data provider import os import sys import numpy as np import scipy.misc import glob sys.path.append("../convnet-folk_master") from w_util import readLines # define default parameters IN_DATA_SIZE=[5, 5, 1] OUT_DATA_SIZE=[16, 1] DATA_NUM=1 class SimSet: def __init__(self, paramfile): ...
gpl-2.0
8,928,693,029,719,009,000
21.452632
83
0.592124
false
2.938017
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #1 - Equation Group Cyber Weapons Auction - Invitation/EQGRP-Free-File/Firewall/EXPLOITS/ELCA/eligiblecandidate.py
1
5274
#!/usr/bin/env python2.7 import sys import tarfile from time import ctime,sleep from StringIO import StringIO from fosho import HTTPSExploit,run_exploit,randstr from fosho.requests.exceptions import * class ELCAExploit(HTTPSExploit): name = "ELIGIBLECANDIDATE" version = "v1.1.0.1" desc="What is the sound...
unlicense
518,061,169,539,913,150
29.485549
99
0.546454
false
3.43807
false
false
false
zaibacu/wutu
wutu/app.py
1
1626
import sys import jinja2 from flask import Flask, render_template from flask_restful import Api from functools import lru_cache from wutu.util import * from wutu.compiler.common import create_base, create_stream, get_data class CustomFlask(Flask): """ Enchanted Flask module """ jinja_options = Flask....
mit
2,517,502,439,025,025,000
26.559322
98
0.630996
false
3.799065
false
false
false
zhangyage/Python-oldboy
day11/day11_Django/day11_Django/settings.py
1
2738
# -*- coding:utf-8 -*- """ Django settings for day11_Django project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os...
apache-2.0
-3,399,185,197,010,899,500
22.925926
71
0.68808
false
2.833333
false
false
false
demisto/content
Packs/DeHashed/Integrations/DeHashed/DeHashed.py
1
11742
from typing import Union, Dict, Optional, List from CommonServerPython import * # noqa: E402 lgtm [py/polluting-import] # Disable insecure warnings requests.packages.urllib3.disable_warnings() INTEGRATION_CONTEXT_BRAND = "DeHashed" BASE_URL = "https://api.dehashed.com/" RESULTS_FROM = 1 RESULTS_TO = 50 class Clie...
mit
-7,711,274,168,360,616,000
35.69375
120
0.590785
false
3.974949
true
false
false
kumkee/SURF2016
src/marketdata/globalpricematrix.py
1
3459
from coinlist import CoinList import pandas as pd from time import time from time import sleep import numpy as np NOW = 0 FIVE_MINUTES = 60*5 FIFTEEN_MINUTES = FIVE_MINUTES * 3 HALF_HOUR = FIFTEEN_MINUTES * 2 HOUR = HALF_HOUR * 2 TWO_HOUR = HOUR * 2 FOUR_HOUR = HOUR * 4 DAY = HOUR * 24 YEAR = DAY * 365 CSV_DEFAULT = ...
gpl-3.0
28,672,610,416,348,292
27.121951
98
0.558832
false
3.387855
false
false
false
jangorecki/h2o-3
ec2/h2o-cluster-launch-instances.py
1
4600
#!/usr/bin/env python import os import sys import time import boto import boto.ec2 # Environment variables you MUST set (either here or by passing them in). # ----------------------------------------------------------------------- # os.environ['AWS_ACCESS_KEY_ID'] = '' os.environ['AWS_SECRET_ACCESS_KEY'] = '' os.env...
apache-2.0
4,029,750,662,069,026,000
25.900585
102
0.622391
false
3.490137
false
false
false
oksome/Tumulus
tumulus/tag.py
1
1267
# -*- coding: utf-8 -*- # This file is part of Tumulus. # # Copyright (C) 2013 OKso (http://okso.me) # # This program 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...
agpl-3.0
2,938,885,543,379,877,000
30.675
78
0.713496
false
3.886503
false
false
false
Calvinxc1/Data_Analytics
blog/2017-01-08/oldschool_linear.py
1
2522
#%% libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt #%% gradient descent linear regression function def grad_descent(dataset, features, predictor, learn_rate, max_iters = 10000): def initialize_model(dataset, features, predictor): constant_array = np.ones(shape = (len(d...
gpl-3.0
6,453,053,014,177,452,000
39.047619
119
0.666138
false
3.459534
false
false
false
jfterpstra/bluebottle
bluebottle/recurring_donations/tests/test_api.py
1
5153
from django.core.urlresolvers import reverse from rest_framework import status from bluebottle.bb_projects.models import ProjectPhase from bluebottle.geo.models import Country from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.test.factory_models.geo import CountryFactory from bl...
bsd-3-clause
-2,161,579,183,659,187,500
45.423423
84
0.579856
false
4.423176
true
false
false
z01nl1o02/tests
mxnet/cifar/cifar10/demo.py
1
2581
import mxnet as mx from mxnet.gluon import nn from mxnet import gluon import sys import utils import pdb,os,sys from importlib import import_module import logging import numpy as np trainBatchSize = 100 testBatchSize = 50 dataShape = (3,32,32) classNum = 10 pretrained = None checkpoints = 'checkpoints/' inputroot = "c...
gpl-2.0
-2,859,128,899,069,319,700
30.096386
130
0.649361
false
2.956472
true
false
false
kaiw/meld
meld/vc/__init__.py
1
3230
### Copyright (C) 2002-2005 Stephen Kennedy <stevek@gnome.org> ### 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, this list o...
gpl-2.0
4,926,562,048,158,405,000
32.645833
78
0.64644
false
3.919903
false
false
false
cbuben/cloud-init
cloudinit/config/cc_ssh_authkey_fingerprints.py
1
3690
# vi: ts=4 expandtab # # Copyright (C) 2012 Yahoo! Inc. # # Author: Joshua Harlow <harlowja@yahoo-inc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3, as # published by the Free Software Foundation. # # This...
gpl-3.0
5,022,524,162,396,625,000
34.142857
79
0.615989
false
3.565217
false
false
false
vincent-noel/libSigNetSim
libsignetsim/cwriter/CMathWriter.py
1
12709
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
gpl-3.0
-8,722,728,192,466,864,000
25.868922
113
0.634354
false
2.681224
false
false
false
Watchful1/RedditSubsBot
src/database/_keystore.py
1
1342
import discord_logging import utils from classes.key_value import KeyValue log = discord_logging.get_logger() class _DatabaseKeystore: def __init__(self): self.session = self.session # for pycharm linting self.log_debug = self.log_debug def save_keystore(self, key, value): if self.log_debug: log.debug(...
mit
-628,551,014,755,818,100
23.851852
69
0.695976
false
2.879828
false
false
false
kubevirt/client-python
kubevirt/models/v1beta1_data_volume_blank_image.py
1
2409
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1D...
apache-2.0
-3,823,461,405,543,961,600
23.333333
77
0.514321
false
4.404022
false
false
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/parso/python/parser.py
1
8593
from parso.python import tree from parso.python.token import PythonTokenTypes from parso.parser import BaseParser NAME = PythonTokenTypes.NAME INDENT = PythonTokenTypes.INDENT DEDENT = PythonTokenTypes.DEDENT class Parser(BaseParser): """ This class is used to parse a Python file, it then divides them into ...
mit
5,602,873,020,152,564,000
38.417431
98
0.56837
false
4.210191
false
false
false
migonzalvar/mfs2011-practicum-saas
webclient/agenda/views.py
1
5663
import datetime import time from django.http import Http404, HttpResponse from django.shortcuts import render_to_response, redirect from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib import messages from django.utils.translation import ugettext as _ from django....
isc
-347,853,227,394,681,300
35.535484
88
0.620696
false
3.962911
false
false
false
nexiles/nexiles.gateway.example
src/nexiles.gateway.example/setup.py
1
1111
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() version = '0.1.0' long_description = (read('../../readme.rst')) setup(name='nexiles.gateway.example', version=version, description="...
bsd-2-clause
-5,127,291,134,699,237,000
29.861111
73
0.594959
false
3.884615
false
false
false
CalebBell/fluids
fluids/safety_valve.py
1
22965
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal...
mit
-2,173,164,278,899,110,400
32.722467
107
0.610886
false
2.785324
false
false
false
fluidinfo/fom
tests/test_errors.py
1
2470
import unittest from fom.api import FluidApi from fom.errors import ( Fluid400Error, Fluid401Error, Fluid404Error, Fluid406Error, Fluid412Error, Fluid413Error, Fluid500Error, ) from _base import FakeFluidDB class ErrorTest(unittest.TestCase): def setUp(self): self.db = Fak...
mit
6,300,827,892,538,906,000
28.759036
71
0.583401
false
3.939394
true
false
false
rueckstiess/jiratopic
onlineldavb/onlineldavb.py
1
11963
# onlineldavb.py: Package of functions for fitting Latent Dirichlet # Allocation (LDA) with online variational Bayes (VB). # # Copyright (C) 2010 Matthew D. Hoffman # # 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...
apache-2.0
4,364,099,052,186,242,600
38.481848
79
0.593413
false
3.807447
false
false
false
kfricke/micropython-esp8266uart
test_esp8266uart.py
1
2523
import esp8266uart esp = esp8266uart.ESP8266(1, 115200) print('Testing generic methods') print('=======================') print('AT startup...') if esp.test(): print('Success!') else: print('Failed!') #print('Soft-Reset...') #if esp.reset(): # print('Success!') #else: # print('Failed!') print('Anothe...
mit
-2,034,658,239,474,637,800
23.269231
104
0.663892
false
3.02518
true
false
false
Sudy/ScrapyJD
ScrapyJdAzw/pipelines.py
1
2146
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html from scrapy import log #from scrapy.core.exceptions import DropItem from twisted.enterprise import adbapi import time import MySQLdb.cursors class Scr...
mit
-3,673,628,681,913,933,000
30.573529
81
0.503728
false
4.207843
false
false
false
gsauthof/utility
benchmark.py
1
11990
#!/usr/bin/env python3 # 2016, Georg Sauthoff <mail@georg.so>, GPLv3+ import argparse import collections import csv import datetime import itertools import logging # importing it conditionally iff svg generation is selected # otherwise, it may fail on a system with minimal matplotlib # install, i.e. where one of the ...
gpl-3.0
8,276,299,148,018,042,000
30.973333
120
0.621101
false
3.215339
false
false
false
EricE/evelink
evelink/api.py
1
9272
from cStringIO import StringIO import calendar import functools import logging import re import time from urllib import urlencode import urllib2 from xml.etree import ElementTree _log = logging.getLogger('evelink.api') try: import requests _has_requests = True except ImportError: _log.info('`requests` not...
mit
5,219,783,712,813,521,000
29.201954
87
0.584232
false
3.948893
false
false
false
KonradBreitsprecher/espresso
samples/ekboundaries.py
1
1441
from espressomd import System, shapes, electrokinetics import sys system = System(box_l = [10, 10, 10]) system.set_random_state_PRNG() #system.seed = system.cell_system.get_state()['n_nodes'] * [1234] system.cell_system.skin = 0.4 system.time_step = 0.1 ek = electrokinetics.Electrokinetics( lb_density=1, frict...
gpl-3.0
-5,257,314,025,805,871,000
29.659574
71
0.676613
false
2.467466
false
false
false
btwn2thvs/skype-me
skype-search/skype-dao.py
1
1424
import sqlite3 import logging DATABASE = '/Users/wcampbell/Library/Application Support/Skype/willcampbell_ha/main.db' unique_participants_sql = 'SELECT DISTINCT(participants) FROM Chats' messages_by_author_sql = 'SELECT from_dispname, body_xml FROM Messages where dialog_partner = ?' def most_common(t): word_coun...
mit
-6,106,299,922,487,574,000
29.319149
96
0.632725
false
3.614213
false
false
false
vgrem/Office365-REST-Python-Client
tests/sharepoint/test_publishing.py
1
1894
from office365.sharepoint.publishing.primary_city_time import PrimaryCityTime from office365.sharepoint.publishing.site_page_metadata_collection import SitePageMetadataCollection from office365.sharepoint.publishing.site_page_service import SitePageService from office365.sharepoint.publishing.video_service_discoverer i...
mit
-887,073,155,801,701,000
40.173913
100
0.73548
false
3.772908
true
false
false
google/eng-edu
ml/guides/text_classification/batch_train_sequence_model.py
1
6910
"""Module to train sequence model with batches of data. Vectorizes training and validation texts into sequences and uses that for training a sequence model - a sepCNN model. We use sequence model for text classification when the ratio of number of samples to number of words per sample for the given dataset is very lar...
apache-2.0
-3,906,409,651,647,072,000
37.176796
79
0.607236
false
4.270705
false
false
false
jwmatthews/cloud_forms_and_rhev_scripts
list_ips_of_vms.py
1
1405
#! /usr/bin/env python import os import sys try: from ovirtsdk.api import API from ovirtsdk.xml import params except: print "Please re-run after you have installed 'ovirt-engine-sdk-python'" print "Example: easy_install ovirt-engine-sdk-python" sys.exit() ENV_IP = "OVIRT_IP" ENV_USERNAME = "OVIRT...
gpl-2.0
3,157,357,523,736,450,000
24.545455
97
0.6121
false
3.061002
false
false
false
ppp2006/runbot_number0
neo_questions/iSmarthomeCtrl.py
1
2532
#!/usr/bin/env python #-*- coding:utf-8 -*- #Copyright (C) 2012-2013 Thecorpora Inc. # #This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later v...
lgpl-2.1
4,922,438,022,231,389,000
41.965517
240
0.696228
false
3.490196
false
false
false
jiherrero4/spark
app_local.py
1
13545
#!/usr/bin/env python # encoding: utf-8 import urllib import json import os import requests import sys import webbrowser import gspread from oauth2client.service_account import ServiceAccountCredentials from flask import Flask from flask import request from flask import make_response from flask_restful import Resource...
apache-2.0
2,362,968,916,008,415,000
33.771208
212
0.640766
false
3.222778
false
false
false
wxgeo/geophar
wxgeometrie/modules/cryptographie/__init__.py
1
12975
# -*- coding: utf-8 -*- ##--------------------------------------####### # Cryptographie # ##--------------------------------------####### # WxGeometrie # Dynamic geometry, graph plotter, and more for french mathematic teachers. # Copyright (C) 2005-2013 Nicolas Pourcelot # # ...
gpl-2.0
2,154,801,898,003,441,000
35.061453
228
0.562974
false
3.334194
false
false
false
mabuchilab/QNET
tests/algebra/test_pauli_matrics.py
1
2399
"""Test for PauliX, PauliY, PauliZ""" from sympy import I import pytest from qnet import ( PauliX, PauliY, PauliZ, LocalSigma, LocalSpace, LocalProjector, SpinSpace) def test_fock_pauli_matrices(): """Test correctness of Pauli matrices on a Fock space""" assert PauliX(1) == LocalSigma(0, 1, hs=1) + Loca...
mit
-3,286,054,655,234,274,000
43.425926
78
0.56857
false
2.585129
true
false
false
hujc91/uw-ffpg
pivTools/loglay_fit.py
1
1749
#---------- Forematters--------------------------------------------- import numpy as np #------------------------------------------------------------------- def loglay_fit(up, yp, ypthresL, ypthresH): ''' Curve fit for velocity profiles in the log-law layer of a wall-bounded shear flow u+ = a*log(y+) + b (...
mit
8,867,636,776,251,121,000
32.634615
85
0.600343
false
2.7984
false
false
false
nathanbjenx/cairis
cairis/bin/add_cairis_user.py
1
3248
#!/usr/bin/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 # "...
apache-2.0
7,796,071,425,858,259,000
40.113924
171
0.740148
false
3.362319
false
false
false
maciejkula/scipy
scipy/interpolate/polyint.py
1
32302
from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.special import factorial from scipy.lib.six import xrange __all__ = ["KroghInterpolator", "krogh_interpolate", "BarycentricInterpolator", "barycentric_interpolate", "PiecewisePolynomial", ...
bsd-3-clause
-1,840,114,695,129,729,800
33.621651
148
0.588354
false
3.916343
false
false
false