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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CriticalD20/Sine-Cosine | sinecosine.py | 1 | 2215 | """
sinecosine.py
Author: James Napier
Credit: http://www.discoveryplayground.com/computer-programming-for-kids/rgb-colors/, Mr. Dennison
Assignment:
In this assignment you must use *list comprehensions* to generate sprites that show the behavior
of certain mathematical functions: sine and cosine.
The sine and cosi... | mit | -7,328,395,108,479,366,000 | 35.311475 | 98 | 0.792777 | false | 3.124118 | false | false | false |
brendandc/multilingual-google-image-scraper | create-language-zip.py | 1 | 3067 | import optparse
import os
optparser = optparse.OptionParser()
optparser.add_option("-l", "--language", dest="language", default="French", help="Language to package")
optparser.add_option("-b", "--bucket", dest="bucket", default="brendan.callahan.thesis", help="S3 bucket name")
optparser.add_option("-p", "--prefix", de... | mit | -8,948,385,637,682,369,000 | 41.597222 | 140 | 0.681774 | false | 3.067 | false | false | false |
hadim/spindle_tracker | spindle_tracker/io/trackmate.py | 1 | 5663 | import itertools
import xml.etree.cElementTree as et
import networkx as nx
import pandas as pd
import numpy as np
def trackmate_peak_import(trackmate_xml_path, get_tracks=False):
"""Import detected peaks with TrackMate Fiji plugin.
Parameters
----------
trackmate_xml_path : str
TrackMate XML... | bsd-3-clause | 6,876,808,598,429,822,000 | 36.753333 | 142 | 0.529931 | false | 4.019163 | false | false | false |
kronat/ns-3-dev-git | src/network/bindings/modulegen__gcc_ILP32.py | 1 | 773065 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | 7,644,027,052,523,548,000 | 64.658655 | 594 | 0.610563 | false | 3.810793 | false | false | false |
wxgeo/geophar | wxgeometrie/sympy/printing/rcode.py | 3 | 14687 | """
R code printer
The RCodePrinter converts single sympy expressions into single R expressions,
using the functions defined in math.h where possible.
"""
from __future__ import print_function, division
from sympy.core import S
from sympy.core.compatibility import string_types, range
from sympy.codegen.ast import... | gpl-2.0 | 3,434,515,022,985,625,000 | 34.052506 | 111 | 0.564717 | false | 3.696703 | false | false | false |
jpburstrom/sampleman | mainwindowui.py | 1 | 18965 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'sampleman.ui'
#
# Created: Sun Mar 7 13:00:58 2010
# by: PyQt4 UI code generator 4.7
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_MainWindow(object):
def setupUi(self, MainWind... | gpl-3.0 | 3,103,841,371,846,845,400 | 67.963636 | 144 | 0.739784 | false | 3.955162 | false | false | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/tensor/nlinalg.py | 1 | 23539 | from __future__ import absolute_import, print_function, division
import logging
import numpy
from six.moves import xrange
import theano
from theano.tensor import as_tensor_variable
from theano.gof import Op, Apply
from theano.gradient import DisconnectedType
from theano.tensor import basic as tensor
logger = loggin... | agpl-3.0 | 5,579,638,122,380,263,000 | 27.190419 | 80 | 0.550363 | false | 3.508571 | false | false | false |
cylc/cylc | cylc/flow/cycling/loader.py | 1 | 4880 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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,... | gpl-3.0 | 2,625,730,440,720,114,000 | 33.366197 | 79 | 0.71168 | false | 3.277367 | false | false | false |
tjmonsi/cmsc129-2016-repo | submissions/exercise3/pitargue/lexical_analyzer.py | 1 | 8280 | import string
class DFA:
keywords = [
'var',
'input',
'output',
'break',
'continue',
'if',
'elsif',
'else',
'switch',
'case',
'default',
'while',
'do',
'for',
'foreach',
'in',
'f... | mit | 3,629,047,361,692,439,600 | 39.990099 | 134 | 0.586957 | false | 3.604702 | false | false | false |
aipescience/django-daiquiri | daiquiri/core/adapter/download/base.py | 1 | 4910 | import logging
import csv
import subprocess
import re
from django.conf import settings
from daiquiri.core.generators import generate_csv, generate_votable, generate_fits
from daiquiri.core.utils import get_doi_url
logger = logging.getLogger(__name__)
class BaseDownloadAdapter(object):
def __init__(self, datab... | apache-2.0 | 6,772,274,127,375,952,000 | 36.480916 | 128 | 0.555804 | false | 4.322183 | false | false | false |
hiro2016/ergodox_gui_configurator | GUIComponents/KeyPresstInterceptorComponent.py | 1 | 9286 | import platform
from threading import Timer
from PyQt5 import QtCore
from PyQt5.QtCore import QObject, pyqtSignal
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, QTextEdit, QLabel, QSizePolicy, QLineEdit, QApplication, QWidget
import sys
from NoneGUIComponents import keypress_observer
from NoneGUIComponents.dic... | gpl-2.0 | -1,803,215,776,816,161,300 | 35.703557 | 118 | 0.620719 | false | 4.042664 | false | false | false |
vprusso/youtube_tutorials | web_scraping_and_automation/selenium/craigstlist_scraper.py | 1 | 2952 | # YouTube Video (Part 1): https://www.youtube.com/watch?v=4o2Eas2WqAQ&t=0s&list=PL5tcWHG-UPH1aSWALagYP2r3RMmuslcrr
# YouTube Video (Part 2): https://www.youtube.com/watch?v=x5o0XFozYnE&t=716s&list=PL5tcWHG-UPH1aSWALagYP2r3RMmuslcrr
# YouTube Video (Part 3): https://www.youtube.com/watch?v=_y43iqSJgnc&t=1s&list=PL5tcWHG... | gpl-3.0 | 6,487,594,359,226,624,000 | 30.073684 | 129 | 0.609417 | false | 3.389208 | false | false | false |
cisco-oss-eng/Cloud99 | cloud99/loaders/__init__.py | 1 | 2556 | # Copyright 2016 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 4,718,103,721,506,559,000 | 28.045455 | 75 | 0.625978 | false | 3.99375 | false | false | false |
olimastro/DeepMonster | deepmonster/lasagne/nn.py | 1 | 16191 | """
neural network stuff, intended to be used with Lasagne
All this code, except otherwise mentionned,
was written by openai taken from improvedgan repo on github
"""
import numpy as np
import theano as th
import theano.tensor as T
from theano.tensor.nnet.abstract_conv import (bilinear_upsampling, )
from theano.sandb... | mit | -6,252,026,180,454,746,000 | 41.94695 | 159 | 0.59601 | false | 3.259058 | false | false | false |
rodrigopolo/cheatsheets | upload_video.py | 1 | 7001 | #!/usr/bin/env python
# Modified to always use the installation path to store and read the client_secrets.json and pyu-oauth2.json file
import httplib
import httplib2
import os
import random
import sys
import time
from apiclient.discovery import build
from apiclient.errors import HttpError
from apiclient.http import ... | mit | -5,672,397,897,091,849,000 | 37.048913 | 113 | 0.713755 | false | 3.825683 | false | false | false |
WSULib/combine | tests/test_models/test_validation_scenario.py | 1 | 2903 | from django.test import TestCase
from core.models import ValidationScenario
from tests.utils import TestConfiguration
SCHEMATRON_PAYLOAD = '''<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://purl.oclc.org/dsdl/schematron" xmlns:internet="http://internet.com">
<ns prefix="internet" uri="http://internet.com... | mit | -102,594,079,670,103,680 | 40.471429 | 116 | 0.672408 | false | 3.917679 | true | false | false |
foreni-packages/hachoir-parser | setup.py | 1 | 2770 | #!/usr/bin/env python
from imp import load_source
from os import path
from sys import argv
# Procedure to release a new version:
# - edit hachoir_parser/version.py: __version__ = "XXX"
# - edit setup.py: install_options["install_requires"] = "hachoir-core>=XXX"
# - edit INSTALL: update Dependencies
# - run: ./test... | gpl-2.0 | -9,108,310,611,562,844,000 | 34.512821 | 86 | 0.641516 | false | 3.488665 | false | false | false |
django-leonardo/django-leonardo | leonardo/conf/default.py | 1 | 3507 |
from leonardo.base import default
EMAIL = {
'HOST': 'mail.domain.com',
'PORT': '25',
'USER': 'username',
'PASSWORD': 'pwd',
'SECURITY': True,
}
RAVEN_CONFIG = {}
ALLOWED_HOSTS = ['*']
USE_TZ = True
DEBUG = True
ADMINS = (
('admin', 'mail@leonardo.cz'),
)
# month
LEONARDO_CACHE_TIMEOUT = ... | bsd-3-clause | -4,509,059,239,852,881,400 | 16.892857 | 115 | 0.60365 | false | 3.031115 | false | false | false |
sunfounder/SunFounder_SensorKit_for_RPi2 | Python/08_vibration_switch.py | 1 | 1101 | #!/usr/bin/env python3
import RPi.GPIO as GPIO
import time
VibratePin = 11
Gpin = 13
Rpin = 12
tmp = 0
def setup():
GPIO.setmode(GPIO.BOARD) # Numbers GPIOs by physical location
GPIO.setup(Gpin, GPIO.OUT) # Set Green Led Pin mode to output
GPIO.setup(Rpin, GPIO.OUT) # Set Red Led Pin mode to out... | gpl-2.0 | 1,834,895,438,698,754,000 | 22.934783 | 123 | 0.633061 | false | 2.718519 | false | false | false |
brigittebigi/proceed | proceed/src/wxgui/cutils/viewsutils.py | 1 | 4360 | #!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# ---------------------------------------------------------------------------
# ___ __ __ __ ___
# / | \ | \ | \ / Automatic
# \__ |__/ |__/ |___| \__ Annotation
# \ | | | | ... | gpl-3.0 | -7,760,454,296,008,524,000 | 34.638655 | 84 | 0.481422 | false | 4.01104 | false | false | false |
stormi/tsunami | src/primaires/scripting/actions/ecrire_memoire.py | 1 | 3274 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# l... | bsd-3-clause | -2,439,123,936,880,081,000 | 43.067568 | 81 | 0.707145 | false | 3.514009 | false | false | false |
PEAT-AI/Crampy | distance_analysis.py | 1 | 1722 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# distance_analysis.py
#
# Copyright 2015 linaro <linaro@raspberry>
#
# 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... | gpl-3.0 | -3,940,220,425,778,474,500 | 25.090909 | 145 | 0.706736 | false | 3.069519 | false | false | false |
MobileCloudNetworking/dssaas | dss-side-scripts/icn_repo_push.py | 1 | 2702 | #!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Mohammad Valipoor"
__copyright__ = "Copyright 2014, SoftTelecom"
import logging
import time
from subprocess import call
import os
def config_logger(log_level=logging.DEBUG):
logging.basicConfig(format='%(levelname)s %(asctime)s: %(message)s',
... | apache-2.0 | 6,706,557,584,521,625,000 | 35.527027 | 157 | 0.559585 | false | 3.545932 | false | false | false |
chirpradio/chirpradio-volunteers | site-packages/sqlalchemy/orm/attributes.py | 1 | 46309 | # attributes.py - manages object attributes
# Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import operator, weakref
from itertools import chain
import UserDic... | mit | -8,474,694,774,015,333,000 | 34.677196 | 226 | 0.612948 | false | 4.308616 | false | false | false |
oxo42/FpTest | samples/test_GPONLink_Terminate.py | 1 | 2504 | """
Test the Terminate/GPONLink Product Order
The product order takes a serial number, calls LST-ONTDETAIL to get the details of the ONT then DEL-ONT to remove it.
This test case ensures that the right commands happen in the right order
"""
import fptest
class TerminateGponLinkTest(fptest.FpTest):
def test_work... | apache-2.0 | 8,545,692,665,036,219,000 | 34.28169 | 117 | 0.522364 | false | 4.15257 | true | false | false |
nedlowe/amaas-core-sdk-python | amaascore/tools/generate_transaction.py | 1 | 6700 | from __future__ import absolute_import, division, print_function, unicode_literals
from amaasutils.random_utils import random_string
import datetime
from decimal import Decimal
import random
from amaascore.core.comment import Comment
from amaascore.core.reference import Reference
from amaascore.transactions.cash_tran... | apache-2.0 | -2,945,252,358,435,631,600 | 53.471545 | 112 | 0.667761 | false | 4.028863 | false | false | false |
AntoDev96/GuidaSky | controller/channel_controller.py | 1 | 1075 | import codecs
import json
import urllib.request
from constants import constants, command_name_list
from telepot.namedtuple import KeyboardButton, ReplyKeyboardMarkup
from model.repositories import channel_repository
from bot import bot
from decorators.command import command
@command(command_name_list["listacanali"])
d... | gpl-3.0 | 6,275,880,955,524,322,000 | 38.851852 | 91 | 0.736744 | false | 3.909091 | false | false | false |
PaddlePaddle/models | PaddleCV/3d_vision/PointRCNN/tools/kitti_eval.py | 1 | 2220 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
# 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 applic... | apache-2.0 | 1,994,207,320,236,597,000 | 30.267606 | 83 | 0.640991 | false | 3.58643 | false | false | false |
klmitch/tendril | tendril/__init__.py | 1 | 12025 | ## Copyright (C) 2012 by Kevin L. Mitchell <klmitch@mit.edu>
##
## This program is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
##
#... | gpl-3.0 | 6,401,577,186,917,081,000 | 48.485597 | 71 | 0.766486 | false | 4.216339 | false | false | false |
okolisny/integration_tests | cfme/middleware/server.py | 1 | 17554 | import re
from navmazing import NavigateToSibling, NavigateToAttribute
from selenium.common.exceptions import NoSuchElementException
from wrapanapi.hawkular import CanonicalPath
from cfme.common import Taggable, UtilizationMixin
from cfme.exceptions import MiddlewareServerNotFound, \
MiddlewareServerGroupNotFound... | gpl-2.0 | 6,179,716,487,599,874,000 | 39.540416 | 98 | 0.645779 | false | 4.032621 | true | false | false |
tynn/lunchdate.bot | setup.py | 1 | 2335 | #!/usr/bin/env python
# vim: expandtab tabstop=4 shiftwidth=4
#
# Copyright (c) 2016 Christian Schmitz <tynn.dev@gmail.com>
#
# This program 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 ve... | lgpl-3.0 | 3,637,720,484,865,586,700 | 37.278689 | 79 | 0.642398 | false | 4.025862 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/aio/operations/_routes_operations.py | 1 | 20983 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,575,352,485,687,395,300 | 48.025701 | 210 | 0.639327 | false | 4.261373 | true | false | false |
christopherpoole/CADMesh | cmake/generateSingleHeader.py | 1 | 4672 |
import os
import subprocess
from glob import glob
from pathlib import Path
def readFile(filepath):
try:
with open(filepath) as f:
lines = f.readlines()
except:
return []
return lines
def readFiles(filepaths):
names = map(lambda p: Path(p).stem, filepaths)
... | mit | -8,369,801,982,411,803,000 | 20.730233 | 106 | 0.55244 | false | 3.684543 | false | false | false |
kennethreitz/pipenv | pipenv/patched/notpip/_internal/commands/__init__.py | 1 | 4020 | """
Package containing all pip commands
"""
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import importlib
from collections import OrderedDict, namedtuple
from pipenv.patched.notpip._internal.utils.typing import MYPY... | mit | -5,509,808,581,509,438,000 | 34.263158 | 90 | 0.677114 | false | 4.114637 | false | false | false |
brian-rose/climlab | climlab/tests/test_emanuel_convection.py | 1 | 6379 | from __future__ import division
import numpy as np
import climlab
from climlab.convection import emanuel_convection
from climlab.tests.xarray_test import to_xarray
import pytest
# These test data are based on direct single-column tests of the CONVECT43c.f
# fortran source code. We are just checking to see if we get... | mit | 1,299,065,267,706,858,000 | 42.691781 | 86 | 0.614046 | false | 2.680252 | true | false | false |
antofik/Wartech | WartechLogic/map/views.py | 1 | 3743 | # coding=utf-8
from django.db import transaction
from django.http import HttpResponse
import json
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.db.models import Q
from models import *
from random import randint
from PIL import Image
def JsonResponse(request, da... | mit | 8,021,711,613,826,038,000 | 27.792308 | 139 | 0.576543 | false | 3.421389 | false | false | false |
ak-67/ZeroNet | src/Db/Db.py | 1 | 12059 | import sqlite3
import json
import time
import logging
import re
import os
import gevent
from DbCursor import DbCursor
opened_dbs = []
# Close idle databases to save some memory
def dbCleanup():
while 1:
time.sleep(60 * 5)
for db in opened_dbs[:]:
if time.time() - db.last_query_time >... | gpl-2.0 | 8,408,613,494,907,893,000 | 38.02589 | 117 | 0.509495 | false | 4.178448 | false | false | false |
OpenSourcePolicyCenter/taxdata | puf_stage1/factors_finalprep.py | 1 | 3867 | """
Transform Stage_I_factors.csv (written by the stage1.py script) and
benefit_growth_rates.csv into growfactors.csv (used by Tax-Calculator).
"""
import numpy as np
import pandas as pd
import os
# pylint: disable=invalid-name
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
first_benefit_year = 2014
inben_file... | mit | -5,736,347,475,636,523,000 | 36.543689 | 76 | 0.587794 | false | 3.230576 | false | false | false |
MatthieuDartiailh/pyvisa-sim | pyvisa-sim/parser.py | 1 | 8388 | # -*- coding: utf-8 -*-
"""
pyvisa-sim.parser
~~~~~~~~~~~~~~~~~
Parser function
:copyright: 2014 by PyVISA-sim Authors, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
import os
from io import open, StringIO
from contextlib import closing
from traceback import forma... | mit | 8,398,695,646,469,128,000 | 27.147651 | 80 | 0.580472 | false | 3.837145 | false | false | false |
npadgen/read-a-script | utils.py | 1 | 1176 | from enum import Enum
import jouvence.document
class ElementType(Enum):
ACTION = jouvence.document.TYPE_ACTION
CENTERED_ACTION = jouvence.document.TYPE_CENTEREDACTION
CHARACTER = jouvence.document.TYPE_CHARACTER
DIALOG = jouvence.document.TYPE_DIALOG
PARENTHETICAL = jouvence.document.TYPE_PARENT... | bsd-3-clause | -8,294,019,624,756,107,000 | 27 | 74 | 0.632653 | false | 3.0625 | false | false | false |
ngageoint/scale | scale/job/test/messages/test_uncancel_jobs.py | 1 | 7505 | from __future__ import unicode_literals
import datetime
import django
from django.utils.timezone import now
from django.test import TransactionTestCase
from job.messages.uncancel_jobs import UncancelJobs
from job.models import Job
from job.test import utils as job_test_utils
from recipe.test import utils as recipe_t... | apache-2.0 | -4,129,883,464,434,995,700 | 44.484848 | 118 | 0.650366 | false | 3.601248 | true | false | false |
Jchase2/py-pubsubhubbub-subscriber | fffp.py | 1 | 2310 | #!/usr/local/bin/python
# Copyright 2015 JChase II
#
# 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... | gpl-2.0 | 3,373,865,880,684,674,000 | 32.478261 | 79 | 0.724242 | false | 3.581395 | false | false | false |
patrick246/tdesktop | Telegram/SourceFiles/mtproto/generate.py | 1 | 45625 | '''
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop 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... | gpl-3.0 | -8,282,897,700,748,940,000 | 45.17915 | 232 | 0.573874 | false | 3.265927 | false | false | false |
chen0040/pyalgs | pyalgs/algorithms/graphs/directed_cycle.py | 1 | 1475 | from pyalgs.data_structures.commons.stack import Stack
from pyalgs.data_structures.graphs.graph import DirectedEdgeWeightedGraph, Digraph
class DirectedCycle(object):
marked = None
onStack = None
cycle = None
edgeTo = None
def __init__(self, G):
if isinstance(G, DirectedEdgeWeightedGraph... | bsd-3-clause | -2,261,778,148,886,728,400 | 26.314815 | 82 | 0.522712 | false | 3.861257 | false | false | false |
ppmim/AFOSN | run_patch.py | 1 | 7925 | """
DESCRIPTION
-----------
For each directory provided on the command line the
headers all of the FITS files in that directory are modified
to add information like LST, apparent object position, and more.
See the full documentation for a list of the specific keywords
that are modified.
Header patching
^^^^^^^^^^^^^^... | gpl-2.0 | -6,576,618,754,313,954,000 | 36.206573 | 80 | 0.627129 | false | 4.286101 | false | false | false |
Ripley6811/TAIMAU | src/db_tools/TM2014_tables_v3.py | 1 | 20670 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Version 3 splits Order into Order and OrderItem,
Shipment into Shipment and ShipmentItem.
Just as Invoice was split from version 1 to 2.
InvoiceItem and ShipmentItem now reference each other.
Invoice number is removed as primary key and placed with integer.
NOTE: Cla... | gpl-2.0 | -3,743,926,320,139,685,400 | 35.795009 | 181 | 0.57446 | false | 3.853996 | false | false | false |
drewkhoury/aws-daredevil | daredevil.py | 1 | 2729 | import boto3
from pprint import pprint
from datetime import datetime
import time
def make_tag_dict(ec2_object):
"""Given an tagable ec2_object, return dictionary of existing tags."""
tag_dict = {}
if ec2_object.tags is None: return tag_dict
for tag in ec2_object.tags:
tag_dict[tag['Key']] = tag... | mit | 3,425,234,492,745,836,500 | 30.744186 | 248 | 0.573104 | false | 3.61457 | false | false | false |
JPalmerio/GRB_population_code | catalogs/GBM_cat/GBM_Ep_constraint_testing.py | 1 | 1178 | import sys
import platform
if platform.system() == 'Linux':
sys.path.insert(0,'/nethome/palmerio/Dropbox/Plotting_GUI/Src')
elif platform.system() == 'Darwin':
sys.path.insert(0,'/Users/palmerio/Dropbox/Plotting_GUI/Src')
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import plotting_functions... | gpl-3.0 | 6,795,155,745,150,622,000 | 24.06383 | 85 | 0.705433 | false | 2.495763 | false | true | false |
Ken69267/gpytage | gpytage/rename.py | 1 | 4560 | #!/usr/bin/env python
#
# rename.py GPytage module
#
############################################################################
# Copyright (C) 2009-2010 by Kenneth Prugh #
# ken69267@gmail.com #
# ... | gpl-2.0 | -8,155,855,760,534,155,000 | 41.616822 | 80 | 0.573465 | false | 4.359465 | false | false | false |
kevindiltinero/seass3 | src/thefile.py | 1 | 1064 | def get_cmmds(filename):
values = []
next = []
final = []
file = open(filename, 'r')
for line in file:
values.append(line.split(' '))
for i in range(len(values)):
for j in range(4):
temporary = values[i][j]
if temporary.endswith('\n'):
nex... | bsd-2-clause | -2,216,852,053,547,423,700 | 27.783784 | 61 | 0.511278 | false | 3.377778 | false | false | false |
anna-effeindzourou/trunk | examples/anna_scripts/tilt/tilttest_box.py | 1 | 9173 | # -*- coding: utf-8
from yade import ymport,utils,pack,export,qt,bodiesHandling
import gts,os
# for plotting
from math import *
from yade import plot
############################
### DEFINING PARAMETERS ###
############################
#GEOMETRIC :dimension of the rectangular box
a=.2 # side dimension
h=.1 # h... | gpl-2.0 | 7,845,792,730,657,617,000 | 38.029787 | 198 | 0.744331 | false | 2.484963 | false | false | false |
sibskull/synaptiks | tests/kde/widgets/test_config.py | 1 | 5513 | # -*- coding: utf-8 -*-
# Copyright (c) 2011, Sebastian Wiesner <lunaryorn@googlemail.com>
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above... | bsd-2-clause | -2,184,364,509,986,881,300 | 37.552448 | 77 | 0.695629 | false | 4.201982 | true | false | false |
toirl/cointrader | cointrader/strategy.py | 1 | 2832 | #!/usr/bin/env python
import datetime
import logging
from cointrader.indicators import (
WAIT, BUY, SELL, Signal, macdh_momententum, macdh, double_cross
)
log = logging.getLogger(__name__)
class Strategy(object):
"""Docstring for Strategy. """
def __str__(self):
return "{}".format(self.__class_... | mit | 1,515,232,139,479,647,000 | 29.782609 | 75 | 0.614054 | false | 3.900826 | false | false | false |
duembeg/gsat | modules/wnd_main_config.py | 1 | 10359 | """----------------------------------------------------------------------------
wnd_main_config.py
Copyright (C) 2013-2020 Wilhelm Duembeg
This file is part of gsat. gsat is a cross-platform GCODE debug/step for
Grbl like GCODE interpreters. With features similar to software debuggers.
Features such as... | gpl-2.0 | -5,809,503,624,998,932,000 | 36.129032 | 80 | 0.643498 | false | 3.600626 | true | false | false |
ifding/ifding.github.io | stylegan2-ada/metrics/clustering.py | 1 | 4125 | # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | mit | 7,644,442,276,359,923,000 | 38.663462 | 93 | 0.618667 | false | 3.958733 | false | false | false |
boriel/zxbasic | src/symbols/number.py | 1 | 4546 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: ts=4:et:sw=4:
# ----------------------------------------------------------------------
# Copyleft (K), Jose M. Rodriguez-Rosa (a.k.a. Boriel)
#
# This program is Free Software and is released under the terms of
# the GNU General License
# ------------... | gpl-3.0 | -1,612,557,358,971,773,200 | 27.4125 | 79 | 0.558293 | false | 3.892123 | false | false | false |
ftrimble/route-grower | pyroute/lib_gpx.py | 1 | 2521 | #!/usr/bin/python
#-----------------------------------------------------------------------------
# Library for handling GPX files
#
# Usage:
#
#-----------------------------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/or m... | apache-2.0 | -9,187,451,632,071,958,000 | 29.743902 | 78 | 0.548592 | false | 3.658926 | false | false | false |
EmilStenstrom/nephele | nephele.py | 1 | 1817 | #!/usr/bin/env python -u
"""
Nephele - Finding movies to watch on the internet is easy,
finding GOOD movies to watch is hard. Let Nephele, the greek
nymph of the clouds, help you.
Usage:
nephele.py get_popular [--limit=<n>] [--filter=<spec>] [--debug]
nephele.py get_grades <directory> [--limit=<n>] [--filter... | mit | -386,543,294,171,400,450 | 36.081633 | 108 | 0.544304 | false | 3.924406 | false | false | false |
teto/libnl_old | python/netlink/route/link.py | 1 | 16902 | #
# Copyright (c) 2011 Thomas Graf <tgraf@suug.ch>
#
"""Module providing access to network links
This module provides an interface to view configured network links,
modify them and to add and delete virtual network links.
The following is a basic example:
import netlink.core as netlink
import netlink.route.l... | lgpl-2.1 | -5,284,595,556,784,319,000 | 30.184502 | 83 | 0.580464 | false | 3.325202 | false | false | false |
liutairan/eMolFrag | Old versions/eMolFrag_2016_12_21_02/eMolFrag.py | 1 | 37326 | #Process:
#1. Get a list of original sdf files
#2. Use chopRDKit02.py generates fragments and list of files with total atom number, carbon atom number, nitrogen and oxygen atom number
#3. Form lists of by atom numbers
#4. Run rmRedLinker03.py or rmRedRigid01.py on different lists generated by step 3. Remove redundancy ... | gpl-3.0 | 8,407,459,200,154,259,000 | 32.59676 | 181 | 0.550313 | false | 4.062473 | false | false | false |
getpatchwork/patchwork | patchwork/migrations/0043_merge_patch_submission.py | 1 | 11421 | from django.conf import settings
from django.db import connection, migrations, models
import django.db.models.deletion
import patchwork.fields
def migrate_data(apps, schema_editor):
if connection.vendor == 'postgresql':
schema_editor.execute(
"""
UPDATE patchwork_submission
... | gpl-2.0 | -758,566,755,988,265,600 | 34.468944 | 82 | 0.523159 | false | 4.616411 | false | false | false |
iandees/all-the-places | locations/spiders/elpolloloco.py | 1 | 2496 | import scrapy
import re
from locations.items import GeojsonPointItem
class ElPolloLocoSpider(scrapy.Spider):
name = "elpolloloco"
allowed_domains = ["www.elpolloloco.com"]
start_urls = (
'https://www.elpolloloco.com/locations/all-locations.html',
)
def parse_stores(self, response):
... | mit | -1,993,626,636,176,950,500 | 55.727273 | 165 | 0.623798 | false | 3.510549 | false | false | false |
daeilkim/refinery | refinery/refinery/data/models.py | 1 | 10950 | # models.py contains code for defining the user object and behavior which will be used throughout the site
from refinery import db, app
import datetime
from refinery.webapp.pubsub import msgServer
from collections import defaultdict
import random,os,re,codecs
from collections import defaultdict
import pickle
# Defi... | mit | -3,804,350,228,446,922,000 | 30.285714 | 127 | 0.572603 | false | 3.444479 | false | false | false |
cloudartisan/jarvis | streams.py | 1 | 3192 | #!/usr/bin/env python
import time
import StringIO
from threading import Thread
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from SocketServer import ThreadingMixIn
import cv2
import numpy
from PIL import Image
class DummyStream:
def __init__(self):
self.stopped = False
self._fr... | apache-2.0 | -5,632,914,860,883,558,000 | 27.247788 | 96 | 0.579887 | false | 4.035398 | false | false | false |
pmillerchip/firejail | contrib/fjclip.py | 1 | 1239 | #!/usr/bin/env python
import re
import sys
import subprocess
import fjdisplay
usage = """fjclip.py src dest. src or dest can be named firejails or - for stdin or stdout.
firemon --x11 to see available running x11 firejails. firejail names can be shortened
to least ambiguous. for example 'work-libreoffice' can be shor... | gpl-2.0 | 1,670,571,682,513,023,000 | 33.416667 | 91 | 0.688458 | false | 3.277778 | false | false | false |
tiggerntatie/ggame-tutorials | tutorial3.py | 1 | 1622 | """
tutorial3.py
by E. Dennison
"""
from ggame import App, RectangleAsset, ImageAsset, SoundAsset
from ggame import LineStyle, Color, Sprite, Sound
myapp = App()
# define colors and line style
green = Color(0x00ff00, 1)
black = Color(0, 1)
noline = LineStyle(0, black)
# a rectangle asset and sprite to use as backgroun... | mit | 71,991,645,884,679,840 | 25.177419 | 67 | 0.695438 | false | 2.917266 | false | false | false |
kalikaneko/bitmask-dev | src/leap/bitmask/bonafide/_srp.py | 1 | 4517 | # -*- coding: utf-8 -*-
# _srp.py
# Copyright (C) 2015 LEAP
#
# 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 p... | gpl-3.0 | -6,066,140,394,348,291,000 | 29.52027 | 71 | 0.625858 | false | 3.726898 | false | false | false |
MarkusHackspacher/unknown-horizons | horizons/ai/aiplayer/internationaltrademanager.py | 1 | 7150 | # ###################################################
# Copyright (C) 2008-2017 The Unknown Horizons Team
# team@unknown-horizons.org
# This file is part of Unknown Horizons.
#
# Unknown Horizons is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | -3,247,088,160,504,770,000 | 53.580153 | 219 | 0.744336 | false | 3.725899 | false | false | false |
fermat618/pida | tests/core/test_languages_extern.py | 1 | 4614 | import os
#from pida.core.doctype import DocType
#from pida.core.testing import test, assert_equal, assert_notequal
from pida.utils.languages import OutlineItem, ValidationError, Definition, \
Suggestion, Documentation
from pida.core.languages import (Validator, Outliner, External, JobServer,
ExternalProxy,
... | gpl-2.0 | 6,641,927,541,506,754,000 | 26.628743 | 76 | 0.58886 | false | 3.760391 | true | false | false |
dokipen/trac | trac/mimeview/patch.py | 1 | 12980 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2006 Christian Boos <cboos@neuf.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribu... | bsd-3-clause | -9,055,686,318,459,183,000 | 44.069444 | 79 | 0.4047 | false | 4.754579 | false | false | false |
pycontw/pycontw2016 | src/users/admin.py | 1 | 1812 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import gettext_lazy as _
from .models import User, CocRecord
from .forms import AdminUserChangeForm, UserCreationForm
@admin.register(User)
class UserAdmin(UserAdmin):
fieldsets = (
(
... | mit | 3,297,041,993,475,273,000 | 25.26087 | 72 | 0.46468 | false | 4.213953 | false | false | false |
DedMemez/ODS-August-2017 | safezone/GameTutorials.py | 1 | 15275 | # Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.safezone.GameTutorials
from panda3d.core import Vec4
from direct.gui.DirectGui import *
from direct.fsm import FSM
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLo... | apache-2.0 | -6,883,993,430,927,133,000 | 43.198225 | 294 | 0.594697 | false | 3.00689 | false | false | false |
a1ezzz/wasp-general | wasp_general/cli/curses_commands.py | 1 | 2162 | # -*- coding: utf-8 -*-
# wasp_general/cli/curses_commands.py
#
# Copyright (C) 2016 the wasp-general authors and contributors
# <see AUTHORS file>
#
# This file is part of wasp-general.
#
# Wasp-general is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public Licens... | lgpl-3.0 | 1,186,058,328,410,375,000 | 32.78125 | 108 | 0.740981 | false | 3.515447 | false | false | false |
srcLurker/home-assistant | tests/test_core.py | 1 | 23404 | """Test to verify that Home Assistant core works."""
# pylint: disable=protected-access
import asyncio
import unittest
from unittest.mock import patch, MagicMock
from datetime import datetime, timedelta
import pytz
import homeassistant.core as ha
from homeassistant.exceptions import InvalidEntityFormatError
from home... | mit | -2,077,596,494,842,952,200 | 30.499327 | 79 | 0.587079 | false | 3.802437 | true | false | false |
oshepherd/eforge | eforge/update/twitter/views.py | 1 | 3164 | # -*- coding: utf-8 -*-
# EForge project management system, Copyright © 2010, Element43
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWA... | isc | 3,334,641,479,672,096,000 | 35.790698 | 79 | 0.702498 | false | 4.024173 | false | false | false |
KhronosGroup/COLLADA-CTS | Core/Gui/Dialog/FBlessedViewerDialog.py | 1 | 11440 | # Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis... | mit | 8,617,399,534,047,996,000 | 43.169884 | 466 | 0.603409 | false | 4.094488 | false | false | false |
dimonaks/siman | siman/impurity.py | 1 | 35842 | from __future__ import division, unicode_literals, absolute_import
import ctypes
from tabulate import tabulate
#from ctypes import *
from ctypes import cdll
from ctypes import c_float, byref
import numpy as np
import traceback, os, sys, datetime, glob, copy
from siman import header
from siman.header import print_... | gpl-2.0 | 590,717,953,333,718,100 | 35.314083 | 252 | 0.560488 | false | 3.195044 | false | false | false |
psistrm12/rpiradio | buttonIO.py | 1 | 2334 | #!/usr/bin/env python
#
# Raspberry Pi input using buttons and rotary encoders
#
# Acknowledgement: This code is a variation oft the Rotary Switch Tutorial by Bob Rathbone.
# See http://www.bobrathbone.com/raspberrypi_rotary.htm for further information!
import RPi.GPIO as GPIO
class PushButton:
BUTTONDOWN = 1
BUT... | gpl-2.0 | -9,129,966,791,251,890,000 | 21.442308 | 100 | 0.693231 | false | 2.736225 | false | false | false |
spivachuk/sovrin-node | scripts/performance/perf_traffic.py | 1 | 9901 | """
Created on Feb 27, 2018
@author: nhan.nguyen
This module contains class "TesterSimulateTraffic" that simulates the real time
traffic.
"""
import threading
import random
import time
import utils
import os
import asyncio
import argparse
import requests_sender
import requests_builder
import perf_add_requests
from ... | apache-2.0 | 5,081,833,395,924,299,000 | 33.378472 | 79 | 0.54045 | false | 4.443896 | true | false | false |
SasView/sasmodels | sasmodels/models/fcc_paracrystal.py | 1 | 6252 | #fcc paracrystal model
#note model title and parameter table are automatically inserted
#note - calculation requires double precision
r"""
.. warning:: This model and this model description are under review following
concerns raised by SasView users. If you need to use this model,
please email... | bsd-3-clause | -7,846,327,260,319,252,000 | 37.832298 | 104 | 0.671465 | false | 3.207799 | false | false | false |
motherjones/mirrors | mirrors/tests/test_auth.py | 1 | 1445 | from django.core.urlresolvers import reverse
from rest_framework import status
from rest_framework.test import APITestCase
class ComponentAuthenticationTest(APITestCase):
fixtures = ['users.json', 'component_data.json']
def test_noauthed_rejects(self):
url = reverse('component-detail', kwargs={
... | mit | 7,669,851,948,419,885,000 | 32.604651 | 71 | 0.640138 | false | 3.695652 | true | false | false |
yasserglez/pytiger2c | packages/pytiger2c/ast/andoperatornode.py | 1 | 2345 | # -*- coding: utf-8 -*-
"""
Clase C{AndOperatorNode} del árbol de sintáxis abstracta.
"""
from pytiger2c.ast.binarylogicaloperatornode import BinaryLogicalOperatorNode
from pytiger2c.types.integertype import IntegerType
class AndOperatorNode(BinaryLogicalOperatorNode):
"""
Clase C{AndOperatorNode} del árbol... | mit | -9,185,024,468,901,850,000 | 41.181818 | 85 | 0.663362 | false | 3.531202 | false | false | false |
rubik/pyg | pyg/log.py | 1 | 8604 | import os
import sys
import logging
__all__ = ['logger']
try:
from colorama import init, Fore, Style
init(autoreset=False)
colors = {
'good' : Fore.GREEN,
'bad' : Fore.RED,
'vgood' : Fore.GREEN + Style.BRIGHT,
'vbad' : Fore.RED + Style.BRIGHT,
'std' : '... | mit | 6,918,560,899,047,315,000 | 30.866667 | 112 | 0.496165 | false | 3.979648 | false | false | false |
3DGenomes/tadbit | _pytadbit/mapping/analyze.py | 1 | 67679 | """
18 Nov 2014
"""
from warnings import warn
from collections import OrderedDict
from pysam import AlignmentFile
from scipy.stats import norm as sc_norm, skew, kurtosis
from scipy.stats import pearsonr, spearmanr, linregres... | gpl-3.0 | -8,409,796,578,718,925,000 | 39.094194 | 124 | 0.531199 | false | 3.317435 | false | false | false |
opennode/nodeconductor | waldur_core/monitoring/serializers.py | 1 | 1672 | from collections import defaultdict
from rest_framework import serializers
from .models import ResourceItem, ResourceSla
from .utils import get_period, to_list
class ResourceSlaStateTransitionSerializer(serializers.Serializer):
timestamp = serializers.IntegerField()
state = serializers.SerializerMethodField... | mit | 9,157,306,062,313,611,000 | 33.122449 | 81 | 0.641746 | false | 4.098039 | false | false | false |
Bdanilko/EdPy | src/lib/token_bits.py | 1 | 2356 | #!/usr/bin/env python2
# * **************************************************************** **
# File: token_bits.py
# Requires: Python 2.7+ (but not Python 3.0+)
# Note: For history, changes and dates for this file, consult git.
# Author: Brian Danilko, Likeable Software (brian@likeablesoftware.com)
# Copyright 2015-2... | gpl-2.0 | -8,631,692,526,637,044,000 | 30.837838 | 71 | 0.688879 | false | 2.959799 | false | false | false |
andy-sweet/fcdiff | doc/drawio.py | 1 | 1945 | #!/usr/bin/python
import os
import subprocess as sp
import shutil as sh
import argparse
parser = argparse.ArgumentParser(
description = 'Copies and converts drawio XML and PDF files from Dropbox'
)
parser.add_argument('-s', '--src_dir',
help = 'The src directory containing the drawio XML and PDF files',
d... | mit | -1,236,257,339,607,147,800 | 28.469697 | 82 | 0.60874 | false | 3.330479 | false | false | false |
sillvan/hyperspy | hyperspy/model.py | 1 | 78500 | # -*- coding: utf-8 -*-
# Copyright 2007-2011 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | gpl-3.0 | -5,660,573,258,302,874,000 | 37.328125 | 79 | 0.546257 | false | 4.614697 | false | false | false |
torresj/practica-3 | Código/tiposCafes.py | 1 | 18836 | /*
Esta archivo pertenece a la aplicación "practica 3" bajo licencia GPLv2.
Copyright (C) 2014 Jaime Torres Benavente.
Este programa es software libre. Puede redistribuirlo y/o modificarlo bajo los términos
de la Licencia Pública General de GNU según es publicada por la Free Software Foundation,
bien de l... | gpl-2.0 | -8,106,485,634,979,966,000 | 29.345161 | 155 | 0.523015 | false | 3.551151 | false | false | false |
sleepinghungry/wwif | basic_game/basic_game_engine.py | 1 | 5705 | from basic_game.descriptors import Descriptor
from basic_game.directions import directions
from basic_game.language import list_prefix, normalize_input, get_noun, prepositions
from basic_game.objects import Container
from basic_game.writer import DEBUG, ConsoleWriter
from basic_game.verbs import BaseVerb
class BasicGa... | mit | -2,709,970,980,162,616,300 | 27.242574 | 91 | 0.603856 | false | 3.706953 | false | false | false |
desihub/desitarget | py/desitarget/train/data_collection/sweep_meta.py | 1 | 2600 | #!/usr/bin/env python
import sys
import subprocess
import numpy as np
import astropy.io.fits as fits
def sweep_meta(release, outfits):
if (release == 'dr3'):
sweepdir = '/global/project/projectdirs/cosmo/data/legacysurvey/dr3/sweep/3.1'
if (release == 'dr4'):
sweepdir = '/global/p... | bsd-3-clause | -4,179,563,077,889,233,000 | 42.067797 | 105 | 0.609615 | false | 2.84153 | false | false | false |
generia/plugin.video.zdf_de_2016 | de/generia/kodi/plugin/frontend/zdf/AbstractPage.py | 1 | 3319 | from de.generia.kodi.plugin.frontend.base.Pagelet import Item
from de.generia.kodi.plugin.frontend.base.Pagelet import Action
from de.generia.kodi.plugin.frontend.base.Pagelet import Pagelet
from de.generia.kodi.plugin.frontend.zdf.Constants import Constants
class AbstractPage(Pagelet):
... | gpl-2.0 | 3,053,792,430,717,883,400 | 46.414286 | 190 | 0.597168 | false | 3.74605 | false | false | false |
jinzekid/codehub | python/test_gui/TaskManager/TaskManager.py | 1 | 2820 | # Author: Jason Lu
import _thread as thread, time
import threading
from MyWindow import Ui_MainWindow as MainWindow
from PyQt5.QtCore import QThread, pyqtSignal, QObject, QDateTime
import LYUtils as utils
# 单例模式
# 使用__new__方法
class Singleton(object):
def __new__(cls, *args, **kwargs):
if not hasattr(cls, ... | gpl-3.0 | -6,348,898,284,641,424,000 | 25.613861 | 79 | 0.519345 | false | 3.43295 | false | false | false |
judaba13/GenrePredictor | hdf5_descriptors.py | 1 | 3890 | """
This file is used to define classes that hold data for reading from the HDF5 files for MSD
This code was provided by the MSD distributors to read the data.
Thierry Bertin-Mahieux (2010) Columbia University
tb2332@columbia.edu
This code contains descriptors used to create HDF5 files
for the Million Song Database Pr... | apache-2.0 | -8,598,590,883,223,135,000 | 34.697248 | 90 | 0.717995 | false | 3.542805 | false | false | false |
tobegit3hub/cinder_docker | cinder/brick/local_dev/lvm.py | 1 | 30594 | # Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | 6,120,542,646,678,303,000 | 38.223077 | 79 | 0.532915 | false | 4.007598 | false | false | false |
halflings/receval | receval/metrics.py | 1 | 6033 | """
Metrics used to evaluate recommendations.
Shamelessly copied from bwhite's gist:
https://gist.github.com/bwhite/3726239
"""
import numpy as np
def reciprocal_rank(r):
"""Score is reciprocal of the rank of the first relevant item
First element is 'rank 1'. Relevance is binary (nonzero is relev... | apache-2.0 | 4,105,317,374,910,143,000 | 27.323944 | 80 | 0.557931 | false | 3.030136 | false | false | false |
zeroSteiner/AdvancedHTTPServer | examples/demo.py | 1 | 3045 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# demo.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions ... | bsd-3-clause | -4,253,329,966,655,596,500 | 37.544304 | 115 | 0.741544 | false | 3.686441 | false | false | false |
nickgzzjr/sublime-gulp | cross_platform_codecs.py | 1 | 1500 | import sublime
import sys
import re
class CrossPlaformCodecs():
@classmethod
def decode_line(self, line):
line = line.rstrip()
decoded_line = self.force_decode(line) if sys.version_info >= (3, 0) else line
decoded_line = re.sub(r'\033\[(\d{1,2}m|\d\w)', '', str(decoded_line))
re... | mit | -6,632,287,634,719,512,000 | 33.906977 | 103 | 0.624 | false | 3.856041 | false | false | false |
sylvan5/pygame | pyrpg/pyrpg24/pyrpg24.py | 1 | 36082 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
import codecs
import os
import random
import struct
import sys
SCR_RECT = Rect(0, 0, 640, 480)
GS = 32
DOWN,LEFT,RIGHT,UP = 0,1,2,3
STOP, MOVE = 0, 1 # 移動タイプ
PROB_MOVE = 0.005 # 移動確率
TRANS_COLOR = (190,179,145) # マップチップの透明色
sou... | mit | 6,963,601,677,123,207,000 | 36.736906 | 124 | 0.533536 | false | 2.4355 | false | false | false |
viz4biz/PyDataNYC2015 | enaml/vtk_canvas.py | 1 | 2430 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | apache-2.0 | 1,033,791,786,981,308,000 | 30.973684 | 79 | 0.6 | false | 4.727626 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.