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
openstack/python-neutronclient
neutronclient/neutron/v2_0/router.py
1
11540
# Copyright 2012 OpenStack Foundation. # 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 requ...
apache-2.0
-3,872,741,206,515,742,000
37.855219
79
0.600867
false
4.205539
false
false
false
mentaal/r_map
r_map/Node.py
1
8294
from __future__ import annotations from collections import OrderedDict as OD from uuid import uuid4 from itertools import chain from operator import itemgetter import logging logger = logging.getLogger(__name__) class NodeMeta(type): '''used to magically update the nb_attrs''' def __new__(mcs, name, bases, att...
mit
2,625,516,951,009,497,600
36.192825
99
0.569689
false
4.210152
false
false
false
H-uru/korman
korman/nodes/node_conditions.py
1
20510
# This file is part of Korman. # # Korman 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. # # Korman is distributed i...
gpl-3.0
-5,021,728,681,779,655,000
40.02
146
0.615261
false
4.014484
false
false
false
fwilson42/irc2
irc2/utils.py
1
5196
"""irc2 general utilities""" import asyncio import collections import time class IStr(str): """ IStr is a string which follows RFC1459 casing rules, and allows for case-insensitive equality testing. >>> IStr("Hello World") == "HELLO world" True >>> IStr("Hello[] World~") == "hello{] WORLD^" ...
bsd-3-clause
2,196,573,597,949,064,200
26.0625
113
0.545227
false
3.546758
false
false
false
geosolutions-it/wps-remote
src/wpsremote/xmppBus.py
1
10132
# (c) 2016 Open Source Geospatial Foundation - all rights reserved # (c) 2014 - 2015 Centre for Maritime Research and Experimentation (CMRE) # (c) 2013 - 2014 German Aerospace Center (DLR) # This code is licensed under the GPL 2.0 license, available at the root # application directory. import socket import logging imp...
gpl-2.0
467,107,961,971,139,100
46.792453
140
0.547177
false
4.465403
true
false
false
stanzheng/tastemvc
flask/app/auth.py
1
1237
from functools import wraps from flask import request, Response import requests import config GOOGLE_AUTH_URL=config.BaseConfig.GOOGLE_AUTH_URL AUTH_DOMAIN = config.BaseConfig.AUTH_DOMAIN PAST_AUTHED = [] # check url but if bad check later def check_auth_url(token): # Testing if token == "TEST": ret...
mit
5,669,853,828,525,616,000
24.791667
74
0.642684
false
3.748485
false
false
false
helfio/telegram-bot-capacidades
capacidades.py
1
3998
#!/usr/bin/python2 # -*- coding: utf8 -*- # Tiny_telecom is a tiny library of comunitions via Telegram Bot's API. #Copyright (C) 2015 Juan Pablo Navarro #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 Softwar...
agpl-3.0
2,518,629,986,250,922,000
32.931624
97
0.6387
false
3.142518
false
false
false
weaponsjtu/Kaggle_xBle
single.py
1
5276
import pandas as pd import numpy as np from sklearn import cross_validation import xgboost as xgb class RmspeObjective: hessian = None def __call__(self, predicted, target): target = target.get_label() # I suspect this is necessary since XGBoost is using 32 bit floats # and ...
gpl-2.0
-5,620,857,255,057,553,000
32.48366
106
0.611069
false
2.994325
true
false
false
w4n9H/PythonSkillTree
Distributed/Communication/Etcd/EtcdClient.py
1
2705
# !/usr/bin/env python # -*- coding: utf-8 -*- """ @author: mango @contact: w4n9@sina.com @create: 16/7/4 hail hydra! """ __author__ = "mango" __version__ = "0.1" import etcd # noinspection PyBroadException,PyPep8Naming,PyShadowingBuiltins class ETCDClient(object): def __init__(self, host, port, allow_reconne...
apache-2.0
6,829,155,821,448,955,000
25.4375
107
0.558928
false
3.06401
false
false
false
native93/Sugar-paint-activity
toolbox.py
1
31181
# -*- coding: utf-8 -*- """ toolbox.py Create Oficina Toolbar in Sugar Copyright 2007, NATE-LSI-EPUSP Oficina is developed in Brazil at Escola Politécnica of Universidade de São Paulo. NATE is part of LSI (Integrable Systems Laboratory) and stands for Learning, Work and Entertainment Research Group. Visit our web p...
gpl-2.0
-7,710,495,219,658,249,000
36.115476
79
0.613337
false
3.725296
false
false
false
TheAlgorithms/Python
ciphers/mono_alphabetic_ciphers.py
1
1772
from typing import Literal LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" def translate_message( key: str, message: str, mode: Literal["encrypt", "decrypt"] ) -> str: """ >>> translate_message("QWERTYUIOPASDFGHJKLZXCVBNM","Hello World","encrypt") 'Pcssi Bidsm' """ chars_a = LETTERS if mode == "decryp...
mit
-5,703,223,173,835,467,000
27.126984
79
0.606095
false
3.601626
false
false
false
cdepillabout/dict-scrape
dictscrape/dictionaries/dictionary.py
1
7930
# -*- coding: UTF-8 -*- # Copyright (C) 2012 Dennis Gosnell # # 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
1,928,028,098,426,376,200
38.653061
92
0.627509
false
3.800489
false
false
false
halibot-extra/haiku
syllabizer.py
1
1897
# # The syllables generated from this are not really valid, but the number of # syllables generated generally is. # # TODO: # - syllabic 'm' and 'n' # - Rules for silent 'i' and 'o'? (eg. business [biz.nis], colonel [kern.el]) # - Silent 'e' in compound words (eg. whitecap [wait.cap]) # - favor onset (unless invali...
bsd-3-clause
-9,060,733,622,637,807,000
28.184615
94
0.603057
false
2.573948
false
false
false
moddevices/mod-pacmanager
server_samples/package_server.py
1
1280
#!/usr/bin/env python # This is a sample of server that will run in the package server, that will send # files to this mod-pacmanager server # # modcommon comes from mod-python package. # Although the fileserver package is copied inside this repository, this server won't run in # same environment from modcommon.commun...
gpl-3.0
-7,273,025,344,881,717,000
36.647059
103
0.747656
false
3.74269
false
false
false
dc3-plaso/dfvfs
dfvfs/encoding/manager.py
1
2019
# -*- coding: utf-8 -*- """The encoding manager.""" class EncodingManager(object): """Class that implements the encoding manager.""" _decoders = {} @classmethod def DeregisterDecoder(cls, decoder): """Deregisters a decoder for a specific encoding method. Args: decoder (type): decoder class. ...
apache-2.0
10,433,650,613,161,438
25.220779
74
0.662209
false
4.437363
false
false
false
davidsetiyadi/draft_python
wizard/edukits_invoice_filter.py
1
3774
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
gpl-3.0
4,328,686,638,421,462,500
38.726316
168
0.625331
false
3.225641
false
false
false
knowledgepoint-devs/askbot-devel
askbot/deps/django_authopenid/backends.py
1
12839
"""authentication backend that takes care of the multiple login methods supported by the authenticator application """ import datetime import logging from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured from django.conf import settings as django_settings from django.utils....
gpl-3.0
6,050,015,103,225,911,000
42.670068
109
0.49225
false
5.643516
false
false
false
alex/braid
braid/users.py
1
2008
from __future__ import print_function, absolute_import try: import requests except ImportError: requests = None from braid.api import task, sudo from braid.utils import fails from fabric.contrib import files from twisted.python.filepath import FilePath @task def create(username, homeBase='/home'): """ ...
mit
-1,833,388,858,614,168,300
26.506849
80
0.619024
false
3.704797
false
false
false
iafan/zing
pootle/apps/pootle_store/unit/results.py
1
3975
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # Copyright (C) Zing contributors. # # This file is a part of the Zing project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django...
gpl-3.0
677,088,658,619,833,900
26.413793
75
0.601509
false
3.897059
false
false
false
jcchoiling/learningPython
s13/Day09/ftp_client/ftp_client.py
1
10922
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is an exercise for practising socket programming. Learning the basic concept of how a socket send and receive data from a client side. Below are functions that I have implementated in the Ftp Server and Ftp Client script. Ftp Client function: ~~~~~~~~~~~~~~~~~~~~...
gpl-3.0
-504,166,993,082,536,300
33.66879
132
0.541797
false
3.58682
false
false
false
EnthyrosVanAkel/neural_artistic_style
neural_artistic_style.py
1
3686
#!/usr/bin/env python import os import argparse import numpy as np import scipy.misc import deeppy as dp from matconvnet import vgg19_net from style_network import StyleNetwork def weight_tuple(s): try: conv_idx, weight = map(int, s.split(',')) return conv_idx, weight except: raise a...
mit
-5,447,275,127,889,458,000
31.910714
77
0.597938
false
3.592593
false
false
false
rartino/ENVISIoN
envisionpy/processor_network/PCFNetworkHandler.py
1
8400
# ENVISIoN # # Copyright (c) 2019-2021 Jesper Ericsson, Gabriel Anderberg, Didrik Axén, # Adam Engman, Kristoffer Gubberud Maras, Joakim Stenborg # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
bsd-2-clause
-934,096,647,293,608,400
49.590361
160
0.645273
false
3.798281
false
false
false
marclanepitt/ot
blogs/models.py
1
1549
from __future__ import unicode_literals from django.db import models import datetime from django_extensions.db import fields from django.utils import timezone from taggit.managers import TaggableManager class Article(models.Model): CATEGORIES = ( ('List','List'), ('Blog','Blog'), ('Countd...
mit
-2,664,756,424,395,667,500
29.98
75
0.695933
false
3.778049
false
false
false
hecomlilong/basic
python/datafetch.py
1
7372
#!/usr/bin/python # -*- coding: UTF-8 -*- import datetime import time from datetime import date from database_connection import Connection import tushare as ts import warnings warnings.simplefilter(action = "ignore", category = FutureWarning) class datafetch: def __init__(self): self.conn = Connection("loc...
bsd-3-clause
5,856,808,081,488,249,000
45.077419
396
0.552366
false
3.036565
false
false
false
mishbahr/djangocms-fbcomments
djangocms_fbcomments/models.py
1
1655
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from cms.models.pluginmodel import CMSPlugin from .conf import settings @python_2_unicode_compatible cla...
bsd-3-clause
3,164,627,788,882,303,500
37.488372
70
0.682779
false
3.752834
false
false
false
gylian/sickrage
sickbeard/providers/torrentday.py
1
11025
# Author: Mr_Orange <mr_orange@hotmail.it> # # This file is part of SickRage. # # SickRage 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 versi...
gpl-3.0
-3,752,747,723,612,594,700
36.5
179
0.555193
false
4.010549
false
false
false
mnahm5/django-estore
Lib/site-packages/troposphere/validators.py
1
3743
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from re import compile def boolean(x): if x in [True, 1, '1', 'true', 'True']: return "true" if x in [False, 0, '0', 'false', 'False']: return "false" raise ValueError def i...
mit
8,520,774,445,664,225,000
24.813793
89
0.590435
false
3.300705
false
false
false
ggianna/Foragers
neuralGame.py
1
13723
#!/usr/bin/python from soldiers import *; from towers import *; from economy import Economy; from output import ConsoleOutput; import time; import math; import random; import gamemap; import copy; #from pprint import pformat #import pygame; #from pygame.locals import *; from termcolor import colored; #from utils impo...
apache-2.0
7,518,250,564,397,908,000
31.67381
157
0.541062
false
3.509719
false
false
false
zellyn/django-kanboard
src/kanboard/signals.py
1
1824
import datetime import django.dispatch phase_change = django.dispatch.Signal(providing_args=['from_phase', 'to_phase', 'changed_at']) def card_order(sender, instance, **kwargs): if instance.order: return from django.db.models import Max max_order = instance.phase.cards.aggregate( ...
bsd-3-clause
2,315,994,246,568,958,000
34.764706
95
0.673794
false
3.699797
false
false
false
Qwait/apex
apex/lib/form.py
1
3976
import cgi import six from wtforms import Form from wtforms import validators from pyramid.i18n import get_localizer from pyramid.renderers import render from pyramid.threadlocal import get_current_request from apex.lib.db import merge_session_with_post from apex.lib.i18n import Translator class ExtendedForm(Form):...
mit
242,589,742,052,369,150
31.064516
85
0.611922
false
4.128764
false
false
false
personalrobotics/chimera
test/examples/02_class/class.py
1
3894
import inspect import unittest try: import class_pybind11 as py11 has_pybind11 = True except: has_pybind11 = False import class_boost_python as boost class TestFunction(unittest.TestCase): def test_function_py11(self): if not has_pybind11: return dog = py11.Dog() ...
bsd-3-clause
3,831,821,740,200,962,600
37.554455
93
0.663585
false
3.492377
true
false
false
JorgeDeLosSantos/NanchiPlot
nanchi/_const_.py
1
4218
# -*- coding: utf-8 -*- import os.path as path import site import matplotlib from itertools import cycle VERSION = "0.1.0-dev" NANCHI_MAIN_CAPTION = "NanchiPlot %s"%(VERSION) # Colors PANEL_BG_COLOR = "#ababab" FRAME_BG_COLOR = "#aaf0f0" AXES_BG_COLOR = "#efefef" FIGURE_BG_COLOR = "#fafafa" LINE_COLOR = "#000000" GR...
mit
-2,279,850,905,014,928,400
37
95
0.697013
false
2.410286
false
false
false
akretion/odoo
addons/website/models/ir_http.py
5
15412
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from lxml import etree import traceback import os import unittest import pytz import werkzeug import werkzeug.routing import werkzeug.utils import odoo from odoo import api, models, registry from odoo im...
agpl-3.0
2,576,083,027,438,859,300
42.414085
137
0.573319
false
4.484143
false
false
false
amiguet/foococo
foococo.py
1
18300
#!/usr/bin/env python2 # encoding: utf-8 ''' FooCoCo, a (SoftStep) Foot Controller Controller. Copyright 2014, Matthieu Amiguet This file is part of FooCoCo. FooCoCo 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 Foundat...
gpl-3.0
1,261,738,115,195,377,200
26.897866
97
0.53765
false
4.05855
false
false
false
soxfmr/vanilla
module/firewall.py
1
2604
import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import base import time import hashlib from subprocess import Popen from subprocess import PIPE from common.attribute import Attribute class FirewallRule(base.Module): def __init__(self): self.ruleprefix = '...
apache-2.0
-4,808,118,742,020,914,000
29.635294
96
0.556452
false
4.02473
false
false
false
radicalbit/ambari
ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py
1
10266
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
apache-2.0
1,289,483,628,073,477,600
39.417323
110
0.624391
false
3.657285
true
false
false
jianghuaw/nova
nova/compute/api.py
1
242114
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
apache-2.0
3,270,551,731,418,766,300
44.820212
79
0.577174
false
4.59097
false
false
false
fajran/django-loginurl
loginurl/models.py
1
1677
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from loginurl.utils import create_key @python_2_unicode_compatible class Key(models.Model): """ A si...
bsd-3-clause
6,070,103,139,744,999,000
30.055556
74
0.6291
false
3.918224
false
false
false
asm-products/banyan-web
accounts/views.py
1
3670
from social.apps.django_app.utils import psa from social.exceptions import AuthMissingParameter from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden, Http404 from django.shortcuts import render_to_response, get_object_or_404, redirect from djan...
agpl-3.0
-8,379,103,745,169,979,000
39.777778
118
0.643869
false
4.27241
false
false
false
xiang12835/python_web
py2_web2py/web2py/gluon/contrib/pyrtf/Elements.py
1
33085
from __future__ import print_function from types import IntType, FloatType, LongType, StringTypes from copy import deepcopy from binascii import hexlify from Constants import * from Styles import * class UnhandledParamError( Exception ) : def __init__( self, param ) : ...
apache-2.0
6,234,217,856,153,844,000
42.705416
137
0.570893
false
3.36743
false
false
false
alard/warctozip
arc2warc.py
1
3751
#!/usr/bin/env python """arc2warc - convert one arc to a new warc""" import os import sys import hashlib import uuid import sys import os.path import datetime from optparse import OptionParser from hanzo.warctools import ArcRecord,WarcRecord from hanzo.warctools.warc import warc_datetime_str parser = OptionParser...
mit
-678,854,588,228,576,800
32.19469
108
0.57318
false
3.68106
false
false
false
piotrmaslanka/bellum
common/fixtures/technology.py
1
5434
# coding=UTF-8 from bellum.common.models import ResourceIndex, Requirement from bellum.meta import MTI _costs = {0:(ResourceIndex(titan=900, pluton=900, men=100), 1500), # infantry armor 1:(ResourceIndex(titan=60000, pluton=80000, men=20000), 36000), # nanobot armor 2:(ResourceIndex(titan=500, pluton=400, men=100)...
agpl-3.0
5,996,510,973,467,996,000
37.457143
137
0.621285
false
2.56381
false
false
false
pawl/CalendarAdmin
alembic/versions/2fb6ec55051f_add_fields_for_meetup.py
1
1292
"""add fields for meetup Revision ID: 2fb6ec55051f Revises: 37f73d8e6963 Create Date: 2014-09-15 02:49:23.106092 """ # revision identifiers, used by Alembic. revision = '2fb6ec55051f' down_revision = '37f73d8e6963' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Al...
mit
4,042,714,470,658,956,300
34.888889
92
0.684211
false
3.21393
false
false
false
AdnCoin/AdnCoin
qa/rpc-tests/p2p-acceptblock.py
1
12326
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from...
mit
-1,790,707,003,091,074,600
41.503448
107
0.634188
false
3.913016
true
false
false
googleapis/googleapis-gen
google/cloud/dialogflow/v2beta1/dialogflow-v2beta1-py/google/cloud/dialogflow_v2beta1/services/fulfillments/transports/grpc_asyncio.py
1
13042
# -*- coding: utf-8 -*- # Copyright 2020 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...
apache-2.0
4,529,365,547,672,977,400
44.922535
87
0.614553
false
4.647897
false
false
false
pauloremoli/pywall
dist/pywall-0.1.0/build/lib.linux-x86_64-2.7/pywall/funnycats/funnycats.py
1
3479
import logging from mongoengine import connect, ConnectionError from mongoengine.connection import disconnect from pywall.funnycats.config import Config from pywall.funnycats.score_job import ScoreJob, need_to_add_job from pywall.funnycats.user import User class FunnyCats(): def __init__(self, jenkins, score_view,...
lgpl-3.0
-5,932,300,881,060,609,000
24.035971
104
0.679218
false
3.086957
false
false
false
huanzhang12/lightgbm-gpu
python-package/lightgbm/sklearn.py
1
33115
# coding: utf-8 # pylint: disable = invalid-name, W0105, C0111, C0301 """Scikit-Learn Wrapper interface for LightGBM.""" from __future__ import absolute_import import numpy as np from .basic import Dataset, LightGBMError from .compat import (SKLEARN_INSTALLED, LGBMClassifierBase, LGBMDeprecated, ...
mit
-3,300,705,488,002,215,400
46.038352
138
0.560501
false
4.192303
false
false
false
UTAlan/ginniBeam.net
gin/contact/views.py
1
1594
from django.conf import settings from django.core.mail import send_mail from django.shortcuts import render_to_response, redirect from django.template import RequestContext from contact.models import ContactForm from recaptcha.client import captcha def index(request): msg = '' if request.method == 'POST': # If...
gpl-2.0
-5,725,024,065,823,844,000
50.419355
176
0.612296
false
4.308108
false
false
false
nvictus/CellPopSim
cps/simulator.py
1
15290
""" Name: simulator Author: Nezar Abdennur <nabdennur@gmail.com> Created: 23/04/2012 Copyright: (c) Nezar Abdennur 2012 """ from cps.misc import IndexedPriorityQueue from cps.exception import ZeroPopulationError, SimulationError import random NORMAL = 0 CONSTANT_NUMBER = 1 class BaseSimulator(obj...
bsd-2-clause
445,165,519,125,148,800
34.311778
120
0.539765
false
4.527687
false
false
false
prakharbahuguna/PyPly
src/jukeboxController.py
1
2116
__author__ = 'matt' import threading import spotify_wrapper from redisBroker import RedisBroker from time import sleep from collections import deque import requests from sys import stdin SERVER = 'pyply.j.layershift.co.uk' SKIP_THRESHOLD = 3 class JukeboxController: def __init__(self): self.playlist = N...
mit
-4,499,065,865,542,806,000
27.986301
112
0.626654
false
3.826401
false
false
false
lietk12/zephyros-stats
app.py
1
1962
#!/usr/bin/python2 from gevent import monkey monkey.patch_all() import platform import subprocess from threading import Thread import time from datetime import timedelta from flask import Flask, render_template, send_from_directory from flask.ext.socketio import SocketIO, emit, disconnect app = Flask(__name__) socket...
bsd-3-clause
-3,548,580,184,055,320,000
32.254237
125
0.669215
false
3.541516
false
false
false
carthagecollege/django-djaludir
djaludir/bin/year.py
1
1359
# -*- coding: utf-8 -*- import os import sys # env sys.path.append('/usr/lib/python2.7/dist-packages/') sys.path.append('/usr/lib/python2.7/') sys.path.append('/usr/local/lib/python2.7/dist-packages/') sys.path.append('/data2/django_1.11/') sys.path.append('/data2/django_projects/') sys.path.append('/data2/django_thir...
bsd-3-clause
-385,326,352,247,581,700
17.364865
68
0.578366
false
3.197647
false
false
false
vuolter/pyload
src/pyload/plugins/accounts/LinkifierCom.py
1
2444
# -*- coding: utf-8 -*- import hashlib import json import pycurl from ..base.multi_account import MultiAccount class LinkifierCom(MultiAccount): __name__ = "LinkifierCom" __type__ = "account" __version__ = "0.01" __status__ = "testing" __description__ = """Linkifier.com account plugin""" _...
agpl-3.0
166,216,278,607,582,430
31.586667
83
0.567921
false
3.531792
false
false
false
kaini/newslist
server/newslist/database.py
1
3666
import requests import os import traceback import sys import json import pickle from newslist.sources import NEWS_SOURCES from PIL import Image from io import BytesIO from warnings import warn class _MyJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, "json_dict"): return ...
agpl-3.0
-6,889,054,850,081,235,000
26.358209
74
0.575014
false
3.535198
false
false
false
opethe1st/CompetitiveProgramming
CodeChef/2020/09/ada_matrix.py
1
1386
""" Link to (question)[https://www.codechef.com/SEPT20B/problems/ADAMAT] The key insight is that when a row or column is out of order, we want to sort it using the smallest number of operations. To do this, we could iterate from the largest submatrix to the smallest one and rotate whenever a given submatrix is out of o...
gpl-3.0
-724,145,643,655,773,600
28.489362
78
0.616883
false
3.439206
false
false
false
datawagovau/datapusher
datapusher/jobs.py
1
13256
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import urllib2 import socket import requests import urlparse import itertools import datetime import locale import pprint import logging import decimal import hashlib import cStringIO import time import messytables from slugify import slugify...
agpl-3.0
-2,176,815,733,557,144,800
32.73028
96
0.611572
false
3.998793
false
false
false
quantumlib/Cirq
cirq-core/cirq/protocols/unitary_protocol.py
1
7814
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
-1,581,593,923,829,352,200
37.492611
92
0.680701
false
3.990807
false
false
false
Stevearzh/greedy-spider
process_crawler.py
1
2649
import multiprocessing import time import threading import urllib from mongo_cache import MongoCache from mongo_queue import MongoQueue from downloader import Downloader DEFAULT_DELAY = 5 DEFAULT_AGENT = 'wswp' DEFAULT_RETRY = 1 DEFAULT_THREAD = 10 DEFAULT_TIMEOUT = 60 SLEEP_TIME = 1 def threaded_crawler(seed_url,...
mit
-8,861,061,521,418,523,000
29.802326
86
0.665157
false
3.778887
false
false
false
Pulgama/supriya
tests/test_commands_SynthNewRequest.py
1
3505
import pytest import uqbar.strings import supriya def test_do_not_coerce_arguments(): synth = supriya.realtime.Synth() group = supriya.realtime.Group() assert synth.node_id is None assert group.node_id is None request = supriya.commands.SynthNewRequest( node_id=synth, synthdef=synth.synth...
mit
-4,021,645,452,927,080,000
32.066038
78
0.624251
false
3.341277
true
false
false
google/glazier
glazier/lib/actions/powershell_test.py
1
13653
# Lint as: python3 # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
-6,470,339,085,775,578,000
41.933962
80
0.692082
false
3.439043
true
false
false
zstackio/zstack-woodpecker
integrationtest/vm/mini/multiclusters/paths/multi_path37.py
1
2965
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[ [TestAction.create_mini_vm, 'vm1', 'cluster=cluster2'], [TestAction.create_vm_backup, 'vm1', 'vm1-backup1'], [Te...
apache-2.0
-2,648,998,513,498,351,000
41.371429
104
0.695447
false
2.652057
true
false
false
googleinterns/cabby
cabby/data/wikidata/info_item.py
1
2876
# coding=utf-8 # Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
-2,653,842,885,619,611,600
34.073171
80
0.681502
false
3.590512
false
false
false
alchen99/LP2JIRA
LaunchpadBugs.py
1
34879
#coding: utf-8 import types, time import csv, cStringIO, codecs import xml.dom.minidom import httplib import urllib import sys import optparse import os import simplejson import logging from pprint import pprint from launchpadlib.launchpad import Launchpad import dateutil.parser #import pdb CONST_TEAM = "trafodion" ...
mit
-7,072,489,124,246,085,000
43.889318
260
0.563806
false
4.47052
false
false
false
pombredanne/discern
examples/problem_grader/grader/slumber_models.py
1
8082
import slumber import logging import requests import json import os log = logging.getLogger(__name__) def join_without_slash(path1, path2): """ Join two paths and ensure that only one slash is used at the join point path1 - string path(ie '/base/') path2 -string path (ie '/home/') """ if path1...
agpl-3.0
466,483,776,361,971,800
32.675
117
0.578941
false
4.098377
false
false
false
VitalPet/addons-onestein
hr_holidays_leave_repeated/models/hr_holidays.py
1
5712
# -*- coding: utf-8 -*- # Copyright 2016 Onestein (<http://www.onestein.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from dateutil.relativedelta import relativedelta from odoo import api, fields, models from odoo.exceptions import UserError from odoo.tools.translate import _ class HrHol...
agpl-3.0
-2,452,207,796,810,619,000
33.829268
76
0.533964
false
3.980488
false
false
false
marscher/PyEMMA
pyemma/util/linalg.py
1
2969
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
lgpl-3.0
-7,842,836,084,831,465,000
25.04386
109
0.628494
false
3.505313
false
false
false
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awxkit/awxkit/api/pages/page.py
1
20803
import inspect import logging import json import re from requests import Response import http.client as http from awxkit.utils import ( PseudoNamespace, is_relative_endpoint, are_same_endpoint, super_dir_set, suppress, is_list_or_tuple, to_str ) from awxkit.api import utils from awxkit.api...
apache-2.0
4,529,927,140,278,930,400
33.845896
118
0.570783
false
4.157274
false
false
false
Guokr1991/POCS
panoptes/camera/camera.py
1
10301
import os import sys import re import time import datetime import subprocess import panoptes.utils.logger as logger from .utils.config import load_config @logger.has_logger class AbstractCamera(object): """ Abstract Camera class """ pass def __init__(self, config=dict()): """ Init...
mit
3,202,152,841,260,670,000
36.187726
156
0.569556
false
4.151955
true
false
false
ZacBlanco/ChefBoyRD
chefboyrd/views/prediction_dash.py
1
3246
''' Prediction dashboard for the manager interface Will allow you to predict ingredient usage between two chosen dates ''' import urllib, base64 from datetime import datetime, timedelta import logging from io import BytesIO from flask import Blueprint, render_template, abort, request, flash from jinja2 import Templat...
gpl-3.0
3,328,913,214,309,650,400
39.074074
110
0.642329
false
4.410326
false
false
false
prrvchr/USBTerminal
USB/Gui/TinyG2Panel.py
1
7124
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2015 Pierre Vacher <prrvchr@gmail.com> * #* ...
gpl-2.0
-3,307,146,332,176,903,700
41.153846
80
0.572712
false
3.811664
false
false
false
sillvan/hyperspy
hyperspy/io_plugins/msa.py
1
15397
# -*- coding: utf-8 -*- # Copyright 2007-2011 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
2,839,245,110,231,939,000
39.412073
86
0.539845
false
3.765468
false
false
false
madedotcom/rsyslog
plugins/external/messagemod/anon_cc_nbrs/anon_cc_nbrs.py
10
3663
#!/usr/bin/env python """A message modification plugin to anonymize credit card numbers. Copyright (C) 2014 by Adiscon GmbH and Peter Slavov This file is part of rsyslog. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Y...
gpl-3.0
-2,480,792,311,458,037,000
33.885714
100
0.668578
false
3.570175
false
false
false
xiaofeiyangyang/physpetools
physpetool/utils/colorconvert.py
1
4043
# ########################## Copyrights and License ############################# # # # Copyright 2016 Yang Fang <yangfangscu@gmail.com> # # ...
gpl-3.0
-7,620,676,380,058,001,000
30.341085
81
0.457086
false
3.971513
false
false
false
mlperf/inference_results_v0.7
closed/NVIDIA/code/common/submission.py
1
7853
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-927,611,317,458,343,800
44.393064
188
0.688527
false
3.485575
false
false
false
tchx84/sugar
src/jarabe/main.py
1
11746
# Copyright (C) 2006, Red Hat, Inc. # Copyright (C) 2009, One Laptop Per Child Association Inc # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your op...
gpl-2.0
4,517,692,872,092,775,400
27.509709
79
0.692576
false
3.583282
false
false
false
OmkarPathak/Python-Programs
Programs/P40_CipherText.py
1
1759
# Author: OMKAR PATHAK # This program illustrates a simple example for encrypting/ decrypting your text LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' LETTERS = LETTERS.lower() def encrypt(message, key): ''' This function lets you to encrypt your message based on a key ''' encrypted = '' for chars in message: ...
gpl-3.0
3,104,542,820,218,431,000
28.305085
111
0.593985
false
3.312261
false
false
false
tghw/trello-py
trello/labels.py
1
2134
from .base import ApiBase import requests class Labels(ApiBase): __module__ = 'trello' def __init__(self, apikey, token=None): self._apikey = apikey self._token = token def get(self, idLabel, fields=None): resp = requests.get(f"https://trello.com/1/labels/{idLabel}", pa...
bsd-2-clause
8,749,375,401,166,937,000
48.809524
168
0.62418
false
3.308527
false
false
false
johnseekins/latency_checker
stats.py
1
3748
import requests import json import pprint tests = ['duckduckgo-owned-server_yahoo_net', 'duckduckgo_com', 'ec2_ap-northeast-1_amazonaws_com', 'ec2_ap-northeast-2_amazonaws_com', 'ec2_ap-south-1_amazonaws_com', 'ec2_ap-southeast-2_amazonaws_com', 'ec2_ap-southeast-1_amazonaws_com', 'ec2_eu-central-1_amazonaws_com', 'ec...
mit
6,870,417,248,113,359,000
34.358491
455
0.562433
false
3.032362
false
false
false
ilri/ckanext-tools
ckanext-toolsmetadata/ckanext/toolsmetadata/plugin.py
1
11193
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from vocabularies import createSubjectsVocab from vocabularies import createThemesVocab from vocabularies import createFormatsVocab from vocabularies import createDataTypesVocab from utility import stringToTags from utility import loadArray from ut...
gpl-3.0
1,074,142,494,276,774,500
66.02994
148
0.706692
false
3.831907
false
false
false
kvchen/codeframe
docker/logic/logic_test.py
1
3710
"""Unit testing framework for the logic interpreter. Usage: python3 logic_test.py FILE Interprets FILE as interactive logic facts and queries, and compares each line of printed output from the read-eval-print loop and from any output functions to an expected output described in a comment. For example, (query (app...
apache-2.0
-3,010,101,729,828,322,000
35.732673
81
0.627224
false
4.041394
true
false
false
cosven/feeluown-core
fuocore/local/models.py
1
1159
import logging from fuocore.models import ( BaseModel, SongModel, AlbumModel, ArtistModel, SearchModel, ) from .provider import provider logger = logging.getLogger(__name__) class LBaseModel(BaseModel): _detail_fields = () class Meta: allow_get = True provider = provide...
mit
8,268,388,282,048,868,000
20.072727
73
0.663503
false
3.726688
false
false
false
Drumbot/pygleam
utilities.py
1
18303
# !/usr/bin/env python # encoding: utf-8 import os import pandas as pd import pygal import networkx as nx import json import re import csv from datetime import date, datetime from collections import OrderedDict # import folium # from folium import plugins # def plot_results(res, svg_filepath): # results = pd.Dat...
mit
8,505,319,341,203,863,000
39.118421
111
0.52501
false
3.570759
false
false
false
fogathmann/telex
telex/resources.py
1
4269
""" Resources for the telex server. This file is part of the telex project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Created on Jul 7, 2014. """ from datetime import datetime from everest.resources.base import Member from everest.resources.descriptors import collection_attribute f...
mit
-4,993,671,066,979,523,000
39.273585
76
0.712111
false
4.356122
false
false
false
zhuhong/MD-package
MDPackage/Coor/unit_atom.py
1
2401
#-*- coding : utf-8 -*- ''' Create on 2011-08-23 @version: 0.0.1 @change: \n - 2011-01-25\n - copy from Simple_atom. ''' import string import re class unit_atom(): ''' It's a simple atom class. ''' def __init__(self,atom_name="",atom_serial=1, atom_id =1, \ residue_name="", residu...
apache-2.0
1,178,645,961,617,863,700
33.3
113
0.495627
false
2.854935
false
false
false
SHSIDers/oclubs
oclubs/objs/upload.py
1
3460
#!/usr/bin/env python # -*- coding: UTF-8 -*- # from __future__ import absolute_import, unicode_literals import os from PIL import Image, ExifTags import magic from oclubs.access import fs from oclubs.exceptions import UploadNotSupported from oclubs.objs.base import BaseObject, Property ORIENTATION = next((key for...
mit
5,177,624,956,559,748,000
28.330508
79
0.576012
false
3.785558
false
false
false
zjonke/EImotif
simulations/bars/data/data_settings.py
1
1747
######################## ## PATTERN PARAMETERS ## ######################## PATTERN_DT = 1e-3 # timestep precision - should be identical to the simulation step! PATTERN_CLASS = "BarRatePatterns" # other pattern classes: SpatioTemporalPatterns (requires different settings) PATTERN_N_CHANNELS = 64 # number of ...
mit
9,181,358,726,810,458,000
48.914286
127
0.673726
false
3.346743
false
false
false
dbarbier/privot
python/test/t_MarginalTransformationHessian_std.py
1
3320
#! /usr/bin/env python from openturns import * from math import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : coll1 = DistributionCollection(0) coll1.add(Normal(1.0, 2.5)) coll1.add(Gamma(1.5, 3.0)) pointLow = NumericalPoint(0) pointLow.add(coll1[0].computeQuantile(0.25)[0]) pointLow.ad...
lgpl-3.0
2,855,770,965,371,125,000
53.42623
139
0.740964
false
3.672566
false
false
false
pipermerriam/populus
tests/contract-provider/test_are_contract_dependencies_available.py
1
1143
def test_contract_factory_availability_with_no_dependencies(chain): provider = chain.provider is_available = provider.are_contract_dependencies_available('Math') assert is_available is True def test_contract_factory_availability_with_missing_dependency(chain): provider = chain.provider is_availa...
mit
8,077,662,448,857,459,000
31.657143
83
0.757655
false
4.053191
false
false
false
slarosa/QGIS
python/plugins/sextante/gui/HelpEditionDialog.py
1
5113
# -*- coding: utf-8 -*- """ *************************************************************************** HelpEditionDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
-5,057,078,836,318,271,000
36.595588
86
0.545081
false
4.167074
false
false
false
GISAElkartea/antxetamedia
antxetamedia/projects/migrations/0002_auto__add_field_project_aside__add_field_project__aside_rendered.py
1
1884
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.aside' db.add_column(u'projects_project', 'aside', self.gf('ma...
agpl-3.0
7,549,969,580,365,543,000
41.840909
146
0.571125
false
3.829268
false
false
false
mgraupe/acq4
acq4/devices/Camera/CameraInterface.py
1
12390
import time, types, os.path, re, sys from PyQt4 import QtGui, QtCore import acq4.pyqtgraph as pg from acq4.pyqtgraph import SignalProxy, Point import acq4.pyqtgraph.dockarea as dockarea import acq4.util.ptime as ptime from acq4.util.Mutex import Mutex import numpy as np import scipy.ndimage from acq4.util.debug import ...
mit
4,915,531,971,684,207,000
39.358306
151
0.657062
false
3.861016
false
false
false
EliRibble/urania
urania/commands.py
1
1055
import os import requests import urania.connection def get_devices(users=None): users = users if users is not None else urania.config.all_users() return [urania.connection.get_registered_devices(user) for user in users] def download_track(user, track, path): url = urania.connection.get_stream_url(user, tr...
gpl-3.0
-8,255,463,312,068,827,000
30.029412
82
0.655924
false
3.688811
false
false
false
linuxscout/tashaphyne
setup.py
1
1053
#!/usr/bin/python from setuptools import setup # to install type: # python setup.py install --root=/ def readme(): with open('README.rst', encoding="utf8") as f: return f.read() setup (name='Tashaphyne', version='0.3.5', description='Tashaphyne Arabic Light Stemmer', long_description = readme()...
gpl-3.0
7,358,732,075,506,824,000
30.909091
56
0.577398
false
3.65625
false
false
false
pmghalvorsen/gramps_branch
gramps/gen/filters/_genericfilter.py
1
11669
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # Copyright (C) 2012 Doug Blank <doug.blank@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
gpl-2.0
-425,785,040,144,173,600
29.467363
80
0.568258
false
4.121865
true
false
false
amol9/scripts
pypi/py3.5/pypi.py
1
1252
import asyncio import aiohttp import json base_url = 'https://pypi.python.org/pypi/%s/json' loop = asyncio.get_event_loop() client = aiohttp.ClientSession(loop=loop) package_list_filename = 'packages.txt' async def get_pypi_json(package): url = base_url%packa...
mit
-2,306,539,224,345,849,300
25.083333
87
0.618211
false
3.251948
false
false
false
hguemar/cinder
cinder/api/v2/volumes.py
1
18236
# Copyright 2011 Justin Santa Barbara # 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 requ...
apache-2.0
206,777,529,314,163,600
36.14053
79
0.578197
false
4.468513
false
false
false
utkarsh-goswami/erpnext
erpnext/stock/doctype/item/item.py
1
29577
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import erpnext import json import itertools from frappe import msgprint, _ from frappe.utils import (cstr, flt, cint, getdate, now_datetim...
gpl-3.0
1,567,476,729,919,587,300
35.69603
232
0.695169
false
3.160611
false
false
false
ge0rgi/cinder
cinder/volume/drivers/dell/dell_storagecenter_common.py
1
83512
# Copyright 2016 Dell 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 agree...
apache-2.0
-5,743,955,315,725,894,000
44.659923
79
0.529768
false
4.809491
false
false
false
alexanderfefelov/nav
python/nav/Snmp/pysnmp_v2.py
1
14635
# -*- coding: utf-8 -*- # # Copyright (C) 2003 Norwegian University of Science and Technology # Copyright (C) 2006, 2007 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License ver...
gpl-2.0
1,905,384,223,077,756,200
35.315136
79
0.554629
false
4.227325
false
false
false
pv/mediasnake
mediasnakefiles/lockfile.py
1
2090
import os import time import errno class LockFileError(RuntimeError): pass class LockFile(object): """ Lock file (Unix-only), implemented via symlinks. """ def __init__(self, filename, timeout=0.05, fail_if_active=False): self.filename = filename self.timeout = timeout s...
bsd-3-clause
-1,424,958,948,129,479,200
25.455696
69
0.466507
false
4.964371
false
false
false