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 |
|---|---|---|---|---|---|---|---|---|---|---|
jeremiahyan/odoo | addons/sale_timesheet/tests/test_project_overview.py | 1 | 8777 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.sale_timesheet.tests.test_reporting import TestReporting
from odoo.tools import float_compare
from odoo.tests import tagged
@tagged('-at_install', 'post_install')
class TestSaleProject(TestReporting):
... | gpl-3.0 | -8,200,607,940,307,059,000 | 73.381356 | 300 | 0.681896 | false |
EqAfrica/machinekit | nosetests/test_netcmd.py | 1 | 3441 | #!/usr/bin/env python
from nose import with_setup
from machinekit.nosetests.realtime import setup_module,teardown_module
from machinekit.nosetests.support import fnear
from machinekit import hal
import os
def test_component_creation():
global c1,c2
c1 = hal.Component("c1")
c1.newpin("s32out", hal.HAL_S32... | lgpl-2.1 | -2,024,453,520,305,950,200 | 24.87218 | 99 | 0.610869 | false |
joke2k/faker | setup.py | 1 | 2446 | #!/usr/bin/env python
import os
from pathlib import Path
from setuptools import find_packages, setup
here = Path(__file__).resolve().parent
README = (here / 'README.rst').read_text(encoding='utf-8')
VERSION = (here / 'VERSION').read_text(encoding='utf-8').strip()
excluded_packages = ["docs", "tests", "tests.*"]
if... | mit | -2,308,311,519,361,657,300 | 34.449275 | 78 | 0.643908 | false |
daanwierstra/pybrain | pybrain/rl/learners/search/incrementalcomplexity/incrementalcomplexity.py | 1 | 1767 | __author__ = 'Tom Schaul, tom@idsia.ch'
# TODO: inheritance!
class IncrementalComplexitySearch(object):
""" Draft of an OOPS-inspired search that incrementally expands the search space
and the allocated time (to a population of search processes). """
def __init__(self, initSearchProcess, maxPhases =... | bsd-3-clause | 4,677,843,574,635,908,000 | 33.666667 | 99 | 0.578947 | false |
marteinn/wagtail-alt-generator | wagtailaltgenerator/tests/demosite/settings.py | 1 | 2042 | #!/usr/bin/env python
import os
DEBUG = False
TIME_ZONE = "Europe/Stockholm"
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}
SECRET_KEY = "not needed"
USE_TZ = True
LANGUAGE_CODE = "en"
INSTALLED_APPS = [
"django.contrib.contenttypes",
"django.contrib.auth",
"django.contrib.sites"... | mit | -7,871,863,058,548,776,000 | 27.760563 | 78 | 0.669931 | false |
jparicka/twitter-tools | profiles/models.py | 1 | 1328 | from django.db import models
from django.contrib.auth.models import User
from django.conf import settings
class Profile(models.Model):
user = models.OneToOneField(User)
name = models.CharField(max_length=100, blank=True, verbose_name="name", db_index=True)
headline = models.CharField(max_length=... | mit | -2,055,734,439,932,275,200 | 44.827586 | 100 | 0.730422 | false |
rcatwood/Savu | savu/data/data_structures/data_type.py | 1 | 4089 | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | gpl-3.0 | 2,109,054,481,640,022,500 | 33.361345 | 78 | 0.604304 | false |
pablolizardo/dotfiles | inkscape/symbols/generate.py | 1 | 1934 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
inkscapeSymbolGenerator: A inkscape symbol library generator
Copyright (C) 2015 Xavi Julián Olmos
See the file LICENSE for copying permission.
"""
import sys, os
import logging
from optparse import OptionParser
####Objetivo
#If select all merge all files... | gpl-2.0 | -4,980,966,128,883,437,000 | 31.2 | 84 | 0.623706 | false |
broxtronix/distributed | distributed/diagnostics/progress.py | 1 | 9766 | from __future__ import print_function, division, absolute_import
from collections import defaultdict
import logging
import sys
import threading
import time
from timeit import default_timer
import dask
from toolz import valmap, groupby, concat
from tornado.ioloop import PeriodicCallback, IOLoop
from tornado import gen... | bsd-3-clause | -4,504,122,622,001,199,000 | 32.331058 | 81 | 0.574135 | false |
iojancode/botija | plug.livolo.py | 1 | 1887 | import time
import sys
import RPi.GPIO as GPIO
off = '1242424352424342424242424242425342524342'
b0 = '12424243524243424242424242424242424242424242'
b1 = '124242435242434242424242424242534242424242'
b2 = '1242424352424342424242424242425353424242'
b3 = '124242435242434242424242424242424253424242'
b4 = '12424243524243424... | gpl-3.0 | -279,637,103,844,104,030 | 32.122807 | 66 | 0.606253 | false |
flipdazed/SoftwareDevelopment | common.py | 1 | 10121 | #!/usr/bin/env python
# encoding: utf-8
# contains the common actions
import random
from logs import *
class Card(object):
"""Creates the card objects used in game"""
def __init__(self, name, attack, money, cost, name_padding=15, num_padding=2):
self.name = name
self.cost = cost
self.... | gpl-3.0 | 8,199,571,315,852,250,000 | 35.021352 | 118 | 0.545993 | false |
tnagorra/nspell | lib/misc.py | 1 | 2396 | # cython: language_level=3
import re
class Mreplace:
def __init__(self, mydict):
self._mydict = mydict
self._rx = re.compile('|'.join(map(re.escape, self._mydict)))
def replace(self, text):
return self._rx.sub(lambda x: self._mydict[x.group(0)], text)
class Mmatch:
def __init__(s... | gpl-3.0 | 3,902,317,311,436,835,300 | 16.40458 | 70 | 0.348246 | false |
dkkline/CanSat14-15 | feeder/feeder.py | 1 | 3082 | """
Contains a tornado-based WebSocket server in charge of supplying
connected clients with live or replay data.
"""
import tornado.ioloop
import tornado.web
import tornado.websocket
from collections import deque
from pprint import pprint
import json
from .config import CACHE_SIZE, PORT, FREQUENCY
from groundstat... | mit | -8,494,810,209,948,938,000 | 21.661765 | 65 | 0.61843 | false |
panthorstudios/Gold-Rush | oldgame.py | 1 | 10225 | from random import random
from random import randint
import pygame
from pygame.locals import *
from miner import Miner
from explosion import Explosion
class Game(object):
TITLE = "Gold Rush!"
BOARD_LEFT = 20
BOARD_TOP = 130
SQUARE_SIZE = 32
BLACK = (0,0,0)
GREEN=(128,255,128)
YELLOW=(255,2... | mit | 4,087,435,778,622,428,000 | 32.52459 | 140 | 0.522836 | false |
mpatacchiola/dissecting-reinforcement-learning | src/6/multi-armed-bandit/boltzman_agent_bandit.py | 1 | 4551 | #!/usr/bin/env python
# MIT License
# Copyright (c) 2017 Massimiliano Patacchiola
# https://mpatacchiola.github.io/blog/
#
# 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... | mit | -6,810,992,298,096,698,000 | 42.342857 | 117 | 0.702044 | false |
oesteban/phantomas | phantomas/utils/shm.py | 1 | 6453 | """
This module contains an implementation of the real, antipodally symmetric
Spherical Harmonics basis as defined in [1]_.
References
----------
.. [1] Descoteaux, Maxime, Elaine Angelino, Shaun Fitzgibbons, and Rachid
Deriche. "Regularized, fast, and robust analytical Q-ball imaging"
Magnetic Resonance in Med... | bsd-3-clause | 8,120,573,029,460,389,000 | 23.819231 | 80 | 0.561444 | false |
sassoftware/mint | mint/db/mirror.py | 1 | 5677 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 | 475,335,617,005,576,450 | 34.93038 | 83 | 0.573014 | false |
ikben/troposphere | examples/Route53_RoundRobin.py | 1 | 1994 | # Converted from Route53_RoundRobin.template located at:
# http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
from troposphere import Join
from troposphere import Parameter, Ref, Template
from troposphere.route53 import RecordSet, RecordSetGroup
t = Template()
t.set_description(
"AWS CloudFormat... | bsd-2-clause | -3,320,936,269,870,272,000 | 35.254545 | 79 | 0.61334 | false |
cloudtools/troposphere | troposphere/applicationautoscaling.py | 1 | 3322 | from . import AWSObject, AWSProperty
from .validators import boolean, double, integer, positive_integer
class ScalableTargetAction(AWSProperty):
props = {
"MaxCapacity": (integer, False),
"MinCapacity": (integer, False),
}
class ScheduledAction(AWSProperty):
props = {
"EndTime": ... | bsd-2-clause | -1,866,505,902,557,993,200 | 27.393162 | 80 | 0.617399 | false |
eddiejessup/nex | tests/test_lexer.py | 1 | 4285 | from nex.constants.codes import CatCode
from nex.accessors import Codes
from nex.lexer import Lexer
class DummyCatCodeGetter:
def __init__(self):
self.char_to_cat = Codes.default_initial_cat_codes()
def get(self, char):
return self.char_to_cat[char]
def lex_string_to_tokens(s):
cat_cod... | mit | 1,767,900,020,284,159,700 | 37.258929 | 79 | 0.633372 | false |
sportorg/pysport | sportorg/modules/winorient/winorient_server.py | 1 | 2292 | import datetime
from socket import *
from sportorg.utils.time import time_to_hhmmss
"""
Format of WDB data package
- length is 1772 bytes
1) 36b text block at the beginning
2 4132500 0 0 3974600\n
bib - finish_time - disqual_status - 0 - start_time
2) binary part
bytes 128-131 - card number
by... | gpl-3.0 | -1,973,854,375,864,043,800 | 23.126316 | 82 | 0.585951 | false |
alonsebastian/SocialID | urls.py | 1 | 1921 | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^accounts/login/$', 'accounts.views.customLogin'),
(r'^accounts/logou... | gpl-2.0 | -2,820,156,707,820,315,600 | 41.688889 | 127 | 0.652264 | false |
copelco/Durham-Open-Data-Catalog | fabfile.py | 1 | 9452 | import ConfigParser
import os
import re
import yaml
from argyle import rabbitmq, postgres, nginx, system
from argyle.base import upload_template
from argyle.postgres import create_db_user, create_db
from argyle.supervisor import supervisor_command, upload_supervisor_app_conf
from argyle.system import service_command, ... | mit | -3,924,229,454,974,821,400 | 34.400749 | 457 | 0.653407 | false |
googleapis/python-compute | google/cloud/compute_v1/services/target_pools/pagers.py | 1 | 5656 | # -*- 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... | apache-2.0 | -9,127,447,600,097,576,000 | 35.727273 | 85 | 0.650813 | false |
keyme/visual-diff | gui.py | 1 | 4290 | #!/usr/bin/python3
from functools import partial
from math import ceil
import tkinter as tk
from zoom_map import ZoomMap
class _Context(tk.Text):
CONTEXT_COUNT = 3 # Lines to display before/after the current one
# TODO: What about files with over 99,999 lines?
LINE_NUMBER_WIDTH = 5 # Number of charact... | gpl-3.0 | -6,514,295,874,511,223,000 | 39.471698 | 80 | 0.571329 | false |
salexkidd/restframework-definable-serializer | definable_serializer/tests/for_test/migrations/0001_initial.py | 1 | 1872 | # Generated by Django 2.0 on 2017-12-04 00:09
import definable_serializer.models.compat
import definable_serializer.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [... | mit | 4,701,542,029,549,797,000 | 33.036364 | 114 | 0.573184 | false |
kamar42/merdeka-backend | merdeka/apps/mdk/views.py | 1 | 2179 | from django.shortcuts import render
from merdeka.apps.utils.func import find_model, make_response, json_response, jsonify, set_data, set_status, set_message, set_child
from .models import GoodsChilds
def api_view(request, **kwargs):
resp = make_response()
m = kwargs.get('model', None)
# drop if model is e... | mit | 2,338,286,988,612,638,700 | 29.690141 | 131 | 0.535108 | false |
DigitalCampus/django-oppia | tests/profile/models/test_models.py | 1 | 9519 | from django.core.exceptions import ValidationError
from django.db.utils import IntegrityError
from oppia.test import OppiaTestCase
from profile.models import UserProfile, CustomField, UserProfileCustomField
class ProfileCustomFieldsTest(OppiaTestCase):
fixtures = ['tests/test_user.json',
'tests/t... | gpl-3.0 | 2,434,349,495,123,271,000 | 35.193916 | 76 | 0.542809 | false |
ingydotnet/crockford-py | package/info.py | 1 | 1307 | def get():
info = {}
info.update(
{ 'author': 'Ingy dot Net',
'author_email': 'ingy@ingy.net',
'classifiers': [ 'Development Status :: 2 - Pre-Alpha',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Intended Audience :: De... | bsd-2-clause | -5,694,820,867,209,967,000 | 71.611111 | 722 | 0.604438 | false |
matrix-org/synapse | synapse/config/voip.py | 1 | 2161 | # Copyright 2014-2016 OpenMarket Ltd
#
# 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 w... | apache-2.0 | -7,243,922,222,192,386,000 | 35.016667 | 81 | 0.652938 | false |
NoumirPoutipou/oanq | conftest.py | 1 | 1596 | import pytest
from django.test import signals
from django.test.client import Client
from django.contrib.auth.models import User, Permission
from jinja2 import Template as Jinja2Template
## Wait for https://code.djangoproject.com/ticket/24622
ORIGINAL_JINJA2_RENDERER = Jinja2Template.render
def instrumented_render... | bsd-3-clause | 3,876,775,477,568,365,600 | 26.050847 | 78 | 0.701754 | false |
zozo123/buildbot | master/buildbot/status/client.py | 1 | 1078 | # 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... | gpl-3.0 | 5,875,943,680,776,824,000 | 40.461538 | 79 | 0.747681 | false |
Aquafina-water-bottle/Command-Compiler-Unlimited | test_fena/v1_13/test_teams.py | 1 | 1532 | from test_fena.test_common import test_cmd
def test_teams():
test_cmd("team add _team team_test", "team add fena.team team_test")
test_cmd("team add _team team test", "team add fena.team team test")
test_cmd("team empty _team", "team empty fena.team")
test_cmd("team _team + @a", "team ... | mit | -1,500,593,524,616,907,500 | 71.952381 | 135 | 0.649478 | false |
appleseedhq/gaffer | python/GafferArnoldTest/__init__.py | 1 | 2815 | ##########################################################################
#
# Copyright (c) 2012, John Haddon. 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 so... | bsd-3-clause | -7,469,409,601,125,669,000 | 46.711864 | 77 | 0.759858 | false |
cognitivefashion/cf-sdk-python | dominant_colors_product.py | 1 | 1998 | #------------------------------------------------------------------------------
# Get the dominant colors for an image in the catalog.
# GET /v1/catalog/{catalog_name}/dominant_colors/{id}/{image_id}
#------------------------------------------------------------------------------
import os
import json
import requests
f... | apache-2.0 | -561,431,765,489,356,350 | 31.754098 | 101 | 0.544044 | false |
esthermm/enco | enco_category/models/purchase_report.py | 1 | 4459 | # -*- coding: utf-8 -*-
# © 2017 Esther Martín - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import fields, models
from openerp import tools
class PurchaseReport(models.Model):
_inherit = 'purchase.report'
purchase_categ_id = fields.Many2one(
comodel_name=... | gpl-3.0 | 3,419,847,582,266,955,300 | 46.414894 | 163 | 0.475656 | false |
DailyActie/Surrogate-Model | 01-codes/scipy-master/scipy/linalg/tests/test_matfuncs.py | 1 | 33360 | #!/usr/bin/env python
#
# Created by: Pearu Peterson, March 2002
#
""" Test functions for linalg.matfuncs module
"""
from __future__ import division, print_function, absolute_import
import functools
import random
import warnings
import numpy as np
import scipy.linalg
import scipy.linalg._expm_frechet
from numpy impo... | mit | -4,768,763,057,479,168,000 | 39.387409 | 91 | 0.523891 | false |
oubiwann/myriad-worlds | myriad/story.py | 1 | 3923 | import yaml
from myriad.character import Player
from myriad.world import Map, World
from myriad.item import Item, OpenableItem, OpenableReadableItem, ReadableItem
# XXX maybe the story object should have a map attribute assigned based on
# story type... e.g., provided ASCII map, procedurally generated map, etc.
clas... | mit | -3,348,018,576,291,918,000 | 35.663551 | 78 | 0.604384 | false |
xflows/clowdflows-backend | workflows/api/serializers.py | 1 | 14887 | import json
from django.contrib.auth.models import User
from django.db.models import Prefetch
from django.template.loader import render_to_string
from rest_framework import serializers
from rest_framework.reverse import reverse
from mothra.settings import STATIC_URL, MEDIA_URL
from streams.models import Stream
from w... | mit | 7,936,824,907,788,334,000 | 34.70024 | 160 | 0.623363 | false |
8l/beri | cheritest/trunk/tests/fpu/test_raw_fpu_mov_gpr.py | 1 | 2722 | #-
# Copyright (c) 2012 Ben Thorner
# Copyright (c) 2013 Colin Rothwell
# All rights reserved.
#
# This software was developed by Ben Thorner as part of his summer internship
# and Colin Rothwell as part of his final year undergraduate project.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BERI Open Systems C.I.C. (... | apache-2.0 | -1,509,914,363,786,523,100 | 56.914894 | 127 | 0.754225 | false |
ai-se/george | Models/usp05.py | 1 | 7552 | """
# The USP05 Data Set
Standard header:
"""
from __future__ import division,print_function
import sys
sys.dont_write_bytecode = True
from lib import *
"""
@attribute ObjType {FT,PJ,RQ}
@attribute IntComplx {5.0,2.0,1.0,4.0,3.0,3.5,2.5,4.5,NULL}
@attribute DataFile {18.0,9.0,7.0,12.0,2.0,5.0,4.0,3.0,1.0,11.0,0.0,75... | mit | -1,131,610,790,422,415,400 | 28.73622 | 366 | 0.431674 | false |
V-FEXrt/Pokemon-Spoof-Plus | CableClub/cable_club_trade_center.py | 1 | 1950 | from AI.team_manager import TeamManager
from cable_club_constants import TradeCenterState, Com
def reset():
global tradeCenterState, counter, eat_byte, ate_byte, choice_byte
tradeCenterState = TradeCenterState.CHOOSING_TRADE
counter = 416
eat_byte = False
ate_byte = 0x0
choice_byte = 0
reset()... | mit | -6,544,293,436,902,257,000 | 25.712329 | 96 | 0.638974 | false |
crs4/omero.biobank | test/kb/test_individual.py | 1 | 2096 | # BEGIN_COPYRIGHT
# END_COPYRIGHT
import os, unittest, logging
logging.basicConfig(level=logging.ERROR)
from bl.vl.kb import KnowledgeBase as KB
from kb_object_creator import KBObjectCreator
OME_HOST = os.getenv("OME_HOST", "localhost")
OME_USER = os.getenv("OME_USER", "root")
OME_PASS = os.getenv("OME_PASS", "rome... | gpl-2.0 | -3,798,257,073,794,676,700 | 25.871795 | 76 | 0.640744 | false |
wger-project/wger | wger/exercises/tests/test_categories.py | 1 | 3817 | # This file is part of wger Workout Manager.
#
# wger Workout Manager 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.
#
# wger W... | agpl-3.0 | 3,603,420,777,804,712,400 | 27.066176 | 95 | 0.681163 | false |
rgayon/plaso | plaso/winnt/known_folder_ids.py | 1 | 17463 | # -*- coding: utf-8 -*-
"""This file contains the Windows NT Known Folder identifier definitions."""
from __future__ import unicode_literals
# For now ignore the line too long errors.
# pylint: disable=line-too-long
# For now copied from:
# https://code.google.com/p/libfwsi/wiki/KnownFolderIdentifiers
# TODO: stor... | apache-2.0 | -3,370,271,264,363,562,000 | 66.949416 | 135 | 0.721354 | false |
ke4roh/RPiNWR | tests/test_cache.py | 1 | 16156 | # -*- coding: utf-8 -*-
__author__ = 'ke4roh'
# Copyright © 2016 James E. Scarborough
#
# 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... | gpl-3.0 | -4,261,380,227,254,868,500 | 29.538752 | 151 | 0.492603 | false |
philanthropy-u/edx-platform | pavelib/prereqs.py | 1 | 11951 | """
Install Python and Node prerequisites.
"""
from __future__ import print_function
import hashlib
import os
import re
import sys
import subprocess
import io
from distutils import sysconfig
from paver.easy import BuildFailure, sh, task
from .utils.envs import Env
from .utils.timer import timed
PREREQS_STATE_DIR = ... | agpl-3.0 | 451,403,621,817,372,500 | 32.759887 | 114 | 0.643293 | false |
shirishgoyal/rational_crowd | config/urls.py | 1 | 1607 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
from r... | mit | -2,009,427,574,063,761,700 | 43.638889 | 110 | 0.63659 | false |
RedHatQE/cfme_tests | cfme/automate/dialogs/dialog_tab.py | 1 | 2309 | import attr
from navmazing import NavigateToAttribute
from widgetastic.widget import Text
from . import AddTabView
from . import TabForm
from .dialog_box import BoxCollection
from cfme.modeling.base import BaseCollection
from cfme.modeling.base import BaseEntity
from cfme.modeling.base import parent_of_type
from cfme.... | gpl-2.0 | -5,686,583,473,684,868,000 | 25.848837 | 91 | 0.673452 | false |
pyspace/test | pySPACE/missions/nodes/meta/same_input_layer.py | 1 | 22715 | """ Combine several other nodes together in parallel
This is useful to be combined with the
:class:`~pySPACE.missions.nodes.meta.flow_node.FlowNode`.
"""
import numpy
from pySPACE.environments.chains.node_chain import NodeChainFactory
from pySPACE.missions.nodes.base_node import BaseNode
from pySPACE.resources.data_... | gpl-3.0 | 4,007,869,671,616,826,000 | 41.22119 | 109 | 0.547215 | false |
googleapis/python-game-servers | google/cloud/gaming_v1/services/realms_service/async_client.py | 1 | 28046 | # -*- 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... | apache-2.0 | -6,299,150,042,904,482,000 | 38.894737 | 171 | 0.606111 | false |
dgzzhb/GAOthello | board.py | 1 | 10425 | #!/usr/bin/env python
""" game.py Humberto Henrique Campos Pinheiro
Game logic.
"""
from config import WHITE, BLACK, EMPTY
from copy import deepcopy
class Board:
""" Rules of the game """
def __init__ ( self ):
self.board = [ [0,0,0,0,0,0,0,0], \
[0,0,0,0... | mit | -6,171,274,448,251,786,000 | 31.578125 | 100 | 0.424077 | false |
sbg/Mitty | mitty/simulation/sequencing/syntheticsequencer.py | 1 | 1955 | """A fully synthetic read model that allows us to produce single end or paired end reads with arbitrary
read and template lengths. It's read model format is as follows
{
'model_class': 'illumina',
'model_description': '',
'paired': True/False,
'read_length': 100,
'mean_template_length': 300,
'std_template_... | apache-2.0 | 9,079,642,919,832,840,000 | 31.04918 | 103 | 0.623018 | false |
CNS-OIST/STEPS_Example | publication_models/API_1/Anwar_J Neurosci_2013/extra/constants_hh.py | 1 | 2809 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Okinawa Institute of Science and Technology, Japan.
#
# This script runs on STEPS 2.x http://steps.sourceforge.net
#
# H Anwar, I Hepburn, H Nedelescu, W Chen and E De Schutter
# Stochastic calcium mechanisms cause dendritic calcium spike... | gpl-2.0 | 7,726,932,273,181,009,000 | 22.805085 | 77 | 0.533286 | false |
ContinuumIO/ashiba | enaml/enaml/widgets/datetime_selector.py | 1 | 2100 | #------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------------------------------------------------... | bsd-3-clause | -5,191,797,719,013,015,000 | 34.59322 | 79 | 0.605714 | false |
CuteLemon/Learn | NewsAPI_Scraper/db_operation.py | 1 | 1050 | import pymongo as Mongo
DB_NAME = 'localhost'
DB_PORT = 27017
TEST_JSON = {'url':'http://hello.com','content':'Lemon Tree'}
class DB():
def __init__(self,db,port):
self.client = Mongo.MongoClient(db,port)
self.db = self.client.test
self.collect = self.db.test_collect
def insert(sel... | gpl-3.0 | -5,302,895,376,558,269,000 | 22.333333 | 61 | 0.592381 | false |
bbondy/brianbondy.gae | libs/werkzeug/testsuite/contrib/cache.py | 1 | 5814 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.cache
~~~~~~~~~~~~~~~~~~~~~~~~
Tests the cache system
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import time
import unittest
import tempfile
import shutil
from werkzeug.testsuite import Werkzeug... | mit | 1,778,556,580,544,685,600 | 28.21608 | 91 | 0.576367 | false |
jimgong92/allezViens | connect.py | 1 | 8842 | from models import *
from run import db
import sys
import math
import hashlib
import time
from communication import sendPickNotificationEmail
'''DATABASE INSERTION/UPDATE'''
#Adds driver to database
def addDriver(id, alias, oLat, oLon, dLat, dLon, date):
url = makeURL(id)
driver = Driver(id, alias, oLat, oLon, dLa... | mit | 5,327,332,219,861,663,000 | 27.990164 | 146 | 0.708776 | false |
aldebaran/qibuild | python/qibuild/test/projects/usefoopymodule/test.py | 1 | 1167 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
This is an equivalent of a C++ program trying to load a
Python module using libqi, but written in Python.
"""
from __fu... | bsd-3-clause | -454,405,756,292,281,000 | 29.710526 | 84 | 0.615253 | false |
MikeDacre/fyrd | fyrd/job.py | 1 | 56470 | # -*- coding: utf-8 -*-
"""
Class and methods to handle Job submission.
This module only defines a single object: the Job class.
"""
import os as _os
import sys as _sys
from uuid import uuid4 as _uuid
from time import sleep as _sleep
from datetime import datetime as _dt
from traceback import print_tb as _tb
# Try to... | mit | 1,620,173,737,660,842,800 | 34.249688 | 79 | 0.518399 | false |
hagabbar/pycbc_copy | pycbc/io/hdf.py | 1 | 31952 | # convenience classes for accessing hdf5 trigger files
# the 'get_column()' method is implemented parallel to
# the existing pylal.SnglInspiralUtils functions
import h5py
import numpy as np
import logging
import inspect
from lal import LIGOTimeGPS, YRJUL_SI
from pycbc_glue.ligolw import ligolw
from pycbc_glue.ligol... | gpl-3.0 | -1,520,289,452,508,774,400 | 35.981481 | 93 | 0.559339 | false |
zbyte64/django-dockitcms | dockitcms/widgetblock/fields.py | 1 | 1521 | from django import forms
from dockit import schema
from dockitcms.fields import BaseFieldEntry, ListFieldMixin
from dockitcms.widgetblock.models import Widget
class WidgetField(BaseFieldEntry):
field_class = schema.SchemaField
def get_field_kwargs(self):
kwargs = dict(super(WidgetField, self).... | bsd-3-clause | 1,446,314,102,255,688,400 | 28.823529 | 99 | 0.687048 | false |
mhrivnak/pulp | client_lib/pulp/client/launcher.py | 1 | 8499 | """
Entry point for both the admin and consumer clients. The config file location
is passed in and its contents are used to drive the rest of the client execution.
"""
import errno
from gettext import gettext as _
import logging
import logging.handlers
from optparse import OptionParser
import os
import stat
import sys... | gpl-2.0 | -3,902,464,655,006,538,000 | 35.952174 | 100 | 0.649488 | false |
BackupTheBerlios/espressopp | examples/hadress/hadressFEC/hadressDensityFEC.py | 1 | 8414 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# relevant imports
import sys
import time
import espresso
import mpi4py.MPI as MPI
import Tetracryst # Preparation of tetrahedral crystal and constuctions of bonds in tetrahedral liquid
from espresso import Real3D, Int3D
from espresso.tools import decomp
from espresso.to... | gpl-3.0 | 402,461,459,966,892,200 | 32.388889 | 122 | 0.686475 | false |
Rudd-O/cloud-tool | cloudapis/cloud.py | 1 | 2976 | '''Implements the Cloud.com API'''
from cloudtool.utils import describe
import urllib
import urllib2
import os
import xml.dom.minidom
class CloudAPI:
@describe("server", "Management Server host name or address")
@describe("responseformat", "Response format: xml or json")
def __init__(self,
server="127.0.0... | gpl-3.0 | -2,088,494,372,221,547,500 | 25.336283 | 79 | 0.673387 | false |
99cloud/keystone_register | openstack_dashboard/api/nova.py | 1 | 18812 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Openstack, LLC
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eB... | apache-2.0 | 3,814,561,238,036,676,000 | 32.895495 | 79 | 0.633638 | false |
VcamX/grpc | src/python/grpcio/tests/unit/framework/common/test_control.py | 1 | 3314 | # Copyright 2015-2016, Google Inc.
# 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 conditions and ... | bsd-3-clause | 1,660,540,332,937,331,200 | 33.884211 | 76 | 0.737477 | false |
hychen/boliau | boliau/plugins/lp_cli/actionlib.py | 1 | 6379 | #!/usr/bin/env python
# -*- coding: utf-8 -*
#
# File: lp_cli.py
#
# Copyright (C) 2012 Hsin-Yi Chen (hychen)
# Author(s): Hsin-Yi Chen (hychen) <ossug.hychen@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software... | mit | 4,258,922,284,468,343,000 | 33.112299 | 77 | 0.521555 | false |
atiro/nikola | nikola/plugins/compile/ipynb.py | 1 | 6893 | # -*- coding: utf-8 -*-
# Copyright © 2013-2016 Damián Avila, Chris Warrick and others.
# 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
#... | mit | -6,981,850,663,584,074,000 | 39.040698 | 114 | 0.623203 | false |
rangertaha/salt-manager | salt-manager/webapp/apps/management/commands/bshell.py | 1 | 3463 | #!/usr/bin/env python
"""
"""
import os
from optparse import make_option
from django.core.management.base import NoArgsCommand
def starting_imports():
from django.db.models.loading import get_models
for m in get_models():
exec "from %s import %s" % (m.__module__, m.__name__)
from datetime import ... | mit | -6,263,867,662,607,562,000 | 34.336735 | 92 | 0.6324 | false |
nall/pythonista-tradervue | utils.py | 1 | 5565 | # vim: ft=python tabstop=2 shiftwidth=2 expandtab
# Copyright (c) 2015, Jon Nall
# 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 copyrig... | bsd-3-clause | -2,197,524,809,621,453,300 | 32.727273 | 94 | 0.669003 | false |
smcoll/stormpath-django | django_stormpath/social.py | 1 | 7183 | from django.contrib.auth import login as django_login
from django.shortcuts import resolve_url
from django.core.urlresolvers import reverse
from django.conf import settings
from stormpath.error import Error as StormpathError
from stormpath.resources.provider import Provider
from requests_oauthlib import OAuth2Session... | apache-2.0 | 732,327,008,245,947,000 | 38.905556 | 92 | 0.655019 | false |
jakirkham/lazyflow | lazyflow/operators/opFeatureMatrixCache.py | 1 | 12534 | from functools import partial
import logging
logger = logging.getLogger(__name__)
import numpy
from lazyflow.graph import Operator, InputSlot, OutputSlot
from lazyflow.request import RequestLock, Request, RequestPool
from lazyflow.utility import OrderedSignal
from lazyflow.roi import getBlockBounds, getIntersectingBl... | lgpl-3.0 | -5,391,571,419,154,124,000 | 47.211538 | 130 | 0.631961 | false |
hoaibang07/Webscrap | transcripture/sources/crawler_data.py | 1 | 2804 | # -*- encoding: utf-8 -*-
import io
from bs4 import BeautifulSoup
from bs4 import SoupStrainer
import urllib2
import urlparse
def _remove_div_vdx(soup):
for div in soup.find_all('div', class_='vidx'):
div.extract()
return soup
def get_data(urlchuong_list, i):
filename = 'urlsach/data/sach' + str... | gpl-2.0 | 4,626,698,484,316,223,000 | 34.506329 | 280 | 0.557418 | false |
maheshp/novatest | nova/virt/xenapi/vmops.py | 1 | 74575 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | apache-2.0 | -5,872,085,318,642,051,000 | 41.73639 | 79 | 0.55996 | false |
sullivat/Markov-Twitter-Bot | src/mybot.test.py | 1 | 1257 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime as dt
import logging
import time
import tweepy
from tweet_builder import *
from credentials import *
# Housekeeping: do not edit
logging.basicConfig(filename='tweet_test.log', level=logging.DEBUG)
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRE... | bsd-2-clause | -7,918,807,360,116,483,000 | 22.277778 | 83 | 0.61973 | false |
alphagov/notifications-api | migrations/versions/0151_refactor_letter_rates.py | 1 | 3140 | """
Revision ID: 0151_refactor_letter_rates
Revises: 0150_another_letter_org
Create Date: 2017-12-05 10:24:41.232128
"""
import uuid
from datetime import datetime
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
revision = '0151_refactor_letter_rates'
down_revision = '0150_a... | mit | 8,390,699,011,551,367,000 | 43.225352 | 105 | 0.576433 | false |
jpscaletti/rev-assets | rev_assets/__init__.py | 1 | 1570 | """
===========================
RevAssets
===========================
Makes possible for python web apps to work with hashed static assets
generated by other tools like Gulp or Webpack.
It does so by reading the manifest generated by the revision tool.
"""
import json
import io
__version__ = '1.0.3'
class AssetN... | bsd-3-clause | -7,948,017,020,570,609,000 | 25.166667 | 71 | 0.576433 | false |
Python1320/icmpviewer | main.py | 1 | 1217 | #!/usr/bin/env python2
QUEUE_NUM = 5
#hush verbosity
import logging
l=logging.getLogger("scapy.runtime")
l.setLevel(49)
import os,sys,time
from sys import stdout as out
import nfqueue,socket
from scapy.all import *
import GeoIP
gi = GeoIP.open("GeoLiteCity.dat",GeoIP.GEOIP_STANDARD)
lastip=""
def DoGeoIP(pkt):
gl... | unlicense | 3,581,285,116,070,015,000 | 15.226667 | 55 | 0.653246 | false |
mhabib1981/pySecn00b | zap_xml_parse.py | 1 | 2159 | from xml.dom.minidom import parse
import xml.dom.minidom
import sys
import csv
#uni_file=open(sys.argv[1],'r')
#non_uni_file=uni_file.decode("utf8")
dom_tree=parse(sys.argv[1])
collect=dom_tree.documentElement
output_data=[[],[],[],[],[],[],[],[]]
out_filename=((sys.argv[1].split("/")[-1]).split(".")[0])+".csv"
out_fi... | cc0-1.0 | -1,634,140,350,638,111,200 | 22.467391 | 76 | 0.695692 | false |
bedder/gifbot | test/test_gif_bot.py | 1 | 7000 |
# MIT License
#
# Copyright (c) 2018 Matthew Bedder (matthew@bedder.co.uk)
#
# 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... | mit | 5,020,034,094,223,202,000 | 34.897436 | 95 | 0.591143 | false |
google/fedjax | fedjax/models/stackoverflow.py | 1 | 5453 | # Copyright 2021 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 agreed to in writing, ... | apache-2.0 | -2,779,023,789,321,949,700 | 37.935714 | 80 | 0.652174 | false |
lglenat/whmnet | RaspberryPi/readGateway.py | 1 | 12588 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
readGateway.py script
=====================
This script is used in the whmnet project to receive data from the
wireless network gateway and send it to a custom server on the web.
This script is run on a Raspberry Pi, connected to the Gateway
throu... | gpl-3.0 | 5,445,676,795,377,608,000 | 36.011765 | 116 | 0.516052 | false |
ISRyuu/ISNNTF | test.py | 1 | 3957 | import numpy as np
def iou(box_1, box_2):
box_1_ulx = box_1[0] - box_1[2] * 0.5
box_1_uly = box_1[1] - box_1[3] * 0.5
box_1_lrx = box_1[0] + box_1[2] * 0.5
box_1_lry = box_1[1] + box_1[3] * 0.5
box_2_ulx = box_2[0] - box_2[2] * 0.5
box_2_uly = box_2[1] - box_2[3] * 0.5
box_2_lrx = box_2[... | bsd-3-clause | 5,585,448,979,678,535,000 | 37.048077 | 87 | 0.581248 | false |
canaryhealth/nlu_trainer | nlu_trainer/util.py | 1 | 1186 | # -*- coding: utf-8 -*-
import re
def phrase_index(sentence, phrase):
'''
Returns the start and end index of phrase (first instance) if it exists in
sentence.
ex: >>> phrase_index('the quick brown fox jumps over the lazy dog',
'brown fox jumps')
(10, 24)
'''
phrase = str... | mit | -3,836,816,383,660,354,000 | 27.926829 | 79 | 0.598651 | false |
dprog-philippe-docourt/django-qr-code | setup.py | 1 | 1589 | import re
from setuptools import setup
# Get version without importing
with open('qr_code/__init__.py', 'rb') as f:
VERSION = str(re.search('__version__ = \'(.+?)\'', f.read().decode('utf-8')).group(1))
setup(
name='django-qr-code',
version=VERSION,
packages=['qr_code', 'qr_code.qrcode', 'qr_code.tem... | bsd-3-clause | 7,363,241,608,391,071,000 | 37.756098 | 136 | 0.642542 | false |
PyPlanet/PyPlanet | pyplanet/conf/backends/python.py | 1 | 1598 | import importlib
import os
from pyplanet.conf.backends.base import ConfigBackend
from pyplanet.core.exceptions import ImproperlyConfigured
class PythonConfigBackend(ConfigBackend):
name = 'python'
def __init__(self, **options):
super().__init__(**options)
self.module = None
def load(self):
# Make sure we... | gpl-3.0 | 1,730,560,987,640,634,400 | 29.730769 | 113 | 0.72403 | false |
keis/smoke | tests/test_mixed.py | 1 | 1963 | import pytest
import mock
from hamcrest import assert_that
from matchmock import called_once_with
from smoke import signal, Broker
class Source(object):
spam = signal()
egg = signal(name='egg')
class Mixed(Source, Broker):
pass
@pytest.fixture
def listener():
return mock.Mock()
@pytest.fixture
d... | mit | 5,439,008,101,361,624,000 | 24.828947 | 75 | 0.720835 | false |
laginimaineb/android_fde_bruteforce | structures.py | 1 | 2262 | import struct
from StringIO import StringIO
#The crypt_mnt_ftr structure - see /system/vold/cryptfs.h
CRYPT_MNT_FTR = [('magic' , 'I'),
('major_version' , 'H'),
('minor_version' , 'H'),
('ftr_size' , 'I'),
('flags' , 'I'),
... | gpl-2.0 | 1,956,154,337,582,137,300 | 36.081967 | 79 | 0.438992 | false |
windweaver828/kspeech | commandtools.py | 1 | 1026 | #!/usr/bin/env python
def isCommand(command, args):
index = 0
for arg in args:
if isinstance(arg, list):
for ar in arg:
if isinstance(ar, list):
for a in ar:
if isinstance(a, list):
index-=1
... | gpl-2.0 | 3,961,388,683,577,054,700 | 24.65 | 49 | 0.477583 | false |
snakecon/AI_Lab | spider/book/book/pipelines.py | 1 | 4704 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib
import book.database as db
from scrapy import Request
from scrapy.utils.misc import arg_to_iter
from twisted.internet.defer import DeferredList
from scrapy.pipelines.images import ImagesPipeline
from book.items import Subject, Meta, Comment
class BookPipe... | apache-2.0 | 2,729,605,431,872,991,000 | 32.361702 | 88 | 0.540816 | false |
elkingtonmcb/bcbio-nextgen | bcbio/variation/validateplot.py | 1 | 15359 | """Plot validation results from variant calling comparisons.
Handles data normalization and plotting, emphasizing comparisons on methodology
differences.
"""
import collections
import os
import numpy as np
import pandas as pd
try:
import matplotlib as mpl
mpl.use('Agg', force=True)
import matplotlib.pypl... | mit | -1,548,195,915,837,181,700 | 40.736413 | 115 | 0.573996 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/modules/dnsutil.py | 1 | 11113 | # -*- coding: utf-8 -*-
'''
Compendium of generic DNS utilities
'''
from __future__ import absolute_import
# Import salt libs
import salt.utils
import socket
# Import python libs
import logging
import time
log = logging.getLogger(__name__)
def __virtual__():
'''
Generic, should work on any platform (includ... | apache-2.0 | -4,666,205,067,642,195,000 | 27.494872 | 116 | 0.579052 | false |
shiburizu/py2discord | py2discord.py | 1 | 8389 | import discord
import sqlite3 as sql
import logging
import cleverbot
import random
logging.basicConfig(level=logging.INFO)
import urllib3.contrib.pyopenssl
urllib3.contrib.pyopenssl.inject_into_urllib3()
from apiclient.discovery import build
import apiclient.errors
# Please refer to the README to find where you should ... | isc | -2,526,754,386,635,023,000 | 35.004292 | 133 | 0.635713 | false |
LMSlay/wiper | modules/clamav.py | 1 | 2875 | # This file is part of Viper - https://github.com/botherder/viper
# See the file 'LICENSE' for copying permission.
import getopt
try:
import pyclamd
HAVE_CLAMD = True
except ImportError:
HAVE_CLAMD = False
from viper.common.out import *
from viper.common.abstracts import Module
from viper.core.session im... | bsd-3-clause | -1,005,792,964,719,011,700 | 29.913978 | 95 | 0.510957 | false |
vmendez/DIRAC | Resources/Storage/StorageElement.py | 1 | 35478 | """ This is the StorageElement class.
"""
from types import ListType
__RCSID__ = "$Id$"
# # custom duty
import re
import time
import datetime
import copy
import errno
# # from DIRAC
from DIRAC import gLogger, gConfig, siteName
from DIRAC.Core.Utilities import DErrno, DError
from DIRAC.Core.Utilities.ReturnValues impor... | gpl-3.0 | 3,227,499,265,825,615,000 | 40.34965 | 141 | 0.621681 | false |
lukasmartinelli/py14 | py14/scope.py | 1 | 2384 | import ast
from contextlib import contextmanager
def add_scope_context(node):
"""Provide to scope context to all nodes"""
return ScopeTransformer().visit(node)
class ScopeMixin(object):
"""
Adds a scope property with the current scope (function, module)
a node is part of.
"""
scopes = []... | mit | 1,515,808,432,834,027,300 | 28.432099 | 74 | 0.570889 | false |
deter-project/magi | magi/tests/023_multicastNetworkTestServer.py | 1 | 1888 | #!/usr/bin/env python
import unittest2
import logging
import time
from magi.messaging.magimessage import MAGIMessage
from magi.messaging.transportMulticast import MulticastTransport
from magi.testbed import testbed
from magi.messaging.api import Messenger
class TransportTest(unittest2.TestCase):
"""
Testing of b... | gpl-2.0 | -2,350,573,303,916,748,000 | 29.95082 | 110 | 0.723517 | false |
faroit/loudness | python/tests/test_FrameGenerator.py | 1 | 1471 | import numpy as np
import loudness as ln
fs = 32000
N = 10000
x = np.arange(0, N)
# Input SignalBank
bufSize = 32
nEars = 2
nChannels = 1
inputBank = ln.SignalBank()
inputBank.initialize(nEars, nChannels, bufSize, int(fs))
# Frame generator
frameSize = 2048
hopSize = 32
startAtWindowCentre = True
frameGen = ln.Frame... | gpl-3.0 | -7,065,117,697,718,872,000 | 25.745455 | 82 | 0.674371 | false |
robinkraft/cloudless | src/cloudless/train/predict.py | 1 | 7335 | import os
import caffe
import numpy as np
import plyvel
import skimage
from caffe_pb2 import Datum
import constants
def predict(image_path):
"""
Takes a single image, and makes a prediction whether it has a cloud or not.
"""
print "Generating prediction for %s..." % image_path
net, transformer ... | apache-2.0 | -1,540,303,570,774,137,900 | 33.763033 | 96 | 0.647307 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.