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
eladkarakuli/anyway
process.py
1
10121
# -*- coding: utf-8 -*- from __future__ import print_function import glob import os import argparse import json from flask.ext.sqlalchemy import SQLAlchemy import field_names from models import Marker import models from utilities import ProgressSpinner, ItmToWGS84, init_flask, CsvReader import itertools import localiza...
bsd-3-clause
-1,322,978,184,679,433,700
37.196226
120
0.644106
false
3.775084
false
false
false
kylbarnes/blox
deploy/demo-cli/blox-create-environment.py
1
2812
#!/usr/bin/env python import json, os, sys import common def main(argv): # Command Line Arguments args = [{'arg':'--apigateway', 'dest':'apigateway', 'default':None, 'type':'boolean', 'help':'Call API Gateway endpoint'}] if '--apigateway' in argv: args.extend([{'arg':'--stack', 'dest':'stack', 'default':None, 'he...
apache-2.0
5,035,756,915,522,746,000
39.753623
314
0.687411
false
3.180995
false
false
false
lhfei/spark-in-action
spark-2.x/src/main/python/mllib/correlations.py
1
2149
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may n...
apache-2.0
2,444,104,559,011,618,300
33.229508
74
0.679851
false
3.790123
false
false
false
130s/bloom
bloom/commands/update.py
1
4643
# Software License Agreement (BSD License) # # Copyright (c) 2013, Willow Garage, 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...
bsd-3-clause
-7,645,146,209,222,274,000
32.402878
114
0.677795
false
3.934746
false
false
false
jakesyl/BitTornado
BitTornado/Network/selectpoll.py
2
1284
import select import time import bisect POLLIN = 1 POLLOUT = 2 POLLERR = 8 POLLHUP = 16 class poll(object): def __init__(self): self.rlist = [] self.wlist = [] def register(self, f, t): if not isinstance(f, int): f = f.fileno() if t & POLLIN: insert(se...
mit
-7,630,042,393,807,928,000
21.928571
76
0.499221
false
3.387863
false
false
false
OpenMined/PySyft
packages/syft/examples/duet/word_language_model/original/generate.py
1
3193
############################################################################### # Language Modeling on Wikitext-2 # # This file generates new sentences sampled from the language model # ############################################################################### # stdlib import argparse # third party import torch ...
apache-2.0
7,456,513,447,870,492,000
30.613861
88
0.603821
false
3.640821
false
false
false
robsonfs/HackerRankChallenge_30DaysOfCode
day_12/tests.py
1
1507
from unittest import TestCase, mock from day12 import Person, Student class TestDay12(TestCase): def test_student_a_person_subclass(self): self.assertTrue(issubclass(Student, Person)) def test_student_has_att_scores(self): student = Student("Sophia", "Fernandes", 201302, [90, 100, 100, 80]) ...
gpl-3.0
-552,155,690,027,600,500
35.756098
76
0.639018
false
3.640097
true
false
false
dts-ait/qgis-edge-bundling
qgis3_plugin/processing_edgebundling/edgebundling.py
1
8883
# -*- coding: utf-8 -*- """ *************************************************************************** edgebundlingProviderPlugin.py --------------------- Date : January 2018 Copyright : (C) 2018 by Anita Graser Email : anitagraser@gmx.at *****************...
gpl-2.0
-8,249,758,353,570,889,000
38.834081
459
0.573793
false
4.804218
false
false
false
locked/4stability
motor_test.py
1
1460
#!/usr/bin/python from optparse import OptionParser import os import sys import time import termios import fcntl import motor parser = OptionParser() parser.add_option("-a", "--action", dest="action", help="reset/manual") (options, args) = parser.parse_args() m = motor.Motor(0) if options.action == "reset": m.res...
bsd-3-clause
6,159,371,416,633,251,000
22.174603
71
0.670548
false
2.775665
false
false
false
catiabandeiras/StemFactory
expansion_tech.py
1
7506
#Imports the generic Python packages import simpy import random import math #IMPORT THE ANCILLARY METHODS MODULES from get_places import * def expansion_tech_run(env,et,donor,lab,gui,int_db): #First, try to find an available worker while True: if lab.occupied_workers < gui.TOTAL...
mit
-4,032,397,442,333,823,000
28.762295
154
0.504396
false
3.996805
false
false
false
saifuddin778/LDA
test.py
1
1104
from __future__ import division import sys import copy sys.dont_write_bytecode = True """ Testing LDA """ def test_LDA(): from LDA import LDA x = [ [2.95, 6.63], [2.53, 7.79], [3.57, 5.65], [3.16, 5.47], [2.58, 4.46], [2.16, 6.22], [3.27, 3.52] ] ...
mit
-6,399,753,658,631,220,000
19.444444
49
0.521739
false
2.739454
true
false
false
michelesr/network-monitor-server
src/hardware.py
1
2977
#! /usr/bin/env python from threading import Thread from sys import exit from time import sleep from psutil import cpu_percent, virtual_memory, swap_memory, \ net_io_counters, disk_io_counters """ Framework di monitoraggio della rete Modulo per le risorse hardware Questo modulo si occupa di otten...
gpl-3.0
-2,589,567,619,368,150,500
25.81982
72
0.543164
false
3.648284
false
false
false
sjmh/cobbler
koan/register.py
1
5415
""" registration tool for cobbler. Copyright 2009 Red Hat, Inc and Others. Michael DeHaan <michael.dehaan AT gmail> 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, o...
gpl-2.0
-5,991,250,616,883,523,000
27.650794
87
0.563804
false
4.352894
false
false
false
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/aio/operations/_storage_accounts_operations.py
1
44288
# 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
5,031,194,970,118,649,000
51.849642
198
0.658395
false
4.311946
true
false
false
hmenke/espresso
testsuite/python/coulomb_cloud_wall_duplicated.py
1
4487
# # Copyright (C) 2013-2018 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 late...
gpl-3.0
4,426,372,993,255,538,700
37.350427
98
0.560508
false
3.729842
true
false
false
mwoc/pydna
dna/components/heatex.py
1
14848
import scipy import scipy.optimize import warnings # Some short-hands: from dna.states import state from dna.iterate import IterateParamHelper from dna.component import Component from dna.vendor import refprop as rp class ConvergenceError(Exception): def __init__(self, value): self.value = value def _...
bsd-3-clause
5,614,497,316,062,480,000
29.240326
160
0.420999
false
3.360036
false
false
false
Nic30/hwtLib
hwtLib/cesnet/mi32/intf.py
1
5517
from hwt.hdl.constants import READ, WRITE, READ_WRITE from hwt.interfaces.agents.handshaked import HandshakedAgent from hwt.interfaces.agents.vldSynced import VldSyncedAgent from hwt.interfaces.std import VectSignal, Signal from hwt.simulator.agentBase import SyncAgentBase from hwt.synthesizer.interface import Interfac...
mit
5,637,182,407,054,393,000
27.734375
78
0.590357
false
3.52074
false
false
false
closeio/nylas
inbox/models/contact.py
1
5371
from sqlalchemy import Column, Integer, String, Enum, Text, Index, BigInteger, \ ForeignKey from sqlalchemy.orm import relationship, backref, validates from sqlalchemy.schema import UniqueConstraint from inbox.sqlalchemy_ext.util import MAX_TEXT_CHARS from inbox.models.mixins import (HasPublicID, HasEmailAddress, ...
agpl-3.0
1,267,026,911,800,225,000
40
81
0.656675
false
4.179767
false
false
false
samsu/api_client
api_client/eventlet_client.py
1
7266
# Copyright 2015 Fortinet, 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 applicable law or...
apache-2.0
-4,340,461,156,337,409,500
38.923077
79
0.604872
false
4.529925
false
false
false
naototty/vagrant-lxc-ironic
ironic/conductor/task_manager.py
1
14091
# coding=utf-8 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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/li...
apache-2.0
1,835,137,189,771,582,200
38.033241
79
0.623944
false
4.491871
false
false
false
bxm156/yelpy
yelpy/yelpy_signer.py
1
1078
import oauth2 import os class YelpySigner(object): def __init__(self, consumer_key=None, consumer_secret=None, token=None, token_secret=None): super(YelpySigner, self).__init__() self.consumer_key = consumer_key or os.environ['YELPY_CONSUMER_KEY'] self.consumer_secret = consumer_secret or ...
gpl-2.0
6,199,489,522,802,149,000
43.916667
95
0.648423
false
3.546053
false
false
false
Pulgama/supriya
supriya/examples/grey_wash/sessions/chants.py
1
4782
import supriya from .. import project_settings, synthdefs class SessionFactory(supriya.nonrealtime.SessionFactory): ### CLASS VARIABLES ### release_time = 15 ### SESSION ### def __session__(self, initial_seed=0, layer_count=10, minutes=2, **kwargs): self.buffers = [] session = sup...
mit
-1,790,003,712,891,903,000
31.753425
86
0.580301
false
3.642041
false
false
false
Lencerf/BiliDan
bilidan.py
1
24251
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Biligrab-Danmaku2ASS # # Author: Beining@ACICFG https://github.com/cnbeining # Author: StarBrilliant https://github.com/m13253 # # Biligrab is licensed under MIT licence # Permission has been granted for the use of Danmaku2ASS in Biligrab # # Copyright (c) 2014 # # Perm...
mit
6,329,866,537,232,969,000
48.27439
295
0.610857
false
3.61566
false
false
false
DayGitH/Python-Challenges
DailyProgrammer/20120405A.py
1
1079
""" 1000 Lockers Problem. In an imaginary high school there exist 1000 lockers labelled 1, 2, ..., 1000. All of them are closed. 1000 students are to "toggle" a locker's state. * The first student toggles all of them * The second one toggles every other one (i.e, 2, 4, 6, ...) * The third one toggles the multiples of 3...
mit
1,479,764,557,927,629,600
30.735294
116
0.68304
false
3.100575
false
false
false
callowayproject/django-objectpermissions
example/simpleapp/models.py
1
1253
from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User class SimpleText(models.Model): """A Testing app""" firstname = models.CharField(blank=True, max_length=255) lastname = models....
apache-2.0
3,383,614,336,839,751,000
32.891892
80
0.769354
false
4.028939
false
false
false
thorwhalen/ut
parse/web/parsing_templates.py
1
2359
__author__ = 'thor' import ut as ms import re import requests from bs4 import BeautifulSoup import os import ut.pfile.to def get_multiple_template_dicts(source): templates = dict() if isinstance(source, str): if not re.compile('\n|\t').match(source) and len(source) < 150: # assume it's a filepath or...
mit
-3,465,566,294,807,742,500
30.891892
117
0.577363
false
3.531437
false
false
false
jyr/japos-client
views/login.py
1
4357
#!/usr/bin/env python # -*- coding: utf-8 -*- import wx from platform import Platform from openings import Opening_view from controllers.auth import Auth_controller # begin wxGlade: extracode # end wxGlade class Login_view(wx.Frame): def __init__(self, parent, id): # begin wxGlade: Login.__init__ ...
gpl-2.0
-9,159,458,240,173,351,000
40.903846
102
0.626348
false
2.943919
false
false
false
ethereum/dapp-bin
scrypt/scrypt.se.py
1
6861
data smix_intermediates[2**160](pos, stored[1024][4], state[8]) event TestLog6(h:bytes32) macro blockmix($_inp): with inp = $_inp: with X = string(64): mcopy(X, inp + 64, 64) X[0] = ~xor(X[0], inp[0]) X[1] = ~xor(X[1], inp[1]) log(type=TestLog, 1, msg.gas) ...
mit
6,643,061,788,805,022,000
41.351852
529
0.457805
false
2.686374
true
false
false
Migwi-Ndungu/bc-9-Pomodoro-Timer
dbase/db_script.py
1
2781
import sqlite3 as lite import sys #statusuuid # active = 37806757-4391-4c40-8cae-6bbfd71e893e # pending = 0eaec4f3-c524-40ab-b295-2db5cb7a0770 # finished = f82db8cc-a969-4495-bffd-bb0ce0ba877a # running = 6c25b6d2-75cc-42c3-9c8c-ccf7b54ba585 #sounduuid # on = 510b9503-7899-4d69-83c0-690342daf271 # off = 05797a63-51f5...
mit
-8,329,316,937,531,565,000
40.507463
85
0.588637
false
2.942857
false
false
false
Nuevosmedios/ADL_LRS
lrs/util/Authorization.py
1
4915
import base64 from functools import wraps from django.conf import settings from django.contrib.auth import authenticate from vendor.xapi.lrs.exceptions import Unauthorized, OauthUnauthorized, BadRequest from vendor.xapi.lrs.models import Token, Agent from vendor.xapi.oauth_provider.utils import send_oauth_error ...
apache-2.0
-1,585,675,415,629,788,400
48.153061
128
0.59939
false
4.496798
false
false
false
artemrizhov/django-mail-templated
docs/conf.py
1
9652
# -*- coding: utf-8 -*- # # Django Mail Templated documentation build configuration file, created by # sphinx-quickstart on Wed Feb 17 21:51:15 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerat...
mit
-4,400,840,093,290,225,700
31.718644
83
0.706486
false
3.678354
true
false
false
gem/oq-engine
openquake/hazardlib/gsim/bindi_2011.py
1
14198
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2021 GEM Foundation # # OpenQuake 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...
agpl-3.0
1,384,862,206,094,783,200
46.006623
194
0.551564
false
2.61581
false
false
false
yuichi-nadawaki/sakurakocity
sakurakocity/plugins/listen.py
1
3366
# -*- coding: utf-8 -*- from slackbot.bot import listen_to from slackbot.bot import respond_to import random from .dictionaries import * import datetime @listen_to('らこしてぃ|さく|らこすて') def rakosute(message): message.send(random.choice(['なんだ?', 'よんだ?'])) @listen_to('よしよし') def yoshiyoshi(message): message.send(ran...
apache-2.0
2,115,304,670,349,832,200
28.061224
96
0.638343
false
2.048921
false
false
false
hillwithsmallfields/qs
financial/finperiodic.py
1
2706
#!/usr/bin/python # Program to detect periodic payments and spot gaps in them import argparse import csv import datetime import os import qsutils # See notes in finconv.py for config file format secs_per_day = 24 * 60 * 60 def finperiodic_setup(app_data, input_format): return ['payee'], {} def finperiodic_row...
gpl-3.0
-6,405,568,724,214,841,000
32.825
92
0.538803
false
4.208398
true
false
false
channprj/wiki.chann.kr-source
plugin/pelican-page-hierarchy/page_hierarchy.py
1
3165
from pelican import signals, contents import os.path from copy import copy from itertools import chain ''' This plugin creates a URL hierarchy for pages that matches the directory hierarchy of their sources. ''' class UnexpectedException(Exception): pass def get_path(page, settings): ''' Return the dirname relat...
mit
-176,065,135,195,253,900
36.235294
78
0.624013
false
3.897783
false
false
false
epinna/weevely3
tests/test_file_read.py
1
2238
from tests.base_test import BaseTest from testfixtures import log_capture from tests import config from core.sessions import SessionURL from core import modules from core import messages import subprocess import tempfile import datetime import logging import os def setUpModule(): subprocess.check_output(""" BASE_F...
gpl-3.0
322,385,826,608,075,500
31.434783
95
0.663539
false
3.586538
true
false
false
valdt/tallefjant
labbar/lab4/tictactoe_functions.py
1
1496
# -*- coding: utf-8 -*- import random,sys,time def isBoxBusy(gamePlan,row, col, EMPTY): if gamePlan[row][col] == EMPTY: return False return True def computerSelectABox(gamePlan,sign,EMPTY): size = len(gamePlan) print("\n---Datorns tur ("+str(sign)+")---") row = random.randrange(0,size) col = random.r...
gpl-3.0
6,601,901,868,171,264,000
27.788462
79
0.576872
false
2.633803
false
false
false
Schluucht/Destiny
destiny/test/test_api_call.py
1
3437
import destiny.settings as settings from destiny.main.api_call import do_query, get_challenger, get_league_by_summoner, get_acount_id, get_matchlist, \ get_match, get_timeline, get_champion import pytest from destiny.main.destinyexception import DestinyApiCallException @pytest.fixture def id_summoner(): retu...
mit
-6,181,509,911,528,919,000
26.496
115
0.668606
false
3.06875
true
false
false
vassilux/odin
pyodin/sys/tools/asterisk.py
1
1268
# # # # import sys import os import socket import fcntl import struct import subprocess #asterisk bin place ASTERISK_BIN="/usr/sbin/asterisk" def _run_asterisk_command(command): pipe = subprocess.Popen(['/usr/sbin/asterisk', '-nrx', command], stdout=subprocess.PIPE, stderr=subprocess.PIPE) result = pipe.communica...
mit
-5,730,188,208,835,077,000
17.376812
113
0.671136
false
2.786813
false
false
false
gnachman/iTerm2
api/library/python/iterm2/iterm2/mainmenu.py
1
23375
"""Defines interfaces for accessing menu items.""" import enum import iterm2.api_pb2 import iterm2.rpc import typing class MenuItemException(Exception): """A problem was encountered while selecting a menu item.""" class MenuItemState: """Describes the current state of a menu item.""" def __init__(self, c...
gpl-2.0
-4,293,014,743,592,645,000
64.867232
247
0.692799
false
3.9208
false
false
false
hoxmark/TDT4501-Specialization-Project
reinforcement/datasets/digit/model.py
1
4930
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from pprint import pprint import time from utils import pairwise_distances, batchify from config import opt, data, loaders class SimpleClassifier(nn.Module): def __init__(self): ...
mit
-8,798,934,896,517,320,000
33.236111
99
0.541988
false
4.027778
false
false
false
qgis/QGIS-Django
qgis-app/styles/migrations/0002_auto_20201108_0521.py
1
1337
# Generated by Django 2.2 on 2020-11-08 05:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('styles', '0001_initial'), ...
gpl-2.0
-1,898,174,964,722,884,000
43.566667
242
0.642483
false
4.152174
false
false
false
SuperSuperSuperSuper5/everyweak-auto-punch
test/mobile_module.py
1
3052
#!/usr/bin/python #coding:utf-8 import time import requests import send_mail import random_position import all_headers import sys def main(status): """ The main function """ mail_addr = "" name = "" host_addr = "m17708851481@163.com" # Now we get the token and userid first get_token...
gpl-3.0
-8,474,352,799,188,116,000
38.128205
197
0.612713
false
3.018793
false
false
false
kuscsik/naclports
lib/naclports/package_index.py
1
4237
# Copyright (c) 2014 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import hashlib import configuration import naclports import package EXTRA_KEYS = [ 'BIN_URL', 'BIN_SIZE', 'BIN_SHA1' ] VALID_KEYS = nacl...
bsd-3-clause
-2,090,408,763,854,018,000
34.605042
79
0.666981
false
3.729754
true
false
false
puruckertom/poptox
poptox/loons/loons_description.py
1
1357
import webapp2 as webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext.webapp import template import os class loonsDescriptionPage(webapp.RequestHandler): def get(self): text_file2 = open('loons/loons_text.txt','r') xx = text_file2.read() templ...
unlicense
8,686,122,703,163,753,000
45.793103
133
0.638172
false
3.657682
false
false
false
nop33/indico-plugins
livesync/indico_livesync/simplify.py
1
6947
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
-887,382,400,869,119,900
42.149068
115
0.702174
false
4.285626
false
false
false
stxent/kmodgen
packages/sop.py
1
3193
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # sop.py # Copyright (C) 2016 xent # Project is distributed under the terms of the GNU General Public License v3.0 import math from wrlconv import model import primitives class SOP: BODY_CHAMFER = primitives.hmils(0.1) BODY_OFFSET_Z = primitives.hmils(0.1) ...
gpl-3.0
-857,548,429,318,372,200
32.968085
87
0.571876
false
3.244919
false
false
false
liberation/django-registration
registration/forms.py
1
5027
""" Forms and validation code for user registration. Note that all of these forms assume Django's bundle default ``User`` model; since it's not possible for a form to anticipate in advance the needs of custom user models, you will need to write your own forms if you're using a custom model. """ from django.contrib....
bsd-3-clause
-6,836,387,276,208,603,000
37.968992
141
0.623831
false
4.680633
false
false
false
Symbian9/ysfs_2_0
explode_srf.py
1
5198
import os import bpy import bmesh import mathutils from bpy.props import (BoolProperty, FloatProperty, StringProperty, EnumProperty) from bpy_extras.io_utils import (ImportHelper, ExportHelper, unpack_list, unpack_face_list, axis_conversion) # Infomation bl_info = { 'name' : 'YSFS 2.0 - DNM Parts as SRF file...
mit
-1,173,587,664,364,313,600
29.940476
110
0.481147
false
3.602218
false
false
false
linsalrob/PyFBA
PyFBA/cmd/gapfill_from_roles.py
1
22366
""" Given a set of roles (e.g. from a genome annotation) can we gap fill those? Largely based on From_functional_roles_to_gap-filling """ import os import sys import PyFBA import argparse import copy from PyFBA import log_and_message def run_eqn(why, md, r2r, med, bme, verbose=False): """ Run the fba :pa...
mit
6,733,707,812,166,747,000
51.874704
120
0.573281
false
4.036456
false
false
false
damianpv/sfotipy
sfotipy/urls.py
1
1434
from django.conf.urls import patterns, include, url from django.conf import settings from artists.views import ArtistDetailView, ArtistListView from django.contrib import admin admin.autodiscover() from rest_framework import routers from artists.views import ArtistViewSet from albums.views import AlbumViewSet from tra...
mit
-1,419,620,475,134,443,000
37.756757
108
0.684798
false
3.342657
false
true
false
thoas/django-sequere
setup.py
1
1329
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages version = __import__('sequere').__version__ root = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(root, 'README.rst')) as f: README = f.read() setup( name='django-sequere', version=version, description='...
mit
5,351,943,238,205,519,000
31.414634
125
0.623777
false
3.818966
false
true
false
our-city-app/oca-backend
src/solutions/common/integrations/cirklo/api.py
1
13752
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
apache-2.0
-1,141,183,746,215,933,700
42.109718
120
0.686009
false
3.368937
false
false
false
kirankaranth1/ShareIt
myproject/myapp/views.py
1
2533
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from myproject.myapp.forms import EmailForm from myproject.myapp.models import Document from myproject.myapp.forms ...
gpl-2.0
-4,222,012,508,288,221,000
37.393939
121
0.680616
false
3.708638
false
false
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.5-py2.5.egg/sqlalchemy/util.py
1
35617
# util.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import inspect, itertools, new, sets, sys, warnings, weakref import __builtin__ types = __import__('t...
bsd-3-clause
-2,789,202,377,800,578,600
29.05654
176
0.574613
false
4.170609
false
false
false
dj95/telegram-autokick
autokick.py
1
3167
#!/bin/env python3 # # Telegram Auto Kick # # © 2015 Daniel Jankowski import subprocess import os import re import json import sqlite3 import db from threading import Thread,Event DATABASE = '/home/neo/Projekte/Python/telegram-autokick/banned_usernames.db' GROUP_NAME = 'Linux_statt_Windows' class kicker(Thread): ...
lgpl-3.0
-4,750,373,982,801,555,000
30.66
128
0.49463
false
3.819059
false
false
false
joelmpiper/bill_taxonomy
src/report/make_roc_curve.py
1
1830
from sklearn.cross_validation import train_test_split from sklearn import metrics import matplotlib.pyplot as plt import pickle from src.utils.get_time_stamp import get_time_stamp from sklearn.grid_search import GridSearchCV def make_roc_curve(pipeline, X, y, train_frac, subject, cfg): X_train, X_test, y_train, y...
mit
-2,897,342,823,128,817,000
42.571429
79
0.562295
false
3.388889
true
false
false
sfcta/CountDracula
scripts/updateCountsWorkbooks.py
1
9336
""" Created on Jul 25, 2011 @author: lmz This script reads counts data from input Excel workbooks and inserts the info into the CountDracula dataabase. """ import getopt, logging, os, re, shutil, sys, time, traceback, xlrd, xlwt libdir = os.path.realpath(os.path.join(os.path.split(__file__)[0], "..", "geodjango")) ...
gpl-3.0
-5,795,683,601,665,664,000
41.244344
140
0.576478
false
3.366751
false
false
false
pombredanne/django-rest-framework-fine-permissions
rest_framework_fine_permissions/fields.py
1
1121
# -*- coding: utf-8 -*- """ """ import logging import six import collections from django.db import models from rest_framework import serializers from rest_framework.fields import Field, empty from .utils import get_serializer logger = logging.getLogger(__name__) class ModelPermissionsField(Field): """ Field...
gpl-2.0
-2,109,886,766,022,636,800
26.341463
74
0.659233
false
4.43083
false
false
false
ucdavis-bioinformatics/proc10xG
profile_mapping.py
1
10092
#!/usr/bin/env python """ Copyright 2017 Matt Settles Created June 8, 2017 """ from optparse import OptionParser from collectons import Counter import os import sys import time import traceback import signal from subprocess import Popen from subprocess import PIPE # Handle PE: # logic:...
apache-2.0
-3,586,046,802,234,102,300
46.380282
133
0.419144
false
4.247475
false
false
false
prophittcorey/Artificial-Intelligence
assign2/search.py
1
1618
#!/usr/bin/env python ''' File: search.py Author: Corey Prophitt <prophitt.corey@gmail.com> Class: CS440, Colorado State University. License: GPLv3, see license.txt for more details. Description: The iterative deepening search algorithm. ''' # # Stand...
gpl-3.0
-6,677,673,130,061,893,000
28.981481
126
0.645859
false
3.908213
false
false
false
QingkaiLu/RAMCloud
scripts/smux.py
1
5252
#!/usr/bin/python # Copyright (c) 2010-2014 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND...
isc
-7,239,412,484,352,983,000
27.085561
86
0.624334
false
3.727466
false
false
false
linuxrocks123/MailTask
mt_utils.py
1
13214
#! /usr/bin/env python # MailTask Alpha: The Email Manager # Copyright (C) 2015 Patrick Simmons # 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 ...
gpl-3.0
5,728,171,730,024,221,000
38.681682
187
0.629484
false
3.814665
false
false
false
tinkerinestudio/Tinkerine-Suite
TinkerineSuite/Cura/util/stl2.py
1
2253
from __future__ import absolute_import import sys import os import struct import time from Cura.util import mesh2 class stlModel(mesh2.mesh): def __init__(self): super(stlModel, self).__init__() def load(self, filename): f = open(filename, "rb") if f.read(5).lower() == "solid": self._loadAscii(f) if s...
agpl-3.0
-5,708,727,742,411,427,000
28.25974
96
0.637372
false
2.595622
false
false
false
meain/bridge
docs/report/urls.py
1
1263
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name="index"), url(r'^signin/$', views.signin, name='signin'), url(r'^create_user/(?P<user_id>[0-9]+)/(?P<user_class>\ ([a-z])+)$', views.create_new_user, \ name='new_user'), url(r'^time...
mit
7,931,066,556,517,879,000
39.741935
59
0.53365
false
3.08802
false
true
false
GoogleCloudPlatform/PerfKitBenchmarker
tests/linux_packages/pip_test.py
1
2020
"""Tests for pip.""" from typing import Dict, List import unittest from absl.testing import parameterized import mock from perfkitbenchmarker.linux_packages import pip from perfkitbenchmarker.linux_packages import python from tests import pkb_common_test_case # executed remote commands NEED_PIP_27 = [ 'curl http...
apache-2.0
-1,458,470,186,040,201,200
32.114754
80
0.640099
false
2.927536
true
false
false
berkmancenter/mediacloud
apps/common/src/python/mediawords/key_value_store/multiple_stores.py
1
7164
from typing import List, Union from mediawords.db import DatabaseHandler from mediawords.key_value_store import KeyValueStore, McKeyValueStoreException from mediawords.util.perl import decode_object_from_bytes_if_needed class McMultipleStoresStoreException(McKeyValueStoreException): """Multiple stores exception....
agpl-3.0
-3,426,115,544,674,871,000
37.934783
118
0.556253
false
4.485911
false
false
false
artdavis/pyfred
pyfred/webcolors-1.5/webcolors.py
1
27031
""" Utility functions for working with the color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web. See documentation (in docs/ directory of source distribution) for details of the supported formats and conversions. """ import math import re import string import...
gpl-3.0
-3,413,213,957,325,096,000
31.844471
97
0.610484
false
3.439059
false
false
false
vagabondcoder/nm_tools
nm_listen.py
1
8285
#!/usr/bin/env python3 """ NetworkManager event listener and calls user scripts Listens on DBus for NetworkManager events. When an interface is coming up or coming down, user scripts will be called. """ import dbus from dbus.mainloop.glib import DBusGMainLoop import sys import socket import struct import gi.repository...
gpl-2.0
-1,890,240,044,035,423,000
28.275618
110
0.672179
false
2.846101
true
false
false
mensi/pyggi
pyggi/lib/filters.py
1
3924
# -*- coding: utf-8 -*- """ :copyright: (c) 2011 by Tobias Heinzen :license: BSD, see LICENSE for more details """ import time html_escape_table = { "&": "&amp;", '"': "&quot;", "'": "&apos;", ">": "&gt;", "<": "&lt;", } def force_unicode(txt): try: return unicode(txt) ex...
bsd-3-clause
1,785,850,873,471,814,100
29.65625
94
0.602701
false
3.787645
false
false
false
lorensen/VTKExamples
src/Python/GeometricObjects/Quad.py
1
1673
#!/usr/bin/env python import vtk def main(): colors = vtk.vtkNamedColors() # Create four points (must be in counter clockwise order) p0 = [0.0, 0.0, 0.0] p1 = [1.0, 0.0, 0.0] p2 = [1.0, 1.0, 0.0] p3 = [0.0, 1.0, 0.0] # Add the points to a vtkPoints object points = vtk.vtkPoints() ...
apache-2.0
-8,918,097,045,932,373,000
25.983871
61
0.676031
false
3.319444
false
false
false
pacoqueen/bbinn
formularios/resultados_cemento.py
1
30261
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
gpl-2.0
6,911,447,172,993,764,000
44.227545
169
0.505197
false
3.312719
false
false
false
kevana/corpscores
dci_notify/scraper/scraper.py
1
6017
#!/Users/kevanahlquist/Dropbox/dev/dci_notify/env/bin/python ''' Monitor the dci.org website for new score postings. ''' from __future__ import print_function #Initialize Sentry before others, requires SENTRY_DSN environment variable from raven import Client client = Client() # Imports from bs4 import BeautifulSoup ...
bsd-3-clause
4,312,084,939,726,736,000
30.502618
119
0.633206
false
3.705049
false
false
false
OscarES/Differential-Algebra-Tracker
diffWithNpyAndDstFiles.py
1
2191
import numpy as np from IOHandler import loadMultipart ##### Diff between particle data, data should be stored as x column xp column y column yp firstdata = raw_input('Enter first multipart datafile name:') seconddata = raw_input('Enter second multipart datafile name:') firstmultipart = loadMultipart(firstdata) secon...
gpl-3.0
-2,406,106,296,024,561,700
34.934426
89
0.715199
false
2.769912
false
false
false
coopie/huzzer
huzzer/expressions.py
1
5250
from . import BOOL, INT, types class Expression: """ A representation of an expression. ## Methods: * stringify: function that takes a `namer` as an argument. This function renders the expression as text. Expressions can be empty or parameterized. An empty expression when called creates a new ex...
mit
8,976,415,102,576,479,000
31.8125
108
0.659238
false
3.420195
false
false
false
simonpessemesse/seguinus
easyPoS/Gui/Taches.py
1
3919
from PyQt4 import QtCore, QtGui from kronos import ThreadedScheduler import FenetreTache import taches.views as taaaches from datetime import datetime, timedelta, date import preferences import webbrowser from chambres.models import joliePeriode from easyPoS.models import DonneesEntreprise, LigneFacture, PreparationFa...
gpl-2.0
8,621,369,324,232,689,000
33.078261
116
0.586374
false
3.468142
false
false
false
asterix24/GestionaleCaldaie
gestionale/test/settings.py
1
5158
# Django settings for gestionale project. from local_settings import * # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # On Unix systems, a value of None will cause Django ...
gpl-2.0
7,529,562,840,878,033,000
34.328767
108
0.73575
false
3.745824
false
false
false
cburmeister/fluid
app/lib/partial_file.py
1
1095
""" A wrapper around Flask's send_file implementing the 206 partial protocol. """ from flask import Response, request, send_file import mimetypes import os import re def send(path): """Returns a file via the 206 partial protocol.""" range_header = request.headers.get('Range', None) if not range_header: ...
mit
5,795,330,658,714,252,000
23.333333
73
0.591781
false
3.487261
false
false
false
ardi69/pyload-0.4.10
pyload/plugin/hoster/UloziskoSk.py
1
2443
# -*- coding: utf-8 -*- import re import urlparse from pyload.plugin.internal.SimpleHoster import SimpleHoster class UloziskoSk(SimpleHoster): __name = "UloziskoSk" __type = "hoster" __version = "0.25" __pattern = r'http://(?:www\.)?ulozisko\.sk/.+' __config = [("use_premium", "bool", "U...
gpl-3.0
-5,508,463,001,809,072,000
34.231884
111
0.546689
false
3.042553
false
false
false
googleapis/googleapis-gen
google/apps/market/v2/hosted-marketplace-v2-py/ccc/hosted/marketplace_v2/services/license_notification_service/transports/grpc.py
1
11550
# -*- 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
-7,904,287,990,203,589,000
44.833333
87
0.61013
false
4.834659
false
false
false
MartinThoma/hwrt
tests/create_ffiles_test.py
1
4678
#!/usr/bin/env python # Core Library modules import os # First party modules import hwrt.create_ffiles as create_ffiles import hwrt.data_multiplication as data_multiplication import hwrt.features as features import hwrt.utils as utils import tests.testhelper as th def test_training_set_multiplication(): """Test...
mit
-465,068,950,497,233,400
34.709924
88
0.618854
false
3.21512
true
false
false
GiulianoFranchetto/zephyr
boards/xtensa/intel_s1000_crb/support/messenger.py
1
8143
#!/usr/bin/env python3 # # Copyright (c) 2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # Author: Sathish Kuttan <sathish.k.kuttan@intel.com> # This file defines a message class that contains functions to create # commands to the target and to parse responses from the target. import bitstruct class...
apache-2.0
9,050,911,253,903,432,000
33.948498
80
0.534078
false
3.384456
false
false
false
cwaldbieser/txsshadmin
txsshadmin/proto_dispatcher.py
1
3715
from twisted.conch.recvline import HistoricRecvLine from twisted.python import log from textwrap import dedent def makeSSHDispatcherProtocolFactory(handlerFactory, *args, **kwds): def makeDispatcherProtocol(avatar, *a, **k): proto = SSHDispatcherProtocol() proto.handler = handlerFactory(avat...
gpl-3.0
-4,181,060,626,740,396,500
28.484127
84
0.545626
false
4.454436
false
false
false
nicfit/Clique
clique/app/identity.py
1
1960
# -*- coding: utf-8 -*- import sys import json import argparse import nicfit from .. import Identity, IdentityChain from .utils import prompt from ..common import thumbprint, newJwk, jwkIsPrivate @nicfit.command.register class identity(nicfit.Command): HELP = "Identity and stuffs" def _initArgParser(self, ...
lgpl-3.0
3,020,030,026,125,875,700
35.981132
79
0.529082
false
4.474886
false
false
false
rgcarrasqueira/python-pagseguro
pagseguro/configs.py
1
6137
# coding: utf-8 import abc class AbstractConfig(object): # pragma: no cover __metaclass__ = abc.ABCMeta def __init__(self, sandbox=False): self.sandbox = sandbox @classmethod def get(self, key, default=None): return getattr(self, key, default) @abc.abstractproperty def BASE...
mit
-8,740,387,266,421,151,000
27.948113
79
0.663842
false
3.53107
false
false
false
sguazt/dcsxx-testbed
tools/giws/classRepresentation/parameterGiws.py
1
2638
#!/usr/bin/python -u # Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU # # Sylvestre LEDRU - <sylvestre.ledru@inria.fr> <sylvestre@ledru.info> # # This software is a computer program whose purpose is to generate C++ wrapper # for Java objects/methods. # # This software is governed by the CeCILL license under Fren...
apache-2.0
8,050,276,257,811,369,000
37.794118
79
0.735027
false
3.425974
false
false
false
jansky/JanskyBlog
misc.py
1
1343
""" The MIT License (MIT) Copyright (c) 2014 Janský Důnska THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIA...
mit
-4,770,807,393,456,153,000
25.294118
77
0.727069
false
3.420918
false
false
false
Luciden/easl
easl/log.py
1
5275
__author__ = 'Dennis' import csv class Log(object): """ Simple log that contains all experiment information (actions, observations). Time based. Logs for every time step what happened. Can (not yet) be read from/to files etc. """ def __init__(self): """ Attrib...
mit
3,446,437,785,109,815,300
26.208556
87
0.442085
false
4.381229
false
false
false
schristakidis/p2ner
p2ner/components/overlay/completeclient/completeclient/messages/submessages.py
1
5521
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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 # # U...
apache-2.0
-2,815,734,315,043,387,400
33.080247
172
0.690998
false
3.688043
false
false
false
GeosoftInc/gxpy
geosoft/gxapi/GXEDOC.py
1
18354
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### end...
bsd-2-clause
-78,147,204,572,312,750
30.537801
198
0.600959
false
3.74495
false
false
false
2013Commons/hue
apps/beeswax/src/beeswax/views.py
1
35107
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
5,357,420,010,559,240,000
33.384917
160
0.670806
false
3.539012
false
false
false
osspeak/osspeak
osspeak/recognition/actions/library/vocola/dragonkeys.py
1
12786
### ### Code for parsing extended SendDragonKeys syntax into a series of ### Input events suitable for calling SendInput with. ### ### Uses ctypes (requires Python 2.5+). ### ### Assumes input is 8-bit Windows-1252 encoding. ### ### ### Author: Mark Lillibridge ### Version: 0.7 ### import re from ctypes imp...
mit
4,115,163,699,120,067,600
27.289823
87
0.492805
false
2.976257
false
false
false
peterrenshaw/zerotasks
machine.py
1
1465
#!/usr/bin/env python # ~*~ encoding: utf-8 ~*~ #======= # _____ ______ __ # /__ / ___ _________ /_ __/___ ______/ /_______ # / / / _ \/ ___/ __ \ / / / __ `/ ___/ //_/ ___/ # / /__/ __/ / / /_/ / / / / /_/ (__ ) ,< (__ ) # /____/\___/_/ \____/ /_/ ...
gpl-3.0
-7,992,657,440,703,624,000
25.636364
80
0.54744
false
2.977642
false
false
false
lukesneeringer/fauxquests
fauxquests/session.py
1
4388
from __future__ import unicode_literals from collections import namedtuple from fauxquests.adapter import FauxAdapter from fauxquests.compat import mock from requests.compat import OrderedDict from requests.sessions import Session from sdict import AlphaSortedDict class FauxServer(Session): """A class that can re...
bsd-3-clause
-9,205,908,773,695,624,000
38.890909
80
0.616226
false
4.748918
false
false
false
ntoll/yotta
yotta/lib/registry_access.py
1
22721
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import re import logging from collections import OrderedDict import uuid import functools import json import binascii import calendar import datetime import hashlib import ite...
apache-2.0
-412,501,898,421,974,500
31.928986
131
0.632763
false
4.100523
false
false
false
myboycrais99/Rule1
GetGrowthRateExceptions.py
1
4224
''' This file passes the maximum allowed number of years that the stock is allowed to fail to meet the desired growth rates. Default is 0 years This value will be used in PassGrowthRate.py ''' # -------------------------- Required Files----- --------------------- # # # --------------------------------------...
mit
3,795,689,030,596,564,000
33.813559
94
0.54285
false
4.258065
false
false
false
firmadyne/scraper
firmware/spiders/centurylink.py
1
1956
from scrapy import Spider from scrapy.http import Request from firmware.items import FirmwareImage from firmware.loader import FirmwareLoader import urllib.request, urllib.parse, urllib.error # http://home.centurytel.net/ihd/ class CenturyLinkSpider(Spider): name = "centurylink" allowed_domains = ["century...
mit
4,258,128,315,239,091,000
41.521739
104
0.555215
false
4.327434
false
false
false
botswana-harvard/edc-label
edc_label/views/change_printer_view.py
1
1732
from django.views.generic.edit import ProcessFormView from django.urls.base import reverse from django.http.response import HttpResponseRedirect from edc_base.models import UserProfile from django.contrib.auth.mixins import LoginRequiredMixin class ChangePrinterView(LoginRequiredMixin, ProcessFormView): success...
gpl-3.0
5,477,501,294,457,762,000
39.27907
84
0.671478
false
3.848889
false
false
false
OSGeoLabBp/tutorials
english/img_processing/code/circles.py
1
1095
import cv2 import numpy as np import os.path from sys import argv if len(argv) < 2: print("Usage: {} img_file [img_file ...]".format(argv[0])) exit() # process images for fn in argv[1:]: try: src_img = cv2.imread(fn) # load image except: print("Failed to read image {}".format(fn)) ...
cc0-1.0
-2,507,481,706,028,149,000
30.285714
80
0.585388
false
2.793367
false
false
false
SNeuhausen/training_management
utils/field_utils.py
1
2138
class FieldUtils(object): """ A utility class, which provides helper functions for managing fields of BaseModels. """ @staticmethod def get_field_description(model_object, field_name): result = model_object.fields_get([field_name]) field_description = result.get(field_name) return f...
gpl-3.0
4,628,970,539,293,727,000
47.613636
115
0.65435
false
4.354379
false
false
false