repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
kpayson64/grpc
tools/run_tests/artifacts/artifact_targets.py
1
14711
#!/usr/bin/env python # Copyright 2016 gRPC 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 o...
apache-2.0
2,395,240,654,222,034,400
37.815303
104
0.54585
false
IQSS/miniverse
miniverse/settings/local_with_routing.py
1
6078
""" Settings template for running two databases: - Existing Dataverse databases (we only read it) - Second database for Django core apps + Miniverse apps Please read through and change the settings where noted """ from __future__ import absolute_import import sys from os import makedirs, environ from os.path i...
mit
906,195,234,186,292,000
33.534091
99
0.557585
false
sanluca/py-acqua
setup.py
1
1902
# -*- coding: iso-8859-15 -*- #Copyright (C) 2005, 2008 Py-Acqua #http://www.pyacqua.net #email: info@pyacqua.net # # #Py-Acqua 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 t...
gpl-2.0
8,070,389,984,959,156,000
32.368421
120
0.679811
false
bhermansyah/DRR-datacenter
scripts/misc-boedy1996/glofas_refactor.py
1
6276
import os, sys os.environ.setdefault("DJANGO_SETTINGS_MODULE","geonode.settings") import csv from django.db import connection, connections from django.conf import settings from geodb.models import Glofasintegrated, AfgBasinLvl4GlofasPoint from netCDF4 import Dataset, num2date import numpy as np from django.contrib.g...
gpl-3.0
6,982,054,730,688,295,000
33.108696
357
0.605003
false
deavid/bjsonrpc
bjsonrpc/main.py
1
2824
""" bjson/main.py Copyright (c) 2010 David Martinez Marti All rights reserved. Licensed under 3-clause BSD License. See LICENSE.txt for the full license text. """ import socket import bjsonrpc.server import bjsonrpc.connection import bjsonrpc.handlers __all__ = [ "createserver", "...
bsd-3-clause
5,525,710,750,083,788,000
29.042553
83
0.596671
false
testalt/electrum-dvc
gui/text.py
1
17436
import curses, datetime, locale from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum_dvc.util import format_satoshis, set_verbosity from electrum_dvc.bitcoin import is_valid from electrum_dvc import Wallet, WalletStorage import tty, sys class ElectrumGui: def __init__(self, config, netw...
gpl-3.0
-9,012,374,220,583,325,000
35.174274
151
0.50889
false
ac769/continuum_technologies
twitter/sample_twitter_codes.py
1
1644
'''' In this code we'll have a bunch of examples you can use at your own discretion. Simply remove the three ' marks above and below the code you want in order to run it, while leaving the text within a new set of three ' marks. Once that's done, go to your Terminal, navigate to where this code and the twitter_follo...
mit
-987,325,024,660,975,600
33.270833
112
0.756083
false
Micket/CCBuilder
make_cc.py
1
8680
#!/usr/bin/env python3 from __future__ import print_function from __future__ import division import argparse import pickle import time import CCBuilder as ccb import CCBuilder_c as ccb_c import numpy as np import scipy.special def uniform_dist(x): """ Returns uniform distributions of given range """ return la...
gpl-3.0
-3,357,573,291,557,032,400
41.54902
126
0.65818
false
lyoniionly/django-cobra
src/cobra/models/fields/node.py
1
3306
from __future__ import absolute_import, print_function import collections import logging import six import warnings from django.db import models from django.db.models.signals import post_delete from cobra.core.cache import memoize from cobra.core.compat import pickle from cobra.core.strings import decompress, compre...
apache-2.0
8,760,018,005,294,236,000
24.635659
79
0.588627
false
andersgs/dingo
dingo/random_forest.py
1
2551
''' Some functions to fit a random forest ''' import sklearn.ensemble import pandas import progressbar bar = progressbar.ProgressBar() def test_max_features(max_features): if (max_features not in ['sqrt', 'auto', 'log2', None]): try: max_features = int(max_features) except ValueError:...
bsd-3-clause
-2,556,278,225,202,661,400
49.019608
347
0.46374
false
Orav/kbengine
kbe/src/lib/python/Tools/demo/life.py
1
9249
#!/usr/bin/env python3 """ A curses-based version of Conway's Game of Life. An empty board will be displayed, and the following commands are available: E : Erase the board R : Fill the board randomly S : Step for a single generation C : Update continuously until a key is struck Q : Quit Cursor keys :...
lgpl-3.0
-7,308,566,763,295,885,000
33.301527
81
0.484917
false
jwilliamn/handwritten
extraction/FormatModel/CreatePage3Variable.py
1
6106
import pickle from extraction.FormatModel.VariableDefinitions import * from extraction.FormatModel.RawVariableDefinitions import * import json def jsonDefault(object): return object.__dict__ if __name__ == '__main__': Page3 = Category('page3', 'pagina 3') ############ for r in range(1,6): s...
gpl-3.0
2,086,762,254,357,249,800
44.237037
111
0.655748
false
huzhifeng/py12306
py12306.py
1
62739
#!/usr/bin/env python # -*- coding: utf-8 -*- # 标准库 import argparse import urllib import time import datetime import sys import re import ConfigParser import random import smtplib from email.mime.text import MIMEText # 第三方库 import requests from huzhifeng import dumpObj, hasKeys # Set default encoding to utf-8 reload...
gpl-2.0
-631,110,503,267,683,200
37.075581
273
0.491627
false
mjs/juju
acceptancetests/schedule_hetero_control.py
1
3284
#!/usr/bin/env python from __future__ import print_function from argparse import ArgumentParser import json import os import re from jenkins import Jenkins from jujuci import ( add_credential_args, get_credentials, ) from utility import ( find_candidates, get_candidates_path, ) def get_args(...
agpl-3.0
8,702,900,788,134,910,000
32.510204
78
0.58648
false
NicovincX2/Python-3.5
Algèbre/Opération/scalar_product.py
1
1933
# -*- coding: utf-8 -*- import os import seaborn seaborn.set() colors = seaborn.color_palette() import utils # For 3D plotting we need to import some extra stuff from mpl_toolkits.mplot3d import Axes3D # First create two random vectors in 3 dimensional space v1 = rand(3, 1) v2 = rand(3, 1) # And scale them to uni...
gpl-3.0
-667,495,029,262,324,100
28.287879
75
0.644594
false
nuobit/odoo-addons
connector_sage/models/payroll_sage_payslip_line_payroll/binding.py
1
1439
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) # Eric Antones <eantones@nuobit.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import models, fields from odoo.addons.queue_job.job import job class PayslipLinePayrollBinding(models.Model): _name = 'sage.payroll.sage.pay...
agpl-3.0
8,891,023,557,051,853,000
36.842105
108
0.649513
false
cuihaoleo/PyTest
PyTest.py
1
7675
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## # PyTest.py # This file is part of PyTest. # # PyTest # Python编写的OI评测器后端 # Copyright (C) 2011 CUI Hao # # 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 Fo...
gpl-3.0
1,755,466,251,019,039,200
26
71
0.508379
false
devananda/ironic
ironic/tests/unit/drivers/modules/test_agent.py
1
58308
# Copyright 2014 Rackspace, 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...
apache-2.0
5,521,264,999,136,211,000
47.468828
79
0.590176
false
geggo/pyface
pyface/workbench/i_workbench_window_layout.py
3
10821
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
-4,267,509,263,042,674,000
26.675192
80
0.590796
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/prompt_toolkit/output/color_depth.py
1
1497
from __future__ import unicode_literals from prompt_toolkit.utils import is_windows import os __all__ = [ 'ColorDepth', ] class ColorDepth(object): """ Possible color depth values for the output. """ #: One color only. DEPTH_1_BIT = 'DEPTH_1_BIT' #: ANSI Colors. DEPTH_4_BIT = 'DEPTH_...
mit
2,101,513,724,883,425,300
27.245283
77
0.616566
false
WorldViews/Spirals
dummyServer.py
1
2519
import json, time import flask from flask import Flask, render_template, send_file, \ jsonify, send_from_directory, request from flask_socketio import SocketIO, emit rdb = None try: import rethinkdb as rdb #rdb.connect('localhost', 28015).repl() conn = rdb.connect(db='test') except: ...
mit
-4,448,048,485,143,224,300
25.239583
71
0.613339
false
jedie/bootstrap_env
bootstrap_env/admin_shell/normal_shell.py
1
7715
""" Admin Shell commands available in 'normal' install mode ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ IMPORTANT: Every import from external packages must be made with LazyImportError! Otherwise the bootstrap will fail, because no external package is available in boots...
gpl-3.0
498,514,574,296,900,000
33.752252
115
0.576539
false
nschaetti/nsNLP
data/Text.py
1
2476
# -*- coding: utf-8 -*- # # File : corpus/IQLACorpus.py # Description : . # Date : 16/08/2017 # # Copyright Nils Schaetti, University of Neuchâtel <nils.schaetti@unine.ch> # Imports from Sample import Sample import codecs # Class to access to a text class Text(Sample): """ Class to access to a text """ ...
gpl-3.0
8,279,968,937,901,342,000
19.121951
115
0.446869
false
jh23453/privacyidea
privacyidea/lib/resolvers/LDAPIdResolver.py
1
41677
# -*- coding: utf-8 -*- # Copyright (C) 2014 Cornelius Kölbel # contact: corny@cornelinux.de # # 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add certificate verification # 2017-01-07 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Use get_info=ldap3.NONE for binds t...
agpl-3.0
-6,267,946,050,107,101,000
37.796089
110
0.532508
false
blindfuzzy/LHF
Tools/linuxprivchk.py
1
25080
#!/usr/bin/env python ############################################################################################################### ## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script ## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift ##-----------------------------------------------------...
gpl-3.0
6,533,771,653,508,868,000
66.601078
248
0.614872
false
oudalab/phyllo
phyllo/extractors/regula_ad_monachoDB.py
1
3765
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup # several names in the <pagehead> but not sure what to put as an author name def main(): # The collection URL below. collURL = 'http://www.thelatinlibrary.com/regula.html' collOpen = urllib.request.urlo...
apache-2.0
730,117,628,980,353,400
36.277228
112
0.468526
false
no-net/gr-winelo
python/qa_winelo_mpc_channel_cc.py
1
2465
#!/usr/bin/env python # # Copyright 2012 <+YOU OR YOUR COMPANY+>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This software is distri...
gpl-3.0
-3,779,461,491,146,289,700
32.767123
74
0.619067
false
iamjake648/jasper-dictionary
Define.py
1
1593
#Written by Jake Schultz #TODO Add more lang support, limit number of results returned import re from urllib2 import Request, urlopen, URLError import json WORDS = ["DEFINE","WHAT DOES %S MEAN","DEFINITION", "WHAT IS [A|AN]? %S"] PRIORITY = 1 def handle(text, mic, profile, recursive=False): text = re.sub(r"(?i)...
gpl-2.0
1,097,689,116,695,614,700
34.4
118
0.603264
false
felipenaselva/repo.felipe
plugin.video.uwc/k18.py
1
2513
''' Ultimate Whitecream Copyright (C) 2015 mortael This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-2.0
-4,485,078,390,973,765,600
32.959459
152
0.655392
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_url_path_map.py
1
3397
# 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 ...
mit
-8,994,817,424,965,197,000
47.528571
215
0.664999
false
chengdh/openerp-ktv
openerp/addons/ktv_sale/room_operate.py
1
3418
# -*- coding: utf-8 -*- from osv import osv,fields from room import room class room_operate(osv.osv): ''' 包厢操作类: 以下操作都属于包厢操作: 1 预定 2 正常开房 3 买钟 4 买断 5 续钟 6 退钟 7 换房 8 并房 包厢通过cur_room_operate_id与room_operate相关联,用于标示当前包厢所对应的操作 room_operate与以上各个操作是one2many的关系,这样通过一个room_o...
agpl-3.0
-4,107,985,104,135,844,400
35.166667
120
0.621352
false
dhimmel/hetio
hetnetpy/permute.py
1
9110
import collections import random import logging from hetnetpy.hetnet import Graph def permute_graph(graph, multiplier=10, seed=0, metaedge_to_excluded=dict(), log=False): """ Derive a permuted hetnet from an input hetnet. This method applies the XSwap algorithm separately for each metaedge. Hence, node d...
cc0-1.0
7,102,797,442,596,513,000
36.03252
93
0.615038
false
coetzeevs/chiron
mysite/polls/views.py
1
1976
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from .models import Question, Choice from django.urls import reverse from django.views import generic from django.utils import timezone from django.core.mail import EmailM...
mit
-8,582,128,274,714,350,000
30.380952
130
0.745951
false
yvesalexandre/bandicoot
bandicoot/__init__.py
1
1498
# The MIT License (MIT) # # Copyright (c) 2015-2016 Massachusetts Institute of Technology. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
mit
-4,582,053,342,048,739,000
47.322581
100
0.757009
false
sphaero/appie
appie/appie.py
1
10447
#!/usr/bin/python3 # # Copyright (c) 2013, Arnaud Loonstra, All rights reserved. # Copyright (c) 2013, Stichting z25.org, All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public # License as published by the Free Software Foundation;...
gpl-3.0
1,061,268,915,449,003,600
32.376997
126
0.57538
false
LACNIC/simon
simon-web/simon_app/templatetags/simon_extras.py
1
2401
from django import template from datetime import datetime from simon_app.functions import GMTUY import operator """ Module that holds the Simon """ register = template.Library() @register.filter(name="substract") def substract(value, arg): """ Substract """ return value - arg @register.fil...
gpl-2.0
4,992,362,165,801,028,000
18.208
93
0.548105
false
gpailler/AtlassianBot
plugins/stash.py
1
1971
# coding: utf-8 import requests from utils import rest class Stash(object): def __init__(self, server): self.__server = server def get_stash_branches(self, repos, project, filter): results = [] for repo in repos: path = '/rest/api/1.0/projects/{project}/repos/{repo}/branc...
mit
-3,836,757,531,418,483,700
30.790323
76
0.499239
false
samdoshi/teletype
utils/docs.py
1
6073
#!/usr/bin/env python3 import sys from pathlib import Path import jinja2 import pypandoc import pytoml as toml from common import list_ops, list_mods, validate_toml, get_tt_version if (sys.version_info.major, sys.version_info.minor) < (3, 6): raise Exception("need Python 3.6 or later") THIS_FILE = Path(__file_...
gpl-2.0
-4,714,646,216,518,015,000
29.671717
78
0.513091
false
mylokin/redisext
tests/test_expire.py
1
1260
from __future__ import absolute_import import redisext.counter import redisext.key import redisext.serializer from . import fixture class ExpireCounter(redisext.counter.Counter, redisext.key.Expire): EXPIRE = 60 CONNECTION = fixture.Connection SERIALIZER = redisext.serializer.Numeric class ExpireCount...
mit
-488,243,151,904,911,100
25.808511
78
0.694444
false
wcmckee/lcacoffee
hostassign.py
1
2135
# coding: utf-8 # script to assign hostname and ip address to machine # In[63]: import os import random import json import shutil # In[37]: colordir = os.listdir('/home/wcmckee/colortest/') # In[42]: alcolrz = [] # In[43]: for cold in colordir: #print cold if '.json' in cold: print cold ...
mit
-519,248,271,010,210,700
9.023474
92
0.620141
false
Instanssi/Instanssi.org
Instanssi/screenshow/migrations/0003_auto_20210511_0020.py
1
1515
# Generated by Django 3.2.2 on 2021-05-10 21:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('screenshow', '0002_auto_20180711_2110'), ] operations = [ migrations.AlterField( model_name='ircmessage', name='id',...
mit
-6,303,775,865,883,706,000
34.232558
111
0.588779
false
pbchou/trafficserver
tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py
1
13125
""" Verify traffic_dump functionality. """ # 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 Licen...
apache-2.0
4,098,258,036,521,817,600
38.296407
113
0.721676
false
tabalinas/jsgrid-django
clients/views.py
1
1522
from django.http import HttpResponse from django.core import serializers from django.shortcuts import render from simple_rest import Resource from .models import Client def index(request): return render(request, 'index.html') class Clients(Resource): def get(self, request): clients = Client.object...
mit
-5,578,314,184,561,130,000
32.822222
99
0.631406
false
qbuat/rootpy
rootpy/tree/tree.py
1
33528
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import sys import re import fnmatch import uuid import ROOT from .. import log; log = log[__name__] from .. import asrootpy, QROOT from ..extern.ordereddict import OrderedDict...
gpl-3.0
-4,759,378,811,842,880,000
36.006623
79
0.547691
false
Jason-Zhao-Jie/MagicTower
Assets/Firebase/Editor/generate_xml_from_google_services_json.py
1
13865
#!/usr/bin/python # Copyright 2016 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 agre...
bsd-3-clause
2,530,400,691,713,250,300
33.150246
158
0.60714
false
sealcode/gpandoc
ui/recipe_ui.py
1
3014
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'recipe.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectNa...
lgpl-3.0
-7,895,148,468,539,092,000
47.580645
109
0.701527
false
Micronaet/micronaet-trip
account_trip_edi_c5/__openerp__.py
1
1740
############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # 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 ...
agpl-3.0
-7,736,994,042,556,643,000
36.021277
79
0.577586
false
SqueezeStudioAnimation/omtk
python/omtk/libs/libPymel.py
1
14241
import logging import pymel.core as pymel from maya import OpenMaya # # A PyNodeChain is a special pymel-related object that act exactly like a standard array. # However it allow us to have more bells and whistles. # def is_valid_PyNode(val): return (val and hasattr(val, 'exists') and val.exists()) if val else ...
mit
3,718,975,997,942,480,400
29.17161
117
0.59118
false
microsoft/task_oriented_dialogue_as_dataflow_synthesis
src/dataflow/leaderboard/predict.py
1
2613
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """ Semantic Machines\N{TRADE MARK SIGN} software. Creates the prediction files from onmt_translate output for the leaderboard. """ import argparse from typing import List import jsons from more_itertools import chunked from dataflow.core.dia...
mit
-9,164,045,024,337,558,000
30.865854
87
0.66284
false
nashgul/weechat
audacious_script/audacious.py
1
3067
# audacious now playing for weechat # nashgul <m.alcocer1978@gmail.com> # version 0.1 # white => "00", black => "01", darkblue => "02", darkgreen => "03", lightred => "04", darkred => "05", magenta => "06", orange => "07", yellow => "08", lightgreen => "09", cyan => "10", lightcyan => "11", lightblue => "12", lightmag...
gpl-2.0
-6,693,482,823,102,077,000
45.469697
278
0.573525
false
SerpentAI/SerpentAI
serpent/game_frame.py
1
5346
import skimage.color import skimage.measure import skimage.transform import skimage.filters import skimage.morphology import numpy as np import io from PIL import Image class GameFrameError(BaseException): pass class GameFrame: def __init__(self, frame_data, frame_variants=None, timestamp=None, **kwargs...
mit
-799,488,949,246,343,400
31.204819
140
0.633558
false
tonnrueter/pymca_devel
PyMca/Object3D/Object3DPlugins/Object3DStack.py
1
24743
import os try: import OpenGL.GL as GL import OpenGL.GLU as GLU except ImportError: raise ImportError, "OpenGL must be installed to use these functionalities" import numpy try: from PyMca import spslut except: import spslut try: from PyMca.Object3D import Object3DFileDialogs from PyMca.Objec...
gpl-2.0
-4,443,805,194,613,521,000
40.937288
120
0.508225
false
agraubert/agutil
agutil/parallel/src/dispatcher.py
1
2555
from .exceptions import _ParallelBackgroundException from .worker import ThreadWorker, ProcessWorker from itertools import zip_longest WORKERTYPE_THREAD = ThreadWorker WORKERTYPE_PROCESS = ProcessWorker class IterDispatcher: def __init__( self, func, *args, maximum=15, wor...
mit
1,826,956,604,685,546,800
27.707865
71
0.508415
false
juliancantillo/royal-films
config/settings/local.py
1
1950
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
mit
-7,272,907,053,856,914,000
30.451613
99
0.488205
false
grimoirelab/GrimoireELK
grimoire_elk/enriched/meetup.py
1
13379
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
gpl-3.0
-4,369,405,093,059,499,000
33.660622
101
0.52545
false
ver228/tierpsy-tracker
tierpsy/analysis/ske_create/zebrafishAnalysis/zebrafishAnalysis.py
1
17590
# Zebrafish Analysis import math import numpy as np import cv2 from scipy.signal import savgol_filter class ModelConfig: def __init__(self, num_segments, min_angle, max_angle, num_angles, tail_length, tail_detection, prune_retention, test_width, draw_width, auto_detect_tail_length): self.min_angle = m...
mit
-7,423,540,169,153,235,000
32.188679
248
0.67004
false
ratschlab/ASP
applications/msplicer/content_sensors.py
1
2271
# # 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. # # Written (W) 2006-2007 Soeren Sonnenburg # Written (W) 2007 Gunna...
gpl-2.0
-2,526,926,866,745,545,700
39.553571
246
0.693087
false
disqus/django-old
tests/regressiontests/admin_validation/tests.py
1
9982
from django import forms from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.contrib import admin from django.contrib.admin.validation import validate, validate_inline from models import Song, Book, Album, TwoAlbumFKAndAnE, State, City class SongForm(forms.ModelForm):...
bsd-3-clause
1,530,670,665,720,559,000
34.523132
167
0.619415
false
aestheticblasphemy/aestheticBlasphemy
pl_messages/migrations/0002_auto_20200828_2129.py
1
1972
# Generated by Django 3.1 on 2020-08-28 15:59 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pl_messages', '0001_initia...
gpl-3.0
7,672,388,963,139,680,000
41.869565
188
0.647566
false
dmwyatt/disney.api
pages/timepicker.py
1
3504
import datetime import logging import os import time import re import webbrowser from dateutil import parser from selenium import webdriver from selenium.common.exceptions import WebDriverException, NoSuchElementException from selenium.webdriver.support.select import Select from helpers import roundTime, difference_...
mit
4,530,609,695,152,849,400
27.958678
100
0.720034
false
jakesyl/fail2ban
fail2ban/protocol.py
1
9025
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation;...
gpl-2.0
-5,112,870,207,491,845,000
53.041916
224
0.668033
false
aravindalwan/unyque
unyque/rdimension.py
1
3726
'''Representation of a random variable used in stochastic collocation''' __copyright__ = 'Copyright (C) 2011 Aravind Alwan' __license__ = ''' This file is part of UnyQuE. UnyQuE 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 Softw...
gpl-3.0
-7,993,344,271,732,080,000
31.973451
80
0.580247
false
chrisspen/dtree
dtree.py
1
68634
""" 2012.1.24 CKS Algorithms for building and using a decision tree for classification or regression. """ from __future__ import print_function from collections import defaultdict from decimal import Decimal from pprint import pprint import copy import csv import math from math import pi import os import random import...
lgpl-3.0
1,056,484,484,026,937,900
34.088957
158
0.57929
false
endlessm/chromium-browser
native_client/pnacl/driver/pnacl-readelf.py
2
3751
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from driver_env import env from driver_log import Log import driver_tools import filetype ...
bsd-3-clause
4,530,193,218,533,686,300
39.333333
103
0.628099
false
kreatorkodi/repository.torrentbr
script.module.urlresolver/lib/urlresolver/plugins/lib/recaptcha_v2.py
1
7299
# -*- coding: utf-8 -*- """ urlresolver XBMC Addon Copyright (C) 2016 tknorris Derived from Shani's LPro Code (https://github.com/Shani-08/ShaniXBMCWork2/blob/master/plugin.video.live.streamspro/unCaptcha.py) This program is free software: you can redistribute it and/or modify it under the terms of...
gpl-2.0
-6,874,958,783,085,708,000
42.96988
176
0.590218
false
mandiant/ioc_writer
ioc_writer/scripts/iocdump.py
1
2104
# iocdump.py # # Copyright 2016 FireEye # Licensed under the Apache 2.0 license. Developed for Mandiant by William # Gibb. # # Mandiant licenses this file to you 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 Lic...
apache-2.0
-8,542,234,613,581,370,000
32.951613
120
0.678232
false
txomon/pytest
testing/python/collect.py
1
53514
# -*- coding: utf-8 -*- import os import sys import textwrap import _pytest._code import pytest from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.nodes import Collector from _pytest.warnings import SHOW_PYTEST_WARNINGS_ARG class TestModule(object): def test_failing_import(self, testdir): modcol...
mit
-2,220,275,439,364,280,600
30.814064
116
0.530421
false
axbaretto/beam
sdks/python/apache_beam/io/gcp/datastore/v1/datastoreio_test.py
1
12457
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
1,300,370,424,797,232,600
38.798722
80
0.6687
false
tayebzaidi/snova_analysis
Miscellaneous/typ1a_features.py
1
2252
import matplotlib.pyplot as plt import scipy.interpolate as scinterp import numpy as np import peakfinding import peak_original import smoothing import plotter import random import readin import sys import os if __name__== '__main__': Mbdata = [] delM15data = [] path = "/Users/zaidi/Documents/REU/restframe...
gpl-3.0
-7,822,784,365,329,970,000
33.121212
73
0.521314
false
DREAM-ODA-OS/tools
metadata/dimap2eop.py
1
3474
#!/usr/bin/env python #------------------------------------------------------------------------------ # # Extract O&M-EOP metadata document. # # Project: EO Metadata Handling # Authors: Martin Paces <martin.paces@eox.at> # #------------------------------------------------------------------------------- # Copyright (C...
mit
-2,620,814,347,079,095,300
36.354839
85
0.632988
false
billbrod/spatial-frequency-preferences
sfp/image_computable.py
1
6815
#!/usr/bin/python """code to help run the image-computable version of the model we're using this primarily to check the effect of vignetting, but this does make our project image-computable (though it's a linear model and so will fail in some trivial cases) """ import itertools import argparse import numpy as np impo...
mit
7,969,133,745,800,178,000
51.423077
128
0.634776
false
ProjectQ-Framework/ProjectQ
projectq/meta/_loop.py
1
9774
# -*- coding: utf-8 -*- # Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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 # # ...
apache-2.0
-7,039,027,857,358,893,000
37.031128
115
0.562717
false
shellphish/puppeteer
examples/ructf_2014_pwn200/doit.py
1
2635
import puppeteer as p import logging try: import standard_logging # pylint: disable=W0611 except ImportError: pass #logging.getLogger("puppeteer.connection").setLevel(logging.DEBUG) #logging.getLogger("puppeteer.manipulator").setLevel(logging.DEBUG) #logging.getLogger("puppeteer.vuln_decorators").setLevel(logg...
gpl-3.0
-910,140,454,615,389,800
33.671053
113
0.639848
false
jpaasen/cos
framework/Window.py
1
5925
#from TypeExtensions import Ndarray from gfuncs import processArgs from mynumpy import pi, dot, cos, sin, exp #ones, complex, sin, linspace, exp, pi, dot, angle import mynumpy as np #from pylab import plot, subplot, xlabel, ylabel, grid, show, figure, ion, ioff class Window(np.Ndarray): def __new__(self, type='r...
mit
5,193,458,981,794,878,000
36.5
93
0.4427
false
masterdje/wibfi
conf.py
1
22684
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time # Configuration, please edit # Data about this site BLOG_AUTHOR = "Dje" BLOG_TITLE = "Write it before forget it!" # This is the main URL for your site. It will be used # in a prominent link SITE_URL = "http://wibfi.virtua-peanuts.net/" # Thi...
gpl-3.0
-2,642,146,339,466,596,400
34.269051
225
0.670915
false
xuanthuong/golfgame
models/work_history.py
1
2217
# -*- coding: utf-8 -*- # Description: work_history table # By Thuong.Tran # Date: 29 Aug 2017 from sqlalchemy import create_engine, Table, Column, MetaData, Integer, Text, DateTime, Float from sqlalchemy import select, and_ import datetime as dt class work_history(): def __init__(self, db_url): _engine = crea...
mit
6,242,151,486,691,357,000
35.95
93
0.564727
false
qtproject/qt-creator
scripts/generateClangFormatChecksUI.py
3
9025
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2019 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # ...
gpl-3.0
-6,718,310,938,669,209,000
30.013746
97
0.560665
false
Ircam-Web/mezzanine-organization
organization/agenda/migrations/0033_dynamicmultimediaevent.py
1
1459
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-11-30 10:33 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mezzanine.core.fields class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_co...
agpl-3.0
7,624,932,403,393,662,000
43.212121
199
0.626456
false
JamieCressey/apt-s3
apts3/__init__.py
1
6562
# Copyright 2016 Jamie Cressey # # 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
-2,980,966,164,605,318,700
32.141414
287
0.556995
false
GEMISIS/machine-learning
Kaggle/TensorFlow Speech Recognition Challenge/neural_network.py
1
15527
import os import tensorflow as tf import numpy as np from data import get_files from data import FEATURES from data import OUTPUTS from data import RESULT_MAP class DataPoint: length = 0 filenames = [] xs = [] ys = [] # Our expected inputs for training, testing, etc. class NNData: training = DataP...
mit
5,033,618,991,164,514,000
50.929766
183
0.638243
false
noam09/deluge-telegramer
telegramer/include/telegram/passport/credentials.py
1
17262
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2018 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
gpl-3.0
-7,892,456,958,463,140,000
38.321185
99
0.630344
false
ngsutils/ngsutils
ngsutils/gtf/add_xref.py
1
3246
#!/usr/bin/env python ## category General ## desc Appends name annotation from UCSC Xref file '''Adds gene name annotations to a GTF file (xref) This adds gene name annotations based upon the KnownGene annotations from the UCSC Genome Browser. Gene names will be taken from the kgXref table. This table must be download...
bsd-3-clause
-469,859,513,389,635,600
29.336449
103
0.541282
false
parksandwildlife/ibms
ibms_project/settings.py
1
5554
from dbca_utils.utils import env import dj_database_url import os from pathlib import Path import sys # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = str(Path(__file__).resolve().parents[1]) PROJECT_DIR = str(Path(__file__).resolve().parents[0]) # Add PROJECT_DIR to the system path. ...
apache-2.0
-416,039,170,357,673,500
29.685083
92
0.618833
false
Seegnify/Elasticcrawler
lib/curlheaders.py
1
1702
""" API to extract bits and pieces from CURL (command line utility) headers file. The headers can be obtained by calling: curl -D 'headers' 'url'. Currenlty supported formats are for protocols: HTTP, HTTPS. """ class Curlheaders: # response codes and headers container reponses = list() def __init__(self, heade...
bsd-3-clause
1,003,504,171,861,701,200
25.59375
77
0.59342
false
raviii/ravii
items/fields.py
1
1881
from django.db.models.fields.files import ImageField, ImageFieldFile from PIL import Image import os def _add_thumb(s): """ Modifies a string (filename, URL) containing an image filename, to insert '.thumb' """ parts = s.split(".") parts.insert(-1, "thumb") if parts[-1].lower() not in ['jpe...
bsd-3-clause
6,572,445,099,955,995,000
33.2
78
0.654971
false
rdujardin/icforum
icforum/chat/api/permissions.py
1
1257
# Copyright 2016 Infinite Connection # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
5,509,194,607,901,554,000
35.970588
111
0.762928
false
trec-kba/streamcorpus-pipeline
streamcorpus_pipeline/tests/test_language.py
1
1657
'''tests for langauge detection transform .. This software is released under an MIT/X11 open source license. Copyright 2012-2015 Diffeo, Inc. ''' from __future__ import absolute_import import os import pytest import streamcorpus_pipeline from streamcorpus_pipeline._clean_html import clean_html from streamcorpus_pip...
mit
-3,371,838,387,927,223,000
35.021739
140
0.694629
false
MechanisM/musicdb
musicdb/common/management/commands/initial_import_fixups.py
1
3570
from django.core.management.base import NoArgsCommand from musicdb.classical.models import * class Command(NoArgsCommand): def handle_noargs(self, **options): work_pairs = ( ('felix-mendelssohn', ('string-quartet-in-e-flat', 'string-quartet-in-e-flat-1')), ('ludvig-van-beethoven',...
agpl-3.0
4,716,751,957,606,330,000
47.243243
158
0.564986
false
lgiordani/punch
tests/script/test_complex_serializers.py
1
2035
import pytest pytestmark = pytest.mark.slow version_file_content = """ major = 1 minor = 0 patch = 0 """ config_file_content = """ __config_version__ = 1 GLOBALS = { 'serializer': { 'semver': { 'search': 'Next Release', 'replace': '{{major}}.{{minor}}.{{patch}}' } }, ...
isc
8,717,487,821,526,093,000
17.842593
71
0.57543
false
michaelBenin/sqlalchemy
lib/sqlalchemy/sql/naming.py
1
5728
# sqlalchemy/naming.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Establish constraint and index naming conventions. """ from .schema import ...
mit
-7,769,484,997,395,845,000
33.506024
97
0.597416
false
fanglinfang/myuw
myuw/migrations/0002_auto__add_unique_usernotices_notice_hash_user__add_field_categorylinks.py
1
6154
# -*- 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): # Eh, I'm not so worried about tracking user notices that this is a problem db.clear_table(u'myuw_mobile_use...
apache-2.0
4,205,599,867,594,422,300
62.443299
159
0.553136
false
jn2840/bitcoin
share/qt/extract_strings_qt.py
1
1875
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator import os import sys OUT_CPP="qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' for...
mit
1,085,203,892,940,296,700
23.038462
82
0.578667
false
anthonyfok/frescobaldi
frescobaldi_app/logtool/__init__.py
1
3820
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
gpl-2.0
-6,433,061,246,334,416,000
36.087379
96
0.685079
false
joshgeller/PyPardot
pypardot/objects/opportunities.py
1
3806
class Opportunities(object): """ A class to query and use Pardot opportunities. Opportunity field reference: http://developer.pardot.com/kb/api-version-3/object-field-references/#opportunity """ def __init__(self, client): self.client = client def query(self, **kwargs): """ ...
mit
-5,657,057,192,978,973,000
40.824176
120
0.625854
false
dmsimard/ansible
lib/ansible/plugins/lookup/first_found.py
1
7109
# (c) 2013, seth vidal <skvidal@fedoraproject.org> red hat, inc # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ name: first_found a...
gpl-3.0
-7,768,599,136,003,885,000
33.014354
152
0.608524
false
chrys87/orca-beep
src/orca/speechdispatcherfactory.py
1
20607
# Copyright 2006, 2007, 2008, 2009 Brailcom, o.p.s. # # Author: Tomas Cerha <cerha@brailcom.org> # # 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 ...
lgpl-2.1
5,530,888,183,352,487,000
36.950276
81
0.609841
false
teto/ns-3-dev-git
doc/tutorial/source/conf.py
1
7057
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
gpl-2.0
-883,867,585,173,012,000
31.671296
80
0.705399
false
benschmaus/catapult
dashboard/dashboard/benchmark_health_report_test.py
2
5261
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import unittest import webapp2 import webtest from google.appengine.ext import ndb from dashboard import benchmark_health_report from dash...
bsd-3-clause
4,280,909,695,348,275,000
32.509554
80
0.624976
false
enthought/pikos
pikos/recorders/abstract_recorder.py
1
1322
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Package: Pikos toolkit # File: recorders/abstract_recorder.py # License: LICENSE.TXT # # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------...
bsd-3-clause
-9,214,632,131,664,054,000
23.036364
79
0.537821
false
mpetyx/pychatbot
SemanticWebApproach/RoboWriter/allegrordf-1.0.1/franz/miniclient/request.py
1
6234
import StringIO, pycurl, urllib, cjson, locale from threading import Lock class Pool: def __init__(self, create): self.create = create self.lock = Lock() self.pool = [] def get(self): self.lock.acquire() try: if len(self.pool): return self.pool.pop() ...
apache-2.0
4,239,466,818,039,334,400
34.622857
137
0.569458
false