text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# This script calculates how many error reports are in each subdirectory # and how many error reports are in total. # Edit in_dir and out_file parameters as you need. import os in_dir = "D:/Projects/CrashRpt/valid_reports" out_file = "stats.txt" f = open(out_file, "w") def get_txt_file_count(dirname): count = 0...
BeamNG/crashrpt
processing/scripts/basic_stats.py
Python
bsd-3-clause
1,335
0.020225
#!/usr/bin/env python2 # References: # https://fedoraproject.org/wiki/Koji/ServerHowTo # https://github.com/sbadakhc/kojak/blob/master/scripts/install/install import util.cfg as cfg import util.pkg as pkg import util.cred as cred from util.log import log # # Setup # log.info("General update") pkg.clean() pkg.update...
ASzc/nagoya
cfg/koji-builder/setup.py
Python
lgpl-3.0
1,421
0.000704
from .simple import SIMPLE_ADJACENCIES from .combo import ComboAdjacency, LearnedComboAdjacency def construct_adjacency(matrix, **kwargs): if isinstance(matrix, (list,)): if kwargs.get('learned_tradeoff', False): return LearnedComboAdjacency(adj_list=matrix, **kwargs) return ComboAdjace...
isaachenrion/jets
src/architectures/nmp/adjacency/__init__.py
Python
bsd-3-clause
399
0.002506
# 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 ...
AutorestCI/azure-sdk-for-python
azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/name_availability.py
Python
mit
1,227
0
# Name: Examples for using conditioning number finders for curves and surfaces # Description: Contains some examples with descriptions of how to use the functions # Created: 2016-08-18 # Author: Janis Lazovskis # Navigate to the conditioning directory # Run Python 2 # Example (curve) execfile('curves.py') x = variety...
jlazovskis/conditioning
examples/examples-curves-surfaces.py
Python
gpl-3.0
1,355
0.04428
# Copyright 2015 ETH Zurich # # 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, sof...
FR4NK-W/osourced-scion
python/test/lib/path_store_test.py
Python
apache-2.0
22,153
0.000135
# -*- coding: utf-8 -*- MDL_BYTE = 1 MDL_UNSIGNED_BYTE = 2 MDL_SHORT = 3 MDL_UNSIGNED_SHORT = 4 MDL_HALF = 5 MDL_INT = 6 MDL_UNSIGNED_INT = 7 MDL_FLOAT = 8 MDL_DOUBLE = 9 MDL_FILE = 1 MDL_NODE = 2 MDL_MESH = 3 MDL_BONE = 4 MDL_VERTEXARRAY = 5 MDL_INDICEARRAY = 6 MDL_PROPERTIES = 7 MDL_ANIMATIONKEYS = 8 MDL_AABB = 9 M...
alrusdi/leadwerks-blender-exporter
io_scene_leadwerks/leadwerks/constants.py
Python
gpl-3.0
700
0.001429
import sys, os class FastaTarget: def __init__(self): self.tid = '' self.len = '' self.offset = -1 self.blen = -1 self.llen = -1 class FastaIndex: def __init__(self, fname=''): self.f = open(fname, 'r') self.ft = {} for line in self.f.readlines(...
genome/dindel-tgi
python/utils/Fasta.py
Python
gpl-3.0
2,034
0.013766
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility...
stifoon/navitia
source/sindri/sindri/saver/edsaver.py
Python
agpl-3.0
4,169
0.000481
# 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 ...
ksh/gpirecertification
tools/etl/remote_edited.py
Python
apache-2.0
6,082
0.002466
from __future__ import print_function from lector import * from lpSolv import * import sys import math def generarRestriccionesTipo(matriz, tipo): numeroRestricciones = (n* (n-1)) / 2 if tipo == 0 or tipo == 1: for j in range(0, n): restriccionCanecaI = [] for k in range(0, i * ...
carlochess/proyectoComplejidad
Organizar/segundaParte.py
Python
apache-2.0
4,712
0.004244
# coding: utf-8 import os from UserDict import DictMixin from fnmatch import fnmatch from datetime import datetime from datetime import date import pytz from pyramid.threadlocal import get_current_registry from pyramid.traversal import resource_path from sqlalchemy import Boolean from sqlalchemy import Column from sq...
toway/towaymeetups
mba/resources.py
Python
gpl-3.0
34,486
0.008427
from pyrates.utility import grid_search_annarchy, plot_timeseries from ANNarchy import Projection, Population, TimedArray, setup, Network, Monitor, Uniform, Normal, \ EIF_cond_exp_isfa_ista from pyrates.utility import pyrates_from_annarchy import matplotlib.pyplot as plt import numpy as np # parameters ###########...
Richert/BrainNetworks
CMC/config/AdEx_net.py
Python
apache-2.0
2,934
0.008521
#python3 ''' ''' import sys while 1: try: h1,m1,s1,h2,m2,s2=map(int,input().split()) except EOFError: break '''<- this is /* in c/c++ m1=input() s1=input() h2=input() m2=input() s2=input() ''' s1=s2+60-s1 s2=s1%60 s1=s1/60 m1=m2+60-1-m1+s1 m2=m1%60 m1=m1/60 h2=h2-h1-1+m1 #pr...
candywater/ProCon
aoj/volumn5/0532/0532aoj.py
Python
mit
390
0.097436
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_vizier_service_suggest_trials_sync.py
Python
apache-2.0
1,664
0.001803
from django.shortcuts import render, render_to_response, RequestContext from .forms import SignUpForm # Create your views here. def home(request): form = SignUpForm(request.POST or None) if form.is_valid(): save_it = form.save(commit=False) save_it.save() return render_to_response...
sonnykr/blog
SignUps/views.py
Python
apache-2.0
389
0.010283
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-12 08:41 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('cases',...
ad-m/foundation-manager
foundation/cases/migrations/0002_auto_20160512_1041.py
Python
bsd-3-clause
888
0.002252
#coding:utf8 """Tests the HeaderEval Plugin""" from __future__ import absolute_import import datetime import unittest import tests.util # Load plugin and report matched RULES and SCORE PRE_CONFIG = """ loadplugin Mail::SpamAssassin::Plugin::HeaderEval report _SCORE_ report _TESTS_ """ class TestFunctionalCheckForF...
SpamExperts/SpamPAD
tests/functional/test_plugins/test_header_eval.py
Python
gpl-2.0
87,077
0.002516
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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/...
anandology/pyjamas
library/gwt/ui/VerticalPanel.py
Python
apache-2.0
1,733
0.001731
# Copyright 2008-2009 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import os import re import sys import gtk from...
jbaayen/reinteract
lib/reinteract/base_notebook_window.py
Python
bsd-2-clause
10,711
0.00112
""" OpenSfM related utils """ import os, shutil, sys, json, argparse import yaml from opendm import io from opendm import log from opendm import system from opendm import context from opendm import camera from opendm.utils import get_depthmap_resolution from opendm.photo import find_largest_photo_dim from opensfm.larg...
OpenDroneMap/OpenDroneMap
opendm/osfm.py
Python
gpl-3.0
22,421
0.004906
from __future__ import division # ----------------------------------------------------------------------------- # Copyright (c) 2014--, The American Gut Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # --------...
biocore/american-gut-web
amgut/lib/data_access/ag_data_access.py
Python
bsd-3-clause
57,541
0
#!/usr/bin/python # # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "Li...
denis-vilyuzhanin/selenium-fastview
py/selenium/webdriver/firefox/firefox_binary.py
Python
apache-2.0
8,338
0.002998
import math class Point(object): X = 0 Y = 0 def __init__(self, x, y): self.X = x self.Y = y def getX(self): return self.X def getY(self): return self.Y def __str__(self): return "Point(%s,%s)" % (self.X, self.Y) def __eq__(self, other): ...
gdorion/advent-of-code
2015/python/Day3/houses.py
Python
mit
2,174
0.0046
""" WSGI config for proxy project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTING...
phyng/python-google-proxy
proxy/wsgi.py
Python
mit
387
0
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (c) 2016 Gramps Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
ennoborg/gramps
gramps/gen/proxy/cache.py
Python
gpl-2.0
6,358
0.000472
''' Created on Sep 10, 2014 @author: moloyc ''' import os import logging from jinja2 import Environment, PackageLoader from netaddr import IPNetwork import util from model import Pod from dao import Dao from writer import DhcpConfWriter moduleName = 'ztp' logging.basicConfig() logger = logging.getLogger(moduleName)...
sysbot/OpenClos
jnpr/openclos/ztp.py
Python
apache-2.0
4,984
0.008427
#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
wooga/airflow
backport_packages/import_all_provider_classes.py
Python
apache-2.0
4,232
0.001654
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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', ...
photoninger/ansible
lib/ansible/modules/network/f5/bigip_gtm_facts.py
Python
gpl-3.0
31,508
0.001016
import tkinter as tk import tkinter.ttk as ttk def NewFlight(): from Controller import LoadNewFlightPage LoadNewFlightPage(mainPage) def LogBook(): from Controller import LoadLogBookPage LoadLogBookPage(mainPage) def CreateMainPage(): global mainPage mainPage = tk.Tk() m...
Coops1980/Logbook
Main.py
Python
unlicense
2,472
0.033981
""" Definition of models. """ from django.db import models from django import forms; # Create your models here. class Artist(models.Model): name = models.CharField(max_length=50); year_formed = models.PositiveIntegerField(); class ArtistForm(forms.ModelForm): class Meta: model = Artist; f...
MicrosoftLearning/Django
Demos/MusicStore/app/models.py
Python
mit
582
0.024055
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flood_mapper', '0003_data_migration_20141201_0218'), ] operations = [ migrations.AlterField( model_name='floodst...
kartoza/jakarta-flood-maps
django_project/flood_mapper/migrations/0004_auto_20141216_1042.py
Python
bsd-2-clause
665
0
# Copyright 2017-2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
google/ffn
train.py
Python
apache-2.0
27,262
0.006383
import numpy as np def P_vector(model, nodal_load): """Return the load vector """ P = np.zeros(model.nt) for n, p in nodal_load.items(): if n not in model.CON: raise Exception('Not a valid DOF for the applied load!') for i, d in enumerate(model.DOF[n]): P[d]...
nasseralkmim/SaPy
sapy/load.py
Python
gpl-3.0
342
0
#!/usr/bin/env python """ Test code for blackjack game. Tests can be run with py.test or nosetests """ from __future__ import print_function from unittest import TestCase from card_games import blackjack from card_games.blackjack import BlackJack print(blackjack.__file__) class TestRule(TestCase): def setUp(se...
sampathweb/game_app
card_games/test/test_blackjack.py
Python
mit
917
0.001091
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/add_data_lake_store_parameters.py
Python
mit
943
0
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
numenta/htmresearch
htmresearch/frameworks/pytorch/modules/k_winners.py
Python
agpl-3.0
9,177
0.007083
# Portions Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # highlight.py - highlight extension implementation file # # Copyright 2007-2009 Adam Hupp <adam@hupp.org> and others # # This software may be...
facebookexperimental/eden
eden/hg-server/edenscm/hgext/highlight/highlight.py
Python
gpl-2.0
3,008
0.000997
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class AShareBalanceSheet(BaseModel): """ 4.45 中国A股资产负债表 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_windcode: VARCHAR2(40) Wind代码 ...
SnowWalkerJ/quantlib
quant/data/wind/tables/asharebalancesheet.py
Python
gpl-3.0
18,744
0.018408
from .tornadoconnection import TornadoLDAPConnection
Noirello/bonsai
src/bonsai/tornado/__init__.py
Python
mit
53
0
from docutils import nodes, utils from docutils.parsers.rst.roles import set_classes # I cant figure out how the hell to import this so I'm just gonna forget it for now def apigen_role(name, rawtext, text, lineno, inliner, options={}, content=[]): """Link to API Docs page. Returns 2 part tuple containing lis...
deni-zen/csvelte
docs/_contrib/apigenrole.py
Python
mit
2,618
0.002292
""" Copyright (c) 2016-2017, Kir Chou https://github.com/note35/sinon/blob/master/LICENSE A set of functions for handling known error """ def __exception_helper(msg, exception=Exception): #pylint: disable=missing-docstring raise exception(msg) def mock_type_error(obj): #pylint: disable=missing-docstring erro...
note35/sinon
sinon/lib/util/ErrorHandler.py
Python
bsd-2-clause
2,133
0.016409
import sys, os import math, numpy as np import matplotlib.pyplot as pp import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import hrl_lib.util as ut import hrl_lib.matplotlib_util as mpu import scipy.optimize as scp # Params area = 0.0 # For one push and pull: def force_one_push_pull(d): ft_l = d['ft'...
tapomayukh/projects_in_python
modeling_new_tactile_skin/polynomial_model_fitting/force_area_output_model/force_area_output_model2.py
Python
mit
3,444
0.009582
from ex25 import * print "Let's practice everything." print 'You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs.' poem = """ \tThe lovely world with logic so firmly planted cannot discern \n the needs of love nor comprehend passion from intuition and requires an explantion \n\t\twhere there is...
1uk/LPTHW
ex26.py
Python
bsd-3-clause
1,313
0.002285
import numpy as np import pytest from sklearn.preprocessing import StandardScaler from sklearn.utils import check_random_state import fri from fri import genLupiData from fri.parameter_searcher import find_best_model @pytest.fixture(scope="session") def randomstate(): return check_random_state(1337) @pytest.ma...
lpfann/fri
fri/tests/test_parameter_searcher.py
Python
mit
1,221
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('libreosteoweb', '0021_therapeutsettings_siret'), ] operations = [ migrations.AddField( model_name='therapeutsett...
littlejo/Libreosteo
libreosteoweb/migrations/0022_therapeutsettings_invoice_footer.py
Python
gpl-3.0
504
0.001984
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # tritonschedule documentation build configuration file, created by # sphinx-quickstart on Wed Jun 22 11:40:06 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 th...
brianhang/tritonscheduler
docs/conf.py
Python
mit
11,786
0.000085
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2021 yutiansut/QUANTAXIS # # 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 th...
yutiansut/QUANTAXIS
QUANTAXIS/QASetting/cache.py
Python
mit
4,703
0.001701
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyKiwisolver(PythonPackage): """A fast implementation of the Cassowary constraint solver""...
LLNL/spack
var/spack/repos/builtin/packages/py-kiwisolver/package.py
Python
lgpl-2.1
1,376
0.00436
# Lint as: python3 """A torque based stance controller framework.""" from __future__ import absolute_import from __future__ import division #from __future__ import google_type_annotations from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspec...
google-research/motion_imitation
mpc_controller/torque_stance_leg_controller.py
Python
apache-2.0
7,722
0.006346
#!/usr/bin/env python """ BeginDate:20071001 CurrentRevisionDate:20071001 Development Version : net 001 Release Version: pre-release Author(s): Mishtu Banerjee Contact: mishtu@harmeny.com Copyright: The Authors License: Distributed under MIT License [http://opensource.org/licenses/mit-license.html] ...
MishtuBanerjee/xaya
xaya/xayanet.py
Python
mit
22,529
0.011718
#!/usr/bin/env python from PyMiniQbt import getVersion, getName, QasmAsyncInterpreter import sys def main(arguments): if(not len(arguments) == 2): print("which file?") sys.exit(-1) print("Using", getName(), "version:", getVersion()) with open(arguments[1]) as dat: src = dat.read(...
valvy/miniqubit
examples/python/executefile/main.py
Python
mit
714
0.009804
import logging from sleekxmpp import ClientXMPP log = logging.getLogger(__name__) class HipshareXMPP(ClientXMPP): def __init__(self, jid, password): ClientXMPP.__init__(self, jid, password) self.add_event_handler("session_start", self.session_start, threaded=True) def session_start(self, eve...
erg0dic/hipshare
hipshare/lib/xmpp.py
Python
bsd-2-clause
1,321
0.003785
import logging import unittest.mock as mock import os import os.path from pytest import raises, mark import shutil import subprocess import tempfile from teuthology.exceptions import BranchNotFoundError, CommitNotFoundError from teuthology import repo_utils from teuthology import parallel repo_utils.log.setLevel(loggi...
SUSE/teuthology
teuthology/test/test_repo_utils.py
Python
mit
9,075
0.000882
#!/usr/bin/env python import os import django # Base paths DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) SITE_ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) # Debugging DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS =...
hacktyler/hacktyler_crime
config/settings.py
Python
mit
4,568
0.005035
# This is an example of popping a packet from the Emotiv class's packet queue # and printing the gyro x and y values to the console. from emokit.emotiv import Emotiv import platform if platform.system() == "Windows": import socket # Needed to prevent gevent crashing on Windows. (surfly / gevent issue #459) impor...
cactorium/UCFBrainStuff
seniordesign/emokit/gyro_plot.py
Python
mit
1,625
0.007385
import pybedtools a = pybedtools.example_bedtool('a.bed') b = pybedtools.example_bedtool('b.bed') print "cat a.bed\n" + str(a) print "cat b.bed\n" + str(b) print a.intersect(b)
khalidm/VarPub
src/mytest.py
Python
gpl-2.0
181
0.005525
# # Copyright (C) 2013-2014 Emerson Max de Medeiros Silva # # This file is part of ippl. # # ippl 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 late...
emersonmx/ippl
ippl/genetic_algorithm/chromosome.py
Python
gpl-3.0
852
0.001174
""" Tests for the InstructorService """ import json from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from courseware.models import StudentModule from instructor.services import InstructorService from instructor.tests.test_tools import ...
jazztpt/edx-platform
lms/djangoapps/instructor/tests/test_services.py
Python
agpl-3.0
3,469
0
# Copyright (c) 2014 Yubico AB # All rights reserved. # # 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...
Yubico/yubioath-desktop-dpkg
yubioath/core/legacy_otp.py
Python
gpl-3.0
7,391
0
import Fast5File def run(parser, args): if args.read: for i, fast5 in enumerate(Fast5File.Fast5FileSet(args.files)): for metadata_dict in fast5.read_metadata: if i == 0: header = metadata_dict.keys() print "\t".join(["filename"] + header) print "\t".join([fast5.filename] + [str( metadata_dict[...
arq5x/poretools
poretools/metadata.py
Python
mit
641
0.031201
# -*- coding: utf-8 -*- import time import requests from datetime import datetime from logging import getLogger from typing import Optional from typing import Dict from typing import Iterable from funcy import compose from funcy import partial from pandas import DataFrame from pandas import to_datetime from pandas imp...
elsehow/moneybot
moneybot/market/scrape.py
Python
bsd-3-clause
5,485
0.000547
#!/usr/bin/python from ABE_ADCDACPi import ADCDACPi import time import math """ ================================================ ABElectronics ADCDAC Pi 2-Channel ADC, 2-Channel DAC | DAC sine wave generator demo Version 1.0 Created 17/05/2014 Version 1.1 16/11/2014 updated code and functions to PEP8 format run with...
moeskerv/ABElectronics_Python_Libraries
ADCDACPi/demo-dacsinewave.py
Python
gpl-2.0
3,862
0.000777
# PRNG (Pseudo-Random Number Generator) Test # PRNG info: # http://en.wikipedia.org/wiki/Pseudorandom_number_generator # FB - 201012046 # Compares output distribution of any given PRNG # w/ an hypothetical True-Random Number Generator (TRNG) import math import time global x x = time.clock() # seed for the PRNG # PRNG ...
ActiveState/code
recipes/Python/577484_PRNG_Test/recipe-577484.py
Python
mit
1,669
0.009587
"""Tests for the unused-variable message in assignment expressions""" def typed_assignment_in_function_default( # [unused-variable] param: str = (typed_default := "walrus"), # [unused-variable] ) -> None: """An unused annotated assignment expression in a default parameter should emit""" return param de...
PyCQA/pylint
tests/functional/u/unused/unused_variable_py38.py
Python
gpl-2.0
1,000
0.006
#!/usr/bin/env python from iris_sdk.models.maps.base_map import BaseMap class SubscriptionsMap(BaseMap): subscription = None
scottbarstow/iris-python
iris_sdk/models/maps/subscriptions.py
Python
mit
131
0.015267
""" Types that can be represented by a dataset are defined here Each Hydra type must subclass DataType and implement the required abstract properties and methods. The form of each class' constructor is not part of the interface and is left to the implementer. """ import json import math import six import nu...
hydraplatform/hydra-base
hydra_base/lib/HydraTypes/Types.py
Python
lgpl-3.0
9,393
0.005642
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import json import os from osbs.api import OSBS from osbs.conf import Configuration from atomic_re...
mmilata/atomic-reactor
atomic_reactor/plugins/post_import_image.py
Python
bsd-3-clause
2,151
0
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import fmt_money, formatdate, format_time, now_datetime, \ get_url_to_form, get_url_to_list, flt f...
meisterkleister/erpnext
erpnext/setup/doctype/email_digest/email_digest.py
Python
agpl-3.0
11,804
0.027702
# -*- coding: utf-8 -*- import attr from navmazing import NavigateToAttribute from widgetastic.widget import NoSuchElementException from widgetastic.widget import Text from widgetastic.widget import View from widgetastic_patternfly import BootstrapNav from widgetastic_patternfly import BreadCrumb from widgetastic_patte...
RedHatQE/cfme_tests
cfme/storage/object_store_object.py
Python
gpl-2.0
6,631
0.001206
#!/usr/bin/python # -*- coding: utf-8 -*- ## # domains.py: module for domains of model outcomes ## # © 2017, Chris Ferrie (csferrie@gmail.com) and # Christopher Granade (cgranade@cgranade.com). # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
QInfer/python-qinfer
src/qinfer/domains.py
Python
bsd-3-clause
19,964
0.002655
# -*- coding: utf-8 -*- from __future__ import unicode_literals if __name__ == '__main__': from command_manager import Manager manager = Manager(["commands"]) manager.run()
falgore88/command_manager
manage.py
Python
bsd-2-clause
187
0
# -*- coding: utf-8 -*- slenderParameters = {'notPlate': {'beam': {'M': {'BF': '2*bf', 'tfCriteria': True, 'TF': ('2*tf', ''), 'D': 'd', 'twCriteria': True, 'TW': ('(D-2*TF)/(d-2(tf+r))*tw', '')}, 'H': {'BF': '2*bf', 'tfCriteria': True, 'TF': ('2*0.55*tf/.6', ''), 'D': 'd', ...
ebrahimraeyat/civilTools
section/filehandling/slenders.py
Python
gpl-3.0
3,474
0.014105
default_app_config = 'hs_tracking.apps.HSTrackingAppConfig'
ResearchSoftwareInstitute/MyHPOM
hs_tracking/__init__.py
Python
bsd-3-clause
60
0
"""The vimdoc parser.""" from vimdoc import codeline from vimdoc import docline from vimdoc import error from vimdoc import regex def IsComment(line): return regex.comment_leader.match(line) def IsContinuation(line): return regex.line_continuation.match(line) def StripContinuator(line): assert regex.line_c...
google/vimdoc
vimdoc/parser.py
Python
apache-2.0
3,977
0.012321
#!/usr/bin/python #coding=utf-8 ''' @author: sheng @license: ''' import unittest from meridian.acupoints import zhimai44 class TestZhimai44Functions(unittest.TestCase): def setUp(self): pass def test_xxx(self): pass if __name__ == '__main__': unittest.main()
sinotradition/meridian
meridian/tst/acupoints/test_zhimai44.py
Python
apache-2.0
297
0.006734
# -*- encoding: utf-8 -*- ############################################################################## # # Account Cut-off Base module for OpenERP # Copyright (C) 2013 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can re...
noemis-fr/old-custom
account_cutoff_base/account_cutoff.py
Python
agpl-3.0
18,694
0.000053
""" Tests for job management """ import unittest from unittest import mock import biokbase.narrative.jobs.jobmanager from biokbase.narrative.jobs.job import Job from .util import TestConfig import os from IPython.display import HTML from .narrative_mock.mockclients import get_mock_client, get_failing_mock_client from b...
briehl/narrative
src/biokbase/narrative/tests/test_jobmanager.py
Python
mit
6,949
0.002446
import pygame import Vector2, BaseObject, Enemy, Resources, Menu # Classe que gerencia as fases do jogo class Stage(BaseObject.BaseObject): # param: manager - instancia do ScreenManager def __init__(self, manager): # sempre lembrar de chamar o 'super' BaseObject.BaseObject.__init__(self, m...
saintdragon2/python-3-lecture-2015
civil_mid_final/2johack/source/Stage.py
Python
mit
25,316
0.008532
import requests import json import time from collections import OrderedDict from test_framework.test_framework import OpenBazaarTestFramework, TestFailure class CompleteDirectOnlineTest(OpenBazaarTestFramework): def __init__(self): super().__init__() self.num_nodes = 2 def run_test(self): ...
duomarket/openbazaar-test-nodes
qa/complete_direct_online.py
Python
mit
9,485
0.004428
#!/usr/bin/python3 def vogal(v): lista = ['a','e','i','o','u','A','E','I','O','U'] if v in lista: return True else: return False
david81brs/seaport
l4_vogais.py
Python
gpl-2.0
159
0.062893
#!/usr/bin/env python ''' map display module Andrew Tridgell June 2012 ''' import sys, os, math import functools import time from MAVProxy.modules.mavproxy_map import mp_elevation from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_settings from MAVProxy.modules.lib import mp_module from MAVPr...
gmorph/MAVProxy
MAVProxy/modules/mavproxy_map/__init__.py
Python
gpl-3.0
27,717
0.005773
from algorithms.structures.disjoint_set import DisjointSet def test_disjoint_set(): a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ds = DisjointSet(a) assert ds.find_set(1) != ds.find_set(2) ds.union(1, 2) assert ds.find_set(1) == ds.find_set(2) assert ds.find_set(1) != ds.find_set(3) ds.union(2, 3) ...
vadimadr/python-algorithms
tests/test_disjoint_set.py
Python
mit
407
0
import re from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-ShellcodeMSIL', 'Author': ['@mattifestation'], 'Description': ('Execute shellcode within the context of the running PowerShell ' ...
frohoff/Empire
lib/modules/powershell/code_execution/invoke_shellcodemsil.py
Python
bsd-3-clause
3,462
0.009821
#!/usr/bin/python # -*- coding: utf-8 -*- ############## IMPORTS ################## from __future__ import print_function from os import path from sys import argv, exit from colorama import init as initColorama from colorama import Fore, Style from struct import pack from binascii import unhexlify as unHex #########...
sadboyzvone/8080py
bin/8080.py
Python
gpl-3.0
13,651
0.002051
from twisted.trial import unittest from twistedchecker.checkers.docstring import DocstringChecker class DocstringTestCase(unittest.TestCase): """ Test for twistedchecker.checkers.docstring """ def test_getLineIndent(self): """ Test of twistedchecker.checkers.docstring._getLineIndent...
twisted/twistedchecker
twistedchecker/test/test_docstring.py
Python
mit
678
0.001475
import os.path for root, dirs, files in os.walk(os.path.dirname(os.path.realpath(__file__))): for file in files : if file.endswith('.prog') : os.chdir(root) f1 = open(file, 'r') output = file.split(".") f2 = open(output[0]+'.py', 'w') indent = 0 ...
wahur666/kodok
python/bead5/mian.py
Python
gpl-3.0
1,500
0.002667
# -*- coding: utf-8 -*- # License: See LICENSE file. import random import math try: import png except ImportError: png = False import pygtk pygtk.require('2.0') import gtk import gtk.gtkgl import gtk.gtkgl.apputils from OpenGL.GL import * from OpenGL.GLU import * import openglutils class MatrixWidget(gtk.D...
ofavre/cellulart
matrixwidget.py
Python
bsd-3-clause
13,392
0.006347
# -*- coding: utf-8 -*- from django import forms from cms_content.settings import EDITOR from cms_content.models import CMSArticle from cms_content import widgets WIDGET = getattr(widgets, EDITOR) class CMSArticleAdminForm(forms.ModelForm): content = forms.CharField(widget=WIDGET) class Meta: m...
indexofire/django-cms-content
cms_content_patch/forms.py
Python
bsd-3-clause
604
0.006623
import os import os.path import sys import pygame from buffalo import utils from buffalo.scene import Scene from buffalo.label import Label from buffalo.button import Button from buffalo.input import Input from buffalo.tray import Tray from camera import Camera from mapManager import MapManager from pluginManager im...
benjamincongdon/adept
editMapTestScene.py
Python
mit
5,875
0.00783
# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta # Copyright 2016 Tecnativa S.L. - Vicent Cubells # Copyright 2016 Tecnativa S.L. - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.exceptions import UserError, ValidationError from odoo.tests import common class T...
OCA/partner-contact
partner_industry_secondary/tests/test_res_partner_industry.py
Python
agpl-3.0
1,860
0
#!/usr/bin/env python # # Generate report in Excel format (from xml input) # import sys,os,shelve import re,dfxml,fiwalk from bc_utils import filename_from_path from openpyxl.workbook import Workbook from openpyxl.writer.excel import ExcelWriter from openpyxl.cell import get_column_letter def bc_generate_feature_x...
sesuncedu/bitcurator
python/bc_gen_feature_rep_xls.py
Python
gpl-3.0
1,974
0.015198
import numpy as np import cvxopt as co def load_mnist_dataset(): import torchvision.datasets as datasets mnist_train = datasets.MNIST(root='../data/mnist', train=True, download=True, transform=None) mnist_test = datasets.MNIST(root='../data/mnist', train=False, download=True, transform=None) test_labe...
nicococo/tilitools
tilitools/utils_data.py
Python
mit
5,881
0.009522
import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest from com.l2scoria.gameserver.network.serverpackets import CreatureSay from com.l2scoria.util.random import Rnd qn = "3...
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/335_TheSongOfTheHunter/__init__.py
Python
gpl-3.0
28,333
0.032895
import uuid from unithelper import DBTestCase from unithelper import mocker from unithelper import requestor from unithelper import hashable_dict from bc import database from bc import metrics from bc_wapi import wapi_metrics class Test(DBTestCase): def test_metric_get(self): """Check getting metric with metri...
legionus/billing
tests/test_wapi_metrics.py
Python
gpl-3.0
2,622
0.031274
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
sparkslabs/kamaelia_
Sketches/JL/IRC/plainPython/client.py
Python
apache-2.0
2,730
0.007692
# -*- coding: utf-8 -*- """ Created on Mon Apr 24 10:55:03 2017 @author: rstreet """ from django.core.management.base import BaseCommand from django.contrib.auth.models import User from events.models import Field, ObsRequest from sys import exit from scripts import query_db class Command(BaseCommand): help = ''...
ytsapras/robonet_site
events/management/commands/fetch_obs_for_field.py
Python
gpl-2.0
879
0.009101
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 Julien Girard # # Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3 ; # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://http://www.gnu.org/licenses/gpl-3.0.htm...
julien-girard/openstick
openstick/openstick.py
Python
gpl-3.0
8,148
0.001473
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2013 Vassilii Khachaturov # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the ...
pmghalvorsen/gramps_branch
gramps/gen/datehandler/_datestrings.py
Python
gpl-2.0
14,146
0.012588
""" Tests for the lms_result_processor """ import six import pytest from lms.djangoapps.courseware.tests.factories import UserFactory from lms.lib.courseware_search.lms_result_processor import LmsSearchResultProcessor from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tes...
stvstnfrd/edx-platform
lms/lib/courseware_search/test/test_lms_result_processor.py
Python
agpl-3.0
3,315
0.001207