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
I-sektionen/i-portalen
wsgi/iportalen_django/exchange_portal/models.py
1
6767
__author__ = 'Magnus Forzelius & Jesper Lehtonen' from django.db import models from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from utils.validators import liu_id_validator from tags.models import Tag import os import datetime class...
mit
4,308,718,308,841,344,500
30.976077
142
0.634595
false
citrix-openstack-build/neutron
neutron/plugins/ml2/rpc.py
1
9476
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
-6,509,788,417,810,741,000
42.269406
79
0.550232
false
eXma/meet-and-eat-registration-system
src/cfg/__init__.py
1
2351
import os from contextlib import contextmanager import yaml import locale from datetime import datetime __author__ = 'jan' def parse_cfg_date(cfg_date): return datetime.strptime(cfg_date, "%Y-%m-%d %H:%M") @contextmanager def _fix_locale(prefix): oldloc = locale.getlocale(locale.LC_TIME) if not oldloc...
bsd-3-clause
-6,858,246,530,555,979,000
23.237113
91
0.560613
false
DarthMaulware/EquationGroupLeaks
Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/bin/fg.py
1
23049
#!/usr/local/bin/python # VER=2.0.0.2 # 09 FEB 2012 """ fg UTILITIES requires: + winscp for win32 + pexpect 2.3 on linux """ import re, sys, time, os, getpass, string, traceback from os import popen from optparse import OptionParser from subprocess import * try: import pexpect except: pass class fg: def __i...
unlicense
1,231,811,236,877,711,400
35.412322
372
0.613302
false
lioupayphone/gdeploy
gdeployfeatures/volume/volume.py
1
12197
""" Add functions corresponding to each of the actions in the json file. The function should be named as follows <feature name>_<action_name> """ from gdeploylib import defaults, Helpers, Global, YamlWriter import os, re from os.path import basename from collections import defaultdict helpers = Helpers() writers = Yam...
gpl-2.0
-1,763,972,171,218,459,100
37.720635
81
0.618185
false
abdulhaq-e/django-rest-framework-json-api
example/tests/unit/test_renderers.py
1
1308
# from example.models import Entry, Comment # from rest_framework_json_api import serializers, views # from rest_framework_json_api.renderers import JSONRenderer # # # # serializers # class RelatedModelSerializer(serializers.ModelSerializer): # class Meta: # model = Comment # fields = ('id',) # #...
bsd-2-clause
7,519,365,847,582,278,000
28.066667
82
0.655963
false
LCBRU/reporter
reporter/uol_redcap_reports/limb/demographics_data_quality.py
1
2538
#!/usr/bin/env python3 import re from reporter.connections import RedcapInstance from reporter.emailing import ( RECIPIENT_LIMB_ADMIN as RECIPIENT_ADMIN, RECIPIENT_LIMB_MANAGER as RECIPIENT_MANAGER, ) from reporter.application_abstract_reports.redcap.data_quality import ( RedcapFieldMatchesRegular...
mit
9,036,729,170,423,756,000
30.538462
81
0.6316
false
kyleellefsen/Glams
Glams/glams/glamsTemplate.py
1
3083
# encoding: utf-8 def glamsTemplate(article, username=None, resources='', rightbar=''): '''Wraps an article string in the html template''' if username: userLogin="""<a href="/home">""" + username +"""</a>""" else: userLogin="""<a href="/home/login/">Login</a>""" webpage="""<!DOCTYPE HTM...
mit
-3,873,556,045,646,859,300
54.035714
214
0.49416
false
yolanother/ubuntumobidev_ubiquity
ubiquity/components/yabootinstaller.py
1
1335
# -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*- # Copyright (C) 2006 Canonical Ltd. # Written by Colin Watson <cjwatson@ubuntu.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 Soft...
gpl-3.0
-2,899,282,235,284,080,600
42.064516
76
0.716854
false
knarfeh/HiaBlog
app/main/signals.py
1
1539
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from flask import request, current_app from blinker import Namespace from . import models, ext from app.hia.config import HiaBlogSettings hiablog_signals = Namespace() post_visited = hiablog_signals.signal('post-visited') post_published = hiablog_signals.signal('post-pu...
gpl-2.0
-2,330,866,395,023,611,400
28.596154
73
0.693957
false
timy/dm_spec
pkg/pymod_data.py
1
11796
import numpy as np def readDirIndex(fileName): import json fileDir = open(fileName) idxDir = json.load(fileDir)['order'] fileDir.close() order = ['1', '3', '5'] idxStart = [0, 6, 44] return order, idxDir, idxStart def calcAmplitude(fileNameFunc, nt, nCoo, iDir): s = np.zeros(nt) fo...
mit
5,346,539,297,204,704,000
35.63354
86
0.508562
false
oscurart/BlenderAddons
old/oscurart_resize_resolution.py
1
1753
# Compensa el tamanio de imagen al modificar el lente de la camara. bl_info = { "name": "Resize Render Resolution", "author": "Oscurart", "version": (1, 0), "blender": (2, 66, 0), "location": "Search > Resize Resolution by Camera Angle", "description": "Resize render dimension by camera angle....
gpl-2.0
4,949,207,930,317,479,000
27.274194
104
0.661723
false
BjornFJohansson/molbio-test-generator
exam_generator.py
1
3576
#!/usr/bin/env python # -*- coding: utf-8 -*- make_only_first_exam = False encrypt_exam = True import time import string import re #import py7zlib import subprocess import os import shelve import shutil from bio_info_questions import * from exam_settings import * import ParseStudentList mecs, names = Par...
bsd-2-clause
3,588,146,955,561,264,000
31.509091
133
0.598993
false
JohnVinyard/zounds
zounds/learn/test_random_samples.py
1
8672
import unittest2 from .random_samples import \ ReservoirSampler, Reservoir, MultiplexedReservoir from zounds.timeseries import TimeDimension, Seconds from zounds.spectral import FrequencyDimension, FrequencyBand, LinearScale from zounds.core import ArrayWithUnits, IdentityDimension import numpy as np class TestRe...
mit
-2,302,916,460,329,528,000
36.541126
78
0.624654
false
eads/deck-blueprint
blueprint.py
1
5367
# -*- coding: utf-8 -*- import codecs import getpass import json import os import requests import shutil from clint.textui import colored, puts from cssmin import cssmin from flask import g, Blueprint from jinja2 import Markup from slimit import minify from smartypants import smartypants from tarbell.hooks import regi...
mit
422,399,089,869,528,400
27.854839
124
0.617477
false
inTagger/UpdateDDNS
DNSPod/DNSPodAPI.py
1
3202
__author__ = 'Alexander Logger' from string import Template import requests import json import logging base_url = 'https://www.dnspod.com/api' get_records_url_tpl = Template(base_url + '/records/$domain') modify_record_url_tpl = Template(base_url + '/records/$domain/$record_id') get_auth_token_url_tpl = Template(base...
mit
-6,272,639,740,326,752,000
36.682353
108
0.590881
false
jtucker1972/XBMC-TVTime
resources/lib/Overlay.py
1
68585
# Copyright (C) 2011 James A. Tucker # # # This file is part of TV Time. # # TV Time 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. ...
gpl-3.0
426,476,372,236,932,100
43.739074
240
0.563534
false
maxpinto/Ptz
bootcamp/auth/forms.py
1
3750
from django import forms from django.core.exceptions import ValidationError from django.contrib.auth.models import User from bootcamp.settings import ALLOWED_SIGNUP_DOMAINS def Validardominio(value): if '*' not in ALLOWED_SIGNUP_DOMAINS: try: dominio = value[value.index("@"):] if do...
mit
6,717,397,107,873,970,000
51.097222
180
0.652267
false
tensor-tang/Paddle
python/paddle/fluid/contrib/slim/tests/test_quantization_mkldnn_pass.py
1
7637
# copyright (c) 2019 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 app...
apache-2.0
-3,937,644,403,507,950,000
38.164103
94
0.584785
false
hiromu2000/zaim
tests/test_api.py
1
2458
# coding: utf-8 import os import unittest import zaim class TestApi(unittest.TestCase): def setUp(self): consumer_key = os.environ.get("ZAIM_CONSUMER_KEY", "") consumer_secret = os.environ.get("ZAIM_CONSUMER_SECRET", "") access_token = os.environ.get("ZAIM_ACCESS_TOKEN", "") access_...
mit
5,947,318,330,705,038,000
32.216216
93
0.566721
false
ryankynor/Hello-friend
hellofriend.py
1
1070
""" hellofriend.py Author: Ryan Kynor Credit: http://stackoverflow.com/questions/19664840/typeerror-cant-convert-float-object-to-str-implicitly Milo Assignment: Write and submit an interactive Python program that asks for the user's name and age, then prints how much older Python is than the user (based on a simple ...
mit
-7,764,921,810,251,109,000
33.548387
97
0.729907
false
satoken/centroid-rna-package
python/test.py
1
1094
#!/usr/bin/env python import CentroidFold cf = CentroidFold.CentroidFold(CentroidFold.CentroidFold.CONTRAFOLD) cf.calculate_posterior("GGGCCCAUAGCUCAGUGGUAGAGUGCCUCCUUUGCAAGGAGGAUGCCCUGGGUUCGAAUCCCAGUGGGUCCA") ea,s=cf.decode_structure(4) print s,ea aln = [ "-----GCUA-AUAUCGCUGUGGAAACACCUGGAACCAUCCCGAACCCAGC-AGUU...
gpl-2.0
-5,224,095,943,890,627,000
36.724138
115
0.80713
false
tompecina/legal
legal/hjp/urls.py
1
1385
# -*- coding: utf-8 -*- # # hjp/urls.py # # Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz> # # This file is part of legal.pecina.cz, a web-based toolbox for lawyers. # # This application is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published b...
gpl-3.0
-6,588,313,614,671,599,000
33.525
72
0.692976
false
dsalazarr/pfc_ii
pfc/pfc/applications/models.py
1
2347
from __future__ import unicode_literals from django.db import models from django.conf import settings from oauth2_provider.models import Application as ApplicationModel, AccessToken as AccessTokenModel from pfc.users.models import Company, User class ApplicationConfig(models.Model): id = models.AutoField(primar...
gpl-3.0
-8,329,098,107,580,959,000
27.621951
99
0.683852
false
larlequin/CleanMyBib
CleanMyBib/CleanMyBib_Qt.py
1
12400
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, os import platform import re import csv from PyQt4 import QtGui from PyQt4 import QtCore from CleanMyBib import CleanFileBib from pybtex.database.input import bibtex __version__ = "4.0.0" # Allow to read the picture files in pyinstaller datadir = ".img" if not h...
gpl-3.0
7,906,700,085,643,785,000
37.509317
95
0.575081
false
KhronosGroup/COLLADA-CTS
Core/Gui/Dialog/FOpenDialog.py
1
6196
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis...
mit
-3,829,923,993,941,251,600
40.864865
466
0.598612
false
deepmind/distrax
distrax/_src/bijectors/tfp_compatible_bijector.py
1
7577
# Copyright 2021 DeepMind Technologies Limited. 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 ...
apache-2.0
1,191,359,019,594,068,500
41.567416
80
0.674145
false
uwosh/uwosh.dropcard
uwosh/dropcard/__init__.py
1
2069
"""Main product initializer """ from zope.i18nmessageid import MessageFactory from uwosh.dropcard import config from Products.Archetypes import atapi from Products.CMFCore import utils # Define a message factory for when this product is internationalised. # This will be imported with the special name "_" in most mod...
gpl-2.0
-6,773,124,266,639,195,000
40.38
78
0.727888
false
all-of-us/raw-data-repository
tests/api_tests/test_physical_measurements_api.py
1
26317
import datetime import http.client import json from rdr_service import main from rdr_service.clock import FakeClock from rdr_service.dao.participant_dao import ParticipantDao from rdr_service.dao.physical_measurements_dao import PhysicalMeasurementsDao from rdr_service.model.measurements import Measurement from rdr_se...
bsd-3-clause
-5,143,977,278,125,152,000
46.418018
121
0.620473
false
edf-hpc/hpcstats
HPCStats/Model/Cluster.py
1
6981
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2015 EDF SA # Contact: # CCN - HPC <dsp-cspit-ccn-hpc@edf.fr> # 1, Avenue du General de Gaulle # 92140 Clamart # # Authors: CCN - HPC <dsp-cspit-ccn-hpc@edf.fr> # # This file is part of HPCStats. # # HPCStats is free software: you can re...
gpl-2.0
-7,844,108,807,252,249,000
32.085308
79
0.545481
false
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/tools/rosgraph/test/test_names.py
2
11745
# Software License Agreement (BSD License) # # Copyright (c) 2009, 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
-3,297,891,609,819,803,000
34.917431
119
0.536569
false
airanmehr/bio
Scripts/Plasmodium/Data.py
1
7725
''' Copyleft Oct 10, 2015 Arya Iranmehr, PhD Student, Bafna's Lab, UC San Diego, Email: airanmehr@gmail.com ''' import numpy as np import pandas as pd import os,sys;home=os.path.expanduser('~') +'/' class Data: @staticmethod def read(param): """ data is sorted first by Chrom and then POS i...
mit
6,538,085,675,037,243,000
41.445055
401
0.574369
false
franklinsales/udacity-data-analyst-nanodegree
project3/class-works/data-wrangling/data-extract-fundamentals/set_problem_2013_ERCOT_Hourly_Load_Data_corrected.py
1
3217
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Mar 15 18:05:20 2017 @author: franklin """ #!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Mar 15 13:30:33 2017 @author: franklin """ ''' Find the time and value of max load for each of the regions COAST, EAST, FAR_WEST, NORTH, NORT...
mit
2,643,257,169,679,058,000
27.723214
80
0.539322
false
kivy/pyjnius
tests/test_collections.py
1
1439
from __future__ import absolute_import import unittest from jnius import autoclass, protocol_map class TestCollections(unittest.TestCase): def test_hashset(self): hset = autoclass('java.util.HashSet')() data = {1,2} # add is in both Python and Java for k in data: hset....
mit
6,931,873,810,327,857,000
26.673077
47
0.502432
false
Azure/azure-sdk-for-python
sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py
1
6308
# 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
1,538,860,436,925,158,100
48.28125
191
0.64331
false
fyookball/electrum
plugins/shuffle_deprecated/crypto.py
1
3181
import ecdsa from ecdsa.util import number_to_string, string_to_number from electroncash.bitcoin import (generator_secp256k1, point_to_ser, EC_KEY, Hash, InvalidPassword) class CryptoError(Exception): ''' base class of a subset of the possible exceptions raised in this class ...
mit
2,820,235,096,471,262,700
39.782051
140
0.647281
false
hombit/scientific_python
scientific_python/e_testing/unittests.py
1
1042
#!/usr/bin/env python3 from __future__ import print_function, division, unicode_literals import unittest def is_even(n): if int(n) != n: raise ValueError('Argument should be integer') return n % 2 == 0 class IsEvenTestCase(unittest.TestCase): def test_even(self): self.assertTrue(is_eve...
mit
4,173,808,645,998,390,000
25.717949
76
0.610365
false
goett/TRPS
Tools/CrystalCalculator/slownessZnSe.py
1
2953
import math import numpy as np import continuum as dyn from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import cm #plt.rcParams['image.cmap'] = 'viridis'; numt = 161; nump = 321; t = np.linspace(0,math.pi,numt) p = np.linspace(0,math.pi*2.0,nump) print(t) print(p) pm,tm = np...
mit
339,710,894,652,596,600
29.132653
85
0.655943
false
Nikolas1814/HackTues
webServer/all/views.py
1
2898
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.template.loader import get_template from django.template import Context from django.http import StreamingHttpResponse from django.http import HttpResponseRedirect import datetime from django.db.models import Q import o...
mit
-6,916,202,942,270,189,000
45.015873
149
0.730504
false
olatoft/reverse-hangman
Main.py
1
2693
import Words def get_word_length(): word_length = 0 while word_length == 0: try: word_length = int(input('Kor mange bokstavar er det i ordet?\n')) except: print('Du må skrive inn eit tal. Prøv igjen.\n') return word_length def get_if_letter_in_word(letter): an...
gpl-3.0
4,939,119,348,872,317,000
32.123457
83
0.513231
false
cheral/orange3
Orange/canvas/gui/tests/test_toolbox.py
6
1419
""" Tests for ToolBox widget. """ from .. import test from .. import toolbox from AnyQt.QtWidgets import QLabel, QListView, QSpinBox, QAbstractButton from AnyQt.QtGui import QIcon class TestToolBox(test.QAppTestCase): def test_tool_box(self): w = toolbox.ToolBox() style = self.app.style() ...
bsd-2-clause
4,222,601,053,344,378,400
25.277778
72
0.564482
false
CeON/avroknife
avroknife/test/command_line_runner.py
1
8137
# Copyright 2013-2015 University of Warsaw # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
9,083,836,292,020,347,000
38.5
85
0.598501
false
bostonlink/pamalt
pamalt/transforms/log_queries.py
1
5494
#!/usr/bin/env python # Copyright (C) 2012 pamalt Developer. # This file is part of pamalt - https://github.com/bostonlink/pamalt # See the file 'LICENSE' for copying permission. # PaloAlto Log query Maltego transforms module # Author: David Bressler (@bostonlink) import urllib, urllib2 import time, sys import xml.et...
gpl-3.0
-3,957,049,368,385,212,400
34.681818
89
0.568074
false
jolyonb/edx-platform
cms/urls.py
1
14472
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib.admin import autodiscover as django_autodiscover from django.utils.translation import ugettext_lazy as _ from rest_framework_swagger.views import get_swagger_view import contentstor...
agpl-3.0
-4,871,503,868,721,324,000
52.010989
119
0.697208
false
Bouke/django-user-sessions
user_sessions/management/commands/migratesessions.py
1
2472
# -*- coding: UTF-8 -*- import importlib import logging from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from user_sessions.models import Session as UserSession logger = logging.getLogger(__name__) def get_model_class(full_model_name): try: old_model_pa...
mit
-1,303,204,494,783,075,600
38.870968
97
0.619741
false
rjungbeck/rasterizer
servicebase.py
1
3168
import argparse import json import multiprocessing import os import logging import win32api import win32service import win32serviceutil cmdline_style="pywin32" logger=logging.getLogger("servicebase") class ServiceBase(win32serviceutil.ServiceFramework): _svc_name_ = "RsjService" _svc_display_name_...
agpl-3.0
4,275,224,004,615,823,400
27.886792
130
0.703598
false
beeftornado/sentry
tests/sentry_plugins/victorops/test_plugin.py
2
3778
from __future__ import absolute_import import responses from exam import fixture from sentry.models import Rule from sentry.plugins.base import Notification from sentry.testutils import PluginTestCase from sentry.utils import json from sentry_plugins.victorops.plugin import VictorOpsPlugin SUCCESS = """{ "result"...
bsd-3-clause
8,218,235,582,282,228,000
33.66055
236
0.567761
false
cdegroc/scikit-learn
examples/covariance/plot_outlier_detection.py
2
3882
""" ========================================== Outlier detection with several methods. ========================================== This example illustrates two ways of performing :ref:`outlier_detection` when the amount of contamination is known: - based on a robust estimator of covariance, which is assuming that the ...
bsd-3-clause
-2,521,126,800,319,898,000
37.82
79
0.62983
false
bgewehr/RPiMower
sens_groundCam.py
1
1775
#!/usr/bin/python __author__ = 'mp911de' import time import os,sys import picamera import picamera.array import time import numpy as np import lib_mqtt as MQTT from math import sqrt, atan2, degrees DEBUG = False def get_colour_name(rgb): rgb = rgb / 255 alpha = (2 * rgb[0] - rgb[1] - rgb [2])/2 beta =...
gpl-2.0
3,489,056,492,993,856,500
26.307692
137
0.522817
false
pcampese/codewars
next_bigger3.py
1
1877
# https://www.codewars.com/kata/next-bigger-number-with-the-same-digits/train/python def next_bigger(n): import itertools # Print the arguments print('n = {}'.format(n)) # Define default result as -1 result = -1 # Convert the number to a list of digits numbers = [int(d) for d in str(n)] print('numbers = {}'...
gpl-3.0
-2,691,056,460,727,516,700
25.083333
84
0.67821
false
IATI/CSV2IATI-backend
csviati/codes.py
1
4999
crs_country = { '130': ('DZ', 'Algeria'), '133': ('LY', 'Libya'), '136': ('MA', 'Morocco'), '139': ('TN', 'Tunisia'), '142': ('EG', 'Egypt'), '218': ('ZA', 'South Africa'), '225': ('AO', 'Angola'), '227': ('BW', 'Botswana'), '228': ('BI', 'Burundi'), '229': ('CM', 'Cameroon'), '230': ('CV', 'Cape Verde'), '...
mit
-8,177,016,022,128,188,000
27.565714
51
0.481896
false
pytroll/pytroll-schedule
trollsched/spherical.py
1
11055
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013, 2014, 2015, 2018 Martin Raspaud # Author(s): # Martin Raspaud <martin.raspaud@smhi.se> # 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 Softwa...
gpl-3.0
8,368,029,202,223,411,000
28.717742
81
0.520669
false
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/keras/preprocessing/image.py
1
7684
from __future__ import absolute_import import numpy as np import re from scipy import ndimage from scipy import linalg from os import listdir from os.path import isfile, join import random, math from six.moves import range ''' Fairly basic set of tools for realtime data augmentation on image data. Can easily...
gpl-2.0
4,823,282,614,734,855,000
30.235772
120
0.560776
false
thomas-pegot/gpumeanshift
test.py
1
1067
from gpumeanshift import filter import unittest import numpy as np import cv2 from cv2.cv import PyrMeanShiftFiltering class TestGPUMeanShiftFilter(unittest.TestCase): def test_emptyNDArray(self): empty_array = np.array([], dtype = np.uint8) self.assertRaises(TypeError, filter, *[empty_array, 12, 12]) def test...
unlicense
-6,187,523,808,740,400,000
34.566667
89
0.700094
false
crosenth/csvpandas
csvpandas/subcommands/sample.py
1
2063
# This file is part of csvpandas # # csvpandas 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. # # csvpandas is distribu...
gpl-3.0
-6,485,512,836,406,878,000
27.260274
73
0.636452
false
arpitprogressive/arpittest
pursuite/settings/staging.py
1
2573
# -*- coding: utf-8 -*- """ Setting for production env :copyright: (c) 2013 by Openlabs Technologies & Consulting (P) Limited :license: see LICENSE for more details. """ #Flake8: noqa from common import * STATIC_ROOT = '/opt/pursuite/www/static' MEDIA_ROOT = '/opt/pursuite/www/media' ALLOWED_HOSTS = ['pur...
bsd-3-clause
-8,043,136,736,176,889,000
28.238636
74
0.643218
false
wkarmistead/InvestmentAnalysisDashboard
pyBackend/businessLayer/ValueScoreObject.py
1
1740
''' Created on Apr 5, 2014 @author: Walker Armistead ''' class ValueScoreObject(object): _intrinsicValueToSharePrice = 0 _pe_ratio = 0 _peg = 0 _currentPrice = 0 _debtToEquityRatio = 0 _currentAssets = 0 _currentLiabilities = 0 _dividendYield = 0 _earningsGrowth = 0 d...
gpl-2.0
-3,799,703,472,309,803,000
20.493827
47
0.597126
false
Frodox/buildbot
master/buildbot/test/unit/test_steps_shell.py
1
41551
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
6,412,873,024,448,098,000
38.952885
147
0.550047
false
jptomo/rpython-lang-scheme
rpython/jit/backend/x86/test/test_runner.py
1
25702
import py from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr from rpython.jit.metainterp.history import ResOperation, TargetToken,\ JitCellToken from rpython.jit.metainterp.history import (ConstInt, ConstPtr, Const, BasicFailDescr, BasicFinalDescr) from...
mit
-5,869,284,651,135,382,000
42.636672
110
0.509221
false
dequis/qtile
docs/conf.py
1
9459
# -*- coding: utf-8 -*- # # Qtile documentation build configuration file, created by # sphinx-quickstart on Sat Feb 11 15:20:21 2012. # # 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 # autogenerated file. # # All c...
mit
5,405,494,409,025,351,000
29.61165
86
0.693625
false
bolkedebruin/airflow
airflow/providers/amazon/aws/operators/datasync.py
1
16833
# 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 not u...
apache-2.0
2,900,169,435,753,842,000
42.608808
104
0.641775
false
mivanov/editkit
editkit/ckeditor/tests/tests.py
1
6356
# coding=utf-8 import os from django.test import TestCase from django.db import models from django.core import exceptions from ckeditor.models import XHTMLField from ckeditor.models import XMLField from ckeditor.models import HTML5Field from ckeditor.models import HTML5FragmentField from ckeditor.widgets import CKEd...
gpl-2.0
8,648,883,103,976,645,000
35.045455
79
0.54918
false
uannight/reposan
plugin.video.tvalacarta/channels/vuittv.py
1
7934
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Canal para 8TV # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ import re import sys import os import traceback import urllib2 from core ...
gpl-2.0
5,244,642,386,767,732,000
45.274854
238
0.573739
false
almc/nao_basic
scripts/greedy_rrt.py
1
8935
#!/usr/bin/env python import numpy as np import sys, random, math, pygame from pygame.locals import * from math import sqrt,cos,sin,atan2 # constants DIM, DIM_X, DIM_Y = 2, 640, 480 # range 0 to 640, and 0 to 480 WINSIZE = [DIM_X, DIM_Y] # could be any range for each var # parameters NUMNODES = 2000 D...
gpl-2.0
-7,462,432,645,537,458,000
33.498069
97
0.566536
false
wzhfy/spark
python/pyspark/sql/tests/test_pandas_udf_grouped_agg.py
1
20739
# # 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 not us...
apache-2.0
-4,292,672,378,173,092,400
38.882692
98
0.538695
false
prateeksan/python-design-patterns
behavioural/chain_of_responsibility.py
1
3358
""" The Chain of Responsibility Pattern Notes: The Chain of Responsibility pattern allows the client programmer to dynamically create a recursive chain of objects - each of which tries to fulfill a 'responsibility' (usually represented by a method call). If an object in the chain is unable to fulfill it, the request ...
mit
-5,352,763,461,890,104,000
36.741573
80
0.662001
false
bq/web2board
src/platformio/util.py
1
13808
# Copyright 2014-2015 Ivan Kravets <me@ikravets.com> # # 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...
lgpl-3.0
-2,197,265,980,824,614,700
27.528926
121
0.568076
false
ewiger/runstat
python/runstat.py
1
3779
''' Implementation of running variance/standard deviation. The MIT License (MIT) Copyright (c) 2015 Yauhen Yakimovich <eugeny.yakimovitch@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...
mit
-5,212,956,734,936,615,000
27.413534
78
0.604922
false
Rezzie/Batcher
generators/g_cycle.py
1
2394
#!/usr/bin/env python # Copyright (c) 2011, The University of York # All rights reserved. # Author(s): # James Arnold <jarnie@gmail.com> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of sourc...
bsd-3-clause
8,469,629,835,516,487,000
39.576271
80
0.702172
false
landscapeio/prospector
prospector2/tools/pylint/linter.py
1
2025
from __future__ import absolute_import from pylint.__pkginfo__ import numversion as PYLINT_VERSION if PYLINT_VERSION >= (1, 5): from pylint.config import OptionsManagerMixIn from pylint.utils import _splitstrip else: from logilab.common.configuration import OptionsManagerMixIn from pylint.lint import PyLin...
gpl-2.0
6,011,584,028,239,311,000
37.942308
95
0.624691
false
jettify/aiogibson
tests/test_parser.py
1
3928
import unittest from aiogibson import errors from aiogibson.parser import Reader, encode_command class ParserTest(unittest.TestCase): def test_not_found(self): data = b'\x01\x00\x00\x01\x00\x00\x00\x00' parser = Reader() parser.feed(data) obj = parser.gets() self.assertEqu...
mit
-3,434,366,863,707,969,000
32.008403
77
0.562373
false
mekkablue/Glyphs-Scripts
Color Fonts/Merge Suffixed Glyphs into Color Layers.py
1
10746
#MenuTitle: Merge Suffixed Glyphs into Color Layers # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Takes the master layer of suffixed glyphs (e.g., x.shadow, x.body, x.front) and turns them in a specified order into CPAL Color layers of the unsuffixed glyph (e.g., ...
apache-2.0
-2,315,050,609,437,465,600
44.227848
273
0.727654
false
april1452/craigslove
generate_post.py
1
3348
import string import sys import argparse import csv import random # import scipy # import scipy.stats # from scipy.stats import rv_discrete from collections import defaultdict # locations = ['chicago', 'dallas', 'denver', 'jacksonville', 'lasvegas', 'losangeles', 'miami', 'minneapolis', 'newyork', 'oklahomacity', 'pro...
mit
-8,948,929,042,323,856,000
32.828283
188
0.512843
false
NoahPeeters/pymathexpressions
mathexpressions/lib.py
1
2465
__author__ = 'Noah Peeters' import math const = { 'pi': [math.pi, '\pi'], 'e': [math.e, 'e'] } float_chars = [str(x) for x in range(10)] float_chars.append('.') operators = ['+', '-', '*', '/', '^', '%', '='] operators_priorities = [0, 0, 1, 1, 2, 1, 0] operators_latex = ['%s+%s', '%s-%s', '%s*%s', '\\frac{...
mit
4,933,296,013,770,592,000
21.017857
96
0.481136
false
rafaelthca/OmniDB
OmniDB/OmniDB_app/urls.py
1
24922
from django.conf.urls import url from django.urls import include, path from . import views from django.conf import settings from django.conf.urls.static import static base_urlpatterns = [ url(r'^upload/$', views.plugins.upload_view, name='sign_in'), #LOGIN url(r'^$', views.login.index, name='login'), ...
mit
-792,930,021,254,479,400
85.235294
164
0.724179
false
boreq/botnet
botnet/modules/builtin/meta.py
1
2191
from ...signals import _request_list_commands, _list_commands from .. import BaseResponder from ..lib import parse_command class Meta(BaseResponder): """Displays basic info about this bot.""" ignore_help = False ibip_repo = 'https://github.com/boreq/botnet' def __init__(self, config): super(...
mit
-4,800,175,909,826,175,000
29.859155
80
0.581013
false
harikishen/addons-server
src/olympia/addons/tasks.py
1
14975
import hashlib import os from django.conf import settings from django.core.files.storage import default_storage as storage from django.db import transaction from elasticsearch_dsl import Search from PIL import Image import olympia.core.logger from olympia import amo from olympia.addons.models import ( Addon, att...
bsd-3-clause
1,826,447,814,899,760,000
34.070258
79
0.585576
false
kevinrigney/PlaylistDatabase
youtube_search.py
1
4208
#!/usr/bin/env python3 import httplib2 import os import sys from apiclient.discovery import build from apiclient.errors import HttpError from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage from oauth2client.tools import argparser, run_flow class YoutubeSearcher(): # The ...
mit
6,983,723,532,908,328,000
34.361345
86
0.694867
false
south-coast-science/scs_dev
src/scs_dev/control_receiver.py
1
7257
#!/usr/bin/env python3 """ Created on 17 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) DESCRIPTION The function of the control_receiver utility is execute commands received over a messaging topic. In addition to enabling secure remote management, the utility provides a secure challenge-response...
mit
8,452,370,803,216,645,000
32.911215
119
0.592945
false
afraser/CellProfiler-Analyst
cpa/dirichletintegrate.py
1
6480
from numpy import * from scipy.integrate import quadrature, romberg, fixed_quad from scipy.special import gammaln, betaln, digamma, polygamma, betainc, gamma import pdb from hypergeom import hyper3F2regularizedZ1, hyper3F2Z1, hyper3F2aZ1 def dirichlet_integrate(alpha): normalizer = exp(sum(gammaln(alpha)) - gamma...
gpl-2.0
-7,962,094,248,256,210,000
39.754717
146
0.572685
false
leathersole/midi-accordion-fancy
src/main/player.py
1
1967
#!/bin/env python import pygame.midi import soundvalue class Player: def __init__(self): instrument = 22 port = 2 self.button2sound = {'a':(60,61), 's':(62,63), 'd':(64,65) } self.buttons = self.button2sound.keys() self.volume = 127 pygame.midi.init() ...
gpl-3.0
1,122,424,234,700,175,700
21.352273
82
0.605999
false
tristan-c/massive-octo-tribble
massive/views.py
1
3540
import uuid import os from flask_restful import Resource, reqparse from flask_login import login_required from flask import redirect, send_file, g, url_for from massive import api, app from massive.models import * from massive.utils import * from io import BytesIO class Resource(Resource): method_decorators = [...
bsd-2-clause
8,048,658,675,714,831,000
24.467626
80
0.554237
false
branden/dcos
packages/dcos-net/extra/dcos-net-setup.py
1
1380
#!/opt/mesosphere/bin/python """ The script allows to add network interfaces and ip addresses multiple times ip command returns 2 as exit code if interface or ipaddr already exists [1] dcos-net-setup.py checks output of ip command and returns success exit code [2] [1] ExecStartPre=-/usr/bin/ip link add name type dumm...
apache-2.0
-2,490,736,207,287,210,000
34.384615
93
0.65
false
itsMichael/uair-pro
app/launcher.py
1
19189
#! /usr/bin/env python2 # -*- coding: utf-8 -*- import os import sys import random import socket import subprocess import signal import hashlib import subprocess from functions import lt from langs import langs from loaders import load_config, save_config ROOT_PATH=os.path.dirname(__file__) ICON_PATH=os.path.join(R...
gpl-3.0
3,870,659,540,756,294,000
31.196309
99
0.597738
false
Maescool/libk8000
setup.py
1
1727
#!/usr/bin/env python # # k8000 install script # # See COPYING for info about the license (GNU GPL) # Check AUTHORS to see who wrote this software. from distutils.core import setup from distutils.extension import Extension import sys, glob, re, os # Check for Python < 2.2 if sys.version < '2.2': sys.exit('Error: ...
gpl-2.0
6,887,290,133,431,512,000
33.54
95
0.643312
false
ubyssey/dispatch
dispatch/tests/test_widget_register.py
1
2506
from dispatch.theme.widgets import Zone, Widget from dispatch.theme.fields import CharField, TextField, ArticleField, ImageField, WidgetField, Field from dispatch.theme import register from dispatch.tests.cases import DispatchAPITestCase, DispatchMediaTestMixin from dispatch.theme.exceptions import InvalidWidget, Inval...
gpl-2.0
-8,221,618,396,399,884,000
29.938272
100
0.650439
false
truevision/django_banklink
django_banklink/views.py
1
2422
from django.template import RequestContext from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.http import HttpResponse from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.views.decorators.csrf import csrf_exemp...
bsd-3-clause
8,737,867,333,097,925,000
41.491228
80
0.650702
false
denniskempin/safetynet
safetynet_tests.py
1
7873
from collections import OrderedDict import unittest from safetynet import (Dict, InterfaceMeta, List, Optional, Tuple, _ValidateValue, typecheck) class CustomType(object): pass class CustomSubType(CustomType): pass def DefineTypeCheckExample(): """Defines an example class. Note that...
mit
-4,629,023,588,682,049,000
28.82197
76
0.644608
false
cmazuc/scarfage
scarf/user.py
1
5046
import re import string from scarf import app from flask import redirect, url_for, render_template, session, request, flash from core import redirect_back, SiteUser, NoUser, new_user, AuthFail, check_email from main import PageData import logging import config app.secret_key = config.SECRETKEY BANNED = ['.*\.pl$', ...
gpl-2.0
-4,444,595,495,403,300,000
30.735849
124
0.525565
false
rymurr/cpp-class
pygui/pyscp.py
1
2857
from sys import stdout from twisted.python.log import startLogging, err from twisted.internet import reactor from twisted.internet.defer import Deferred, succeed from twisted.conch.ssh.common import NS from twisted.conch.scripts.cftp import ClientOptions from twisted.conch.ssh import filetransfer from twisted.conch....
gpl-3.0
7,092,885,815,837,879,000
28.153061
109
0.669933
false
emergebtc/muddery
muddery/typeclasses/players.py
1
3755
""" This is adapt from evennia/evennia/players/players.py. The licence of Evennia can be found in evennia/LICENSE.txt. Player The Player represents the game "account" and each login has only one Player object. A Player is what chats on default channels but has no other in-game-world existance. Rather the Player puppe...
bsd-3-clause
-812,016,742,235,505,500
34.424528
98
0.645806
false
PwnArt1st/searx
searx/preferences.py
1
11106
from searx import settings, autocomplete from searx.languages import language_codes as languages COOKIE_MAX_AGE = 60 * 60 * 24 * 365 * 5 # 5 years LANGUAGE_CODES = [l[0] for l in languages] LANGUAGE_CODES.append('all') DISABLED = 0 ENABLED = 1 class MissingArgumentException(Exception): pass class ValidationE...
agpl-3.0
6,231,365,305,246,020,000
37.5625
114
0.56591
false
googleapis/python-aiplatform
samples/snippets/predict_text_sentiment_analysis_sample_test.py
1
1113
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-5,785,958,710,520,507,000
32.727273
82
0.758311
false
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_placenta/en_placenta-1.7.8/to_be_fixed/needsfixing/movie25.py
1
6150
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @Daddy_Blamo wrote this file. As long as you retain this notice you # can do whatever you want wi...
gpl-2.0
-2,381,739,724,943,146,500
41.123288
222
0.504228
false
alejob/mdanalysis
testsuite/MDAnalysisTests/plugins/memleak.py
1
3529
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
gpl-2.0
-833,070,304,503,999,500
38.211111
90
0.688014
false
nukeador/20up
20up.py
1
15586
#! /usr/bin/python # -*- coding: utf-8 -*- """ Copyright (C) 2013 Borja Menendez Moreno 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 any later version. This p...
gpl-3.0
-1,007,471,043,088,747,600
33.028384
93
0.548091
false
angr/angr
angr/state_plugins/heap/heap_base.py
1
6439
from ..plugin import SimStatePlugin from ...errors import SimMemoryError from .. import sim_options as opts import logging l = logging.getLogger("angr.state_plugins.heap.heap_base") # TODO: derive heap location from SimOS and binary info for something more realistic (and safe?) DEFAULT_HEAP_LOCATION = 0xc0000000 DE...
bsd-2-clause
-494,883,889,625,038,900
50.512
120
0.649635
false
OSU-CS419/viewmydb
viewmydb/DBcreatetable.py
1
9454
#!/usr/bin/python import urwid import mainview """ NOTES ----- This module builds the widget to allow the user to create a table in a database. """ class CreateTableInfo: def __init__(self): self.count = None self.table_name = "" self.table_fields = None self.query_string = "" self.atr_name = ...
mit
-7,058,413,767,941,658,000
34.541353
201
0.663317
false
lrocheWB/navitia
source/jormungandr/jormungandr/realtime_schedule/tests/synthese_test.py
1
5246
# coding=utf-8 # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and ope...
agpl-3.0
7,979,581,180,124,000,000
32.414013
109
0.672512
false
feigaochn/leetcode
p737_sentence_similarity_ii.py
2
3720
#!/usr/bin/env python # coding: utf-8 """ Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are similar. For example, words1 = ["great", "acting", "skills"] and words2 = ["fine", "drama", "talent"] are similar, if the simil...
mit
2,157,045,802,710,911,500
45.5
223
0.548387
false