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
naritta/numpy
numpy/core/fromnumeric.py
1
94068
"""Module containing non-deprecated functions borrowed from Numeric. """ from __future__ import division, absolute_import, print_function import types import warnings import numpy as np from .. import VisibleDeprecationWarning from . import multiarray as mu from . import umath as um from . import numerictypes as nt ...
bsd-3-clause
3,115,133,959,482,765,300
29.801572
79
0.590594
false
3.838257
false
false
false
javitonino/tosh
tosh/ui/key_bindings.py
1
2604
from prompt_toolkit.key_binding.manager import KeyBindingManager from prompt_toolkit.key_binding.registry import ConditionalRegistry, MergedRegistry from prompt_toolkit.keys import Keys from prompt_toolkit.filters import Condition from prompt_toolkit.key_binding.bindings.basic import load_mouse_bindings from pymux.key...
bsd-3-clause
6,784,631,541,843,908,000
37.294118
111
0.723502
false
3.308767
false
false
false
orian/umo
pdf_scraping.py
1
12546
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> a='51.01 633.55 Td\n' b='(LICZBA UPRAWNIONYCH) Tj\n' re.compile(r'() () Td\\n') m = re.match(r'(?P<x>[\d\.]+) (?P<y>[\d\.]+) Td\n', a) print(m.groupdict()) t = re.match(r'\((?P<t>.*)\) Tj\n', b) print(t.groupdict()) # <codecell> import json import re ...
mit
6,954,699,004,487,293,000
29.525547
119
0.518811
false
3.117019
false
false
false
lehins/python-wepay
wepay/calls/subscription_plan.py
1
6530
from wepay.calls.base import Call class SubscriptionPlan(Call): """The /subscription_plan API calls""" call_name = 'subscription_plan' def __call__(self, subscription_plan_id, **kwargs): """Call documentation: `/subscription_plan <https://www.wepay.com/developer/reference/subscription_pla...
mit
-1,941,275,173,048,632,800
35.892655
85
0.597856
false
3.936106
false
false
false
danilobellini/dose
dose/__main__.py
1
1304
"""Dose GUI for TDD: main script / entry point.""" import sys, colorama from dose._legacy import DoseMainWindow from dose.misc import ucamel_method from dose.compat import wx, quote def main_wx(test_command=None): class DoseApp(wx.App): @ucamel_method def on_init(self): # Called by wxPython ...
gpl-3.0
5,664,995,708,182,096,000
29.325581
74
0.621166
false
3.514825
false
false
false
curiosityio/taiga-docker
taiga-back/taiga-back/taiga/webhooks/tasks.py
1
5767
# Copyright (C) 2013 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or modify ...
mit
-659,915,501,415,382,300
36.927632
104
0.605204
false
4.003472
false
false
false
Wintermute0110/plugin.program.advanced.MAME.launcher
resources/misc.py
1
18578
# -*- coding: utf-8 -*- # Copyright (c) 2016-2020 Wintermute0110 <wintermute0110@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distr...
gpl-2.0
-3,669,266,820,255,993,300
34.982558
103
0.542199
false
3.285613
false
false
false
equib/pyEQUIB
examples/cel_abundance_example.py
1
2500
# Example: calc_abundance() # determine ionic abundance from observed # flux intensity for gievn electron density # and temperature using calc_abundance function # from proEQUIB # # --- Begin MAIN program. --------------- # # import pyequib import atomneb import os import numpy as np # Locate datasets...
gpl-3.0
2,508,758,622,812,737,500
38.68254
160
0.7004
false
2.365184
false
false
false
basictheprogram/PyFileMaker
setup.py
1
1184
#!/usr/bin/env python from setuptools import setup from PyFileMaker import __version__, __doc__ setup( name='PyFileMaker', version=__version__, description='Python Object Wrapper for FileMaker Server XML Interface', long_description=__doc__, classifiers=[ 'Development Status :: 4 - Beta', ...
bsd-3-clause
-3,609,229,219,232,858,600
37.193548
80
0.651182
false
3.933555
false
false
false
flychensc/orange
stock/fundamental.py
1
11577
""" 基本面 """ import logging import datetime import numpy as np import pandas as pd import tushare as ts from stock.website import get_balance_sheet, get_profit_statement from stock.website import get_bdi_index from stock.website import get_shibor as _get_shibor from stock.technical import get_k_data logger = logging....
apache-2.0
-291,186,340,997,041,660
27.291066
131
0.555159
false
2.332937
false
false
false
soravux/scoop
scoop/_types.py
1
16474
# # This file is part of Scalable COncurrent Operations in Python (SCOOP). # # SCOOP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option)...
lgpl-3.0
3,102,980,587,790,168,000
37.492991
90
0.608292
false
4.56723
false
false
false
trabucayre/gnuradio
gr-utils/blocktool/core/parseheader_generic.py
1
13879
# # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Module to generate AST for the headers and parse it """ import os import re import codecs import logging from ..core.base import BlockToolException, BlockTool from ..core.iosigna...
gpl-3.0
8,944,930,581,482,712,000
38.206215
135
0.55285
false
4.333125
false
false
false
haw-vs-2015/py-monopoly
broker.py
1
7911
#!/usr/bin/env python from flask import Flask, request, make_response import requests import jsonpickle import sys # example: http://localhost:4567 bank_address = "http://172.17.0.2:4567" app = Flask(__name__) @app.route('/broker/<gameid>', methods=['GET', 'PUT']) def broker_management(gameid): """ GET: ge...
gpl-2.0
5,034,624,604,640,826,000
29.782101
80
0.565794
false
3.770734
false
false
false
vsajip/babel3
babel/messages/catalog.py
1
33275
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
bsd-3-clause
5,491,735,975,177,037,000
38.239387
80
0.549542
false
4.354796
false
false
false
pulkitpagare/adagio
adagio/core/apicalls.py
1
4033
import os from progressbar import * from modules.androguard import * from modules.androguard.core.analysis import * from modules.androlyze import * ######################################################################## # Android API Calls related functions # ########################...
gpl-2.0
2,465,849,812,538,087,400
33.767241
79
0.475081
false
4.012935
false
false
false
wood-galaxy/FreeCAD
src/Mod/Part/BOPTools/SplitAPI.py
2
5596
#/*************************************************************************** # * Copyright (c) Victor Titov (DeepSOIC) * # * (vv.titov@gmail.com) 2016 * # * * # * Th...
lgpl-2.1
4,418,135,975,970,365,000
53.330097
182
0.589886
false
4.01147
false
false
false
rougier/Neurosciences
basal-ganglia/topalidou-et-al-2014/cython/single-trial.py
1
1743
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. # # Contributors: Nicolas P. Rougier (Nicolas.Rougier@inria.fr) # ------------------------------------------------------------------...
bsd-3-clause
4,986,736,411,947,573,000
36.042553
79
0.550833
false
3.272556
false
false
false
tomasdubec/openstack-cinder
cinder/tests/test_huawei.py
1
36222
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Huawei Technologies Co., Ltd. # Copyright (c) 2012 OpenStack LLC. # 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 co...
apache-2.0
-8,803,194,907,962,715,000
43.281174
79
0.440754
false
4.579846
true
false
false
rlindner81/pyload
module/plugins/crypter/NCryptIn.py
1
11053
# -*- coding: utf-8 -*- import binascii import re import Crypto.Cipher.AES from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.Crypter import Crypter class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" __version__ = "1.41" __status__ = "testing" _...
gpl-3.0
904,395,237,527,534,000
34.200637
104
0.541934
false
3.882332
false
false
false
zenwalker/django-roxyfileman
roxyfileman/views.py
1
5535
from roxyfileman.utils import Upload, json_response, safepath, ok, err from django.views.decorators.csrf import csrf_exempt from roxyfileman.settings import default_settings from django.http import HttpResponse, FileResponse from django.shortcuts import render from django.conf import settings from PIL import Image impo...
gpl-3.0
6,162,158,645,860,693,000
22.158996
81
0.606323
false
3.399877
false
false
false
brachyprint/brachyprint
src/meshGUI.py
1
4382
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # Brachyprint -- 3D printing brachytherapy moulds # Copyright (C) 2013-14 James Cranch, Martin Green and Oliver Madge # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
gpl-2.0
2,586,173,579,462,302,700
34.33871
190
0.65016
false
3.630489
false
false
false
MingDai/kolibri
kolibri/plugins/registry.py
1
4058
""" How plugins work ---------------- From a user's perspective, plugins are enabled and disabled through the command line interface or through a UI. Users can also configure a plugin's behavior through the main Kolibri interface. .. note:: We have not yet written a configuration API, for now just make sure ...
mit
324,545,486,676,025,800
32.262295
111
0.609906
false
4.664368
true
false
false
NCBI-Hackathons/Cancer_Epitopes_CSHL
src/generate_fasta.py
1
3540
#!python3 """ Extract mutant and wildtype peptide sequences for missense variants in a VCF file Usage: generate_fasta.py --input=FILE_IN --output=FILE_OUT --peptide_sequence_length=INT generate_fasta.py -h | --help Arguments: --input=FILE_IN VEP-annotated input VCF file --output=...
mit
1,805,158,310,033,789,000
36.263158
158
0.603955
false
3.508424
false
false
false
mozilla/make.mozilla.org
make_mozilla/bsd/extractors/json.py
1
1385
import pytz from datetime import datetime, timedelta def event_name(event_json): return {'name': event_json['name']} def event_times(event_json): tz = pytz.timezone(event_json['local_timezone']) db_datetime = datetime.strptime( event_json['start_datetime_system'], '%Y-%m-%d %H:%M:%S' )...
bsd-3-clause
8,400,766,764,056,846,000
33.625
99
0.668592
false
3.345411
false
false
false
kannon92/psi4
psi4/driver/procedures/mcscf/diis_helper.py
1
3619
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2016 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
gpl-2.0
2,395,223,268,788,830,700
30.469565
88
0.576955
false
3.506783
false
false
false
ashwyn/eden-message_parser
modules/eden/irs.py
1
58442
# -*- coding: utf-8 -*- """ Sahana Eden Incident Reporting Model @copyright: 2009-2012 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...
mit
-1,474,848,992,818,144,500
43.85188
150
0.421426
false
5.012608
false
false
false
simonsmiley/iliasCorrector
iliasCorrector/views.py
1
3787
from flask import (render_template, flash, redirect, url_for, request, send_from_directory, make_response) from iliasCorrector import app, db from iliasCorrector.models import Exercise, Submission, File from iliasCorrector import utils from werkzeug import secure_filename from sqlalchemy import func ...
mit
1,261,291,198,078,243,600
38.863158
98
0.670716
false
3.809859
false
false
false
Polarcraft/KbveBot
commands/define.py
1
1674
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either ve...
gpl-2.0
-984,176,177,623,349,500
37.930233
146
0.681004
false
3.687225
false
false
false
pmaunz/pyqtgraph
examples/imageAnalysis.py
2
2676
# -*- coding: utf-8 -*- """ Demonstrates common image analysis tools. Many of the features demonstrated here are already provided by the ImageView widget, but here we present a lower-level approach that provides finer control over the user interface. """ import initExample ## Add path to library (just for examples; yo...
mit
-8,799,665,292,123,505,000
25.49505
83
0.730568
false
3.020316
false
false
false
pierrejean-coudert/winlibre_pm
package_manager/smart/backends/slack/pm.py
1
3849
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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-2.0
1,070,567,428,996,246,500
36.009615
80
0.529228
false
4.295759
false
false
false
mathturtle/tomviz
tomviz/python/Recon_WBP.py
1
5137
import numpy as np from scipy.interpolate import interp1d import tomviz.operators import time class ReconWBPOperator(tomviz.operators.CancelableOperator): def transform_scalars(self, dataset, Nrecon=None, filter=None, interp=None): """ 3D Reconstruct from a tilt series using Weighted Back-project...
bsd-3-clause
-8,241,763,846,337,076,000
33.246667
80
0.559081
false
3.50888
false
false
false
openstack/python-zaqarclient
examples/keystone_auth.py
1
1854
# Copyright 2014 Red Hat, Inc. # Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
4,170,776,682,744,117,000
32.107143
78
0.601942
false
3.79918
false
false
false
mikaelbrandin/armory
client/configurations.py
1
5765
__author__ = 'mikael.brandin@devolver.se' import argparse from collections import namedtuple import os import datetime from . import exceptions as exceptions from client import output import configparser ConfigName = namedtuple('ConfigName', ['module', 'branch']) # Constants META_SECTION = 'general' class Conf...
apache-2.0
-5,530,131,425,643,751,000
31.201117
142
0.620684
false
3.85743
true
false
false
elementh/python-noob-files
basic-calculator.py
1
3117
# # # # # # # # # # # # # # # # Lucas Maximiliano Marino # # (c) 2016 MIT License # # http://lucasmarino.me # # # # # # # # # # # # # # # # # # IMPORTS AND VARIABLES # import os state = True # # MAGIC() # def magic(text, kind): numb = input(text) try: if kind == "float": numb = f...
mit
6,499,721,446,515,196,000
29.558824
95
0.471607
false
3.578645
false
false
false
dennybaa/mistral
mistral/services/actions.py
1
2978
# Copyright 2015 - Mirantis, 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 ag...
apache-2.0
5,693,583,887,435,943,000
28.78
77
0.638012
false
3.817949
false
false
false
andreybarsky/chess
chess_gui.py
1
10155
#!/usr/bin/env python # -*- coding: utf-8 -*- import wx import json import subprocess import threading import sys def square_to_coord(square): bottom_corner = (480, 0) unit = 60 squarex = square[0] squarey = square[1]-1 newx = (squarex*unit) - 60 newy = bottom_corner[0] - (unit + squarey*unit...
mit
-7,147,930,924,481,236,000
36.611111
121
0.550369
false
3.508984
false
false
false
Tayamarn/socorro
socorro/lib/util.py
1
5107
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import print_function from itertools import islice import logging import sys import threading import tr...
mpl-2.0
-8,529,275,460,266,461,000
25.598958
92
0.617388
false
3.907422
true
false
false
bswartz/cinder
cinder/volume/drivers/coprhd/helpers/host.py
1
3759
# Copyright (c) 2016 EMC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-7,192,939,351,134,362,000
35.144231
79
0.592179
false
3.820122
false
false
false
shivekkhurana/learning
python/scripts/email_extracter/sc.py
1
1072
# this script will open a file with email addresses in it, then extract # those address and write them to a new file import os import re # vars for filenames filename = 'em.txt' newfilename = 'er.txt' # read file if os.path.exists(filename): data = open(filename,'r') bulkemails = data.read() else: ...
mit
8,760,684,126,857,728,000
19.918367
93
0.643657
false
2.945055
false
false
false
Debith/py3traits
examples/instance_is_composed_from_cherrypicked_property_in_class.py
1
1958
#!/usr/bin/python -tt # -*- coding: utf-8 -*- from pytraits import extendable # Let's start by creating a simple class with some values. It contains # only instance variables. Composed property will have access to all # these variables. @extendable class ExampleClass: def __init__(self): self.public = 42 ...
apache-2.0
1,769,988,158,182,770,400
34.6
83
0.72523
false
3.900398
false
false
false
facebookexperimental/eden
eden/scm/edenscm/mercurial/commands/doctor.py
1
20644
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. from __future__ import absolute_import import contextlib import os import typing from bindings import ( dag, metalog, mutationstore, n...
gpl-2.0
-1,015,190,256,260,509,200
32.458671
115
0.574501
false
3.796249
false
false
false
NathanLawrence/IrmaTracker
django-project/signals/admin.py
1
1368
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models # Register your models here. @admin.register(models.SignalType) class SignalTypeAdmin(admin.ModelAdmin): list_display = ['name', 'slug'] search_fields = ['name', 'slug'] prepopulated_fie...
mit
-6,921,979,871,955,821,000
24.811321
77
0.475877
false
4.209231
false
false
false
ic-labs/django-icekit
icekit/plugins/links/migrations/0005_auto_20170511_1909.py
1
1047
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from .. import appsettings class Migration(migrations.Migration): dependencies = [ ('ik_links', '0004_auto_20170314_1401'), ('ik_links', '0004_auto_20170306_1529'), ] operations = [ ...
mit
7,395,724,843,972,344,000
33.9
135
0.618911
false
3.950943
false
false
false
moocowmoo/dashman
bin/dashvote.py
1
20103
#!/usr/bin/env python import atexit import curses import datetime import json import os import random import re import subprocess import sys import tempfile import termios import time import tty VERSION = '0.0.7' git_dir = os.path.abspath( os.path.join( os.path.dirname( os.path.abspath(__file...
mit
-6,674,594,031,798,310,000
33.780277
166
0.53783
false
3.417715
false
false
false
dotCID/Graduation
Ableton/LiveOSC/LiveOSC.py
1
36791
""" # Copyright (C) 2007 Nathan Ramella (nar@remix.net) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version....
gpl-2.0
-5,615,109,953,633,236,000
36.686646
140
0.509282
false
3.998153
false
false
false
mollyproject/mollyproject
molly/conf/default_settings.py
1
6635
# default_settings.py: Default Django settings that it makes sense to apply # across all installations. # This refers to Django's 'Site' framework, which Molly does not use. It is # recommended to leave this at its default setting SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not #...
apache-2.0
-1,831,143,924,529,878,300
64.04902
175
0.762622
false
4.204689
false
false
false
johngumb/danphone
mui-d630.py
1
24845
#!/usr/bin/python # # OpenPMR - tools to make old PMR radios useful. # # Copyright (C) 2013,2014 John Gumb, G4RDC # # This file is part of OpenPMR. # OpenPMR 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, e...
gpl-3.0
6,560,712,284,892,118,000
27.329532
113
0.56941
false
3.165371
false
false
false
denyhosts/denyhosts
DenyHosts/regex.py
1
3180
import re ################################################################################# # REGULAR EXPRESSIONS ARE COOL. Check out Kodos (http://kodos.sourceforge.net) # ################################################################################# # DATE_FORMAT_REGEX = re.compile(r"""(?P<month>[A-z]{3,3})\s*(...
gpl-2.0
653,842,250,260,938,800
52.898305
375
0.554088
false
2.418251
false
false
false
lzm0706/language-model
test.py
1
4618
import sys import re from collections import Counter #import collections from itertools import combinations from math import log ''' def smoothing(data): #print(len(data)) smdata=data for key in smdata.keys(): smdata[key]=smdata[key]+1 return smdata ''' traintext=sys.argv[2] lmlist=sys.argv[1]...
gpl-3.0
-597,361,739,709,242,900
22.262887
75
0.568262
false
2.337824
false
false
false
edx/django-pyfs
djpyfs/djpyfs.py
1
5932
""" This is a thin veneer around a `pyfilesystem`. It adds a few bits of functionality: 1) Django configuration. This can go to Amazon S3 or a static filesystem. 2) The ability to get URLs for objects stored on the filesystem. 3) The ability to create objects with a limited lifetime. A task can garbage-collect those o...
apache-2.0
-5,370,170,221,802,633,000
34.100592
110
0.639751
false
3.877124
false
false
false
NunaHealth/json_delta
src/json_delta/_diff.py
1
13161
# -*- encoding: utf-8 -*- # json_delta: a library for computing deltas between JSON-serializable # structures. # json_delta/_diff.py # # Copyright 2012‒2015 Philip J. Roberts <himself@phil-roberts.name>. # BSD License applies; see the LICENSE file, or # http://opensource.org/licenses/BSD-2-Clause '''Functions for compu...
bsd-2-clause
5,005,126,007,948,716,000
36.597143
85
0.600958
false
3.585559
false
false
false
dodonator/area51
Kryptotests/OneTimePad/Beta/v0.1(D)OneTimePad.py
1
12920
#coding: utf-8 # Momentan in der Entwicklung befindliche Version! import os import random import getpass import time import datetime import sys os.system('clear') class oneTimePad(object): def __init__(self): NCF = noCryptoFunctions() self.alphabet = NCF.alphabetGenerierung() def steganoKrypto(self,klartext,ge...
gpl-3.0
4,753,217,025,097,092,000
25.73029
98
0.686098
false
2.578663
false
false
false
teonlamont/mne-python
mne/fixes.py
2
51461
"""Compatibility fixes for older version of python, numpy and scipy If you add content to this file, please give the version of the package at which the fix is no longer needed. # XXX : originally copied from scikit-learn """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoq...
bsd-3-clause
-6,431,414,644,471,259,000
34.417068
106
0.574707
false
3.884729
false
false
false
cujam/Pi_face
camera.py
1
6241
#-*- coding:utf-8 -*- import cv2 import time from tool.ConnectMysql import * from tool.faceapi import * from tool.log import * from tool.board import * from tool.email import * import threading class Camera: ''' 摄像头模块以及人脸和人体识别 ''' def __init__(self): self.mysql = Mysql() self.logging = ...
gpl-3.0
1,500,436,264,549,425,700
31.570652
123
0.482897
false
3.498541
false
false
false
schleichdi2/OPENNFR-6.0-CORE
opennfr-openembedded-core/scripts/lib/devtool/runqemu.py
1
3175
# Development tool - runqemu command plugin # # Copyright (C) 2015 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that ...
gpl-2.0
652,830,116,797,236,500
43.097222
160
0.682835
false
3.934325
true
false
false
Azure/azure-sdk-for-python
sdk/digitaltwins/azure-digitaltwins-core/azure/digitaltwins/core/_generated/aio/operations/_query_operations.py
1
5829
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-1,297,216,339,586,366,700
45.261905
133
0.660834
false
4.346756
false
false
false
ah-anssi/SecuML
SecuML/experiments/ActiveLearning/UpdateModelExp.py
1
2723
# SecuML # Copyright (C) 2017 ANSSI # # SecuML 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 version. # # SecuML is distributed in the hope t...
gpl-2.0
-4,505,530,996,631,867,400
36.819444
95
0.652589
false
4.076347
false
false
false
maremaremare/elisa_v
elisa_v/content/migrations/0001_initial.py
1
2764
# -*- 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 'Page' db.create_table(u'content_page', ( (u'id', self.gf('django.db.models.field...
mit
3,291,213,521,396,249,000
54.3
152
0.58864
false
3.603651
false
false
false
smainand/scapy
scapy/layers/smb.py
1
18582
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ SMB (Server Message Block), also known as CIFS. """ from scapy.packet import * from scapy.fields import * from scapy.laye...
gpl-2.0
-3,241,717,524,491,622,000
48.552
236
0.528684
false
3.888261
false
false
false
DinoTools/python-overpy
overpy/__init__.py
1
55210
from collections import OrderedDict from datetime import datetime from decimal import Decimal from urllib.request import urlopen from urllib.error import HTTPError from xml.sax import handler, make_parser import xml.etree.ElementTree import json import re import time from typing import Any, Callable, ClassVar, Dict, Li...
mit
2,301,919,963,291,948,800
32.95449
120
0.550498
false
4.216435
false
false
false
techlib/wifinator
wifinator/aruba.py
1
4679
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- import re from threading import Lock from requests import Session, HTTPError from time import time from xml.etree.ElementTree import XML, ParseError from requests.packages.urllib3.exceptions import InsecureRequestWarning from requests.packages.urllib3 import disable_war...
mit
8,544,314,082,599,784,000
29.782895
85
0.563368
false
3.925336
false
false
false
cdgriffith/Reusables
reusables/process_helpers.py
1
4595
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Part of the Reusables package. # # Copyright (c) 2014-2020 - Chris Griffith - MIT License import os import sys import subprocess from multiprocessing import pool from functools import partial from reusables.shared_variables import * __all__ = ["run", "run_in_pool"] ...
mit
4,322,236,437,297,776,600
35.181102
117
0.639391
false
4.048458
false
false
false
SkierPGP/Skier
init.py
1
1602
import threading from flask import render_template import cfg def init(app): from skier import frontend from skier import pgpapi from skier import pks from cfg import API_VERSION from skier import pgpactions if not cfg.cfg.config.features.disable_frontend: app.register_blueprint(fron...
agpl-3.0
-5,073,029,300,028,470,000
29.807692
84
0.654806
false
3.708333
true
false
false
bliksemlabs/bliksemintegration
exporters/ridiff2.py
1
12243
import psycopg2 import psycopg2.extras import sys #usage $from_date_iso8601 $to_date_iso8601 $OPERATORS def writeout(f, cur): while True: out = cur.fetchone() if out is None: break f.write(','.join(out) + '\r\n') conn = psycopg2.connect("dbname='ridprod'") conn.set_client_enc...
bsd-2-clause
2,596,350,855,669,492,000
44.344444
820
0.65907
false
3.208333
false
false
false
jwesheath/conference-central-api
conference.py
1
27479
from datetime import datetime import endpoints from protorpc import messages from protorpc import message_types from protorpc import remote from google.appengine.ext import ndb from google.appengine.api import memcache from google.appengine.api import taskqueue from models import BooleanMessage from models import C...
apache-2.0
-3,043,745,122,574,124,500
44.047541
79
0.589359
false
4.555537
false
false
false
trevor/calendarserver
contrib/performance/_event_change.py
1
3820
## # Copyright (c) 2010-2014 Apple 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 required by applicab...
apache-2.0
-8,568,640,147,147,008,000
31.649573
109
0.674607
false
3.886063
false
false
false
QudevETH/PycQED_py3
pycqed/simulations/pauli_transfer_matrices.py
1
5903
import numpy as np """ This file contains pauli transfer matrices for all basic qubit operations. """ I = np.eye(4) # Pauli group X = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, -1, 0], [0, 0, 0, -1]], dtype=int) Y = np.array([[1, 0, 0, 0], [0, -1, 0, 0], ...
mit
-5,739,007,006,011,545,000
35.214724
83
0.360325
false
2.181449
false
false
false
ETegro/ETConf
partners/admin.py
1
2086
# ETConf -- web-based user-friendly computer hardware configurator # Copyright (C) 2010-2011 ETegro Technologies, PLC <http://etegro.com/> # Sergey Matveev <sergey.matveev@etegro.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
agpl-3.0
-1,614,639,578,225,776,600
38.358491
101
0.722915
false
3.578045
false
false
false
sphoebs/rockshell
pipeline/util.py
1
6975
#!/usr/bin/python2.5 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
1,058,982,152,402,288,800
29.458515
78
0.66724
false
3.803162
false
false
false
alan-ra/gameTrade
gt/admin.py
1
1330
from django.contrib import admin #from django.contrib.auth.admin import UserAdmin from gt.models import * #from gt.forms import * # Register your models here. class KindAdmin(admin.ModelAdmin): model = Kind list_display = ['group', 'description'] admin.site.register(Kind, KindAdmin) class DevAdmin(admin.Mode...
gpl-3.0
7,569,309,597,738,633,000
25.6
102
0.717293
false
3.375635
false
false
false
IA-MP/KnightTour
libs/graph/Graph.py
1
11556
from libs.graph.DLinkedList import Queue, DoubledLinkedList as List from libs.graph.PriorityQueue import PriorityQueueBinary as PriorityQueue from libs.graph.Tree import * #it is better to use a DoubledLinkedList to operate with a great efficiency on #the lists those will be used in the graph representation class Node...
mit
-5,495,444,753,568,681,000
37.013158
128
0.588958
false
4.147882
false
false
false
jelmer/bzr-rewrite
pseudonyms.py
1
6392
# Copyright (C) 2009 by Jelmer Vernooij <jelmer@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This pr...
gpl-2.0
4,091,328,492,961,752,000
29.583732
81
0.638767
false
3.59303
false
false
false
yahoo/bossmashup
yos/boss/ysearch.py
1
2217
#Copyright (c) 2011 Yahoo! Inc. All rights reserved. Licensed under the BSD License. # See accompanying LICENSE file or http://www.opensource.org/licenses/BSD-3-Clause for the specific language governing permissions and limitations under the License. """ This is the Boss search API search is the main function Examp...
bsd-3-clause
1,023,666,650,626,874,400
33.640625
165
0.683807
false
3.213043
true
false
false
crowdhackathon-apodeiksi/tax-o-drome
tax-o-drome-api/app/app/settings.py
1
4037
""" Django settings for app project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths insi...
gpl-2.0
-7,872,202,097,630,832,000
26.469388
103
0.697052
false
3.263541
false
false
false
formalmethods/intrepyd
tests/traffic_light.py
1
4451
""" Copyright (C) 2017 Roberto Bruttomesso <roberto.bruttomesso@gmail.com> This file is distributed under the terms of the 3-clause BSD License. A copy of the license can be found in the root directory or at https://opensource.org/licenses/BSD-3-Clause. Author: Roberto Bruttomesso <roberto.bruttomesso@gmail.com> Da...
bsd-3-clause
4,430,705,504,138,592,000
42.213592
98
0.610874
false
2.965356
false
false
false
bburan/psiexperiment
psi/controller/calibration/acquire.py
1
1263
import time class Acquire(object): def __init__(self, engine, queue, epoch_size): # Setup output self.ao_queue = queue self.ai_queue = queue.create_connection() self.ai_epochs = [] self.engine = engine self.complete = False self.engine.register_ao_callback...
mit
-5,059,281,541,524,644,000
27.066667
77
0.589865
false
3.537815
false
false
false
maxive/erp
addons/l10n_be_hr_payroll_fleet/models/fleet.py
2
7573
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import babel.dates from odoo import api, fields, models from odoo.fields import Datetime class FleetVehicle(models.Model): _inherit = 'fleet.vehicle' co2_fee = fields.Float(compute='_compute_co2_fee', string=...
agpl-3.0
-8,124,838,845,275,498,000
45.460123
184
0.609402
false
3.493081
false
false
false
lgarren/spack
lib/spack/spack/cmd/blame.py
1
4596
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-9,175,143,795,897,328,000
34.083969
78
0.603786
false
3.739626
false
false
false
eustislab/horton
tools/codecleaner.py
1
1724
#!/usr/bin/env python # -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2015 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
gpl-3.0
-1,398,137,947,129,084,000
28.220339
76
0.649652
false
3.683761
false
false
false
tonybaloney/st2
st2api/st2api/controllers/v1/aliasexecution.py
1
7905
# 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
2,460,295,195,834,012,700
42.196721
100
0.624415
false
4.319672
false
false
false
vadzimt/python-nss
doc/examples/verify_cert.py
1
11707
from __future__ import absolute_import from __future__ import print_function import argparse import sys import nss.nss as nss import nss.error as nss_error ''' This example illustrates how one can use NSS to verify (validate) a certificate. Certificate validation starts with an intended usage for the certificate and...
gpl-2.0
5,058,057,332,866,849,000
40.221831
116
0.608183
false
4.205101
false
false
false
intel-analytics/analytics-zoo
pyzoo/zoo/common/utils.py
1
5425
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
apache-2.0
-3,218,170,877,710,068,000
30.540698
89
0.629493
false
3.685462
false
false
false
bmya/tkobr-addons
tko_point_of_sale_discount_on_order/point_of_sale.py
1
2757
from openerp.osv import osv, fields import logging _logger = logging.getLogger(__name__) import openerp.addons.decimal_precision as dp class pos_order(osv.osv): _inherit = 'pos.order' def _amount_all(self, cr, uid, ids, name, args, context=None): cur_obj = self.pool.get('res.currency') res =...
agpl-3.0
-4,863,822,144,640,374,000
33.898734
84
0.500544
false
4.024818
false
false
false
ekansa/open-context-py
opencontext_py/apps/edit/inputs/views.py
1
33457
import json from django.views.decorators.cache import never_cache from django.http import HttpResponse, Http404 from opencontext_py.libs.rootpath import RootPath from django.template import RequestContext, loader from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.cache import cache...
gpl-3.0
1,059,389,435,304,288,300
41.948652
104
0.498281
false
4.845329
false
false
false
andrewdodd/drf-timeordered-pagination
setup.py
1
2571
import codecs import os import re from setuptools import setup, find_packages ############################################################################### NAME = "drf_timeordered_pagination" PACKAGES = find_packages(where="src") META_PATH = os.path.join("src", "timeordered_pagination", "__init__.py") KEYWORDS = ...
mit
3,072,226,323,324,657,700
26.645161
79
0.563983
false
3.843049
false
false
false
digitalocean/netbox
netbox/extras/migrations/0022_custom_links.py
1
1959
from django.db import migrations, models import django.db.models.deletion import extras.models class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('extras', '0021_add_color_comments_changelog_to_tag'), ] operations = [ migra...
apache-2.0
-4,466,386,778,810,660,400
39.8125
128
0.587545
false
4.555814
false
false
false
r4fek/django-cassandra-engine
django_cassandra_engine/utils.py
1
4624
import inspect from django.conf import settings from django.db import DEFAULT_DB_ALIAS import django from .compat import cqlengine class CursorWrapper(object): """ Simple CursorWrapper implementation based on django.db.utils.CursorWrapper """ def __init__(self, cursor, db): self.cursor = cu...
bsd-2-clause
8,429,201,329,871,066,000
26.52381
78
0.609645
false
4.242202
false
false
false
namboy94/kudubot
kudubot/helper.py
1
3631
"""LICENSE Copyright 2015 Hermann Krumrey <hermann@krumreyh.com> This file is part of kudubot. kudubot 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 lat...
gpl-3.0
2,426,591,795,977,430,500
33.580952
77
0.646654
false
4.231935
true
false
false
IronLanguages/ironpython2
Src/StdLib/Lib/textwrap.py
1
17280
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> __revision__ = "$Id$" import string, re try: _unicode = unicode except NameError: # If Python is built without Unicode support, the un...
apache-2.0
2,995,578,242,217,354,000
39.092807
80
0.591956
false
4.17795
false
false
false
GoogleCloudPlatform/solutions-vision-search
categorizer/trainer/task.py
1
9255
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
-4,837,415,702,709,947,000
33.924528
78
0.676715
false
3.724346
false
false
false
CN-UPB/OpenBarista
components/decaf-oscar/decaf_oscar/bunnyconnector.py
1
7381
from twisted.internet import defer from decaf_utils_rpc.rpc_layer import RpcLayer from . import __version__ from . import version_date __author__ = "Andreas Krakau" __date__ = "$20-oct-2015 12:22:23$" class BunnyConnector(object): def __init__(self, url, logger): self.logger = logger self._rpc = ...
mpl-2.0
8,531,846,525,825,336,000
34.485577
140
0.482049
false
4.517136
false
false
false
n1cfury/BlackHatPython
pic_carver.py
1
2116
def banner(): print "[***] pCAP processing p56 [***]" def http_assembler(pcap_file): carved_images = o faced_detected = 0 a = rdpcap(pacap_file) sessions = a.sessions() for session in sesions: http_payload = "" for packet in sessions[session]: try: if packet[TCP].dport == 80 or packet[TCP].sport ==...
mit
6,836,528,785,822,264,000
28.802817
83
0.65879
false
2.675095
false
false
false
PageArkanis/StEVE
steve/assets.py
1
3768
from steve.backend.sqlitedb import SDB from steve.item import Item from steve.type import Type from steve.market_group import MarketGroup from steve.planet_schematic import PlanetSchematic class Assets(object): def __init__(self): self._types = {} # { <uid...
agpl-3.0
-7,003,370,684,942,601,000
30.932203
81
0.513004
false
3.995758
false
false
false
ryanmiao/libvirt-test-API
repos/storage/find_netfs_pool_sources.py
1
2093
#!/usr/bin/env python # Test finding storage pool source of 'netfs' type from xml.dom import minidom import libvirt from libvirt import libvirtError from src import sharedmod from utils import utils required_params = ('sourcehost',) optional_params = {'xml' : 'xmls/netfs_pool_source.xml', } def c...
gpl-2.0
-795,277,630,839,177,000
28.478873
79
0.641663
false
3.847426
false
false
false
lono-devices/lono-python
lono/device.py
1
3815
class Device(object): def __init__(self, client, device_id): self.client = client self.device_id = device_id def set_zone(self, zone_id, state): """ set_zone(zone_id, state) Turn on or off a zone. When specifing a zone, keep in mind they are zero based, so ...
mit
-8,552,196,591,376,769,000
26.846715
89
0.499607
false
3.884929
false
false
false
ppries/tensorflow
tensorflow/python/debug/debug_data.py
1
34237
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
4,304,568,908,394,589,700
31.544677
80
0.647107
false
4.009486
false
false
false
sharpton-lab/claatu
arc/travtree.py
1
12850
#!/usr/bin/python # Claatu::trav_tree -first iteration of Claatu #Copyright (C) 2015 Christopher A. Gaulke #author contact: gaulkec@science.oregonstate.edu # #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,768,405,143,906,391,000
26.398721
159
0.67284
false
3.050807
true
false
false
reimandlab/ActiveDriverDB
website/stats/plots/enrichment.py
1
8915
from collections import defaultdict from pathlib import Path from helpers.plots import grouped_box_plot, p_value_annotations, box_plot from helpers.cache import cache_decorator, Cache from analyses.enrichment import ptm_on_random from models import InheritedMutation, MC3Mutation, lru_cache from ..store import cases ...
lgpl-2.1
6,855,819,001,079,686,000
33.026718
122
0.595064
false
3.345216
false
false
false
Percona-QA/package-testing
molecule/psmdb40-upgrade/molecule/default/tests/test_psmdb40_upgrade.py
1
5171
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') DEB_PACKAGES = ['percona-server-mongodb', 'percona-server-mongodb-server', 'percona-server-mongodb-mongos', 'perc...
gpl-2.0
8,070,351,903,910,461,000
33.245033
117
0.658287
false
3.344761
true
false
false
jr-garcia/Engendro3D
Demos/light_demo.py
1
7944
from math import sin from random import randint, random from cycgkit.cgtypes import vec3 from _base._BaseDemo import _Demo_Base, runDemo, tubeMODEL, logLevelsEnum class Demo(_Demo_Base): def __init__(self): super(Demo, self).__init__() self.texturesToLoad = [['e3dlogo.png', 'logo'], ['./textures...
mit
-1,060,894,738,424,444,500
40.160622
117
0.586984
false
3.180144
false
false
false