code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
google-research/google-research
ipagnn/lib/optimizer_utils.py
Python
apache-2.0
3,800
__version__="0.0.2"
airtonix/django-piehunter
piehunter/__init__.py
Python
mit
19
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
chipaca/snapcraft
tests/unit/store/test_status.py
Python
gpl-3.0
6,518
# 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 option) any later # version. # # This program is distributed in the hope that it will be useful, but ...
Debian/ud
src/common/management/commands/echelon.py
Python
gpl-2.0
3,879
"""Top-level module for releng-sop."""
release-engineering/releng-sop
releng_sop/__init__.py
Python
mit
39
# -*- coding: utf-8 -*- # # Copyright 2016 Mirantis, 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 requ...
tivaliy/git-repo
gitrepo/v1/base.py
Python
apache-2.0
839
# Copyright 2006 Falling Leaf Systems, LLC. # Refer to LICENSE in the root directory. import os class MacLinkWrapper: def __init__(self, source, shared): self.source = source self.imports = source.imports self.entry_point = source.entry_point self.shared = shared def output(self, filename): ...
callen/Alky-Reborn
Convertor/Targets/Mac/MacLinkWrapper.py
Python
lgpl-3.0
1,384
import binascii import io from xml.dom import minidom from ...apk import * def installApk(shell, apkFile): apk = ApkParser(apkFile) # Mount android data partition dataDir = shell.mountAndroidData() commitBackup = False # Patch packages.xml xmlFile = dataDir + '/system/packages.xml' xmlData = io.BytesIO() sh...
ma1co/Sony-PMCA-RE
pmca/usb/usbshell/android.py
Python
mit
2,393
# Copyright 2015 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 ag...
flgiordano/netcash
+/google-cloud-sdk/lib/surface/compute/instance_groups/managed/list_instances.py
Python
bsd-3-clause
5,441
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
kghatala/googlePythonCourse
basic/string1.py
Python
apache-2.0
3,654
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import render_template from markupsafe import Markup from indico.core import signals from indi...
indico/indico
indico/web/menu.py
Python
mit
5,884
#!/usr/bin/env python # -*- coding: utf-8 -*- """ gateway tests - Testing the gateway.getObject() and deleteObjects() methods Copyright 2013-2015 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt pytest fixtures used as defined in conftest.py: - gatewa...
dpwrussell/openmicroscopy
components/tools/OmeroPy/test/integration/gatewaytest/test_get_objects.py
Python
gpl-2.0
31,537
# -*- coding: utf8 -*- # Copyright (C) 2014 Ben Ockmore # 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 progr...
waveplot/webservice
wpws/track.py
Python
gpl-3.0
4,988
""" Tools for working in non-realtime. """ from .AudioInputBusGroup import AudioInputBusGroup # noqa from .AudioOutputBusGroup import AudioOutputBusGroup # noqa from .Buffer import Buffer # noqa from .BufferGroup import BufferGroup # noqa from .Bus import Bus # noqa from .BusGroup import BusGroup # noqa from .DoN...
Pulgama/supriya
supriya/nonrealtime/__init__.py
Python
mit
807
import io import importlib import subprocess from collections import namedtuple import click def _get_osx_clipboard(): p = subprocess.Popen(['pbpaste', '-Prefer', 'ascii'], stdout=subprocess.PIPE) content, _ = p.communicate() return content.decode('utf-8') class InputFile(click...
vmagamedov/kinko
kinko/__main__.py
Python
bsd-3-clause
4,603
class Solution: def __inti__(self): pass def solution(self,s): length = len(s) factors = [] small_factors = [] factors.append(1) for possible_factor in range(2,int(pow(length,0.5))+1): if length/possible_factor == int(length/possible_factor): ...
perlygatekeeper/glowing-robot
google_test/the_cake_is_not_a_lie/Solution.py
Python
artistic-2.0
782
from .main import main from .tic_tac_toe.views import tic_tac_toe from .battleship.views import battleship from .checkers.views import checkers from .chess.views import chess __all__ = ['main', 'tic_tac_toe', 'battleship', 'checkers', 'chess']
sampathweb/game_app
app/blueprints/__init__.py
Python
mit
245
"""Views for Zinnia entries search""" from django.views.generic.list import ListView from django.utils.translation import ugettext as _ from zinnia.models.entry import Entry from zinnia.settings import PAGINATION from zinnia.views.mixins.prefetch_related import PrefetchCategoriesAuthorsMixin class BaseEntrySearch(ob...
jnfsmile/zinnia
zinnia/views/search.py
Python
bsd-3-clause
1,950
# Copyright 2019 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...
gunan/tensorflow
tensorflow/lite/testing/op_tests/concat.py
Python
apache-2.0
2,834
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
pwong-mapr/private-hue
apps/search/src/search/search_controller.py
Python
apache-2.0
3,862
# This file is part of Bika LIMS # # Copyright 2011-2016 by it's authors. # Some rights reserved. See LICENSE.txt, AUTHORS.txt. from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.utils import to_utf8 from plone.app.contentmenu.menu import WorkflowSubMenuItem as _WorkflowSubMenuI...
rockfruit/bika.lims
bika/lims/browser/menu.py
Python
agpl-3.0
4,966
"""Front end tests.""" import base64 import datetime from decimal import Decimal from distutils.version import StrictVersion import functools import json from http.client import HTTPConnection import os import re import signal import sys import time import unittest from urllib.request import urlopen import urllib.error...
dokomo-sauce-matrix/dokomoforms
tests/python/test_selenium.py
Python
gpl-3.0
161,852
import logging from flask import current_app from boiler.feature.orm import db class AbstractService: """ Abstract service Base class for services that encapsulates common model operations. Extend your concrete services from this class and define __model__ """ __model__ = None __create_vali...
projectshift/shift-boiler
boiler/abstract/abstract_service.py
Python
mit
3,926
# -*- coding: utf-8 -*- from imio.history.config import HISTORY_COMMENT_NOT_VIEWABLE from imio.history.interfaces import IImioHistory from imio.history.testing import IntegrationTestCase from plone import api from plone.memoize.instance import Memojito from Products.Five.browser import BrowserView from zope.component ...
IMIO/imio.history
src/imio/history/tests/test_documentbylineviewlet.py
Python
gpl-2.0
3,189
from pysnmp.entity import engine, config from pysnmp.smi.rfc1902 import * from pysnmp.entity.rfc3413 import ntforg, context from pysnmp.hlapi.auth import * from pysnmp.hlapi.context import * from pysnmp.hlapi.lcd import * from pysnmp.hlapi.varbinds import * from pysnmp.hlapi.asyncore.transport import * from pysnmp impo...
imron/scalyr-agent-2
scalyr_agent/third_party/pysnmp/hlapi/asyncore/ntforg.py
Python
apache-2.0
5,452
#!/usr/bin/python import socket import sys from Crypto.Cipher import AES from Crypto import Random from config import Config def createMsg(cfg, user, ip = None): ipstring = '' if ip != None: ipstring = ';'+ip salt = Random.new().read(16) cipher = AES.new(cfg.key, AES.MODE_CFB, salt) ...
ischeinkman/Border-Wall
client/connectserver.py
Python
mit
1,370
# -*- coding: utf-8 -*- from __future__ import unicode_literals from aldryn_faq.menu import FaqCategoryMenu from .test_base import AldrynFaqTest class TestMenu(AldrynFaqTest): def test_get_nodes(self): # Test that the EN version of the menu has only category1 and its # question1, and is shown ...
czpython/aldryn-faq
aldryn_faq/tests/test_menu.py
Python
bsd-3-clause
1,155
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
mitya57/debian-buildbot
buildbot/clients/tryclient.py
Python
gpl-2.0
29,590
#!/usr/bin/python # -*- coding: utf-8 -*- ##### ##### # arguments import sys # Google API from google import google # csv import csv # sleep import time import random ##### ##### ##### ##### ##### ##### # start main def main(): ''' 메인 함수 csv 파일을 입력으로 받아 Google Search를 진행한다. csv 파일을 출력으로 낸다. ''' # 인자 체크 ...
munhyunsu/UsedMarketAnalysis
google_search/google_search.py
Python
gpl-3.0
1,007
# -*- encoding: utf-8 -*- """Implements Navigator UI.""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import menu_locators class Navigator(Base): """Quickly navigate through menus and tabs.""" def menu_click(self, top_menu_locator, sub_menu_locator, tertiary_menu_...
abalakh/robottelo
robottelo/ui/navigator.py
Python
gpl-3.0
12,312
class Metric: """ Policy class represents the policy data """ def __init__(self, name, network_location, metric_type): self.id = name self.network_location = network_location self.type = metric_type
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/policies/metrics/models.py
Python
gpl-3.0
243
import pytest import struct import tempfile from nengo_spinnaker.regions import ListRegion @pytest.mark.parametrize( "fstr, items, expected_length", [("I", [1, 2, 3], 12), ("b", [1, 2], 2), ("h", [1, 2], 4)] ) def test_sizeof(items, fstr, expected_length): # Create the region lr = ListRegio...
project-rig/nengo_spinnaker
tests/regions/test_region_list.py
Python
mit
995
# -*- coding: utf-8 -*- import wx from outwiker.gui.guiconfig import TagsConfig from outwiker.gui.preferences.baseprefpanel import BasePrefPanel from outwiker.gui.controls.pagelist_columns import ColumnsFactory class TagsPanel(BasePrefPanel): def __init__(self, parent, application): super().__init__(par...
unreal666/outwiker
src/outwiker/gui/preferences/tagspanel.py
Python
gpl-3.0
4,157
import json from django.http import HttpResponse from django.views.generic import View from marshmallow import fields from webargs.djangoparser import DjangoParser parser = DjangoParser() hello_args = { 'name': fields.Str(missing='World') } hello_multi = { 'name': fields.List(fields.Str()) } def render_json_...
hyunchel/webargs
tests/testapp/echo/views.py
Python
mit
2,338
from Foundation import * from PyObjCTools.TestSupport import * class TestNSPortNameServer (TestCase): def testMethods(self): self.assertResultIsBOOL(NSPortNameServer.registerPort_name_) self.assertResultIsBOOL(NSPortNameServer.removePortForName_) self.assertResultIsBOOL(NSMachBootstrapServ...
albertz/music-player
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsportnameserver.py
Python
bsd-2-clause
631
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Generate certificates for testing Usage: generate_test_certificate.py --dir=<name of directory> """ import sys import os import subprocess import tempfile from argparse import ArgumentParser from subprocess import check_call import c_rehash as c_rehash_tools de...
APCVSRepo/sdl_core_v4.0_winceport
tools/Utils/generate_test_certificates.py
Python
bsd-3-clause
14,021
import PyQt5 # this force pyqtgraph to deal with Qt5 # For matplotlib to Qt5 : # * this avoid tinker problem when not installed # * work better with GUI # * trigger a warning on notebook import matplotlib import warnings with warnings.catch_warnings(): try: ...
tridesclous/tridesclous
tridesclous/gui/__init__.py
Python
mit
2,001
# -*- coding: utf-8 -*- """ Line Follower By: Alex Moriarty (alexander@dal.ca) Location: """ from nxt.locator import * from nxt.motor import * from nxt.sensor import * from time import * TIME_LIMIT = 15 b = find_one_brick() t = Touch(b, PORT_3) s = Sound(b, PORT_1) l = Light(b, PORT_4) print '...
moriarty/csci-homework
4155/labs/nxt/line_follower.py
Python
mit
770
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script will do: 1. Setup src's git initialization. 2. Place .gclient file outside of src. 3. Call gclient sync outside ...
zeropool/crosswalk
tools/fetch_deps.py
Python
bsd-3-clause
2,767
# coding: utf-8 # RDS delete import boto3 # nodelete,trueを変数化 ND = 'nodelete' TR = 'true' def lambda_handler(event, context): #if __name__ == '__main__': client = boto3.client('rds', "ap-northeast-1") resp = client.describe_db_snapshots() #print resp all_list = [] del_list = [] ...
borkit/scriptdump
AWS/lambda_python/delete-rds-snapshot.py
Python
mit
1,159
import pandas as pd import os from rdkit import Chem import time import gzip import pickle import deepchem def main(): print("Processing PubChem FTP Download") data_dir = deepchem.utils.get_data_dir() sdf_dir = os.path.join(data_dir, "SDF") compound_read_count = 0 keys = list() values = list() overall...
deepchem/deepchem
contrib/pubchem_dataset/create_smiles_mapping.py
Python
mit
2,008
# 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 ...
Azure/azure-sdk-for-python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_spark_configuration_operations.py
Python
mit
6,172
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin, login_required app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://klwbcufpwwaqof:LsaNKpIUluX6bFk25y8s3xB5jt@ec2-46-137-73-65.eu-west-1.compute.ama...
Mistes/MA-Summer-Practice-2016
homeworks/team-4/flask-blog/flask_blog/__init__.py
Python
gpl-3.0
703
import argparse parser = argparse.ArgumentParser(description='Script to add the Variant Type annotation to the VCF') parser.add_argument('--outfile',help='Output file',required=True) parser.add_argument('--file1',help='Path to table that will be used in order to add the annotation as the last column',required=True) p...
igsr/igsr_analysis
scripts/VCF/ANNOTATION/add_annotation.py
Python
apache-2.0
1,477
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2015-2017 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import test_framework.loginit # # Test pruning ...
BitcoinUnlimited/BitcoinUnlimited
qa/rpc-tests/pruning.py
Python
mit
18,143
import os import logging import unittest from core.Database import Database from core.PluginManager import PluginManager from core.entities.Plugin import Plugin class PluginManagerTest(unittest.TestCase): cfg = Database() Plugin._config = cfg cfg.create_database() def test_loading(self): try...
Cirreth/shome
unittests/PluginManagerTest.py
Python
mit
869
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
lahwaacz/qutebrowser
tests/helpers/test_logfail.py
Python
gpl-3.0
2,501
import matplotlib.pyplot as plt import numpy as np from numpy.random import rand from graphics_utils import initialize_graphics, cm2inch r = rand(8)/5 t = rand(8) x = r/2 * np.cos(2*np.pi*t) - 0.2 y = r * np.sin(2*np.pi*t) - 0.2 r = rand(40)/5 t = rand(40) xz = r/2 * np.cos(2*np.pi*t) - 0.2 z = r * np.sin(2*np.pi*t) ...
peterwittek/quantum_machine_learning_figures
transductive.py
Python
gpl-3.0
1,000
import P1011 import unittest class test_phylab(unittest.TestCase): def testSteelWire_1(self): m = [10.000,12.000,14.000,16.000,18.000,20.000,22.000,24.000,26.00] C_plus = [3.50, 3.81, 4.10, 4.40, 4.69, 4.98, 5.28, 5.59, 5.89] C_sub = [3.52, 3.80, 4.08, 4.38, 4.7...
buaase/Phylab-Web
PythonExperimentDataHandle/test/P1011_test.py
Python
gpl-2.0
1,628
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_countries_saint_pierre_and_miquelon.py
Python
gpl-3.0
1,147
#!/usr/bin/env python from setuptools import setup from distutils.command.sdist import sdist import os import sys class sdist_git(sdist): """Add revision number to version for development releases.""" def run(self): if "dev" in self.distribution.metadata.version: self.distribution.metad...
SICASFoundation/vsdConnect
setup.py
Python
bsd-2-clause
1,287
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-05-04 14:45 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cbh_core_model', '0046_auto_20160504_0945'), ('cbh_che...
thesgc/chembiohub_ws
cbh_chembl_model_extension/migrations/0036_cbhcompoundmultiplebatch_uploaded_file.py
Python
gpl-3.0
748
__author__ = 'aarongary' from app import PubMed from app import elastic_search_uri from collections import Counter from elasticsearch import Elasticsearch es = Elasticsearch([elastic_search_uri],send_get_body_as='POST',timeout=300) #============================ #============================ # DRUG SEARCH #=====...
ucsd-ccbb/Oncolist
src/restLayer/app/SearchDrugsTab.py
Python
mit
15,395
import os import settings fl = os.fdopen(5, 'w') fl.write(settings.LOG_FILENAME)
MiltosD/CEF-ELRC
misc/tools/multitest/get_meta_log.py
Python
bsd-3-clause
83
# -*- coding: utf-8 -*- import pickle #save import ttk import ast import re import tkFont import Tkinter as Tk import PIL.Image from collections import namedtuple UNIT_PX = 15 sprite1 = {'name':'aa sprite 1', 'width' : '8', 'height': '8', 'animation_name' :'sprites_1', 'animation_frame_num':'0'} sprite1_1 = {'nam...
cadeli/akoasgen
akoa_gen.py
Python
apache-2.0
7,354
# -*- coding: utf-8 -*- from cronos.posts.models import Authors, Posts from cronos.teilar.models import Departments as departments from cronos.teilar.models import Teachers as teachers from cronos.teilar.models import Websites as websites from cronos.teilar.models import EclassLessons as eclasslessons from django.cont...
LinuxTeam-teilar/cronos.teilar.gr
cronos/posts/views.py
Python
agpl-3.0
6,550
import sys, os sys.path.append('./rawData') import calculate from calculate import * sys.path.append('./fitToCurve') import splitData from splitData import * def checkInput(): bla = raw_input('Do these numbers match up with data book? [y,n]: ') if bla == 'y' or bla == 'Yes' or bla == 'yes': os.system('mv ' + sys....
JMoravec/unkRadnet
start.py
Python
bsd-3-clause
874
import numpy as np from emva1288.camera import Camera c = Camera() radiances = np.linspace(0, c.get_radiance_for(mean=200), num=20) for radiance in radiances: img = c.grab(radiance) print(img.mean(), img.std())
EMVA1288/emva1288
doc/examples/grab.py
Python
gpl-3.0
221
# !/usr/bin/env python # coding:utf-8
gmkou/FikaNote
app/url2title.py
Python
mit
38
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.ht...
ChopChopKodi/pelisalacarta
python/main-classic/platformcode/xbmc_config_menu.py
Python
gpl-3.0
43,816
from syncloud_platform.snap.models import App, AppVersions from syncloud_platform.snap.snap import join_apps def test_join_apps(): installed_app1 = App() installed_app1.id = 'id1' installed_app_version1 = AppVersions() installed_app_version1.installed_version = 'v1' installed_app_version1.current...
syncloud/platform
src/test/snap/test_snap.py
Python
gpl-3.0
1,740
import os from setuptools import setup, find_packages def read_file(filename): """Read a file into a string""" path = os.path.abspath(os.path.dirname(__file__)) filepath = os.path.join(path, filename) try: return open(filepath).read() except IOError: return '' setup(name='typogrify...
callowayproject/django-typogrify
setup.py
Python
bsd-3-clause
1,129
import os import make_gene_model_from_exons def main(): s = r"../sample" args = [ "-f", s + os.sep + "xenopus_exons.fasta", "-e", s + os.sep + "xenopus_exons_info.txt", "-o", s ] make_gene_model_from_exons.main(args) if __name__ == "__main__": main()
molecol/targeted-resequencing-with-mips
ensembl_gene_model/make_gene_model_from_exons_runner.py
Python
mit
301
# -*- coding: utf-8 -*- """ Created on Tue Feb 28 13:26:20 2017 @author: AmatVictoriaCuramIII """ def STrend(s):# + denotes bullish, - denotes bearish s['42d'] = s['Adj Close'].rolling(window=42, center=False).mean() s['252d'] = s['Adj Close'].rolling(window=252, center=False).mean() s['42-252'] = s['42d']...
adamrvfisher/TechnicalAnalysisLibrary
STrend.py
Python
apache-2.0
413
# Copyright 2015, A10 Networks # # 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 agre...
gandelman-a/neutron-lbaas
neutron_lbaas/drivers/octavia/driver.py
Python
apache-2.0
11,314
''' Created on May 19, 2011 @author: bungeman ''' import re import math # bench representation algorithm constant names ALGORITHM_AVERAGE = 'avg' ALGORITHM_MEDIAN = 'med' ALGORITHM_MINIMUM = 'min' ALGORITHM_25TH_PERCENTILE = '25th' # Regular expressions used throughout PER_SETTING_RE = '([^\s=]+)(?:=(\S+))?' SETTIN...
AOKP/external_skia
bench/bench_util.py
Python
bsd-3-clause
10,908
# # This file is part of Plinth. # # 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 3 of the # License, or (at your option) any later version. # # This program is distribute...
vignanl/Plinth
plinth/modules/roundcube/urls.py
Python
agpl-3.0
1,106
""" The flask application package. """ from flask import Blueprint BLOG = Blueprint('blog', __name__, template_folder='templates', static_folder='static', static_url_path='/static') import Blogs.views
rwecho/fflask_blog
fflask_blog/Blogs/__init__.py
Python
apache-2.0
255
import logging import time try: from statsd import statsd statsd_installed = True except: statsd_installed = False from worker import executors from common import config log = logging.getLogger(__name__) def bind(t): def f(cls): executors.bindings[t] = cls return cls return f ...
Unix4ever/spike
worker/executors/executor.py
Python
mit
1,637
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import sys import csv import shutil import pickle from indra.sources import reach from indra.util import read_unicode_csv from indra.literature import pmc_client, get_full_text, id_lookup from assembly_eval...
pvtodorov/indra
indra/benchmarks/assembly_eval/batch4/run_reach_eval.py
Python
bsd-2-clause
1,179
# 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 # distributed under t...
keedya/shovel-horizon-plugin
rackhd/urls.py
Python
apache-2.0
1,329
from music_transcriber import MusicTranscriber import os import time MUSIC_FILES_DIR = '/tmp/music_files' LILYPOND_DIR = '/tmp/lilypond_files' SHEET_NOTES_DIR = '/var/www/transcriber_website/static/sheet_notes' MIDI_DIR = '/var/www/transcriber_website/static/midi_files' ONSET_FRAMES_DIR = '/var/www/transcriber_website...
Agerrr/Automated_Music_Transcription
transcription_handler.py
Python
mit
1,390
# Copyright 2015 PerfKitBenchmarker 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 appli...
meteorfox/PerfKitBenchmarker
perfkitbenchmarker/linux_benchmarks/cloud_bigtable_ycsb_benchmark.py
Python
apache-2.0
11,221
# -*- coding: utf-8 -*- # Copyright 2016-2021 The pyXem developers # # This file is part of pyXem. # # pyXem is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
pycrystem/pycrystem
pyxem/tests/detectors/test_medipix_256x256.py
Python
gpl-3.0
950
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> # Some Illumina reads from ancient DNA samples were found to contain an inverted repeat # with a different sequence inbetween # in other words, the first x bases of a read are the reverse complement of the last x bases # This script is meant to clip the ...
lexnederbragt/inverted_repeats
clip_inverted_repeats.py
Python
unlicense
7,738
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("proposals", "0007_auto_20150525_2150"), ] operations = [ migrations.RemoveField( model_name="proposalsectionrevi...
pythonindia/junction
junction/proposals/migrations/0008_auto_20150528_2243.py
Python
mit
582
# -*- coding: utf-8 -*- import collections, itertools import nltk.classify.util, nltk.metrics from nltk.classify import NaiveBayesClassifier from nltk.corpus import movie_reviews, stopwords from nltk.collocations import BigramCollocationFinder from nltk.metrics import BigramAssocMeasures from nltk.probability import F...
Feawel/MachineLearningProject
demo_good.py
Python
mit
3,204
import unittest from shapely.geometry import LineString from shapely.geometry.collection import GeometryCollection class CollectionTestCase(unittest.TestCase): def test_array_interface(self): m = GeometryCollection() self.failUnlessEqual(len(m), 0) self.failUnlessEqual(m.geoms, []) def...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/shapely/tests/test_collection.py
Python
agpl-3.0
870
# TestDefiningOverloadedFunctions.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://sw...
apple/swift-lldb
packages/Python/lldbsuite/test/lang/swift/expression/overload/TestDefiningOverloadedFunctions.py
Python
apache-2.0
2,522
import pytest from tests.support.asserts import assert_error, assert_same_element, assert_success from tests.support.inline import inline def find_elements(session, element, using, value): return session.transport.send("POST", "session/%s/element/%s/elements" % (session.session_...
Varentsov/servo
tests/wpt/web-platform-tests/webdriver/tests/element_retrieval/find_elements_from_element.py
Python
mpl-2.0
5,686
from cytoolz.utils import raises, consume def test_raises(): assert raises(ZeroDivisionError, lambda: 1 / 0) assert not raises(ZeroDivisionError, lambda: 1) def test_consume(): l = [1, 2, 3] assert consume(l) is None il = iter(l) assert consume(il) is None assert raises(StopIteration, la...
llllllllll/cytoolz
cytoolz/tests/test_utils.py
Python
bsd-3-clause
385
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from astropy.cosmology import parameters, realizations from astropy.cosmology.realizations import Planck13, default_cosmology from astropy.utils.exceptions import AstropyDeprecationWarning cosmo_realz = parameters.available class Test_de...
saimn/astropy
astropy/cosmology/tests/test_realizations.py
Python
bsd-3-clause
1,764
import kibot.BaseModule import random import re class eightball(kibot.BaseModule.BaseModule): """Magic 8-Ball""" def __init__(self, bot): self.affirmative = [ "As I see it, yes", "It is certain", "It is decidedly so", "Most likely", "Outlook ...
pteichman/kibot-modules
kibot/modules/eightball.py
Python
mit
1,607
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def constructFromPrePost(self, pre, post): """ :type pre: List[int] :type post: List[int] :rtype: TreeNod...
YiqunPeng/Leetcode-pyq
solutions/889ConstructBinaryTreeFromPreorderAndPostorderTraversal.py
Python
gpl-3.0
864
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2014 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
avanzosc/UPV
onglibre_financial_source/models/legal_support.py
Python
agpl-3.0
1,221
# Monte Carlo Localisation import prob_motion_model as pmm #import hokuyo import random import numpy as np import matplotlib.pyplot as plt import time import socket import copy import ttest import math from serial.tools import list_ports import serialWrapper import packetBuilder import packetParser import traceback #...
redarmy30/Eurobot-2017
old year/RESET-master/CommunicationWithRobot/localisation2.py
Python
mit
9,722
__author__ = "David Rusk <drusk@uvic.ca>" import wx class MPCPanel(wx.Panel): def __init__(self, parent, controller, ssos_label="Query", save_label="Save"): super(MPCPanel, self).__init__(parent) self.controller = controller self.ssos_label = ssos_label self.sav...
CFIS-Octarine/octarine
validate/gui/views/validation.py
Python
gpl-3.0
16,223
# Generated by Django 2.0.3 on 2018-04-21 00:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("product", "0059_generate_variant_name_from_attrs")] operations = [ migrations.AddField( model_name="collection", name="is_publish...
maferelo/saleor
saleor/product/migrations/0060_collection_is_published.py
Python
bsd-3-clause
395
# 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 # distributed u...
stackforge/ospurge
ospurge/tests/resources/test_swift.py
Python
mit
4,591
#M3 -- Meka Robotics Robot Components #Copyright (c) 2010 Meka Robotics #Author: edsinger@mekabot.com (Aaron Edsinger) #M3 is free software: you can redistribute it and/or modify #it under the terms of the GNU Lesser General Public License as published by #the Free Software Foundation, either version 3 of the License,...
CentralLabFacilities/m3meka
python/m3/joint_zlift.py
Python
mit
4,004
import os import sys from pythonbrew.basecommand import Command from pythonbrew.define import PATH_PYTHONS, PATH_BIN, PATH_VENVS from pythonbrew.util import Package, symlink, unlink, get_using_python_pkgname,\ is_installed from pythonbrew.log import logger class SymlinkCommand(Command): name = "symlink" us...
Mitali-Sodhi/CodeLingo
Dataset/python/symlink.py
Python
mit
4,301
from Components.VariableText import VariableText from enigma import eLabel, iPlayableService from Renderer import Renderer class ChannelNumber(Renderer, VariableText): def __init__(self): Renderer.__init__(self) VariableText.__init__(self) self.text = "---" GUI_WIDGET = eLabel def changed(self, what): if w...
Open-Plus/opgui
lib/python/Components/Renderer/ChannelNumber.py
Python
gpl-2.0
566
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into individual test cases via subprocess. It will f...
slingcoin/sling-market
test/functional/test_runner.py
Python
mit
20,189
from bitmovin.utils import Serializable class EncodingInput(Serializable): def __init__(self, input_id, input_path=None): super().__init__() self.inputId = input_id self.inputPath = input_path @classmethod def parse_from_json_object(cls, json_object): input_id = json_obje...
bitmovin/bitmovin-python
bitmovin/resources/models/encodings/encoding_input.py
Python
unlicense
683
#!/usr/bin/python #from foam.sfa.util.sfalogging import logger class RSpecVersion: type = None content_type = None version = None schema = None namespace = None extensions = {} namespaces = dict(extensions.items() + [('default', namespace)]) elements = [] enabled = False def __...
dana-i2cat/felix
ofam/src/src/foam/sfa/rspecs/version.py
Python
apache-2.0
694
from StringIO import StringIO from muntjac.api import VerticalLayout, Label from muntjac.ui.upload import Upload, IReceiver, IFinishedListener class UploadBasicExample(VerticalLayout): def __init__(self): super(UploadBasicExample, self).__init__() self._result = Label() self._counter =...
rwl/muntjac
muntjac/demo/sampler/features/upload/UploadBasicExample.py
Python
apache-2.0
1,604
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import warnings from pymatgen.core.bonds import CovalentBond, get_bond_length, \ obtain_all_bond_lengths, get_bond_order from pymatgen.core.sites import Site from pymatgen.core.periodic_tab...
dongsenfo/pymatgen
pymatgen/core/tests/test_bonds.py
Python
mit
4,189
#!/usr/bin/env python3 # Copyright 2016, Eliot Courtney. # # This file is part of kekrna. # # kekrna 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 lat...
Edgeworth/kekrna
scripts/test.py
Python
gpl-3.0
1,415
# Solution to exercise Brackets # http://www.codility.com/train/ def solution(S): # Create a stack to track what braces are open stack = [] opposite_braces = {'(': ')', '{': '}', '[': ']'} for i in S: # Each time a brace is opened, add it to the stack if i == '(' or i == '{' or i == '[':...
jmaidens/Codility
Brackets.py
Python
mit
747
#!/usr/bin/env python3 import argparse import configparser import gazelle import html import os import re import subprocess import string import sys import tempfile # WARNING untested cross_seeding = False dry_run = False ## ## ## def find_all(dir): return [f for f in os.listdir(dir) if os.path.isdir(os.path....
jordanl/reseed
reseed.py
Python
gpl-3.0
10,280