repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
pudo/krauler
krauler/mf.py
1
2609
import os import logging from lxml import html from dateutil.parser import parse import metafolder from krauler.threaded import ThreadedKrauler from krauler.signals import on_meta log = logging.getLogger(__name__) class MetaFolderKrauler(ThreadedKrauler): @property def metafolder(self): if not hasa...
mit
-4,767,756,229,546,484,000
30.433735
67
0.560368
false
andrewgiessel/folium
folium/utilities.py
1
19979
# -*- coding: utf-8 -*- """ Utilities ------- Utility module for Folium helper functions. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division import time import math import zlib import struct import json import base64 from jinja2 import Environment, Packa...
mit
-2,512,162,047,460,299,000
34.740608
101
0.516743
false
FDelporte/PiGameConsole
Main.py
1
5104
''' Created on 22/09/2017 @author: Frank Delporte ''' import thread import Tkinter as tk import tkFont import time from ButtonHandler import * from KeyReader import * from PongGui import * from SlideShow import * from ConsoleMenu import * from Legend import * try: import keyboard # pip install keyboard ...
apache-2.0
330,923,120,042,564,540
30.121951
116
0.508817
false
xiiicyw/Data-Wrangling-with-MongoDB
Lesson_4_Problem_Set/03-Updating_Schema/update.py
1
3482
#!/usr/bin/env python # -*- coding: utf-8 -*- """ In this problem set you work with another type of infobox data, audit it, clean it, come up with a data model, insert it into a MongoDB and then run some queries against your database. The set contains data about Arachnid class. The data is already in the database. Bu...
agpl-3.0
-41,363,206,728,056,340
32.815534
108
0.63297
false
jalavik/plotextractor
plotextractor/version.py
1
1233
# -*- coding: utf-8 -*- # # This file is part of plotextractor. # Copyright (C) 2015 CERN. # # plotextractor 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 optio...
gpl-2.0
-6,563,958,830,303,103,000
36.363636
76
0.751014
false
rogerscristo/BotFWD
env/lib/python3.6/site-packages/telegram/payment/labeledprice.py
1
1817
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as publish...
mit
3,730,019,111,044,197,400
40.255814
98
0.687947
false
yunhaowang/IDP-APA
utilities/py_idpapa_assign_sr.py
1
7753
#!/usr/bin/env python import sys,re,time,argparse from multiprocessing import cpu_count,Pool def main(args): # print >>sys.stdout, "Start analysis: " + time.strftime("%a,%d %b %Y %H:%M:%S") output_gpd = args.output iso_list = get_iso_info(args.isoform) p = Pool(processes=args.cpu) csize = 100 results = p.imap(fun...
apache-2.0
-6,389,944,135,169,664,000
43.815029
293
0.659229
false
CybOXProject/python-cybox
cybox/objects/win_prefetch_object.py
1
2182
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import entities from mixbox import fields import cybox.bindings.win_prefetch_object as win_prefetch_binding from cybox.objects.device_object import Device from cybox.objects.win_volume_object import Win...
bsd-3-clause
-1,243,254,732,700,253,700
40.961538
97
0.762603
false
django-erp/django-erp
djangoerp/core/tests/test_views.py
1
25937
#!/usr/bin/env python """This file is part of the django ERP project. 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 HOLD...
mit
-3,260,086,464,090,445,300
36.319424
111
0.576281
false
hoelsner/product-database
app/config/tests/test_config_views.py
1
21046
""" Test suite for the config.views module """ import pytest from html import escape from django.contrib.auth.models import AnonymousUser, User from django.contrib.messages.storage.fallback import FallbackStorage from django.core.cache import cache from django.core.exceptions import PermissionDenied from django.urls im...
mit
6,071,281,379,836,133,000
35.922807
109
0.654756
false
Hannimal/raspicar
ps3Controller/ps3joy.py
1
1520
#!/usr/bin/env python # coding: Latin-1 import sys import smbus import time bus = smbus.SMBus(1) address = 0x2a try: pipe = open('/dev/input/js0', 'r') print('/dev/input/js0 Available') except: print('/dev/input/js0 not Available') sys.exit(0) msg = [] position = [0,0,0,0] def StringToBytes(val): ...
unlicense
6,163,764,360,669,899,000
23.126984
59
0.483553
false
shouldmakemusic/yaas
controller/RedFrameController.py
1
3038
# Copyright (C) 2015 Manuel Hirschauer (manuel@hirschauer.net) # # 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...
gpl-2.0
-3,350,587,529,291,833,000
38.973684
108
0.634628
false
3dfxsoftware/cbss-addons
report_profit/wizard/wiz_trial_cost.py
1
3732
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved # Credits#######################################...
gpl-2.0
1,987,104,676,452,728,800
40.010989
79
0.55761
false
gannetson/sportschooldeopenlucht
apps/fund/migrations/0002_add_recurring_direct_debit_payment.py
1
17485
# -*- 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 'RecurringDirectDebitPayment' db.create_table(u'fund_recurringdirectdebitpayment', ( ...
bsd-3-clause
2,081,662,664,729,660,000
83.883495
196
0.561796
false
khosrow/metpx
sundew/lib/MasterConfigurator.py
1
10676
""" MetPX Copyright (C) 2004-2007 Environment Canada MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file named COPYING in the root of the source directory tree. """ """ ############################################################################################# # Name: MasterConfigurator.py # # Au...
gpl-2.0
-6,967,763,091,637,412,000
35.941176
133
0.569314
false
saicoco/mxnet_image_caption
old/main.py
1
6142
# -*- conding=utf-8 -*- """ train module """ import mxnet as mx import numpy as np import json import config import logging import time import collections from sym import vgg16_fc7, caption_module from data_provider import caption_dataIter, init_cnn from mxnet.model import save_checkpoint import argparse logging.basic...
mit
-3,475,309,289,568,188,000
38.371795
126
0.588733
false
gghezzo/prettypython
PythonEveryDay2015/bigballs.py
1
1044
# Teaching Python Classes by Peter Farrell # From http://hackingmathclass.blogspot.com/2015/08/finally-some-class.html # Typer: Ginny C Ghezzo # What I learned: # why doesn't the first import bring in locals ?? import pygame from pygame.locals import * black = (0,0,0) white = (255,255,255) green = (0,255, 0) ...
mit
98,853,344,471,153,950
24.487805
75
0.681992
false
panholt/sparkpy
sparkpy/models/webhook.py
1
2523
# -*- coding: utf-8 -*- from .base import SparkBase, SparkProperty from .time import SparkTime class SparkWebhook(SparkBase): ''' Cisco Spark Webhook Model :param session: SparkSession object :type session: `SparkSession` :param \**kwargs: All standard Spark API properties for a Webhook...
mit
2,799,580,334,978,640,400
41.05
79
0.479191
false
m3wolf/xanespy
xanespy/txmstore.py
1
21308
# -*- coding: utf-8 -*- # # Copyright © 2016 Mark Wolf # # This file is part of Xanespy. # # Xanespy 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 l...
gpl-3.0
6,021,047,221,681,861,000
36.980392
99
0.58056
false
chris48s/UK-Polling-Stations
polling_stations/apps/feedback/migrations/0001_initial.py
1
1210
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Feedback', fields=[ ...
bsd-3-clause
8,918,969,895,613,432,000
38.032258
124
0.567769
false
Abjad/abjad
abjad/obgc.py
1
30314
import typing from . import _iterate, mutate, typings from .attach import attach, detach from .bundle import LilyPondFormatBundle from .duration import Duration from .overrides import LilyPondLiteral, tweak from .parentage import Parentage from .pitch.sets import PitchSet from .score import Chord, Container, Note, Voi...
gpl-3.0
6,486,861,756,668,666,000
33.565564
84
0.377911
false
UB-info/estructura-datos
RafaelArqueroGimeno_S6/ABB_Rafael_Arquero_Gimeno.py
1
8132
import copy __author__ = "Rafael Arquero Gimeno" class Node(object): def __init__(self): self.data = [] self.left = None self.right = None def clear(self): """Empty Node""" self.data = [] self.left = None self.right = None def clearData(self): ...
mit
-3,202,886,532,054,247,400
30.280769
119
0.539843
false
msaadat/paper
password_dlg.py
1
2143
from PyQt5.QtWidgets import (QApplication, QMessageBox, QDialog, QGridLayout, QHBoxLayout, QLabel, QPushButton, QLineEdit) class PasswordDialog(QDialog): def __init__(self, parent=None): super(PasswordDialog, self).__init__(parent) self.password = None ...
gpl-3.0
-6,078,596,863,458,804,000
29.057971
77
0.569295
false
q2apro/graph-padowan
Install/MakeBuild.py
1
2210
# -*- coding: latin-1 -*- from ftplib import FTP from getpass import getpass from VersionInfo import CalcVersionInfo import os import sys import traceback import datetime import subprocess try: # Test that Graph can be started without some obscure dll files os.system("Graph.exe /regserver") # Sign Graph.exe ...
gpl-2.0
-7,936,042,453,462,303,000
34.645161
166
0.660633
false
ircah/cah-js
util/convert-csv.py
1
1612
#!/usr/bin/env python3 import re import json # turns out the dump function of the json5 module just calls the normal json module (╯°□°)╯︵ ┻━┻ INPUT = "cards-DevOpsAgainstHumanity.csv" META_NAME = "DevOps Against Humanity" DELIM = "," QUOTE = "\"" SKIPLINES = 2 def parse_csv(line): a = [] tmp = "" at_elem_start =...
mit
5,042,605,997,194,050,000
19.410256
108
0.600503
false
divio/askbot-devel
askbot/migrations/0041_add_field_comment_offensive_flag_count.py
1
26899
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Comment.offensive_flag_count' db.add_column(u'comment', 'offensive_flag_count', self.gf('django.db...
gpl-3.0
-8,386,394,080,592,694,000
85.770968
221
0.558868
false
dyomas/pyhrol
examples/example_0040.py
1
1889
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2013, 2014, Pyhrol, pyhrol@rambler.ru # GEO: N55.703431,E37.623324 .. N48.742359,E44.536997 # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistri...
bsd-3-clause
980,894,107,989,928,400
46.225
77
0.758602
false
miguelgrinberg/python-socketio
tests/common/test_pubsub_manager.py
1
13274
import functools import logging import unittest from unittest import mock import pytest from socketio import base_manager from socketio import pubsub_manager class TestPubSubManager(unittest.TestCase): def setUp(self): id = 0 def generate_id(): nonlocal id id += 1 ...
mit
408,921,371,623,106,050
33.035897
79
0.469715
false
enitram/mogli
tests/discover_python_tests.py
1
2430
######################################################################################################################## # mogli - molecular graph library # # ...
lgpl-3.0
-3,808,304,955,220,517,400
74.9375
120
0.286831
false
rschnapka/account-closing
account_cutoff_prepaid/account.py
1
6258
# -*- encoding: utf-8 -*- ############################################################################## # # Account Cut-off Prepaid module for OpenERP # Copyright (C) 2013 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
agpl-3.0
7,632,116,702,459,464,000
40.72
78
0.541067
false
botswana-harvard/getresults-receive
getresults_receive/tests/test_batch_item_form.py
1
4314
from django.utils import timezone from django.test.testcases import TransactionTestCase from getresults_patient.tests.factories import PatientFactory from getresults_patient.models import Patient from ..views import ReceiveView from ..forms import BatchItemForm from ..models import Batch, BatchItem class TestBatch...
gpl-2.0
3,324,138,970,762,723,300
34.360656
77
0.602689
false
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/hybrid_parallel_mp_clip_grad.py
1
1391
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
-7,350,561,299,220,626,000
33.775
74
0.698059
false
zsiciarz/django-pgallery
pgallery/admin.py
1
2105
""" Administration for photos and galleries. """ from django.contrib import admin from django.db.models import Count from django.utils.translation import ugettext_lazy as _ from .forms import PhotoForm from .models import Gallery, Photo class PhotoInline(admin.TabularInline): """ Administration for photos. ...
mit
6,763,024,374,916,542,000
25.3125
76
0.614252
false
dgketchum/satellite_image
sat_image/image.py
1
27285
# ============================================================================================= # Copyright 2017 dgketchum # # 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.apach...
apache-2.0
-1,773,811,191,002,346,000
34.419481
109
0.541011
false
crunchmail/munch-core
src/munch/apps/transactional/tests/test_policies.py
1
24699
from django.conf import settings from django.test import TestCase from django.utils import timezone from slimta.envelope import Envelope from slimta.relay import PermanentRelayError from slimta.queue import QueueError from faker import Factory as FakerFactory from munch.core.models import Category # from munch.core.u...
agpl-3.0
4,494,491,588,191,560,700
38.966019
78
0.570226
false
gchq/gaffer-tools
python-shell/src/example.py
1
26676
# # Copyright 2016-2019 Crown Copyright # # 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 i...
apache-2.0
-6,482,966,961,602,001,000
26.700935
252
0.458315
false
menegazzo/travispy
setup.py
2
1873
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = [] def ...
gpl-3.0
-5,545,387,666,978,756,000
29.704918
75
0.608649
false
tulikavijay/vms
vms/administrator/tests/test_report.py
1
16008
# third party from selenium import webdriver from selenium.common.exceptions import NoSuchElementException # Django from django.contrib.staticfiles.testing import LiveServerTestCase from django.db import IntegrityError # local Django from pom.locators.administratorReportPageLocators import * from pom.pages.administra...
gpl-2.0
6,484,563,254,342,688,000
37.760291
97
0.446777
false
uclouvain/osis_louvain
base/models/offer.py
1
2121
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
137,301,873,159,780,320
38.259259
91
0.649528
false
wakaru44/api_ab_test
abapi/main.py
1
1161
from flask import Flask, url_for, render_template, request, \ redirect, abort, session, g, flash, Markup import helpers from abapi.helpers import * from abapi import app @app.route('/event', defaults={"whatever": ""}) @app.route('/event/<path:whatever>') def event_listener(whatever): app.logger.info(whatever)...
gpl-3.0
5,941,074,207,892,447,000
29.552632
92
0.699397
false
Lemma1/MAC-POSTS
doc_builder/sphinx-contrib/traclinks/setup.py
2
1133
# -*- coding: utf-8 -*- from setuptools import setup, find_packages long_desc = ''' This package contains the traclinks Sphinx extension. .. add description here .. ''' requires = ['Sphinx>=0.6'] setup( name='traclinks', version='0.1', url='http://bitbucket.org/birkenfeld/sphinx-contrib'...
mit
-6,048,783,826,970,069,000
26.325
57
0.609003
false
Monsido/graphite-grafana
graphite/local_settings.py
1
8922
## Graphite local_settings.py # Edit this file to customize the default Graphite webapp settings # # Additional customizations to Django settings can be added to this file as well ##################################### # General Configuration # ##################################### # Set this to a long, random unique s...
apache-2.0
8,667,306,118,967,225,000
40.497674
116
0.703206
false
django-oscar/django-oscar-mws
oscar_mws/migrations/0002_auto__add_field_fulfillmentorderline_shipment__add_field_fulfillmentor.py
1
34713
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'FulfillmentOrderLine.shipment' db.add_column('oscar_mws_fulfillmentorderline', 'shipment', ...
bsd-3-clause
-6,517,976,486,046,583,000
85.568579
222
0.563046
false
stvstnfrd/edx-platform
pavelib/paver_tests/test_paver_get_quality_reports.py
1
1506
""" Tests to ensure only the report files we want are returned as part of run_quality. """ import unittest from mock import patch import pavelib.quality class TestGetReportFiles(unittest.TestCase): """ Ensure only the report files we want are returned as part of run_quality. """ @patch('os.walk')...
agpl-3.0
-206,932,454,560,561,900
30.375
91
0.543825
false
n3wb13/OpenNfrGui-5.0-1
lib/python/Components/VolumeControl.py
1
2495
from enigma import eDVBVolumecontrol, eTimer from Tools.Profile import profile from Screens.Volume import Volume from Screens.Mute import Mute from GlobalActions import globalActionMap from config import config, ConfigSubsection, ConfigInteger profile("VolumeControl") #TODO .. move this to a own .py file class VolumeC...
gpl-2.0
2,756,066,974,094,087,000
28.352941
82
0.748297
false
BrAwnyTime/RayTracer
Textures/makeScaledTex.py
1
1585
import numpy as np import time import tables import sys '''---------------------------------------------------------''' ''' Setup PyTables Files ''' '''---------------------------------------------------------''' scale = 2 originalName = "earthScaled8" scaledName = "earthScaled16" ...
mit
3,638,641,487,451,038,000
27.818182
110
0.557098
false
pattarapol-iamngamsup/projecteuler_python
problem_011.py
1
6237
""" Copyright 2012, July 31 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Largest product in a grid Problem 11 In the 20 X 20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 ...
gpl-3.0
6,276,150,481,619,951,000
40.141892
79
0.575758
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/operations/_available_delegations_operations.py
1
5366
# 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
7,378,669,600,206,450,000
44.863248
148
0.641446
false
semk/voldemort
voldemort/__init__.py
1
19088
# -*- coding: utf-8 -*- # # Voldemort: A static site generator using Jinja2 and Markdown templates # # @author: Sreejith K # Created On 19th Sep 2011 import os import sys import logging import datetime import shutil import urllib from optparse import OptionParser import BaseHTTPServer from SimpleHTTPServer import Sim...
apache-2.0
8,570,697,191,450,008,000
35.77842
103
0.508749
false
ThomasMcVay/MediaApp
MediaAppKnobs/KnobElements/FloatWidget.py
1
1798
#=============================================================================== # @Author: Madison Aster # @ModuleDescription: # @License: # MediaApp Library - Python Package framework for developing robust Media # Applications with Qt Library # Copyright (C) 2013 Madison Aster # ...
lgpl-2.1
156,117,284,344,290,800
41.902439
88
0.619577
false
ARM-software/astc-encoder
Test/astc_quality_test.py
1
3498
#!/usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 # ----------------------------------------------------------------------------- # Copyright 2021 Arm Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain ...
apache-2.0
-8,849,309,807,774,193,000
27.209677
98
0.540309
false
tensorflow/models
official/vision/image_classification/optimizer_factory.py
1
6894
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
6,286,244,039,494,606,000
36.879121
80
0.687554
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/cs/cspolicylabel_cspolicy_binding.py
1
9664
# # Copyright (c) 2008-2015 Citrix 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 l...
apache-2.0
3,208,087,756,175,860,700
28.735385
132
0.714714
false
gfetterman/bark
bark/tools/barkutils.py
1
12062
import os.path from glob import glob import bark import argparse from bark import stream import arrow from dateutil import tz import numpy import sys import subprocess def meta_attr(): p = argparse.ArgumentParser( description="Create/Modify a metadata attribute") p.add_argument("name", help="name of b...
gpl-2.0
-8,583,137,634,202,377,000
36.113846
82
0.570718
false
taosheng/jarvis
chatbot/src/socialEnBrain.py
1
2090
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import json import requests import re import random import time import sys import csv from genericKB import genericHandler from esHealth import esHealthHandler from wikiFinder import findWikiEn #from io import open import codecs #from pttChat import pttHandler #from wik...
apache-2.0
-2,871,116,191,798,822,400
26.142857
74
0.571292
false
jas14/khmer
scripts/extract-paired-reads.py
1
3488
#! /usr/bin/env python # # This script is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll.org # # pylint: disable=invalid-name,missing-docstring """ Split up pa...
bsd-3-clause
-76,326,370,296,495,920
31.296296
79
0.653956
false
pattisdr/osf.io
tests/test_registrations/base.py
1
2821
import copy import datetime as dt from django.utils import timezone from framework.auth import Auth from osf.utils import permissions from osf.models import RegistrationSchema from tests.base import OsfTestCase from osf_tests.factories import AuthUserFactory, ProjectFactory, DraftRegistrationFactory class Registra...
apache-2.0
575,793,879,495,920,960
34.708861
128
0.575328
false
CondensedOtters/PHYSIX_Utils
Projects/Moog_2016-2019/CO2/CO2_NN/analysis.py
1
9175
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 14 05:54:11 2020 @author: mathieumoog """ import cpmd import filexyz import numpy as np import matplotlib.pyplot as plt # MSMbuilder ( lacks CK validation ) from msmbuilder.msm import MarkovStateModel from msmbuilder.msm import BayesianMarkovStateM...
gpl-3.0
-8,227,085,920,944,906,000
35.7
153
0.637275
false
Ecogenomics/CheckM
checkm/plot/distributionPlots.py
1
2841
############################################################################### # # codingDensityPlots.py - Create a GC histogram and a delta-CD plot. # ############################################################################### # # #...
gpl-3.0
5,811,296,671,881,534,000
48.732143
101
0.529743
false
dotmpe/htcache
Protocol.py
1
18422
""" The Protocol object relays the client request, accumulates the server response data, and combines it with the cached. From there the Response object reads this to the client. """ import calendar, os, time, socket, re import Params, Runtime, Response, Resource, Rules import HTTP #from util import * import log ma...
gpl-3.0
-626,849,070,475,962,400
26.827795
87
0.660026
false
TakashiMatsuda/sag_svm
scaling.py
1
1287
#!/Users/takashi/.pyenv/shims/python import numpy as np import math def scaling(data): """ Scaling. Make x's average to 0, variance to 1 => CHANGED. Divide by normal deviation """ print("input:") print(data) scaled_data = np.zeros_like(data) """ average section """...
mit
-6,234,009,568,127,102,000
22.4
77
0.554002
false
andyneff/voxel-globe
voxel_globe/build_voxel_world/tasks.py
1
6207
from voxel_globe.common_tasks import shared_task, VipTask from celery.utils.log import get_task_logger logger = get_task_logger(__name__) import logging import os @shared_task(base=VipTask, bind=True) def run_build_voxel_model(self, image_collection_id, scene_id, bbox, skip_frames, cleanup...
mit
2,948,493,370,364,752,000
38.535032
83
0.544546
false
sunlightlabs/tcamp
tcamp/reg/forms.py
1
1825
from django import forms from localflavor.us.us_states import STATE_CHOICES from bootstrap_toolkit.widgets import BootstrapTextInput import datetime from reg.models import Sale, Ticket, AMBASSADOR_PROGRAM_CHOICES class SaleForm(forms.ModelForm): class Meta: model = Sale class TicketForm(forms.ModelForm):...
bsd-3-clause
5,021,559,516,469,790,000
48.351351
222
0.673973
false
ewheeler/vaxtrack
vaxapp/migrations/0018_auto__add_field_countrystockstats_days_of_stock_data.py
1
12586
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CountryStockStats.days_of_stock_data' db.add_column('vaxapp_countrystockstats', 'days_of_s...
bsd-3-clause
-6,147,009,584,548,764,000
78.658228
228
0.546719
false
OpenMOOC/moocng
moocng/api/urls.py
1
2050
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # 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...
apache-2.0
-2,709,888,307,165,766,000
39.196078
74
0.801463
false
georgekis/salary
main/control/pay.py
1
2523
from flask.ext import wtf import auth import flask import model import wtforms import util from main import app ############################################################################### # Create ############################################################################### class PayUpdateForm(wtf.Form): nam...
mit
1,797,666,842,330,151,400
30.148148
92
0.537852
false
postlund/pyatv
tests/scripts/script_env.py
1
4004
"""Simulated environment for functional script testing.""" from contextlib import contextmanager from importlib import import_module from io import StringIO import sys from unittest.mock import patch from aiohttp.test_utils import AioHTTPTestCase import pyatv from pyatv.const import Protocol from tests import fake_...
mit
2,771,662,040,255,258,600
31.290323
85
0.57992
false
goujonpa/jeankevin
modules/numberCoupleClass.py
1
2707
#!/usr/local/bin/python # -*-coding:Utf-8 -* from modules.individualClass import Individual import random class NumberCouple(Individual): """NumberCouple class: represent one couple of real individual, inherits from the Individual class Properties: key : standardized representation of the problem [[x1, ...
mit
-5,521,277,182,482,253,000
30.847059
102
0.574437
false
makerhanoi/tagio
tagio/views/api/__init__.py
1
1249
"""API.""" from flask import Blueprint, jsonify, request from tagio.models.user import User from tagio.extensions import csrf_protect from . import user __all__ = ('user',) blueprint = Blueprint('api', __name__, url_prefix='/api/v<string:version>') @blueprint.route('/l...
bsd-3-clause
8,983,722,349,411,378,000
23.98
63
0.610088
false
oryxr/dxf2gcode
Core/Config.py
1
14468
# -*- coding: utf-8 -*- ############################################################################ # # Copyright (C) 2009-2014 # Christian Kohlöffel # Jean-Paul Schouwstra # # This file is part of DXF2GCODE. # # DXF2GCODE is free software: you can redistribute it and/or modify # it under the terms of t...
gpl-3.0
5,142,544,186,670,711,000
34.545455
149
0.585609
false
EdDev/vdsm
tests/storage_check_test.py
1
15159
# # Copyright 2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
4,354,706,890,416,066,000
34.501171
79
0.606241
false
kushankr/approval_frame
approval_frame/urls.py
1
1127
from django.conf.urls import include, patterns, url from django.contrib import admin from approval_frame import views from views import CustomRegistrationView # autodiscover is required only for older versions of Django admin.autodiscover() urlpatterns = patterns( '', url(r'^approval_polls/', include('approv...
gpl-3.0
-25,690,787,189,746,730
48
100
0.723159
false
NeverDecaf/syncplay
syncplay/messages_de.py
1
38136
# coding:utf8 """Deutsch dictionary""" de = { "LANGUAGE": "Deutsch", # (German) # Client notifications "config-cleared-notification": "Einstellungen gelöscht. Änderungen werden gespeichert, wenn du eine gültige Konfiguration speicherst.", "relative-config-notification": "Relative Konfigurationsdate...
apache-2.0
4,713,580,255,525,210,000
74.086957
650
0.725799
false
beiko-lab/gengis
bin/Lib/site-packages/numpy/lib/arraysetops.py
1
12374
""" Set operations for 1D numeric arrays based on sorting. :Contains: ediff1d, unique, intersect1d, setxor1d, in1d, union1d, setdiff1d :Notes: For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues. Speed could be gained in...
gpl-3.0
5,377,771,176,711,761,000
26.843823
79
0.552772
false
seed2014/kraken
kraken-panel/panel/models.py
1
2573
from django.db import models from django.utils import timezone from datetime import timedelta # Create your models here. class Bot(models.Model): computer_name = models.CharField(max_length=100) system = models.CharField(max_length=100) node = models.CharField(max_length=100) release = models.CharField(max_len...
gpl-2.0
5,171,206,282,541,833,000
31.175
231
0.710455
false
ForestClaw/forestclaw
applications/geoclaw/tohoku/make_plots.py
1
11633
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ #-------------------------- def setplot(plotdata): #-------------------------- """ Specify what is to be plotted ...
bsd-2-clause
-9,101,027,784,213,857,000
32.621387
81
0.600963
false
better-dem/box_classify
specify_rect.py
1
2299
#!/usr/local/bin/python3.6 import tkinter as tk from tkinter import messagebox as mb from PIL import Image, ImageTk class SelectRegionApp(tk.Tk): def __init__(self, image_filename, image_resize, result): tk.Tk.__init__(self) self.result_dict = result self.x = self.y = 0 im = Image.o...
gpl-3.0
-4,937,644,953,297,175,000
32.808824
122
0.618965
false
Vykstorm/Othello
bots.py
1
3184
#!/usr/bin/python # -*- coding: iso8859-1 -*- # Autor: Víctor Ruiz Gómez # Descripción: Este script define distintos bots que son jugadores del # juego Othello. from game2 import Player from random import choice from minmax import MinMax, MinMaxAlphaBeta from othello import OthelloEval, OthelloEvalDiffPiezas, OthelloE...
mit
-6,708,081,805,361,755,000
28.915094
85
0.712709
false
vabs/outpost-public-api
eve/endpoints.py
1
3032
# -*- coding: utf-8 -*- """ eve.endpoints ~~~~~~~~~~~~~ This module implements the API endpoints. Each endpoint (resource, item, home) invokes the appropriate method handler, returning its response to the client, properly rendered. :copyright: (c) 2013 by Nicola Iarocci. :license: BSD, se...
gpl-2.0
-5,097,041,677,335,367,000
27.603774
79
0.620053
false
NetApp/manila
manila/tests/api/views/test_share_networks.py
1
8974
# Copyright (c) 2015 Mirantis, 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 requir...
apache-2.0
-7,470,150,884,323,348,000
40.546296
78
0.551036
false
googleapis/googleapis-gen
google/cloud/osconfig/agentendpoint/v1/osconfig-agentendpoint-v1-py/scripts/fixup_agentendpoint_v1_keywords.py
1
6593
#! /usr/bin/env python3 # -*- 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 requi...
apache-2.0
-4,318,478,684,794,081,000
35.425414
181
0.62263
false
SmartDeveloperHub/sdh-curator
sdh/curator/actions/ext/enrichment.py
1
10998
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
apache-2.0
7,141,783,065,942,430,000
37.725352
114
0.601655
false
Ziqi-Li/bknqgis
bokeh/bokeh/plotting/helpers.py
1
24268
from __future__ import absolute_import from collections import Iterable, OrderedDict, Sequence import difflib import itertools import re import textwrap import warnings import numpy as np import sys from six import string_types, reraise from ..models import ( BoxSelectTool, BoxZoomTool, CategoricalAxis, TapT...
gpl-2.0
-7,109,149,979,966,638,000
35.438438
145
0.618963
false
asajeffrey/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py
4
24283
from __future__ import absolute_import import json import os import socket import threading import time import traceback import uuid from six.moves.urllib.parse import urljoin from .base import (CallbackHandler, CrashtestExecutor, RefTestExecutor, RefTestImpleme...
mpl-2.0
4,533,225,023,122,860,000
38.873563
140
0.59692
false
google/makani
config/m600/control/hover_controllers.py
1
15735
# Copyright 2020 Makani Technologies LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-702,106,154,424,924,200
19.250965
74
0.398411
false
locationlabs/wolphin
wolphin/config.py
1
6869
from os.path import expanduser, abspath, exists, join import re from wolphin.exceptions import InvalidWolphinConfiguration class Configuration(object): """Configuration for any Wolphin project""" DEFAULT_REGION = 'us-west-1' DEFAULT_AMI_ID = 'ami-87712ac2' DEFAULT_INSTANCE_TYPE = 't1.micro' DEFA...
apache-2.0
-1,130,192,145,868,009,600
42.201258
99
0.595574
false
codeforamerica/typeseam
typeseam/form_filler/front.py
1
3914
from datetime import datetime, timezone from pytz import timezone as ptimezone import re import json import requests class Front: def __init__(self, token): self.headers = { 'Authorization': 'Bearer {}'.format(token), 'Accept': 'application/json' } self.event_types...
bsd-3-clause
1,931,358,864,134,680,600
26.180556
72
0.569239
false
pgodel/rdiff-backup
rdiff_backup/Globals.py
1
11031
# Copyright 2002 Ben Escoto # # This file is part of rdiff-backup. # # rdiff-backup is free software; you can redistribute it and/or modify # 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 version. # # rd...
gpl-2.0
-367,777,364,650,201,340
32.941538
79
0.741728
false
tensorflow/examples
tensorflow_examples/lite/model_maker/third_party/recommendation/ml/model/context_encoder_test.py
1
6092
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
apache-2.0
9,103,877,208,249,666,000
43.794118
121
0.682863
false
jtoppins/beaker
Client/src/bkr/client/commands/cmd_user_modify.py
1
2506
# 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 option) any later version. """ bkr user-modify: Modify Beaker users =============================...
gpl-2.0
2,265,340,603,310,640,000
24.06
85
0.638867
false
lanhel/viperaccept
setup.py
1
1637
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- #---------------------------------------------------------------------------- """HTTP content negotiation application.""" __author__ = ('Lance Finn Helsten',) __version__ = '0.0' __copyright__ = """Copyright (C) 2014 Lance Finn Helsten""" __license__ = """ Licensed und...
apache-2.0
-5,658,288,544,415,330,000
31.098039
77
0.609041
false
FlorisHoogenboom/sklearn-helpers
tests/test_preprocessing.py
1
3095
import unittest import numpy as np import pandas as pd from sklearn_helpers.preprocessing import \ EnhancedLabelEncoder, MultiColumnLabelEncoder class EnhancedLabelEncoderTest(unittest.TestCase): def test_accepts_only_1d(self): """It should only accept only a 1d array""" ehe = EnhancedLabelEnc...
mit
4,735,568,165,528,348,000
26.149123
86
0.519871
false
jkibele/benthic_photo_survey
bps_package/ui_pref_help.py
1
1950
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pref_help.ui' # # Created: Sun Mar 8 18:17:55 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
bsd-3-clause
8,490,062,574,565,492,000
39.625
109
0.726667
false
zabracks/sshuttle
src/server.py
1
10287
import re import struct import socket import traceback import time import sys import os if not globals().get('skip_imports'): import ssnet import helpers import hostwatch import compat.ssubprocess as ssubprocess from ssnet import Handler, Proxy, Mux, MuxWrapper from helpers import log, debug1, d...
lgpl-2.1
-5,990,303,340,717,896,000
29.707463
77
0.521532
false
Neopallium/mailinabox
management/backup.py
1
17961
#!/usr/bin/python3 # This script performs a backup of all user data: # 1) System services are stopped. # 2) An incremental encrypted backup is made using duplicity. # 3) The stopped services are restarted. # 4) STORAGE_ROOT/backup/after-backup is executd if it exists. import os, os.path, shutil, glob, re, datetime, s...
cc0-1.0
5,556,783,706,832,090,000
34.636905
146
0.691832
false
crazyskateface/LC
chat/admin.py
1
1664
from django.contrib import admin from chat.models import UserProfile, Comments, Roll, Emblem from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User # Register your models here. class UserProfileAdmin(admin.StackedInline): ...
mit
-309,975,475,201,732,700
28.714286
94
0.709135
false
g-goessel/mathdoku_solve
fonctions.py
1
4674
""" fonctions """ from itertools import permutations, product from functools import reduce import numpy as np def combi_possibles(val_tot,nbr_cases,nbr_max): """ retourne la liste des combinaisons possibles """ #test si la valeur est certaine if nbr_cases==1: return [(val_t...
mpl-2.0
-8,464,025,482,168,778,000
34.124031
140
0.574893
false
Shawnxkwang/CS0008-f2016
f2016_cs8_xiw69_a1/f2016_cs8_xiw69_a1.py
1
2622
# Xiaokai Wang # xiw69@pitt.edu # CS 0008 # assignmnet #1 # ask the user to input preferred unit system/ distance driven/ gas usage choice = input("Please enter your preferred unit system (USC/Metric): ") dist = float(input("Please input your distance driven: ")) gas = float(input("Please input your gas usage during...
mit
-1,917,226,436,211,530,000
29.137931
126
0.569794
false
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/conda/core/portability.py
1
7021
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from logging import getLogger from os.path import realpath import re import struct from ..base.constants import PREFIX_PLACEHOLDER from ..common.compat import on_win from ..exceptions import CondaIOError, Binary...
apache-2.0
-6,387,582,113,646,030,000
41.041916
172
0.64478
false
sudhaMR/Django-Perception
imgpage/urls.py
1
1204
"""perception URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
mit
2,675,888,157,375,171,000
45.307692
109
0.689369
false