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
SLAE-941/slae
assignment4/shell_generator.py
1
2312
from __future__ import print_function import random import struct def generate_shellcode(shellcode, avoid_values, seed_key, prefix = "", suffix = ""): encoded_shellcode = "" xor_key = seed_key for char in shellcode: encoded_shellcode += chr(ord(char) ^ xor_key) + generate_char(avoid_values) ...
gpl-3.0
325,885,255,825,010,750
33
138
0.632785
false
3.120108
false
false
false
BJEBN/Geometric-Analysis
Scripts/Old Scripts/Transpose_Fields.py
1
3446
#================================== #Author Bjorn Burr Nyberg #University of Bergen #Contact bjorn.nyberg@uni.no #Copyright 2013 #================================== '''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,405,309,150,454,169,600
31.819048
90
0.603598
false
3.585848
false
false
false
sebdelsol/pyload
module/plugins/accounts/OboomCom.py
1
1802
# -*- coding: utf-8 -*- import time from beaker.crypto.pbkdf2 import PBKDF2 from module.common.json_layer import json_loads from module.plugins.Account import Account class OboomCom(Account): __name__ = "OboomCom" __type__ = "account" __version__ = "0.21" __description__ = """Oboom.com accou...
gpl-3.0
2,569,744,905,112,690,700
28.064516
106
0.563263
false
3.604
false
false
false
CiscoSystems/nova
nova/conductor/manager.py
1
51312
# Copyright 2013 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 required by applicable law or agree...
apache-2.0
-2,334,092,174,097,476,000
47.361923
79
0.592863
false
4.355488
false
false
false
yaybu/touchdown
touchdown/aws/sns/topic.py
1
4117
# Copyright 2015 Isotoma Limited # # 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,717,405,480,503,291,600
30.914729
85
0.629342
false
4.426882
false
false
false
ealonzo/LGAParking
LGAP10Logger.py
1
1533
#!/usr/bin/env python3 from selenium import webdriver import time from datetime import datetime import csv import thingspeak from githubkey import GITHUB_KEY, GITHUB_CHANID # ThingSpeak values write_key = GITHUB_KEY channel_id = GITHUB_CHANID # Set up browser browser = webdriver.PhantomJS() # Go to LaGuardia parkin...
mit
-3,374,366,403,632,145,400
28.480769
309
0.727332
false
3.1222
false
false
false
marcelor/xchange
main.py
1
3052
from datetime import datetime from decimal import Decimal from flask import Flask, render_template from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.restless import APIManager from local_settings import SQLALCHEMY_DATABASE_URI, DEBUG_MODE app = Flask(__name__) app.url_map.strict_slashes = False app.config['S...
mit
8,846,017,698,083,081,000
36.219512
146
0.684797
false
3.226216
false
false
false
cieplak/recontool
tests/test_subset_sums.py
1
1760
from __future__ import unicode_literals import unittest from recontool.subset_sums import SubsetSums class TestSubsetSums(unittest.TestCase): def test_subset_sums(self): seq = [1, 2, 3, 4, 5] subset_sums = SubsetSums.create(seq) expected_range_sums = [ ((0, 5), 15), ...
mit
8,581,850,283,365,654,000
29.877193
73
0.458523
false
3.4714
false
false
false
knz/restcrumbs
compiler/tools/massage.py
1
1504
#! /usr/bin/env python # $Id: massage.py 4114 2010-11-09 16:25:15Z kena $ import sys import notes import re thenote = sys.argv[1] outfile = sys.argv[2] insref = int(sys.argv[3]) makemath = int(sys.argv[4]) notes.init_repo(sys.argv[5:]) note = notes.repo.get(thenote) deps = note.get_deps() deps.sort(notes.cmpkey) p...
bsd-2-clause
1,125,798,499,499,981,400
20.183099
98
0.542553
false
2.638596
false
false
false
kazuyamashi/cReComp
crecomp/userlogic.py
1
5873
# -*- coding: utf-8 -*- # userlogicutil.py # Kazushi Yamashina import os import sys from veriloggen import * from jinja2 import Environment, FileSystemLoader import re from crecomp import * import verilog as vl TEMPLATE = os.path.dirname(os.path.abspath(__file__)) + '/template' class Info( ): def __init__(self): s...
bsd-3-clause
1,356,792,465,663,143,400
27.935961
146
0.63528
false
2.924801
false
false
false
deets/jetbot-3000
jetbot/protocol.py
1
7384
# import sys import argparse import logging import time import uuid from random import random import json from functools import partial import threading import Queue from itertools import cycle from abc import ABCMeta, abstractmethod from .base import message_valid logger = logging.getLogger(__name__) class Message...
gpl-3.0
-7,548,286,346,899,587,000
23.369637
92
0.56162
false
4.048246
false
false
false
JatinderSingh95/foodapp1
foodapp/urls.py
1
1538
"""foodapp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
lgpl-3.0
3,696,353,088,526,032,000
41.722222
95
0.70026
false
3.365427
false
false
false
shiftboard/python-api-client
shiftboard/call.py
1
5479
RPCVER = '2.0' import hmac import hashlib import httplib import urllib import urllib2 import datetime # Different versions of Python have a different name for the JSON library. try: import simplejson as json except ImportError: import json def json_serial(obj): """JSON serializer for objects not seriali...
mit
-7,331,395,100,807,243,000
27.242268
95
0.585873
false
4.192043
false
false
false
qsic/qsic3
groups/views.py
1
3419
from django.conf import settings from django.contrib import messages from django.core.urlresolvers import reverse from django.http.response import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.shortcuts import render_to_response from django.template.context import RequestContext from d...
bsd-3-clause
-7,956,512,371,941,172,000
30.376147
91
0.675051
false
3.99883
false
false
false
cyphar/voicemail-check
api.py
1
4870
#!/usr/bin/env python3 # acma: finds the telco for a number (and tells you if it is vuln to voicemail attacks) # Copyright (C) 2014, Cyphar All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redi...
bsd-3-clause
-3,797,346,808,998,040,000
27.647059
169
0.717043
false
3.342485
false
false
false
guillermooo/dart-sublime-bundle-releases
sublime_plugin_lib/events.py
1
2001
import threading from collections import defaultdict import sublime_plugin from .sublime import after class IdleIntervalEventListener(sublime_plugin.EventListener): """ Base class. Monitors view idle time and calls .on_idle() after the specified duration. Idle time is defined as time during which ...
bsd-3-clause
-7,670,273,878,332,927,000
28
80
0.607196
false
4.083673
false
false
false
franga2000/django-machina
machina/models/fields.py
1
10855
# -*- coding: utf-8 -*- from __future__ import unicode_literals from os import path from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import SimpleUploadedFile from django.db import models from django.db.models import signals from django.forms import Textarea from django.for...
bsd-3-clause
-3,300,192,030,133,171,000
39.503731
100
0.652695
false
4.184657
false
false
false
ProteinDF/ProteinDF_pytools
scripts/pdf-mat-show.py
1
1495
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import proteindf_tools as pdf import logging logger = logging.getLogger(__name__) def main(): # parse args parser = argparse.ArgumentParser(description='show matrix contents') parser.add_argument("path", nargs=1, ...
gpl-3.0
-6,754,932,941,244,148,000
28.313725
72
0.525753
false
4.0625
false
false
false
pyoceans/pocean-core
pocean/dsg/timeseriesProfile/im.py
1
1374
#!python # coding=utf-8 from pocean.cf import CFDataset class IncompleteMultidimensionalTimeseriesProfile(CFDataset): @classmethod def is_mine(cls, dsg, strict=False): try: assert dsg.featureType.lower() == 'timeseriesprofile' assert len(dsg.t_axes()) >= 1 assert l...
mit
874,299,604,703,941,800
28.234043
94
0.563319
false
3.982609
false
false
false
grave-w-grave/zulip
zerver/lib/digest.py
1
9131
from __future__ import absolute_import from typing import Any, Callable, Iterable, Tuple from collections import defaultdict import datetime import six from six import text_type from django.db.models import Q, QuerySet from django.template import loader from django.conf import settings from zerver.lib.notifications ...
apache-2.0
5,258,489,686,837,160,000
39.22467
97
0.663564
false
3.790369
false
false
false
CospanDesign/sdb
sdb/sdb_component.py
1
17650
# this file is part of SDB. # # SDB 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. # # SDB is distributed in the hope that it will be ...
gpl-2.0
5,616,644,360,956,707,000
33.007707
114
0.569178
false
3.157424
false
false
false
cubic1271/brolip
brolog/AsciiLogSpec.py
1
6598
# See the file "COPYING" in the main distribution directory for copyright. """ Describes a specification for the ASCII log format. See BroLogSpec for details. """ import bz2 import csv import gzip import itertools import re from BroLogSpec import BroLogSpec from BroLogUtil import BroLogUtil class AsciiLogSpec(BroLog...
bsd-3-clause
4,735,358,646,589,276,000
38.27381
138
0.591391
false
3.686034
false
false
false
hsolbrig/SNOMEDToOWL
SNOMEDCTToOWL/TransformationContext.py
1
2347
from io import TextIOWrapper from jsonasobj import load class TransformationContext: """ A Transformation Context consists of: Element Type Description -------- ---------- ----------- MODULE int SCTID of the module being t...
apache-2.0
-7,183,166,753,130,991,000
56.243902
116
0.608436
false
4.259528
false
false
false
alexandrucoman/bcbio-nextgen-vm
setup.py
1
3031
#!/usr/bin/env python import os import shutil import sys from setuptools import setup, find_packages version = "0.1.0a" def write_version_py(): version_py = os.path.join(os.path.dirname(__file__), "bcbiovm", "version.py") try: import subprocess p = subprocess.Pop...
mit
-2,443,306,728,238,755,000
35.963415
78
0.558232
false
3.82702
false
false
false
daspecster/google-cloud-python
docs/bigquery_snippets.py
1
18573
# Copyright 2016 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 agreed to in writing, ...
apache-2.0
4,982,741,623,410,423,000
29.102107
85
0.644969
false
3.562824
false
false
false
nicinabox/trolley
lib/setup/plz.py
1
2373
#!/usr/bin/env python import os import sys import json import urllib2 import shlex import subprocess class Plz(object): def __init__(self, arg): self.host = 'http://slackware.cs.utah.edu/pub' self.api = 'http://slackware-packages.herokuapp.com/packages' self.target_dir = '/boot/extra' self.arg ...
mit
-8,016,617,362,587,175,000
25.076923
97
0.618205
false
3.143046
false
false
false
mila-iqia/babyai
scripts/manual_control.py
1
2343
#!/usr/bin/env python3 import time import argparse import numpy as np import gym import gym_minigrid from gym_minigrid.wrappers import * from gym_minigrid.window import Window import babyai def redraw(img): if not args.agent_view: img = env.render('rgb_array', tile_size=args.tile_size) window.show_im...
bsd-3-clause
3,479,191,094,694,855,000
19.373913
63
0.606061
false
3.281513
false
false
false
JulyKikuAkita/PythonPrac
cs15211/MinimumGeneticMutation.py
1
5769
__source__ = 'https://leetcode.com/problems/minimum-genetic-mutation/' # Time: O() # Space: O() # # Description: Leetcode # 433. Minimum Genetic Mutation # # A gene string can be represented by an 8-character long string, with choices from "A", "C", "G", "T". # # Suppose we need to investigate about a mutation (mutati...
apache-2.0
-6,402,644,903,340,022,000
27.98995
107
0.48778
false
3.690979
true
false
false
qedsoftware/commcare-hq
custom/intrahealth/models.py
1
8882
from corehq.fluff.calculators.case import CasePropertyFilter import fluff from couchforms.models import XFormInstance from fluff.filters import ORFilter, ANDFilter, CustomFilter from casexml.apps.case.models import CommCareCase from corehq.fluff.calculators.xform import FormPropertyFilter from custom.intrahealth import...
bsd-3-clause
4,901,643,613,870,879,000
40.699531
115
0.679802
false
3.245159
false
false
false
wavelets/ThinkStats2
code/test_corr.py
1
1642
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import thinkstats2 import thinkplot import math import random def WriteFile(data, filename): """Writes a list of numb...
gpl-3.0
1,549,707,002,482,491,100
19.02439
59
0.605968
false
3.284
false
false
false
colloquium/spacewalk
client/rhel/rhn-client-tools/src/up2date_client/hardware_gudev.py
1
13000
# Copyright (c) 2010 Red Hat Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of GP...
gpl-2.0
-8,514,484,371,364,887,000
37.461538
189
0.568846
false
3.405816
false
false
false
LesterThomas/DroneRESTAPI
APIServer/APIServerMission.py
1
3889
"""This module provides the API endpoint to manage the missions for a drone. A mission is a series of actions that can be loaded to a drone and executed automatically""" # Import DroneKit-Python from dronekit import Command, mavutil import web import logging import traceback import json import requests import APIServ...
gpl-3.0
6,684,322,995,711,368,000
43.193182
158
0.606583
false
4.172747
false
false
false
bitmazk/django-conversation
conversation/migrations/0009_auto_20160324_0208.py
1
1172
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('conversation', '0008_conversation_notified'), ] operations = [ migrations.AlterField( ...
mit
-4,237,664,183,969,554,400
34.515152
149
0.630546
false
4.261818
false
false
false
games-useaible/Useaible-machine-learning-challenge
PythonCode/simulator.py
1
2244
import numpy as np class LanderSimulator(object): inputs = 3 actions = [0, 1] ALTITUDE = 0 FUEL = 0 def __init__(self, altitude=10000., fuel=200.): LanderSimulator.ALTITUDE = altitude LanderSimulator.FUEL = fuel self.altitude = altitude self.fuel = fue...
gpl-3.0
-352,113,872,286,142,660
29.166667
147
0.557487
false
3.882353
false
false
false
cdellin/prpy
src/prpy/logger.py
1
3817
#!/usr/bin/env python # Copyright (c) 2013, Carnegie Mellon University # All rights reserved. # Authors: Michael Koval <mkoval@cs.cmu.edu> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of sourc...
bsd-3-clause
-7,547,238,357,285,377,000
39.606383
113
0.718627
false
4.176149
false
false
false
ctalbert/mozharness
mozharness/base/signing.py
1
6226
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # 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/. # ***** END LICENSE BLOCK ***** """Generic signing methods. """ ...
mpl-2.0
5,053,648,421,619,437,000
36.506024
102
0.562319
false
4.082623
false
false
false
asteca/ASteCA
packages/inp/input_clusters.py
1
1257
from os.path import join from os import walk import re def main(mypath, file_end): """ Store the paths and names of all the input clusters stored in the 'input/' folder. """ # Path where cluster data files are stored. input_dir = 'input' + file_end full_in_dir = join(mypath, input_dir) ...
gpl-3.0
5,858,278,187,718,435,000
29.658537
71
0.560064
false
3.867692
false
false
false
centrofermi/e3pipe
dst/E3GeometryRecord.py
1
1901
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2014 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENSE, distributed * # * along ...
gpl-3.0
-5,088,063,574,966,674,000
31.220339
75
0.529721
false
4.360092
false
false
false
cmolitor/SmartFarm
socolog/testVZinterface.py
1
3346
import urllib2 import json # Deleting a channel from vz database # first the user vz@localhost needs the proper permissions. # For this execute: (grant delete on volkszaehler.* to 'vz'@'localhost';) on the mysql console after loging in as root # url = 'http://127.0.0.1/vz/htdocs/middleware.php/channel/__uuid___.json?...
lgpl-3.0
4,212,877,358,783,764,500
29.981481
138
0.708308
false
2.67466
false
false
false
nyusngroup/pyMCZ
pyMCZ/mcz.py
1
32504
#!/usr/bin/env python from __future__ import print_function import os import sys import argparse import warnings import numpy as np import scipy.stats as stats from scipy.special import gammaln from scipy import optimize import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import csv as csv...
mit
9,008,018,892,546,178,000
40.83269
160
0.522582
false
3.442856
false
false
false
hetmankp/mcmerge
merge.py
1
39160
import itertools, collections import numpy from pymclevel import mclevel import pymclevel.materials import ancillary, carve, filter, vec from contour import Contour, HeightMap, EdgeData from carve import ChunkSeed # TODO: Split this class into two separate classes. One purely for doing the practical work of re...
isc
2,084,038,723,389,836,300
36.317025
139
0.481971
false
4.121238
false
false
false
m-ober/byceps
byceps/services/tourney/models/tourney_category.py
1
1535
""" byceps.services.tourney.models.tourney_category ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from sqlalchemy.ext.orderinglist import ordering_list from ....database import db, generate_uuid from ....typing import P...
bsd-3-clause
9,223,102,107,102,532,000
33.886364
105
0.59544
false
3.847118
false
false
false
MinaProject/backend
backend/migrations/0001_initial.py
1
1412
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Story', fields=[ ('id', models.AutoField(verbos...
bsd-2-clause
938,260,347,055,462,700
36.157895
125
0.550992
false
4.331288
false
false
false
gfyoung/scipy
scipy/signal/filter_design.py
1
150871
"""Filter design. """ from __future__ import division, print_function, absolute_import import math import operator import warnings import numpy import numpy as np from numpy import (atleast_1d, poly, polyval, roots, real, asarray, resize, pi, absolute, logspace, r_, sqrt, tan, log10, ...
bsd-3-clause
6,521,988,863,942,118,000
31.977268
79
0.570832
false
3.427095
false
false
false
NOAA-PMEL/PyFerret
pyfermod/fershp/shapefile_writexyzval.py
1
20809
""" Creates a shapefile with a given root name using data from given X, Y, Z, and value arrays (curvilinear-type data). The shapes are quadrilaterals derived from the X and Y arrays which can have varying Z coordinates; i.e., vertices are the (i,j), (i,j+1), (i+1,j+1), and (i+1,j) elements of the X, Y, and Z coordinat...
unlicense
5,531,143,267,369,475,000
55.855191
154
0.531357
false
2.768259
false
false
false
chasetb/sal
licenses/views.py
1
5217
from django.http import HttpResponse, HttpRequest, HttpResponseRedirect from django.template import RequestContext, Template, Context from django.shortcuts import render_to_response, get_object_or_404, redirect from django.http import Http404 from django.contrib.auth.decorators import login_required, permission_require...
apache-2.0
6,502,281,945,030,541,000
34.986207
101
0.642131
false
4.022359
false
false
false
chayapan/django-sentry
src/sentry/templatetags/sentry_helpers.py
1
9301
""" sentry.templatetags.sentry_helpers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # XXX: Import django-paging's template tags so we dont have to worry about # INSTALLED_APPS from django import temp...
bsd-3-clause
4,862,714,136,699,504,000
27.184848
103
0.612837
false
3.777823
false
false
false
Monitox/hash-table-ordered-list
ui/console.py
1
1714
''' Created on 2 Jun 2015 @author: sl0 ''' class UI: def __init__(self, ctrl): self._ctrl = ctrl def _print_menu(self): print(" 1. Show all songs\n \ 2. Add song\n \ 3. Delete song\n \ 4. Rate song!\n \ 5. Exit") def _show_all(self...
mit
6,991,233,248,794,201,000
28.067797
68
0.449825
false
3.808889
false
false
false
ayepezv/GAD_ERP
openerp/http.py
1
70868
# -*- coding: utf-8 -*- #---------------------------------------------------------- # OpenERP HTTP layer #---------------------------------------------------------- import ast import collections import contextlib import datetime import functools import hashlib import hmac import inspect import logging import mimetypes ...
gpl-3.0
1,809,852,902,535,298,600
37.768053
178
0.582082
false
4.385396
false
false
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/web2/wsgi.py
1
11757
""" An implementation of PEP 333: Python Web Server Gateway Interface (WSGI). """ import os, threading import Queue from zope.interface import implements from twisted.internet import defer from twisted.python import log, failure from twisted.web2 import http from twisted.web2 import iweb from twisted.web2 import serv...
bsd-3-clause
7,118,216,439,322,315,000
33.078261
91
0.583057
false
4.695288
false
false
false
sergiocorato/partner-contact
partner_second_lastname/models/res_partner.py
1
4100
# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis # Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa # Copyright 2017 Tecnativa - Pedro M. Baeza from odoo import api, fields, models from odoo.a...
agpl-3.0
-100,289,573,384,351,820
35.598214
78
0.545743
false
4.08674
false
false
false
leandrotoledo/python-telegram-bot
telegram/ext/filters.py
2
86691
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2021 # 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 #...
lgpl-3.0
3,542,371,127,810,573,300
36.461738
99
0.573405
false
4.306182
false
false
false
deepmind/acme
examples/control/run_d4pg_gym.py
1
4745
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
apache-2.0
-9,212,663,001,715,427,000
32.652482
80
0.730453
false
3.829701
false
false
false
haldean/pytomaton
setup.py
1
1171
from setuptools import setup, find_packages import os # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... # (from http://packages.python.org/an_ex...
mit
-3,458,559,232,478,488,000
35.59375
94
0.659266
false
3.68239
false
false
false
moverlan/LOTlib
LOTlib/Miscellaneous.py
1
15076
# -*- coding: utf-8 -*- """ Miscellaneous functions for LOTlib. """ # Special handling to deal with numpypy (which actually tends to be slower for LOTlib) import collections import math from math import exp, log, pi from random import random, sample import re import sys import types # For checking if something is ...
gpl-3.0
4,865,714,665,300,903,000
27.445283
122
0.523481
false
3.939378
false
false
false
mbohlool/client-python
kubernetes/client/models/v1_downward_api_volume_source.py
1
4614
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
6,473,474,372,368,282,000
28.961039
308
0.583008
false
4.31215
false
false
false
eharney/cinder
cinder/volume/manager.py
1
216458
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
apache-2.0
3,217,412,703,030,717,400
44.001663
79
0.531627
false
4.847775
false
false
false
project-ncl/repour
repour/adjust/process_provider.py
1
3740
# flake8: noqa import io import logging import os import zipfile from .. import asutil, exception logger = logging.getLogger(__name__) expect_ok = asutil.expect_ok_closure(exception.AdjustCommandError) stdout_options = asutil.process_stdout_options stderr_options = asutil.process_stderr_options # This provider MAY...
apache-2.0
8,535,906,582,624,179,000
29.655738
90
0.491979
false
4.617284
false
false
false
storborg/manhattan
manhattan/worker.py
1
1869
from __future__ import absolute_import, division, print_function import time import logging from .record import Record log = logging.getLogger(__name__) class Worker(object): def __init__(self, log, backend, stats_every=50): self.log = log self.backend = backend self.stats_every = stat...
mit
-7,382,335,960,313,261,000
31.789474
74
0.574639
false
3.775758
false
false
false
nicko96/Chrome-Infra
infra/tools/restart/restart.py
1
4165
# Copyright 2015 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 contextlib import datetime import distutils.util import json import logging import os import re import shutil import subprocess import sys import temp...
bsd-3-clause
2,002,310,883,650,919,700
29.851852
80
0.658343
false
3.535654
false
false
false
ghislainv/roadless
Asia/roadless/run_modelling_steps.py
1
10555
#!/usr/bin/python # ============================================================================== # author :Ghislain Vieilledent # email :ghislain.vieilledent@cirad.fr, ghislainv@gmail.com # web :https://ghislainv.github.io # python_version :2.7 # license :GPLv3 # =============...
gpl-3.0
4,794,835,789,832,506,000
36.429078
85
0.506869
false
3.785868
false
false
false
thiagopena/djangoSIGE
djangosige/apps/cadastro/views/transportadora.py
1
4197
# -*- coding: utf-8 -*- from django.urls import reverse_lazy from djangosige.apps.cadastro.forms import TransportadoraForm, VeiculoFormSet from djangosige.apps.cadastro.models import Transportadora, Veiculo from .base import AdicionarPessoaView, PessoasListView, EditarPessoaView class AdicionarTransportadoraView(A...
mit
3,255,941,512,210,489,300
40.554455
90
0.663569
false
3.532828
false
false
false
DinoTools/pysslscan
sslscan/module/scan/server_certificate.py
1
2562
import flextls from flextls.protocol.handshake import Handshake, ServerCertificate, DTLSv10Handshake from sslscan import modules from sslscan._helper.openssl import version_openssl, version_pyopenssl from sslscan.module import STATUS_OK, STATUS_ERROR from sslscan.module.scan import BaseScan openssl_enabled = False ve...
lgpl-3.0
-8,913,361,893,943,016,000
29.5
108
0.612412
false
4.255814
false
false
false
colour-science/colour
colour/biochemistry/michaelis_menten.py
1
2864
# -*- coding: utf-8 -*- """ Michaelis-Menten Kinetics ========================= Implements support for *Michaelis-Menten* kinetics, a model of enzyme kinetics: - :func:`colour.biochemistry.reaction_rate_MichealisMenten` - :func:`colour.biochemistry.substrate_concentration_MichealisMenten` References ---------- -...
bsd-3-clause
2,864,307,062,213,667,300
25.036364
79
0.613827
false
3.217978
false
false
false
Ruide/angr-dev
angr-doc/examples/defcon2017quals_crackme2000/occult.py
1
4632
import logging import sys import angr import capstone import r2pipe l = logging.getLogger('angr.manager').setLevel(logging.WARNING) l = logging.getLogger('angr.engines.vex.engine').setLevel(logging.ERROR) pos = 0xd000000 def recvuntil(sock, s): data = "" while True: char = sock.recv(1) if n...
bsd-2-clause
-3,770,903,994,202,302,000
29.077922
141
0.557427
false
3.477477
false
false
false
bmuthoga/cp-2-bucketlist-api
tests/base_test.py
1
1504
'''Module to setup before tests are ran''' import json import os import os.path import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from flask_testing import TestCase from app import app, db class BaseTestCase(TestCase): '''Class to be used to setup before running tests.''' def crea...
gpl-3.0
-1,902,296,117,045,332,000
25.857143
82
0.591755
false
4.02139
true
false
false
jucacrispim/toxicbuild
toxicbuild/output/notifications/slack.py
1
2678
# -*- coding: utf-8 -*- # Copyright 2019 Juca Crispim <juca@poraodojuca.net> # This file is part of toxicbuild. # toxicbuild 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 Lic...
agpl-3.0
1,050,126,513,560,622,000
37.257143
79
0.640777
false
4.008982
false
false
false
abo-abo/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/factories.py
1
5667
import datetime from factory import Factory, lazy_attribute_sequence, lazy_attribute from factory.containers import CyclicDefinitionError from uuid import uuid4 from pytz import UTC from xmodule.modulestore import Location from xmodule.x_module import XModuleDescriptor class Dummy(object): pass class XModuleF...
agpl-3.0
3,880,265,870,056,071,000
31.947674
101
0.641609
false
4.396431
false
false
false
vicnet/weboob
modules/bandcamp/module.py
1
1878
# -*- coding: utf-8 -*- # Copyright(C) 2017 Vincent A # # This file is part of a weboob module. # # This weboob module 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 Licen...
lgpl-3.0
2,178,104,149,727,519,700
31.947368
77
0.684239
false
3.72619
false
false
false
jadnohra/connect
proto_4/ddq/print_tree.py
1
1782
from typing import Callable def print_tree(root, children_func=list, name_func=str): """Pretty print a tree, in the style of gnu tree""" # prefix components: space = ' ' branch = '│ ' # pointers: tee = '├── ' last = '└── ' # Inspired by https://stackoverflow.com/questions/...
unlicense
-2,365,219,356,944,088,600
35.458333
83
0.577143
false
3.863135
false
false
false
spigwitmer/mysqlproxy
mysqlproxy/types.py
1
8037
""" Protocol wire types """ import struct from StringIO import StringIO import logging _LOG = logging.getLogger(__name__) __all__ = [ 'MySQLDataType', 'FixedLengthString', 'RestOfPacketString', 'LengthEncodedString', 'NulTerminatedString', 'FixedLengthInteger', 'LengthEncodedInteger', ...
bsd-3-clause
-4,341,763,954,824,290,300
28.332117
101
0.547966
false
3.651522
false
false
false
jeanslack/Videomass
videomass3/vdms_threads/ffprobe_parser.py
1
13023
# -*- coding: UTF-8 -*- """ Name: ffprobe_parser.py Porpose: cross-platform parsing class for ffprobe Compatibility: Python3, Python2 Platform: all platforms Author: Gianluca Pernigotto <jeanlucperni@gmail.com> Copyright: (c) 2018/2021 Gianluca Pernigotto <jeanlucperni@gmail.com> license: GPL3 Rev: May.11.2021 Code che...
gpl-3.0
-3,122,840,573,153,265,700
35.892351
77
0.4651
false
5.133228
false
false
false
bertothunder/m3u8
m3u8/model.py
1
23249
# coding: utf-8 # Copyright 2014 Globo.com Player authors. All rights reserved. # Use of this source code is governed by a MIT License # license that can be found in the LICENSE file. from collections import namedtuple import os import errno import math from m3u8.parser import parse, format_date_time from m3u8.mixins...
mit
-5,880,467,602,420,675,000
32.451799
135
0.590176
false
3.790804
false
false
false
Gebesa-Dev/Addons-gebesa
factoraje_v2/models/account_invoice.py
1
1416
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import _, api, fields, models from openerp.exceptions import ValidationError class AccountInvoice(models.Model): _inherit = 'account.invoice' factoraje_v2 = fields.Boolean( ...
agpl-3.0
-5,439,016,553,349,370,000
33.512195
71
0.600707
false
3.5375
false
false
false
tristan-hunt/UVaProblems
Geometry/fortified_forest.py
1
5614
import sys import math from itertools import chain, combinations class Point: def __init__(self, x, y): self.x = x self.y = y def __repr__(self): return "P:({}, {})".format(self.x, self.y) def __str__(self): return "P:({}, {})".format(self.x, self.y) #def powerSet(soFar, rest): # """ # soFar, rest ...
gpl-3.0
-6,444,966,945,428,428,000
22.788136
84
0.592626
false
2.680993
false
false
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/storage/_client_factory.py
1
14866
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
-909,402,038,468,885,000
46.954839
115
0.636351
false
3.933845
false
false
false
gferreira/hTools2_extension
hTools2.roboFontExt/lib/hTools2/dialogs/glyphs/width_set.py
1
7256
# [h] set advance width of selected glyphs ### options `split difference` and `relative split` ### suggested and funded by Bas Jacobs / Underware # imports from mojo.roboFont import CurrentFont, CurrentGlyph from vanilla import * from hTools2 import hDialog from hTools2.dialogs.misc import Spinner from hTools2.modu...
bsd-3-clause
2,927,177,842,551,560,000
29.233333
108
0.487596
false
4.296033
false
false
false
Barrog/C4-Datapack
data/jscript/quests/3_ReleaseDarkelfElder1/__init__.py
1
4469
# Maked by Mr. Have fun! Version 0.2 import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest #NPC TALLOTH = 7141 #ITEMS ONYX_BEAST_EYE = 1081 TAINT_STONE = 1082 SUCCUBUS_BLOOD ...
gpl-2.0
6,697,314,470,871,486,000
31.151079
145
0.665249
false
2.602796
false
false
false
pastas/pasta
doc/conf.py
1
8562
# -*- coding: utf-8 -*- # # PASTAS documentation build configuration file, created by # sphinx-quickstart on Wed May 11 12:38:06 2016. # Repository setup is according to: # http://gisellezeno.com/tutorials/sphinx-for-python-documentation.html # # This file is execfile()d with the current directory set to its # contain...
mit
-2,769,672,445,974,722,600
30.248175
79
0.67893
false
3.620296
true
false
false
algorhythms/LeetCode
845 Longest Mountain in Array.py
1
2920
#!/usr/bin/python3 """ Let's call any (contiguous) subarray B (of A) a mountain if the following properties hold: B.length >= 3 There exists some 0 < i < B.length - 1 such that B[0] < B[1] < ... B[i-1] < B[i] > B[i+1] > ... > B[B.length - 1] (Note that B could be any subarray of A, including the entire array A.) Give...
mit
716,115,420,018,782,300
24.614035
75
0.442466
false
3.201754
false
false
false
thomper/ausabavalidator
rulesdetail.py
1
4669
import string TRANSACTION_CODES = ('13', ) + tuple((str(i) for i in range(50, 58))) def record_type(all_lines, line_num): # character 0 line = all_lines[line_num] if line[0] != '1': return "The zeroth character in a detail record must be '1', was '{}'".format(line[0]) return None def bsb_nu...
gpl-3.0
-3,259,260,748,956,905,500
32.833333
120
0.634611
false
3.572303
false
false
false
jgmanzanas/CMNT_004_15
project-addons/order_line_fix/order_line.py
1
2535
# -*- 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 ...
agpl-3.0
3,863,654,248,660,731,400
46.75
124
0.552663
false
4.049521
false
false
false
lightbulb-framework/lightbulb-framework
libs/MySQLdb.py
1
2690
import sys, os, inspect, imp import jarray class classPathHacker(object): """Original Author: SG Langer Jan 2007, conversion from Java to Jython Updated version (supports Jython 2.5.2) From http://glasblog.1durch0.de/?p=846 Purpose: Allow runtime additions of new Class/jars either from local files or...
mit
-3,644,463,494,230,494,700
24.140187
147
0.657249
false
3.183432
false
false
false
dkuryakin/magnetico
magneticod/persistence.py
1
9892
# magneticod - Autonomous BitTorrent DHT crawler and metadata fetcher. # Copyright (C) 2017 Mert Bora ALPER <bora@boramalper.org> # Dedicated to Cemile Binay, in whose hands I thrived. # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License...
agpl-3.0
-5,363,630,782,478,513,000
39.540984
144
0.530631
false
4.22374
false
false
false
Sushiemaster/self123
cogs/server.py
1
9847
import prettytable from PythonGists import PythonGists from appuselfbot import bot_prefix from discord.ext import commands from cogs.utils.checks import * '''Module for server commands.''' class Server: def __init__(self, bot): self.bot = bot def find_server(self, msg): serve...
mit
-6,316,715,153,050,812,000
47.482412
243
0.525947
false
3.902893
false
false
false
rwl/PyCIM
CIM14/ENTSOE/Equipment/OperationalLimits/OperationalLimitType.py
1
3691
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
mit
-3,747,185,195,137,026,600
49.561644
307
0.726361
false
4.590796
false
false
false
Fizzadar/pyinfra
tests/test_global_arguments.py
1
1598
from glob import glob from importlib import import_module from inspect import getargspec, getmembers from os import path from types import FunctionType from unittest import TestCase from pyinfra import operations from pyinfra.api.operation_kwargs import OPERATION_KWARGS def _is_pyinfra_operation(module, key, value):...
mit
2,468,983,659,535,450,600
33
81
0.623905
false
4.161458
false
false
false
hyc/HyperDex
maint/generate-replication-shell-stubs.py
1
1361
import os template = '''#!/bin/sh SPACE="{space} create {daemons} partitions tolerate {ft} failures" exec python "${{HYPERDEX_SRCDIR}}"/test/runner.py --daemons={daemons} --space="${{SPACE}}" -- \\ "${{HYPERDEX_BUILDDIR}}"/test/replication-stress-test --quiet -n {daemons} -h {{HOST}} -p {{PORT}} ''' SIMPLE = "sp...
bsd-3-clause
-4,747,418,909,036,208,000
40.242424
124
0.588538
false
3.255981
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Tasking/Mcl_Cmd_Activity_Tasking.py
1
1499
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: Mcl_Cmd_Activity_Tasking.py ACTIVITY_ACTION_LAST = 1 ACTIVITY_ACTION_MONITOR = 2 def TaskingMain(namespace): import mcl.imports import mcl.t...
unlicense
-333,554,951,038,602,050
36.5
92
0.682455
false
3.237581
false
false
false
verilylifesciences/iitch
iitch/abmosquito/mosquito_abm.py
1
13276
# Copyright 2019 Verily Life Sciences 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 t...
apache-2.0
-6,338,479,249,559,034,000
31.459658
80
0.656598
false
3.398874
false
false
false
Kleptobismol/scikit-bio
skbio/stats/distance/_base.py
1
41154
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
-3,536,415,187,065,937,000
32.458537
79
0.5858
false
4.562528
false
false
false
mrosenstihl/PulsePrograms
FID/fid_res.py
1
3834
import math import scipy.signal import numpy from scipy.optimize import leastsq import numpy as N def lorenz(x,gamma,offs): return gamma/(numpy.pi*((x-offs)**2+gamma**2)) def gauss(x,sigma,offs): return 1/(sigma*numpy.sqrt(2*numpy.pi))*numpy.exp(-0.5*((x-offs)/sigma)**2) def voigt(p,x): return nu...
bsd-2-clause
8,903,580,542,266,116,000
40.236559
151
0.522953
false
3.152961
false
false
false
sterlingbaldwin/acme_workbench
workbench-backend/file_manager/models.py
1
2346
from __future__ import unicode_literals from enum import Enum from django.db import models from django.contrib.auth.models import User class DataType(Enum): """ Enumeration of valid file types """ NETCDF = 1 TEXT = 2 JSON = 3 NAMELIST = 4 IMAGE = 5 XML = 6 class BaseModel(models...
bsd-2-clause
-4,524,937,193,433,440,000
27.962963
95
0.612958
false
4.003413
false
false
false
WalterPaixaoCortes/Reusables
file-indexer/PyPDF2/filters.py
1
13162
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyrig...
gpl-2.0
7,150,067,861,855,445
35.359116
110
0.493238
false
4.336738
false
false
false
JakubNvk/school
artificial-intelligence/ui#3/ui3.py
1
3377
import csv import numpy as np import matplotlib.pyplot as plt def lookahead_moving_average(data, window): ma = [] for i in range(len(data)): avg = 0 if i + window > len(data): window -= 1 for j in range(window): avg += data[i+j] ma.append(avg/float(windo...
mit
-940,211,573,137,839,000
31.161905
62
0.622742
false
2.601695
false
false
false
kawashiro/dewyatochka2
src/dewyatochka/core/plugin/subsystem/message/service.py
1
5033
# -*- coding: UTF-8 """ Message plugins container service implementation Classes ======= Environment -- Message plugin environment Service -- Message plugins container service Wrapper -- Message plugin environment wrapper Output -- Output wrapper Attributes ========== PLUGIN_TYPES ...
gpl-3.0
3,230,120,648,573,462,500
28.261628
96
0.641764
false
4.438272
false
false
false
praekelt/django-generate
generate/management/commands/json_loader.py
1
6690
import cStringIO import hashlib import json import mimetypes import os import random import sys import urllib from datetime import datetime from django.core.files.uploadedfile import InMemoryUploadedFile from django.db.models import get_model, DateField, DateTimeField, FileField, \ ImageField from django.db.mo...
bsd-3-clause
3,565,584,209,734,881,000
31.955665
79
0.524813
false
4.212846
false
false
false
evoloyeu/leapmotion
leapmotion3d/parser.py
1
1771
# Rex Lei rexlei86@uvic.ca # parse the coordinates data from the file generated by leapmotion import sys, glob, os,csv def parser2(filename): raw = open(filename) fbname = filename.split('.')[0] pfile = open("../"+fbname+".txt", "w") pFre = open("../statistics/"+fbname+"Stat.txt", "w") csvFp = csv.writer(open("....
apache-2.0
5,356,568,932,244,419,000
20.876543
66
0.563523
false
2.452909
false
false
false
SumiTomohiko/Yog
tools/swig/Examples/python/weave/swigptr2.py
1
99221
# This code allows one to use SWIG wrapped objects from weave. This # code is specific to SWIG-1.3 and above where things are different. # The code is basically all copied out from the SWIG wrapper code but # it has been hand edited for brevity. # # Prabhu Ramachandran <prabhu@aero.iitm.ernet.in> ####################...
mit
8,668,523,743,894,940,000
26.902418
141
0.581349
false
3.060204
false
false
false
open-synergy/opnsynid-hr
hr_holiday_code/hooks.py
1
1771
# -*- coding: utf-8 -*- # Copyright 2018 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import SUPERUSER_ID def create_code_equal_to_id(cr): """ With this pre-init-hook we want to avoid error when creating the UNIQUE code constraint when the module is i...
agpl-3.0
-661,901,731,641,312,500
29.016949
78
0.559571
false
3.720588
false
false
false