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
oblalex/gnuplot.py-py3k
gp_macosx.py
1
4576
# $Id: gp_macosx.py 291 2006-03-03 08:58:48Z mhagger $ # Copyright (C) 1998-2003 Michael Haggerty <mhagger@alum.mit.edu> # # This file is licensed under the GNU Lesser General Public License # (LGPL). See LICENSE.txt for details. """gp_macosx -- an interface to the command line version of gnuplot used under Mac OS ...
lgpl-2.1
5,807,611,642,525,777,000
30.342466
79
0.629808
false
4.198165
false
false
false
grnet/agkyra
agkyra/syncer/file_client.py
1
1872
# Copyright (C) 2015 GRNET S.A. # # 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 program is distributed in the...
gpl-3.0
-1,186,452,690,488,314,600
36.44
79
0.69391
false
4.060738
false
false
false
telefonicaid/fiware-puppetwrapper
acceptance_tests/component/delete_module/features/steps.py
1
1740
__author__ = 'arobres' # -*- coding: utf-8 -*- from commons.rest_utils import RestUtils from nose.tools import assert_true, assert_false import commons.assertions as Assertions import commons.fabric_utils as Fabutils from commons.constants import URL, MODULE_NAME, REPOSITORY from lettuce import step, world, before ...
apache-2.0
-1,643,073,405,117,868,800
30.636364
103
0.737931
false
3.473054
false
false
false
bingopodcast/bingos
bingo_emulator/fun_spot_63/game.py
1
47949
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units import bingo_em...
gpl-3.0
1,453,764,986,287,668,500
46.380435
222
0.550981
false
3.422973
false
false
false
mrakgr/futhark
examples/life/quadlife_alt.py
1
55476
import sys import numpy as np import ctypes as ct import pyopencl as cl import pyopencl.array import time import argparse FUT_BLOCK_DIM = "16" cl_group_size = np.int32(512) synchronous = False fut_opencl_src = """typedef char int8_t; typedef short int16_t; typedef int int32_t; typedef long int64_t; typede...
bsd-3-clause
4,486,038,976,242,857,500
29.420159
150
0.537404
false
2.70206
false
false
false
bschollnick/downloader
downloader3.py
1
7816
""" Downloader, mass file downloader. """ import common import logging, logging.handlers import os import os.path import plistlib import stat import sys import time from optparse import OptionParser from yapsy.PluginManager import PluginManager SCRIPT_FILENAME = os.path.abspath(sys.argv[0]) SCRIPT_DIRECTORY = os.se...
mpl-2.0
2,206,838,923,007,199,500
30.643725
77
0.546827
false
4.347052
false
false
false
alfred82santa/tarrabmeCheckerGtk
src/tarrabme_checker_gtk/dialogs.py
1
3341
from gi.repository import Gtk, Gio from .actuators import NeoPixelsActuator __author__ = 'alfred' class PreferencesDialog(Gtk.Dialog): def __init__(self, settings): Gtk.Dialog.__init__(self, "Preferences", None, Gtk.DialogFlags.USE_HEADER_BAR | Gtk.DialogFlags.MODAL, ...
gpl-2.0
3,221,447,033,717,781,500
46.056338
102
0.677641
false
3.655361
false
false
false
khosrow/metpx
sundew/unittests/unittest_senderAm.py
1
1082
# -*- coding: iso-8859-1 -*- ############################################################################################# # Name: unittest_senderAm.py # Author: Jun Hu # Date: 2012-04-30 # Description: test cases for senderAm class ######################################################################################...
gpl-2.0
7,791,971,487,421,272,000
30.823529
93
0.575786
false
4.259843
true
false
false
praekelt/django-ultracache
ultracache/tests/utils.py
1
1072
from collections import OrderedDict class DummyProxy(dict): def make_key(self, path, headers=None): key = path if headers is not None: key += str(frozenset(sorted(headers.items()))) return key def cache(self, request, value): headers = {k[5:].replace("_", "-").low...
bsd-3-clause
4,270,799,919,882,227,000
29.628571
75
0.602612
false
3.842294
false
false
false
ContextLab/hypertools
hypertools/tools/format_data.py
1
7323
import warnings import numpy as np import six from .._externals.ppca import PPCA from .._shared.helpers import get_type def format_data(x, vectorizer='CountVectorizer', semantic='LatentDirichletAllocation', corpus='wiki', ppca=True, text_align='hyper'): """ Formats data into a list of numpy ...
mit
-6,226,596,756,234,407,000
38.583784
139
0.604534
false
3.860306
false
false
false
RetroMelon/PatchWords
patchwords_project/patchwords/queries.py
1
3242
# The queries.py file contains a bunch of relatively complex database # queries that probably shouldn't take place inside the views. from patchwords.models import Category, Story, Paragraph, User, Favourite #gets a list of def getTopStories(start=0, end=5, category=None): #getting the stories and zipping them with...
mit
3,769,124,615,543,503,400
30.784314
92
0.692474
false
3.606229
false
false
false
Collisionc/sickbeard_mp4_automator
delugePostProcess.py
1
5295
#!/usr/bin/env python import os import sys from autoprocess import autoProcessTV, autoProcessMovie, autoProcessTVSR, sonarr, radarr from readSettings import ReadSettings from mkvtomp4 import MkvtoMp4 from deluge_client import DelugeRPCClient import logging from logging.config import fileConfig logpath = '/var/log/sic...
mit
6,938,189,214,140,944,000
34.066225
163
0.671388
false
3.449511
false
false
false
FreeOpcUa/python-opcua
opcua/common/events.py
1
8172
import copy from opcua import ua import opcua from opcua.ua.uaerrors import UaError from opcua.common import ua_utils class Event(object): """ OPC UA Event object. This is class in inherited by the common event objects such as BaseEvent, other auto standard events and custom events Events are use...
lgpl-3.0
-8,488,097,905,301,647,000
34.376623
150
0.618453
false
4.043543
false
false
false
birdland/dlkit-doc
dlkit/services/grading.py
1
224535
# -*- coding: utf-8 -*- """Grading Open Service Interface Definitions grading version 3.0.0 The Grading OSID defines a service to apply grades or ratings. Grade Systems The grade system sessions provide the means to retrievs and manage ``GradeSystem`` definitions. A ``GradeSystem`` is a fixed set of ``Grades`` . ``G...
mit
3,892,039,066,676,046,000
38.593546
193
0.644349
false
4.286328
true
false
false
eckardm/archivematica
src/MCPClient/lib/clientScripts/archivematicaCreateMETSMetadataCSV.py
1
4618
#!/usr/bin/env python2 # # This file is part of Archivematica. # # Copyright 2010-2012 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,...
agpl-3.0
1,642,396,789,617,826,600
37.165289
128
0.683629
false
4.008681
false
false
false
cyphactor/lifecyclemanager
extra/plugins/userlog/userlog/userlog.py
1
7748
import posixpath from trac.core import * from trac.config import * from trac.config import BoolOption from trac.web.chrome import ITemplateProvider, \ add_stylesheet from trac.web.main import IRequestHandler from trac.wiki import wiki_to_html, wiki_to_oneliner from trac.mimeview import Mimeview, is_binary from trac...
gpl-3.0
-8,103,132,112,731,082,000
43.786127
88
0.495225
false
4.457998
false
false
false
pcm17/tensorflow
tensorflow/contrib/distributions/python/ops/poisson.py
1
5426
# 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
8,151,053,767,586,295,000
33.56051
80
0.679506
false
3.884037
false
false
false
harlequin/sickbeard
sickbeard/tv.py
1
60124
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
129,994,857,721,770,370
39.379215
283
0.566795
false
4.147627
false
false
false
hufsm/tu_gen2_libsigrokdecode
decoders/usb_power_delivery/pd.py
1
20599
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2015 Google, Inc ## Copyright (C) 2018 davidanger <davidanger@163.com> ## Copyright (C) 2018 Peter Hazenberg <sigrok@haas-en-berg.nl> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Ge...
gpl-3.0
-1,047,846,842,259,668,100
31.286834
96
0.468032
false
3.088769
false
false
false
chromium/chromium
tools/grit/grit/format/rc.py
7
18109
# Copyright (c) 2012 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. '''Support for formatting an RC file for compilation. ''' from __future__ import print_function import os import re from functools import partial impo...
bsd-3-clause
2,850,999,913,179,659,000
36.727083
81
0.628859
false
3.140108
false
false
false
rainier-m/python-soccer
EPL-teamNews.py
1
5001
# -*- coding: utf-8 -*- ''' Created on Jan 30, 2015 Modified on Jan 30, 2015 @author: rainier.madruga@gmail.com A simple Python Program to scrape the ESPN FC website for content. ''' ''' Version Number of Script ''' version = '0.01.a' # Import Libraries needed for Scraping the various web pages from bs4 import Beautif...
gpl-2.0
-1,380,015,014,240,211,200
34.721429
639
0.660868
false
2.849573
false
false
false
plq/spyne
spyne/protocol/_inbase.py
1
24684
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
lgpl-2.1
6,236,613,823,759,580,000
33.37883
84
0.581672
false
3.993529
false
false
false
JerryYanWan/BigDL
spark/dl/src/test/resources/tf/models/vgg19.py
1
1391
# # Copyright 2016 The BigDL 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 in ...
apache-2.0
155,971,322,021,515,800
34.666667
97
0.686556
false
3.530457
false
false
false
swarmer/autoscaler
autoscaler/server/scaling/algorithms/spline.py
1
1065
import math import scipy.interpolate from autoscaler.server.request_history import RequestHistory from autoscaler.server.scaling.utils import parse_interval class SplineScalingAlgorithm: def __init__(self, algorithm_config): self.interval_seconds = parse_interval( algorithm_config['interval'...
mit
2,385,278,985,483,348,000
32.28125
79
0.656338
false
4.003759
false
false
false
SunyataZero/buddhist-well-being-prototype-4
bwb/practice_details.py
1
3624
import sched import threading import time from PyQt5 import QtCore from PyQt5 import QtWidgets import bwb.model ID_NOT_SET = -1 BUTTON_WIDTH_IT = 28 class PracticeCompositeWidget(QtWidgets.QWidget): time_of_day_state_changed_signal = QtCore.pyqtSignal() def __init__(self): super().__init__() ...
gpl-3.0
638,437,109,849,312,600
37.147368
132
0.651214
false
3.238606
false
false
false
uw-it-aca/canvas-sis-provisioner
sis_provisioner/builders/__init__.py
1
4786
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from sis_provisioner.models.course import Course from sis_provisioner.models.user import User from sis_provisioner.csv.data import Collector from sis_provisioner.csv.format import UserCSV, EnrollmentCSV from sis_provisioner.dao.user...
apache-2.0
5,952,493,172,330,509,000
36.390625
79
0.614919
false
4.154514
false
false
false
pytorch/fairseq
fairseq/model_parallel/models/pipeline_parallel_transformer/model.py
1
33560
# 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. import logging import torch import torch.nn as nn import torch.nn.functional as F from fairseq import utils from fairseq.model_parallel.model...
mit
-946,977,085,584,911,400
42.754889
151
0.57947
false
4.349404
false
false
false
6112/project-euler
problems/051.py
1
2678
#encoding=utf-8 ## SOLVED 2014/04/18 ## 121313 # By replacing the 1st digit of the 2-digit number *3, it turns out that six of # the nine possible values: 13, 23, 43, 53, 73, and 83, are all prime. # By replacing the 3rd and 4th digits of 56**3 with the same digit, this # 5-digit number is the first example having se...
mit
-6,838,346,259,325,526,000
42.901639
79
0.641897
false
4.145511
false
false
false
etkirsch/legends-of-erukar
erukar/content/skills/brutality/Cleave.py
1
4561
from erukar.system.engine import Attack, Damage, DamageScalar from erukar.ext.math import Navigator class Cleave(Attack): Name = 'Cleave' ShowInLists = True Description = 'Cleave with {} at {}' CurrentLevel = 'Swing wildly, inflicting {:0.1f}% damage per tile '\ 'in three spaces at once. Cleav...
agpl-3.0
-1,209,525,495,349,219,600
34.913386
74
0.585398
false
3.403731
false
false
false
sedden/django-basic-apps
basic/tools/shortcuts.py
1
1190
import os.path import hashlib from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http import HttpResponseRedirect def get_image_path(instance, filename): """ Converts an image filename to a hash. """ name = hashlib.md5("%s" % instance.id).he...
bsd-3-clause
-5,613,188,190,341,763,000
28.775
114
0.67395
false
3.888889
false
false
false
geo2tag-logistics/Geo2Logistics
logistics/Geo2TagService.py
1
6073
import json import requests from logistics.models import Fleet SERVER_URL = "http://demo.geo2tag.org/instance/" BASE_SERVICE_NAME = "testservice" SERVICE_NAME = BASE_SERVICE_NAME channel_dict = {} points_dict = {} def getSerivceUrl(): return SERVER_URL + "service/" + SERVICE_NAME def one_time_startup(): ...
apache-2.0
-5,767,976,916,874,057,000
35.194969
159
0.596003
false
3.139662
false
false
false
jimjing/smores_choose_behavior
src/smores_choose_behavior/visualizer.py
1
1422
#!/usr/bin/env python import threading import rospy from visualization_msgs.msg import Marker, MarkerArray class Visualizer(object): def __init__(self): self._current_pub_path = [] self.run = False self.t = None self.t = threading.Thread(target=self._startPathPub) self.t....
gpl-3.0
-7,178,490,557,951,756,000
27.44
83
0.496484
false
3.761905
false
false
false
ComputerNetworks-UFRGS/OpERA
python/device/radioDevice.py
1
9121
""" Copyright 2013 OpERA 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, softwar...
apache-2.0
-5,384,129,354,236,725,000
25.591837
97
0.558162
false
4.032272
false
false
false
tramin/frobo
frobo_nav/nodes/nav_calibrate_linear.py
1
5813
#!/usr/bin/env python """ nav_square.py - Version 1.1 2013-12-20 A basic demo of the using odometry data to move the robot along a square trajectory. Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2012 Patrick Goebel. All rights reserved. This program is free software; y...
mit
3,346,981,609,078,906,400
39.089655
116
0.607088
false
4.143264
false
false
false
rjl09c/ysp2017
katiehessian.py
1
7324
import yt import matplotlib.pyplot as plt import numpy as np from matplotlib import pylab from yt.analysis_modules.halo_finding.api import HaloFinder from pylab import* from numpy import ma from numpy import linalg as LA #derives vel with respect to x def derivx(vel,xcoords): distance = xcoords[1][0] - xcoords[0][0]...
gpl-3.0
-7,559,592,820,612,261,000
24.255172
106
0.58834
false
2.283042
false
false
false
tehpug/Ares
leagues/models.py
1
5319
# -*- coding: utf-8 -*- from celery.result import AsyncResult from django.core.exceptions import ValidationError from django.db import models, connection from django.utils import timezone def validate_even(value): """ Validate a number to be even """ if value % 2 != 0: raise ValidationError('%...
gpl-3.0
6,876,304,096,557,620,000
34.225166
79
0.602369
false
3.957589
false
false
false
Bajoo/client-pc
tests/unit_tests/filesync/task_consumer_test.py
1
6616
# -*- coding:utf-8 -*- import threading import pytest from bajoo.filesync import task_consumer from bajoo.promise import Promise class TestTaskConsumer(object): def _make_external_promise(self): """Helper used to make stub Promise. Returns: Promise, resolve, reject: the promise and...
gpl-3.0
6,029,750,878,475,561,000
29.348624
78
0.546705
false
4.058896
true
false
false
azide0x37/tableFramer
tableFramer.py
1
1267
import requests import json from bs4 import BeautifulSoup from collections import OrderedDict class tableFramer: def __init__(self, url): self.url = url self.response = requests.get(url, headers = {'User-Agent': 'Mozilla/5.0'}) def __call__(self): souped = BeautifulSoup(self.response...
mit
2,197,101,322,134,218,800
29.166667
88
0.535912
false
4.251678
false
false
false
philipkershaw/ndg_security_server
ndg/security/server/wsgi/utils.py
2
7507
"""NDG Security WSGI utilities MashMyData Project """ __author__ = "P J Kershaw" __date__ = "21/08/11" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$" import logging log = ...
bsd-3-clause
3,673,313,203,661,367,000
37.497436
83
0.520714
false
4.619692
false
false
false
cltrudeau/django-awl
awl/tests/test_utils.py
1
3111
# awl.tests.test_utils.py import sys from io import StringIO from django.test import TestCase from awl.tests.models import Link from awl.utils import (URLTree, refetch, refetch_for_update, render_page, render_page_to_string, get_field_names, get_obj_attr) from awl.waelsteng import FakeRequest # =================...
mit
4,314,477,777,599,757,000
30.11
80
0.58695
false
3.845488
true
false
false
gaganjyot/EXIFGeoLocation
main.py
1
1898
from PIL import Image from PIL.ExifTags import GPSTAGS, TAGS def _get_if_exist(data, key): if key in data: return data[key] return None def _convert_to_degrees(value): """Helper function to convert the GPS coordinates stored in the EXIF to degress in float format""" d0 = value[0][0] d1 =...
gpl-3.0
-757,813,787,278,791,300
27.772727
102
0.535827
false
3.200675
false
false
false
kennethreitz/pipenv
tests/integration/test_project.py
1
8289
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function import io import os import tarfile import pytest from pipenv.patched import pipfile from pipenv.project import Project from pipenv.utils import temp_environ from pipenv.vendor.vistir.path import is_in_path, normalize_path from pipenv.vendor...
mit
8,963,331,359,839,735,000
32.695122
123
0.59392
false
3.450874
true
false
false
ababino/networkb
networkb/algorithms/utils.py
1
3266
# -*- coding: utf-8 -*- """ Created on Wed May 15 20:11:59 2013 @author: andres """ import numpy import networkx from scipy import spatial from scipy import stats def find_peaks(th,gc): peaks=[] for i in range(1,len(th)-1): if gc[1][i-1]<gc[1][i] and gc[1][i]>gc[1][i+1]: peaks.append((th[i],gc[1][i])) ...
mit
3,844,366,845,292,625,000
28.963303
105
0.609002
false
2.464906
false
false
false
pytest-dev/pytest-bdd
pytest_bdd/utils.py
1
1191
"""Various utility functions.""" from inspect import getframeinfo from inspect import signature as _signature from sys import _getframe CONFIG_STACK = [] def get_args(func): """Get a list of argument names for a function. :param func: The function to inspect. :return: A list of argument names. :rt...
mit
-1,642,162,315,754,404,600
27.357143
109
0.706129
false
3.904918
false
false
false
Xelaadryth/Xelabot
quest/quests/monster.py
1
4536
from random import getrandbits, randint from ..quest import Quest from ..quest_segment import QuestSegment import settings from utils.command_set import CommandSet GOLD_SAFE_REWARD = 75 GOLD_VARIANCE_SAFE = 21 EXP_SAFE_REWARD = 2 GOLD_RISKY_PENALTY = 200 GOLD_RISKY_REWARD = 300 GOLD_RISKY_REWARD_BIG = 400 GOLD_VARIA...
mit
256,312,372,235,626,660
40.614679
119
0.612434
false
3.185393
false
false
false
smallyear/linuxLearn
salt/salt/returners/mongo_future_return.py
1
7113
# -*- coding: utf-8 -*- ''' Return data to a mongodb server Required python modules: pymongo This returner will send data from the minions to a MongoDB server. To configure the settings for your MongoDB server, add the following lines to the minion config files: .. code-block:: yaml mongo.db: <database name> ...
apache-2.0
-3,668,263,459,001,041,000
24.959854
109
0.604246
false
3.749605
true
false
false
Pinyto/cloud
api_prototype/sandbox.py
1
3475
# coding=utf-8 """ Pinyto cloud - A secure cloud database for your personal data Copyright (C) 2105 Johannes Merkert <jonny@pinyto.de> 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...
gpl-3.0
-6,002,983,267,726,479,000
38.488636
106
0.710216
false
4.212121
false
false
false
SUSE/kiwi
kiwi/bootloader/install/__init__.py
1
2173
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 la...
gpl-3.0
-4,317,752,855,747,303,000
31.432836
76
0.651173
false
4.154876
false
false
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_configured_values_column_info1025.py
1
10546
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
-8,931,959,705,869,452,000
37.489051
138
0.611132
false
3.972128
true
false
false
sigmunau/nav
python/nav/ipdevpoll/pool.py
1
10770
# # Copyright (C) 2017 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # This program is distributed in the hope...
gpl-2.0
-5,302,875,455,866,709,000
33.630225
80
0.589694
false
4.311449
false
false
false
mazvv/travelcrm
travelcrm/forms/foodcats.py
1
2079
# -*-coding: utf-8 -*- import colander from . import( ResourceSchema, BaseForm, BaseSearchForm, BaseAssignForm, ) from ..resources.foodcats import FoodcatsResource from ..models.foodcat import Foodcat from ..models.task import Task from ..models.note import Note from ..lib.qb.foodcats import Foodcats...
gpl-3.0
-5,314,125,230,378,631,000
25.653846
64
0.601732
false
3.739209
false
false
false
Havate/havate-openstack
proto-build/gui/horizon/Horizon_GUI/settings.py
1
7641
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
2,743,992,611,349,540,400
31.653846
97
0.693888
false
3.5375
true
false
false
follownjmoney/campaign-server
campaignserver/campaignserver/settings_prod.py
1
2523
""" Django settings for campaignserver project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...
apache-2.0
5,052,721,809,511,146,000
25.010309
74
0.722553
false
3.409459
false
false
false
xesscorp/skidl
skidl/skidl.py
1
7609
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2016 by XESS Corp. # # 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 without limitation the rights # to...
mit
5,613,484,846,963,720,000
32.372807
120
0.681036
false
3.750123
true
false
false
iniverno/RnR-LLC
simics-3.0-install/simics-3.0.31/amd64-linux/lib/x86_components.py
1
69880
# MODULE: x86-components # CLASS: x86-system # CLASS: x86-apic-system # CLASS: x86-separate-mem-io-system # CLASS: x86-apic-bus-system # CLASS: x86-e7520-system # CLASS: i386-cpu # CLASS: i486sx-cpu # CLASS: i486dx2-cpu # CLASS: pentium-cpu # CLASS: pentium-mmx-cpu # CLASS: pentium-pro-cpu # CLASS: pentium-ii-cpu # CLA...
gpl-2.0
-5,586,652,861,325,700,000
38.931429
101
0.557026
false
3.091488
false
false
false
bscottm/SublimeHaskell
internals/proc_helper.py
1
9148
# -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- # ProcHelper: Process execution helper class. # -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- import errno import subprocess import os import os.path import SublimeHaskell.sublime_haskell_common as Common i...
mit
4,924,986,076,657,667,000
41.351852
117
0.591277
false
3.732354
false
false
false
Pytlicek/VOBS
app/controllers/supplier/profile.py
1
1457
# -*- coding: utf-8 -*- from flask import render_template, session, redirect, url_for from app import app from app.models.Forms import PublicProfile from app.models.Checks import login_required from app.models.SQL_DB import User, Item_Profile @app.route('/supplier/settings/public_profile', methods=['GET', 'POST']) @...
mit
9,213,925,581,094,542,000
46
117
0.720659
false
3.624378
false
false
false
tundish/turberfield-utils
turberfield/utils/db.py
1
7983
#!/usr/bin/env python3 # encoding: UTF-8 # This file is part of turberfield. # # Turberfield 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 ve...
gpl-3.0
8,149,039,837,599,711,000
29.469466
85
0.525742
false
4.159979
false
false
false
fnl/pymonad
pymonad/Either.py
1
3330
# -------------------------------------------------------- # (c) Copyright 2014 by Jason DeLaat. # Licensed under BSD 3-clause licence. # -------------------------------------------------------- from pymonad.Monad import * class Either(Monad): """ Represents a calculation that may either fail or succeed. An altern...
bsd-3-clause
8,568,344,353,019,406,000
28.732143
100
0.664264
false
3.596112
false
false
false
TraceContext/tracecontext-spec
test/tracecontext/tracestate.py
1
2749
from collections import OrderedDict import re class Tracestate(object): _KEY_WITHOUT_VENDOR_FORMAT = r'[a-z][_0-9a-z\-\*\/]{0,255}' _KEY_WITH_VENDOR_FORMAT = r'[0-9a-z][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}' _KEY_FORMAT = _KEY_WITHOUT_VENDOR_FORMAT + '|' + _KEY_WITH_VENDOR_FORMAT _VALUE_FORMAT = r'[\x20...
apache-2.0
5,575,316,123,618,295,000
32.52439
87
0.650782
false
2.902851
false
false
false
nick41496/Beatnik
beatnik/api_manager/api_manager.py
1
3520
import logging import os import spotipy import sys from beatnik.api_manager.clients import AppleMusicApi, SoundcloudApi from beatnik.api_manager.link_converter import LinkConverter from beatnik.api_manager.link_parser import LinkParser from beatnik.api_manager.search_handler import SearchHandler from gmusicapi import ...
gpl-3.0
1,703,179,569,399,725,300
34.2
95
0.598295
false
4.032073
false
false
false
acshi/osf.io
framework/mongo/utils.py
1
5732
# -*- coding: utf-8 -*- import functools import httplib as http from django.core.paginator import Paginator from django.db.models import QuerySet import markupsafe import pymongo from modularodm.query import QueryBase from modularodm.exceptions import NoResultsFound, MultipleResultsFound from framework.exceptions im...
apache-2.0
-1,111,238,550,963,007,200
33.323353
114
0.643057
false
4.042313
false
false
false
simphony/simphony-openfoam
foam_controlwrapper/tests/test_run_time.py
1
4123
import unittest import os import shutil import tempfile from foam_controlwrapper.blockmesh_utils import create_quad_mesh from simphony.api import CUDS, Simulation from simphony.core.cuba import CUBA from simphony.cuds.meta import api from simphony.engine import EngineInterface class WrapperRunTestCase(unittest.Test...
gpl-2.0
-8,620,174,854,293,740,000
35.8125
77
0.564152
false
3.17398
true
false
false
project-owner/Peppy
player/client/vlcclient.py
1
10907
# Copyright 2016-2021 Peppy Player peppy.player@gmail.com # # This file is part of Peppy Player. # # Peppy Player 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-3.0
-9,174,182,375,290,047,000
31.85241
106
0.539103
false
4.155048
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/errors/types/user_data_error.py
1
1227
# -*- 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
-305,280,532,206,740,100
30.461538
74
0.693562
false
3.870662
false
false
false
jasonleaster/LeetCode
Largest_Number/ln.py
1
1325
class number() : key = 0 bit_list = [] cnt = 0 def num_init(array) : if array is None : return; num_array = [] for i in range(0, len(array)) : cls_num = number() tmp = array[i] cnt = 1 while tmp > 10 : bit_list = bit_list + [tmp % 10] ...
gpl-2.0
-8,309,436,790,888,531,000
19.075758
56
0.392453
false
3.486842
false
false
false
Connexions/draft-transforms
drafttransform/cli.py
1
3331
#!/usr/bin/env python # -*- coding: utf-8 -*- # ### # Copyright (c) 2013, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### """The command-line interface for transforming cnxml files directly in workspace.""" ...
agpl-3.0
7,051,750,747,463,857,000
36.426966
100
0.567998
false
3.928066
false
false
false
mjenrungrot/competitive_programming
UVa Online Judge/12394.py
1
1476
# ============================================================================= # Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/ # FileName: 12394.py # Description: UVa Online Judge - 12394 # ============================================================================= while True:...
mit
-6,404,102,092,147,442,000
27.941176
79
0.436314
false
3.354545
false
false
false
asicontech/software-for-equipment
bfgminer/usbtest.py
2
3439
#!/usr/bin/env python # Copyright 2012-2013 Xiangfu # Copyright 2012-2013 Andrew Smith # Copyright 2013 Luke Dashjr # # 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 Lice...
apache-2.0
6,122,057,605,471,330,000
37.640449
267
0.742658
false
2.807347
false
false
false
pwwang/bioprocs
bioprocs/scripts/imtherapy/pNetMHC.py
1
5476
from pathlib import Path from diot import Diot from bioprocs.utils import shell2 as shell, logger from bioprocs.utils.parallel import Parallel, distributeList {%from os import path%} {%from pyppl.utils import always_list%} infile = {{i.infile | quote}} afile = {{i.afile | ?path.isfile | =readlines | !always_lis...
mit
-5,011,356,954,891,710,000
37.56338
107
0.60756
false
3.122007
false
false
false
minogame/bilinear_tensorflow
src/model.py
1
14668
import tensorflow as tf import tensorflow.contrib.layers as cl from gridconv_v3 import gridconv2d from deformconv import deformconv2d from utils import log_weights # # # # # # # # # CIFAR # # # # # # # # # # The network is built based on 'NCHW'. def normal_cnn_cifar(name, reuse=False): @log_weights d...
gpl-3.0
-2,439,001,560,730,617,300
45.469256
108
0.619239
false
2.647176
false
false
false
jandebleser/django-wiki
src/wiki/conf/settings.py
1
10199
from __future__ import absolute_import, unicode_literals import bleach from django.conf import settings as django_settings from django.core.files.storage import default_storage from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ #: Should urls be case sensitive? ...
gpl-3.0
8,362,595,489,785,991,000
31.275316
92
0.702226
false
3.474957
false
false
false
EricsonWillians/PyGameWidgets
examples/long_text_label.py
1
1651
import sys sys.path.append("..") import pygame import core import widgets # Text label example. WINDOW_WIDTH = 1024 WINDOW_HEIGHT = 728 pygame.init() pygame.font.init screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT)) clock = pygame.time.Clock() FPS = 60 running = True if __name__ == "__main__": p...
gpl-3.0
-231,955,241,589,300,640
29.018182
112
0.625681
false
3.187259
false
false
false
hchauvet/beampy
beampy/statics/default_theme.py
1
4858
# -*- coding: utf-8 -*- # Default theme of Beampy # Main keys of the dict should be the name of the beampy modules or class # Each modules default options need to be defined here! THEME = {} THEME['document'] = { 'format': 'html5', #could be svg // pdf // html5 'width': 800, 'height': 600, 'optimize'...
gpl-3.0
-2,950,168,247,424,549,000
21.490741
176
0.527995
false
3.055346
false
false
false
bolkedebruin/airflow
airflow/providers/google/cloud/operators/local_to_gcs.py
1
3617
# -*- 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 License, Version 2.0 (the #...
apache-2.0
-7,390,544,169,797,167,000
36.28866
104
0.646945
false
4.124287
false
false
false
robertz23/code-samples
python scripts and tools/list_intersection.py
1
1200
""" List intersection: Finds intersections between various lists """ def check_intersection(first_list, second_list): #We use set builtin function to find the intersection between lists return set(first_list).intersection(second_list) def create_lists(line): #receive a line from the file containing asc...
mit
7,565,693,730,159,266,000
32.333333
86
0.645
false
3.269755
false
false
false
joseguerrero/sembrando
src/presentacion/librerias/popups.py
1
13668
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygame from .texto import texto from .textoci import texto2 from .imgfondo import fondo TEXT_COLOR2 = (0,0,0) COLOR_RED = (213, 0, 0) BAR_COLOR = (151, 0, 172) TEXT_COLOR = (255, 255, 255) class Button(pygame.sprite.Sprite): def __init__(self, identificador, par...
gpl-3.0
-4,537,053,745,970,449,400
47.508897
166
0.548823
false
3.284578
false
false
false
SDAquaponics/Software
Arduino/PythonDriver/NotifyAQPServer.py
1
2261
#! /usr/bin/python # Import dependencies import serial, sys, sendmail, decimal import socket HOST = "raspberrypi" PORT = 1981 DEBUG = False; # Serial port settings AT_PORT = "/dev/ttyATH0" AT_BAUD = 115200 # Serial packet structure MAGIC_1 = 0xA9 MAGIC_2 = 0xBD MSG_TYPE_REQUEST = 0x00 MSFG_TYPE_RESPONSE = 0x01 MS...
gpl-2.0
8,152,229,391,004,637,000
20.130841
82
0.655462
false
2.569318
false
false
false
pave/pylint_flask_ext
flask_ext_clean.py
1
5123
""" Plugin for pylint that tells it about flask's extension classes. """ from pylint.utils import PyLintASTWalker from logilab.astng import MANAGER from logilab.astng import node_classes def copy_node_info(src, dest): """Copy information from src to dest Every node in the AST has to have line number information....
mit
5,791,808,267,114,807,000
36.669118
75
0.608823
false
3.949884
false
false
false
VRaviTheja/SDN-policy
flowgenerator/random_ports.py
1
1532
import random import socket import struct from random import randint def port_generator(): lim=1000 port_src_start = [] port_src_end = [] port_dst_start = [] port_dst_end = [] for i in range (0,lim): m = random.randint(1, 200) n = random.randint(1, 200) i...
apache-2.0
9,052,464,247,601,924,000
28.64
71
0.498695
false
3.152263
false
false
false
harmsm/uhbd
previous_releases/0.5.0/single_file.py
1
1800
""" single_file.py: A script that runs a UHBD calculation on a single file. """ """ Version notes: 0.4: 060113 0.4.1: 060403 Hokiness fix. Changed from some_path = x + os.sep + y to os.path.join(x,y) """ __author__ = "Michael J. Harms" __date__ = "060403" __version__ = "0.4.1" # USER INPUTS pH_start = 0...
unlicense
3,873,800,045,858,526,700
27.125
86
0.612222
false
3.302752
false
false
false
mattboyer/sqbrite
setup.py
1
1984
from setuptools.command.sdist import sdist as SetuptoolsSdist from setuptools import setup, find_packages import os import shutil import version from src import PROJECT_NAME, PROJECT_DESCRIPTION, README_PATH class SdistAndClean(SetuptoolsSdist): ''' Runs the default setuptools sdist command and then cleans t...
mit
-8,243,067,687,102,157,000
28.176471
74
0.632056
false
3.882583
false
false
false
Zerknechterer/pyload
module/plugins/hoster/RapidgatorNet.py
1
5675
# -*- coding: utf-8 -*- import pycurl import re from module.common.json_layer import json_loads from module.network.HTTPRequest import BadHeader from module.plugins.internal.AdsCaptcha import AdsCaptcha from module.plugins.internal.ReCaptcha import ReCaptcha from module.plugins.internal.SolveMedia import SolveMedia f...
gpl-3.0
3,505,129,110,890,734,000
33.603659
103
0.555947
false
3.575929
false
false
false
lwcook/horsetail-matching
horsetailmatching/weightedsum.py
1
7051
import pdb import time import math import copy import warnings import numpy as np from hm import HorsetailMatching class WeightedSum(HorsetailMatching): '''Class for using weighted sum of moments within an optimization. The code is written such that all arguments that can be used at the initialization o...
mit
8,754,911,680,858,841,000
34.791878
80
0.600624
false
4.12822
false
false
false
garthee/gnot
modules/pstemmer.py
1
12097
class PorterStemmer: def __init__(self): """The main part of the stemming algorithm starts here. b is a buffer holding a word to be stemmed. The letters are in b[k0], b[k0+1] ... ending at b[k]. In fact k0 = 0 in this demo program. k is readjusted downwards as the stemming progresses...
mit
3,138,866,654,744,761,300
31.783198
108
0.42432
false
3.634916
false
false
false
eternalNight/ucore_app_go
misc/dashboard/godashboard/package.py
1
14975
# Copyright 2010 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # This is the server part of the package dashboard. # It must be run by App Engine. from google.appengine.api import mail from google.appengine.api import memcach...
bsd-3-clause
-8,376,817,798,995,562,000
33.90676
169
0.54177
false
3.546897
false
false
false
rearmlkp/Smart_Flash
Flashcard/urls.py
1
2301
"""Flashcard URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
gpl-3.0
-7,804,049,766,153,713,000
41.611111
98
0.639722
false
2.996094
false
false
false
daira/zcash
contrib/seeds/generate-seeds.py
3
4418
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directo...
mit
-2,900,496,788,579,006,500
31.014493
98
0.574015
false
3.185292
false
false
false
Vicaris/ModPro
moviepy/video/io/ffmpeg_tools.py
1
2297
""" Misc. bindings to ffmpeg and ImageMagick.""" import os import sys import subprocess as sp from moviepy.tools import subprocess_call from moviepy.config import get_setting def ffmpeg_movie_from_frames(filename, folder, fps, digits=6): """ Writes a movie out of the frames (picture files) in a folder. ...
mit
703,182,229,391,548,000
32.289855
91
0.551589
false
3.295552
false
false
false
prheenan/Research
Perkins/Projects/WetLab/Util/DilutionUtil.py
1
13174
# force floating point division. Can still use integer with // from __future__ import division # This file is used for importing the common utilities classes. import numpy as np class DilutionObj: def __init__(self,StockConc,StockVol,DesiredConc,AddVol,Name=""): self.StockConc=StockConc self.StockV...
gpl-3.0
7,359,071,448,070,813,000
38.921212
80
0.642781
false
3.717269
false
false
false
bjoernricks/kaizen
kaizen/phase/phase.py
1
2714
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # kaizen - Continuously improve, build and manage free software # # Copyright (C) 2011 Björn Ricks <bjoern.ricks@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publishe...
gpl-2.0
-6,345,546,671,171,965,000
27.557895
79
0.56948
false
4.025223
false
false
false
srinath-chakravarthy/ovito
tests/scripts/test_suite/wigner_seitz_modifier.py
1
1252
from ovito import * from ovito.io import * from ovito.modifiers import * import numpy as np node = import_file("../../files/NetCDF/sheared_aSi.nc") modifier = WignerSeitzAnalysisModifier() node.modifiers.append(modifier) modifier.reference.load("../../files/NetCDF/sheared_aSi.nc") dataset.anim.current_frame = 4 pri...
gpl-3.0
-175,022,617,238,454,720
31.947368
98
0.749201
false
3.1067
false
true
false
PopulationGenetics/pyucsc
ucsc/db.py
1
3664
""" UCSC Interface via SQLalchemy ============================= """ import os import re from sqlalchemy import sql from sqlalchemy import orm import sqlalchemy as sa import logging; log = logging.getLogger(__name__) import config import model Session = orm.sessionmaker() session = Session() initialized = False meta...
bsd-3-clause
-1,658,897,240,787,379,700
31.424779
137
0.660753
false
3.499522
false
false
false
mathieubenoit/GDSII_Generator
generateWaferMap.py
1
2385
#!/usr/bin/python import os import numpy import gdspy ld_mask_edge = {'layer': 300, 'datatype': 0} ld_kerf = {'layer': 200, 'datatype': 0} ld_acfmask = {'layer': 100, 'datatype': 0} ld_topmetal= {'layer': 81, 'datatype': 0} ld_po= {'layer': 27, 'datatype': 1} def GenerateCell(chipX = 14100., chipY=16210.,leftKerf=85...
lgpl-3.0
4,824,642,096,970,110,000
35.707692
207
0.690985
false
2.644124
false
false
false
matthew-brett/draft-statsmodels
scikits/statsmodels/sandbox/bspline.py
1
20284
''' Bspines and smoothing splines. General references: Craven, P. and Wahba, G. (1978) "Smoothing noisy data with spline functions. Estimating the correct degree of smoothing by the method of generalized cross-validation." Numerische Mathematik, 31(4), 377-403. Hastie, Tibshirani and Friedman (20...
bsd-3-clause
-464,578,479,505,752,400
29.640483
105
0.543581
false
3.713658
false
false
false
CrispyMcToast/bkup
src/fs/Scanner.py
1
4092
#!/usr/bin/python import threading import os import hashlib import time MAX_THREADS = 5 thread_count = 0 tc_lock = threading.Lock() def inc_count(): global thread_count tc_lock.acquire() thread_count += 1 tc_lock.release() def dec_count(): global thread_count tc_lock.acquire() thread_cou...
gpl-3.0
-2,186,930,800,156,176,000
23.357143
72
0.516129
false
4.071642
false
false
false
Nettacker/Nettacker
lib/payload/shellcode/stack/engine.py
1
3693
#!/usr/bin/env python # -*- coding: utf-8 -*- import binascii from core.alert import error from core.compatible import version def shellcoder(shellcode): n = 0 xshellcode = '\\x' for w in shellcode: n += 1 xshellcode += str(w) if n == 2: n = 0 xshellcode +=...
gpl-3.0
-6,920,994,318,472,593,000
33.839623
84
0.426753
false
3.575024
false
false
false
destijl/grr
grr/gui/http_api.py
1
21177
#!/usr/bin/env python """HTTP API logic that ties API call handlers with HTTP routes.""" import json import time import traceback import urllib2 # pylint: disable=g-bad-import-order,unused-import from grr.gui import django_lib # pylint: enable=g-bad-import-order,unused-import from django import http from werkzeug...
apache-2.0
-6,772,753,926,901,431,000
35.893728
80
0.651934
false
4.030643
false
false
false
bgroff/kala-app
django_kala/auth/views/settings/avatar.py
1
2011
from django.conf import settings from django.contrib import messages from auth.forms.settings.avatar import AvatarForm from django.contrib.auth import get_user_model from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_...
mit
-1,904,576,512,794,497,300
34.910714
86
0.652909
false
4.19833
false
false
false
google/mobly
tests/mobly/controllers/android_device_lib/callback_handler_test.py
1
5977
# 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 agreed to in writing, ...
apache-2.0
958,428,415,450,603,900
42.948529
80
0.575205
false
4.375549
true
false
false