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
google-research/google-research
single_view_mpi/libs/geometry.py
1
23328
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
6,051,238,215,533,420,000
33.343152
81
0.65869
false
3.26963
false
false
false
mgerstner/backintime
common/logger.py
1
3763
# Back In Time # Copyright (C) 2008-2017 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze # # 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...
gpl-2.0
4,494,096,716,557,691,400
36.257426
133
0.652405
false
3.162185
false
false
false
vincentadam87/gatsby-hackathon-seizure
code/python/seizures/examples/cross_validation_test.py
1
5173
''' Created on 10 August 2014 @author: vincent ''' # Loading necessary packages import numpy as np import sys from seizures.data.DataLoader_v2 import DataLoader from seizures.evaluation.XValidation import XValidation from seizures.evaluation.performance_measures import accuracy, auc from seizures.features.FeatureExt...
bsd-2-clause
6,804,000,983,729,179,000
38.792308
135
0.70462
false
3.359091
false
false
false
elena/django
django/conf/global_settings.py
6
22349
""" Default Django settings. Override these with settings in the module pointed to by the DJANGO_SETTINGS_MODULE environment variable. """ # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. def gettext_noop(s): return s ####...
bsd-3-clause
7,911,465,464,581,487,000
33.648062
101
0.687489
false
3.419217
false
false
false
IMIO/django-fixmystreet
django_fixmystreet/fixmystreet/views/reports/subscribers.py
1
2154
from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect from django.utils.translation import ugettext as _ from django.contrib import messages from django.db import IntegrityError from django_fixmystreet.fixmystreet.models import FMSUser from django_fixmystreet.fixmystreet.models ...
agpl-3.0
3,971,464,901,499,527,000
42.959184
235
0.749304
false
4.048872
false
false
false
tharwan/CoopCPS
mpi_result_plot.py
1
2363
#!/usr/bin/env python # -*- coding: UTF-8 -*- from utilities import * from image_database import saveFiguesWithData from sys import argv, exit from numpy import load import argparse import seaborn as sns from os import path as pathtools parser = argparse.ArgumentParser(description='process data from cluster') parser...
mit
3,038,978,000,681,454,000
26.16092
114
0.677529
false
2.763743
false
false
false
robertsj/poropy
pyqtgraph/examples/GraphicsScene.py
1
1462
# -*- coding: utf-8 -*- ## Add path to library (just for examples; you do not need this) import sys, os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) from pyqtgraph.Qt import QtCore, QtGui import pyqtgraph as pg from pyqtgraph.GraphicsScene import GraphicsScene app = QtGui.QApplication([]) w...
mit
6,903,885,841,460,964,000
21.492308
71
0.620383
false
3.315193
false
false
false
interpss/DeepMachineLearning
ipss.dml/py/c_graph/single_net/predict_voltage5.py
1
3237
''' Copyright (C) 2005-17 www.interpss.org 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 b...
apache-2.0
-7,357,071,836,146,111,000
27.162162
87
0.623417
false
3.378914
true
false
false
lzw120/django
mysite/mysite/settings.py
1
5565
# Django settings for mysite project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '/Users/...
bsd-3-clause
-9,091,811,255,458,302,000
34.44586
140
0.679245
false
3.634879
false
false
false
willsirius/DualTreeRRTStartMotionPlanning
pythonVision2/userdefined.py
1
13777
import time import openravepy import sys import numpy as np from numpy import sin,cos import matplotlib.mlab as mlab import matplotlib.pyplot as plt # import random import transformationFunction as tf import kdtree import scipy.spatial as spatial import cgkit.all as cg # weight of quaternion in distance QWEIGHT = 0...
mit
-7,179,047,926,765,260,000
20.93949
112
0.605865
false
2.182322
false
false
false
Sendinel/Sendinel
sendinel/notifications/forms.py
1
1461
from django.forms import CharField, ModelChoiceField, DateTimeField, Form from django.utils.translation import ugettext as _ from sendinel.backend.authhelper import format_and_validate_phonenumber from sendinel.backend.models import Sendable, \ WayOfCommunication, \ ...
mit
6,670,814,485,201,891,000
46.129032
80
0.543463
false
5.492481
false
false
false
Septima/qgis-qlrbrowser
src/QlrBrowser/mysettings/qgissettingmanager/types/integer.py
1
3535
#----------------------------------------------------------- # # QGIS setting manager is a python module to easily manage read/write # settings and set/get corresponding widgets. # # Copyright : (C) 2013 Denis Rouzaud # Email : denis.rouzaud@gmail.com # #-------------------------------------------------------...
gpl-2.0
-6,054,332,582,927,886,000
34
142
0.645545
false
4.316239
false
false
false
DINA-Web/datasets
collections-data/transformations/prepare_geography.py
1
4838
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import numpy import pandas """ Script for preparing geography data. Writes output to geography.csv. Run from commandline, like this: prepare_geography.py treedef_filename basetree_filename [--sweden filename] """ def append_country_geog...
cc0-1.0
-5,945,689,383,502,212,000
31.039735
79
0.622778
false
3.450785
false
false
false
jeKnowledge/horarios-inforestudante
TimetableMaker.py
1
8893
from itertools import combinations # Recebe dicionario de aulas de estrutura: # { CLASS_ID:{ # T:{ # CLASS_T1, # CLASS_T... # }, # TP:{ # CLASS_TP... # }, # ... # }, ... # } # Devolve array de todas as combinacoes de turmas possiveis # Refere-se aos elemen...
mit
-8,867,499,705,870,523,000
29.337884
117
0.540279
false
3.071182
false
false
false
pinballwizard/phone
sms/migrations/false/0005_subscriber.py
1
1070
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-24 04:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sms', '0004_smssended_delivered'), ] operations = [ migrations.CreateModel( ...
lgpl-3.0
-2,315,646,766,958,779,400
33.655172
114
0.566169
false
3.513986
false
false
false
googlecodelabs/nest-tensorflow
codelab/classify.py
1
3339
#!/usr/bin/python # # Copyright 2017 Google 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 a...
apache-2.0
8,367,322,700,183,847,000
30.5
84
0.649596
false
3.91442
false
false
false
mikejthomas/biote100_pset2
mode.py
1
2238
#Python Problem 3 #mode.py #Introduction to Bioinformatics Assignment 2 #Purpose:Calculating the mode of a dataset #Your Name: Michael Thomas #Date: 10/12/15 #will contain all the data of a list including some unwanted carriage return symbols tempList = [] #will contain the data as floats after it is stripped and the ...
mit
-4,476,699,867,430,466,000
28.447368
118
0.743074
false
3.238784
false
false
false
ddragon15/Overlooked-OvercookedFangame-WIP-
items.py
1
4159
import pygame from pygame.locals import * import math import random import magic class All(): DebugBool = False DebugV = [0,0] isHold = False isOccupied = False processable = True def Draw(self): playerrot = pygame.transform.rotate(self.image ,self.rot) playerpos1 = (self.pos...
gpl-3.0
3,271,743,681,788,671,000
29.580882
89
0.582592
false
3.182096
false
false
false
caneruguz/osf.io
api/base/settings/defaults.py
1
8833
""" Django settings for api project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os from url...
apache-2.0
4,021,562,499,466,621,400
29.458621
113
0.681535
false
3.323175
true
false
false
mozilla/stoneridge
wpr/httparchive.py
1
25649
#!/usr/bin/env python # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
mpl-2.0
3,875,306,886,947,456,500
33.707713
80
0.644859
false
3.841396
false
false
false
georgistanev/django-dash
src/dash/contrib/plugins/rss_feed/dash_plugins.py
1
1179
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>' __copyright__ = 'Copyright (c) 2013 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('BaseReadRSSFeedPlugin',) from django.utils.translation import ugettext_lazy as _ from dash.base import BaseDashboardPlugin from dash.factory import plugin_fac...
gpl-2.0
3,955,246,857,589,229,600
35.84375
82
0.46056
false
4.465909
false
false
false
cleobulo/site-mapp2
crawl/linkanalyzer.py
1
4873
#!/usr/bin/python # -*- coding: utf-8 -*- #author Cleóbulo Bezerra < cleobulo.oliveira@gmail.com > #file Defines a set of proceeds to verify the authenticity of the urls from re import match, split, sub, search from Queue import Queue from urlparse import urljoin, urlparse def init(): """ Initializes t...
mit
4,591,837,217,795,273,000
27.828402
103
0.562192
false
3.721925
false
false
false
nojhan/weboob-devel
modules/cuisineaz/pages.py
1
4451
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 # (at your op...
agpl-3.0
3,232,280,561,110,571,500
36.720339
166
0.611773
false
3.663374
false
false
false
jhseu/tensorflow
tensorflow/python/debug/lib/source_utils.py
1
13967
# Copyright 2016 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
5,331,100,872,048,130,000
35.467363
80
0.658695
false
3.690092
false
false
false
markreidvfx/pyaaf_old
docs/parse_aaf_header.py
1
2348
import pickle def parse_aaf_header(header_path, dest_path=None): if not dest_path: dest_path = 'docs.pkl' f = open(header_path, 'r') header = f.read() f.close() comments = "" interface = {} current = None for line in header.splitlines(): ...
mit
-8,351,774,476,693,415,000
25.681818
94
0.405877
false
4.667992
false
false
false
facebook/mcrouter
mcrouter/test/test_latency_injection_route.py
1
1957
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from datetime import datetime from mcrouter.test.MCProcess import Memcached from mcrouter.test.McrouterTestCase import...
mit
7,733,254,879,666,440,000
33.946429
80
0.663771
false
3.590826
true
false
false
gooddata/openstack-nova
nova/conf/vnc.py
1
9039
# Copyright (c) 2010 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
-2,166,768,096,561,270,300
29.640678
79
0.708043
false
3.856229
false
false
false
shreyshahi/ghofAtkinson
ghofAtkinson/model.py
1
2759
import numpy as np PERIODS = np.array([0.01, 0.07, 0.09, 0.11, 0.14, 0.18, 0.22, 0.27, 0.34, 0.42, 0.53, 0.65, 0.81, 1.01, 1.25, 1.56, 1.92, 2.44, 3.03, 3.7, 4.55, 5.88, 7.14, 9.09]) c1 = [-0.00219, -0.00236, -0.00244, -0.00245, -0.0024, -0.00235, -0.00235, -0.00233, -0.00231, -0.00224, -0.00213, -0.002, -0.00183, -0...
mit
1,697,952,010,962,822,000
58.978261
243
0.538238
false
1.841789
false
false
false
rancher/cattle
tests/integration/cattletest/core/test_volume.py
1
14377
from random import choice from string import hexdigits from common_fixtures import * # NOQA from gdapi import ApiError from gdapi import ClientApiError VOLUME_CLEANUP_LABEL = 'io.rancher.container.volume_cleanup_strategy' def test_volume_cant_delete_active(client, context): c = client.create_container(imageUui...
apache-2.0
3,075,792,182,796,224,500
36.054124
79
0.634555
false
3.491258
true
false
false
robmcmullen/peppy
peppy/major_modes/flagship.py
1
1808
# peppy Copyright (c) 2006-2009 Rob McMullen # Licenced under the GPLv2; see http://peppy.flipturn.org for more info """FlagShip programming language editing support. Major mode for editing FlagShip files. Supporting actions and minor modes should go here only if they are uniquely applicable to this major mode and ca...
gpl-2.0
-6,349,689,533,123,834,000
33.113208
86
0.722898
false
3.637827
false
false
false
springload/wagtailmodeladmin
wagtailmodeladmin/views.py
1
30988
import sys import operator from collections import OrderedDict from functools import reduce from django.db import models from django.db.models.fields.related import ForeignObjectRel from django.db.models.constants import LOOKUP_SEP from django.db.models.sql.constants import QUERY_TERMS from django.shortcuts import get...
mit
5,287,674,027,923,612,000
37.209618
79
0.595134
false
4.258348
false
false
false
iamahuman/angr
angr/exploration_techniques/loop_seer.py
1
6356
import logging from . import ExplorationTechnique from ..knowledge_base import KnowledgeBase from ..knowledge_plugins.functions import Function l = logging.getLogger(name=__name__) class LoopSeer(ExplorationTechnique): """ This exploration technique monitors exploration and maintains all loop-related d...
bsd-2-clause
-423,667,648,311,579,200
41.373333
137
0.575519
false
4.146119
false
false
false
emidln/django_roa
django_roa/db/exceptions.py
1
2114
from django.conf import settings from django.utils.html import strip_tags from django.utils.text import unescape_entities from django.utils.encoding import force_unicode ROA_DJANGO_ERRORS = getattr(settings, 'ROA_DJANGO_ERRORS', False) class ROAException(Exception): def __init__(self, exception): if ROA_D...
bsd-3-clause
5,526,580,686,477,947,000
38.886792
78
0.544465
false
4.136986
false
false
false
hunter-87/binocular-dense-stereo
StereoVision-master/stereovision/ui_utils.py
1
9561
# Copyright (C) 2014 Daniel Lee <lee.daniel.1986@gmail.com> # # This file is part of StereoVision. # # StereoVision 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 you...
gpl-2.0
6,180,144,040,576,407,000
39.858974
80
0.633616
false
4.15515
false
false
false
Affirm/cabot
cabot/cabotapp/monitor.py
1
1567
from celery.signals import task_success, task_failure from django.conf import settings import logging logger = logging.getLogger(__name__) try: from boto.ec2 import cloudwatch if not settings.AWS_CLOUDWATCH_SYNC: CONNECTION = None else: region = settings.AWS_CLOUDWATCH_REGION acce...
mit
-6,029,229,335,493,826,000
25.116667
63
0.635609
false
3.869136
false
false
false
kylebegovich/ProjectEuler
Python/Solved/Page2/Problem60.py
1
2031
from Euler import prime_sieve, is_prime result = int(100000000) primes = prime_sieve(30000) pairs = None def concat(first, second): return int(str(first) + str(second)) def make_pairs(list_of_primes): pairs = list() if list_of_primes is None: return for elem in list_of_primes: for ...
gpl-3.0
8,671,600,554,278,434,000
27.605634
113
0.529296
false
3.47774
false
false
false
Pavel-Durov/pynetwork
pynetwork/mail.py
1
6010
"""Script for generating mail content and sending emails to gmail accounts""" import smtplib import chart import time import fsutil import timeutil import logging from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders from jin...
mit
7,932,398,313,926,550,000
34.988024
99
0.582196
false
4.139118
true
false
false
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/horovod/horovod/tensorflow/compression.py
1
3057
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # Modifications copyright (C) 2017 Uber Technologies, 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.apa...
apache-2.0
-451,647,372,317,546,940
34.546512
80
0.649984
false
4.739535
false
false
false
fuzeman/plex.py
plex/objects/library/metadata/clip.py
1
1956
from plex.objects.core.base import Property from plex.objects.library.metadata.base import Metadata from plex.objects.library.metadata.photo import PhotoAlbum from plex.objects.library.video import Video class Clip(Video, Metadata): grandparent = Property(resolver=lambda: Clip.construct_grandparent) parent = ...
mit
7,442,453,030,430,962,000
27.764706
76
0.534765
false
4.289474
false
false
false
hnlaomie/python-tools
util/file/build_report.py
1
2895
# -*- coding: utf-8 -*- import os, sys, csv def get_order_list(order_file: str) -> [] : order_list = [] with open(order_file, "r") as csv_input: reader = csv.reader(csv_input) for row in reader: order_list.append(row[0]) return order_list def save_report(data: [], order_id: s...
mit
-8,762,075,644,433,950,000
32.674419
84
0.559585
false
3.438242
false
false
false
danielquinn/paperless
src/paperless/settings.py
1
11187
""" Django settings for paperless project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import jso...
gpl-3.0
-3,477,589,117,054,092,300
32
131
0.699026
false
3.353417
false
false
false
rbuffat/pyidf
tests/test_externalinterfacefunctionalmockupunitexporttoschedule.py
1
1925
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.external_interface import ExternalInterfaceFunctionalMockupUnitExportToSchedule log = logging.getLogger(__name__) class TestExternalInterfaceFunctionalMockupUnitExportToSchedule...
apache-2.0
7,666,285,236,414,696,000
37.52
147
0.720519
false
3.767123
false
false
false
facebookexperimental/eden
eden/hg-server/tests/test-command-template-t.py
1
121759
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) Mercurial Contributors. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # isort:skip_file from __future__ import absolute_import import da...
gpl-2.0
-8,763,705,720,192,593,000
28.222463
604
0.572474
false
2.728079
true
false
false
evolaemp/northeuralex_website
northeuralex/datatables.py
1
6527
from clld.db.meta import DBSession from clld.web.datatables.base import Col, IntegerIdCol, LinkToMapCol, LinkCol from clld.web.util.helpers import external_link, link, map_marker_img from clld.web.util.htmllib import HTML from clld.web import datatables from northeuralex.models import Concept, Doculect, Word """ Co...
mit
-2,206,149,159,916,614,000
28.251121
95
0.619807
false
3.660494
false
false
false
opena11y/fae2
fae2/populate/pop_wcag20.py
1
10340
""" Copyright 2014-2016 University of Illinois 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 writ...
apache-2.0
-2,793,003,747,385,330,700
43.377682
241
0.583462
false
3.41029
false
false
false
cberridge/trappetroll
src/audio_player.py
1
3668
''' Play mp3s and also call a function to move the mouth when the mp3 starts to play ''' import time import os import random import glob import pygame import moves_play class AudioPlayer(object): '''-''' def __init__(self, mouth_callback): '''-''' pygame.mixer.init() pygame.m...
gpl-2.0
2,995,576,482,805,124,600
32.345455
77
0.526445
false
3.927195
false
false
false
jardiacaj/finem_imperii
world/management/commands/initialize_world.py
1
1240
import logging from django.core.management.base import BaseCommand, CommandError from world.initialization import initialize_world, AlreadyInitializedException from world.models.geography import World class Command(BaseCommand): help = 'Initializes the specified world' def add_arguments(self, parser): ...
agpl-3.0
-7,105,990,472,116,270,000
30
78
0.53871
false
5.232068
false
false
false
ganga-devs/ganga
ganga/GangaCore/test/GPI/TestStartUp.py
1
2097
import os import inspect import sys import shutil import glob from tempfile import mkdtemp # First clear away any configurations and temp files which may not be present on first launch homeDir = os.path.expanduser("~") if os.path.exists(os.path.join(homeDir, '.gangarc')): os.unlink(os.path.join(homeDir, '.gangarc...
gpl-2.0
2,743,772,439,762,664,000
29.838235
134
0.702909
false
3.291994
true
false
false
madscatt/zazzie_1.5
trunk/sassie/analyze/apbs/apbs.py
1
12389
''' SASSIE: Copyright (C) 2011 Joseph E. Curtis, Ph.D. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-3.0
-7,442,169,570,840,521,000
31.688654
147
0.566309
false
3.255979
false
false
false
wurstmineberg/systemd-minecraft
minecraft/__init__.py
1
39178
#!/usr/bin/env python3 """Systemd init script for one or more vanilla Minecraft servers. Usage: minecraft [options] (start | stop | kill | restart | status | backup) [<world>...] minecraft [options] (update | revert) [<world> [snapshot <snapshot-id> | <version>]] minecraft [options] saves (on | off) [<world>......
mit
-1,580,113,770,325,115,400
45.52019
269
0.584146
false
4.257146
true
false
false
davidoj/RL_Aggregation
Agents.py
1
8730
''' Reinforcement learning agents. David Johnston 2015 ''' import numpy as np import collections import numbers import random random.seed(1) class OnlineAgent: """ Generic online agent class; executes e-greedy policy, looks up values """ def __init__(self,problem,epsilon=1e-1,tiles=False): ...
mit
-4,746,742,530,396,633,000
28.493243
89
0.548454
false
4.028611
false
false
false
SNeuhausen/training_management
models/resource_analysis/trainer_workload_analyzer.py
1
4295
# -*- coding: utf-8 -*- from openerp import api, models from openerp.addons.training_management.models.model_names import ModelNames from openerp.addons.training_management.utils.date_utils import DateUtils class TrainerWorkloadAnalyzer(models.AbstractModel): _name = ModelNames.TRAINER_WORKLOAD_ANALYZER @ap...
gpl-3.0
-8,989,901,224,261,650,000
41.524752
104
0.618859
false
3.546656
false
false
false
petrblahos/pyramid_locmako
pyramid_locmako/scaffolds/__init__.py
1
1383
import subprocess import sys from pyramid.scaffolds import PyramidTemplate class LocmakoTemplate(PyramidTemplate): _template_dir = 'pyramid_locmako' summary = 'pyramid project with Mako and Localization' def post(self, command, output_dir, vars): print "=== POST", command, output_dir, vars ...
mit
-4,874,192,753,432,911,000
40.909091
101
0.62979
false
3.841667
false
false
false
turbokongen/home-assistant
homeassistant/components/bond/config_flow.py
1
4278
"""Config flow for Bond integration.""" import logging from typing import Any, Dict, Optional from aiohttp import ClientConnectionError, ClientResponseError from bond_api import Bond import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import ( CONF_ACCESS_TOKEN, ...
apache-2.0
4,549,398,951,194,947,600
32.421875
78
0.63511
false
4.047304
true
false
false
ubuntu-core/snapcraft
snapcraft/internal/sources/_base.py
1
5773
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015-2017 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
-2,380,685,263,678,600,000
34.417178
86
0.63208
false
4.373485
false
false
false
looopTools/sw9-source
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/Tools/waf_unit_test.py
1
5372
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys from waflib.TaskGen import feature,after_method,taskgen_method from waflib import Utils,Task,Logs,Options from waflib.Tools import ccroot testlock=Utils.threading.Lock() SCRIPT_TEMPLATE...
mit
-4,228,622,893,590,671,400
36.566434
203
0.698436
false
2.761954
true
false
false
Strubbl/matekate
refresh.py
1
3413
#!/usr/bin/python import cgi import logging import urllib2 import simplejson import os import sys try: loglevel = sys.argv[1] except IndexError: loglevel = None if loglevel == '-d': logging.basicConfig(level=logging.DEBUG) logging.debug('set logging lvl to debug') scriptdir = os.path.dirname(os.path.abspath(_...
gpl-3.0
2,305,478,928,946,069,800
33.13
165
0.572224
false
2.947323
false
false
false
IBM-Security/ibmsecurity
ibmsecurity/isam/base/cluster/trace.py
1
1483
import logging logger = logging.getLogger(__name__) requires_model="Appliance" try: basestring except NameError: basestring = (str, bytes) def get(isamAppliance, check_mode=False, force=False): """ Retrieve the tracing levels """ return isamAppliance.invoke_get("Retrieve the tracing levels",...
apache-2.0
-4,713,544,688,860,106,000
25.963636
94
0.612272
false
3.802564
false
false
false
gov-cjwaszczuk/notifications-admin
app/notify_client/notification_api_client.py
1
2954
from app.notify_client import _attach_current_user, NotifyAdminAPIClient class NotificationApiClient(NotifyAdminAPIClient): def __init__(self): super().__init__("a" * 73, "b") def init_app(self, app): self.base_url = app.config['API_HOST_NAME'] self.service_id = app.config['ADMIN_CLIE...
mit
5,493,466,503,666,718,000
35.925
114
0.578876
false
4.068871
false
false
false
NaohiroTamura/python-ironicclient
ironicclient/common/http.py
1
25914
# Copyright 2012 OpenStack LLC. # 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 b...
apache-2.0
5,864,973,488,052,471,000
39.873817
175
0.575095
false
4.25657
false
false
false
dpineo/gadann
gadann/layer.py
1
22760
# # GADANN - GPU Accelerated Deep Artificial Neural Network # # Copyright (C) 2014 Daniel Pineo (daniel@pineo.net) # # 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 restricti...
mit
3,916,060,930,377,858,000
34.532905
184
0.564587
false
3.750824
false
false
false
denfromufa/mipt-course
pysandbox/torrent_dht_demo_test.py
1
9817
# Copyright (c) 2012 Timur Iskhodzhanov and MIPT students. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import hashlib import logging import os import random import re import sys import Queue # Renamed to queue in 3.0 import uni...
bsd-3-clause
1,982,451,436,412,792,600
33.205575
81
0.640522
false
3.506071
true
false
false
GoogleCloudPlatform/datacatalog-connectors-bi
google-datacatalog-sisense-connector/src/google/datacatalog_connectors/sisense/prepare/datacatalog_tag_template_factory.py
1
12677
#!/usr/bin/python # # Copyright 2021 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 ag...
apache-2.0
1,877,983,408,668,116,500
45.951852
78
0.441587
false
5.403666
false
false
false
schettino72/serveronduty
websod/database.py
1
1071
import os from sqlalchemy import create_engine, MetaData from sqlalchemy.orm import scoped_session, sessionmaker metadata = MetaData() def get_sa_db_uri(driver='', username='', password='', host='', port='', database=''): """get SQLAlchemy DB URI: driver://username:password@host:port/database""" assert driv...
mit
8,379,561,955,119,394,000
27.184211
86
0.577031
false
4.026316
false
false
false
blinkseb/script.tv.betaseries
json.py
1
10173
import string import types ## json.py implements a JSON (http://json.org) reader and writer. ## Copyright (C) 2005 Patrick D. Logan ## Contact mailto:patrickdlogan@stardecisions.com ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser Genera...
gpl-2.0
-2,107,853,004,309,323,000
31.710611
136
0.505751
false
3.992543
false
false
false
datamade/rlr
rlr/crossvalidation.py
1
4227
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division from builtins import range import numpy import logging import warnings import collections logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def gridSearch(examples, labels, learner, ...
bsd-3-clause
3,518,832,934,487,426,000
29.410072
82
0.588597
false
4.131965
false
false
false
podbregarb/prvi-projekt
prop.py
1
48496
#!/usr/bin/python # -*- coding: utf-8 -*- import re # Združljivost za Python 2 in Python 3 try: basestring except NameError: basestring = str # Ali naj se seznami konjunktov in disjunktov sortirajo? # Nastavi na list za nesortiranje # Nastavi na sorted za sortiranje sortSet = sorted def paren(s, level, expl...
bsd-3-clause
7,319,391,701,429,646,000
33.434596
252
0.555154
false
2.901174
false
false
false
warnes/irrigatorpro
irrigator_pro/farms/signals.py
1
11745
from django.dispatch import receiver from django.db.models.signals import * from farms.models import * from irrigator_pro.settings import DEBUG def minNone( *args ): args = filter( lambda x: x is not None, args) if args: return min(args) else: return None ## From ## http://stackoverflow...
mit
-8,849,396,207,397,116,000
42.66171
111
0.558791
false
4.28337
false
false
false
alex/sentry
tests/sentry/web/frontend/tests.py
1
15481
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import json from django.conf import settings as django_settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from sentry.conf import settings from sentry.models import Group, Project, TeamMember...
bsd-3-clause
-5,759,128,192,834,405,000
41.647383
148
0.63284
false
3.800884
true
false
false
ocefpaf/pycsw
pycsw/plugins/outputschemas/__init__.py
1
1360
# -*- coding: ISO-8859-15 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2015 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files...
mit
4,767,057,192,456,334,000
42.870968
67
0.677206
false
4.401294
false
false
false
BrewCenter/BrewCenterAPI
brewcenter_api/brew_data/data_miner/brew_target/yeast.py
1
3040
from brew_data.data_miner.brew_target.utils import clean class Yeast: def __init__(self, data): self.name = data[0] self.type = data[1] self.form = data[2] self.lab = data[3] self.min_temp = data[4] self.max_temp = data[5] self.flocculation = data[6] ...
gpl-3.0
-3,451,735,403,440,097,000
31.688172
170
0.500329
false
3.543124
false
false
false
TataneInYourFace/wefill
app/forms/order_form.py
1
1471
# -*- coding: utf-8 -*- import datetime from django import forms GAS_QUANTITY = ( ('20', '20 Litres'), ('25', '25 Litres'), ('30', '30 Litres'), ('35', '35 Litres'), ('40', '40 Litres'), ('45', '45 Litres'), ('50', '50 Litres'), ('55', '55 Litres'), ('60', '60 Litres'), ) class ...
mit
3,933,943,561,269,895,700
33.97619
113
0.577263
false
3.497619
false
false
false
CoBiG2/RAD_Tools
segregating_loci_finder.py
1
3130
#!/usr/bin/env python3 # Copyright 2018 Francisco Pina Martins <f.pinamartins@gmail.com> # segregating_loci_finder.py 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 ...
gpl-3.0
-5,112,938,407,795,405,000
30.938776
84
0.602875
false
3.552781
false
false
false
xavi783/u-tad
Modulo8/modules/data/main.py
1
1377
# -*- coding: utf-8 -*- """ Created on Fri Nov 28 17:28:20 2014 @author: xavi783 """ import json import numpy as np import pandas as pd import pandas.io.data as web import datetime as dt from tornado.web import RequestHandler START_DATE=dt.datetime(2000,1,1) NAMES = ['AAPL','XOM','MSFT','JNJ','BRK.B','WFC','GE','PG'...
gpl-3.0
-2,924,266,324,681,359,400
31.809524
138
0.660857
false
3.053215
false
false
false
phiros/nepi
src/nepi/resources/ns3/ns3propagationdelaymodel.py
1
1830
# # NEPI, a framework to manage network experiments # Copyright (C) 2014 INRIA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
gpl-3.0
-5,356,266,568,432,127,000
32.888889
87
0.693443
false
3.893617
false
false
false
tlambert03/grouper
test.py
1
1056
import grouper as G from multiprocessing import Pool import sys cores = 8 if len(sys.argv) < 2 else int(float(sys.argv[1])) iterations_per_thread = 1000 if len(sys.argv) < 3 else int(float(sys.argv[2])) n = G.params.numrotations stations = G.params.stations if __name__ == '__main__': p = Pool(processes=cores) ...
mit
-1,905,808,509,131,380,000
26.102564
108
0.569129
false
3.28972
false
false
false
tschalch/pyTray
src/gui/error_window.py
1
2153
#!/usr/bin/env python2.3 """ Error window that pops up and displays unhandled errors """ from wx.lib.dialogs import * import wx import sys, traceback class ErrorDialog(wx.Dialog): def __init__(self, parent, msg, caption, pos=wx.DefaultPosition, size=(500,300), ...
bsd-3-clause
2,089,554,167,221,337,300
29.691176
155
0.51974
false
3.523732
false
false
false
mgrygoriev/CloudFerry
cloudferrylib/os/discovery/stages.py
1
2752
# Copyright 2016 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
apache-2.0
-3,448,828,013,168,188,400
34.282051
76
0.616642
false
4.417335
true
false
false
daatrujillopu/Sfotipy
actions.py
1
1933
__author__ = 'danny' import csv import logging import tablib from datetime import datetime from django.db.models import Model from django.db.models.fields.files import FieldFile from unicodedata import normalize from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.templat...
mit
-5,425,386,611,052,412,000
31.233333
97
0.612519
false
3.985567
false
false
false
stefan-jonasson/home-assistant
homeassistant/components/zwave/node_entity.py
1
8320
"""Entity class that represents Z-Wave node.""" import logging from homeassistant.core import callback from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_WAKEUP, ATTR_ENTITY_ID from homeassistant.helpers.entity import Entity from homeassistant.util import slugify from .const import ( ATTR_NODE_ID, COMMAND_C...
mit
3,290,718,244,363,379,000
33.238683
79
0.608053
false
3.873371
false
false
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/topological.py
1
11300
# topological.py # Copyright (C) 2005, 2006, 2007 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Topological sorting algorithms. The topological sort is an algorithm that receives this list of ...
bsd-3-clause
3,143,276,866,390,748,000
37.69863
111
0.549115
false
4.448819
false
false
false
gugarosa/LibKeras
train.py
1
3047
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='3' import common import gzip import matplotlib.pyplot as plt import numpy as np import pandas as pd import pickle as pkl import sys from data import load_data from itertools import product from os.path import join from sklearn.model_selection import train_test_split # Defa...
gpl-3.0
-7,683,564,740,032,855,000
32.119565
140
0.685921
false
2.955383
true
false
false
juanyunis/django-resumes
resumes/admin.py
1
1253
from django.contrib import admin from models import * class UserResumeEducationInline(admin.StackedInline): model = UserResumeEducation extra = 1 class UserResumeLanguageInline(admin.StackedInline): model = UserResumeLanguage extra = 1 class UserResumeInterestInline(admin.StackedInline): model ...
mit
-1,410,418,413,467,217,700
24.591837
64
0.794094
false
3.915625
false
false
false
rhd/meson
mesonbuild/backend/ninjabackend.py
1
122266
# Copyright 2012-2016 The Meson development team # 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
4,618,508,688,966,883,000
48.26108
132
0.579532
false
4.051763
false
false
false
Tejal011089/med2-app
selling/utils/__init__.py
1
63144
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _, throw from webnotes.utils import flt, cint from webnotes.utils import load_json, nowdate, cstr from webnotes....
agpl-3.0
-3,199,338,655,356,066,000
42.427785
684
0.564662
false
3.118684
false
false
false
Lydwen/Mr.Statamutation
Mr.Statapython/statapython/__main__.py
1
4758
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import sys import webbrowser from .statareport import Reporting from .stataspoon import MutationsTester from .statautils import Directory, Logger from .stataxml import ConfigParser """ Report filename """ REPORT_FILENAME = 'statam_report.html' ...
mit
-4,865,774,189,952,201,000
32.744681
116
0.592266
false
4.527117
true
false
false
luisza/async_notifications
async_notifications/mail_utils.py
1
1362
# encoding: utf-8 ''' Free as freedom will be 26/9/2016 @author: luisza ''' from __future__ import unicode_literals from .settings import (NOTIFICATION_USER_MODEL, USER_LOOKUP_FIELDS, NOTIFICATION_GROUP_MODEL, GROUP_LOOKUP_FIELDS) from .utils import extract_emails, get_model #from django.co...
gpl-2.0
476,110,698,621,409,200
27.375
81
0.637298
false
3.510309
false
false
false
greggyNapalm/lunaport_server
lunaport_server/plugg_views/HookRegistration.py
1
5396
# -*- encoding: utf-8 -*- """ lunaport.plugg_views.hook_registration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Class-based view for hook_registration resource. hook_registration - m2m connection case with hook. Rule to starte test. """ import json import pprint pp = pprint.PrettyPrinter(indent=4).pprint...
apache-2.0
-1,302,585,851,489,007,900
34.038961
96
0.509451
false
4.478008
false
false
false
redhat-openstack/glance
glance/api/v2/metadef_namespaces.py
1
28184
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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
8,594,759,101,912,330,000
36.983827
79
0.532749
false
4.582764
false
false
false
taufique71/widespace-job-manager
graph.py
1
1340
class Graph: def __init__(self, config): self.config = config self.vertices = list(config["jobs"].keys()) self.edges = [] self.outdegree = {} for key, value in config["dependencies"].items(): for val in value: self.edges.append( (key, val) ) ...
mit
6,338,988,099,701,754,000
26.916667
57
0.551493
false
3.929619
false
false
false
mhgp/convert_txts2lyx4shosetsukaninaro
cnv.py
1
5770
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import unicode_literals import os import io import re import codecs # カレントディレクトリのディレクトリ名 DIRECTORY_NAME = os.path.split(os.getcwd())[1] # def write_base_lyx_code(wf): wf.write("""#LyX 2.2 created this file. For more info see http://www.lyx.org/ \\lyxf...
mit
8,881,267,687,739,330,000
24.156951
151
0.604278
false
3.068928
false
false
false
moyaproject/moya
moya/namespaces.py
1
3357
from __future__ import unicode_literals """XML namespaces""" admin = "http://moyaproject.com/admin" auth = "http://moyaproject.com/auth" blog = "http://moyaproject.com/blog" comments = "http://moyaproject.com/comments" db = "http://moyaproject.com/db" default = "http://moyaproject.com" email = "http://moyaproject.co...
mit
2,579,244,657,551,941,000
33.608247
80
0.626154
false
3.2186
false
false
false
rspeer/csc-pysparse
examples/pysparse_test.py
1
8278
import math, os, sys, time import numpy as Numeric from pysparse import spmatrix from pysparse import itsolvers from pysparse import precon ll = spmatrix.ll_mat(5,5) print ll print ll[1,1] print ll ll[2,1] = 1.0 ll[1,3] = 2.0 print ll print ll.to_csr() print ll[1,3] print ll[1,-1] print ll.nnz ll.export_mtx('test.m...
bsd-2-clause
-5,013,317,756,455,400,000
28.35461
131
0.550374
false
2.435422
false
false
false
CivicKnowledge/ambry-ui
ambry_ui/session.py
1
1804
# Stolen from: http://flask.pocoo.org/snippets/51/ from werkzeug.datastructures import CallbackDict from flask.sessions import SessionInterface, SessionMixin from itsdangerous import URLSafeTimedSerializer, BadSignature class ItsdangerousSession(CallbackDict, SessionMixin): def __init__(self, initial=None): ...
bsd-3-clause
-1,761,448,075,511,564,300
33.056604
77
0.622506
false
4.274882
false
false
false
google-research/ssl_detection
third_party/FasterRCNN/FasterRCNN/modeling/model_box.py
1
7199
# -*- coding: utf-8 -*- # File: model_box.py import numpy as np import tensorflow as tf from collections import namedtuple from tensorpack.tfutils.scope_utils import under_name_scope from config import config @under_name_scope() def clip_boxes(boxes, window, name=None): """ Args: boxes: nx4, xyxy ...
apache-2.0
4,270,145,771,473,847,000
29.634043
80
0.600222
false
2.81982
false
false
false
christiankaiser/spatial-tools
src/v.to.raster/v.to.raster.py
1
4911
#!/usr/bin/env python """ Converts a vector layer to a raster """ __version__ = '1.0.0' __date__ = '2011-03-24' __author__ = 'Christian Kaiser <chri.kais@gmail.com>' import commands import math import osgeo.ogr as ogr import osgeo.gdal as gdal import osgeo.osr as osr from optparse import OptionParser import sys USA...
gpl-3.0
-648,093,374,068,651,400
29.314815
98
0.59438
false
3.470671
false
false
false
nfqsolutions/pylm
setup.py
1
2731
#!/usr/bin/env python from setuptools import setup __version__ = None with open('pylm/__init__.py') as f: exec(f.read()) long_description = """ Pylm ==== Pylm is the Python implementation of PALM, a framework to build clusters of high performance components. It is presented in two different levels of abstracti...
agpl-3.0
-3,243,969,502,929,084,000
34.467532
81
0.682534
false
3.998536
false
true
false
hubo1016/vlcp
vlcp/service/kvdb/objectdb.py
1
63427
''' Created on 2016/3/24 :author: hubo ''' from vlcp.config.config import defaultconfig import vlcp.service.kvdb.storage as storage import vlcp.service.kvdb.redisnotifier as redisnotifier from vlcp.server.module import depend, Module, call_api, api import vlcp.utils.dataobject as dataobj from vlcp.event.runnable impor...
apache-2.0
-3,423,474,057,507,028,500
50.19209
198
0.461097
false
4.913774
false
false
false
hhursev/recipe-scraper
recipe_scrapers/cucchiaio.py
1
1059
from ._abstract import AbstractScraper from ._utils import get_minutes, get_yields class Cucchiaio(AbstractScraper): @classmethod def host(cls): return "cucchiaio.it" def author(self): return self.schema.author() def title(self): return self.schema.title() def total_time...
mit
4,176,352,788,989,998,000
24.214286
87
0.581681
false
3.702797
false
false
false
googleapis/googleapis-gen
google/cloud/dialogflow/v2/dialogflow-v2-py/google/cloud/dialogflow_v2/services/conversations/async_client.py
1
26721
# -*- 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,202,350,069,784,333,000
41.7536
138
0.6258
false
4.711867
false
false
false