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
#!/usr/bin/env python import sys import json import logging logging.basicConfig(filename='middleware.log', level=logging.DEBUG) logging.debug('Middleware "modify_request" called') payload = sys.stdin.readlines()[0] logging.debug(payload) payload_dict = json.loads(payload) payload_dict['response']['body'] = "modifi...
SpectoLabs/hoverpy
hoverpy/tests/modify/modify.py
Python
apache-2.0
357
#!/usr/local/bin/python # Copyright © 2019 The vt-py 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 ...
VirusTotal/vt-py
examples/file_behaviour_feed.py
Python
apache-2.0
2,177
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.fishing.FishingTargetGlobals from toontown.toonbase import ToontownGlobals OFF = 0 MOVING = 1 StepTime = 5.0 MinimumHunger = 1.0 NUM_TARGETS_INDEX = 0 POS_START_INDEX = 1 POS_END_INDEX = 4 RADIUS_INDEX = 4 WATER_LEVEL_INDEX = 5 __targetInfoD...
DedMemez/ODS-August-2017
fishing/FishingTargetGlobals.py
Python
apache-2.0
6,436
# Copyright 2019 Verily Life Sciences 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 appli...
verilylifesciences/analysis-py-utils
verily/query_kit/template.py
Python
apache-2.0
7,734
#!/usr/bin/env python from flask import Flask import socket,redis,os r=redis.Redis(host=os.getenv("REDIS_PORT_6379_TCP_ADDR"),port=os.getenv("REDIS_PORT_6379_TCP_PORT")) r.set("count",0) app = Flask(__name__) @app.route("/") def index(): r.incr("count") return "Visit number %d\nHostname: %s\n" % (int(r.get(...
CALlanoR/virtual_environments
web/nginx/docker/nginx_haproxy_redis/app/app.py
Python
apache-2.0
409
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
apache/incubator-allura
ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
Python
apache-2.0
37,961
import unittest from Fold import Fold, clusters_to_labels from load_data import load_files __author__ = 'mbarnes1' class MyTestCase(unittest.TestCase): def setUp(self): text, self.labels, ad_id, self.phones = load_files(max_lines=500) self.folds = Fold(text, self.phones, self.labels, number_proces...
benbo/QPR_CP1
test/test_fold.py
Python
apache-2.0
2,101
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
googleapis/python-aiplatform
samples/generated_samples/aiplatform_v1beta1_generated_job_service_resume_model_deployment_monitoring_job_sync.py
Python
apache-2.0
1,549
# Copyright 2018-2019 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import atexit from functools import partial import json import os from urllib.parse import urlparse import tempfile import vcr from c7n.testing import TestUtils from c7n.resources import load...
capitalone/cloud-custodian
tools/c7n_kube/tests/common_kube.py
Python
apache-2.0
3,192
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-08-27 00:01 import datetime import logging import sys import time from typing import Union from hanlp.utils.log_util import ErasablePrinter, color_format, color_format_len def human_time_delta(days, hours, minutes, seconds, delimiter=' ') -> str: units = local...
hankcs/HanLP
hanlp/utils/time_util.py
Python
apache-2.0
6,719
# Copyright 2013 NEC Corporation # 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 ...
eayunstack/neutron
neutron/tests/unit/_test_extension_portbindings.py
Python
apache-2.0
17,247
import unittest from test.plankton import spectest import plankton.codec def load_tests(loader, tests, pattern): """Called by the test framework to produce the test suite to run.""" return spectest.build_test_suite(loader, tests, pattern, _make_codec_test_class) def _make_codec_test_class(test_file, test_name,...
tundra/plankton
python/test/plankton/test_codec.py
Python
apache-2.0
2,657
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
tensorflow/probability
tensorflow_probability/python/distributions/lkj_test.py
Python
apache-2.0
21,203
from django.core.urlresolvers import reverse from website.apps.core.models import Source from website.testutils import WithEditor class Test_View_SourceEdit_NotLoggedIn(WithEditor): """Tests the source_edit view""" def setUp(self): WithEditor.setUp(self) self.source1 = Source.objects.create( ...
shh-dlce/pulotu
website/apps/core/tests/test_view_source_edit.py
Python
apache-2.0
3,087
# Copyright (c) 2015 Clinton Knight. 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 requir...
sniperganso/python-manilaclient
manilaclient/tests/unit/v2/test_scheduler_stats.py
Python
apache-2.0
2,893
from selenium.webdriver.support import expected_conditions as EC class CartPage: def __init__(self, app): self.app = app def remove_products_from_cart(self): wd = self.app.wd # click Checkout wd.find_element_by_xpath("//div[@id='cart']//a[normalize-space(.)='Checkout »']").cl...
Dob3r/python_seleniumwebdriver
fixture/cart_page.py
Python
apache-2.0
1,584
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
intel-analytics/analytics-zoo
pyzoo/zoo/tfpark/text/estimator/__init__.py
Python
apache-2.0
697
import time import threading import collections from synapse.common import * from synapse.eventbus import EventBus class QueueShutdown(Exception): pass class Queue(EventBus): ''' A simple custom queue to address python Queue() issues. ''' def __init__(self, items=()): EventBus.__init__(self) ...
imjonsnooow/synapse
synapse/lib/queue.py
Python
apache-2.0
5,791
#!/usr/bin/env python ############################################################################### # # samtools.py # # Copyright (C) 2011 Christopher Davoren # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to de...
PapenfussLab/MHC-clogs
lib/massivetools/toolkits/samtools.py
Python
artistic-2.0
2,840
# coding=utf-8 # ============================================================================= # # Copyright (c) 2016, Cisco Systems # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistribut...
anushreejangid/csm-ut
csmpe/core_plugins/csm_install_operations/exr/install.py
Python
bsd-2-clause
30,203
""" This module updates the qiprofile database imaging information from a XNAT scan. """ import csv import tempfile from qiutil.collections import concat from qiutil.ast_config import read_config from qiutil.file import splitexts from qixnat.helpers import (xnat_path, xnat_name, parse_xnat_date) from qirest_client.help...
ohsu-qin/qipipe
qipipe/qiprofile/imaging.py
Python
bsd-2-clause
14,880
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('djangomapserver', '0003_classobj_name'), ] operations = [ migrations.RemoveField( model_name='maplayer', ...
ricardogsilva/django-mapserver
djangomapserver/migrations/0004_remove_maplayer_style.py
Python
bsd-2-clause
356
# Copyright (c) 2018 Yubico AB # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
Yubico/yubikey-manager
ykman/otp.py
Python
bsd-2-clause
6,652
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_vertex_attrib_64bit' def _f( function ): return _p.createFunction( function,_p.GL,'GL_ARB_vertex_attrib_64bit',False) @_f @_p....
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/OpenGL/raw/GL/ARB/vertex_attrib_64bit.py
Python
bsd-2-clause
1,552
#!/usr/bin/python import memcache import json print "Content-Type: application/json" print mc = memcache.Client(['127.0.0.1:11211'], debug=0) data = mc.get_multi(["meta", "history"]) print(json.dumps(data, separators=(",", ":")))
Selfnet/dashboard
cgi/history.json.py
Python
bsd-2-clause
233
from io import BytesIO from kqml import KQMLObject from .util import safe_decode class KQMLString(KQMLObject): def __init__(self, data=None): if data is None: self.data = '' else: self.data = safe_decode(data) def __len__(self): return len(self.data) def c...
bgyori/pykqml
kqml/kqml_string.py
Python
bsd-2-clause
1,138
import unittest import torch import torch.nn as nn from nsoltSubbandSerialization2dLayer import NsoltSubbandSerialization2dLayer class NsoltSubbandSerialization2dLayerTestCase(unittest.TestCase): """ NSOLTSUBBANDSERIALIZATION2DLAYERTESTCASE 複数コンポーネント入力 (BSSC):(ツリーレベル数) nSamples x nRowsLv1...
shodimaggio/SaivDr
appendix/torch_nsolt/test_nsoltSubbandSerialization2dLayer.py
Python
bsd-2-clause
11,203
__version__ = __import__('pkg_resources').get_distribution('mongosql').version
kolypto/py-mongosql
myproject/__init__.py
Python
bsd-2-clause
79
#!/usr/bin/env python import datetime import urllib2 from nose.tools import eq_ try: from io import BytesIO except ImportError: # 2to3 translates cStringIO to io, so this looks silly on Python 3.x from cStringIO import StringIO as BytesIO import simpleoss from simpleoss.utils import rfc822_fmtdate # htt...
leo23/simples3
tests/__init__.py
Python
bsd-2-clause
3,659
from pprint import pprint from django.db import models, OperationalError from django.db.models.signals import post_save from django.contrib.auth.admin import User from django.dispatch import receiver import os import json from urllib.parse import urlencode from urllib.error import URLError from urllib.request import ...
kenyansongithub/django-rog
rog/models.py
Python
bsd-2-clause
6,114
from __future__ import print_function, division, absolute_import from collections import defaultdict from numba import config class Rewrite(object): '''Defines the abstract base class for Numba rewrites. ''' def __init__(self, pipeline): '''Constructor for the Rewrite class. ''' ...
jriehl/numba
numba/rewrites/registry.py
Python
bsd-2-clause
3,165
# -*- coding: UTF-8 -*- # Copyright 2002-2017 Luc Saffre # License: BSD (see file COPYING for details) """Some extensions for Sphinx. .. autosummary:: :toctree: base logo actordoc help_texts_extractor """ from atelier import sphinxconf def configure(globals_dict, settings_module_name=None): """...
khchine5/lino
lino/sphinxcontrib/__init__.py
Python
bsd-2-clause
2,071
import nose.tools import numpy from palm.blink_route_mapper import SingleDarkRouteMapperFactory from palm.blink_parameter_set import SingleDarkParameterSet from palm.rate_fcn import rate_from_rate_id EPSILON = 0.01 def compute_fermi_log_ka(time, T, tf): numerator = numpy.exp(-(time - tf) / T) denominator = ((...
milapour/palm
palm/test/test_route_mapper.py
Python
bsd-2-clause
1,239
from django.db import models from userprofile.models import BaseProfile from django.utils.translation import ugettext as _ from django.conf import settings import datetime from utils.fileFilter import extractText from utils.res import ResumeParser import os from demo.middleware import threadlocals from django.contrib...
badri/django-profile
demo/demoprofile/models.py
Python
bsd-2-clause
4,134
''' /* * Copyright 1993-2007 NVIDIA Corporation. All rights reserved. * * NOTICE TO USER: * * This source code is subject to NVIDIA ownership rights under U.S. and * international Copyright laws. Users and possessors of this source code * are hereby granted a nonexclusive, royalty-free license to use this cod...
sniemi/EuclidVisibleInstrument
sandbox/Convolution.py
Python
bsd-2-clause
15,190
# -*- coding: UTF-8 -*- """Verify whether the following bug (`1169217 <https://bugs.launchpad.net/appy/+bug/1169217>`_) is fixed: When I run appy_pod.Renderer on a template which contains buggy instructions, then the resulting file contains the tracebacks as comments. Very well. But sometimes I'd prefer ap...
khchine5/xl
tests/test_appy_pod.py
Python
bsd-2-clause
2,267
import os, sys import multiprocessing import rosbag def run_command(args): print args (radar_bag_file, out_folder) = args if out_folder[-1] != '/': out_folder += '/' unpack_bag(out_folder, radar_bag_file) def unpack_bag(out_folder, radar_bag_file): """ Unpacks the bag and writes individual...
sameeptandon/sail-car-log
lidar/generate_rdr.py
Python
bsd-2-clause
3,253
#!/usr/bin/env python from .plugin import SimStatePlugin from ..s_action_object import ast_stripping_op as _actual_ast_stripping_op import sys import functools import logging l = logging.getLogger('simuvex.plugins.solver') #pylint:disable=unidiomatic-typecheck # # Timing stuff # _timing_enabled = False import tim...
zhuyue1314/simuvex
simuvex/plugins/solver.py
Python
bsd-2-clause
10,701
import ptypes ptypes.setbyteorder(ptypes.config.byteorder.littleendian) from . import cpu from . import umtypes from . import pstypes from . import ldrtypes from . import heaptypes from . import oletypes from . import rtltypes from . import mmtypes from . import ketypes from . import setypes from . import extypes from...
arizvisa/syringe
lib/ndk/__init__.py
Python
bsd-2-clause
463
# Copyright (c) 2016, MD2K Center of Excellence # 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 conditio...
kauser-cse-buet/CerebralCortex
cerebralcortex/data_processor/test/test_rip.py
Python
bsd-2-clause
26,959
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
mikehulluk/morphforge
src/morphforgecontrib/indev/chaco_dev/chaco/util/chaco_util.py
Python
bsd-2-clause
7,649
from colander import null from pyramid.security import authenticated_userid from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import ForeignKey from sqlalchemy import Index from sqlalchemy import func from sqlalchemy import text from sqlalchemy import Unicode f...
pyfidelity/rest-seed
backend/backrest/principals.py
Python
bsd-2-clause
3,851
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
jslhs/barf-project
barf/barf/core/smt/smttranslator.py
Python
bsd-2-clause
24,169
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Mon Feb 14, 2011 @author:Isabel Restrepo Computes sample data mean and scatter. Each block is processed in a separate thread. """ import os; import bvpl_octree_batch import multiprocessing import Queue import time import random import optparse import sys from ...
mirestrepo/voxels-at-lems
bvpl/bvpl_octree/PCA/pca_global/pca_add_proj_error.py
Python
bsd-2-clause
6,858
from distutils.core import setup, Extension setup( name = 'jail', version = '0.1', description = 'Python chroot jail environments module for web and shell hosting purposes', long_description = 'This is a Python 2.7.x package and commandline tool to easily create and update chr...
phalaaxx/jail
setup.py
Python
bsd-2-clause
648
# -*- coding: utf-8 -*- # Copyright (c) 2011, 2012, 2013, Sebastian Wiesner <lunaryorn@gmail.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain th...
lunaryorn/sphinxcontrib-issuetracker
setup.py
Python
bsd-2-clause
2,984
# # testCouningPointMutations.py # # This file contains the tests for the counting nucleotides problem # at http://rosalind.info/problems/as-table/ # ID: HAMM # # This code is distributed under the FreeBSD License # # Copyright (c) 2012, John Secord # All rights reserved. # # Redistribution and use in source and binary...
johnnybaseball/rosalind_bioinformatics
src/test/testCountingPointMutations.py
Python
bsd-2-clause
2,990
import socket import sys from PodSixNet.async import poll, asyncore from PodSixNet.Channel import Channel class Server(asyncore.dispatcher): channelClass = Channel def __init__(self, channelClass=None, localaddr=("127.0.0.1", 31425), listeners=5): if channelClass: self.channelClass = ...
xpchess/xpchess
PodSixNet/Server.py
Python
bsd-2-clause
3,860
from ostinato.statemachine import StateMachine from mc2.controllers.base.states import Initial, Done, Destroyed, Missing class Workflow(StateMachine): initial_state = 'initial' state_map = { 'initial': Initial, 'done': Done, 'missing': Missing, 'destroyed': Destroyed, } ...
praekelt/mc2
mc2/controllers/base/workflows.py
Python
bsd-2-clause
792
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistrib...
sippy/b2bua
sippy/SipVia.py
Python
bsd-2-clause
5,883
from setuptools import setup setup( name='resolver-api', maintainer="OpenDNS, Inc", maintainer_email=["kevincfunk@gmail.com, rpiaget@gmail.com"], version='0.0.1', license="BSD 2 clause", packages=['resolverapi'], long_description=open('README.md').read() )
opendns/OpenResolve
setup.py
Python
bsd-2-clause
286
from django.test.utils import override_settings from test_plus import TestCase @override_settings(ROOT_URLCONF="example_app.urls") class DateTimeFieldTest(TestCase): def test_validate_form_output_tz(self): text = """ <optgroup label="Australia"> <option value="Australia/Adelaide">Adela...
goodtune/vitriolic
touchtechnology/common/tests/test_fields.py
Python
bsd-3-clause
2,796
# # HeaderBase.py -- FITS Header plugin base class for fits viewer # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga import GingaPlugin class HeaderBase(Ging...
eteq/ginga
ginga/misc/plugins/HeaderBase.py
Python
bsd-3-clause
1,784
import gtfs.models from scipy import spatial import shelve import os import config import numpy as np import copy import stops import shapes from sklearn.hmm import MultinomialHMM from utils import * from common.ot_utils import * from collections import deque from common import ot_utils try: import matplotlib.pyplo...
oferb/OpenTrains
webserver/opentrain/algorithm/train_tracker.py
Python
bsd-3-clause
22,802
import unittest import vcr from xserverpy.lib.cli import parse from xserverpy.xserverpy import start_with_args from cStringIO import StringIO import sys class Capturing(list): def __enter__(self): self._stdout = sys.stdout sys.stdout = self._stringio = StringIO() return self def __exi...
oarrabi/xserverpy
tests/cli_test.py
Python
bsd-3-clause
2,629
# -*- coding: utf-8 -*- class SearchAPI(object): pass
Excentrics/publication-backbone
publication_backbone/search/api.py
Python
bsd-3-clause
59
import commands import logging import sys import threading import unicodedata import time from pushtotalk import PushToTalk class Synthetizer(threading.Thread): def __init__(self, synthetizer, language): self.synthetizer = synthetizer self.language = language self.arguments = "" threading.Thread.__init__(s...
angeltogaita/linuxkernel
scripts/applications/voicesynthetizer.py
Python
bsd-3-clause
2,147
# -*- coding: utf-8 -*- """ Eve ~~~ An out-of-the-box REST Web API that's as dangerous as you want it to be. :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. .. versionchanged:: 0.5 'SERVER_NAME' removed. 'QUERY_WHERE' added. 'QUERY_SO...
bcrochet/eve
eve/__init__.py
Python
bsd-3-clause
2,010
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..misc import CalculateMedian def test_CalculateMedian_inputs(): input_map = dict(ignore_exception=dict(nohash=True, usedefault=True, ), in_files=dict(), median_file=dict(), median_per_file=dict(...
mick-d/nipype
nipype/algorithms/tests/test_auto_CalculateMedian.py
Python
bsd-3-clause
869
from functools import wraps from django.conf import settings from django.contrib.auth import SESSION_KEY from django.contrib.auth import authenticate from django.contrib.auth import get_user from django.contrib.auth import login from django.shortcuts import redirect from functools import WRAPPER_ASSIGNMENTS from lazy...
danfairs/django-lazysignup
lazysignup/decorators.py
Python
bsd-3-clause
2,956
# -*- coding: utf-8 -*- # @Author: pc12g10 # @Date: 2016-08-11 14:19:53 # @Last Modified by: p-chambers # @Last Modified time: 2016-10-06 15:51:08 import numpy as np from airconics.primitives import Airfoil from airconics import liftingsurface import airconics.AirCONICStools as act # ==============================...
p-chambers/occ_airconics
examples/core/blended_winglet.py
Python
bsd-3-clause
3,026
from collections import OrderedDict # FEI4A fei4a = { 'flavor': 'fei4a', 'calibration_parameters': OrderedDict([ ('C_Inj_Low', 2.0), # fF, C_Low ('C_Inj_Med', 4.1), # fF, C_High ('C_Inj_High', 6.05), # fF, C_Low + C_High ('Vcal_Coeff_0', 0.0), # mV, offset ...
SiLab-Bonn/pyBAR
pybar/fei4/fei4_defines.py
Python
bsd-3-clause
28,743
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('form_processor', '0010_add_auth_and_openrosa_fields'), ] operations = [ migrations.AddField( model_name='xforminstancesql', name='deprecated_form_id', fi...
dimagi/commcare-hq
corehq/form_processor/migrations/0011_add_fields_for_deprecation.py
Python
bsd-3-clause
1,471
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn from corehq.apps.reports.graph_models import MultiBarChart, Axis from corehq.apps.reports.sqlreport import TableDataFormat from custom.care_pathways.reports import CareBaseReport from custom.care_pathways.filters import GroupByFilter, Disaggr...
qedsoftware/commcare-hq
custom/care_pathways/reports/adoption_disaggregated_report.py
Python
bsd-3-clause
4,052
import os import sys import codecs from contextlib import contextmanager from itertools import chain, repeat from .types import convert_type, IntRange, BOOL from .utils import make_str, make_default_short_help, echo from .exceptions import ClickException, UsageError, BadParameter, Abort from .termui import prompt, con...
untitaker/click
click/core.py
Python
bsd-3-clause
51,982
#Copyright (c) 2011 Yahoo! Inc. All rights reserved. Licensed under the BSD License. # See accompanying LICENSE file or http://www.opensource.org/licenses/BSD-3-Clause for the specific language governing permissions and limitations under the License. __author__ = "BOSS Team" from distutils.core import setup from os ...
yahoo/bossmashup
setup.py
Python
bsd-3-clause
1,564
from numpy.random import random from bokeh.plotting import * output_server("markers") figure(title="markers.py example", tools="pan,wheel_zoom,box_zoom,reset,previewsave") def myscatter(x, y, typestr): scatter(x, y, marker=typestr, line_color="#6666ee", fill_color="#ee6666", fill_alpha=0.5, size=12)...
sahat/bokeh
examples/plotting/server/markers.py
Python
bsd-3-clause
1,483
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import User from cms.tests.base import CMSTestCase from cms.models import Page from cms.menu import CMSMenu from menus.templatetags.menu_tags import show_menu, show_sub_menu,\ show_breadcrumb, language_chooser, page_language_ur...
dibaunaumh/tikal-corp-website
cms/tests/menu.py
Python
bsd-3-clause
13,217
from __future__ import absolute_import, division, print_function from argparse import ArgumentParser from subprocess import Popen import os DEPENDENCIES = [ ('develop', [ # Install development packages '-rdevelop-requirements.txt', '-rtests/develop-requirements.txt', # Install ex...
OpenEntityMap/oem-client
scripts/install_dependencies.py
Python
bsd-3-clause
1,629
import unittest import numpy as np import pysal.lib from pysal.model.spreg.twosls import BaseTSLS, TSLS from pysal.lib.common import RTOL class TestBaseTSLS(unittest.TestCase): def setUp(self): db = pysal.lib.io.open(pysal.lib.examples.get_path("columbus.dbf"),'r') self.y = np.array(db.by_col("CRIM...
lixun910/pysal
pysal/model/spreg/tests/test_twosls.py
Python
bsd-3-clause
14,366
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['Lag1Trend'] , ['Seasonal_Minute'] , ['SVR'] );
antoinecarme/pyaf
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_Lag1Trend_Seasonal_Minute_SVR.py
Python
bsd-3-clause
157
from sympy.core import S, Symbol, sympify from sympy.utilities.source import get_class from sympy.assumptions import Q, ask from sympy.logic.boolalg import fuzzy_not def refine(expr, assumptions=True): """ Simplify an expression using assumptions. Gives the form of expr that would be obtained if symbols ...
fperez/sympy
sympy/assumptions/refine.py
Python
bsd-3-clause
3,681
# -*- coding: utf-8 -*- import mock from unittest2 import TestCase from celery.tests.utils import with_eager_tasks from raven.contrib.celery import CeleryClient class ClientTest(TestCase): def setUp(self): self.client = CeleryClient(servers=['http://example.com']) @mock.patch('raven.contrib.celery.C...
collective/mr.poe
tests/contrib/celery/tests.py
Python
bsd-3-clause
1,196
### # Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2010, James Vega # 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 copyri...
prashantpawar/supybot-rothbot
plugins/Relay/plugin.py
Python
bsd-3-clause
20,874
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst...
onjin/ntv
setup.py
Python
bsd-3-clause
1,377
from __future__ import division from math import sqrt, pi from unittest import TestCase, main from ..vec3 import ( EPSILON, NegXAxis, NegYAxis, NegZAxis, Vec3, XAxis, YAxis, ZAxis, ) class testVec3(TestCase): def testConstructor(self): v = Vec3(1, 2, 3) self.assertRaises(TypeError, lambda: V...
tartley/flyinghigh-opengl-from-python
flyinghigh/geometry/tests/testVec3.py
Python
bsd-3-clause
6,253
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # """Module conta...
rocco8773/bapsflib
bapsflib/lapd/_hdf/file.py
Python
bsd-3-clause
2,792
from django.template import Context, loader from django.http import HttpResponse, Http404 from django.shortcuts import render_to_response from django.core.paginator import Paginator from django.core.mail import send_mail from storitell.stories.models import Story from django.template import RequestContext from storitel...
esten/StoriTell
StoriTell/stories/ajax.py
Python
bsd-3-clause
3,696
"""Contains config data for the habits app.""" MALE = "M" FEMALE = "F"
prathapsridharan/health_project
health_project/profiles/config.py
Python
bsd-3-clause
72
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djangocms_career', '0004_auto_20160418_1145'), ] operations = [ migrations.AlterField( model_name='post', ...
dmonn/djangocms-career
djangocms_career/migrations/0005_auto_20160418_1202.py
Python
bsd-3-clause
1,104
from datetime import ( date, datetime, timedelta, ) from itertools import product import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DataFrame, Grouper, Index, MultiIndex, Series, concat, date_range, ) import pandas._testing as tm from pa...
datapythonista/pandas
pandas/tests/reshape/test_pivot.py
Python
bsd-3-clause
77,201
from django.db import models class Type(models.Model): title = models.CharField(max_length=5) icon_class = models.CharField(max_length=20) def __str__(self): return "%s" % (self.title) def __unicode__(self): return "%s" % (self.title) class Meta: app_label = "article"
RuralIndia/pari
pari/article/models/type.py
Python
bsd-3-clause
318
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2020-02-13 01:40 from __future__ import unicode_literals from django.db import migrations import sentry.db.models.fields.bounded class Migration(migrations.Migration): # This flag is used to mark that a migration shouldn't be automatically run in # pro...
beeftornado/sentry
src/sentry/migrations/0037_auto_20200213_0140.py
Python
bsd-3-clause
1,535
from __future__ import print_function, absolute_import import contextlib from io import StringIO import importlib import logging import os import sys import xml.etree.ElementTree as xml from maya import OpenMayaUI from pymel.core import confirmDialog as confirmDialog_orig # I think the * imports are for the compili...
patcorwin/fossil
pdil/_core/ui.py
Python
bsd-3-clause
16,081
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
endlessm/chromium-browser
third_party/catapult/third_party/gsutil/gslib/tests/test_compose.py
Python
bsd-3-clause
10,317
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/__init__.py __version__=''' $Id$ ''' __doc__="""Internal functionality for creating PDF files - not part of API """
makinacorpus/reportlab-ecomobile
src/reportlab/pdfbase/__init__.py
Python
bsd-3-clause
293
""" Django settings for djangovisor project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build ...
nleng/djangovisor
settings.py
Python
bsd-3-clause
3,465
# encoding: utf-8 """Additional math functions for dealing with dense arrays""" from __future__ import division, print_function import numpy as np from scipy import linalg from scipy.sparse.linalg import aslinearoperator from six.moves import range, zip __all__ = ['block_diag', 'matdot', 'mkron', 'partial_trace', ...
dseuss/mpnum
mpnum/utils/extmath.py
Python
bsd-3-clause
11,918
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sms', '0009_check_for_domain_default_backend_migration'), ] operations = [ migrations.AlterField( model_name='sq...
qedsoftware/commcare-hq
corehq/apps/sms/migrations/0010_update_sqlmobilebackend_couch_id.py
Python
bsd-3-clause
498
#!/usr/bin/env python # Copyright (c) 2015 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Parse specification extracted from NEXRAD ICD PDFs and generate Python code.""" import warnings def register_processor(num): """Register functions to ...
Unidata/MetPy
tools/nexrad_msgs/parse_spec.py
Python
bsd-3-clause
6,498
# -*- coding: utf-8 -*- # # Copyright (C) 2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists o...
zjj/trac_hack
trac/util/tests/__init__.py
Python
bsd-3-clause
5,480
""" byceps.blueprints.site.snippet.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from flask import abort, g from ....services.snippet import mountpoint_service from ....util.framework.blueprint import create_blueprint ...
homeworkprod/byceps
byceps/blueprints/site/snippet/views.py
Python
bsd-3-clause
1,017
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the fundamental classes used for representing coordinates in astropy. """ import math from collections import namedtuple import numpy as np from . import angle_utilities as util from .. import units as u...
funbaker/astropy
astropy/coordinates/angles.py
Python
bsd-3-clause
25,153
from __future__ import absolute_import, division, print_function from collections import defaultdict from datetime import datetime, timedelta import six from django.db import DataError from django.utils import timezone from sentry.constants import STATUS_CHOICES from sentry.models import EventUser, Release, User fro...
zenefits/sentry
src/sentry/search/utils.py
Python
bsd-3-clause
10,003
#!/usr/bin/env python """" LOPHI Actuation Library @TODO: add mouse support Script syntax: SPECIAL: <LEFT_GUI> n TEXT: wget ftp://get_test_malware_here MOUSE: (TODO) SLEEP: (Time in seconds) Each line is a command message Header is necessary to differentiate text ver...
mit-ll/LO-PHI
python-lophi/lophi/actuation/keypressgenerator.py
Python
bsd-3-clause
10,321
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # @file bz2shelve.py # # This is ``bzip2''-version of shelve database. # # Keeping the same interface and functionlity as shelve data base, # ZipShelf allows much more compact file size throug...
OstapHEP/ostap
ostap/io/bz2shelve.py
Python
bsd-3-clause
16,560
# -*- coding:utf-8 -*- DP_URL = '%sapp.finance.%s/data/stock/%s?day=&page=%s' DP_163_URL = '%squotes.%s/data/caibao/%s?reportdate=%s&sort=declaredate&order=desc&page=%s' FUND_HOLDS_URL = '%squotes.%s/hs/marketdata/service/%s?host=/hs/marketdata/service/%s&page=%s&query=start:%s;end:%s&order=desc&count=60&type=que...
xiaojingyi/tushare
tushare/stock/ref_vars.py
Python
bsd-3-clause
3,856
# -*- encoding: utf-8 -*- """ Functions for encoding data of various types including field tables and arrays """ import calendar import datetime import decimal as _decimal import logging import struct import time import typing from pamqp import common LOGGER = logging.getLogger(__name__) DEPRECATED_RABBITMQ_SUPPORT...
gmr/pamqp
pamqp/encode.py
Python
bsd-3-clause
12,958
from setuptools import find_packages, setup # name can be any name. This name will be used to create .egg file. # name that is used in packages is the one that is used in the trac.ini file. # use package name as entry_points setup( name='Trac-Dashboard', version='0.1', author='Dav Glass', author_emai...
trac-hacks/trac-dashboard
setup.py
Python
bsd-3-clause
759
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
enthought/etsproxy
enthought/util/profiler.py
Python
bsd-3-clause
1,993