code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license <https://opensource.org/licenses/BSD-3-Clause> """ import unittest import logging from cameo.spiderForTECHORANGE import SpiderForTECHORANGE """ 測試 抓取 TECHORANGE """ class SpiderFor...
muchu1983/104_cameo
test/unit/test_spiderForTECHORANGE.py
Python
bsd-3-clause
1,235
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """ This scripts is a script to use to install dependencies of programs """ from abc import abstractmethod, ABCMeta import logging import platform import subprocess from lib.helper import launch_and_log_as_root from lib.exceptions import DistributionNotSupportedExceptio...
dslab-epfl/bugbase
lib/installer/dependency_installer.py
Python
bsd-3-clause
4,885
from __future__ import print_function from __future__ import absolute_import # System modules import os # Third-party modules # LLDB modules import lldb from .lldbtest import * from . import configuration from . import lldbutil from .decorators import * def source_type(filename): _, extension = os.path.splitex...
youtube/cobalt
third_party/llvm-project/lldb/packages/Python/lldbsuite/test/lldbinline.py
Python
bsd-3-clause
7,168
# proxy module from traitsui.editors.boolean_editor import *
enthought/etsproxy
enthought/traits/ui/editors/boolean_editor.py
Python
bsd-3-clause
61
from setuptools import setup __version__ = '0.5.0' setup(name='pql', version=__version__, description='A python expression to MongoDB query translator', author='Alon Horev', author_email='alon@horev.net', url='https://github.com/alonho/pql', classifiers = ["Development Status :: 3 ...
alonho/pql
setup.py
Python
bsd-3-clause
929
# 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 a...
madhurrajn/samashthi
mysite/settings.py
Python
bsd-3-clause
4,756
import matplotlib.pyplot as plt import numpy as np from sys import argv f1 = argv[1] # task001_run001 block_convo = np.array([]) full_convo = np.array([]) block_num = [1,4,5] full_num = range(1,7,1) """ block_list = ['task001_run001/cond001.txt', 'task001_run001/cond004.txt', 'task001_run001dconv005.txt'] """ block...
berkeley-stat159/project-iota
code/utils/conv_response/combine_convo_point_script.py
Python
bsd-3-clause
1,565
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'CountryPreference', fields ['school', 'country'] ...
jmosky12/huxley
huxley/core/migrations/0006_auto__add_unique_countrypreference_school_country.py
Python
bsd-3-clause
8,701
# -*- coding: utf-8 -*- from ebu_tt_live.bindings.raw._itts import *
bbc/ebu-tt-live-toolkit
ebu_tt_live/bindings/_itts.py
Python
bsd-3-clause
69
# Copyright 2018 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
google/deepvariant
third_party/nucleus/io/sam_test.py
Python
bsd-3-clause
15,300
default_app_config = "test_custom_user_subclass.apps.CustomUserSubclassConfig"
jcugat/django-custom-user
test_custom_user_subclass/__init__.py
Python
bsd-3-clause
79
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
tkruse/rosinstall
test/local/test_setupfiles.py
Python
bsd-3-clause
14,673
import os import numpy as np import pandas as pd import six import unittest from datetime import datetime from bom_data_parser import read_obs_json class ObsJSONTest(unittest.TestCase): def setUp(self): self.test_obs_json_file = os.path.join(os.path.dirname(__file__), 'data', 'IDN60901.94767.json') ...
amacd31/bom_data_parser
tests/test_observations_json.py
Python
bsd-3-clause
1,454
def extractForthemoneyTranslations(item): """ Forthemoney Translations """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None return False
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractForthemoneyTranslations.py
Python
bsd-3-clause
249
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
samueldotj/TeeRISC-Simulator
configs/common/Options.py
Python
bsd-3-clause
12,906
"""Public API for Fortran parser. Module content -------------- """ from __future__ import absolute_import #Author: Pearu Peterson <pearu@cens.ioc.ee> #Created: Oct 2006 __autodoc__ = ['get_reader', 'parse', 'walk'] from . import Fortran2003 # import all Statement classes: from .base_classes import EndStatement, cla...
pearu/f2py
fparser/api.py
Python
bsd-3-clause
7,543
""" WSGI config for appscake project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
DrOctogon/appscake-rewrite
config/wsgi.py
Python
bsd-3-clause
1,421
# Django settings for moscowdjango project. from .settings import * DEBUG = False EMBEDLY_KEY = os.environ.get('EMBEDLY_KEY') SECRET_KEY = os.environ.get('SECRET_KEY') # Amazon credentials AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY') AWS_STOR...
VladimirFilonov/moscowdjango
moscowdjango/settings_production.py
Python
bsd-3-clause
780
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'chromium', 'chromium_android', 'file', 'gsutil', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/python', ...
eunchong/build
scripts/slave/recipe_modules/amp/__init__.py
Python
bsd-3-clause
375
# requests module available at http://docs.python-requests.org/en/latest/ import nuodbTools import collections, inspect, json, re, requests, socket class Domain(): ''' classdocs ''' def __init__(self, rest_url=None, rest_username=None, rest_password=None): args, _, _, values = inspect.getargvalu...
nuodb/nuodbTools
nuodbTools/cluster/domain.py
Python
bsd-3-clause
4,530
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import copy from io import StringIO from itertools import chain import pytest import numpy as np from astropy.io import ascii from astropy import table from astropy.table.table_helpers import simple_table from astropy.utils.compat.context impo...
StuartLittlefair/astropy
astropy/io/ascii/tests/test_write.py
Python
bsd-3-clause
27,957
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """Asks for coffee using different Python text-to-speech modules. """ import pyttsx def ask_for_coffee_mac(): """ Use macspeechX to synthesize speech asking for coffee. Note: sometimes doesn't work. It's a bit unpredictable. Seems to work in the Python ...
audreyr/useful
text_to_speech.py
Python
bsd-3-clause
1,232
__all__ = [ "command_statistics", "json_reader", "mongo", "sata", "xgig" ]
LoneKirov/PyTrace
pytrace/__init__.py
Python
bsd-3-clause
78
#-*- coding: utf-8 -*- from nose.tools import * from dmlt.exc import StackEmpty from dmlt.datastructure import Stack, Token, _undefined TEST_TOKENS = ['bold', 'italic', 'uff', 'papapapa', 'foo', 'python', 'spaghetti', 'car', 'mom'] def test_current(): stack = Stack() assert_true(stack.current is _undef...
EnTeQuAk/dmlt
dmlt/tests/datastructure/test_token_stack.py
Python
bsd-3-clause
1,756
from __future__ import print_function import numpy as np from six import next from six.moves import xrange def plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1): """ Plot a single Polygon geometry """ from descartes.patch import PolygonPatch a = np.asarray(poly.exterior) ...
fonnesbeck/geopandas
geopandas/plotting.py
Python
bsd-3-clause
10,488
from badges.models import SubmissionBadge from badges.tests.base_tests import BadgesBaseTest from django.core.urlresolvers import reverse from timeslot.tests.fixtures import create_user, create_submission class BadgesSubmissionTest(BadgesBaseTest): def setUp(self): # Ignite fixtures are setup on the Badg...
mozilla/mozilla-ignite
apps/badges/tests/view_tests.py
Python
bsd-3-clause
1,703
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '0010_migrate_use_structure'), ('cms_shiny', '0004_auto_20150415_0111'), ] operations = [ migrations.CreateMod...
mfcovington/djangocms-shiny-app
cms_shiny/migrations/0005_shinyapppluginmodel.py
Python
bsd-3-clause
775
import unittest import llvm.core as lc import llvm.ee as le from .support import TestCase, tests class TestLLRT(TestCase): def test_llrt_divmod(self): from llvm import llrt m = lc.Module.new('testllrt') longlong = lc.Type.int(64) lfunc = m.add_function(lc.Type.function(longlong, [lo...
llvmpy/llvmpy
llvm/tests/test_llrt.py
Python
bsd-3-clause
951
import numpy # from nmt import train # from nmtlm import train from nmt import train def main(job_id, params): print params trainerr, validerr, testerr = train(saveto=params['model'][0], reload_=params['reload'][0], dim_word=param...
tangyaohua/dl4mt
session2/train_nmt.py
Python
bsd-3-clause
1,646
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import fwdform try: from setuptools import setup except ImportError: from distutils.core import setup version = fwdform.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() if sys.argv[-1] ...
mishbahr/django-fwdform
setup.py
Python
bsd-3-clause
1,751
# -*- coding: utf-8 -*- """ Created on Sun Nov 25 11:49:32 2012 @author: ash TODO: - Sane implementation of sanity checks (return the info to the caller) """ import scipy as sp import scipy.linalg as la import numpy as np import matmul as mm import nullspace as ns import logging log = logging.getLogger(__nam...
ftranschel/evoMPS
evoMPS/tdvp_common.py
Python
bsd-3-clause
36,455
# Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and th...
v-legoff/pa-poc3
src/controller/controller.py
Python
bsd-3-clause
3,681
# # Copyright (C) 2009-2020 the sqlparse authors and contributors # <see AUTHORS file> # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause from sqlparse import sql, tokens as T from sqlparse.utils import offset, indent class AlignedIndentFi...
andialbrecht/sqlparse
sqlparse/filters/aligned_indent.py
Python
bsd-3-clause
5,110
from django.db import models """ Misc. utility methods. Keep these to a minimum. """ def myrddin_date_format(dtime): """ Myrddin used the format, 'Mon Jan 01', for showing dates. Output the given datetime object in this format. :param datetime.datetime dtime: The datetime object to print out. ...
robjcaskey/evennia-merlin
merlin/models.py
Python
bsd-3-clause
2,098
import json import socket import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest from mock import patch, Mock import six from six.moves.urllib.error import HTTPError from six.moves.urllib.request import build_opener import jenkins def get_mock_urlopen_return_value(a_dict...
yershalom/python-jenkins
tests/test_jenkins.py
Python
bsd-3-clause
75,211
from django.conf import settings from django.utils.translation import gettext_lazy as _ ASSIGNMENT_ANY = 0 ASSIGNMENT_MATCH = 1 ASSIGNMENT_EXCEPT = 2 ASSIGNMENT_CHOICES = ( (ASSIGNMENT_ANY, _("any")), (ASSIGNMENT_MATCH, _("matches")), (ASSIGNMENT_EXCEPT, _("don't match")), ) DJANGO_ADMIN_SSO_ADD_LOGIN_BU...
matthiask/django-admin-sso
admin_sso/default_settings.py
Python
bsd-3-clause
1,071
import os import sys import operator import numpy as np import itertools as it from glob import glob from multiprocessing import Pool from .config import * def start_process(): pass def do_something(d): result = d.run() return result def retrieve_samples(input_path, file_type): dir_names = [] ...
allansp84/license-plate
modules/utils/util.py
Python
bsd-3-clause
5,029
import django from django.conf import settings from django.template import Library from distutils.version import LooseVersion register = Library() def filer_actions(context): """ Track the number of times the action field has been rendered on the page, so we know which value to use. """ context['a...
dbrgn/django-filer
filer/templatetags/filer_admin_tags.py
Python
bsd-3-clause
1,240
# Django settings for example project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. '...
mjumbewu/django-model-filters
example_project/settings.py
Python
bsd-3-clause
5,060
import matplotlib as mpl #mpl.use('Agg') import matplotlib.pyplot as plt import numpy as np import os from scipy.constants import c import h5py import sys import warnings warnings.simplefilter("ignore", UserWarning) font = {'size': 18} mpl.rc('font', **font) def w2dbm(W, floor=-100): """This function converts a ...
ibegleris/Single-mode-FOPO
src/data_plotters_animators.py
Python
bsd-3-clause
10,230
# -*- coding: utf8 -*- import os import hashlib import pybossa_gravatar from mock import patch, MagicMock from factories import UserFactory from default import Test, with_context from helper import web class TestEventListener(Test): @with_context @patch('pybossa_gravatar.event_listeners.gravatar.set', retur...
alexandermendes/pybossa-gravatar
tests/test_plugin.py
Python
bsd-3-clause
3,949
import os from setuptools import setup ########## autover ########## def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Ver...
ioam/param
setup.py
Python
bsd-3-clause
2,203
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "simulation" PROJECT_SPACE_DIR = "/hom...
TobiasLundby/UAST
Module6/build/simulation/catkin_generated/pkg.develspace.context.pc.py
Python
bsd-3-clause
377
import os, sys sys.path.insert(0, os.path.join("..","..")) from nodebox.graphics.shader import render from nodebox.graphics.context import * from nodebox.graphics import * from nodebox.graphics.geometry import distance def spider(string, x=0, y=0, radius=25, **kwargs): """ A path filter that creates web thread...
pepsipepsi/nodebox_opengl_python3
examples/05-path/05-spider.py
Python
bsd-3-clause
1,901
import os import re from wsgiref.util import guess_scheme import webob def cachedproperty(f): """returns a cached property that is calculated by function f""" def get(self): try: return self._property_cache[f] except AttributeError: self._property_cache = {} ...
ryanpetrello/canary
canary/util.py
Python
bsd-3-clause
4,252
from distutils.core import setup setup( name='Chroma', version='0.2.0', author='Seena Burns', author_email='hello@seenaburns.com', url='https://github.com/seenaburns/Chroma', license=open('LICENSE.txt').read(), description='Color handling made simple.', long_description=open('README.rst...
seenaburns/Chroma
setup.py
Python
bsd-3-clause
768
from django import http from django.forms import ModelForm from django.core.urlresolvers import reverse import bleach import commonware import jingo from funfactory.log import log_cef from mobility.decorators import mobile_template from session_csrf import anonymous_csrf from make_mozilla.base import models from dj...
mozilla/make.mozilla.org
make_mozilla/base/views/event.py
Python
bsd-3-clause
1,344
from ...core import Eq, Function, Integer, Rational, diff, sympify from ...core.function import ArgumentIndexError from ...polys.polyerrors import PolynomialError from ..elementary.complexes import im, sign from ..elementary.piecewise import Piecewise ##################################################################...
skirpichev/omg
diofant/functions/special/delta_functions.py
Python
bsd-3-clause
6,076
from .base import * # noqa DEBUG = True # Databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_learner', 'USER': 'django_learner', 'PASSWORD': 'admin', 'HOST': 'localhost' } }
edouard-lopez/django-learner
django_learner/settings/local.py
Python
bsd-3-clause
279
from fancypages.templatetags.fp_container_tags import *
tangentlabs/django-oscar-fancypages
oscar_fancypages/fancypages/templatetags/fp_container_tags.py
Python
bsd-3-clause
56
#!/usr/bin/env python from time import time import numpy as np from scipy.sparse.linalg import LinearOperator, cg from csdemo.utils.bdct_linapprox_ordering import bdct_linapprox_ordering from csdemo.utils.psnr import psnr from csdemo.measurements.dct2_xforms import A_dct2, At_dct2 from csdemo.measurements.lpnoiselet_x...
miketrumpis/compsense_demo
csdemo/demos/compsense_demo.py
Python
bsd-3-clause
5,118
from django.http import HttpResponse from django.http import HttpResponseBadRequest from django.views.generic import View from devilry.devilry_markup.parse_markdown import markdown_full class DevilryFlavouredMarkdownFull(View): def _parse(self, data): if 'md' in data: md = data['md'] ...
devilry/devilry-django
devilry/devilry_markup/views.py
Python
bsd-3-clause
610
from numpy.linalg import norm from numpy import zeros, array, any as npany import new from copy import copy # local imports from ..identity_quadratic import identity_quadratic as sq from ..algorithms import FISTA from ..objdoctemplates import objective_doc_templater from ..doctemplates import (doc_template_user, doc...
klingebj/regreg
code/regreg/problems/composite.py
Python
bsd-3-clause
14,743
import subprocess, threading from subprocess import PIPE class TimedSubProc (object): def __init__(self, cmd): self.cmd = cmd.split() self.process = None def run(self, timeout=5, stdin=None, stdout=PIPE, stderr=PIPE): self.output = None def target(): self.pr...
maxspad/MGrader
autograder/modules/questions/timedsubproc.py
Python
bsd-3-clause
861
#! /usr/bin/env python # Copyright (c) 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Linker wrapper that performs distributed ThinLTO on Goma. # # Usage: Pass the original link command as parameters to this script...
endlessm/chromium-browser
tools/clang/scripts/goma_ld.py
Python
bsd-3-clause
2,071
from datetime import datetime from casexml.apps.stock.models import StockReport from corehq.apps.commtrack.models import StockState from corehq.apps.products.models import Product from corehq.apps.sms.models import SMS from corehq.apps.sms.tests.util import setup_default_sms_test_backend, delete_domain_phone_numbers ...
qedsoftware/commcare-hq
custom/ewsghana/tests/test_urgent_alerts.py
Python
bsd-3-clause
5,270
#!/usr/bin/python3 -i # # Copyright (c) 2015-2020 The Khronos Group Inc. # Copyright (c) 2015-2020 Valve Corporation # Copyright (c) 2015-2020 LunarG, Inc. # Copyright (c) 2015-2020 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
endlessm/chromium-browser
third_party/angle/third_party/vulkan-validation-layers/src/scripts/layer_chassis_dispatch_generator.py
Python
bsd-3-clause
99,103
from sklearn.ensemble import RandomForestClassifier as randomforest from sklearn.svm import SVC as svm __all__ = ['randomforest', 'svm']
mwojcikowski/opendrugdiscovery
oddt/scoring/models/classifiers.py
Python
bsd-3-clause
138
# Python Script to initialize a Peripheral Architecture: # Developed by Arturo Deza as part of the Piranhas Toolkit # Questions & bugs: deza @ dyns.ucsb.edu import numpy as np import piranhas as pir import math # Start Computer parameters: pixel_res_width = 800 # in pixels pixel_res_height = 600 # in pixels mon_widt...
ArturoDeza/Piranhas
python/create_Piranha.py
Python
bsd-3-clause
4,106
import zeit.cms.testing ZCML_LAYER = zeit.cms.testing.ZCMLLayer( 'ftesting.zcml', product_config=zeit.cms.testing.cms_product_config)
ZeitOnline/zeit.content.text
src/zeit/content/text/testing.py
Python
bsd-3-clause
140
""" WSGI config for WebAppPublic project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
wesley1001/WeVoteServer
config/wsgi.py
Python
bsd-3-clause
1,622
# Django settings for together project. import os BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PROJECT_ROOT = os.path.abspath(os.path.join(BASE_DIR, os.pardir)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) DATABASES = { 'defaul...
asnelzin/together-app-backend
together/settings/base.py
Python
bsd-3-clause
5,584
# pylint: disable=I0011,W0613,W0201,W0212,E1101,E1103 from __future__ import absolute_import, division, print_function import pytest from mock import MagicMock import numpy as np from ...tests import example_data from ... import core from ...core.exceptions import IncompatibleAttribute from ..layer_artist import RG...
JudoWill/glue
glue/clients/tests/test_image_client.py
Python
bsd-3-clause
18,765
from corehq.apps.app_manager.management.commands.helpers import ( AppMigrationCommandBase, ) from corehq.apps.app_manager.models import Application class Command(AppMigrationCommandBase): help = "Migrate preload dict in advanced forms to " \ "allow loading the same case property into multiple quest...
dimagi/commcare-hq
corehq/apps/app_manager/management/commands/migrate_advanced_form_preload.py
Python
bsd-3-clause
1,053
import ctypes from .common import * from . import functions from .functions import p_cfg, p_db, p_pkg, p_elf from .utils import * SONAME = 'libpkgdepdb.so.1' class LogLevel(object): Debug = 0 Message = 1 Print = 2 Warn = 3 Error = 4 class PkgEntry(object): Depends = 0 OptDe...
Blub/pkgdepdb
pypkgdepdb/__init__.py
Python
bsd-3-clause
29,250
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserRating.category' db.add_column('website_userrating', 'category', self.gf('django.db.mo...
solarpermit/solarpermit
website/migrations/0002_auto__add_field_userrating_category__add_field_organizationrating_cate.py
Python
bsd-3-clause
30,939
import unittest import numpy as np from robo.fmin import mtbo def objective(x, t): if t == 1: c = 1000 y = (x - 0.5) ** 2 else: c = 1 y = (x - 0.5) ** 2 + 1 return y[0], c class TestFminInterface(unittest.TestCase): def setUp(self): self.lower = np.zeros([2])...
numairmansur/RoBO
test/test_fmin/test_mtbo.py
Python
bsd-3-clause
826
from distutils.core import setup from setuptools import find_packages setup( name='django-console', description='bash console in the browser for django admins', keywords='django, bash', packages=find_packages(), include_package_data=True, version="0.4.8", author="Anoop Thomas Mathew", a...
atmb4u/django-console
setup.py
Python
bsd-3-clause
1,061
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
davidsminor/gaffer
python/GafferUI/MultiLineStringPlugValueWidget.py
Python
bsd-3-clause
3,566
import numbers import numpy as np from scipy.stats.distributions import randint from scipy.stats.distributions import rv_discrete from scipy.stats.distributions import uniform from sklearn.utils import check_random_state from sklearn.utils.fixes import sp_version from .transformers import CategoricalEncoder from .tr...
ccauet/scikit-optimize
skopt/space/space.py
Python
bsd-3-clause
21,426
""" Server Technology Power Strips """ from basicpowerstrip import BasicPowerStrip from clusto.drivers.devices.common import IPMixin, SNMPMixin from clusto.drivers.resourcemanagers import IPManager from clusto.exceptions import DriverException import re class PowerTowerXM(BasicPowerStrip, IPMixin, SNMPMixin): ...
rongoro/clusto
src/clusto/drivers/devices/powerstrips/servertech.py
Python
bsd-3-clause
4,454
# Django from django.views.generic.list import ListView __all__ = ['DataTableView'] class DataTableView(ListView): """Class-based list view using a datatable.""" # FIXME: Implement me!
ninemoreminutes/django-datatables
datatables/views.py
Python
bsd-3-clause
197
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_decimator.iff" result.attribute_template_id = -1 result.stfName("",...
anhstudios/swganh
data/scripts/templates/object/ship/shared_decimator.py
Python
mit
406
""" Tests for the Gauges template tags and filters. """ from django.http import HttpRequest from django.template import Context from django.test.utils import override_settings from analytical.templatetags.gauges import GaugesNode from analytical.tests.utils import TagTestCase from analytical.utils import AnalyticalEx...
pjdelport/django-analytical
analytical/tests/test_tag_gauges.py
Python
mit
2,359
# -*- coding: utf-8 -*- """ EvMore - pager mechanism This is a pager for displaying long texts and allows stepping up and down in the text (the name comes from the traditional 'more' unix command). To use, simply pass the text through the EvMore object: from evennia.utils.evmore import EvMore text = some_lo...
whitehorse-io/encarnia
evennia/evennia/utils/evmore.py
Python
mit
9,455
""" WSGI config for thinkster_django_angular_boilerplate 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/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "snippod_b...
shalomeir/snippod-boilerplate
snippod_boilerplate/wsgi.py
Python
mit
471
#!/usr/bin/env python3 # ==================================== # Copyright (c) Microsoft Corporation. All rights reserved. # ==================================== """Urllib2 HttpClient.""" import httplib import socket import time import traceback import urllib2 from httpclient import * from workerexception import * P...
MSFTOSSMgmt/WPSDSCLinux
Providers/nxOMSAutomationWorker/automationworker/3.x/worker/urllib2httpclient.py
Python
mit
9,775
#!/usr/bin/env python # Thank you to https://goo.gl/NDyw63 # Imports import os import json from glob import glob import numpy as np import cv2 class GenerateCalibration(object): def __init__(self, directory, saveFilename): self.directory = directory self.saveFilename = saveFilename def run(se...
3299/visioninabox
helpers/generateCalibration.py
Python
mit
1,843
# -*- coding: utf-8 -*- # # TaskBuster documentation build configuration file, created by # sphinx-quickstart on Tue Jun 16 10:01:14 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
mazulo/taskbuster-boilerplate
docs/conf.py
Python
mit
8,303
from .base import Base class Containing(Base): _description = 'containing: {}' def _check(self, value): # This will check list like objects for v in self.args: if v not in value: return False # This will check dictionary like objects for k, v in se...
toddsifleet/equals
equals/constraints/containing.py
Python
mit
440
#!/usr/bin/env python import argparse ap = argparse.ArgumentParser(description="count masked repeats.") ap.add_argument("table", help="Repeat table.") ap.add_argument("--fraction", help="Calls must be at least this fraction to be made.", type=float, default=0.51) args = ap.parse_args() table = open(args.table, 'r') ...
yunlongliukm/chm1_scripts
ClassifyRepeats.py
Python
mit
1,195
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2015-2019 The Mincoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Exercise API with -disablewallet. # from test_...
mincoin-project/mincoin
qa/rpc-tests/disablewallet.py
Python
mit
1,874
import theano import theano.tensor as T from .. import activations, initializations from .. utils.theano_utils import shared_zeros from .. layers.core import Layer import pdb class BatchNormalization(Layer): """ Batch Normalization: Published by S. Ioffee and C. Szegedy from Google.Solve the gradient ...
shenxudeu/deuNN
deuNet/layers/batch_normalization.py
Python
mit
4,407
#!/usr/bin/env python3 # Copyright (c) 2019-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descriptor wallet function.""" from test_framework.blocktools import COINBASE_MATURITY from test_...
tecnovert/particl-core
test/functional/wallet_descriptor.py
Python
mit
10,725
""" Adds organization name to the project search tsv Revision ID: 4b2b7cde821f Revises: 15593ff6a15f Create Date: 2015-11-30 17:21:56.928359 """ # revision identifiers, used by Alembic. revision = '4b2b7cde821f' down_revision = '15593ff6a15f' from alembic import op import sqlalchemy as sa def upgrade(): dropt...
smalley/cfapi
migrations/versions/4b2b7cde821f_add_org_name_to_search.py
Python
mit
2,641
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> The Folderer is a quick object helping for getting the FolderedDirKeyStrsList at a specified directory or in the current one by default """ #<DefineAugmentation> import ShareYourSystem as SYS...
Ledoux/ShareYourSystem
Pythonlogy/build/lib/ShareYourSystem/Standards/Interfacers/Folderer/__init__.py
Python
mit
6,649
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/shared_anywhere_rebel_camp_small_2.iff" result.attribute_templa...
obi-two/Rebelion
data/scripts/templates/object/building/poi/shared_anywhere_rebel_camp_small_2.py
Python
mit
458
import click import os import sys from tomb_migrate.utils import get_databases_from_settings from tomb_migrate.utils import get_upgrade_path, get_downgrade_path from tomb_migrate.utils import create_new_revision from tomb_migrate.utils import ( AlreadyInitializedException, NoMigrationsFoundException, NotI...
tomborine/tomb_migrate
tomb_migrate/main.py
Python
mit
4,125
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'G:\WorkDir\gas-sensing_resistors\ST_spectrum\ST_2400.ui' # # Created: Tue Apr 12 22:50:19 2016 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fro...
cygnushan/measurement
ST_spectrum/Ui_ST_2400.py
Python
mit
22,827
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import OrderedDict from nose.tools import eq_, assert_raises from mosql.query import select, insert, replace from mosql.util import param, ___, raw, DirectionError, OperatorError, autoparam def test_select_customize(): gen = select('person', Order...
moskytw/mosql
tests/test_query.py
Python
mit
2,404
# # entity_extracter/__init__.py - demo agent service adapter... # # Copyright (c) 2017 SingularityNET # # Distributed under the MIT software license, see LICENSE file. # import logging from sn_agent.job.job_descriptor import JobDescriptor from sn_agent.service_adapter import ServiceAdapterABC logger = logging.getLo...
inflector/singnet
agent/examples/multi_agent_adapter/entity_extracter/__init__.py
Python
mit
823
#! /usr/bin/python #Guruprasad ANanda """ Fetches substitutions from pairwise alignments. """ from galaxy import eggs from galaxy.tools.util import maf_utilities import bx.align.maf import sys import os, fileinput def stop_err(msg): sys.stderr.write(msg) sys.exit() if len(sys.argv) < 3: stop_err("In...
volpino/Yeps-EURAC
tools/regVariation/substitutions.py
Python
mit
2,849
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
datalogics/scons
test/LIBS.py
Python
mit
7,418
# -*- coding: utf-8 -*- u""" Created on 2015-8-8 @author: cheng.li """ from PyFin.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecuritySignValueHolder from PyFin.Analysis.TechnicalAnalysis.StatelessTechnicalAnalysers import SecurityAverageValueHolder from PyFin.Analysis.TechnicalAnalysis.StatelessTec...
wegamekinglc/Finance-Python
PyFin/Analysis/TechnicalAnalysis/__init__.py
Python
mit
6,089
### SubdomainGraph.py ### Shaun Harker ### 2018-03-25 ### MIT LICENSE from pychomp import * import datetime from itertools import product from math import log2 from DSGRN._dsgrn import * class SubdomainGraph: def complex(self): return self.cc def diagram(self): return self.digraph.adjacencie...
shaunharker/DSGRN
src/DSGRN/SubdomainGraph.py
Python
mit
5,940
#!-*- coding: utf8 -*- import pandas as pd from sklearn.model_selection import cross_val_score from collections import Counter import numpy as np classificacoes = pd.read_csv('all.csv', sep='\t') #Leia o arquivo e separe as tabulações comentarios = classificacoes['comments'] #pegar a coluna de comentarios (titulada m...
jarvis-fga/Projetos
Problema 2/lucas/src/testecomvetorizacao.py
Python
mit
3,680
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils.requests import RequestException from flexget....
LynxyssCZ/Flexget
flexget/plugins/sites/limetorrents.py
Python
mit
4,028
# 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/job/models/job_information.py
Python
mit
6,107
import hail as hl from hail.expr.expressions import expr_array, expr_call, expr_int32 from hail.typecheck import typecheck @typecheck(lgt=expr_call, la=expr_array(expr_int32)) def lgt_to_gt(lgt, la): """Transform LGT into GT using local alleles array. Parameters ---------- lgt : :class:`.CallExpressi...
cseed/hail
hail/python/hail/experimental/vcf_combiner/sparse_mt_utils.py
Python
mit
597
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/attachment/weapon/shared_xwing_weapon1_neg_s03_0.iff" result.a...
anhstudios/swganh
data/scripts/templates/object/tangible/ship/attachment/weapon/shared_xwing_weapon1_neg_s03_0.py
Python
mit
471