repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tectronics/engayged | common/views.py | 1 | 1318 | # Copyright 2011 Ryan W Sims (rwsims@gmail.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | -2,847,588,590,436,785,000 | 31.146341 | 76 | 0.688164 | false | 3.505319 | false | false | false |
h2oloopan/easymerge | EasyMerge/tests/reddit/r2/r2/config/queues.py | 1 | 3889 | # The contents of this file are subject to the Common Public Attribution
# License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, ... | mit | -2,030,277,675,288,153,900 | 36.038095 | 79 | 0.617382 | false | 3.948223 | false | false | false |
kanchenxi04/vnpy-app | vn.trader/ctaAlgo/ctaGridTrade.py | 1 | 22686 | # encoding: UTF-8
from ctaBase import *
from vtConstant import *
import json
import os
from datetime import datetime
DEBUGCTALOG = True
"""
网格交易,用于套利单
作者:李来佳,QQ/Wechat:28888502
ChangeLog:
0713,修改closeGrid,增加volume字段,关闭网格时,根据价格和交易量进行双重匹配.
0715,增加保存json和重启后加载本地json文件
"""
class CtaGrid(object):
"""... | mit | 7,691,323,958,762,017,000 | 36.350365 | 128 | 0.524282 | false | 3.076507 | false | false | false |
guilherme-pg/citationhunt | scripts/assign_categories.py | 2 | 7586 | #!/usr/bin/env python3
'''
Assign categories to the pages in the CitationHunt database.
Usage:
assign_categories.py
'''
import os
import sys
_upper_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
if _upper_dir not in sys.path:
sys.path.append(_upper_dir)
import config
import chdb a... | mit | -818,493,843,102,136,300 | 33.171171 | 80 | 0.639336 | false | 3.558161 | false | false | false |
ideamark/Bread-AI | breadbot/func/import_data.py | 1 | 3343 | import os
import re
from breadbot.core import common
LOG = common.ConsoleLog()
def get_path_list():
path_list = common.Cfg().get('local', 'data_paths')
path_list = common.expand_path(path_list)
path_list = common.get_md_path_list(path_list)
return path_list
def empty_db(db):
for key in db.key... | gpl-3.0 | 2,106,570,008,684,324,900 | 25.531746 | 55 | 0.398445 | false | 3.76464 | false | false | false |
daniaki/pyPPI | pyppi/predict/plotting.py | 1 | 2650 | """
This module contains the two functions used to make the heat-map plots
and the threshold curves.
"""
import numpy as np
import matplotlib
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
im... | mit | -6,504,576,043,822,381,000 | 29.813953 | 79 | 0.633962 | false | 2.937916 | false | false | false |
19kestier/taiga-back | taiga/projects/services/bulk_update_order.py | 3 | 4681 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program 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 F... | agpl-3.0 | 96,238,356,992,242,220 | 31.72028 | 81 | 0.643086 | false | 3.707607 | false | false | false |
nuagenetworks/vspk-python | vspk/v5_0/nuducgroup.py | 1 | 8850 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | bsd-3-clause | -2,938,784,582,177,685,000 | 29.208191 | 179 | 0.601582 | false | 4.618998 | false | false | false |
jal-stats/django | jal_stats/stats/serializers.py | 1 | 1341 | # from django.contrib.auth.models import User
from rest_framework import serializers
from .models import Activity, Stat
class StatAddSerializer(serializers.HyperlinkedModelSerializer):
model = Stat
class Meta:
model = Stat
fields = ('id', 'reps', 'date')
class StatSerializer(StatAddSeri... | mit | 326,956,262,202,499,900 | 24.788462 | 76 | 0.662192 | false | 4.113497 | false | false | false |
qbuat/rootpy | rootpy/extern/tabulartext/prettytable.py | 2 | 37152 | #!/usr/bin/env python
#
# Copyright (c) 2009, Luke Maurits <luke@maurits.id.au>
# All rights reserved.
# With contributions from:
# * Chris Clark
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of... | gpl-3.0 | 8,623,826,493,128,983,000 | 36.152 | 192 | 0.580938 | false | 4.083984 | false | false | false |
sho-87/cognitive-battery | utils/display.py | 1 | 3971 | import sys
import time
import pygame
from pygame.locals import *
def blank_screen(screen, background, duration):
"""Display a blank screen for a certain duration.
Parameters:
screen -- pygame screen object used for display
background -- pygame background that will be displayed
duration -- durati... | mit | -1,043,313,990,025,734,700 | 31.284553 | 78 | 0.632334 | false | 3.8 | false | false | false |
dinomonster/pythonTest | test.py | 1 | 1631 | print(123);
# input("\n\n按下 enter 键后退出")
x = "xxx";y="""三引号,
可以指定一个多行字符串"""
print("x:"+x)
print("y:"+y)
z = "这是一个带回车换行的字符串\n"
print(z)
zr = r"这是一个自然字符串\n"
print(zr)
#缩进相同的一组语句构成一个代码块,我们称之代码组。
#像if、while、def和class这样的复合语句,首行以关键字开始,以冒号( : )结束,该行之后的一行或多行代码构成代码组。
#我们将首行及后面的代码组称为一个子句(clause)。
if (1+1==2):
print(2)
elif... | apache-2.0 | 128,345,962,999,231,680 | 19.169811 | 74 | 0.655753 | false | 1.553779 | false | false | false |
kirmani/hlpr_cadence | third_party/vector_v1/vector_common/vector_ros/src/vector_gripper_interface/robotiq_85_driver.py | 2 | 9122 | """--------------------------------------------------------------------
COPYRIGHT 2015 Stanley Innovation Inc.
Software License Agreement:
The software supplied herewith by Stanley Innovation Inc. (the "Company")
for its licensed Segway RMP Robotic Platforms is intended and supplied to you,
the Company's customer, ... | mit | 3,013,445,839,578,790,000 | 42.438095 | 132 | 0.589016 | false | 3.627038 | false | false | false |
PyconUK/2017.pyconuk.org | pyconuk/migrations/0006_auto_20171005_2000.py | 1 | 2795 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-05 20:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('pyconuk', '0005_page_show_sponsors'),
]
operations... | mit | -2,235,165,394,175,713,800 | 38.366197 | 114 | 0.529517 | false | 4.346812 | false | false | false |
user-none/calibre | src/calibre/ebooks/pdb/header.py | 24 | 2801 | # -*- coding: utf-8 -*-
'''
Read the header data from a pdb file.
'''
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
__docformat__ = 'restructuredtext en'
import re
import struct
import time
class PdbHeaderReader(object):
def __init__(self, stream):
self.stream = s... | gpl-3.0 | -3,565,085,635,631,355,000 | 31.195402 | 119 | 0.579436 | false | 3.391041 | false | false | false |
MahjongRepository/tenhou-python-bot | project/utils/logger.py | 1 | 2471 | import datetime
import hashlib
import logging
import os
from logging.handlers import SysLogHandler
from utils.settings_handler import settings
LOG_FORMAT = "%(asctime)s %(levelname)s: %(message)s"
DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
class ColoredFormatter(logging.Formatter):
"""
Apply only to the console hand... | mit | 579,532,356,710,367,700 | 31.090909 | 105 | 0.65601 | false | 3.660741 | false | false | false |
andrei987/services | src/releng_treestatus/settings.py | 1 | 2203 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
import os
SWAGGER_BASE_URL = os.environ.get('SWAGGER_BASE_URL')
# -- DATABAS... | mpl-2.0 | -5,024,966,535,053,132,000 | 29.178082 | 79 | 0.64276 | false | 3.120397 | false | false | false |
Thoronador/ArxLibertatis | plugins/blender/arx_addon/dataFts.py | 3 | 10077 | # Copyright 2014 Arx Libertatis Team (see the AUTHORS file)
#
# This file is part of Arx Libertatis.
#
# Arx Libertatis 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 | -6,184,633,680,277,624,000 | 32.257426 | 132 | 0.539049 | false | 3.391787 | false | false | false |
carlosramosgonz/ayuda-django | directorydialog.py | 1 | 2739 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'directorydialog.ui'
#
# Created: Fri Jan 30 14:33:53 2015
# by: PyQt5 UI code generator 5.4
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_DirectoryDialog(object):
def ... | gpl-3.0 | -7,760,509,047,255,198,000 | 49.703704 | 132 | 0.743608 | false | 4.52562 | false | false | false |
Jumpscale/ays9 | JumpScale9AYS/jobcontroller/models/RunsCollection.py | 1 | 3413 | from js9 import j
import capnp
from JumpScale9AYS.jobcontroller.models.RunModel import RunModel
from JumpScale9AYS.jobcontroller.models import model_job_capnp as ModelCapnp
from JumpScale9Lib.data.capnp.ModelBase import ModelBaseCollection
class RunsCollection(ModelBaseCollection):
"""
This class represent a ... | apache-2.0 | 4,782,503,756,436,577,000 | 35.698925 | 149 | 0.550835 | false | 4.097239 | false | false | false |
barry-scott/git-workbench | Source/Git/wb_git_log_history_view.py | 2 | 30172 | '''
====================================================================
Copyright (c) 2016-2017 Barry A Scott. All rights reserved.
This software is licensed as described in the file LICENSE.txt,
which you should have received as part of this distribution.
======================================================... | apache-2.0 | 4,976,659,613,472,361,000 | 35.395657 | 128 | 0.599032 | false | 3.928646 | false | false | false |
andela-ggikera/Bucket-list-app-API | app/decorators/ownership.py | 1 | 2326 | import jwt
from ..models import db, User, Session, BucketList, BucketListItem
from flask import request, current_app
from flask.ext.sqlalchemy import sqlalchemy
from functools import wraps
from flask.ext.api.exceptions import \
AuthenticationFailed, PermissionDenied, NotFound
from ..exceptions.handler import Valida... | mit | -9,163,025,178,903,797,000 | 33.716418 | 74 | 0.618229 | false | 4.260073 | false | false | false |
HackSlash/Hexapod | src/python/MovementModule.py | 1 | 1235 | """Sends movement commands to the communication interface"""
class MovementModule(object):
"""constructor"""
def __init__(self, arg):
super(MovementModule, self).__init__()
self.arg = arg
self.isIdle = false
"""Sends a command to the arduino to move a specific servo into a specific angle"""
def moveServo(se... | mit | 6,159,319,118,526,860,000 | 25.276596 | 84 | 0.704453 | false | 3.302139 | false | false | false |
Sweetgrassbuffalo/ReactionSweeGrass-v2 | .meteor/local/dev_bundle/python/Lib/test/test_pep352.py | 135 | 9047 | import unittest
import __builtin__
import exceptions
import warnings
from test.test_support import run_unittest, check_warnings
import os
import sys
from platform import system as platform_system
DEPRECATION_WARNINGS = ["BaseException.message has been deprecated"]
if sys.py3kwarning:
DEPRECATION_WARNINGS.extend(
... | gpl-3.0 | 999,208,598,539,127,200 | 36.853556 | 81 | 0.552669 | false | 4.562279 | true | false | false |
profLewis/geog2021 | python/interact.py | 1 | 2035 | try:
from IPython.html import widgets
from IPython.html.widgets import *
except:
try:
from ipywidgets import widgets
from ipywidgets.widgets import *
except:
print 'do: pip install --user ipywidgets'
from IPython.display import clear_output, display, HTML
import pyl... | cc0-1.0 | -3,428,234,713,765,575,700 | 26.876712 | 96 | 0.545946 | false | 2.890625 | false | false | false |
ishankhare07/automated-scrapper | scrapper.py | 1 | 3041 | from __future__ import print_function
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.alert import Alert
import pytesseract, Image, time, anydbm, json
class handler:
def __init__(self):
file = raw_input('... | mit | -6,400,550,801,362,515,000 | 24.771186 | 153 | 0.687274 | false | 2.882464 | false | false | false |
delapuente/mcpy | mcpy/core.py | 2 | 4447 | '''Provide the functionality to find and expand macros.'''
import sys
from ast import *
from .visitors import BaseMacroExpander
class _MacroExpander(BaseMacroExpander):
def visit_With(self, withstmt):
'''
Check for a with macro as
with macroname:
# with's body is the ... | mit | -8,538,840,886,996,560,000 | 30.097902 | 81 | 0.597257 | false | 4.429283 | false | false | false |
dtroyer/python-openstacksdk | openstack/task_manager.py | 1 | 6708 | # Copyright (C) 2011-2013 OpenStack Foundation
#
# 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 | -3,543,492,451,916,163,000 | 32.044335 | 79 | 0.628503 | false | 4.253646 | false | false | false |
wikimedia/analytics-multimedia | generate.py | 1 | 3163 | #!/usr/bin/env python
import os
import sys
wikis = [
'global',
'cawiki',
'commonswiki',
'dewiki',
'enwiki',
'enwikivoyage',
'eswiki',
'etwiki',
'fiwiki',
'frwiki',
'hewiki',
'huwiki',
'itwiki',
'jawiki',
'kowiki',
'mediawikiwiki',
'nlwiki',
'plwi... | gpl-3.0 | -1,143,465,749,276,209,000 | 31.947917 | 333 | 0.590895 | false | 3.15984 | false | false | false |
cdondrup/strands_qsr_lib | qsr_prob_rep/scripts/example_pf_client.py | 5 | 5521 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from qsrrep_ros.ros_client import ROSClient
from qsrrep_lib.rep_io_pf import PfRepRequestCreate,PfRepRequestPredict, PfRepRequestUpdate, PfRepRequestList, PfRepRequestRemove
from qsrrep_pf.pf_model import PfModel
import os
import rospy
import json
import numpy as np
import... | mit | 2,371,363,254,443,316,700 | 43.524194 | 214 | 0.650245 | false | 3.937946 | false | false | false |
Giswater/giswater_qgis_plugin | actions/api_cf.py | 1 | 120494 | """
This file is part of Giswater 3
The 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.
"""
# -*- coding: latin-1 -*-
from qgis.core... | gpl-3.0 | 1,005,046,743,313,541,000 | 43.266716 | 160 | 0.602113 | false | 3.704316 | false | false | false |
edx-solutions/xblock-sdk | workbench/test/test_runtime.py | 3 | 2188 | """Test Workbench Runtime"""
from xblock.test.tools import assert_equals, assert_false, assert_is_none, assert_true
from xblock.fields import Scope
from xblock.runtime import KeyValueStore
from ..runtime import ScenarioIdManager, WorkbenchDjangoKeyValueStore
def test_scenario_ids():
# Test basic ID generation m... | agpl-3.0 | -8,189,476,043,618,865,000 | 32.151515 | 87 | 0.665905 | false | 3.19883 | true | false | false |
mmcardle/MServe | django-mserve/dataservice/migrations/0002_auto__del_field_dataservice_status__del_field_hostingcontainer_status_.py | 1 | 16600 | # encoding: 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):
# Deleting field 'DataService.status'
db.delete_column('dataservice_dataservice', 'status')
# Del... | lgpl-2.1 | -2,789,799,601,112,962,000 | 76.934272 | 203 | 0.567169 | false | 3.732854 | false | false | false |
goodlyrottenapple/calculus-toolbox | tools/utils.py | 1 | 3993 | #!/usr/bin/env python
import sys, re
from isabuilder import IsabelleBuilder
from scalabuilder import ScalaBuilder
def readFile(file):
with open(file) as f:
return f.read()
def processFile(file_str, builder, delimL = "", delimR = ""):
items = re.findall(re.escape(delimL)+r'[\w+\?]+'+re.escape(delimR), file_str)
... | mit | 3,290,470,809,639,939,000 | 34.035088 | 133 | 0.652893 | false | 2.721881 | false | false | false |
rupello/nxt-python-for-android | nxt/androidblueglue.py | 1 | 2629 | # bluetooth.py module -- Glue code from NXT_Python to Android API
# via pyjnius to tun on android devices. Supports subset of
# PyBluez/bluetooth.py used by NXT_Python.
#
# Copyright (C) 2015 Rupert Lloyd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General P... | gpl-3.0 | -5,733,537,787,555,242,000 | 33.142857 | 130 | 0.660327 | false | 3.912202 | false | false | false |
google-research/google-research | reset_free_learning/envs/gridworld.py | 1 | 7660 | # 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 | -330,490,549,227,368,100 | 30.265306 | 100 | 0.57376 | false | 3.281919 | false | false | false |
frostasm/qt-creator | scripts/packageIfw.py | 1 | 5919 | #!/usr/bin/env python
################################################################################
# Copyright (C) 2015 The Qt Company Ltd
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# ... | gpl-3.0 | -1,900,817,863,197,913,000 | 38.46 | 186 | 0.622233 | false | 3.959197 | true | false | false |
Dekker1/moore | src/materialize/templatetags/materialize.py | 1 | 1716 | from django import template
from django.template import loader
register = template.Library()
def get_widget_name(field):
return field.field.widget.__class__.__name__
def append_classes(field, widget=''):
field.field.label_suffix = ''
classes = field.field.widget.attrs.get('class', '')
classes += ' ... | agpl-3.0 | -4,470,055,073,247,954,000 | 27.131148 | 76 | 0.622378 | false | 3.788079 | false | false | false |
jleclanche/fireplace | fireplace/cards/tgt/priest.py | 1 | 1212 | from ..utils import *
##
# Minions
class AT_011:
"""Holy Champion"""
events = Heal().on(Buff(SELF, "AT_011e"))
AT_011e = buff(atk=2)
class AT_012:
"""Spawn of Shadows"""
inspire = Hit(ALL_HEROES, 4)
class AT_014:
"""Shadowfiend"""
events = Draw(CONTROLLER).on(Buff(Draw.CARD, "AT_014e"))
AT_014e = buff(... | agpl-3.0 | -1,481,308,870,233,912,600 | 15.16 | 77 | 0.659241 | false | 2.278195 | false | false | false |
bendmorris/pyj2d | pyj2d/display.py | 1 | 5477 | #PyJ2D - Copyright (C) 2011 James Garnon
from __future__ import division
from javax.swing import JFrame, JPanel
from java.awt import Color, Dimension, Toolkit
from java.awt.image import BufferedImage
from java.awt.event import MouseListener
from java.awt.event import MouseMotionListener
from java.awt.event import KeyL... | gpl-3.0 | -1,553,681,950,269,067,800 | 24.474419 | 78 | 0.582801 | false | 3.772039 | false | false | false |
jamiebull1/geomeppy | geomeppy/geom/segments.py | 1 | 2008 | """
Segment class, representing a line segment.
"""
from typing import Any, Iterator # noqa
from .vectors import Vector3D
from ..utilities import almostequal
if False:
from .polygons import Polygon3D # noqa
class Segment(object):
"""Line segment in 3D."""
def __init__(self, *vertices):
# ty... | mit | 1,063,645,658,906,592,400 | 26.888889 | 78 | 0.554283 | false | 3.657559 | false | false | false |
btxgit/gazee | gazee/db.py | 1 | 2355 | # .oooooooo .oooo. oooooooo .ooooo. .ooooo.
# 888' `88b `P )88b d'""7d8P d88' `88b d88' `88b
# 888 888 .oP"888 .d8P' 888ooo888 888ooo888
# `88bod8P' d8( 888 .d8P' .P 888 .o 888 .o
# `8oooooo. `Y888""8o d8888888P `Y8bod8P' `Y8bod8P'
# d" YD
# "Y88888P'
#
# database base class - b... | gpl-3.0 | -3,205,877,745,850,531,300 | 25.460674 | 92 | 0.586412 | false | 3.178138 | false | false | false |
M4rtinK/panora | gui/qml_gui.py | 1 | 12153 | """a QML GUI module for Panora"""
import glob
import shutil
import sys
import re
import os
from PySide import QtCore, QtOpenGL
import urllib
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtDeclarative import *
#from PySide import QtOpenGL
import datetime
import time
import locale
import gui
impor... | gpl-3.0 | -5,602,217,085,764,917,000 | 28.571776 | 87 | 0.677199 | false | 3.512428 | false | false | false |
phyng/rsshub | rss/admin.py | 1 | 1668 | # coding: utf-8
from __future__ import unicode_literals
from django.contrib import admin
from django.contrib import messages
from django.conf import settings
from rss.models import Rss, RssItem, RssCategory, RssUser
from tools.decorators import add_attr
from .utils import update_rss, build_mobi, send_file, send_user_... | mit | -462,205,293,161,025,300 | 29.888889 | 85 | 0.691247 | false | 3.460581 | false | false | false |
mewbak/idc | refactoring/dead_label_elimination.py | 1 | 1657 | """Dead Label Elimination"""
from transf import parse
parse.Transfs('''
#######################################################################
# Labels
shared needed_label as table
updateNeededLabels =
Where(
?GoTo(Sym(label)) ;
needed_label.set [label,label]
)
##########################################... | lgpl-2.1 | 2,845,576,617,328,752,000 | 13.927928 | 71 | 0.564876 | false | 2.698697 | false | false | false |
zhen-he/tba | scripts/check_st_consistency.py | 1 | 1282 | import os
import os.path as path
import glob
import argparse
import math
import numpy as np
import torch
import torch.nn as nn
import cv2 as cv
import sys
sys.path.append("modules")
import utils
H = 200
W = 400
D = 1
h = 100
w = 50
Y = torch.Tensor(1, D, h, w).fill_(1)
scale = torch.Tensor([[0.7]]) # N * 1
ratio... | mit | 2,721,941,193,102,614,000 | 21.910714 | 121 | 0.574883 | false | 2.241259 | false | true | false |
th0mmeke/toyworld | util/reaction_distribution.py | 1 | 2778 | """
Created on 13 Aug 2013
@author: thom
"""
import logging
import os
import config
from rdkit.Chem import AllChem as Chem
from emergent_reactions import EmergentReactions
from molecule import Molecule
from chemistry_factory import ChemistryFactory
from physics_factory import PhysicsFactory
if __name__ == '__main... | gpl-3.0 | -1,101,456,968,691,856,000 | 35.552632 | 117 | 0.562995 | false | 3.455224 | false | false | false |
CognizantOneDevOps/Insights | PlatformAgents/com/cognizant/devops/platformagents/agents/scm/bitbucket/BitBucketAgentBranchesUserDefined.py | 1 | 4565 | #-------------------------------------------------------------------------------
# Copyright 2017 Cognizant Technology Solutions
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http:... | apache-2.0 | -1,351,578,956,226,777,900 | 48.086022 | 147 | 0.555531 | false | 4.740395 | false | false | false |
oxpeter/flybase_miner | flybase_textmining.py | 1 | 16534 | #!/usr/bin/env python
"""
A script to take a list of drosophila genes, search flybase to get all pseudonyms,
extract all literature related to the genes, and construct a network showing the
relationship between genes.
"""
import argparse
import itertools
import os
import re
from subprocess import Popen, PIPE
import sy... | gpl-3.0 | 839,184,080,941,776,500 | 38.273159 | 100 | 0.543063 | false | 3.55417 | false | false | false |
philipperemy/tensorflow-phased-lstm | official_tensorflow_phased_lstm.py | 1 | 3634 | import argparse
from time import time
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.contrib.rnn import BasicLSTMCell
from tensorflow.contrib.rnn.python.ops.rnn_cell import PhasedLSTMCell
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.pytho... | mit | -9,189,673,418,886,929,000 | 37.659574 | 114 | 0.596863 | false | 3.377323 | false | false | false |
bootphon/abkhazia | setup.py | 1 | 2109 | #!/usr/bin/env python
# Copyright 2016 Thomas Schatz, Xuan-Nga Cao, Mathieu Bernard
#
# This file is part of abkhazia: 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 l... | gpl-3.0 | -3,345,725,179,985,626,000 | 31.446154 | 77 | 0.704599 | false | 3.396135 | false | false | false |
nrz/ylikuutio | external/bullet3/examples/pybullet/examples/testrender_egl.py | 4 | 2929 |
#using the eglRendererPlugin (hardware OpenGL acceleration)
#using EGL on Linux and default OpenGL window on Win32.
#make sure to compile pybullet with PYBULLET_USE_NUMPY enabled
#otherwise use testrender.py (slower but compatible without numpy)
#you can also use GUI mode, for faster OpenGL rendering (instead of Tiny... | agpl-3.0 | -2,223,623,199,875,886,300 | 27.715686 | 98 | 0.632298 | false | 3.294713 | false | false | false |
jbenden/ansible | lib/ansible/modules/cloud/amazon/ecs_task.py | 1 | 11472 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
... | gpl-3.0 | 606,940,068,891,091,800 | 34.627329 | 160 | 0.605213 | false | 4.316027 | false | false | false |
muralab/dockingAnalysisTools | scripts/gatherSupPlots.py | 1 | 2240 | #!/bin/python3.3
import argparse
from os.path import isfile
from os import chdir
from subprocess import call
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--quick', action='store_true')
parser.add_argument('--header', default='')
args = parser.parse_args()
texfile = []
te... | gpl-3.0 | -1,196,530,981,728,993,300 | 39.727273 | 97 | 0.500893 | false | 3.69028 | false | false | false |
pilt/stream-server | web.py | 1 | 2559 | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Simon Pantzare
# See COPYING for details.
import cherrypy
from streamserver import StreamServer
import os.path
from code import interact
# Let us first set up the streaming server and add some media to it.
stream = StreamServer()
media = [("m1.mp3", "Sample_MP3_1"),
... | gpl-2.0 | -309,364,625,130,295,200 | 27.433333 | 79 | 0.58812 | false | 3.336375 | false | false | false |
amerc/TCP3 | scripts/nexys3.py | 1 | 2508 | #!/usr/bin/env python
"""compile, build and download the NEXYS3 demo to the NEXYS3 development kit"""
import sys
import os
import shutil
from user_settings import xilinx
if "clean" in sys.argv or "all" in sys.argv:
print "Cleaning NEXYS3 ...."
retval = os.system("rm -rf ../NEXYS3/*")
if retval != 0:
... | mit | 6,178,590,656,635,278,000 | 40.8 | 131 | 0.679027 | false | 2.929907 | false | true | false |
Stiliyan92/accounting-system | server/dbio.py | 1 | 2264 | import MySQLdb
import settings as s
def parse_data(log, table):
""" Parses log input in appropriate string for inserting
test_accounting database"""
date = log.get('log_date')
datetime = date[6:10] + '-' + date[3:5] + '-' + date[0:2] + date[10:]
sql_query = "INSERT INTO {} VALUES('{}', '{}', '... | gpl-2.0 | 6,461,802,260,873,884,000 | 36.114754 | 76 | 0.494258 | false | 4.304183 | false | false | false |
stevedh/queryutils | loadparsetrees.py | 1 | 1427 | from argparse import ArgumentParser
from queryutils.parse import parse_query
from sqlite3 import connect
from os import path
from contextlib import closing
thisdir = path.dirname(path.realpath(__file__))
SCHEMA = path.join(thisdir, "parsetrees_schema.sql")
def main(database, schema):
init_table(database, schema)... | bsd-3-clause | 8,570,611,363,418,363,000 | 26.980392 | 97 | 0.651016 | false | 3.716146 | false | false | false |
garygriswold/Bible.js | Versions/Release.2.x.x/py/OBSOLETE/LocalizableStrings.py | 1 | 5326 | #
# This program is used to generate Localizable.strings files using Google Translate
# to perform the translation.
#
# When there is a revision of the code that requires this to be regenerated.
# 1. Complete editing of NSLocalizableString in source code
# 2. Editor -> Export for Localization -> (Development Language O... | mit | 4,181,244,355,139,258,000 | 29.786127 | 97 | 0.661284 | false | 3.043429 | false | false | false |
richardliaw/ray | python/ray/tune/tests/test_progress_reporter.py | 1 | 15181 | import pytest
import collections
import os
import unittest
from unittest.mock import MagicMock, Mock
from ray import tune
from ray.test_utils import run_string_as_driver
from ray.tune.trial import Trial
from ray.tune.result import AUTO_RESULT_KEYS
from ray.tune.progress_reporter import (CLIReporter, _fair_filter_trials... | apache-2.0 | -1,639,783,705,091,785,200 | 40.140921 | 79 | 0.441539 | false | 3.321155 | true | false | false |
mornelon/QtCreator_compliments | tests/system/suite_qtquick/tst_qtquick_creation/test.py | 2 | 1951 | source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
checkedTargets, projectName = createNewQtQuickApplication(workingDir,
... | lgpl-2.1 | 5,777,346,491,153,767,000 | 47.775 | 124 | 0.656074 | false | 4.269147 | false | false | false |
the-archer/ai-project | qlearningAgents.py | 1 | 5541 | # qlearningAgents.py
# ------------------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan ... | gpl-2.0 | 7,830,693,704,912,189,000 | 25.772947 | 87 | 0.68327 | false | 3.159065 | false | false | false |
aganezov/gos | gos/tmp/scaffolding_with_repeats.py | 1 | 21083 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from collections import defaultdict
from copy import deepcopy
from bg import Multicolor, KBreak, BreakpointGraph, GRIMMReader, NewickReader, BGGenome
import itertools
from bg.vertices import TaggedInfinityVertex, TaggedBlockVertex
import networkx as nx
import os
__author_... | mit | -6,199,017,084,238,104,000 | 50.928571 | 144 | 0.581796 | false | 4.066937 | false | false | false |
silicon-heaven/libshv | libshvchainpack/py/chainpack/cpcontext.py | 1 | 1162 | class UnpackContext:
class BufferUnderflow(Exception):
pass
def __init__(self, data):
# assert isinstance(data, bytes)
self.data = data
self.index = 0
def get_byte(self):
if self.index >= len(self.data):
raise UnpackContext.BufferUnderflow()
ret = self.data[self.index]
self.index += 1
return re... | lgpl-3.0 | -1,804,943,040,699,344,400 | 20.518519 | 60 | 0.658348 | false | 2.813559 | false | false | false |
caihaibin/Blog | handlers/andy.py | 1 | 7118 | from google.appengine.ext import db, webapp
from django import forms
import datetime, decimal, view
def strtotime(ms):
s=float(ms)/1000
ms = (round(s - math.floor(s),2))*100
m,s=divmod(s,60)
h,m=divmod(m,60)
d,h=divmod(h,24)
return datetime.time(h, m, s, ms)
class Player(db.Model):
e... | mit | 9,086,457,527,280,763,000 | 33.726829 | 117 | 0.565608 | false | 3.684265 | false | false | false |
data-driven-science/ddsm-db | ddsmdb/test/test_mongodb.py | 2 | 2028 | from pymongo import MongoClient
from ddsmdb.common.core import setup_app
from flask.ext.testing import TestCase
import time
import twill
class MongodbTest(TestCase):
def create_app(self):
try:
browser = twill.get_browser()
browser.go("http://localhost:5200/")
app = setu... | mit | -4,650,658,621,946,074,000 | 38.019231 | 103 | 0.622781 | false | 3.840909 | true | false | false |
eyedeeemm/nitrogen | colors/gen_colors.py | 1 | 1661 | #!/usr/bin/env python
import sys
def main ():
f_in = open('rgb.txt', 'r')
if not f_in.readline ():
return 1
lines = f_in.readlines ()
if not lines:
return 2
del f_in
f_py = open('pycolors.py', 'w')
if not f_py:
return 3
f_hpp = open('colors.hpp', 'w')
if n... | unlicense | 8,857,530,196,304,344,000 | 22.728571 | 72 | 0.48525 | false | 2.873702 | false | false | false |
praekelt/jmbo-football | football/management/commands/football_fetch.py | 1 | 9487 | import datetime
import urllib2
from lxml import etree
from django.db.models import Q
from django.conf import settings
from football365.management.commands.football365_fetch import Command as BaseCommand
from football.models import LeagueGroup, League, Team, LogEntry, Fixture
class Command(BaseCommand):
pipelin... | bsd-3-clause | -238,111,377,771,739,780 | 44.610577 | 140 | 0.468536 | false | 4.583092 | false | false | false |
TaskEvolution/Task-Coach-Evolution | taskcoach/changes.in/make.py | 1 | 1328 | '''
Task Coach - Your friendly task manager
Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org>
Task Coach 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
... | gpl-3.0 | -6,523,432,152,767,016,000 | 34.891892 | 73 | 0.754518 | false | 3.928994 | false | false | false |
xmxjq/phoneyc-SjtuISADTeam | output/xml_output.py | 3 | 131406 | #!/usr/bin/env python
#
# Generated Thu Mar 11 10:02:29 2010 by generateDS.py version 1.20c.
#
import sys
import getopt
from string import lower as str_lower
from xml.dom import minidom
from xml.dom import Node
#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can repla... | gpl-2.0 | 7,722,073,691,592,544,000 | 40.915789 | 289 | 0.592918 | false | 4.32086 | false | false | false |
south-coast-science/scs_dfe_eng | tests/gas/temp_comp_test.py | 1 | 1635 | #!/usr/bin/env python3
"""
Created on 22 Sep 2016
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
from scs_core.gas.sensor import Sensor
from scs_core.gas.a4.a4_temp_comp import A4TempComp
# ------------------------------------------------------------------------------------------------------------... | mit | -44,132,761,331,495,170 | 16.771739 | 118 | 0.57737 | false | 2.69802 | false | true | false |
feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/subtrees/background_processing/functions/common/reporting.py | 3 | 6817 | # Copyright (C) 2020 Christopher Gearhart
# chris@bblanimation.com
# http://bblanimation.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gpl-3.0 | -5,041,971,997,623,541,000 | 33.604061 | 232 | 0.629309 | false | 3.455144 | false | false | false |
cmhill/VALET | src/py/pileup.py | 1 | 3480 | #!/usr/bin/env python
from optparse import OptionParser
import os
import re
import sys
PROG_NAME = "PILEUP"
def setup_options():
parser = OptionParser()
parser.add_option("-s", "--sam", dest="sam_filename", help="SAM file name.", metavar="FILE")
(options,args) = parser.parse_args()
if options.sam_... | mit | -1,410,776,930,036,573,700 | 26.626984 | 96 | 0.570115 | false | 3.79085 | false | false | false |
tensorflow/tensorflow | tensorflow/python/data/util/structure.py | 6 | 20150 | # Copyright 2018 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 | -4,850,803,345,212,368,000 | 35.241007 | 93 | 0.705211 | false | 4.063319 | false | false | false |
Muxi-Studio/muxi_site | tests/tests.py | 2 | 15755 | #coding: utf-8
import unittest
from flask import current_app , url_for,jsonify , current_app
from muxiwebsite import create_app
from flask_sqlalchemy import SQLAlchemy
import random
from muxiwebsite.models import Share
import json
import base64
TOKEN = str(0)
TOKEN2 = str(0)
TOKEN1 = str(0)
SHARE_ID = 1
BLOG_ID = 1
YE... | mit | -1,185,833,122,489,777,700 | 38.486216 | 84 | 0.458712 | false | 4.237493 | true | false | false |
cemagg/sucem-fem | sandbox/eig/postproc_eigres.py | 1 | 1595 | ## Copyright (C) 2011 Stellenbosch University
##
## This file is part of SUCEM.
##
## SUCEM 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 v... | gpl-3.0 | -5,524,464,472,150,872,000 | 35.25 | 75 | 0.723511 | false | 3.302277 | false | false | false |
mikewolfli/django-goflow | goflow/apptools/templatetags/apptools_lib.py | 1 | 2897 | from django.template import Library
#from django.conf import settings
from goflow.apptools.models import ImageButton
register = Library()
def form_ext(form):
'''
This will insert a form, in a bit more sophisticated way than {{ form }}.
Required and optional fields are displayed differently. For details,
... | bsd-3-clause | 2,875,779,041,030,860,000 | 28.865979 | 111 | 0.661374 | false | 4.051748 | false | false | false |
Stargrazer82301/ChrisFit | Test/Example_Wrapper.py | 1 | 2474 | # Import smorgasbord
import sys
import os
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import scipy.stats
import scipy.ndimage
import pandas as pd
import multiprocessing as mp
import inspect
import matplotlib
matplotlib.use('Agg')
sys.path.append(os.path.dirname(os.path.realpath(os.path.dirname(... | mit | -2,983,387,827,682,235,000 | 37.061538 | 126 | 0.541229 | false | 3.307487 | false | false | false |
rsmith-nl/scripts | pdfdiff.py | 1 | 2441 | # file: pdfdiff.py
# vim:fileencoding=utf-8:fdm=marker:ft=python
#
# Copyright © 2019 R.F. Smith <rsmith@xs4all.nl>
# SPDX-License-Identifier: MIT
# Created: 2019-07-11T00:22:30+0200
# Last modified: 2020-04-23T19:03:32+0200
"""
Script to try and show a diff between two PDF files.
Requires pdftotext from the poppler u... | mit | -6,899,480,097,049,429,000 | 25.236559 | 87 | 0.603279 | false | 3.310719 | false | false | false |
aliostad/wiki-album-genre | album_genre_api.py | 1 | 3663 | from __future__ import unicode_literals
import tensorflow as tf
import numpy as np
import os
import time
import datetime
import data_loader
from text_cnn import TextCNN
from tensorflow.contrib import learn
from flask import Flask, jsonify, request, send_from_directory
import logging
from logging import FileHandler
imp... | mit | -6,845,136,766,652,366,000 | 30.307692 | 102 | 0.663391 | false | 3.641153 | false | false | false |
larsks/cloud-init | tests/unittests/test_net.py | 1 | 176307 | # This file is part of cloud-init. See LICENSE file for license information.
from cloudinit import net
from cloudinit import distros
from cloudinit.net import cmdline
from cloudinit.net import (
eni, interface_has_own_mac, natural_sort_key, netplan, network_state,
renderers, sysconfig)
from cloudinit.sources.h... | gpl-3.0 | -3,473,058,908,272,596,000 | 34.191018 | 82 | 0.498681 | false | 3.643158 | true | false | false |
saullocastro/pyNastran | pyNastran/op2/dev/xlsx_writer.py | 1 | 11740 | #pylint: disable=W0201,C0301,C0111
from __future__ import (nested_scopes, generators, division, absolute_import,
print_function, unicode_literals)
from six import iteritems
import sys
import copy
from datetime import date
from collections import defaultdict
import pyNastran
from pyNastran.op2.o... | lgpl-3.0 | 6,491,327,035,501,152,000 | 34.902141 | 110 | 0.52632 | false | 3.574909 | false | false | false |
jdsutton/Slurp | tests/dependency/test_DependencyAnalyzer.py | 1 | 1262 | from dependency.DependencyAnalyzer import DependencyAnalyzer
from os import getcwd
from os.path import join
from tempfile import NamedTemporaryFile
import unittest
class test_DependencyAnalyzer(unittest.TestCase):
def test_findDependencyPaths(self):
f = NamedTemporaryFile(mode='w', delete=False)
s... | mit | -210,244,994,050,891,620 | 37.272727 | 85 | 0.655309 | false | 3.585227 | true | false | false |
handcraftsman/GeneticAlgorithmsWithPython | es/ch12/genetic.py | 1 | 7055 | # File: genetic.py
# Del capítulo 12 de _Algoritmos Genéticos con Python_
#
# Author: Clinton Sheppard <fluentcoder@gmail.com>
# Copyright (c) 2017 Clinton Sheppard
#
# 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 ... | apache-2.0 | 3,150,006,538,457,264,600 | 35.376963 | 79 | 0.64076 | false | 2.913208 | false | false | false |
jefftc/changlab | Betsy/Betsy/modules/merge_files_for_classification.py | 1 | 1425 | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, antecedents, out_attributes, user_options, num_cores,
outfile):
"""merge three signal file to generate a joined signal file"""
impor... | mit | -6,826,121,691,949,817,000 | 35.538462 | 86 | 0.630877 | false | 3.779841 | false | false | false |
jaywink/federation | setup.py | 2 | 2072 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
from federation import __version__
description = 'Python library to abstract social web federation protocols like ActivityPub and Diaspora.'
def get_long_description():
return open(os.path.join(os.path.dirname(__file__), "docs", "intr... | bsd-3-clause | -1,946,512,200,392,204,800 | 30.876923 | 105 | 0.611486 | false | 3.774135 | false | false | false |
sythonic/sythonic.github.io | 2016-04-02-LASACTF-2016_writeupfiles/intercepted.py | 1 | 3805 | from Crypto.PublicKey import RSA
from fractions import gcd
import gmpy2
import base64
def prime_factors(n):
"""Returns all the prime factors of a positive integer"""
factors = []
d = 2
while n > 1:
while n % d == 0:
factors.append(d)
n /= d
d = d + 1
return ... | mit | -9,004,341,405,338,469,000 | 68.2 | 622 | 0.922996 | false | 2.311665 | false | false | false |
bat-serjo/vivisect | envi/archs/amd64/opcode64.py | 1 | 204782 | from envi.archs.i386.opconst import *
import envi.archs.amd64.regs as e_amd64_regs
# in order to be included, table name must be listed here.
tablenames = [ None, # nexttable index 0 means NO TABLE!
'tbl32_0F',
'tbl32_0F00',
'tbl32_0F01_00BF',
... | apache-2.0 | 7,852,304,995,771,256,000 | 87.154111 | 229 | 0.618067 | false | 1.873269 | false | false | false |
AMDmi3/repology | repology/transformer/__init__.py | 1 | 7724 | # Copyright (C) 2016-2018 Dmitry Marakasov <amdmi3@amdmi3.ru>
#
# This file is part of repology
#
# repology 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 optio... | gpl-3.0 | -5,799,388,366,408,713,000 | 36.862745 | 158 | 0.622605 | false | 4.039749 | false | false | false |
OCA/bank-statement-reconcile | account_banking_reconciliation/models/account_banking_reconciliation.py | 1 | 32958 | # Copyright (C) 2019 Open Source Integrators
# <https://www.opensourceintegrators.com>
# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time
from odoo import ... | agpl-3.0 | -610,442,801,468,169,000 | 52.725938 | 79 | 0.48251 | false | 4.900164 | false | false | false |
studentenportal/web | apps/api/views.py | 1 | 4291 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.http import HttpResponseBadRequest, JsonResponse
from django.shortcuts import get_object_or_404
from r... | agpl-3.0 | -8,344,794,692,189,817,000 | 29.65 | 87 | 0.652995 | false | 3.97683 | false | false | false |
uppsaladatavetare/foobar-kiosk | drivers/rfid.py | 1 | 2953 | import time
import serial
import logging
import argparse
import redis
from functools import wraps
logger = logging.getLogger(__name__)
def throttle(seconds):
def decorator(func):
func.last_call = 0
def reset_timer():
func.reset_timer = 0
func.reset_timer = reset_timer
... | mit | -2,870,519,229,299,108,400 | 30.752688 | 79 | 0.585168 | false | 4.304665 | false | false | false |
dothiko/mypaint | gui/colors/changers.py | 1 | 4586 | # This file is part of MyPaint.
# Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your ... | gpl-2.0 | 805,290,099,443,521,700 | 28.397436 | 77 | 0.611862 | false | 3.404603 | false | false | false |
Ben-Baert/irail-cli | irail/commands/utils.py | 2 | 6454 | import requests
import pytz
from datetime import datetime
import click
import re
def api_request(feature, **input_params):
headers = {'Content-type': 'application/json',
'Accept': 'text/plain'}
params = {"fast": "true",
"format": "json",
"from": input_params.get("fr... | mit | -790,857,032,679,708,500 | 29.880383 | 118 | 0.645026 | false | 3.734954 | false | false | false |
newgene/tornado_auth_orcid | tests/Google/googleloginserver.py | 1 | 2926 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import binascii
import pathlib
import tornado.web
from tornado import gen
from tornado.auth import GoogleOAuth2Mixin
from tornado.escape import to_unicode
import verifyjwt # https://github.com/yukirin/Tornado-Google-Login/blob/master/verifyjwt.py
class Goog... | apache-2.0 | -1,851,561,021,616,250,000 | 32.261364 | 98 | 0.611073 | false | 3.844941 | false | false | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/orca/eventsynthesizer.py | 1 | 5306 | # Orca
#
# Copyright 2005-2008 Sun Microsystems Inc.
#
# 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... | gpl-3.0 | -6,163,446,095,220,831,000 | 34.610738 | 78 | 0.663211 | false | 3.776512 | false | false | false |
clearspark/django-monthfield | month/models.py | 1 | 1749 | import datetime
from django.db import models
from django.core import exceptions
from django.utils.translation import ugettext_lazy as _
from month import forms
from month import widgets
from month import Month
from month.util import string_type
class MonthField(models.DateField):
description = "A specific mont... | bsd-3-clause | 1,749,444,576,762,850,800 | 29.155172 | 81 | 0.611206 | false | 4.484615 | false | false | false |
DarknessSwitch/django-tutorial | catalog/migrations/0008_auto_20160921_1511.py | 2 | 1576 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-21 05:11
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('catalog', '0007_auto_20160921_1444'),
]
... | cc0-1.0 | -5,165,161,500,479,690,000 | 37.439024 | 204 | 0.58566 | false | 4.114883 | false | false | false |
NCI-GDC/gdcdatamodel | test/unit/test_tagging.py | 1 | 2171 | from gdcdatamodel.models import versioning as v
from gdcdatamodel.models import basic # noqa
EXPECTED_TAGS = {
"be66197b-f6cc-4366-bded-365856ec4f63": "84044bd2-54a4-5837-b83d-f920eb97c18d",
"a2b2d27a-6523-4ddd-8b2e-e94437a2aa23": "84044bd2-54a4-5837-b83d-f920eb97c18d",
"813f97c4-dffc-4f94-b3f6-66a93476a... | apache-2.0 | -85,116,140,851,788,700 | 37.087719 | 103 | 0.685859 | false | 2.385714 | false | false | false |
sacharya/nova | nova/api/openstack/compute/plugins/v3/flavor_access.py | 1 | 8076 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.a... | apache-2.0 | 5,418,873,812,172,487,000 | 35.053571 | 78 | 0.652675 | false | 4.097412 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.