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
dr4ke616/LazyTorrent
twisted/plugins/torrent_plugin.py
1
1555
from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application import internet from twisted.application.service import IServiceMaker from mamba.utils import config from mamba.enterprise import database from mamba.core.session import Session from mamb...
gpl-3.0
8,606,297,883,575,277,000
29.490196
70
0.748553
false
4.367978
false
false
false
google-research/open-covid-19-data
src/scripts/locations/generate_iso_3166_1.py
1
7123
# 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 in writing, ...
apache-2.0
-6,122,616,209,773,287,000
49.460993
824
0.657625
false
2.919573
false
false
false
LamCiuLoeng/fd
rpac/model/__init__.py
1
2426
# -*- coding: utf-8 -*- """The application's model objects""" from zope.sqlalchemy import ZopeTransactionExtension from sqlalchemy.orm import scoped_session, sessionmaker #from sqlalchemy import MetaData from sqlalchemy.ext.declarative import declarative_base # Global session manager: DBSession() returns the Thread-l...
mit
-2,430,196,997,975,855,000
34.676471
78
0.741962
false
4.084175
false
false
false
gtaylor/paypal-python
paypal/interface.py
1
19787
# coding=utf-8 """ The end developer will do most of their work with the PayPalInterface class found in this module. Configuration, querying, and manipulation can all be done with it. """ import types import logging from pprint import pformat import warnings import requests from paypal.settings import PayPalConfig f...
apache-2.0
-4,156,943,831,509,777,000
36.471591
114
0.598838
false
4.505807
true
false
false
NeCTAR-RC/ceilometer
ceilometer/compute/pollsters/cpu.py
1
4105
# -*- encoding: utf-8 -*- # # Copyright © 2012 eNovance <licensing@enovance.com> # Copyright © 2012 Red Hat, Inc # # Author: Julien Danjou <julien@danjou.info> # Author: Eoghan Glynn <eglynn@redhat.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance ...
apache-2.0
-2,454,638,988,634,142,700
43.597826
75
0.574945
false
4.474373
false
false
false
openstack/ironic
ironic/common/context.py
1
1975
# -*- encoding: utf-8 -*- # # 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, so...
apache-2.0
-8,362,864,803,926,115,000
33.051724
79
0.65519
false
4.519451
false
false
false
openstack/os-win
os_win/tests/unit/test_utils.py
1
14238
# Copyright 2015 Cloudbase Solutions SRL # # 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...
apache-2.0
-7,459,312,965,330,679,000
38.994382
79
0.599874
false
3.680021
true
false
false
MVilstrup/mosquito_1
mosquito/networking/sink.py
1
1926
# Task sink # Binds PULL socket to tcp://localhost:5558 # Collects results from workers via that socket import zmq class Sink(object): def __init__(self, result_port, send_port, break_port="tcp://127.0.0.1:9999"): context = zmq.Context() # Sock...
apache-2.0
3,985,627,639,154,338,300
31.644068
64
0.59865
false
4.20524
false
false
false
gouzongmei/t1
src/kimchi/model/vms.py
1
40069
# # Project Kimchi # # Copyright IBM, Corp. 2014 # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This lib...
lgpl-3.0
-8,180,474,466,544,877,000
39.028971
79
0.549827
false
4.091178
false
false
false
eppye-bots/bots
bots/botsinit.py
1
15231
from __future__ import unicode_literals import sys if sys.version_info[0] > 2: basestring = unicode = str import configparser as ConfigParser else: import ConfigParser import os import encodings import codecs import logging import logging.handlers #bots-modules from . import botsglobal from . ...
gpl-3.0
-7,892,572,289,152,995,000
62.812766
195
0.627142
false
4.320851
true
false
false
westernx/sgfs
sgfs/cache.py
1
5707
from subprocess import call import collections import errno import logging import os import sqlite3 from sgsession import Entity log = logging.getLogger(__name__) class PathCache(collections.MutableMapping): def __init__(self, sgfs, project_root): self.sgfs = sgfs self.project_roo...
bsd-3-clause
-2,746,726,976,391,183,000
37.823129
151
0.557736
false
4.218034
false
false
false
rammstein/0install
zeroinstall/injector/driver.py
1
7097
""" This class brings together a L{solve.Solver} to choose a set of implmentations, a L{fetch.Fetcher} to download additional components, and the user's configuration settings. @since: 0.53 """ # Copyright (C) 2011, Thomas Leonard # See the README file for details, or visit http://0install.net. from zeroinstall impor...
lgpl-2.1
-4,867,127,432,715,335,000
35.963542
113
0.722418
false
3.496059
true
false
false
gleicon/RedisLive
src/dataprovider/redisprovider.py
1
11475
from api.util import settings from datetime import datetime, timedelta import redis import json import ast class RedisStatsProvider(object): """A Redis based persistance to store and fetch stats""" def __init__(self): # redis server to use to store stats stats_server = settings.get_redis_stat...
mit
-5,711,488,420,907,123,000
35.313291
88
0.546231
false
4.080725
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/verification_ip_flow_result_py3.py
1
1304
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-3,858,672,163,984,985,000
37.352941
78
0.597393
false
4.30363
false
false
false
CRFS/python3-ncplib
examples/time.py
1
1346
""" NCP time data example. Connects to a node and requests a single time capture to be performed. Prints the result to stdout. """ import asyncio import ncplib # The node to connect to. Can be a DNS name or an IP address. NODE_HOST = "127.0.0.1" # Frequency. FREQ_HZ = 2400.12e6 # 2400.12 MHz # Realtime bandwidth....
mit
-7,047,356,326,211,177,000
24.396226
116
0.643388
false
3.017937
false
false
false
cmput404wi16/metablog
account/models.py
1
1216
from django.db import models from django.core import serializers # Create your models here. class User(models.Model): uid = models.CharField(max_length=250, primary_key=True) nameFirst = models.CharField(max_length=250) nameLast = models.CharField(max_length=250) githubId = models.CharField(max_length=...
mit
4,983,296,740,722,061,000
35.848485
70
0.73273
false
3.286486
false
false
false
zoltan-fedor/robo_car
nodes/drive_control.py
1
11947
#!/usr/bin/env python import rospy from std_msgs.msg import String #from std_msgs.msg import UInt16 from std_msgs.msg import Int32 import time from pyfirmata import Arduino on_hardware = True # whether we are running this node on the actual car (so it can access the IO board) wheelpin = 5 # to which pin on the IO shel...
mit
-8,419,473,920,683,098,000
59.035176
208
0.696493
false
4.087239
false
false
false
TetraAsh/baruwa2
baruwa/controllers/lists.py
1
12838
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net> # # 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 S...
gpl-3.0
3,271,341,334,908,312,600
38.140244
80
0.531391
false
4.030769
false
false
false
luisza/dfva_client
src/client_fva/ui/requestauthentication.py
1
10627
import time from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtCore import Qt, pyqtSlot, QThread, pyqtSignal from PyQt5.QtWidgets import QCompleter, QTableWidgetItem from client_fva.models.ContactDropDown import ContactModel from client_fva.models.MyRequest import MyRequestModel from client_fva.session_storage i...
gpl-3.0
-6,719,245,680,836,708,000
42.52459
150
0.647424
false
4.026925
false
false
false
gonesurfing/Quisk_rpi_remote
sdriqpkg/quisk_hardware.py
1
2872
# Please do not change this hardware control module. # It provides support for the SDR-IQ by RfSpace. from __future__ import print_function import _quisk as QS import sdriq from quisk_hardware_model import Hardware as BaseHardware class Hardware(BaseHardware): decimations = [1250, 600, 500, 360] def __init__(se...
gpl-2.0
-3,532,599,379,455,024,600
33.60241
84
0.625
false
3.055319
false
false
false
yuxng/Deep_ISM
ISM/lib/datasets/imdb.py
1
3612
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os import os.path as osp import PIL import numpy as np import sc...
mit
5,910,891,603,174,442,000
28.365854
85
0.564784
false
3.926087
false
false
false
astonshane/davisputnamGo
davisputnam/graph.py
1
1255
import json import sys from pprint import pprint from ete3 import Tree, TreeStyle, TextFace from PIL import Image, ImageDraw def parseTree(root): tree = Tree() tree.name = root['Name'] tree.add_face(TextFace(root['Split'], fgcolor="red"), column=0, position="branch-bottom") if root['Children']: ...
mit
-8,743,040,261,105,409,000
25.702128
93
0.623108
false
3.251295
false
false
false
stanislavb/nagios-snmp-location
nagios-plugins/check_snmp_location.py
1
1637
#!/usr/bin/env python # This script checks the standard SNMP location oid # and saves it in a memcached database with hostname as key. # # FreeBSD requirements: # Compile net-snmp with python bindings # Install py-memcached # Nagios exit codes: # 0 OK # 1 WARNING # 2 CRITICAL # 3 UNKNOWN import netsnmp import memcac...
unlicense
1,020,803,993,351,950,000
27.224138
111
0.703115
false
3.382231
false
false
false
flavio/scsgate
scsgate/reactor.py
1
1869
""" This module contains the definition of the Reactor class. This one is useful when dealing with concurrent access to the SCSGate device """ import queue import threading from scsgate.tasks import MonitorTask, ExecutionError class Reactor(threading.Thread): """ Allows concurrent access to the SCSGate device "...
mit
3,353,941,284,899,801,000
29.639344
79
0.596041
false
4.804627
false
false
false
asedunov/intellij-community
python/helpers/pydev/_pydevd_bundle/pydevd_comm.py
1
60832
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
apache-2.0
896,342,124,411,002,400
40.837689
191
0.513513
false
4.328755
false
false
false
suutari-ai/shoop
shuup/core/api/users.py
3
1754
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.contrib.auth ...
agpl-3.0
8,015,017,041,828,015,000
27.754098
105
0.706956
false
4.146572
false
false
false
m0mik/gr-osmosdr
grc/gen_osmosdr_blocks.py
1
11905
""" Copyright 2012 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later...
gpl-3.0
-936,261,014,248,224,000
29.762274
256
0.646031
false
2.972534
false
false
false
ptonini/Stratus
lib/classes.py
1
7366
from time import sleep __author__ = 'ptonini' import re import os import sys import time from mutagen.mp3 import MP3 from mutagen.easyid3 import EasyID3 class Tracks: def __init__(self, source): if isinstance(source, dict): self.__dict__.update(source) elif isinstance(source, list...
unlicense
-336,839,685,327,072,450
40.150838
99
0.509503
false
3.994577
false
false
false
2gis/vmmaster
vmpool/app.py
1
1295
# coding: utf-8 import logging from flask import Flask from core.config import config from core.utils import JSONEncoder log = logging.getLogger(__name__) class Provider(Flask): def __init__(self, *args, **kwargs): from core.db import Database from core.sessions import Sessions from vmpo...
mit
-5,654,950,707,962,474,000
25.428571
76
0.644015
false
4.098101
false
false
false
bitforks/drawbot
drawBot/ui/codeEditor.py
1
49280
import AppKit import objc from keyword import kwlist import re from pygments.lexers import PythonLexer, get_lexer_by_name from pygments.token import * from pygments.style import Style from pygments.styles.default import DefaultStyle try: import jedi hasJedi = True except: hasJedi = False from vanilla im...
bsd-2-clause
-5,953,409,070,966,837,000
35.941529
222
0.605499
false
4.238411
false
false
false
hongzhouye/frankenstein
tools/mol_utils.py
1
8589
"""Utils functions for module MOL """ import os import numpy as np from frankenstein.tools.io_utils import zmat2xyz from frankenstein.data.atom_data import get_atomic_number def get_enuc(Zs, xyzs): """Compute nuclear repulsion for a give molecule Note: The coordinates must be in unit of Bohr. (1 B...
bsd-3-clause
-3,732,571,148,976,621,600
29.031469
219
0.544301
false
3.280749
false
false
false
pwyliu/clancy
clancy/engage.py
1
1892
import getpass from .utils import goodquit_json, read_file from .redoctober import api_call def engage(args, password): """ Construct payloads and POST to Red October """ if args['create']: payload = {'Name': args['--user'], 'Password': password} goodquit_json(api_call('create', args,...
mit
5,020,975,873,342,050,000
32.785714
76
0.523784
false
3.958159
false
false
false
tobykurien/MakerDroid
assetsrc/pycam.mp3/src/pycam/Exporters/EMCToolExporter.py
1
1454
# -*- coding: utf-8 -*- """ $Id: EMCToolExporter.py 629 2010-08-23 16:53:06Z sumpfralle $ Copyright 2010 Lars Kruse <devel@sumpfralle.de> This file is part of PyCAM. PyCAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Fo...
gpl-3.0
-6,490,145,569,136,249,000
32.813953
71
0.662999
false
3.662469
false
false
false
j-be/vj-aerome-scent-controller
aerome_scent_controller.py
1
1957
import logging import serial import array class AeromeScentController (object): BLOCK_BEGIN = [0x1b] BLOCK_END = [0x0d] ACTIVATE_CONTROLLER = [0xe0, 0xe1, 0xe2, 0xe3, 0x0d] ALL_VALVES_HOLD = [0xee, 0xef] FLUSH_VALVE_ON = [0x26] FLUSH_VALVE_OFF = [0xa6] SCENT_VALVE_ON = 0x40 SCENT_VALV...
mit
5,824,470,294,240,700,000
31.081967
93
0.615738
false
3.187296
false
false
false
dmsurti/reynolds-blender
reynolds_blender/fvschemes.py
1
6197
#------------------------------------------------------------------------------ # Reynolds-Blender | The Blender add-on for Reynolds, an OpenFoam toolbox. #------------------------------------------------------------------------------ # Copyright| #-----------------------------------------------------------------------...
gpl-3.0
-8,835,433,186,925,909,000
39.503268
85
0.555591
false
4.063607
false
false
false
maximinus/SPQR
setup.py
1
2499
#!/usr/bin/python # 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 program is distributed in the hope that it wi...
gpl-3.0
7,500,770,195,348,641,000
30.632911
78
0.732693
false
3.104348
false
false
false
alexweav/Learny-McLearnface
LearnyMcLearnface/NeuralNetwork.py
1
5358
# -*- coding: utf-8 -*- """ Created on Fri May 06 14:34:21 2016 @author: Alexander Weaver """ import numpy as np from . import Layers as layers from . import Utils as utils class NeuralNetwork(object): """ Initializes a neural network. Takes a dictionary of initialization options. """ def __...
mit
-489,052,098,223,998,340
37.553957
110
0.591639
false
4.09633
false
false
false
DailyActie/Surrogate-Model
01-codes/scipy-master/scipy/ndimage/morphology.py
1
80212
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
mit
3,503,458,796,533,075,000
35.862132
119
0.558495
false
3.609414
false
false
false
kuzmoyev/Google-Calendar-Simple-API
tests/test_attendee.py
1
2820
from unittest import TestCase from gcsa.attendee import Attendee, ResponseStatus from gcsa.serializers.attendee_serializer import AttendeeSerializer class TestAttendeeSerializer(TestCase): def test_to_json(self): attendee = Attendee( email='mail@gmail.com', display_name='Guest', ...
mit
-4,699,221,430,244,430,000
40.470588
87
0.648582
false
4.171598
true
false
false
ParanoidNemo/twolame
cloud.py
1
1896
#! /usr/bin/env python # Copyright (C) 2015 by Andrea Calzavacca <paranoid.nemo@gmail.com> # # 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 ...
gpl-3.0
2,340,330,728,297,430,000
30.6
79
0.699367
false
3.263339
false
false
false
mauriceyap/ccm-assistant
tests/test_alexa_main.py
1
4199
import unittest from mock import patch import alexa_main TEST_APPLICATION_ID = "aPpLiCaTiOnId12345" TEST_REQUEST_ID = "rEqUeStId123" class TestAlexaMain(unittest.TestCase): def setUp(self): alexa_main.config.APPLICATION_ID = TEST_APPLICATION_ID @patch("alexa_main.events.on_session_started") @p...
mit
-4,778,385,089,163,808,000
32.062992
99
0.535127
false
3.987654
true
false
false
adobe/avmplus
halfmoon/templates/templates.py
1
36785
#!/usr/bin/env python # -*- Mode: Python; indent-tabs-mode: nil -*- # vi: set ts=2 sw=2 expandtab: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import Str...
mpl-2.0
1,539,823,929,326,712,300
33.15506
106
0.617453
false
3.213225
false
false
false
tshi04/machine-learning-codes
headGAN-ff/model.py
1
2150
import re import numpy as np import tensorflow as tf class discriminator(object): def __init__(self): self.name = 'keydis' def __call__(self, input_data, reuse=False): with tf.variable_scope(self.name) as self.ds: if reuse: self.ds.reuse_variables() nf_l...
gpl-3.0
1,230,414,954,405,514,500
38.090909
118
0.61814
false
2.882038
false
false
false
Zanzibar82/streamondemand.test
servers_sports/ucaster.py
1
3368
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand - XBMC Plugin # Conector para ucaster # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-3.0
-695,613,796,193,651,600
48.529412
192
0.554632
false
3.519331
false
false
false
Ultimaker/Cura
plugins/UltimakerMachineActions/UMOUpgradeSelection.py
1
1985
# Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Settings.ContainerRegistry import ContainerRegistry from cura.MachineAction import MachineAction from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty from UM.i18n import i18nCatalog from UM.Application im...
lgpl-3.0
2,034,681,844,096,167,200
42.152174
107
0.723929
false
4.135417
false
false
false
zeal4u/FCA_Faceted_Search
bin/web_backend.py
1
2649
# -*- coding: utf-8 -*- __author__ = 'jsz' __version__ = 0.1 import web import json from search_engine import SearchService from search_engine import FacetEncoder from models import BookEncoder # APIs exposed to front end urls = ( "/keyWordsSearch","KeyWordsSearch", "/facetSearch","FacetSear...
mit
5,996,236,848,290,108,000
21.155963
81
0.575983
false
2.981481
false
false
false
and3rson/isc
examples/test_client.py
1
2134
#!/usr/bin/env python3.6 from isc.client import Client from threading import Thread, Event from time import time from random import random import logging ITERATIONS = 1 CONN_POOL_SIZE = 1 COUNT = 1000 class Process(Thread): def __init__(self, client): super(Process, self).__init__() self.procee...
gpl-3.0
511,173,291,182,243,840
20.77551
77
0.64761
false
3.419872
false
false
false
Hoikas/korman
korman/exporter/logger.py
1
2584
# 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,733,352,604,971,628,000
32.558442
99
0.627709
false
3.833828
false
false
false
Kotaimen/stonemason
stonemason/pyramid/geo/tms.py
1
10943
# -*- encoding: utf-8 -*- """ stonemason.pyramid.geo.geosys ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Geographic system """ __author__ = 'kotaimen' __date__ = '3/20/15' import collections from osgeo import osr from osgeo import ogr osr.UseExceptions() ogr.UseExceptions() from stonemason.pyramid import Pyramid fro...
mit
1,514,051,397,815,786,000
34.186495
118
0.607512
false
3.905425
false
false
false
elsantodel90/RAAGo
aago_ranking/users/admin.py
1
1070
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin from django.contrib.auth.forms import UserChangeForm, UserCreationForm from .models import User class MyUserChan...
gpl-3.0
-776,621,858,203,700,000
25.75
78
0.703738
false
4.297189
false
false
false
caktus/ibid
ibid/plugins/core.py
1
11725
# Copyright (c) 2008-2010, Michael Gorven, Stefano Rivera # Released under terms of the MIT/X/Expat Licence. See COPYING for details. import re from datetime import datetime, timedelta from random import choice import logging import ibid from ibid.config import IntOption, ListOption, DictOption from ibid.plugins impo...
gpl-3.0
-4,911,617,517,799,839,000
37.316993
247
0.532367
false
4.160752
false
false
false
openaid-IATI/deprecated-version-OIPA-v2
iati/data/migrations/0035_auto__add_indicatorcitydata.py
1
35113
# -*- 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 model 'IndicatorCityData' db.create_table('data_indicatorcitydata', ( ('id', self.gf('d...
agpl-3.0
-1,100,802,931,386,025,900
82.208531
182
0.552018
false
3.540331
false
false
false
ctu-geoforall-lab-sandbox/qgis-aerogen-plugin
aerogen.py
1
7702
# -*- coding: utf-8 -*- """ /*************************************************************************** AeroGen A QGIS plugin AeroGen Plugin ------------------- begin : 2017-04-24 git sha : $Format:%H$ ...
gpl-3.0
1,069,905,357,386,615,600
32.198276
79
0.550247
false
4.65659
false
false
false
chiefenne/PyAero
src/SplineRefine.py
1
13180
import copy import numpy as np from scipy import interpolate from PySide2 import QtGui, QtCore from Utils import Utils import GraphicsItemsCollection as gic import GraphicsItem import ContourAnalysis as ca import logging logger = logging.getLogger(__name__) class SplineRefine: def __init__(...
mit
-7,586,054,523,396,383,000
34.611111
79
0.547117
false
3.789534
false
false
false
emory-libraries/eulxml
eulxml/xmlmap/core.py
1
28298
# file eulxml/xmlmap/core.py # # Copyright 2010,2011 Emory University Libraries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
apache-2.0
6,997,299,404,527,287,000
40.675994
106
0.63478
false
4.28433
false
false
false
citiususc/construe
construe/knowledge/abstraction_patterns/rhythm/patterns.py
1
5602
# -*- coding: utf-8 -*- # pylint: disable-msg= E1002, E1101 """ Created on Wed Nov 21 09:04:17 2012 This file contains the definition of a set of very simple abstraction patterns in order to perform rhythm interpretation on an ECG signal. @author: T. Teijeiro """ import copy import construe.knowledge.observables as ...
agpl-3.0
8,645,814,896,490,964,000
40.80597
79
0.661014
false
2.953084
false
false
false
grow/pygrow
install.py
1
7591
#!/usr/bin/python2 # -*- coding: utf-8 -*- """Standalone Grow SDK installer. Downloads Grow SDK and sets up command aliases.""" import argparse import datetime import json import os import platform import re import sys import tempfile import urllib import urllib2 import zipfile DOWNLOAD_URL_FORMAT = 'https://github....
mit
-4,453,811,987,850,760,000
32.258772
100
0.576553
false
3.635187
false
false
false
Angeldude/csound
tests/commandline/test.py
1
9537
#!/usr/bin/python # Csound Test Suite # By Steven Yi <stevenyi at gmail dot com> import os import sys from testUI import TestApplication from Tkinter import * parserType = "" showUIatClose = False ##csoundExecutable = r"C:/Users/new/csound-csound6-git/csound.exe " csoundExecutable ="" class Test: def __init__(...
lgpl-2.1
6,264,556,847,959,010,000
37.301205
117
0.594527
false
3.490849
true
false
false
gsobczyk/hamster
src/hamster/widgets/facttree.py
1
23335
# -*- coding: utf-8 -*- # Copyright (C) 2008-2009, 2014 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster 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, eithe...
gpl-3.0
-825,646,525,799,796,400
33.916168
171
0.572543
false
3.71875
false
false
false
Answeror/aip
aip/imfs/baidupcs.py
1
3088
from .base import NameMixin, guarded from .error import ImfsError, NotFoundError from .utils import thumbnail from pprint import pformat from .. import img from datetime import datetime BASE = '/apps/aip/cache/' class PCSError(ImfsError): pass class BadResponse(PCSError): def __init__(self, r): s...
mit
4,479,358,954,816,668,000
23.507937
67
0.53886
false
3.658768
false
false
false
dwavesystems/dimod
dimod/reference/composites/roofduality.py
1
2936
# Copyright 2019 D-Wave Systems 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...
apache-2.0
-527,168,984,225,831,500
36.641026
87
0.680858
false
4.152758
false
false
false
aewallin/openvoronoi
src/test/pytest_ttt_alphabet/ttt_alphabet.py
1
3568
import truetypetracer as ttt import openvoronoi as ovd import time import sys def translate(segs,x,y): out = [] for seg in segs: seg2 = [] for p in seg: p2 = [] p2.append(p[0] + x) p2.append(p[1] + y) seg2.append(p2) #seg2.append(seg[3...
lgpl-2.1
-4,697,356,656,404,354,000
26.658915
88
0.571749
false
2.858974
false
false
false
gannetson/sportschooldeopenlucht
apps/cowry/migrations/0001_initial.py
1
3506
# -*- 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 model 'Payment' db.create_table(u'cowry_payment', ( (u'id', self.gf('django.db.models.f...
bsd-3-clause
2,409,316,479,135,669,000
62.763636
196
0.596121
false
3.706131
false
false
false
gangadhar-kadam/nassimapp
stock/doctype/purchase_receipt/purchase_receipt.py
1
12927
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr, flt, cint from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webn...
agpl-3.0
7,571,372,898,239,984,000
35.724432
205
0.691034
false
3.047383
false
false
false
zvoase/django-relax
relax/templatetags/couchdb.py
1
2778
# -*- coding: utf-8 -*- import re from django import template from django.template.defaultfilters import stringfilter from relax import json, settings register = template.Library() class SettingNode(template.Node): def __init__(self, setting_name, var_name=None, default_value=None): # The variabl...
mit
-2,214,768,308,070,269,200
39.275362
87
0.598632
false
3.934844
false
false
false
MissionCriticalCloud/marvin
marvin/cloudstackAPI/prepareTemplate.py
1
6722
"""load template into primary storage""" from baseCmd import * from baseResponse import * class prepareTemplateCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "false" """template ID of the template to be prepared in primary storage(s).""" """Required""" self.te...
apache-2.0
6,533,930,235,692,661,000
39.739394
190
0.591937
false
4.303457
false
false
false
stivalet/PHP-Vuln-test-suite-generator
bin/core.py
1
3062
from Classes.Manifest import * from Flaws_generators.Generator_factory import * from Flaws_generators.Generation_functions import * import global_variables as g def main(argv): # List of flaws flaws = ["XSS", "IDOR", "Injection", "URF", "SM", "SDE"] flaw_list = [] #Gets options & arguments try: ...
mit
526,869,589,661,282,600
43.376812
457
0.612998
false
3.296017
false
false
false
pjdufour/geonode
geonode/base/forms.py
1
13646
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-3,462,400,340,119,322,600
36.081522
117
0.555767
false
4.485865
false
false
false
whitews/FlowIO
examples/print_channels.py
1
1358
import flowio import os import sys if len(sys.argv) > 1: flow_dir = sys.argv[1] else: flow_dir = os.getcwd() files = os.listdir(flow_dir) for file in files: try: flow_data = flowio.FlowData("/".join([flow_dir,file])) except: continue print file + ':' for key in sorted(flow_da...
bsd-3-clause
-1,600,365,581,725,694,500
31.357143
76
0.562592
false
3.079365
false
false
false
scalyr/scalyr-agent-2
scalyr_agent/compat.py
1
7997
# Copyright 2014-2020 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
6,758,009,555,331,464,000
31.909465
110
0.615481
false
4.034813
false
false
false
wiki2014/Learning-Summary
alps/cts/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py
1
3382
# Copyright 2014 The Android Open Source Project # # 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 a...
gpl-3.0
4,365,159,712,139,811,000
34.978723
75
0.630692
false
3.563751
false
false
false
shayn1234/apps-catalog
deployment/catalog-ci-jenkins/modules/catalog_ci/files/scripts/generate_names.py
1
1579
#!/usr/bin/python # 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 # d...
apache-2.0
-7,187,242,229,561,227,000
30.58
75
0.631412
false
3.462719
false
false
false
aeppert/py-cifsdk
test/email/t1.py
1
2367
# -*- coding: utf-8 -*- msg = """ Delivered-To: support@barely3am.com Received: by 10.112.40.50 with SMTP id u18csp916705lbk; Sun, 19 Apr 2015 05:50:04 -0700 (PDT) X-Received: by 10.42.151.4 with SMTP id c4mr13784232icw.77.1429447803846; Sun, 19 Apr 2015 05:50:03 -0700 (PDT) Return-Path: <advertisebz09...
lgpl-3.0
-4,987,111,927,963,269,000
30.546667
173
0.724736
false
2.880633
false
false
false
lmorillas/catalogoprogramaseducativos
lib/extrae_info_wikispaces.py
1
4799
# -*- coding: utf-8 -*- import urlparse import re import json from amara.bindery import html from amara.lib import U import shelve catsh = shelve.open('catalogo.dat') def quita_punto(texto): if texto.endswith('.'): return texto[:-1] else: return texto def dame_texto(texto, inicio, fin): _ini ...
apache-2.0
9,024,883,634,799,330,000
27.855422
154
0.603549
false
2.686483
false
false
false
tzuhsienli/resume-site
resume/settings.py
1
6235
# Django settings for resume project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Administrator', 'li.tzuhsien@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'resumedb...
mit
4,027,110,781,063,915,000
33.832402
136
0.691259
false
3.760555
false
false
false
nehudesi/MSim
module/tsutil.py
1
32434
''' Version: MRT v3.0 Type: Library Location: C:\MRT3.0\module Author: Chintan Patel Email: chintanlike@gmail.com ''' import math import datetime as dt #import numpy as np import module.qsdateutil as qsdateutil from math import sqrt import pandas as pd from copy import deepcopy import matplotlib.pyp...
agpl-3.0
-8,922,782,742,476,446,000
35.452656
118
0.588981
false
3.292792
false
false
false
klmitch/nova
nova/tests/unit/scheduler/test_utils.py
1
80648
# 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 # d...
apache-2.0
-4,330,534,855,583,730,700
40.614035
79
0.542183
false
4.13728
true
false
false
willettk/gzhubble
python/fzeta_examples.py
1
5008
from matplotlib import pyplot as plt from astropy.table import Table from scipy import optimize from scipy.stats import distributions as dist import numpy as np # Load data data = Table.read("../data/ferengi_debiasable_data.fits") # Use only galaxies with surface brightness/redshift ranges that are considered "debia...
mit
-8,789,516,641,017,032,000
31.732026
124
0.608826
false
2.619247
false
false
false
mozilla/kuma
kuma/core/validators.py
1
3885
# see also: http://github.com/tav/scripts/raw/master/validate_jsonp.py # Placed into the Public Domain by tav <tav@espians.com> """Validate Javascript Identifiers for use as JSON-P callback parameters.""" import re from unicodedata import category # -----------------------------------------------------------------...
mpl-2.0
3,343,287,382,419,359,000
32.491379
80
0.501673
false
4.307095
false
false
false
all-of-us/raw-data-repository
rdr_service/model/bq_workbench_workspace.py
1
9460
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum, \ BQRecordField class BQWorkspaceRaceEthnicitySchema(BQSchema): race_ethnicity = BQField('race_ethnicity', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE) race_ethnicity_id = BQField('race_ethnic...
bsd-3-clause
-1,766,450,911,606,441,000
54.321637
117
0.723996
false
3.272224
false
false
false
Jaesin/OctoPrint
src/octoprint/vendor/sockjs/tornado/transports/jsonp.py
1
3693
# -*- coding: utf-8 -*- """ sockjs.tornado.transports.jsonp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JSONP transport implementation. """ import logging from tornado.web import asynchronous from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.sockjs.tornado.transports import pollingbase from oct...
agpl-3.0
-149,909,300,359,437,600
28.07874
84
0.581099
false
4.284223
false
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/hplip/ui4/printernamecombobox.py
1
5122
# -*- coding: utf-8 -*- # # (c) Copyright 2001-2009 Hewlett-Packard Development Company, L.P. # # 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 opt...
gpl-3.0
8,314,230,958,582,028,000
32.045161
99
0.641156
false
3.877366
false
false
false
IntersectAustralia/hcsvlab_robochef
hcsvlab_robochef/paradisec/rdf.py
1
1904
from hcsvlab_robochef.rdf.map import * PARADISEC = "PARADISEC" paradisecSpeakerMap = FieldMapper(AUSNC) paradisecSpeakerMap.add('name', mapto=FOAF.name) paradisecSpeakerMap.add('role', ignore=True) paradisecMap = MetadataMapper(PARADISEC, speakerMap=paradisecSpeakerMap, documentMap = get_generic_doc_mapper()) paradi...
gpl-3.0
-8,536,860,154,655,141,000
47.820513
112
0.798319
false
2.689266
false
true
false
indro/t2c
apps/external_apps/ajax_validation/views.py
2
1452
from django import forms from django.http import HttpResponse from django.views.decorators.http import require_POST from ajax_validation.utils import LazyEncoder def validate(request, *args, **kwargs): form_class = kwargs.pop('form_class') extra_args_func = kwargs.pop('callback', lambda request, *args, **kwar...
mit
6,643,868,920,188,275,000
38.243243
96
0.588154
false
3.978082
false
false
false
silentfuzzle/calibre
src/calibre/gui2/viewer/behavior_manager/behavior_manager_builder.py
1
6334
__license__ = 'GPL v3' __copyright__ = '2014, Emily Palmieri <silentfuzzle@gmail.com>' from calibre.gui2.viewer.behavior.adventurous_behavior import AdventurousBehavior from calibre.gui2.viewer.behavior.adventurous_base_behavior import BaseAdventurousBehavior from calibre.gui2.viewer.behavior.calibre_behavior impor...
gpl-3.0
4,841,253,666,804,379,000
50.495935
122
0.667193
false
4.150721
false
false
false
xianjunzhengbackup/code
data science/machine_learning_for_the_web/chapter_8/movie_reviews_analizer_app/webmining_server/pages/models.py
1
1215
from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ class SearchTerm(models.Model): term = models.CharField(_('search'), max_length=255) num_reviews = models.IntegerField(null=True,default=0) #display term on admin panel def __unico...
mit
3,143,095,247,785,500,000
42.428571
90
0.699588
false
3.820755
false
false
false
ganga-devs/ganga
ganga/GangaAtlas/Lib/Athena/ganga-stagein.py
1
4800
#! /usr/bin/env python import os, sys from getopt import getopt,GetoptError from threading import Thread from commands import getstatusoutput from lfc import * def usage(): print 'Name:' print ' ganga-stagein.py' print print 'Arguments:' print ' logical names' print print 'Option...
gpl-2.0
-5,774,584,406,186,113,000
23.870466
115
0.527083
false
3.521643
false
false
false
none-da/zeshare
debug_toolbar/panels/headers.py
1
1292
from django.template.loader import render_to_string from debug_toolbar.panels import DebugPanel class HeaderDebugPanel(DebugPanel): """ A panel to display HTTP headers. """ name = 'Header' has_content = True # List of headers we want to display header_filter = ( 'CONTENT_TYPE', ...
bsd-3-clause
-9,078,421,765,086,998,000
23.865385
83
0.557276
false
3.975385
false
false
false
elkingtonmcb/bcbio-nextgen
bcbio/variation/coverage_experimental.py
1
7319
import os import pandas as pd import subprocess from collections import Counter import numpy as np import math import pysam import pybedtools from bcbio.utils import (file_exists, tmpfile, chdir, splitext_plus, max_command_length, robust_partition_all) from bcbio.provenance import do from bcb...
mit
2,294,521,246,895,444,000
40.350282
118
0.515781
false
3.603644
false
false
false
tgquintela/TimeSeriesTools
TimeSeriesTools/TS_statistics/probabilitytools.py
1
2552
""" This module contains functions related with probability and complements the usual numpy or scipy tools. """ import numpy as np def compute_conditional_probs(probs, marginal_vars): """Function which computes the conditional probability from the joint probability. We have to inform about the dependant var...
mit
2,569,273,240,266,878,500
25.309278
79
0.635188
false
3.559275
false
false
false
sherzberg/python-beanstalk-api
beanstalk/api/base.py
1
1554
import requests import json class IncorrectSetupException(Exception): pass class BeanstalkAuth(object): _instance = None def __new__(cls, domain, username, password): if not cls._instance: cls._instance = object.__new__(cls) return cls._instance def __init__(self, doma...
gpl-3.0
2,693,403,016,679,041,000
27.254545
83
0.570785
false
3.944162
false
false
false
mehdisadeghi/saga-python
src/saga/adaptors/pbspro/pbsprojob.py
1
47635
__author__ = "Andre Merzky, Ole Weidner, Mark Santcroos" __copyright__ = "Copyright 2012-2015, The SAGA Project" __license__ = "MIT" """ PBSPro job adaptor implementation """ import threading import saga.url as surl import saga.utils.pty_shell as sups import saga.adaptors.base import saga.adaptors....
mit
4,840,097,012,143,292,000
36.156786
192
0.473454
false
3.959684
false
false
false
sentriz/steely
steely/plugins/limp.py
1
3205
import sys import limp import limp.errors import limp.environment COMMAND = 'limp' __author__ = 'byxor' GLOBAL_DEFINITIONS = {} def main(bot, author_id, source_code, thread_id, thread_type, **kwargs): def send(message): bot.sendMessage(str(message), thread_id=thread_id, thread...
gpl-3.0
194,483,731,133,469,540
28.953271
162
0.558502
false
3.801898
false
false
false
realestate-com-au/harpoon
harpoon/ship/network.py
1
1619
from docker.errors import APIError as DockerAPIError import logging import uuid log = logging.getLogger("harpoon.ship.network") class NetworkManager(object): def __init__(self, docker_api): self.networks = {} self.docker_api = docker_api def register(self, conf, container_name): if no...
mit
-949,235,595,282,341,400
35.795455
92
0.593576
false
4.23822
false
false
false
polyaxon/polyaxon
core/polyaxon/pql/builder.py
1
15832
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
-8,171,395,019,497,414,000
32.052192
99
0.600682
false
4.053251
false
false
false
rschnapka/bank-payment
account_banking/wizard/banking_transaction_wizard.py
1
19506
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # (C) 2011 - 2013 Therp BV (<http://therp.nl>). # (C) 2011 Smile (<http://smile.fr>). # All Rights Reserved # # This ...
agpl-3.0
-7,091,693,435,405,808,000
42.346667
79
0.501384
false
4.50485
false
false
false
gnome-prototypes-team/gnome-music
gnomemusic/query.py
1
42091
# Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com> # Copyright (c) 2013 Vadim Rutkovsky <roignac@gmail.com> # Copyright (c) 2013 Seif Lotfy <seif@lotfy.com> # Copyright (c) 2013 Guillaume Quintard <guillaume.quintard@gmail.com> # # GNOME Music is free software; you can redistribute it and/or modify # it under the...
gpl-2.0
4,295,170,475,370,668,500
30.133136
122
0.436625
false
4.380828
false
false
false
Yangqing/caffe2
caffe2/python/checkpoint.py
1
29797
# Copyright (c) 2016-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
7,775,444,930,955,179,000
38.571049
86
0.606202
false
4.39938
false
false
false
SeavantUUz/silence
tools.py
1
1952
#coding: utf-8 __all__ = ['covert','line_resize','parse','draw_line','draw_screen','move','draw_input','check_pos'] import locale import logging locale.setlocale(locale.LC_ALL,'') code = locale.getpreferredencoding() def covert(string,code): new_string = string.decode('utf-8') lenth = len(new_string) ret...
mit
707,597,869,600,511,700
23.098765
100
0.553279
false
3.2
false
false
false
rvianello/rdkit
rdkit/Chem/UnitTestQED.py
4
4498
from __future__ import print_function from collections import namedtuple import doctest import os.path import unittest from rdkit import Chem from rdkit import RDConfig from rdkit.Chem import QED doLong = False TestData = namedtuple('TestData', 'lineNo,smiles,mol,expected') dataNCI200 = os.path.join(RDConfig.RDCode...
bsd-3-clause
-2,996,229,248,481,166,000
34.417323
100
0.659627
false
3.219757
true
false
false