repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
gridpp/dirac-getting-started
perform_frame_query.py
1
3626
#!/usr/bin/env python # -*- coding: utf-8 -*- """ DIRAC and GridPP: perform a query on the CERN@school frames. """ #...for the operating system stuff. import os #...for parsing the arguments. import argparse #...for the logging. import logging as lg # Import the JSON library. import json # The DIRAC import stat...
mit
-6,275,122,451,724,172,000
28.479675
97
0.565913
false
QISKit/qiskit-sdk-py
test/python/transpiler/test_consolidate_blocks.py
1
11319
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
apache-2.0
5,975,666,243,580,427,000
35.811644
94
0.553354
false
tmaciejewski/ipa
test/test_ipa_db.py
1
5075
import unittest import datetime import time import ipa_db import ipa_config class TestDb(unittest.TestCase): @classmethod def setUpClass(self): self.db = ipa_db.Db(ipa_config.db['test']) def setUp(self): self.db.remove_schema() self.db.create_schema() def test_adding_trains(s...
mit
-3,475,179,416,301,964,000
37.157895
103
0.558424
false
songsense/Pregelix_Social_Graph
preprocessing/twitter_with_tags_parser.py
1
4458
import os import sys neighborDict = {} #dictionary containing neighbors of each node weightDict = {} #dictionary containing weights of edges featureDict = {} #dictionary containing features of each node featureDictTotal = {} #dictionay containing all listed features of each node totalFeatureDict = {} #ditionary contai...
apache-2.0
521,520,475,521,803,800
37.765217
152
0.615074
false
denadai2/A-Tale-of-Cities---code
converter.py
1
4148
__author__ = 'Marco De Nadai' __license__ = "MIT" import numpy as np import pandas as pd import matplotlib.pyplot as plt import math import datetime import csv from collections import namedtuple from collections import defaultdict import fiona from shapely.geometry import shape, Polygon # Import the CDRs of MILANO d...
mit
-7,795,471,707,981,156,000
32.451613
106
0.657425
false
Edu-Glez/mesos-test
container/test_naive_bayes.py
1
1645
import pickle import pandas as pd #import numpy as np import nltk import time start_time = time.time() a=pd.read_table('tweets_pos_clean.txt') b=pd.read_table('tweets_neg_clean.txt') aux1=[] aux2=[] auxiliar1=[] auxiliar2=[] for element in a['Text']: for w in element.split(): if (w==':)' or len(w)>3): auxiliar...
mit
-3,334,451,982,492,560,400
21.847222
73
0.711246
false
ReactiveX/RxPY
examples/asyncio/toasyncgenerator.py
1
1779
import asyncio from asyncio import Future import rx from rx import operators as ops from rx.scheduler.eventloop import AsyncIOScheduler from rx.core import Observable def to_async_generator(sentinel=None): loop = asyncio.get_event_loop() future = Future() notifications = [] def _to_async_generator(s...
mit
6,042,081,814,149,646,000
22.72
81
0.587409
false
gibil5/openhealth
models/emr/test_treatment.py
1
16733
# -*- coding: utf-8 -*- """ Ex Test treatment Explore treatment Renamed - To avoid conflict with nose2. Used by: Treatment Created: 14 aug 2018 Last up: 14 apr 2021 """ from __future__ import print_function import json from . import test_funcs # ------------------------------------------------------...
agpl-3.0
4,452,663,856,938,850,000
21.460403
141
0.582621
false
tkarna/cofs
examples/channel3d/channel3d_closed.py
1
2541
""" Idealised channel flow in 3D ============================ Solves shallow water equations in closed rectangular domain with sloping bathymetry. Initially water elevation is set to a piecewise linear function with a slope in the deeper (left) end of the domain. This results in a wave that develops a shock as it rea...
mit
-5,102,377,859,405,900,000
31.576923
105
0.72924
false
BD2KGenomics/slugflow
src/toil/test/batchSystems/test_lsf_helper.py
1
4936
"""lsfHelper.py shouldn't need a batch system and so the unit tests here should aim to run on any system.""" from toil.batchSystems.lsfHelper import parse_mem_and_cmd_from_output from toil.test import ToilTest class LSFHelperTest(ToilTest): def test_parse_mem_and_cmd_from_output(self): # https://github.co...
apache-2.0
-1,546,710,280,469,730,000
65.702703
114
0.464344
false
mementum/tcmanager
src/mvcbase.py
1
5930
#!/usr/bin/env python # -*- coding: latin-1; py-indent-offset:4 -*- ################################################################################ # # Copyright (C) 2014 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
gpl-3.0
-4,661,281,447,062,204,000
31.762431
89
0.558685
false
garnaat/bchelpers
bchelpers/exception.py
1
1147
# Copyright 2014 Mitch Garnaat # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
-8,495,006,085,509,659,000
33.757576
74
0.655623
false
chrys87/orca-beep
test/keystrokes/firefox/line_nav_button_in_link_position_relative_on_focus.py
1
1860
#!/usr/bin/python from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) # Work around some new quirk in Gecko that causes this test to fail if # run via the test harness rather than manually. sequence.append(KeyComboAction("<Con...
lgpl-2.1
-3,976,546,266,804,137,500
31.421053
70
0.690476
false
jbest/digitization_tools
productivity/productivity.py
1
6643
""" Imaging productivity stats Jason Best - jbest@brit.org Generates a productivity report based on the creation timestamps of image files. Details of the imaging session are extracted from the folder name containing the images. Assumed folder name format is: YYYY-MM-DD_ImagerID_OtherInfo Usage: python productivity.p...
mit
7,707,624,852,203,826,000
32.550505
276
0.657986
false
masschallenge/django-accelerator
accelerator/migrations/0036_add_user_deferrable_modal.py
1
1688
# Generated by Django 2.2.10 on 2021-03-03 17:08 from django.conf import settings from django.db import ( migrations, models, ) import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accelerato...
mit
-8,131,171,024,774,738,000
32.098039
68
0.495853
false
aixiwang/mqtt_datajs
upload_data_test.py
1
1737
#!/usr/bin/python import sys,time try: import paho.mqtt.client as mqtt except ImportError: # This part is only required to run the example from within the examples # directory when the module itself is not installed. # # If you have the module installed, just use "import paho.mqtt.client" impor...
bsd-3-clause
8,638,943,573,339,154,000
29.473684
137
0.679908
false
scottsilverlabs/raspberrystem
rstem/projects/demos/two_buttons/button_test_aux.py
1
1652
#!/usr/bin/env python import curses, time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) def main(stdscr): # Clear screen curses.noecho() curses.cbreak() curses.curs_set(0) stdscr.addstr("Button Tester", curses....
apache-2.0
8,123,518,483,904,408,000
21.630137
129
0.673123
false
gx1997/chrome-loongson
chrome/test/pyautolib/pyauto.py
2
210748
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """PyAuto: Python Interface to Chromium's Automation Proxy. PyAuto uses swig to expose Automation Proxy interfaces to Python. For ...
bsd-3-clause
3,060,942,454,470,267,000
35.915046
80
0.635997
false
thuma/sestationinfo
stationinfo.py
1
1600
import urllib2 import json files = '''blataget-gtfs.csv blekingetrafiken-gtfs.csv dalatrafik-gtfs.csv gotlandskommun-gtfs.csv hallandstrafiken-gtfs.csv jonkopingslanstrafik-gtfs.csv kalmarlanstrafik-gtfs.csv lanstrafikenkronoberg-gtfs.csv localdata-gtfs.csv masexpressen.csv nettbuss-gtfs.csv nsb-gtfs.csv o...
gpl-2.0
7,348,605,985,020,554,000
28.109091
130
0.754375
false
JasonBristol/spor-ct
spor/research/models.py
1
1571
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from imagekit.models import ImageSpecField from imagekit.processors import ResizeToFill from django.utils.text import slugify class Project(models.Model): title = models.CharField(max_length=50) t...
mit
6,532,919,822,770,132,000
48.09375
135
0.724379
false
rboman/progs
sandbox/tkinter/playing_with_tkinter.py
1
4424
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from tkinter import * from future import standard_library standard_library.install_aliases() # nx.set("20") def sortir(): root.quit() root = Tk() root.title('Parameters') ni = IntVar() ni.set(50) nx = StringVar() nx.set("10") frame1 = Frame(root) lab1 = Labe...
apache-2.0
8,750,211,535,864,202,000
21.804124
98
0.654837
false
jittat/ku-eng-direct-admission
application/fields.py
1
1109
from django.db import models class IntegerListField(models.Field): """ IntegerListField keeps a list of int as a comma-separated string. >>> g = IntegerListField() >>> g.get_db_prep_value([1,2,-1,20,30,40,-100]) '1,2,-1,20,30,40,-100' >>> g.to_python('1,2,-10,3,4,-100,7') [1,2,-10,3,4,-10...
agpl-3.0
-7,671,050,940,817,247,000
23.644444
69
0.522092
false
p1c2u/openapi-core
tests/unit/unmarshalling/test_validate.py
1
32347
import datetime from unittest import mock import pytest from openapi_core.extensions.models.models import Model from openapi_core.spec.paths import SpecPath from openapi_core.unmarshalling.schemas.exceptions import ( FormatterNotFoundError, ) from openapi_core.unmarshalling.schemas.exceptions import InvalidSchema...
bsd-3-clause
4,296,732,595,900,197,400
25.866279
79
0.498532
false
freehackquest/backend
fhq-server/templates/tmpl_create_new_storage_update.py
1
4081
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import os import random import string updatespath = "../src/storages/updates/" fileslist = [f for f in os.listdir(updatespath) if os.path.isfile(os.path.join(updatespath, f))] pattern = r'.*StorageUpdateBase.*\(.*"([a-zA-Z0-9]*)".*,.*"([a-zA-Z0-9]*)".*,.*\).*' ...
mit
-4,647,844,123,428,140,000
30.152672
137
0.57976
false
dstroppa/openstack-smartos-nova-grizzly
nova/exception.py
1
33666
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
-3,833,240,339,379,516,400
27.267003
79
0.67335
false
jiangzhengshen/Interesting
Crawler/crawler_enhanced.py
1
10134
import argparse import hashlib import logging import os import queue import socket from urllib.parse import quote, urlsplit from urllib.request import Request, urlopen from urllib.error import URLError from pyquery import PyQuery ''' 根据输入的网址和深度爬网页 需要对php网页取得真实的网站地址 next: 并行化 断点续抓 URLCr...
mit
-901,503,238,482,499,200
36.588462
120
0.527883
false
jacobwindsor/pubchem-ranker
CompoundRanker/DataManipulators/CIDGatherer.py
1
2702
import sys from CompoundRanker.database import get_db,query_db from CompoundRanker import app from requests import exceptions, get class CIDGatherer(object): def harvest(self, dataset_id): """ Harvest all of the CIDs from PubChem :return: List of tuples [(cid, metab_id),] """ ...
mit
3,315,396,116,340,576,000
31.95122
85
0.53738
false
FescueFungiShare/hydroshare
hs_core/tests/api/native/test_publish_resource.py
1
2487
import unittest from django.contrib.auth.models import Group from django.test import TestCase from hs_core import hydroshare from hs_core.testing import MockIRODSTestCaseMixin class TestPublishResource(MockIRODSTestCaseMixin, TestCase): def setUp(self): super(TestPublishResource, self).setUp() ...
bsd-3-clause
1,755,957,264,904,521,700
30.884615
114
0.617209
false
derekmd/opentag-presenter
tags/DefaultDocument.py
1
4289
from PresentationObject import PresentationObject class DefaultDocument( PresentationObject ): """ Contains the hard-coded defaults for properties in a presentation. This internal tag shouldn't be used in a presentation. """ def __init__( self ): """ Set the properties dictionary of the default settings for ...
bsd-2-clause
1,632,470,191,671,452,200
36.622807
67
0.569363
false
sertansenturk/symbtrdataextractor
symbtrdataextractor/unittests/extractor_tests.py
1
3913
import json import os from symbtrdataextractor.dataextractor import DataExtractor from symbtrdataextractor.reader.mu2 import Mu2Reader _curr_folder = os.path.dirname(os.path.abspath(__file__)) def _basic_txt_extractor(score_name, use_name=True): txt_filename = os.path.join(_curr_folder, 'data', score_name + '.t...
agpl-3.0
6,322,922,692,640,797,000
31.882353
79
0.675185
false
takeshixx/deen
deen/plugins/codecs/plugin_url.py
1
1130
try: # Python 3 import urllib.parse as urllibparse except ImportError: # Python 2 import urllib as urllibparse from .. import DeenPlugin class DeenPluginUrl(DeenPlugin): name = 'url' display_name = 'URL' cmd_name = 'url' cmd_help='URL encode/decode data' def __init__(self): ...
apache-2.0
-2,507,691,634,774,062,600
26.560976
58
0.582301
false
darknight-007/Firmware
testScripts/testOffboardPositionControlWithGainAndIntertialParamChange.py
1
5733
""" testing offboard positon control with a simple takeoff script """ import rospy from mavros_msgs.msg import State from geometry_msgs.msg import PoseStamped, Point, Quaternion import math import numpy from gazebo_msgs.srv import SetLinkProperties from gazebo_msgs.srv import SetLinkPropertiesRequest from gazebo_msg...
mit
-5,823,130,695,435,417,000
35.987097
139
0.618524
false
ytsarev/rally
rally/openstack/common/config/generator.py
1
10531
# Copyright 2012 SINA Corporation # Copyright 2014 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/licens...
apache-2.0
3,891,286,383,344,923,600
33.302932
79
0.578103
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/resource.py
1
1819
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Resource) on 2019-05-07. # 2019, SMART Health IT. from . import fhirabstractresource class Resource(fhirabstractresource.FHIRAbstractResource): """ Base Resource. This is the...
bsd-3-clause
-6,473,601,764,319,109,000
29.830508
105
0.586586
false
gouthambs/qtk-python
qtk/creators/indexes.py
1
3937
import QuantLib as ql from .common import CreatorBase from qtk.templates import Template as T from qtk.fields import Field as F class USDLiborCreator(CreatorBase): _templates = [T.INDEX_IBOR_USDLIBOR] _req_fields = [F.YIELD_CURVE, F.TENOR] _opt_fields = [] def _create(self, asof_date): yield_...
mit
3,303,185,191,772,193,300
29.292308
63
0.637795
false
veltzer/demos-python
src/examples/short/object_oriented/construction/return_weird_things.py
1
1225
#!/usr/bin/env python """ Trying to return weird things from the constructor Conclusions: - you can only return None or nothing (which is None) from a import constructor. - this helps you to get out early if you don't want to execute the rest of the constructor code. - you cannot return 'self' since the __init__ meth...
gpl-3.0
7,359,768,143,197,327,000
21.685185
60
0.682449
false
felixboes/hosd
experimental/compute_morse.py
1
3618
#!/usr/bin/env python # The software pyradbar is a bunch of programs to compute the homology of # Sullivan diagrams. # Copyright (C) 2015 - 2017 Felix Boes # # This file is part of pyradbar. # # pyradbar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
gpl-3.0
4,686,020,170,505,466,000
43.121951
200
0.651741
false
mariocesar/pengbot
src/pengbot/adapters/base.py
1
2798
import asyncio from collections import defaultdict from functools import wraps from pengbot import logger from pengbot.context import Context from pengbot.utils import isbound class UnknownCommand(Exception): pass class BaseAdapter: handlers = [] signals = {} running = False name = None loo...
mit
7,566,608,231,802,680,000
23.330435
75
0.546104
false
kittiu/sale-workflow
sale_automatic_workflow_payment_mode/models/automatic_workflow_job.py
1
2353
# -*- coding: utf-8 -*- # © 2016 Camptocamp SA, Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) import logging from odoo import models, api, fields from odoo.tools.safe_eval import safe_eval from odoo.addons.sale_automatic_workflow.models.automatic_workflow_job \ import savepoint _logg...
agpl-3.0
-7,847,073,784,139,087,000
40.263158
78
0.576105
false
warrenspe/NanoDB
NanoQueries/Alter.py
1
1805
# Standard imports import os # Project imports from _BaseQuery import BaseQuery import NanoIO.Table import NanoIO.File class Alter(BaseQuery): name = None addColumns = None removeColumns = None modifyColumns = None addIndex = None removeIndex = None grammar = """ "table"...
gpl-3.0
-183,135,863,889,413,900
26.348485
89
0.580609
false
amenonsen/ansible
lib/ansible/modules/storage/netapp/na_ontap_fcp.py
2
7005
#!/usr/bin/python # (c) 2018-2019, NetApp, Inc # 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.1', 'status': ['preview'], ...
gpl-3.0
-6,642,160,182,949,105,000
32.357143
114
0.561599
false
mgeorgehansen/FIFE_Technomage
engine/python/fife/extensions/pychan/widgets/basictextwidget.py
1
2140
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General P...
lgpl-2.1
-1,168,638,644,344,881,700
32.516129
91
0.648598
false
HMRecord/website
python/admin.py
1
2656
from functools import wraps from flask import Blueprint, jsonify, request, abort, request, Response, make_response from flask.ext.httpauth import HTTPBasicAuth from bson.json_util import loads, dumps import database as db import configparser adminAPI = Blueprint('adminAPI', __name__) auth = HTTPBasicAuth() config = ...
gpl-3.0
1,334,948,711,134,836,700
24.538462
101
0.698419
false
ingadhoc/account-payment
account_check/models/account_chart_template.py
1
3098
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import models, fields import logging _logger = logging.getLogge...
agpl-3.0
7,020,589,236,783,189,000
39.763158
91
0.573273
false
deepmind/reverb
reverb/trajectory_writer.py
1
27672
# Copyright 2019 DeepMind Technologies Limited. # # 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 agr...
apache-2.0
-4,714,772,191,559,620,000
39.279476
81
0.664751
false
euronmetaliaj/MarketAnalyzer
core/social/Objects/rake.py
1
6665
# Implementation of RAKE - Rapid Automtic Keyword Exraction algorithm # as described in: # Rose, S., D. Engel, N. Cramer, and W. Cowley (2010). # Automatic keyword extraction from indi-vidual documents. # In M. W. Berry and J. Kogan (Eds.), Text Mining: Applications and Theory.unknown: John Wiley and Sons, Ltd. import...
mit
-2,379,889,619,676,009,000
38.678571
580
0.674269
false
dsapandora/die_hard
backup.py
1
4670
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib2 import urllib import requests import math from flask import Flask, request app = Flask(__name__) API_KEY = 'ebc2ccbd44d15f282010c6f3514c5c02' API_URL = 'http://api.openweathermap.org/data/2.5/weather?' API_QUERY = 'lat={lat}&lon={lon}&appid={api}' # SAMPLE R...
gpl-3.0
4,456,546,718,283,175,000
30.993151
138
0.679872
false
ayberkt/2048
game.py
1
3825
from random import randint from view import GridView class Grid(object): def __init__(self): self.matrix = [ [2, 0, 2, 0], [0, 0, 0, 8], [0, 2, 0, 0], [0, 0, 2, 4]] self.score = 0 print "Play with WASD!" def be...
mit
2,469,207,557,474,849,300
29.6
75
0.491242
false
zimonkaizoku/GMTcsh2dos
GMTcsh2dos.py
1
3970
#!/usr/bin/env python ################################################################################ # GMTcsh2dos.py # ------------------------------------------------- # Version: 0.1 # Author: Simon Dreutter # License: GNU Generic Public License v3.0 / 2015 # ------------------------------------------------- ##...
gpl-3.0
-2,424,475,750,428,373,000
29.775194
121
0.455416
false
Yelp/kafka-utils
kafka_utils/kafka_consumer_manager/commands/list_topics.py
1
2354
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
1,139,298,315,094,970,400
33.115942
79
0.639337
false
Intel-Corporation/tensorflow
tensorflow/python/eager/def_function_test.py
1
17245
# 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
-179,380,147,259,264,420
29.905018
80
0.662221
false
sveetch/djangocodemirror
tests/001_manifest/test_004_config.py
1
3056
""" Tests against manifest for CodeMirror configurations """ import pytest from djangocodemirror.exceptions import NotRegisteredError def test_raw_config_empty(manifesto): """Empty config""" manifesto.autoregister() config = manifesto.get_codemirror_parameters('empty') assert config == {} def tes...
mit
3,459,122,332,573,493,000
22.507692
59
0.531414
false
Ogreman/django-termsearch
docs/conf.py
1
8138
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
bsd-3-clause
2,248,664,516,863,073,500
31.043307
80
0.706439
false
jlmadurga/django-telegram-bot
telegrambot/bot_views/generic/responses.py
1
1680
from django.template import RequestContext, TemplateDoesNotExist from django.template.loader import get_template from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove import ast import logging from django.http.request import HttpRequest logger = logging.getLogger(__name__) class TemplateResponse(object): ...
bsd-3-clause
-3,643,803,183,915,614,000
33.306122
74
0.641667
false
ntt-sic/heat
heat/tests/test_sqlalchemy_api.py
1
59442
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-8,190,972,192,729,894,000
38.183916
79
0.592628
false
tangentlabs/django-oscar-fancypages
oscar_sandbox/sandbox/settings.py
1
6442
# Django settings for sandbox project. import os import oscar_fancypages.utils as ofp PROJECT_DIR = os.path.dirname(__file__) location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), "../%s" % x) DEBUG = True TEMPLATE_DEBUG = DEBUG USE_LESS = True ADMINS = ( # ('Your Name', 'your_email@ex...
bsd-3-clause
-5,179,257,276,437,302,000
28.550459
91
0.705061
false
CZ-NIC/foris
foris/config_handlers/wan.py
1
17358
# Foris - web administration interface for OpenWrt based on NETCONF # Copyright (C) 2017, 2020 CZ.NIC, z.s.p.o. <http://www.nic.cz> # # 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 versi...
gpl-3.0
-9,020,859,925,960,720,000
39.842353
100
0.532204
false
BorgERP/borg-erp-6of3
verticals/garage61/acy_vat_number_truncate/partner.py
1
1631
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,920,011,529,964,214,000
36.953488
128
0.600858
false
feend78/evennia
evennia/commands/cmdset.py
1
23699
""" A Command Set (CmdSet) holds a set of commands. The Cmdsets can be merged and combined to create new sets of commands in a non-destructive way. This makes them very powerful for implementing custom game states where different commands (or different variations of commands) are available to the accounts depending on...
bsd-3-clause
-331,896,046,485,190,660
37.347896
130
0.581417
false
endee1/gtv
script.gtvtvguide/ResetDatabase.py
1
2238
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Sean Poyser and Richard Dean (write2dixie@gmail.com) # # Modified for FTV Guide (09/2014 onwards) # by Thomas Geppert [bluezed] - bluezed.apps@gmail.com # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU Gener...
gpl-3.0
-9,127,050,276,214,440,000
32.909091
129
0.668007
false
klamparski/Mrf.NodeTypesBuilder
Documentation/conf.py
1
10297
# -*- coding: utf-8 -*- # # Flow Framework documentation build configuration file, created by # sphinx-quickstart on Mon Jun 08 11:09:23 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
mit
-2,739,290,844,536,983,600
31.897764
98
0.71312
false
pombredanne/invenio
modules/webjournal/lib/webjournal_washer.py
1
4833
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio 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 ve...
gpl-2.0
580,070,241,764,031,600
34.8
81
0.634802
false
lsaffre/lino
lino/utils/cycler.py
1
1933
# -*- coding: UTF-8 -*- # Copyright 2013-2014 by Rumma & Ko Ltd. # License: BSD, see LICENSE for more details. """ Turns a list of items into an endless loop. Useful when generating demo fixtures. >>> from lino.utils import Cycler >>> def myfunc(): ... yield "a" ... yield "b" ... yield "c" >>> c = Cycler...
bsd-2-clause
4,371,008,635,208,604,000
21.476744
76
0.54837
false
sbremer/hybrid_rs
hybrid_model/models/sigmoid_item_asymfactoring.py
1
3419
import numpy as np from keras.layers import Embedding, Input, Flatten, Dense from keras.layers.merge import Concatenate, Dot, Add from keras.models import Model from keras.regularizers import l2 from util.layers_custom import BiasLayer from hybrid_model.models.abstract import AbstractModelCF, bias_init class Sigmoid...
apache-2.0
-9,212,830,444,832,515,000
37.41573
111
0.61246
false
kyle8998/Practice-Coding-Questions
leetcode/23-Hard-Merge-K-Sorted-Lists/answer.py
1
2603
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None #------------------------------------------------------------------------------- ...
unlicense
-1,056,980,143,340,566,400
33.25
99
0.384172
false
google/pinject
tests/object_graph_test.py
1
31697
"""Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in ...
apache-2.0
-2,696,896,613,695,787,500
42.539835
89
0.599741
false
fkie-cad/FACT_core
src/plugins/analysis/qemu_exec/routes/routes.py
1
3219
import os from contextlib import suppress from flask import render_template_string from flask_restx import Resource, Namespace from helperFunctions.database import ConnectTo from helperFunctions.fileSystem import get_src_dir from storage.db_interface_frontend import FrontEndDbInterface from web_interface.components.c...
gpl-3.0
604,691,004,250,413,800
37.783133
136
0.679714
false
ericwhyne/datapop
datapop-publish.py
1
1446
#!/usr/bin/python import sqlite3 import datapop import sys import codecs import re import time current_milli_time = lambda: int(round(time.time() * 1000)) outfilename = 'index.html' interval = 3 * 60 * 60 * 1000 start_time = current_milli_time() - interval sys.stdout = codecs.getwriter('utf8')(sys.stdout) databasef...
apache-2.0
6,614,672,527,995,097,000
35.15
188
0.644537
false
sbobovyc/GameTools
TSW/src/idx.py
1
6707
""" Copyright (C) 2013 Stanislav Bobovych This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the h...
gpl-3.0
6,742,526,433,551,087,000
36.892655
119
0.591472
false
Lysxia/dissemin
papers/utils.py
1
16403
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # 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 Free Software Foundation; either version 2 # of th...
agpl-3.0
3,605,507,531,110,764,000
29.530726
101
0.604636
false
jeremiahyan/odoo
addons/payment_payulatam/tests/test_payulatam.py
1
6895
# Part of Odoo. See LICENSE file for full copyright and licensing details. from freezegun import freeze_time from odoo.exceptions import ValidationError from odoo.fields import Command from odoo.tests import tagged from odoo.tools import mute_logger from .common import PayULatamCommon from ..controllers.main import ...
gpl-3.0
-6,300,182,012,533,313,000
46.226027
159
0.634808
false
marcodebe/dicomecg_convert
setup.py
1
1141
#!/usr/bin/env python import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open("VERSION", "r") as fh: version = fh.read().strip('\n') setuptools.setup( name='dicom-ecg-plot', version=version, description='Plot Dicom ECG Waveforms', long_des...
mit
-8,328,571,697,448,325,000
29.026316
71
0.546012
false
Rhoana/membrane_cnn
assess_thresh_smooth.py
1
2798
import mahotas import scipy.ndimage import scipy.misc import numpy as np import gzip import cPickle import glob import os import h5py #param_path = 'D:/dev/Rhoana/membrane_cnn/results/good3/' param_path = 'D:/dev/Rhoana/membrane_cnn/results/stumpin/' param_files = glob.glob(param_path + "*.h5") target_boundaries = ma...
bsd-3-clause
1,006,724,249,235,405,300
31.534884
100
0.632595
false
teknolab/django.org.tr
apps/events/migrations/0001_initial.py
1
5772
# 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): # Adding model 'Event' db.create_table('events_event', ( ('id', self.gf('django.db.models.fiel...
bsd-3-clause
-6,493,933,952,741,872,000
65.344828
182
0.560464
false
Epoptes/epoptes
epoptes/ui/common.py
1
1684
# This file is part of Epoptes, http://epoptes.org # Copyright 2018 the Epoptes team, see AUTHORS. # SPDX-License-Identifier: GPL-3.0-or-later """ Define required gi package versions in a common place, and install gettext. Rationale: gi requires something like: import gi gi.require_version('Gtk', '3.0') fr...
gpl-3.0
-5,073,299,151,335,349,000
30.773585
75
0.712589
false
mago1chi/cTPR
calc_raw_lda_result.py
1
7204
import psycopg2 import os, sys TOPIC_NUM_LIST = [30, 100, 200, 500] if len(sys.argv) is 1: print("トピック数を入力") exit() topic_num = int(sys.argv[1]) if not topic_num in TOPIC_NUM_LIST: print("入力可能なトピック数は ", end="") for each in TOPIC_NUM_LIST: print("{0} ".format(each), end="") print("です.") exit() ...
gpl-2.0
9,060,584,416,003,994,000
28.017094
140
0.644772
false
mfherbst/spack
lib/spack/llnl/util/filesystem.py
1
37492
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
536,191,456,906,617,700
29.985124
79
0.591219
false
matejcik/weblate
weblate/trans/mixins.py
1
5486
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eith...
gpl-3.0
-2,377,593,369,573,738,500
24.621495
73
0.572132
false
Yelp/paasta
paasta_tools/cassandracluster_tools.py
1
7272
# Copyright 2015-2019 Yelp Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
-2,582,898,150,545,894,000
33.628571
104
0.662404
false
bsipocz/astropy
astropy/_erfa/erfa_generator.py
1
27369
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module's main purpose is to act as a script to create new versions of ufunc.c when ERFA is updated (or this generator is enhanced). `Jinja2 <http://jinja.pocoo.org/>`_ must be installed for this module/script to function. Note that this does *no...
bsd-3-clause
-3,515,980,912,529,225,000
36.135685
136
0.517995
false
ufukdogan92/is-teklif-sistemi
teklif/models.py
1
1928
from django.db import models from ilan.models import Ilan from kullanici.models import IsArayan from register.models import Register class Teklif(models.Model): ilan = models.ForeignKey(Ilan,blank=True,null=True,related_name="odeme_ilanı") teklif_veren = models.OneToOneField(IsArayan,related_name="is_arayan") ...
gpl-3.0
-4,214,891,582,358,801,000
36.627451
116
0.678832
false
kg-bot/SupyBot
plugins/Misc1/__init__.py
1
2791
### # Copyright (c) 2014, KG-Bot # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condition...
gpl-3.0
5,609,393,713,654,504,000
38.449275
79
0.741311
false
cnheitman/barf-project
tests/core/smt/test_smtfunction.py
1
3060
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 copyright notice, this # list of condit...
bsd-2-clause
-6,082,208,564,606,116,000
33.382022
80
0.662418
false
jeremiah-c-leary/vhdl-style-guide
vsg/tests/case/test_rule_003.py
1
1130
import os import unittest from vsg.rules import case from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_003_test_input.vhd')) lExpected = [] lExpected.append('') utils.read_file(os.path.join(sTestDir, 'ru...
gpl-3.0
-605,416,265,127,274,600
24.111111
106
0.673451
false
TakeshiTseng/SDN-Work
mininet/bgp-3as/as.py
1
2401
#!/usr/bin/env python from mininet.net import Mininet from mininet.cli import CLI from mininet.log import setLogLevel ''' h1 -- r1 -- r2 -- r3 -- h3 | h2 h1 - r1 : 10.0.1.0/24 h2 - r2 : 10.0.2.0/24 h3 - r3 : 10.0.3.0/24 r1 - r2 : 192.168.1.0/24 r2 - r3 : 192.168.2.0/24 ''' if '__main__' == __...
mit
-5,056,204,420,631,575,000
30.592105
119
0.598917
false
jrydberg/guild
guild/actor.py
1
26454
# Copyright (c) 2012 Johan Rydberg # Copyright (c) 2009 Donovan Preston # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use...
mit
2,611,560,143,730,872,300
30.605735
78
0.592878
false
timothyjamesbecker/FusorSV
fusorsv/mantel_test.py
1
7498
# MantelTest v1.2.10 # http://jwcarr.github.io/MantelTest/ # # Copyright (c) 2014-2016 Jon W. Carr # Licensed under the terms of the MIT License import numpy as np from itertools import permutations from scipy import spatial, stats def test(X, Y, perms=10000, method='pearson', tail='two-tail'): """ Takes two dist...
gpl-3.0
-2,579,909,192,261,438,000
40.661111
122
0.70112
false
SKIRT/PTS
magic/dist_ellipse.py
1
2347
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** # ...
agpl-3.0
-1,271,247,990,375,277,300
34.545455
100
0.511083
false
Xeralux/tensorflow
tensorflow/python/data/ops/iterator_ops.py
1
22481
# Copyright 2017 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
-7,858,735,161,948,046,000
39.001779
111
0.6711
false
theresaswayne/imagej-plugins
Demos and Tests/misc scripts/Crop_Confocal_Series_corrected.py
1
1332
# @OpService ops # @Dataset data # @UIService ui # @OUTPUT ImgPlus c0 # @OUTPUT ImgPlus z12 # @OUTPUT ImgPlus c0z12 # @OUTPUT ImgPlus roiC0z12 # to run this tutorial run 'file->Open Samples->Confocal Series' and make sure that # confocal-series.tif is the active image from net.imglib2.util import Intervals from net.i...
gpl-3.0
-3,989,707,301,982,040,000
32.3
95
0.731231
false
severin-lemaignan/dialogs
src/dialogs/verbalization/verbalization_test.py
1
179763
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created by Chouayakh Mahdi 08/07/2010 The package contains functions to perform test It is more used for the subject Functions: unit_tests : to perform unit tests """ import unittest import logging logger = logging.getLogger("dialogs") from dialogs.dialog_core ...
bsd-3-clause
-5,733,380,990,628,415,000
62.141201
161
0.281649
false
ryanpdwyer/sigutils
sigutils/fdls.py
1
1223
""" Frequency Domain Least Squares ============================== This algorithm tries to approximate an analytic transfer function :math:`H(s)`. See digital signal processing book. - Pick an analytic transfer function H(s) - Select the numerator order N and denominator order D - Define M separate input u_m coside se...
mit
7,364,699,537,436,800,000
24.5
79
0.621423
false
redhat-openstack/glance
glance/tests/unit/v2/test_registry_client.py
1
24550
# Copyright 2013 Red Hat, 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...
apache-2.0
5,718,802,242,312,375,000
37.479624
79
0.565743
false
APTE/APTE
bench/data.py
1
21149
#!/usr/bin/python # -*- coding: iso-8859-1 -*- DICO = { 'ref' : { "name" : "Apte without POR (reference version)", "call" : "apte", "branch" : "", "benchs": { "TEST": { "new" : False, "file": "TEST.txt", "res" : True, ...
gpl-3.0
-2,781,676,103,520,612,000
28.171034
120
0.458509
false
Freso/listenbrainz-server
listenbrainz/labs_api/labs/api/recording_from_recording_mbid.py
1
5867
import psycopg2 import psycopg2.extras from flask import current_app from datasethoster import Query psycopg2.extras.register_uuid() class RecordingFromRecordingMBIDQuery(Query): ''' Look up a musicbrainz data for a list of recordings, based on MBID. ''' def names(self): return ("recordi...
gpl-2.0
760,555,066,453,154,600
43.112782
125
0.46736
false
hydroshare/hydroshare
docs/conf.py
1
4971
# -*- coding: utf-8 -*- # # HydroShare documentation build configuration file, created by # sphinx-quickstart on Tue Apr 25 11:27:53 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
bsd-3-clause
-3,372,806,723,805,227,000
29.875776
79
0.678334
false
MAECProject/maec-to-stix
docs/conf.py
1
8864
# -*- coding: utf-8 -*- # # stix-ramrod documentation build configuration file, created by # sphinx-quickstart on Tue Sep 30 14:08:10 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
bsd-3-clause
1,624,199,354,319,191,800
30.43617
80
0.706115
false
VHAINNOVATIONS/GE-Pressure-Ulcer
python_gui_decision_support_webportal/python/experiment_dialog.py
1
9688
import add_modify_dialog import util import olv_dialog_controller import wx from ObjectListView import ObjectListView, Filter from experiment import Experiment from experiment_olv import OlvExperiment, OlvExperimentCols from experiment_controller import ExperimentController from add_modify_experiment_dialog import AddM...
apache-2.0
-8,946,937,582,413,827,000
42.25
122
0.569055
false
nitmir/django-cas-server
docs/conf.py
1
10835
# -*- coding: utf-8 -*- # # django-cas-server documentation build configuration file, created by # sphinx-quickstart on Tue Jul 5 12:11:50 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated f...
gpl-3.0
3,197,410,253,486,718,000
28.363144
98
0.693032
false
sagarjauhari/BCIpy
eegml.py
1
10074
# /usr/bin/env python # Copyright 2013, 2014 Justis Grant Peters and Sagar Jauhari # This file is part of BCIpy. # # BCIpy 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
8,123,222,228,558,660,000
32.247525
87
0.562835
false