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
RiceMunk/omnifit
omnifit/fitter/fitter.py
1
23070
import numpy as np from lmfit import minimize, Parameters, Parameter from astropy import units as u from .. import spectrum from functions import * class Fitter(): """ A class for multi-component fitting to spectroscopic data of ices. This is the heart of Omnifit, which receives spectra from the spectrum modu...
bsd-3-clause
300,213,225,591,060,030
37.971284
118
0.670741
false
3.999653
false
false
false
apache/chemistry-cmislib
src/cmislib/net.py
2
5195
# -*- coding: utf-8 -*- # # 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 Li...
apache-2.0
5,155,019,192,614,484,000
31.879747
75
0.561309
false
4.440171
false
false
false
joaomoreno/facilis
facilis/core/web.py
1
2344
#!/usr/bin/python # -*- coding: utf-8 -*- # Facilis # João Moreno <http://www.joaomoreno.com/> # GPLv3 from SocketServer import ThreadingMixIn from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from threading import Thread import sys from misc import UnknownURL, UnknownFile from os.path import split, ge...
gpl-3.0
2,496,950,977,492,467,000
29.038462
91
0.578745
false
3.971186
false
false
false
wholeshoot/mongo_datatables
mongo_datatables/editor.py
1
2907
from bson.objectid import ObjectId import json class Editor(object): def __init__(self, pymongo_object, collection, request_args, doc_id): """ :param pymongo_object: :param collection: :param request_args: :param doc_id: """ self.mongo = pymongo_object ...
mit
7,445,774,761,510,483,000
27.782178
117
0.522876
false
3.83004
false
false
false
shawnadelic/shuup
shuup/core/models/_suppliers.py
1
3709
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.db import models from django.utils.encoding import python_2_unic...
agpl-3.0
7,370,786,921,387,717,000
36.09
115
0.689674
false
3.811922
false
false
false
bioinfo-core-BGU/neatseq-flow_modules
neatseq_flow_modules/RNA_seq/trinity_statistics.py
1
8022
# -*- coding: UTF-8 -*- """ ``trinity_statistics`` ----------------------------------------------------------------- :Authors: Menachem Sklarz :Affiliation: Bioinformatics core facility :Organization: National Institute of Biotechnology in the Negev, Ben Gurion University. A class that defines a module for running ``...
gpl-3.0
-7,218,198,031,064,507,000
42.597826
279
0.596111
false
3.715609
false
false
false
shoopio/shoop
shuup/admin/modules/attributes/__init__.py
2
1483
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, 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.utils.transla...
agpl-3.0
-2,326,765,358,164,317,000
32.704545
83
0.650708
false
3.652709
false
false
false
jehine-MSFT/azure-storage-python
azure/storage/_common_conversion.py
1
2874
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
apache-2.0
-4,880,600,829,352,784,000
26.883495
76
0.626741
false
3.598997
false
false
false
Artimi/waktu
waktu/timetracker.py
1
6274
#!/usr/bin/env python2.7 #-*- coding: UTF-8 -*- from category import Category from gi.repository import Wnck, Gdk, Gtk, GObject, Notify, GLib from activityrecord import ActivityRecord from threading import Thread, Event from time import sleep, time import copy class TimeTracker(Thread): """Core module of this pro...
mit
6,195,104,910,922,810,000
40.184211
166
0.579393
false
4.24983
false
false
false
pyfa-org/Pyfa
gui/builtinContextMenus/itemProject.py
1
1630
import wx import gui.fitCommands as cmd import gui.mainFrame from gui.contextMenu import ContextMenuSingle from service.fit import Fit _t = wx.GetTranslation class ProjectItem(ContextMenuSingle): visibilitySetting = 'project' def __init__(self): self.mainFrame = gui.mainFrame.MainFrame.getInstance(...
gpl-3.0
5,919,210,914,069,837,000
31.6
119
0.682822
false
3.781903
false
false
false
techtonik/warehouse
warehouse/views.py
1
1071
# Copyright 2013 Donald Stufft # # 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
-4,845,347,867,932,633,000
37.25
74
0.741363
false
3.852518
false
false
false
CamDavidsonPilon/lifelines
lifelines/utils/lowess.py
1
2541
# -*- coding: utf-8 -*- """ This module implements the Lowess function for nonparametric regression. Functions: lowess Fit a smooth nonparametric regression curve to a scatterplot. For more information, see William S. Cleveland: "Robust locally weighted regression and smoothing scatterplots", Journal of the American St...
mit
-498,146,806,779,797,570
38.703125
114
0.637151
false
3.245211
false
false
false
consultit/Ely
ely/direct/data_structures_and_algorithms/ch05/high_scores.py
1
3387
# Copyright 2013, Michael H. Goldwasser # # Developed for use with the book: # # Data Structures and Algorithms in Python # Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser # John Wiley & Sons, 2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of...
lgpl-3.0
-1,765,403,955,418,676,700
36.633333
81
0.581931
false
3.961404
false
false
false
3dbug/blender
DialScale.py
1
4821
bl_info = { "name": "Dial and Scale", "author": "stacker, sambler", "version": (1, 2), "blender": (2, 80, 0), "location": "3DView > Add > Curve > Dial and Scale", "description": "Add an array of text number objects or watch dials.", "warning": "", "wiki_url": "https://github.com/3dbug/bl...
gpl-3.0
-1,068,458,594,242,140,500
42.432432
247
0.594897
false
3.438659
false
false
false
exekias/django-achilles
doc/conf.py
1
8035
# -*- coding: utf-8 -*- # # Django Achilles documentation build configuration file, created by # sphinx-quickstart on Mon Dec 9 01:46:37 2013. # # 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....
apache-2.0
7,124,134,120,415,301,000
31.51417
87
0.708505
false
3.737087
true
false
false
openstack/mistral
mistral/api/controllers/v2/sub_execution.py
1
4240
# Copyright 2020 - Nokia Networks. # # 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
-6,536,085,960,045,563,000
30.641791
78
0.635849
false
3.66465
false
false
false
liaralabs/swizzin
scripts/deluge.UpdateTracker.py
1
2540
# from https://github.com/s0undt3ch/Deluge/blob/master/deluge/ui/console/commands/update-tracker.py # update-tracker.py # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it un...
gpl-3.0
-8,216,069,250,364,968,000
38.076923
99
0.699213
false
3.751846
false
false
false
aesuli/rss-feed-monitor
dirs_to_csv.py
1
1995
import argparse import csv import logging import re import os import sys BLANK_SUB = '_' LABEL_SEPARATOR = ':' ID_SEPARATOR = '_' def read_data(directory): logger = logging.getLogger(sys.argv[0]) for subdir in next(os.walk(directory))[1]: label = subdir subpath = os.path.join(directory, subdi...
gpl-3.0
-1,952,062,115,747,103,200
35.272727
124
0.61203
false
3.974104
false
false
false
dichen001/Go4Jobs
JackChen/linked_list/328. Odd Even Linked List.py
1
1154
""" Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity. Example: Given 1->2->3->4->5->N...
gpl-3.0
-3,072,681,138,911,164,400
29.368421
170
0.613518
false
3.675159
false
false
false
childresslab/MicrocavityExp1
hardware/laser/simple_laser_dummy.py
2
6456
# -*- coding: utf-8 -*- """ This module acts like a laser. Qudi 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. Qudi is distributed in the ...
gpl-3.0
-5,375,667,728,137,546,000
26.355932
91
0.606103
false
4.141116
false
false
false
zhounetworking/build_job
lib/build_job.py
1
5769
#!/usr/bin/python #-*- coding:utf8 -*- # import os import sys import time import json import traceback import jenkinsapi from functools import partial from jenkinsapi.jenkins import Jenkins from jenkinsapi.custom_exceptions import WillNotBuild from conf.config import * # job_dict,jenkins_dic from conf.game_config ...
apache-2.0
5,577,391,660,055,654,000
26
91
0.579428
false
3.355124
false
false
false
Azure/WALinuxAgent
azurelinuxagent/common/osutil/default.py
1
60738
# # Copyright 2018 Microsoft Corporation # # 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
-4,743,960,978,200,930,000
38.67211
356
0.563288
false
3.955327
false
false
false
dtiarks/ThesisPlot
Chap2/MoleculeMemory/memory.py
1
3776
# -*- coding: utf-8 -*- """ Created on Wed Jul 19 11:29:40 2017 @author: daniel """ import Tomography as tom import quPy as qp import numpy as np import matplotlib.pyplot as plt import pandas as pd import os import json import io import scipy.constants as co #import rydpy c = 299792458 # m/s, speed of light CODATA 2...
mit
-2,405,916,120,718,962,700
30.214876
160
0.649894
false
2.257023
false
false
false
FedoraScientific/salome-smesh
src/Tools/blocFissure/gmu/partitionBlocDefaut.py
1
6971
# -*- coding: utf-8 -*- import logging from geomsmesh import geompy # ----------------------------------------------------------------------------- # --- partition du bloc defaut par generatrice, tore et plan fissure def partitionBlocDefaut(volDefaut, facesDefaut, gener, pipe, facefis, ellips...
lgpl-2.1
-5,217,617,912,348,345,000
42.51875
158
0.690507
false
2.960459
false
false
false
andreasBihlmaier/arni
arni_gui/src/arni_gui/topic_item.py
1
16458
from rospy.rostime import Time import rospy from python_qt_binding.QtCore import QTranslator from abstract_item import AbstractItem from helper_functions import prepare_number_for_representation, UPDATE_FREQUENCY, TOPIC_AGGREGATION_FREQUENCY, \ ROUND_DIGITS, MAXIMUM_OFFLINE_TIME from arni_core.helper import SEUID...
bsd-2-clause
-6,375,115,065,249,970,000
35.251101
158
0.537429
false
4.265941
false
false
false
autopulated/yotta
yotta/main.py
2
10966
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. from yotta.lib import lazyregex #pylint: disable=unused-import from yotta.lib import errors #pylint: disable=unused-import # NOTE: argcomplete must be first! # argcomplete, pip install argcomplete, tab...
apache-2.0
3,106,736,014,995,484,700
43.217742
131
0.654933
false
4.156937
true
false
false
andrewyoung1991/scons
src/engine/SCons/Platform/aix.py
1
3083
"""engine.SCons.Platform.aix Platform-specific initialization for IBM AIX systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, ...
mit
-2,343,016,563,431,805,000
35.270588
84
0.66591
false
3.782822
false
false
false
smips/Temporary_Insanity
TI/src/libtcodpy.py
1
62671
# # libtcod 1.5.1 python wrapper # Copyright (c) 2008,2009,2010 Jice & Mingos # 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 co...
mit
6,940,255,849,136,559,000
30.024016
177
0.621707
false
2.699475
false
false
false
solvo/derb
report_builder/forms.py
1
2294
from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ from report_builder.models import Question, Answer, Report from report_builder.report_shortcuts import get_question_permission class QuestionForm(forms.ModelForm): children = forms.CharF...
gpl-3.0
230,806,146,539,116,030
29.586667
89
0.559285
false
4.542574
false
false
false
ddiazpinto/python-redsys
setup.py
1
1065
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='redsys', version='0...
mit
-1,102,163,221,218,876,400
33.354839
96
0.646948
false
3.622449
false
false
false
eleme/archer
archer/cli.py
1
5921
# -*- coding: utf-8 -*- import os import sys sys.path.append('.') import importlib import traceback import click import re from ._compat import iteritems from .helper import make_client class NoAppException(click.UsageError): """Raised if an application cannot be found or loaded.""" def locate_app(app_id): ...
mit
-3,892,443,103,610,141,000
26.539535
78
0.582334
false
3.728589
true
false
false
saurabh6790/frappe
frappe/model/document.py
1
43369
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe import time from frappe import _, msgprint, is_whitelisted from frappe.utils import flt, cstr, now, get_datetime_str, file_lock, date_diff from frapp...
mit
-3,114,780,777,890,336,000
30.290765
130
0.687219
false
3.211567
false
false
false
aknuds1/srl-python-lib
Tests/testqtgui/testwidgets.py
1
7362
from _common import * if has_qt4: from PyQt4 import QtGui, QtCore from PyQt4.QtCore import Qt import srllib.qtgui.widgets if has_qt4: class _LineEdit(srllib.qtgui.widgets._LineEditHelper, guimocks.QLineEditMock): _qbase = __qbase = guimocks.QLineEditMock def __init__(self...
mit
4,963,683,699,837,994,000
39.01087
83
0.617359
false
3.814508
true
false
false
akhilaananthram/nupic.research
encoder_quality/rdse_check_demo.py
1
2680
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
-8,209,893,378,988,622,000
35.712329
78
0.672388
false
4.207221
false
false
false
GeoscienceAustralia/PyRate
tests/test_merge.py
1
2815
# coding: utf-8 # This Python module is part of the PyRate software package. # # Copyright 2020 Geoscience Australia # # 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:/...
apache-2.0
5,893,206,925,292,384,000
41.651515
115
0.701954
false
3.492556
true
false
false
aileisun/bubbleimg
bubbleimg/imgmeasure/iso/isomeasurer.py
1
9351
# isomeasurer.py # ALS 2017/06/01 import os import astropy.units as u from astropy.io import fits import numpy as np import astropy.table as at import pickle import scipy.ndimage as simg from ..measurer import Measurer from ... import tabtools from . import polytools from . import plottools class isoMeasurer(Measur...
mit
7,320,847,590,150,667,000
32.636691
246
0.694364
false
2.782208
false
false
false
ShaguptaS/faker
faker/providers/user_agent.py
1
5274
from __future__ import unicode_literals from . import BaseProvider from . import date_time from datetime import datetime import random class Provider(BaseProvider): user_agents = ('firefox', 'chrome', 'internet_explorer', 'opera', 'safari') windows_platform_tokens = ( 'Windows NT 6.2', 'Windows NT 6....
mit
-4,744,924,618,467,953,000
40.857143
150
0.571483
false
3.273743
false
false
false
jeremiedecock/snippets
python/tkinter/python3/keyboard_events.py
1
5625
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) # 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 Software without restriction, including witho...
mit
4,922,969,895,132,361,000
34.14375
82
0.599502
false
3.462438
false
false
false
jessepeterson/commandment
commandment/alembic/versions/8c866896f76e_create_dep_join_tables.py
1
1729
"""empty message Revision ID: 8c866896f76e Revises: 0e5babc5b9ee Create Date: 2017-07-19 12:57:58.086196 """ from alembic import op import sqlalchemy as sa import commandment.dbtypes from alembic import context # revision identifiers, used by Alembic. revision = '8c866896f76e' down_revision = '0e5babc5b9ee' branch...
mit
-6,987,280,669,994,090,000
26.444444
71
0.689994
false
3.5
false
false
false
lgbouma/astrobase
astrobase/services/gaia.py
1
44599
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # gaia - Waqas Bhatti (wbhatti@astro.princeton.edu) - Dec 2017 # License: MIT. See the LICENSE file for more details. ''' This queries the GAIA catalog for object lists in specified areas of the sky. The main use of this module is to generate realistic spatial distributio...
mit
5,913,882,603,663,914,000
35.200487
101
0.518621
false
4.804374
false
false
false
peter-kiechle/tactile-sensors
python/interpolation_and_contour/interpolation_and_contour.py
1
7498
# -*- coding: utf-8 -*- import os, sys print("CWD: " + os.getcwd() ) # Load configuration file before pyplot config_path = os.path.abspath('../matplotlib/') sys.path.append(config_path) import configuration as config # Library path lib_path = os.path.abspath('../../lib') sys.path.append(lib_path) import framemanager...
gpl-3.0
8,087,984,003,630,864,000
28.015504
167
0.569329
false
3.063011
false
false
false
elopio/snapcraft
tests/unit/plugins/test_base.py
1
3087
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-4,015,501,113,157,418,000
38.075949
73
0.685455
false
3.723764
true
false
false
jlweand/DssVisualizer
app/plugins/datasource/elasticsearch/multiIncludeThroughput.py
1
5393
# Copyright (C) 2016 Jamie Acosta, Jennifer Weand, Juan Soto, Mark Eby, Mark Smith, Andres Olivas # # This file is part of DssVisualizer. # # DssVisualizer 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, eit...
gpl-3.0
8,172,515,192,321,630,000
54.597938
142
0.76043
false
4.021626
false
false
false
pydanny/dj-stripe
djstripe/contrib/rest_framework/views.py
1
2877
""" .. module:: dj-stripe.contrib.rest_framework.views. :synopsis: Views for the dj-stripe REST API. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.v...
bsd-3-clause
8,368,867,647,684,724,000
33.25
82
0.63017
false
4.755372
false
false
false
jul/dsat
mics_utils/universal_testing_client.py
1
2218
#!/usr/bin/env python # -*- coding: utf-8 -*- from time import time, sleep, asctime as _asctime import sched from random import randint import logging import logging.handlers import sys,os import readline from readline import write_history_file, read_history_file import zmq from simplejson import dumps, load, loads fr...
bsd-2-clause
6,014,448,464,119,381,000
23.362637
81
0.608029
false
3.227074
false
false
false
Grumbel/rfactorlcd
tests/test_ac_state.py
1
1625
# rFactor Remote LCD # Copyright (C) 2014 Ingo Ruhnke <grumbel@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 3 of the License, or # (at your option) any later versi...
gpl-3.0
-4,213,333,178,204,055,000
28.545455
71
0.693538
false
3.472222
true
false
false
nlhepler/freetype-py3
examples/glyph-outline.py
1
1311
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------------------...
bsd-3-clause
-7,109,555,045,368,138,000
31.775
79
0.56598
false
3.422977
false
false
false
HybridF5/jacket
jacket/tests/compute/unit/fake_notifier.py
1
3739
# Copyright 2013 Red Hat, 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 agre...
apache-2.0
6,867,932,777,672,015,000
39.641304
78
0.57395
false
4.824516
false
false
false
cernops/keystone
keystone/policy/backends/rules.py
1
2753
# Copyright (c) 2011 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
-5,975,855,063,058,688,000
28.923913
78
0.680712
false
4.248457
false
false
false
s910324/Sloth
bokehPlotter/bokehLine.py
1
1301
class bokehLine(object): def __init__(self, line, symbol = None, viewNum = None, parent = None): self.line = line self.symbol = symbol self.viewNum = viewNum self.style = None self.val = {'name' : self.line.name, 'color' : self.line.line_color, 'width' : self.line.line_width, 's...
lgpl-3.0
-8,097,567,311,734,556,000
30.731707
72
0.607994
false
2.878319
false
false
false
dwcoder/diceware
tests/test_config.py
1
5149
import os from diceware.config import ( OPTIONS_DEFAULTS, valid_locations, get_configparser, get_config_dict, configparser, ) class TestConfigModule(object): # tests for diceware.config def test_defaults(self): # there is a set of defaults for options available assert OPTIONS_DEFA...
gpl-3.0
-8,182,861,869,564,112,000
39.543307
77
0.606331
false
3.680486
true
false
false
SalesforceFoundation/mrbelvedereci
metaci/testresults/migrations/0009_auto_20181207_2010.py
1
1093
# Generated by Django 2.1.3 on 2018-12-07 20:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("testresults", "0008_merge_20180911_1915"), ] operations = [ migrations.AlterField( model_name="testclass", name="tes...
bsd-3-clause
-2,158,632,882,686,530,300
25.658537
52
0.399817
false
4.814978
false
false
false
demonchild2112/travis-test
grr/server/grr_response_server/gui/selenium_tests/report_test.py
1
4596
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_server import data_store from grr_response_server.gui import...
apache-2.0
-8,424,589,681,675,763,000
34.90625
79
0.708442
false
3.554524
true
false
false
rahuldan/sympy
sympy/sets/fancysets.py
2
46732
from __future__ import print_function, division from sympy.logic.boolalg import And from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.compatibility import as_int, with_metaclass, range, PY3 from sympy.core.expr import Expr from sympy.core.function import Lambda, _coeff_isneg from sympy....
bsd-3-clause
-3,314,107,003,832,846,000
31.430257
90
0.499444
false
4.100737
false
false
false
awlange/brainsparks
src/calrissian/regularization/particle_regularize_l2.py
1
5014
import numpy as np class ParticleRegularizeL2(object): """ L2 regularizer for charges """ def __init__(self, coeff_lambda=0.0, zeta=8.0): self.coeff_lambda = coeff_lambda self.zeta = zeta self.n = 1 def cost(self, particle_input, layers): c = 0.0 # c = np...
mit
2,553,449,654,175,343,000
36.984848
141
0.406063
false
2.904983
false
false
false
NathanW2/qmap
src/qmap/floatingtoolbar.py
1
1226
from PyQt4.QtGui import QToolBar, QActionGroup from PyQt4.QtCore import Qt, QPoint from utils import log class FloatingToolBar(QToolBar): """ A floating QToolBar with no border and is offset under its parent """ def __init__(self, name, parent): """ parent: The parent of this toolbar. Should be another toolba...
gpl-2.0
2,753,613,497,718,192,000
31.263158
87
0.709625
false
3.111675
false
false
false
willrp/willbuyer
backend/tests/integration/controller/api/cart/test_select_all_controller.py
1
1098
import pytest from flask import json from json.decoder import JSONDecodeError from backend.util.response.cart import CartSchema def test_select_all_controller(flask_app, es_create): prod_list = es_create("products", 2) item_id = prod_list[0].meta["id"] item_id_2 = prod_list[1].meta["id"] with flask_...
mit
-7,319,561,115,062,300,000
27.153846
53
0.577413
false
3.69697
false
false
false
philgyford/django-ditto
ditto/pinboard/admin.py
1
2602
from django.contrib import admin from django.db import models from django.forms import Textarea, TextInput from taggit.managers import TaggableManager from taggit.forms import TagWidget from ..core.admin import DittoItemModelAdmin from .models import Account, Bookmark @admin.register(Account) class AccountAdmin(adm...
mit
3,542,037,757,899,506,000
24.762376
86
0.468486
false
4.224026
false
false
false
xrubio/abm4s3
python/experimentTransmission.py
1
2038
# # Copyright (c) 2015 - Xavier Rubio-Campillo # This file 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 # # The source code is distr...
gpl-3.0
6,615,233,437,712,181,000
30.353846
79
0.675662
false
3.718978
false
false
false
topwebmaster/cookiecutter-django
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py
1
2180
{% if cookiecutter.use_celery == 'y' %} import os from celery import Celery from django.apps import apps, AppConfig from django.conf import settings if not settings.configured: # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.l...
bsd-3-clause
2,726,470,006,636,422,000
36.586207
99
0.658257
false
3.707483
true
false
false
zawata/AccessLog
dependencies/miscFunc.py
1
1108
''' A file of small misc. functions ''' import socket import subprocess import httplib2 class Singleton(type): ''' Singlton Design Pattern metaclass ''' _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls)...
gpl-3.0
-1,916,738,916,484,150,300
22.083333
81
0.609206
false
4.058608
false
false
false
dyoussef/s2p
s2plib/rectification.py
1
16836
# Copyright (C) 2015, Carlo de Franchis <carlo.de-franchis@cmla.ens-cachan.fr> # Copyright (C) 2015, Gabriele Facciolo <facciolo@cmla.ens-cachan.fr> # Copyright (C) 2015, Enric Meinhardt <enric.meinhardt@cmla.ens-cachan.fr> from __future__ import print_function import os import numpy as np from s2plib import rpc_mod...
agpl-3.0
-1,560,706,240,523,697,700
40.985037
102
0.61125
false
3.43662
false
false
false
derwentx/WooGenerator
tests/test_parsing_special_v2.py
1
4047
import os import time import unittest from context import get_testdata, TESTS_DATA_DIR, woogenerator from woogenerator.parsing.special import CsvParseSpecial from woogenerator.utils import Registrar, TimeUtils class TestCSVParseSpecialV2(unittest.TestCase): def setUp(self): # import_name = TimeUtils.get...
gpl-2.0
6,171,959,762,056,906,000
31.902439
97
0.619471
false
3.785781
true
false
false
qtproject/qt-creator
share/qtcreator/debugger/qttypes.py
2
103408
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
gpl-3.0
5,603,281,900,807,769,000
33.923337
103
0.568351
false
3.293144
false
false
false
dmpayton/django-fbi
django_fbi/views.py
1
1651
from django.conf import settings from django.http import HttpResponse from django.shortcuts import get_object_or_404, redirect, render_to_response from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_exempt from django_fbi.app import apps from django_fbi.backends import ge...
mit
6,748,672,571,937,231,000
40.275
86
0.727438
false
3.786697
false
false
false
dotKom/onlineweb4
utils/helpers.py
1
1794
# -*- coding: utf8 -*- import json from datetime import date, datetime import pytz from django.conf import settings from django.db import models from django.db.models.query import QuerySet from django.utils.timezone import make_aware class JsonHelper(json.JSONEncoder): def default(self, obj): if isinsta...
mit
-845,939,318,202,271,400
26.6
86
0.636009
false
3.683778
false
false
false
scott-maddox/openbandparams
src/openbandparams/examples/advanced/GaInAsSb_on_GaSb/Plot_Strained_Band_Offset_vs_Composition_of_Quaternary3.py
1
2475
# # Copyright (c) 2013-2014, Scott J Maddox # # This file is part of openbandparams. # # openbandparams is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # ...
agpl-3.0
8,786,756,771,074,003,000
33.873239
77
0.628283
false
3.025672
false
false
false
gbiggs/rtcshell
rtcshell/rtls.py
1
13317
#!/usr/bin/env python # -*- Python -*- # -*- coding: utf-8 -*- '''rtcshell Copyright (C) 2009-2010 Geoffrey Biggs RT-Synthesis Research Group Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved. Licensed und...
epl-1.0
7,676,000,197,927,443,000
36.198324
79
0.490501
false
4.146015
false
false
false
nodebox/nodebox-opengl
examples/07-filter/05-render.py
1
2168
# Add the upper directory (where the nodebox module is) to the search path. import os, sys; sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics import * # The render() command executes a function with drawing commands # in an offscreen (i.e. hidden) canvas and returns an Image object. # This is useful ...
bsd-3-clause
8,009,919,124,711,394,000
36.37931
78
0.686808
false
3.325153
false
false
false
ace02000/pyload
module/plugins/accounts/SimplydebridCom.py
1
1696
# -*- coding: utf-8 -*- import time from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" __version__ = "0.15" __status__ = "testing" __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to us...
gpl-3.0
2,483,385,987,593,713,700
35.869565
106
0.470519
false
3.518672
false
false
false
aliciawyy/CompInvest
load/load_data.py
1
1779
""" This is the general interface to load data, either we want to load the data from internet through panda or load local data through QSTK for tests. @author Alice Wang """ import pandas.io.data as web from load_local_data import load_local_data_from_yahoo def load_stock_close_price(start_date, end_date, ls_symbols,...
mit
1,172,195,368,799,243,300
32.566038
91
0.66498
false
3.467836
false
false
false
edisonlz/fruit
web_project/base/site-packages/redis_model/models/dattributes.py
1
28317
# -*- coding: UTF-8 -*- import os,sys import datetime import time from redis_client import RedisClient import types import logging #加载配置 import setting from setting import logger try: from functools import wraps, update_wrapper except ImportError: from django.utils.functional import wraps, update_wrapper # Pyt...
apache-2.0
6,926,544,624,200,830,000
29.264579
197
0.511115
false
4.033535
false
false
false
bfalacerda/strands_executive
task_executor/scripts/mdp_task_executor.py
1
63607
#!/usr/bin/env python from __future__ import with_statement import rospy from Queue import Queue, Empty from strands_executive_msgs.msg import Task, ExecutionStatus, DurationMatrix, DurationList, ExecutePolicyAction, ExecutePolicyFeedback, ExecutePolicyGoal, MdpStateVar, StringIntPair, StringTriple, MdpAction, MdpAct...
mit
-8,600,928,490,053,119,000
46.717179
306
0.572468
false
4.256642
false
false
false
AaronRegan/ObjectTracker
hog.py
1
3796
# import the necessary packages from __future__ import print_function from non_max_suppression import non_max_suppression from myqueue import myqueue from frames import frames from object import Object import numpy as np import argparse import datetime import imutils import cv2 import time ap = argparse.ArgumentParser...
mit
-1,399,075,531,900,514,000
32.59292
110
0.606164
false
2.826508
false
false
false
ReconCell/smacha
smacha/test/smacha_test_examples/random_outcomes.py
1
6029
#!/usr/bin/env python import smach import random class RandomOutcomeState(smach.State): def __init__(self, input_keys = ['outcome'], output_keys = ['outcome'], callbacks = {}, outcomes=['succeeded']): smach.State.__init__(self, input_keys=input_keys, output_keys=output_keys, outcomes=outcomes) ...
bsd-3-clause
-3,053,937,580,244,111,000
35.107784
141
0.532427
false
3.937949
false
false
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/distutils/command/build_clib.py
1
8098
"""distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" __revision__ = "$Id: build_clib.py 72379 2009-05-06 07:26:24Z tarek.ziade $" # XXX this module has *lots* of code ripped-off quite...
mit
-2,797,674,694,629,372,000
37.379147
76
0.568782
false
4.614245
false
false
false
illagrenan/django-make-app
django_make_app/renderers.py
1
1282
# -*- encoding: utf-8 -*- # ! python2 from __future__ import (absolute_import, division, print_function, unicode_literals) from jinja2 import FileSystemLoader, Environment class TemplateRenderer(object): def __init__(self, templates_directory, template_name, item): """ :type templates_directory:...
mit
-4,592,002,837,051,133,000
27.488889
84
0.583463
false
4.259136
false
false
false
clarete/curdling
curdling/services/base.py
1
3236
from __future__ import absolute_import, print_function, unicode_literals from ..signal import Signal, SignalEmitter from ..util import logger from distlib.compat import queue import sys import threading import time import traceback # See `Service._worker()`. This is the sentinel that gently stops the iterator # over ...
gpl-3.0
-2,457,431,602,473,947,000
33.425532
87
0.57293
false
4.055138
false
false
false
pazagra/catkin_ws
src/RGBDHand/src/Planeees.py
1
4011
import roslib import rospy import sys import timeit import os import Image_Process import cv2 import cv2.cv as cv import numpy as np import BoW import Analysis import Segmentation from sklearn import cluster import Descriptors class Learn: def __init__(self): path = "/media/iglu/Data/Dataset/DatasetIglu/Da...
gpl-3.0
117,786,366,276,852,400
37.576923
304
0.540763
false
3.158268
false
false
false
carlosperate/LightUpPi-Alarm
LightUpHardware/test/HardwareSwitch_test.py
1
4048
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Unit test for the HardwareSwitch module. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # # Licensed under The MIT License (MIT), a copy can be found in the LICENSE file # # These test require the Wemo Switch to be on the network at the defined IP...
mit
-2,191,243,379,043,929,300
33.305085
79
0.63414
false
3.949268
true
false
false
shub0/algorithm-data-structure
python/BST_iterator.py
1
1180
#! /usr/bin/python ''' Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next() and hasNext() should run in average O(1) time and uses O(h) memory, where h is the height of the tree...
bsd-3-clause
5,504,190,055,761,006,000
30.052632
117
0.620339
false
3.710692
false
false
false
Loudr/pale
pale/endpoint.py
1
25122
# -*- coding: utf-8 -*- import datetime import json import logging import sys import threading import arrow from pale import config as pale_config from pale.arguments import BaseArgument from pale.fields import ResourceField, ListField, ResourceListField from pale.errors import APIError, ArgumentError, AuthenticationE...
mit
-4,322,117,158,030,105,000
39.454106
103
0.578656
false
4.805279
false
false
false
code-ape/SocialJusticeDataProcessing
category.py
1
6149
import tools import settings def base_demographic(data, demographic_questions): breakdowns = {} for question_num in demographic_questions: responses = tools.get_responses_to_number(question_num, data) title = tools.get_question_title(question_num, data) values = tools.extract_vals_from_...
apache-2.0
-8,700,736,649,998,507,000
37.192547
93
0.623191
false
4.168814
false
false
false
drewverlee/art
tests/test_app_user_interaction.py
1
2114
#!/usr/local/bin/python import unittest import sys from selenium import webdriver servers = { 'live' : 'http://safe-sands-8472.herokuapp.com/', 'local': 'http://127.0.0.1:5000/' } class TestApp(unittest.TestCase): BASE = servers['local'] @classmethod def setUpClass(cls): ...
mit
6,670,995,368,726,679,000
31.030303
96
0.625828
false
3.267388
true
false
false
Sult/daf
apps/corporations/models/corporations.py
1
1185
from django.db import models #from django.conf import settings #from config.storage import OverwriteStorage #from utils.common import icon_size_name from utils.connection import * class CorporationApi(models.Model): """ charactertype apis """ api = models.OneToOneField('apies.Api') corporationid = model...
mit
-2,615,864,952,555,058,000
27.902439
66
0.681857
false
3.97651
false
false
false
googleapis/python-compute
google/cloud/compute_v1/services/addresses/transports/rest.py
1
20223
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-8,557,189,965,289,486,000
41.307531
105
0.608911
false
4.652174
false
false
false
ningirsu/stepmania-server
smserver/controllers/legacy/login.py
1
2496
""" Login controller """ from smserver.smutils.smpacket import smpacket from smserver.smutils.smpacket import smcommand from smserver.stepmania_controller import StepmaniaController from smserver.resources import user_resource from smserver import models from smserver import exceptions from smserver import __version__...
mit
2,024,049,548,031,647,500
33.191781
89
0.588141
false
3.918367
false
false
false
iamshang1/Projects
Advanced_ML/Human_Activity_Recognition/LSTM/record_fetcher_between_subject.py
1
24384
import numpy as np import glob import sys import random class record_fetcher(object): ''' creates feature arrays and labels from raw accelerometer/demographic data splits features and labels between subjects into test/train sets methods: - fetch(batch_size,minibatch_size,binary,seed) ...
mit
2,176,022,732,392,023,600
45.096408
167
0.530635
false
3.59328
true
false
false
reaperhulk/pynacl
src/nacl/__init__.py
1
1499
# Copyright 2013 Donald Stufft and individual contributors # # 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...
apache-2.0
646,718,397,534,372,700
27.283019
79
0.661107
false
3.701235
false
false
false
dmarley/tfrs
server/models/User.py
1
1571
""" REST API Documentation for the NRS TFRS Credit Trading Application The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation. OpenAPI spec version: v1 ...
apache-2.0
-2,166,037,394,678,073,900
40.342105
208
0.741566
false
4.167109
false
false
false
designcc/django-ccpages
ccpages/tests/test_listeners.py
1
3074
import os from unittest import skipUnless from decimal import Decimal from django.test import TestCase from django.conf import settings from django.core.files import File from ccpages.forms import PagePasswordForm from ccpages.models import Page, PageAttachment class ListenerTestCases(TestCase): @skipUnless(os.pa...
bsd-3-clause
8,473,854,025,559,766,000
32.053763
77
0.571893
false
3.570267
true
false
false
repotvsupertuga/tvsupertuga.repository
script.module.openscrapers/lib/openscrapers/sources_openscrapers/de/filmpalast.py
1
6036
# -*- coding: UTF-8 -*- # ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######. # .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....## # .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#....
gpl-2.0
9,050,439,875,432,628,000
40.061224
117
0.444997
false
3.638336
false
false
false
victorhahncastell/deepdiff
deepdiff/contenthash.py
1
8366
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import sys from collections import Iterable from collections import MutableMapping from collections import defaultdict from decimal import Decimal from hashlib import sha1 import logging from deep...
mit
5,563,972,840,234,503,000
29.421818
95
0.536338
false
4.069066
false
false
false
mrsamuelbarnes/Blockchain-Ballot
crypto.py
1
6940
# Import required modules import sys import random # Import custom modules import file # Definition for a public key class PublicKey: def __init__(self, n, g): # 'n' is a product of the two primes chosen for the key self.n = n # 'g' is the public exponent used to encrypt messages ...
mit
-8,274,426,283,300,570,000
25.48855
110
0.63415
false
3.823691
false
false
false
intel-analytics/analytics-zoo
pyzoo/zoo/pipeline/api/keras/optimizers.py
1
4419
# # Copyright 2018 Analytics Zoo Authors. # # 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
-793,365,526,256,598,700
32.732824
94
0.61394
false
4.13377
false
false
false
arenadata/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/services/HIVE/package/scripts/hive_server_upgrade.py
1
8007
""" 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 use this ...
apache-2.0
-3,441,732,457,333,918,700
46.1
138
0.749594
false
3.745089
false
false
false
xgfone/snippet
snippet/example/python/project/project/common/utils.py
1
2500
# encoding: utf-8 from __future__ import absolute_import, print_function, unicode_literals, division import pbr.version from six import text_type as unicode_type from six import string_types as basestring_type from six import binary_type as bytes_type _BYTES_TYPES = (bytes_type, type(None)) _UNICODE_TYPES ...
mit
5,995,021,948,278,806,000
34.231884
82
0.6908
false
4.098361
false
false
false
maralorn/pythonlights
sound.py
1
1790
#!/usr/bin/python # open a microphone in pyAudio and get its FFT spectrum import pyaudio import numpy as np FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 INPUT_BLOCK_TIME = 0.08 GLIDING_DIVIDER = 4 INPUT_FRAMES_PER_BLOCK = int(RATE*INPUT_BLOCK_TIME/GLIDING_DIVIDER) soundtype = np.dtype([('l',np.int16),('r',...
mit
-6,446,139,762,912,498,000
29.862069
76
0.569832
false
3.572854
false
false
false
infoxchange/barman
barman/lockfile.py
1
9546
# Copyright (C) 2011-2017 2ndQuadrant Limited # # This file is part of Barman. # # Barman 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 versio...
gpl-3.0
-7,858,874,542,976,082,000
32.261324
79
0.610937
false
4.125324
false
false
false
leonsas/django-push-notifications
push_notifications/gcm.py
1
4098
""" Google Cloud Messaging Previously known as C2DM Documentation is available on the Android Developer website: https://developer.android.com/google/gcm/index.html """ import json try: from urllib.request import Request, urlopen from urllib.parse import urlencode except ImportError: # Python 2 support from urlli...
mit
1,631,497,409,407,225,000
27.068493
120
0.724012
false
3.135425
false
false
false