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
localprojects/Civil-Debate-Wall-Kiosk
dev_tools/embed_generator/embedgen.py
1
1047
# Little app to generate AS3 image embed code. # The image will be available from an eponymous static variable, without the file type suffix. # If it's fed a directory, it wil create embed code for every image file in the directory import os, sys imageExtensions = ['.jpg', '.png', '.gif'] def printEmbed(filename): ...
gpl-2.0
-2,185,355,945,077,706,500
32.806452
122
0.659981
false
3.261682
false
false
false
jsevilleja/letsencrypt
letsencrypt.py
1
1902
#!/usr/bin/env python import argparse import logging import os import certificate import acme import parser def main(): log = logging.getLogger(__name__) log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) arg_parser = argparse.ArgumentParser() arg_parser.add_argument("--path", re...
gpl-2.0
6,048,918,412,103,494,000
34.222222
114
0.666141
false
3.408602
false
false
false
edilio/tobeawebproperty
haweb/apps/core/migrations/0004_auto_20141130_1107.py
1
1265
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import localflavor.us.models class Migration(migrations.Migration): dependencies = [ ('core', '0003_auto_20141130_1044'), ] operations = [ migrations.AlterModelOptions( n...
mit
1,210,994,129,774,920,700
29.119048
95
0.56996
false
4.107143
false
false
false
op3/hdtv
hdtv/plugins/fitlist.py
1
11488
# -*- coding: utf-8 -*- # HDTV - A ROOT-based spectrum analysis software # Copyright (C) 2006-2009 The HDTV development team (see file AUTHORS) # # This file is part of HDTV. # # HDTV is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # ...
gpl-2.0
5,580,118,264,738,536,000
35.938907
97
0.544829
false
4.163827
false
false
false
vkris/pyzookeeper
setup.py
1
1265
#!/usr/bin/env python from setuptools import setup, find_packages import os, re PKG='pyzookeeper' VERSIONFILE = os.path.join('pyzookeeper', '_version.py') verstr = "unknown" try: verstrline = open(VERSIONFILE, "rt").read() except EnvironmentError: pass # Okay, there is no version file. else: MVSRE = r"^man...
mit
-3,459,132,697,945,531,000
29.853659
86
0.600791
false
3.1625
false
false
false
habitam/habitam-core
habitam/ui/license_filter.py
1
2330
''' This file is part of Habitam. Habitam is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Habitam is distributed in the hope that ...
agpl-3.0
4,562,693,984,723,469,300
29.671053
73
0.682403
false
4.221014
false
false
false
goblinhack/MundusMeus
python/biome_land.py
1
10123
import random import mm import thing import biome_land_do import tp import game def biome_build(self, seed=0): while True: random.seed(self.biome_seed) self.biome_seed += 1 self.biome_seed *= self.biome_seed self.biome = biome_land_do.Biome(chunk=self) if not self.biome...
lgpl-3.0
-2,133,161,764,213,903,600
31.03481
79
0.378149
false
3.794228
false
false
false
zooyalove/pyfax
include/models/DynamicConfig.py
1
2651
import pymongo from . import MongoDB class DynamicConfig(MongoDB): """DynamicConfig class """ def __init__(self): super(MongoDB, self).__init__() self._collection = self._db['dynconfs'] self.dynconf_id = None self.device = None self.callid = None def close(s...
mit
5,169,615,109,688,537,000
26.905263
134
0.540174
false
3.927407
false
false
false
hahaps/openstack-project-generator
template/<project_name>/cmd/manage.py
1
13477
#!/usr/bin/env python # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # 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 ...
apache-2.0
-5,231,390,574,427,992,000
32.776942
86
0.592936
false
4.222118
true
false
false
d-e-s-o/copyright
copyright/src/deso/copyright/range.py
1
3676
# range.py #/*************************************************************************** # * Copyright (C) 2015 Daniel Mueller (deso@posteo.net) * # * * # * This program is free software: you can redistribute it and/or modify...
gpl-3.0
-8,904,273,902,667,896,000
37.291667
79
0.564744
false
4.391876
false
false
false
rev112/pyope
tests/test_stat.py
1
1903
import itertools import random import pytest from pyope.hgd import HGD from pyope.ope import ValueRange from pyope.stat import sample_uniform def test_uniform(): # Short ranges value = 10 unit_range = ValueRange(value, value) assert sample_uniform(unit_range, []) == value short_range = ValueRange...
mit
4,097,747,294,033,899,500
31.254237
99
0.636889
false
3.171667
false
false
false
macwis/simplehr
candidates/migrations/0019_auto_20160525_0858.py
1
1799
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-25 08:58 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('candidates', '0018_auto_20160524_1224'), ] ...
gpl-3.0
6,831,259,579,656,450,000
32.314815
138
0.580322
false
4.508772
false
false
false
vgrem/Office365-REST-Python-Client
tests/sharepoint/test_recycle_bin.py
1
2039
from random import randint from tests.sharepoint.sharepoint_case import SPTestCase from office365.sharepoint.files.file import File from office365.sharepoint.recyclebin.recycleBinItemCollection import RecycleBinItemCollection class TestSharePointRecycleBin(SPTestCase): target_file = None # type: File @cla...
mit
8,758,574,779,512,650,000
38.980392
112
0.687102
false
3.58348
true
false
false
wcong/ants
ants/crawl/spidermanager.py
1
1832
""" SpiderManager is the class which locates and manages all website-specific spiders """ from zope.interface import implements from ants import signals from ants.utils.interfaces import ISpiderManager from ants.utils.misc import walk_modules from ants.utils.spider import iter_spider_classes class SpiderManager(obj...
bsd-3-clause
8,412,298,830,859,857,000
29.533333
73
0.645742
false
3.991285
false
false
false
userzimmermann/robotframework-python3
utest/running/test_imports.py
1
2843
import unittest from six.moves import StringIO from robot.running import TestSuite from robot.utils.asserts import assert_equals, assert_raises_with_msg def run(suite, **config): result = suite.run(output=None, log=None, report=None, stdout=StringIO(), stderr=StringIO(), **config) retu...
apache-2.0
-1,786,881,284,123,601,000
36.906667
81
0.588111
false
4.067239
true
false
false
foone/7gen
code/decompress3dmm.py
1
1907
#!/usr/env python #BMDLVIEW: Views Microsoft 3D Movie Maker models (BMDLs) #Copyright (C) 2004-2015 Foone Turing # #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 ...
gpl-2.0
6,400,433,870,015,829,000
43.348837
240
0.760881
false
3.310764
false
false
false
exiahuang/SalesforceXyTools
xlsxwriter/workbook.py
1
54782
############################################################################### # # Workbook - A class for writing the Excel XLSX Workbook file. # # Copyright 2013-2016, John McNamara, jmcnamara@cpan.org # # Standard packages. import sys import re import os import operator from warnings import warn from datetime impor...
apache-2.0
-5,126,902,016,835,148,000
32.48533
79
0.534902
false
4.20979
false
false
false
ric2b/Vivaldi-browser
chromium/third_party/blink/renderer/bindings/scripts/build_web_idl_database.py
1
1272
# Copyright 2019 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. """ Builds Web IDL database. Web IDL database is a Python object that supports a variety of accessors to IDL definitions such as IDL interface and IDL attri...
bsd-3-clause
-5,031,196,945,547,410,000
23.461538
75
0.65173
false
4.103226
false
false
false
jiadaizhao/LeetCode
0601-0700/0639-Decode Ways II/0639-Decode Ways II.py
1
2404
class Solution: def numDecodings(self, s: str) -> int: MOD = 1000000007 dp = [0] * (1 + len(s)) dp[0] = 1 for i in range(1, len(dp)): if s[i - 1] == '*': dp[i] = dp[i - 1]*9 % MOD elif s[i - 1] != '0': dp[i] = dp[i - 1] ...
mit
-7,319,157,839,342,609,000
32.388889
60
0.253744
false
3.315862
false
false
false
h-hirokawa/swampdragon
swampdragon/pubsub_providers/channel_utils.py
1
3543
from ..model_tools import string_to_list, get_property from .channel_filters import filter_options, in_compare, term_match_check try: from urllib.parse import quote_plus, unquote_plus except ImportError: from urllib import quote_plus, unquote_plus def make_safe(val): """ Make strings in filters save...
bsd-3-clause
7,975,938,618,541,718,000
28.040984
90
0.619249
false
3.745243
false
false
false
konstantinKim/vd-backend
app/facilities/models.py
1
4354
from marshmallow_jsonapi import Schema, fields from marshmallow import validate from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.exc import SQLAlchemyError from app.helper.helper import Calc db = SQLAlchemy(session_options={"autoflush": False}) class CRUD(): def add(self, resource): db.sess...
mit
5,645,028,438,968,486,000
38.944954
376
0.590032
false
3.393609
false
false
false
Josef-Friedrich/audiorename
audiorename/audiofile.py
1
12041
"""This module contains all functionality on the level of a single audio file. """ from __future__ import print_function from audiorename.meta import Meta, dict_diff from phrydy.utils import as_string from tmep import Functions from tmep import Template import errno import os import phrydy import re import shutil cl...
mit
1,818,951,839,829,924,400
28.123487
79
0.559528
false
3.912817
false
false
false
alogg/dolfin
test/unit/mesh/python/MeshIterator.py
1
4235
"Unit tests for MeshIterator and subclasses" # Copyright (C) 2006-2011 Anders Logg # # This file is part of DOLFIN. # # DOLFIN 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 Li...
gpl-3.0
-2,187,166,778,391,369,200
28.615385
77
0.565525
false
3.657168
true
false
false
mbeaver502/CyberLawBot
engine.py
1
16014
""" Description: This program implements a simple Twitter bot that tweets information about bills in Congress that are (in)directly related to cyber issues. This bot uses a MySQL database backend to keep track of bills, both posted and unposted (i.e., tweeted and yet to be tweeted, respectively). For th...
apache-2.0
3,652,089,476,477,341,700
36.503513
146
0.554078
false
4.194343
false
false
false
lakewik/storj-gui-client
UI/qt_interfaces/file_mirrors_ui_new.py
1
11722
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'file_mirrors_list_new.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _...
mit
2,790,875,658,646,326,300
43.570342
201
0.663197
false
3.192266
false
false
false
icemoon1987/python_toolkit
mail_office365.py
1
2127
#!/usr/bin/env python #coding: utf-8 import smtplib import email import mimetypes import json from email.MIMEMultipart import MIMEMultipart from email.mime.text import MIMEText mail_host = "" mail_user = "" mail_pwd = "" mail_postfix = "" def sendmail(to_list,subject,content): # translation me...
gpl-3.0
2,149,991,689,210,147,800
24.961538
65
0.588683
false
3.260465
false
false
false
derek-dalle/olab
matrix.py
1
4107
""" Provide sane Matlab-like functions """ # Import NumPy because we're building on some of its functions. import numpy as _np # Function to give length regardless of the damn type. def numel(x): """ Give number of elements in a variable without being ridiculously dependent on the type. Ever wanted to kn...
lgpl-2.1
3,550,653,919,833,609,700
26.945578
80
0.538593
false
3.657168
false
false
false
jajgarcia/DoFits
dofit.py
1
3988
#!/usr/bin/python # # dofit.py (Based on fitxsp.py) # # Load data and perform a model fit using PyXspec # # Requires: xspec # Make sure to set: # export VERSIONER_PYTHON_PREFER_32_BIT=yes # (only for heasoft earlier than 6.16) # import sys from xspec import * from optparse import OptionParser import os,os...
gpl-2.0
-6,353,604,172,897,491,000
22.052023
111
0.599549
false
2.962853
false
false
false
iRapha/140_MD
app/client.py
1
2653
# Credit: https://github.com/pabluk/twitter-application-only-auth/blob/master/application_only_auth/client.py import base64 import json import sys try: # For Python 3.0 and later from urllib.request import urlopen, Request from urllib.error import HTTPError except ImportError: # Fall back to Python 2...
gpl-3.0
7,204,466,494,864,592,000
32.582278
109
0.62533
false
3.96562
false
false
false
cuttlefishh/emp
code/01-metadata/metadata_template_generator.py
1
4911
#!/usr/bin/env python import click import pandas as pd import re # Hard-coded variables investigation_type = 'metagenome' # Function: return dataframe of environmental package-specific metadata items # A single environmental package (soil) or list can be provided (soil,water). def show_items_of_env_pkg(df_env_pkg, l...
bsd-3-clause
1,272,224,902,334,078,200
61.164557
369
0.707188
false
2.962002
false
false
false
torchbox/django-mailer-2
django_mailer/engine.py
1
8307
""" The "engine room" of django mailer. Methods here actually handle the sending of queued messages. """ from django.utils.encoding import smart_str from django_mailer import constants, models, settings from lockfile import FileLock, AlreadyLocked, LockTimeout from socket import error as SocketError import logging im...
mit
5,162,136,227,422,725,000
34.806034
83
0.642952
false
4.49027
false
false
false
chrrrles/c3px
app/models/address.py
1
1464
# Copyright (c) 2013 - The C3PX authors. # # This file is part of C3PX. # # C3PX is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later versio...
agpl-3.0
-1,253,687,468,705,276,000
25.142857
71
0.679645
false
3.753846
false
false
false
stganser/polyite
src/polyite/fitness/scikit_learn/init.py
1
2788
from enum import Enum import csv import math from sklearn import tree from sklearn.ensemble import RandomForestClassifier class LearningAlgorithms(Enum): cart = 0, random_forest = 1 class RandomForestsConfig: def __init__(self, n_tree, max_features): self.n_tree = n_tree self.max_feature...
mit
-2,570,103,128,079,093,000
38.267606
120
0.61944
false
3.845517
false
false
false
butozerca/fireplace
fireplace/cards/data/buffs.py
1
9369
from fireplace.enums import GameTag # Buff helper def buff(atk=0, health=0): ret = {} if atk: ret[GameTag.ATK] = atk if health: ret[GameTag.HEALTH] = health return ret ### # Game/Brawl set # TB_007e = { GameTag.ATTACK_HEALTH_SWAP: True, } TB_Pilot1 = { GameTag.DEATHRATTLE: True, } ### # Classic set # ...
agpl-3.0
5,784,976,088,777,001,000
12.859467
45
0.659088
false
1.973252
false
false
false
skluth/sjmanalysis
test.py
1
38623
from ROOT import TFile, gROOT, gPad, TVectorD, TObject from ROOT import TGraphErrors, TH1D, TLegend, TCanvas, TLatex TGraphErrors.__init__._creates= False TH1D.__init__._creates= False TLegend.__init__._creates= False TCanvas.__init__._creates= False TLatex.__init__._creates= False gROOT.LoadMacro( "libAnalysisDict....
gpl-2.0
-873,827,653,957,365,500
39.442932
218
0.590037
false
2.949446
false
false
false
gem/oq-hazardlib
openquake/hazardlib/tests/geo/surface/base_surface_test.py
1
17539
# The Hazard Library # Copyright (C) 2012-2017 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. #...
agpl-3.0
-7,765,860,766,505,043,000
42.199507
79
0.575688
false
3.243758
true
false
false
mathLab/RBniCS
rbnics/eim/problems/exact_parametrized_functions_decorated_problem.py
1
9290
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later import inspect from rbnics.eim.backends import OfflineOnlineBackend from rbnics.eim.utils.decorators import (DefineSymbolicParameters, StoreMapFromParametrizedOperatorsToProblem, ...
lgpl-3.0
-4,619,943,413,212,641,000
54.297619
114
0.64155
false
4.732552
false
false
false
xiaolingzi/deploy-tool-lingploy
lingploy/view/aes.py
1
1426
from PyQt5 import QtWidgets from view.aes_window import Ui_AESWindow from view.ui_thread import UIThread from view.base import Base from utils.aes_handler import AESHandler class AES(QtWidgets.QMainWindow, Ui_AESWindow, Base): def __init__(self, parent=None): QtWidgets.QMainWindow.__init__(self, parent) ...
gpl-3.0
-8,237,361,051,983,861,000
33.780488
66
0.629032
false
3.782493
false
false
false
cnamejj/PollEngine
just-otp.py
1
4562
#!/usr/bin/env python """ Driver for OpenVPN client """ import time import base64 import hashlib import struct import hmac import pollengine # --- class OVDriveData: """OpenVPN authentication data""" def __init__( self ): self.otp_secret = NO_SECRET # --- class ShellAdmin: """Driver for admin ...
apache-2.0
-972,208,901,866,818,200
26.481928
79
0.511618
false
3.479786
false
false
false
numerical-mathematics/extrapolation
ex_serial.py
1
12151
from __future__ import division import numpy as np import math def error_norm(y1, y2, atol, rtol): tol = atol + np.maximum(y1,y2)*rtol return np.linalg.norm((y1-y2)/tol)/(len(y1)**0.5) def adapt_step(method, f, tn_1, yn_1, y, y_hat, h, p, atol, rtol): ''' Checks if the step size is accepted. If n...
mit
3,576,681,026,400,465,000
35.271642
104
0.458398
false
2.773568
false
false
false
skosukhin/spack
var/spack/repos/builtin/packages/ps-lite/package.py
1
1768
############################################################################## # Copyright (c) 2013-2016, 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
7,886,909,420,478,296,000
41.095238
81
0.669118
false
3.894273
false
false
false
uehara1414/serverctl-prototype
serverctl_prototype/settings.py
1
3666
""" Django settings for serverctl_prototype project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ ""...
mit
-4,818,082,104,645,412,000
25.185714
91
0.683306
false
3.552326
false
false
false
lsbardel/python-stdnet
stdnet/utils/skiplist.py
1
5251
# Modified version of skiplist # http://code.activestate.com/recipes/ # 576930-efficient-running-median-using-an-indexable-skipli/ # import sys from random import random from math import log ispy3k = int(sys.version[0]) >= 3 if not ispy3k: range = xrange __all__ = ['skiplist'] class Node(object): __slo...
bsd-3-clause
3,151,889,869,157,624,300
30.071006
78
0.517997
false
3.866716
false
false
false
lago-project/lago
lago/templates.py
1
20977
# encoding: utf-8 from __future__ import absolute_import from __future__ import division """ This module contains any disk template related classes and functions, including the repository store manager classes and template providers, some useful definitions: * Template repositories: Repository where to fe...
gpl-2.0
3,427,605,394,685,809,700
28.254545
79
0.551035
false
4.578026
false
false
false
pedroeml/t1-fcg
CrowdDataAnalysis/analysis/grouping.py
1
3888
from collections import deque def detect_group(people_graph, everyone_in_frame, grouping_max_distance): """ :param people_graph: :type people_graph: Graph :param everyone_in_frame: [PersonPath] :type everyone_in_frame: list :param grouping_max_distance: :return: """ groups = deq...
mit
2,369,166,324,165,528,600
35
159
0.655864
false
3.534545
false
false
false
AnhellO/DAS_Sistemas
Ene-Jun-2021/pena-balderas-bryan/ExamenParcial1/Ejercicio 5/srp.py
1
1887
import json # Descarga esta librería con el comando 'pip install json2html' from json2html import * class Usuario(object): #si ya tenemos definidos nuestros atributos no es necesario pedir con **args def __init__(self, nombre,edad,direccion): self.nombre = nombre self.edad = edad self.d...
mit
5,022,539,029,547,369,000
35.823529
127
0.688332
false
2.998403
false
false
false
adcomp/piwadio
piwardio.py
1
4411
#!/usr/bin/python # -*- coding: utf-8 -*- # PIWADIO - Web Radio Player # Python WebSocket Server / wrp / HTML5 client # by David Art [aka] adcomp <david.madbox@gmail.com> import json import os import sys import subprocess import select import tornado.httpserver import tornado.websocket import tornado.ioloop import ...
gpl-2.0
4,014,646,459,952,775,000
20.945274
89
0.635684
false
2.992537
false
false
false
samj1912/picard
picard/webservice/api_helpers.py
1
10816
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2017 Sambhav Kothari # # 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 Licens...
gpl-2.0
-4,988,077,440,481,802,000
41.920635
120
0.59976
false
3.911754
false
false
false
amaurywalbert/twitter
evaluation/chen_paralell/hashmap/old/hashmap_chen_s_metrics_with_ground_truth_v1.0.py
1
12948
# -*- coding: latin1 -*- ################################################################################################ import datetime, sys, time, json, os, os.path, shutil, time, struct, random import subprocess reload(sys) sys.setdefaultencoding('utf-8') ########################################################...
gpl-3.0
1,110,181,253,667,685,800
41.993333
231
0.421073
false
3.908485
false
false
false
sonicxml/PennApps-2016f
server.py
1
2384
import flask import config import yelp_handler import json import requests slack_posturl = "https://slack.com/api/chat.postMessage" slack_reacturl = "https://slack.com/api/reactions.add" app = flask.Flask(__name__) class InvalidTokenException(Exception): pass @app.errorhandler(InvalidTokenException) def handle_...
gpl-3.0
603,276,408,014,567,700
29.974026
78
0.626258
false
3.38156
true
false
false
MGautier/security-sensor
trunk/Documentacion/Memoria/trozos-codigo/codigo-9-additional-class.py
1
1844
class PacketAdditionalInfoTestCase(TestCase): # Atributos internos de la clase timestamp = timezone.now() timestamp_insertion = timezone.now() def setUp(self): ip_source = Ips.objects.create(Ip="127.0.0.2", Hostname="localhost", Tag="localhost") ip_dest = Ips.objects.create(Ip="127.0.0...
mit
-8,364,452,860,194,801,000
36.632653
93
0.560195
false
3.666004
false
false
false
nagyistoce/netzob
src/netzob/Common/Plugins/Extensions/CapturerMenuExtension.py
1
3757
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
gpl-3.0
7,366,559,778,283,444,000
47.74026
84
0.417
false
5.176552
false
false
false
time-river/wander
practice/urllib/baidutieba_spider.py
1
5915
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ''' from http://cuiqingcai.com/993.html I just copy it and use python3 to rewrite it. ''' import urllib.request import urllib.parse import urllib.error import re class Tool: ''' 除去页面标签 ''' def __init__(self): self.removeImg = re.compile(r'<img.*?>|...
mit
-6,150,374,476,879,375,000
28
150
0.497399
false
2.860055
false
false
false
supernathan23/dn_availability
dn_availability/reports.py
1
5431
""" reports.py This file contains report definitions. A report definition is some kind callable that should output data in whatever format. Once defined, it should be added to the ALL_REPORTS dictionary, where the key is the public name used to reference the report, like from the CLI. Example definition: def...
mit
-6,912,152,011,082,097,000
35.212329
95
0.608728
false
4.433469
false
false
false
JuanDaniel/DBOJ
Engine/src/Execute/qualifieldThread.py
1
1262
''' Created on 30/01/2014 @author: jdsantana ''' import threading import time from Common.Request import Request import json class qualifieldThread(threading.Thread): def __init__(self, dbManager, parameters): threading.Thread.__init__(self) self.__dbManager = dbManager self.__parameters...
mit
-4,865,329,643,605,331,000
26.434783
132
0.574485
false
4.206667
false
false
false
intelie/pycollector
src/third/stomp/__init__.py
1
1595
"""Stomp Protocol Connectivity This provides basic connectivity to a message broker supporting the 'stomp' protocol. At the moment ACK, SEND, SUBSCRIBE, UNSUBSCRIBE, BEGIN, ABORT, COMMIT, CONNECT and DISCONNECT operations are supported. This changes the previous version which required a listener...
bsd-3-clause
-3,484,393,463,302,203,400
34.295455
113
0.691536
false
3.938272
false
false
false
cs2c-zhangchao/nkwin1.0-anaconda
pyanaconda/ui/gui/spokes/lib/resize.py
1
17819
# Disk resizing dialog # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed...
gpl-2.0
7,598,323,766,163,763,000
41.629187
122
0.590662
false
4.275192
false
false
false
katekim/stellarya
src/stellarya/Preferences.py
1
1812
import os import yaml from PyQt4.QtCore import * import stellarya class Preferences(QObject): changed = pyqtSignal(str) def __init__(self): QObject.__init__(self) self._data = {} @property def _cfgpath(self): return os.path.join(stellarya._.confdir, "stellarya.cfg") d...
mit
7,850,103,655,720,551,000
25.26087
85
0.551876
false
3.720739
false
false
false
Teagan42/home-assistant
homeassistant/components/fan/__init__.py
1
5555
"""Provides functionality to interact with fans.""" from datetime import timedelta import functools as ft import logging from typing import Optional import voluptuous as vol from homeassistant.const import SERVICE_TOGGLE, SERVICE_TURN_OFF, SERVICE_TURN_ON import homeassistant.helpers.config_validation as cv from home...
apache-2.0
6,271,439,153,283,638,000
27.782383
84
0.646445
false
3.735709
true
false
false
aselle/tensorflow
tensorflow/python/keras/engine/training_utils.py
1
37405
# Copyright 2018 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
-8,599,687,522,877,374,000
37.013211
86
0.626521
false
4.003532
false
false
false
stephanos/subvoc
web/routing.py
1
1967
import os import jinja2 from flask_json import as_json from web.routes.api_analysis import analysis_api from web.routes.api_search import search_api from web.routes.api_word import words_api from web.routes.bootstrap import bootstrap from web.routes.error import error from api.dictionary.wordnik import Wordnik from ...
mit
2,810,889,148,646,337,500
25.581081
99
0.695984
false
3.493783
false
false
false
djsegal/ahab_legacy_
pequod/createVectorLists.py
1
6291
# -*- coding: utf-8 -*- """ Created on Fri May 30 19:52:46 2014 @author: dan """ from getMultiCurVals import getMultiCurVals from readCurVectorInput import readCurVectorInput from readValue import readValue from copy import deepcopy def ...
apache-2.0
-3,726,841,644,481,246,700
40.394737
87
0.35368
false
5.616964
false
false
false
jandom/rdkit
rdkit/Chem/Draw/UnitTestSimilarityMaps.py
1
7019
# $Id$ # # Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc. # 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 c...
bsd-3-clause
-6,318,957,341,486,780,000
39.108571
96
0.69782
false
3.331277
true
false
false
theetcher/fxpt
fxpt/fx_texture_manager/harvesters.py
1
2482
import maya.cmds as m from fxpt.fx_texture_manager import tex_node TEX_ATTRIBUTES = { 'file': [ 'fileTextureName' ], # 'mentalrayTexture': [ # 'fileTextureName' # ] } class HarvesterBase(object): def getTexNodes(self): raise NotImplementedError('Call to abstract method.'...
mit
-5,509,195,213,790,897,000
27.860465
99
0.568896
false
3.830247
false
false
false
DeflatedPickle/Colony
colony/resource.py
1
2949
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """""" from colony.entities.attributes import Age, Health from colony.entities import Entity from colony.item import Item from colony.references import * __title__ = "Resource" __author__ = "DeflatedPickle" __version__ = "1.0.2" class Resource(Entity, Age, Health): ...
mit
-4,868,313,324,769,137,000
40.535211
127
0.505256
false
4.414671
false
false
false
nttks/edx-platform
biz/djangoapps/gx_member/builders.py
1
3466
# -*- coding: utf-8 -*- from collections import OrderedDict from django.utils.translation import ugettext as _ from biz.djangoapps.gx_member.models import Member FIELD_GROUP_CODE = 'group_code' FIELD_CODE = 'code' FIELD_EMAIL = 'email' FIELD_FIRST_NAME = 'first_name' FIELD_LAST_NAME = 'last_name' FIELD_PASSWORD = 'pas...
agpl-3.0
-4,143,055,898,418,332,000
34.010101
102
0.560589
false
3.929705
false
false
false
Jet-Streaming/gyp
test/small/gyptest-small.py
1
1532
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() #...
bsd-3-clause
1,676,917,526,871,446,300
25.854545
72
0.691906
false
3.273504
true
false
false
CS-SI/QGIS
python/plugins/processing/algs/gdal/tri.py
1
4263
# -*- coding: utf-8 -*- """ *************************************************************************** tri.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *********************...
gpl-2.0
9,072,826,177,340,879,000
40.38835
116
0.545156
false
5.050948
false
false
false
QwertyManiac/seal-cdh4
seal/lib/mr/filter_link.py
1
1740
# Copyright (C) 2011-2012 CRS4. # # This file is part of Seal. # # Seal 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. # # Seal is dis...
gpl-3.0
884,195,564,982,591,200
36.021277
91
0.71092
false
3.26454
false
false
false
fabeschan/midigeneration
playback-demo.py
1
1282
import data import time import mido import playback def main(): # initialize a PlaybackUtility for each midi file, put them into a list -> playback_utils playback_utils = [] for f in ['mid/owl.mid', 'mid/lost.mid']: musicpiece = data.piece(f) pbu = playback.PlaybackUtility() pbu.add...
mit
-4,767,020,812,574,751,000
32.736842
97
0.638846
false
3.748538
false
false
false
openstack/barbican
barbican/objects/fields.py
1
3518
# Copyright 2018 Fujitsu. # # 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...
apache-2.0
4,955,053,650,329,911,000
34.897959
78
0.800171
false
4.085947
false
false
false
angus-ai/angus-service-facedetection
angus/services/facedetection.py
1
1997
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 Licens...
apache-2.0
-6,569,452,880,651,726,000
27.126761
65
0.664997
false
3.591727
false
false
false
mitdbg/aurum-datadiscovery
nearpy/storage/storage_redis.py
1
5855
# -*- coding: utf-8 -*- # Copyright (c) 2013 Ole Krause-Sparmann # 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 # -*- coding: u...
mit
-6,178,399,285,993,410,000
34.920245
79
0.594364
false
4.1732
false
false
false
ztane/python-Levenshtein
setup.py
1
1550
from setuptools import setup import os import sys from distutils.core import Extension version = '0.12.2' extLevensthein = Extension('Levenshtein._levenshtein', sources = ['Levenshtein/_levenshtein.c'], ) if sys.version_info >= (3, 0): _open = lambda f: open...
gpl-2.0
3,761,975,170,363,939,300
31.978723
91
0.599355
false
3.984576
false
false
false
mitsei/dlkit
dlkit/handcar/id/objects.py
1
3208
# -*- coding: utf-8 -*- # This module contains all the Object classes used by the MIT Core Concept # Catalog (MC3) Handcar based implementation of the OSID Id Service. from ...abstract_osid.id import objects as abc_id_objects from ..osid import objects as osid_objects from .. import settings from ..primitives import ...
mit
8,675,160,027,935,675,000
34.252747
139
0.608167
false
4.352782
false
false
false
emilioriosvz/EmilioRiosExamen
peachestore/Gestor.py
1
4821
__author__ = 'Emilio' import sys, json, datetime, os from random import randrange class Gestor(): files = {} cwd = os.getcwd() files['aplicacionesgratuitas'] = os.path.join(cwd, "aplicacionesgratuitas.json") files['aplicacionesdepago'] = os.path.join(cwd, "aplicacionesdepago.json") applistfree = [...
apache-2.0
860,530,872,228,743,400
38.834711
187
0.574601
false
3.346528
false
false
false
bendmorris/retriever
engines/sqlite.py
1
1726
import os import platform from retriever.lib.models import Engine, no_cleanup from retriever import DATA_DIR class engine(Engine): """Engine instance for SQLite.""" name = "SQLite" abbreviation = "sqlite" datatypes = { "auto": "INTEGER", "int": "INTEGER", ...
mit
-7,740,125,364,134,082,000
34.958333
98
0.505794
false
4.652291
false
false
false
eouti/megapy
main.py
1
2237
#!/usr/bin/env python """main.py: Script to download links using mega-debrid.eu.""" __author__ = "eoutin" import argparse import ast import urllib from urllib2 import * import subprocess parser = argparse.ArgumentParser() parser.add_argument("link", help="link to download", type=str) parser.add_argument("path", hel...
gpl-3.0
-4,732,943,757,378,375,000
25.951807
89
0.643719
false
3.304284
false
false
false
gkno/gkno_launcher
src/gkno/fileErrors.py
1
4112
#!/usr/bin/python from __future__ import print_function import inspect from inspect import currentframe, getframeinfo import errors from errors import * import os import sys class fileErrors: # Initialise. def __init__(self): # Get general error writing and termination methods. self.errors = errors()...
mit
269,886,199,515,153,630
45.202247
154
0.699173
false
3.931166
true
false
false
Zenohm/crusoe
travis_pypi_setup.py
1
3751
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
mit
4,224,383,735,861,574,000
29.745902
79
0.679019
false
3.699211
true
false
false
klmitch/nova
nova/tests/unit/api/openstack/compute/test_server_start_stop.py
1
9355
# Copyright (c) 2012 Midokura Japan K.K. # # 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 l...
apache-2.0
9,134,414,122,101,168,000
41.912844
78
0.62031
false
3.835588
true
false
false
pytorch/vision
.circleci/unittest/linux/scripts/run-clang-format.py
1
11280
#!/usr/bin/env python """ MIT License Copyright (c) 2017 Guillaume Papin 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,...
bsd-3-clause
-5,974,119,727,037,007,000
30.07438
87
0.596543
false
4.085476
false
false
false
aissehust/sesame-paste-noodle
mlbase/tests/smoke.py
1
26037
import theano import theano.tensor as T import mlbase.network as N import h5py import numpy as np import mlbase.layers.activation as act import mlbase.loaddata as l from mlbase.layers import * import mlbase.cost as cost from skimage.measure import block_reduce def test_generative(): import mlbase.cost as cost ...
bsd-3-clause
4,741,205,503,026,675,000
33.855422
121
0.631601
false
2.878925
true
false
false
com4/eventmq
eventmq/publisher.py
2
2447
# This file is part of eventmq. # # eventmq 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. # # eventmq is distributed in the ...
lgpl-2.1
9,049,493,517,715,643,000
29.974684
79
0.629342
false
4.190068
false
false
false
VaclavDedik/classifier
classifier/models.py
1
5190
import numpy as np import operator from sklearn import naive_bayes from sklearn import svm, tree from kernels import GaussianKernel class AbstractModel(object): """Abstract model of a learning algorithm. When implementing a subclass, you have to implement method ``train``. Method ``predict`` is implemented ...
mit
-3,483,062,381,400,961,000
32.921569
78
0.618304
false
4.042056
false
false
false
djangraw/PsychoPyParadigms
BasicExperiments/MovieListTask_Builder_d1.py
1
24389
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy2 Experiment Builder (v1.90.1), on Tue May 8 15:02:31 2018 Created 5/8/18 by DJ. Updated 5/8/18 by DJ - added NetStationEEG code from https://github.com/imnotamember/PyNetstation (per Pete's instructions) Updated 6/8/18 by...
mit
2,653,068,431,553,983,500
38.400646
164
0.67797
false
3.727495
false
false
false
osrsbox/osrsbox-db
osrsbox/items_api_examples/print_f2p_weapons.py
1
1661
""" Author: PH01L Email: phoil@osrsbox.com Website: https://www.osrsbox.com Description: A very simple example script of how to load the osrsbox-db item database, loop through the loaded items, and print and items that are both weapons and available in free to play. Copyright (c) 2019, PH01L #####################...
gpl-3.0
4,822,616,301,344,140,000
40.525
84
0.647803
false
4.031553
false
false
false
Azure/azure-sdk-for-python
sdk/purview/azure-mgmt-purview/azure/mgmt/purview/models/_models.py
1
49380
# 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
-4,076,056,713,243,702,000
34.96504
150
0.619907
false
3.998057
false
false
false
sethmbaker/fewsn-web
agent/tests.py
1
1963
from django.test import TestCase from sensor_net.models import Node, Reading, Sensor from agent import utils from agent.models import * class AlertLogTestCase(TestCase): # When a reading is created, the value is checked against def setUp(self): # This test case supposes a humidity monitor for a guit...
apache-2.0
-6,219,476,835,745,085,000
34.709091
113
0.687723
false
3.628466
true
false
false
mwishoff/mattsWork
Cracking The Coding Interview/FindMissingNumbers.py
1
1145
from bitarray import bitarray def MissingNumbers(array): bArray = bitarray(100) missingNums = [] tempPair = [] strList = [] itr = iter(range(100)) strRange = "" for num in array: bArray[num] = 1 for i in itr: print(i) if bArray[i] == 0: tempPair.a...
gpl-3.0
-7,503,232,586,219,784,000
20.203704
55
0.470742
false
3.623418
false
false
false
jpachecot/Programa_Organizacion_Hotel_Royal_Decameron_Punta_Sal
modulobdreservaciones.py
1
17320
#MODULO RESERVACIONES - BASE DE DATOS import os import sys import sqlite3 import moduloinicio import moduloreservaciones def nombre(): letras = [' ','A','B','C','D','E','F','G','H','I','J','K','L','M','N','Ñ','O','P','Q','R','S','T','U','V','W','X','Y','Z','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'...
gpl-3.0
-6,831,424,874,366,414,000
37.511416
304
0.385011
false
3.633424
false
false
false
arangodb/arangodb
3rdParty/V8/gyp/MSVS/MSVSSettings.py
1
45377
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
apache-2.0
-3,895,816,195,586,645,000
39.953971
80
0.648588
false
3.696399
false
false
false
SteveDiamond/cvxpy
cvxpy/interface/base_matrix_interface.py
2
5011
""" Copyright 2013 Steven Diamond 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, software...
gpl-3.0
1,837,893,221,666,258,700
35.311594
89
0.645979
false
4.225126
false
false
false
unknowfly/npa-bbs
NpaForum/apps/users/models.py
1
1981
# -*- coding: utf8 -*- from __future__ import unicode_literals from django.contrib.auth.models import AbstractUser from django.db import models from datetime import datetime from utils.common_utils import * # Create your models here. class UserProfile(AbstractUser): nickname = models.CharField(max_length=60, ve...
mit
-713,898,654,345,017,200
37.4375
125
0.673171
false
3.080134
false
false
false
kepstin/picard
picard/plugin.py
1
6881
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # # 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...
gpl-2.0
-1,107,018,417,051,953,000
31.443396
92
0.573423
false
4.245679
false
false
false
elektro-NIK/P3DA
setup.py
1
1037
from setuptools import setup, find_packages from pip import get_installed_distributions from sys import exit PACKAGE = 'software' NAME = 'P3DA' DESCRIPTION = 'P3DA - RGB controller based on Arduino board' AUTHOR = 'Bogdan Kalinin' AUTHOR_EMAIL = 'bogdan.kalinin@gmail.com' URL = 'https://github.com/elektro-NIK/P3DA' VE...
gpl-3.0
3,551,913,329,480,088,000
31.40625
65
0.621022
false
3.433775
false
false
false
summanlp/textrank
summa/preprocessing/snowball.py
1
166890
# Adapted from the NLTK package v3.0.1: # https://github.com/nltk/nltk/blob/3.0.1/nltk/stem/snowball.py # # Natural Language Toolkit: Snowball Stemmer # # Copyright (C) 2001-2014 NLTK Project # Author: Peter Michael Stahl <pemistahl@gmail.com> # Peter Ljunglof <peter.ljunglof@heatherleaf.se> (revisions) # Algo...
mit
-7,996,408,616,791,845,000
37.813796
102
0.420733
false
3.739084
false
false
false
pkill-nine/qutebrowser
tests/unit/config/test_config.py
1
16989
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser 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
7,556,874,685,535,554,000
39.258294
79
0.574666
false
3.790495
true
false
false
haggi/OpenMaya
src/mayaToCorona/mtco_devmodule/scripts/Corona/AETemplate/AECoronaLayeredTemplate.py
1
10391
import pymel.core as pm import logging import traceback import sys from getpass import getuser log = logging.getLogger("ui") class BaseTemplate(pm.ui.AETemplate): def addControl(self, control, label=None, **kwargs): pm.ui.AETemplate.addControl(self, control, label=label, **kwargs) def be...
mit
-1,501,525,835,912,991,700
46.669725
129
0.626407
false
4.210292
false
false
false
Berkeley-BORIS/BORIS_Code
notebooks/stereocalibrationtesting/stereo_calibration_orig.py
1
8634
import sys import os import random import fnmatch import cv import cv2 import numpy as np #print cv2.__version__ #if not cv2.__version__.startswith('2.3'): # raise NotImplementedError("WARNING: cv2 is version {0}!! We haven't implemented the inverted transform direction changed after 2.3!".format(cv2.__version__)) de...
mit
-3,516,562,591,805,934,000
36.703057
315
0.702571
false
2.513537
false
false
false