repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
kaonashi-tyc/zi2zi
model/unet.py
1
32928
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import tensorflow as tf import numpy as np import scipy.misc as misc import os import time from collections import namedtuple from .ops import conv2d, deconv2d, lrelu, fc, batch_norm, init_embedding, conditional_instan...
apache-2.0
-3,483,903,955,147,367,400
53.88
120
0.528426
false
nathanhilbert/FPA_Core
openspending/views/admin.py
1
1077
import colander from flask import Blueprint, render_template, request, redirect, Response from flask.ext.login import current_user from flask import current_app from openspending.auth import require from wtforms import Form, TextField, PasswordField, validators from openspending.model import Dataset from openspendi...
agpl-3.0
7,766,214,459,022,135,000
24.642857
90
0.704735
false
pingpan2013/sensor-box-project
sensor_project/genGraphs.py
1
4044
#!/usr/bin/python import matplotlib.pyplot as plt import matplotlib.dates as mdates import numpy as np import pandas as pd # used to convert datetime64 to datetime import csv import sys from mpl_toolkits.axes_grid1 import host_subplot import mpl_toolkits.axisartist as AA class Gen_Graph: def __init__(self, _...
gpl-3.0
6,884,106,537,588,109,000
30.348837
94
0.516815
false
opendatatrentino/ckan-api-client
ckan_api_client/tests/functional/client_lowlev/test_data_loss_on_update.py
1
2614
""" Here we test data loss when updating objects. In a perfect case, we should just be able to update things by passing in only the updates, but unfortunately we need to attach a lot more stuff in order to prevent them from being deleted. """ # ---------------------------------------------------------------------- # ...
bsd-2-clause
-6,517,960,197,875,200,000
34.808219
72
0.552028
false
FederatedAI/FATE
python/federatedml/nn/hetero_nn/backend/tf_keras/data_generator.py
1
1243
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
apache-2.0
3,918,844,614,413,614,600
24.367347
75
0.650845
false
michal-ruzicka/archivematica
src/archivematicaCommon/lib/databaseFunctions.py
1
14914
#!/usr/bin/python -OO # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, e...
agpl-3.0
1,886,681,623,791,319,000
43.12426
178
0.671584
false
dongweiming/flask_reveal
social/apps/django_app/default/models.py
1
2611
"""Django ORM models for Social Auth""" from django.db import models from django.conf import settings from django.db.utils import IntegrityError from social.utils import setting_name from social.storage.django_orm import DjangoUserMixin, \ DjangoAssociationMixin, \ ...
bsd-3-clause
-8,976,431,457,367,216,000
31.6375
76
0.646879
false
chromium/chromium
tools/android/native_lib_memory/java_code_pages_pss.py
7
2976
#!/usr/bin/env python # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Prints the total PSS attributed to another app in Chrome's mappings. This script assumes a device with Monochrome, and requires roo...
bsd-3-clause
-2,056,070,294,114,388,500
31.347826
78
0.679772
false
jalexvig/tensorflow
tensorflow/python/ops/rnn.py
1
62998
# Copyright 2015 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
2,907,007,333,491,746,300
40.473338
96
0.662418
false
Kuzapura/pypy
globals.py
1
1650
#!/usr/bin/python #-*- coding: utf-8 -*- # Author: Adrian Czapla # Date: 2016 ################################################################################ import pygame import pygame.image as img from pygame import transform ################################################################################ dis...
apache-2.0
-5,745,554,665,870,129,000
34.106383
105
0.58303
false
Azure/azure-sdk-for-python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py
1
122965
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
8,577,119,578,000,281,000
44.593252
710
0.653023
false
DLR-SC/tigl
bindings/java/make_tigl_java.py
1
2467
# -*-# coding: utf-8 -*- """ Created on Wed May 01 11:44:49 2013 @author: Martin Siggel <martin.siggel@dlr.de> """ from __future__ import print_function import sys, os from datetime import date tiglpath = os.path.dirname(os.path.realpath(__file__)) + '/../..' sys.path.append(tiglpath + '/bindings') import bindings_...
apache-2.0
3,887,434,982,440,820,000
28.023529
95
0.675719
false
gnovak/overheard
overheard/fetch.py
1
16979
######### # Notes # ######### # # Archive.org won't accept wget user agent string---it can be anything else # # When fetching source files from arxiv.org: # 0408420 gives most recent # 0408420vN gives version N # 0408420vN if N > number of versions gives most recent version # (the behavior is same for old and new...
mit
6,797,017,471,657,627,000
38.12212
98
0.649214
false
nextgis/nextgisweb_compulink
nextgisweb_compulink/compulink_video_producer/default_video_page.py
1
3503
from __future__ import print_function from time import sleep from datetime import datetime UNITS = ('Minutes', 'Hours', 'Days', 'Months') PHOTO = ('false', 'true') class DefaultVideoPage: _base_url = '/compulink/player/recording_video?resource_id={res_id}&units={units}&count_units={count_units}&photo={photo}' ...
gpl-2.0
-3,272,793,355,578,168,000
31.738318
143
0.601484
false
nushio3/UFCORIN
script/suntomorrow-AE/train_predictor.py
1
4659
#!/usr/bin/env python """Chainer example: autoencoder of a solar image. """ # c.f. # http://nonbiri-tereka.hatenablog.com/entry/2015/06/21/220506 # http://qiita.com/kenmatsu4/items/99d4a54d5a57405ecaf8 import argparse import numpy as np import operator import re import six import subprocess import random import cha...
mit
-2,319,461,076,983,837,700
27.937888
76
0.636403
false
frascoweb/easywebassets
easywebassets/assets.py
1
1303
from webassets import Environment, six from webassets.env import RegisterError from .package import Package class Assets(object): def __init__(self, env=None, **kwargs): if env: self.env = env else: self.env = Environment(**kwargs) self.packages = {} def regist...
mit
-8,230,702,585,525,816,000
30.047619
83
0.539524
false
pvtodorov/indra
indra/tools/reading/readers.py
1
29900
"""Objects for interacting with bulk nlp reading tools.""" from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import sys import shutil import re import tempfile import glob import json import logging import subprocess import zlib from os import path, mkdir, environ,...
bsd-2-clause
-9,117,507,397,536,953,000
36.704918
84
0.53097
false
luotao1/Paddle
python/paddle/fluid/tests/unittests/mkldnn/test_reduce_mkldnn_op.py
1
7454
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
7,532,327,643,227,592,000
37.42268
87
0.629729
false
obulpathi/cdn1
tests/functional/transport/pecan/base.py
1
1278
# Copyright (c) 2014 Rackspace, 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 wr...
apache-2.0
-4,533,810,800,330,797,600
30.170732
78
0.693271
false
google/compare-codecs
lib/libavc.py
1
2828
# Copyright 2015 Google. # # 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, softw...
apache-2.0
6,120,185,066,405,847,000
36.706667
80
0.644625
false
hydroshare/hydroshare
hs_core/tests/api/views/test_change_quota_holder.py
1
2171
import json from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from hs_core import hydroshare from hs_core.views import change_quota_holder from hs_core.testing import MockIRODSTestCaseMixin, ViewTestCase from hs_access_control.models import PrivilegeCodes class TestChangeQuot...
bsd-3-clause
1,839,330,057,208,989,400
37.767857
95
0.647167
false
codelv/enaml-native
src/enamlnative/android/android_card_view.py
1
2026
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on June 7, 2017 @author: jrm """ from atom.api import Typed, set_default from enamlnative.widgets.card_view import ProxyCardView from .android_fra...
mit
1,165,668,592,682,198,000
31.15873
79
0.572557
false
bretthandrews/marvin
python/marvin/tests/utils/test_dap.py
1
1889
#!/usr/bin/env python3 # encoding: utf-8 # # test_dap.py # # Created by José Sánchez-Gallego on 19 Sep 2016. from __future__ import division from __future__ import print_function from __future__ import absolute_import import unittest from marvin import config from marvin.tests import MarvinTest from marvin.utils.da...
bsd-3-clause
6,837,162,416,948,016,000
32.105263
88
0.695284
false
epicvrvs/craw_module
script/bncs.py
1
2263
import nil.string, nil.thread, utility, craw, packets, time, configuration, threading class bncs_packet_handler_class: def __init__(self): self.lock = threading.Lock() self.whois_name_queue = [] self.whois_handler_queue = [] self.account_map = {} self.entering_game = False self.has_thread = False def ...
gpl-3.0
1,690,256,831,581,942,000
29.186667
94
0.660186
false
quattor/aquilon
lib/aquilon/worker/commands/update_room.py
1
1367
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2016,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
apache-2.0
2,823,669,900,772,170,000
38.085714
76
0.716898
false
Open-Power-System-Data/conventional_power_plants
download_and_process_DE_functions.py
1
14757
# -*- coding: utf-8 -*- import urllib.parse import urllib.request import posixpath import datetime import os import logging import filecmp import difflib import json import sqlite3 import hashlib import yaml import matplotlib.pyplot as plt import pandas as pd import numpy as np #from bokeh.io import output_notebook # ...
mit
-2,219,552,584,659,425,300
36.812821
187
0.636604
false
mbreese/tabql
tabql/__init__.py
1
4777
# Copyright (c) 2014, Marcus Breese # 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 copyright notice, this # list of conditions and the...
bsd-3-clause
3,301,811,955,980,845,600
35.465649
157
0.589491
false
bwsw/moebius
examples/handlers.py
1
2035
import time import json import random from moebius.utils import sleep_async from moebius.errors import \ ConnectionSendError, \ HandlerProcessingError from moebius.server import Handler class StartHandler(Handler): @staticmethod def run(client, data): for i in range(10): try: ...
apache-2.0
336,725,424,554,225,000
22.941176
71
0.594103
false
nortorious-flame89/Movie_Website
entertainment_center.py
1
2595
import media import fresh_tomatoes # Instances from the base class 'Movie' __init__ function # Google URL shortner was used to make the URLs more manageable # and follow PEP8 Style Guide iron_giant = media.Movie("The Iron Giant", "Boy befriends a giant robot during the Cold War", ...
mit
5,438,155,041,154,323,000
41.540984
106
0.532563
false
HybridF5/jacket
jacket/compute/conf/conductor.py
1
1915
# 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
-8,136,491,807,294,262,000
29.887097
78
0.69295
false
orlenko/sfpirg
sfpirgapp/migrations/0002_auto__add_field_testimonial_user.py
1
12798
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Testimonial.user' db.add_column(u'sfpirgapp_testimonial', 'user', self...
bsd-2-clause
6,183,903,364,456,007,000
78.496894
187
0.54696
false
dustin/py-backpack
cgi/wapsupport.py
1
1430
#!/usr/bin/env /usr/local/bin/python """ WML support. Copyright (c) 2005 Dustin Sallings <dustin@spy.net> """ import sys import cgi import ConfigParser import backpack CONFIG_FILE="/usr/local/etc/backpack.conf" # Get the config loaded conf=ConfigParser.ConfigParser() conf.read(CONFIG_FILE) HEADER="""<?xml versio...
mit
2,400,140,651,592,449,000
23.237288
76
0.611189
false
EvenStrangest/tensorflow
tensorflow/examples/tutorials/mnist/mnist_with_summaries.py
1
7491
# Copyright 2015 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
1,014,393,407,829,823,700
39.934426
80
0.661327
false
robocomp/robocomp
tools/rcreplay/cloud.py
1
2670
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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...
gpl-3.0
-6,527,788,322,742,969,000
26.8125
76
0.746067
false
tuanvu216/udacity-course
intro_to_machine_learning/lesson/lesson_4_choose_your_own_algorithm/your_algorithm.py
1
2628
#!/usr/bin/python import matplotlib.pyplot as plt from prep_terrain_data import makeTerrainData from class_vis import prettyPicture from time import time features_train, labels_train, features_test, labels_test = makeTerrainData() ### the training data (features_train, labels_train) have both "fast" and "slow" point...
mit
-667,427,817,523,286,500
30.285714
99
0.711187
false
s3ishr/nlp100knock
chapter1/knock00.py
1
1274
#!/usr/bin/env python # -*- coding: utf-8 -*- # 00. 文字列の逆順 # 文字列 "stressed" の文字を逆に(末尾から先頭に向かって)並べた文字列を得よ. text = "stressed" answer = "desserts" # Case 1 ########## case1 = text[::-1] # str[start:end:step] : start から end まで step 毎の文字列を取得 # text[1:7:2] => "tes" (1 から 7 まで 2 文字毎) ...
mit
-3,072,670,048,608,120,300
25.682927
73
0.443327
false
vorband/ewsposter
moduls/einit.py
1
10609
#!/usr/bin/env python import ConfigParser import socket import argparse import os import sys from moduls.elog import logme from moduls.etoolbox import readcfg, readonecfg, getOwnExternalIP def ecfg(name,version): MODUL = "EINIT" ECFG= {} parser = argparse.ArgumentParser() parser.add_argument("-c","-...
gpl-3.0
1,198,840,189,248,871,700
31.246201
209
0.581959
false
geertj/rhevsh
setup.py
1
1294
# # This file is part of rhevsh. rhevsh is free software that is made # available under the MIT license. Consult the file "LICENSE" that is # distributed together with this file for the exact licensing terms. # # rhevsh is copyright (c) 2011 by the rhevsh authors. See the file # "AUTHORS" for a complete overview. impo...
mit
6,211,877,290,003,639,000
30.560976
74
0.634467
false
icereval/osf-sync
osfoffline/sync/local.py
1
6234
import logging from pathlib import Path import threading from watchdog.observers import Observer from sqlalchemy.orm.exc import NoResultFound from osfoffline import utils from osfoffline.utils.authentication import get_current_user from osfoffline.exceptions import NodeNotFound from osfoffline.sync.ext.watchdog impor...
lgpl-3.0
613,275,511,589,267,700
42.594406
108
0.620789
false
FiloSottile/Griffith-mirror
lib/plugins/movie/PluginMovieKinoDe.py
1
21800
# -*- coding: UTF-8 -*- __revision__ = '$Id$' # Copyright (c) 2006-2011 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
gpl-2.0
1,633,054,857,474,862,300
42.919355
117
0.492334
false
gspilio/nova
setup.py
1
2927
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
7,221,491,232,337,402,000
38.026667
78
0.604715
false
anenbergb/Footage-Manipulation
postprocessing/visualize.py
1
3850
import Image, ImageDraw import itertools import random import pdb import os defaultwidth = 1 colors = ["#FF00FF", "#FF0000", "#FF8000", "#FFD100", "#008000", "#0080FF", "#0000FF", "#000080", "#800080"] color_label_map = {'Pedestrian':colo...
mit
-6,719,373,337,939,552,000
28.615385
119
0.543896
false
brenthuisman/phd_tools
maskfileto4d.py
1
1057
#!/usr/bin/env python import sys,image from subprocess import call if len(sys.argv) < 2: print "Specify a maskfile." sys.exit() maskfile = sys.argv[-1] spacing = 2 size = 399 maskimagefile = sys.argv[-1][:-4]+'.mhd' spacingstr = str(spacing) sizeinvox = str(size/spacing) call(["rtkdrawgeometricphantom","--phantom...
lgpl-3.0
-4,783,733,606,612,285,000
39.692308
167
0.71807
false
CaliOpen/CaliOpen
src/backend/main/py.main/caliopen_main/tests/parsers/test_email.py
1
1710
import unittest import os from datetime import datetime from zope.interface.verify import verifyObject from caliopen_storage.config import Configuration import vobject if 'CALIOPEN_BASEDIR' in os.environ: conf_file = '{}/src/backend/configs/caliopen.yaml.template'. \ format(os.environ['CALIOPEN_...
gpl-3.0
8,288,541,058,513,852,000
31.264151
70
0.639766
false
jkirklan/agietst
remote/magic_emu.py
1
3684
#!/usr/bin/env python import sys import socket import fcntl import struct import array from time import sleep import subprocess import shlex from qpid.messaging import * #global vars broker_local = "localhost:5672" addr_control = "agie_inbound/agie_inbound_control" def pinger(iadr): # This pings the local interface ...
gpl-3.0
-4,934,059,153,742,142,000
28.472
107
0.630565
false
aspiers/ly2video
ly2video/utils.py
1
2831
#!/usr/bin/env python3 # coding=utf-8 # ly2video - generate performances video from LilyPond source files # Copyright (C) 2012 Jiri "FireTight" Szabo # Copyright (C) 2012 Adam Spiers # Copyright (C) 2014 Emmanuel Leguy # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
gpl-3.0
-5,907,988,846,029,149,000
22.991525
80
0.668668
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_vpn_link_connections_operations.py
1
6070
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
5,005,576,459,868,780,000
47.174603
236
0.646458
false
amozie/amozie
studzie/keras_gym/mountain_car_v0.py
1
2577
import numpy as np import matplotlib.pyplot as plt import gym import time import copy from keras.models import Sequential, Model from keras.layers import Dense, Activation, Flatten, Lambda, Input, Reshape, concatenate, Merge from keras.optimizers import Adam, RMSprop from keras.callbacks import History from keras imp...
apache-2.0
1,136,327,064,526,148,100
28.295455
112
0.698487
false
ghowland/gomh
_backups/gomh_010.py
1
12815
#!/usr/bin/env python import pygame import sys sprite_size = [85/2, 112/2] pygame.init() SCREEN_SIZE = (640, 480) screen = pygame.display.set_mode(SCREEN_SIZE) pygame.display.set_caption('Get Off My Head') #pygame.mouse.set_visible(0) image = pygame.image.load('sf_sprites.png') image = pygame.transform.scale(image...
mit
6,822,873,736,999,448,000
32.028351
171
0.647679
false
BigPoppaG/CourseMe
db_data.py
1
14472
#!flask/bin/python from courseme import db from courseme.models import Module, User, ROLE_USER, ROLE_ADMIN, Objective, Institution, Question, Subject, Topic from datetime import datetime maths = Subject( name = "Mathematics" ) biology = Subject( name = "Biology" ) misc = Subject( name = "Misc...
mit
2,412,441,968,369,456,000
29.087318
323
0.603234
false
eshijia/magnum
magnum/db/sqlalchemy/api.py
1
39042
# Copyright 2013 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 applicabl...
apache-2.0
5,895,803,285,767,630,000
36.978599
79
0.596102
false
twitter/zktraffic
zktraffic/network/sniffer.py
1
4062
# ================================================================================================== # Copyright 2015 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
3,702,111,362,593,863,000
30.007634
100
0.612752
false
astrikov-d/dartcms
dartcms/apps/shop/models.py
1
2156
# coding: utf-8 from dartcms.utils.loading import is_model_registered from django.db.models.signals import post_save, pre_delete, pre_save from .abstract_models import * from .signals import * __all__ = [] if not is_model_registered('shop', 'ProductCatalog'): class ProductCatalog(AbstractProductCatalog): ...
mit
-5,669,258,377,814,378,000
25.292683
68
0.699907
false
er432/TASSELpy
TASSELpy/utils/helper.py
1
7197
import re import javabridge ## Dictionary holding the symbols for primatives in javabridge signatures primative_dict = {'boolean':'Z','byte':'B','char':'C','short':'S', 'int':'I','long':'J','float':'F','double':'D', 'void':'V'} ## Constructs the signature needed by javabridge for a...
bsd-3-clause
-37,858,812,142,794,400
40.362069
98
0.545227
false
plamut/superdesk-core
superdesk/errors.py
1
18386
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import logg...
agpl-3.0
6,312,404,106,729,446,000
32.489982
120
0.665724
false
anntzer/scikit-learn
sklearn/linear_model/_least_angle.py
3
71554
""" Least Angle Regression algorithm. See the documentation on the Generalized Linear Model for a complete discussion. """ # Author: Fabian Pedregosa <fabian.pedregosa@inria.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux # # License: BSD 3 clause from math import log import sys...
bsd-3-clause
3,500,082,720,243,523,600
36.502096
79
0.588451
false
floooh/fips-hello-dep2
fips-generators/hello_generator.py
1
1203
"""fips imported code generator for testing""" Version = 2 import genutil as util #------------------------------------------------------------------------------- def generateHeader(func_name, msg, hdrPath) : with open(hdrPath, 'w') as f : f.write("// #version:{}#\n".format(Version)) f.write("ex...
mit
-6,225,001,957,906,463,000
39.1
80
0.46384
false
mlperf/inference_results_v0.5
closed/Google/code/ssd-large/tpu-ssd-large/home/kbuilder/mlperf-inference/google3/third_party/mlperf/inference/ssd/offline/accuracy_coco.py
1
3987
"""Tool to calculate accuracy for loadgen accuracy output found in mlperf_log_accuracy.json We assume that loadgen's query index is in the same order as the images in coco's annotations/instances_val2017.json.""" from __future__ import division from __future__ import print_function from __future__ import unicode_liter...
apache-2.0
-307,164,166,966,539,650
30.393701
212
0.635315
false
Chedi/django-iban-field
django_iban/specification.py
1
7562
from collections import namedtuple from django_iban.utils import clean_iban IBANPartSpecification = namedtuple('IBANPartSpecification', ["length", "data_type"]) class IBANSpecification(object): MASK_DATATYPE_MAP = { 'a':'a', 'n':'9', 'c':'w', } REGEX_DATATYPE_MAP = { 'a'...
gpl-3.0
7,448,661,612,872,638,000
49.751678
86
0.495239
false
jeffersonfparil/GTWAS_POOL_RADseq_SIM
BACKUP_SCRIPTS_20170930/assignPheno.py
1
4355
#!/usr/bin/env python import os, subprocess, sys, math import numpy as np import matplotlib.pyplot as plt work_DIR = sys.argv[1] genoFile = sys.argv[2] nQTL = int(sys.argv[3]) heritability = float(sys.argv[4]) model = int(sys.argv[5]) os.chdir(work_DIR) if model == 1: ################################################...
gpl-3.0
717,945,124,301,054,200
40.09434
132
0.660161
false
iamhssingh/django-userprofile
drf_user/__init__.py
1
2784
"""Django REST Framework - User! User App for Django with API Views""" __title__ = "User - Django REST Framework" __version__ = "0.0.8" __author__ = "101Loop" __license__ = "GPLv3" default_app_config = "drf_user.apps.DRFUserConfig" user_settings = { "DEFAULT_ACTIVE_STATE": False, "OTP": { "LENGTH": 5...
gpl-3.0
-6,464,121,690,914,684,000
33.37037
88
0.529454
false
yusufm/mobly
tests/lib/mock_controller.py
1
1335
#!/usr/bin/env python3.4 # # Copyright 2016 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...
apache-2.0
478,092,451,428,565,300
24.188679
75
0.674906
false
EIREXE/Olddulous
alembic/versions/6ffd5dd5efab_switch_ksp_version_to_game_version.py
1
1201
"""switch ksp_version to game_version Revision ID: 6ffd5dd5efab Revises: 4e0500347ce7 Create Date: 2016-04-08 22:58:14.178434 """ # revision identifiers, used by Alembic. revision = '6ffd5dd5efab' down_revision = '4e0500347ce7' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('modve...
mit
2,003,685,324,859,270,000
41.892857
243
0.745212
false
batmancn/MyLife
works/WebOVS/backend/app.py
1
13251
#!/usr/bin/env python import os import pam import web import ovsdb import ofctrl import simplejson as json urls = ( '/', 'Index', '/login', 'Login', '/logout', 'Logout', '/availableports', 'SwitchPorts', '/swconf', 'SwitchConf', '/switchinfo', 'SwitchInfo', '/helptext', 'HelpText', # All B...
gpl-3.0
-1,458,616,825,737,984,500
26.434783
106
0.534148
false
hydraplatform/hydra-base
tests/test_attributes.py
1
36075
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) Copyright 2013 to 2017 University of Manchester # # HydraPlatform is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
lgpl-3.0
509,869,979,931,796,350
35.886503
125
0.61131
false
TEAM-HRA/hra_suite
HRAGUI/src/hra_gui/qt/widgets/list_widget_widget.py
1
1567
''' Created on 21 kwi 2013 @author: jurek ''' from hra_core.special import ImportErrorMessage try: from PyQt4.QtGui import * # @UnusedWildImport from PyQt4.QtCore import * # @UnusedWildImport from hra_core.misc import Params from hra_core.collections_utils import nvl from hra_gui.qt.utils.signals...
lgpl-3.0
-4,704,762,434,656,400,000
35.44186
77
0.637524
false
pjuu/pjuu
pjuu/auth/views.py
1
14803
# -*- coding: utf8 -*- """Flask endpoints provide the URL endpoints for the auth system. :license: AGPL v3, see LICENSE for more details :copyright: 2014-2021 Joe Doherty """ # 3rd party imports from flask import ( current_app as app, flash, redirect, render_template, request, url_for, session, jsonify, Blu...
agpl-3.0
-3,284,603,166,870,039,600
35.550617
79
0.577383
false
okomarov/lsptf
setup.py
1
3767
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8')...
bsd-3-clause
3,907,107,188,002,606,000
37.845361
94
0.648527
false
dante-signal31/geolocate
geolocate/classes/config.py
1
19292
""" Configuration parser module. Programmed by: Dante Signal31 email: dante.signal31@gmail.com """ import configparser import http.client as http import os import urllib.parse as urlparse import keyring CONFIG_ROOT = os.path.expanduser("~/.geolocate") CONFIG_FILE = "etc/geolocate.conf" CONFIG_FILE_PATH = os.pa...
bsd-3-clause
-2,862,953,470,390,364,700
33.823105
113
0.656127
false
google/TensorNetwork
tensornetwork/block_sparse/caching.py
1
2665
# Copyright 2019 The TensorNetwork 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 ...
apache-2.0
-2,057,196,932,858,687,500
29.284091
78
0.72045
false
reingart/erplibre
controllers/scm.py
1
9384
# -*- coding: utf-8 -*- # This is a Python open source project for migration of modules # and functions from GestionPyme and other ERP products from Sistemas # Ágiles. # # Copyright (C) 2012 Sistemas Ágiles. # # This program is free software: you can redistribute it and/or modify # it under the terms of...
agpl-3.0
-3,261,670,011,133,558,300
37.604938
122
0.588423
false
suyashbire1/pyhton_scripts_mom6
plot_twapv_budget_complete.py
1
18150
import sys import readParams_moreoptions as rdp1 import matplotlib import matplotlib.pyplot as plt import matplotlib.ticker as ticker from mom_plot1 import m6plot, xdegtokm import numpy as np from netCDF4 import MFDataset as mfdset, Dataset as dset import time from plot_twamomx_budget_complete_direct_newest import extr...
gpl-3.0
-3,115,476,061,697,227,300
46.889182
192
0.520441
false
osks/gearman-dashboard
gearmandashboard/models.py
1
1059
import gearman gearman_hostports = [('gearman01', 4730), ('gearman02', 4730)] gearman_connections = {} for hostport in gearman_hostports: gearman_connections[hostport] = gearman.GearmanAdminClient([hostport]) def get_info_from_gearman(): server_infos = [] for hostport in gearman_hostports: server...
mit
1,503,034,650,286,523,600
33.16129
74
0.561851
false
gbenson/i8c
src/i8c/compiler/commands.py
1
1574
# -*- coding: utf-8 -*- # Copyright (C) 2016 Red Hat, Inc. # This file is part of the Infinity Note Compiler. # # The Infinity Note Compiler 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 ...
lgpl-2.1
-8,448,123,867,574,675,000
33.217391
74
0.70521
false
ccubed/Yakei
ConfParser.py
1
3478
# Parse Yakei Config Files import os class ConfMissingError(Exception): def __init__(self): self.value = "Yakei.conf not found" def __str__(self): return repr(self.value) class ConfBadlyFormed(Exception): def __init__(self, value): self.value = value def __str__(sel...
mit
-8,791,185,630,320,041,000
43.168831
145
0.515239
false
dude56987/TVD
tvd.py
1
7141
#! /usr/bin/python ######################################################################## # Backend to dynamicly create and destroy virtual machines # Copyright (C) 2015 Carl J Smith # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
-6,031,507,660,459,854,000
42.018072
146
0.633525
false
scpZone13/ProjectDIOMEDES
bot/NanoTrasenBot.py
1
70001
# -*- coding: utf-8 -*- # This script is shared under the # Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0) # Added clause to Attribution: # - You may not remove or hide the '<Bot_name> who created you?' functionality # and you may not modify the name given in the response. #CREDITS # Author: Skibi...
agpl-3.0
7,691,879,388,208,059,000
43.726518
283
0.486878
false
xh4x0r3r/xh4x0r3r_blog
xh4x0r3r_blog/articles/views.py
1
3504
from django.shortcuts import render from xh4x0r3r_blog.utils import db, build_args import re MAX_POST_PREVIEW = 10 #=================== index ===================== def index (request, year=None, month=None) : page = 1 pages = 0 query = '' title = "All Articles" articles = db.get_articles() q...
gpl-3.0
-8,890,105,144,331,939,000
31.146789
91
0.506279
false
eig-2017/the-magical-csv-merge-machine
merge_machine/scripts/delete_referential.py
1
4191
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 6 19:43:08 2017 @author: m75380 Script to add SIRENE to API """ import argparse import json import os from api_helpers import APIConnection # ============================================================================= # Paths to configuration ...
mit
-5,013,754,206,858,447,000
37.109091
81
0.44524
false
doutib/lobpredict
lobpredictrst/jupyter/simple_model/create_simple_model_predict.py
1
6870
# coding: utf-8 # # The best model parameters are given by # ``` # author : SHAMINDRA # data_source_dir : SC_shuffle # test_type : validation # model_type : RF # RF: # n_estimators : 100 # criterion : 'gini' # max_features : 'auto' # max_depth : 20 # n_jobs : 1 # SVM: # kernel : 'rbf' # de...
isc
-5,699,154,998,110,221,000
26.586345
117
0.580288
false
geodynamics/citcoms
visual/Mayavi2/citcoms_display/plugins/HDF5UGrid.py
1
9376
# # Script to generate VTKUnstructuredGrid objects from CitcomS hdf files # # author: Martin Weier # Copyright (C) 2006 California Institue of Technology # # 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 # t...
gpl-2.0
5,070,815,270,683,033,000
35.768627
107
0.52901
false
ricardogarzocastro/Django_Scada
django_scada/django_scada/urls.py
1
2700
from django.conf.urls import * from django.conf.urls import patterns, include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings admin.autodiscover() urlpatterns = patterns('', url(r'^home/', 'variables.views.home')...
gpl-2.0
1,010,877,155,873,175,300
43.033333
91
0.666667
false
hwang3419/awu
awu/awu/settings.py
1
4783
""" Django settings for awu project. Generated by 'django-admin startproject' using Django 1.8.5. 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/ """ # Build paths in...
mit
-8,222,593,545,976,650,000
32.921986
171
0.658164
false
germandiagogomez/meson
mesonbuild/mesonlib.py
1
10591
# Copyright 2012-2015 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
8,285,344,205,178,610,000
31.191489
152
0.575961
false
Royce/GammaJS
support/APIgen/generate.py
1
4851
######################## ### ### IMPORTS ### ######################## ######################## ### BUILTIN ######################## from datetime import date import codecs import shutil import time import sys import re import os ######################## ### LOCAL ###################...
mit
-6,461,517,144,902,101,000
27.875
100
0.472686
false
brianr747/sfc_gui
sfc_gui/install_examples.py
1
2146
# coding=utf-8 """ install_examples.py Dialogs that installs scripts to a desired directory. Simple front end to sfc_models.examples.install_example_scripts Migrated to sfc_models.examples License/Disclaimer ------------------ Copyright 2017 Brian Romanchuk Licensed under the Apache License, Version 2.0 (the "Lic...
apache-2.0
6,469,923,128,646,511,000
30.101449
161
0.72973
false
naturalmessage/natmsgshardbig
monitor.py
1
18662
#!/usr/local/bin/python3 # ############################################################################### # Copyright 2015 Natural Message, LLC. # Author: Robert Hoot (naturalmessage@fastmail.fm) # # This file is part of the Natural Message Shard Server. # # The Natural Message Shard Server is free software: you can r...
gpl-3.0
1,121,881,773,405,645,200
32.869328
79
0.4873
false
openstack/ceilometer
ceilometer/agent.py
1
3822
# # Copyright 2013 Intel Corp. # Copyright 2014 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 applica...
apache-2.0
2,127,641,988,269,164,500
31.948276
78
0.601256
false
cclib/cclib
test/data/testScan.py
1
7204
# -*- coding: utf-8 -*- # # Copyright (c) 2020, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Test scan logfiles in cclib""" import os import unittest import numpy import cclib from skip import s...
bsd-3-clause
615,060,083,290,310,300
36.940541
95
0.678651
false
denversc/cligen
tests/unittests/test_argspec.py
1
8482
# Copyright 2015 Denver Coneybeare <denver@sleepydragon.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This ...
gpl-3.0
-6,773,141,248,986,947,000
32.393701
92
0.592431
false
CreditEaseDBA/Themis
rule_analysis/libs/text/sql_text.py
1
4090
# -*- coding: utf-8 -*- import sqlparse class SqlText(object): def __init__(self, mongo_client, start_date, stop_date, schema, hostname, db_client=None): self.db_client = db_client self.mongo_client = mongo_client self.start_date = start_date self.stop_date = stop...
apache-2.0
-1,347,671,995,002,225,200
32.180328
79
0.465662
false
roderickmackenzie/gpvdm
gpvdm_gui/gui/dump_select.py
1
9125
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
gpl-2.0
6,935,567,816,194,428,000
23.076517
198
0.673315
false
rfoxfa/python-utils
utils/plotting.py
1
1798
""" Plotting functions. """ from __future__ import absolute_import import matplotlib.pyplot as plt import numpy as np def hhist(items, title=None, axislabel=None, color=None, height=None, width=None, reverse=False): """ Plots a horizontal histogram of values and frequencies. Arguments: items (it...
gpl-2.0
-2,366,417,125,346,160,000
36.458333
100
0.624583
false
lyuboraykov/columba
tests/test_sendgrid_provider.py
1
1887
#!/usr/bin/env python3 import pytest from providers.sendgrid import SendGridProvider from send_error import SendError import init_test_objects def test_sendgrid_send_positive(): """Straightforward sendgrid send test. Will fail if an error is raised by the provider.""" sendgrid_provider = SendGridProvider(ini...
mit
-6,292,615,231,775,014,000
42.906977
94
0.740859
false
declarativitydotnet/p2
doc/chord.generator.py
1
1284
#!/usr/bin/python ## This file is distributed under the terms in the attached LICENSE file. ## If you do not find this file, copies can be found by writing to: ## Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, ## Berkeley, CA, 94704. Attention: Intel License Inquiry. ## Or ## UC Berkeley EECS Computer Sci...
bsd-3-clause
-8,504,691,728,586,956,000
26.913043
73
0.573988
false
lrnt/aerial
mivb.py
1
7528
import inspect, asyncio, sys, json from aiohttp import web from utils import get_etree from asyncio_redis import Connection from collections import Iterable API_BASE_URL = 'http://m.mivb.be/api/' API_DEFAULT_PARAMS = {'lang': 'nl'} API_LINES_URL = API_BASE_URL + 'getlinesnew.php' API_ROUTE_URL = API_BASE_URL + 'getiti...
mit
-2,791,483,782,329,642,000
28.992032
80
0.545829
false
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/640_TheZeroHour/__init__.py
1
3023
# Made by Kerberos v1.0 on 2009/05/08 # this script is part of the Official L2J Datapack Project. # Visit http://www.l2jdp.com/forum for more details. import sys from com.l2scoria import Config from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2s...
gpl-3.0
6,227,081,143,170,916,000
29.24
157
0.582865
false
swordfeng/pyjs
nodeaio/nodeaio.py
1
1710
#!/usr/bin/python3 import asyncio import threading loop = asyncio.get_event_loop() class LoopThread(threading.Thread): def __init__(self): super(LoopThread, self).__init__() self.finalizing = False def run(self): asyncio.set_event_loop(loop) loop.run_forever() pending = a...
mit
5,335,262,165,422,186,000
29.535714
67
0.592398
false
smoser/granite
granite/virt/lxc/hostops.py
1
2587
# Copyright (c) 2014 Canonical Ltd # # 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
-6,146,650,257,715,685,000
32.166667
78
0.583301
false
leppa/home-assistant
homeassistant/helpers/condition.py
1
15835
"""Offer reusable conditions.""" import asyncio from datetime import datetime, timedelta import functools as ft import logging import sys from typing import Callable, Container, Optional, Union, cast from homeassistant.components import zone as zone_cmp from homeassistant.components.device_automation import ( asyn...
apache-2.0
-1,179,085,761,861,840,000
28.821092
88
0.645406
false