gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Offline process for calculating metrics. This pipeline consists of three MapReduces chained together. The first MR reads in three sets of CSV files sharded by participant ID, generated by our metrics export code: participants_<shard>.csv = ['date_of_birth', 'first_order_date', 'first_samples_arrived_date', ...
#!/usr/bin/env python ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] tags will be kept. ...
############################################################################### # actionAngle: a Python module to calculate actions, angles, and frequencies # # class: actionAngleAdiabaticGrid # # build grid in integrals of motion to quickly evaluate # actionAngleAdiabatic # # meth...
""" Test functions for fftpack.basic module """ from numpy import arange, asarray, zeros, dot, exp, pi, double, cdouble from numpy.random import rand import numpy as np from concurrent import futures import os import scipy.fftpack import numpy.fft from .common import Benchmark, safe_import with safe_import() as exc: ...
"""Tests for laguerre module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.laguerre as lag from numpy.polynomial.polynomial import polyval from numpy.testing import ( assert_almost_equal, assert_raises, assert_equal, assert_, run_module_suite ...
# Copyright 2014 Objectif Libre # # 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 ...
# Modified work: # ----------------------------------------------------------------------------- # Copyright (c) 2018 Preferred Infrastructure, Inc. # Copyright (c) 2018 Preferred Networks, Inc. # ----------------------------------------------------------------------------- # Original work: # -------------------------...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import os from six import iteritems import logging from werkzeug.wrappers import Request from werkzeug.local import LocalManager from werkzeug.exceptions ...
from __future__ import (absolute_import, print_function) # From system from boto.s3.connection import S3Connection try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from yaml import load try: # LibYAML based parser and emitter from yaml import CLoader as Loader excep...
# oracle/base.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle :name: Oracle Oracle version 8 through current (11g at...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# # 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 ...
# Copyright 2014 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...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import sys import os import zipfile from io import StringIO from pkg_resources import resource_filename from urllib import request from pathlib import Path from unittest.mock import patch import pytest import numpy.testing as nptest import pandas.util.testing as pdtest import numpy import pandas from pybmpdb import ...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
from unittest.mock import MagicMock from mpf.tests.MpfFakeGameTestCase import MpfFakeGameTestCase class TestModes(MpfFakeGameTestCase): def get_config_file(self): return 'test_modes.yaml' def get_machine_path(self): return 'tests/machine_files/mode_tests/' def test_loading_modes(self):...
import os from conans.client import packager from conans.client.client_cache import ClientCache from conans.client.cmd.export import _execute_export from conans.client.generators import write_generators from conans.client.importer import run_imports, run_deploy from conans.client.installer import ConanInstaller, call_...
# Copyright 2012-2013 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# Copyright 2013, Red Hat, 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 agr...
#!/usr/bin/env python import json import datetime import logging import os import re import smtplib import socket import sys import threading import time from email.header import Header from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import jinja2 from alertaclient.alert import Al...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import os import tempfile from six import StringIO from unittest import mock import pytest from buildozer.targets.android import TargetAndroid from tests.targets.utils import ( init_buildozer, patch_buildozer, patch_buildozer_checkbin, patch_buildozer_cmd, patch_buildozer_file_exists, ) def patc...
""" A collection of functions to find the weights and abscissas for Gaussian Quadrature. These calculations are done by finding the eigenvalues of a tridiagonal matrix whose entries are dependent on the coefficients in the recursion formula for the orthogonal polynomials with the corresponding weighting function over ...
#!/usr/bin/python import sys, argparse, os, urllib2, stat from subprocess import check_output # DropIt - Local Windows Installation Payload Dropper # Written by Kerberos # # Usage: ./dropit.py -d WINDOWS_DRIVE_DEVICE [-w WINDOWS_MOUNT_PATH] [-p BINARY_DROP_PATH] [-u PAYLOAD_URL] [-r AUTORUN_REGISTRY_KEY [-n HKCU_USER ...
"""Kernel Principal Components Analysis""" # Author: Mathieu Blondel <mathieu@mblondel.org> # License: BSD Style. import numpy as np from scipy import linalg from ..utils.arpack import eigsh from ..base import BaseEstimator, TransformerMixin from ..preprocessing import KernelCenterer from ..metrics.pairwise import p...
""" Provides a set of pluggable permission policies. """ from __future__ import unicode_literals from django.http import Http404 from rest_framework import exceptions from rest_framework.compat import is_authenticated SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS') class BasePermission(object): """ A base class ...
# coding: utf-8 """ Test cases for .hist method """ import pytest from pandas import Series, DataFrame import pandas.util.testing as tm from pandas.util.testing import slow import numpy as np from numpy.random import randn from pandas.plotting._core import grouped_hist from pandas.tests.plotting.common import (Tes...
#! /usr/bin/python ''' USAGE: make_line_relay_templates.py ... <Settings Dual SEL-421 Line Relay Master Standard.docx> <Settings Dual SEL-421 Line Relay Master Standard.docx>: MS Word docx document master template for line relays. ABOUT: Creates individual Word document of a specific construction standard b...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Widget to display simulation data of a CSDF graph. author: Sander Giesselink """ import sys from PyQt5.QtWidgets import QWidget, QGraphicsItem, QPushButton, QVBoxLayout, QMenu, QAction, QInputDialog, QMessageBox from PyQt5.QtCore import QRectF, QRect, QPointF, QPoint, ...
# Generated from MySQL.g4 by ANTLR 4.6 from antlr4 import * if __name__ is not None and "." in __name__: from .MySQLParser import MySQLParser else: from MySQLParser import MySQLParser # This class defines a complete listener for a parse tree produced by MySQLParser. class MySQLListener(ParseTreeListener): ...
from django.core.exceptions import FieldDoesNotExist from django.db.models import NOT_PROVIDED from django.utils.functional import cached_property from .base import Operation from .utils import field_is_referenced, field_references, get_references class FieldOperation(Operation): def __init__(self, model_name, n...
# from .. import logAccess from flask.ext.stormpath import StormpathManager from flask.ext.stormpath import user from flask.ext.stormpath import login_required from stormpath.error import Error import flask as fk import hashlib import datetime # No admin access for now. # Only user access is handled. class AccessMan...
# mssql/pyodbc.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Support for MS-SQL via pyodbc. pyodbc is available at: http://pypi.python.or...
from __future__ import division import numpy as np import chainer import chainer.functions as F from chainer import initializers import chainer.links as L from chainercv.links import Conv2DBNActiv from chainercv.links.model.resnet.resblock import ResBlock from chainercv.links import PickableSequentialChain from chai...
""" Django settings for cpro_project project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
# -*- coding: utf-8 -*- """ Django settings for yysite project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/s...
"""passlib.registry - registry for password hash handlers""" #============================================================================= # imports #============================================================================= # core import re import logging; log = logging.getLogger(__name__) from warnings import war...
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint from frappe import _ from six import string_types import json class WorkflowStateError(frappe.ValidationError): pass class WorkflowTra...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange 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 applic...
try: from sys import exit, version_info, stdout, stderr import argparse import pkg_resources from os import getcwd, chdir, path from .error import write as writerr from .testrunner import TestRunner from .messagebag import MessageBag from .assertions import AssertionFactory except: i...
import json from six.moves import urllib from dcos import config, cosmos, http, packagemanager, rpcclient, util from dcos.errors import DCOSException logger = util.get_logger(__name__) EMBED_ACTIVE_RUNS = 'activeRuns' EMBED_SCHEDULES = 'schedules' EMBED_HISTORY = 'history' EMBED_HISTORY_SUMMARY = 'historySummary' ...
# -*- coding: utf-8 -*- # # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
""" Finite differences implemented in numpy. Meant as reference implementation to test PyCA functions against, not as optimized implementations. """ import numpy as np from PyCA.Core import Vec3Df # need constants from PyCA from PyCA.Core import DIM_X, DIM_Y, DIM_Z from PyCA.Core import DIFF_FORWARD, DIFF_BACKWARD, ...
# -*- 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...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright (C) 2017 Dell Inc. or its subsidiaries. # # 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...
# Copyright 2011 OpenStack Foundation. # 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 req...
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
import code import contextlib import errno import greenlet import logging import os import re import sys import threading import unicodedata from bpython.autocomplete import Autocomplete, SIMPLE from bpython.repl import Repl as BpythonRepl from bpython.config import Struct, loadini, default_config_path from bpython.fo...
""" The :mod:`sklearn.pipeline` module implements utilities to build a composite estimator, as a chain of transforms and estimators. """ # Author: Edouard Duchesnay # Gael Varoquaux # Virgile Fritsch # Alexandre Gramfort # Lars Buitinck # License: BSD from collections import defaultdict...
from __future__ import print_function import sys import os import getpass import json import datetime import base64 try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from . import __version__ from . import tools from . import terminalsize def authenticate(top_level_url=...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
""" This module provides classes for managing local and remote DBus objects @author: Tom Cocagne """ import inspect import weakref import six from twisted.internet import defer from zope.interface import implementer, Interface from txdbus import error, interface, introspection, marshal, message def isSignatureVali...
# ****************************************************************************** # pysimm.forcefield.tip3p module # ****************************************************************************** # # ****************************************************************************** # License # ******************************...
""" Useful form fields for use with SQLAlchemy ORM. """ import operator from wtforms.fields import SelectFieldBase, StringField from wtforms.validators import ValidationError try: from wtforms.fields import _unset_value as unset_value except ImportError: from wtforms.utils import unset_value from .tools ...
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
from argh import arg from argh.exceptions import CommandError import pnc_cli.common as common import pnc_cli.cli_types as types from pnc_cli import swagger_client from pnc_cli import utils from pnc_cli.swagger_client import BuildconfigurationsApi from pnc_cli.swagger_client import RepositoryconfigurationsApi from pnc_...
#Note to self: do decode #DNA - ATGC #RNA - AUGC #These are scattered throughout the code. Don't mind them, they are for memeory reasons as I made the code. def encode(): inputt = input('Input sequence to be encoded (letters, space, numbers, and,.!?@ only!)!') #Asks user for input for encoding (hence, the functi...
from __future__ import print_function import sys import random import os from builtins import range import time sys.path.insert(1, "../../../") import h2o from tests import pyunit_utils from h2o.transforms.decomposition import H2OPCA from h2o.grid.grid_search import H2OGridSearch class Test_PCA_grid_search: ""...
# -*- coding: utf-8 -*- import ast import base64 import bson import os import random import time import urllib2 from boto.s3.key import Key from bson.objectid import ObjectId from cStringIO import StringIO from Crypto.Cipher import AES from PIL import Image from pymongo import DESCENDING import settings AES = AES.ne...
from kivy.animation import Animation from kivy.uix.relativelayout import RelativeLayout class SpriteGroup: def __init__(self): self.sprites = [] self.len = 0 def __len__(self): return self.len def __iter__(self): return iter(self.sprites) def append(self, sprite): ...
import numpy as np import pandas as pd from .pycompat import basestring, iteritems, suppress from . import formatting from .utils import SortedKeysDict class ImplementsArrayReduce(object): @classmethod def _reduce_method(cls, func, include_skipna, numeric_only): if include_skipna: def wra...
"""Support for RFXtrx devices.""" import binascii from collections import OrderedDict import logging import RFXtrx as rfxtrxmod import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, ATTR_STATE, CONF_DEVICE, CONF_DEVICES, CONF_HOST, CONF_PORT, EVENT_HOMEA...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Spotify AB from __future__ import absolute_import, division, print_function import attr import markdown2 as md from .validate import * # NOQA HTTP_METHODS = [ "get", "post", "put", "delete", "patch", "options", "head", "trace", "connect" ] class Content(object...
# -*- 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...
"""Affinity matrix refinemnet operations.""" import abc import enum import numpy as np from scipy.ndimage import gaussian_filter class RefinementName(enum.Enum): """The names of the refinement operations.""" CropDiagonal = enum.auto() GaussianBlur = enum.auto() RowWiseThreshold = enum.auto() Symmetrize = e...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# 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 required by ap...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
import paho.mqtt.client as paho import config # from transitions import Machine import os, sys, inspect from transitions import * from transitions.extensions import GraphMachine from IPython.display import Image, display, display_png from threading import Timer from time import sleep import logging import socket imp...
#!/usr/bin/env python # # The MIT License (MIT) # # Copyright (c) 2016 Corrado Ubezio # # 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 r...
import unittest import os import random import time import munch import basecrm def timestamp(): return str(int(time.time())) + str(random.randint(1, 100000)) def lazyproperty(function): attribute = '__lazy__' + function.__name__ @property def __lazyproperty(self): if not hasattr(self.__class...
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import time import hashlib from base64 import b64encode from .compat import urlparse, str from .utils import parse_dict_header try: from ._oauth import (Client, SIGNATURE_HMAC, ...
""" self-contained to write legacy storage pickle files To use this script. Create an environment where you want generate pickles, say its for 0.20.3, with your pandas clone in ~/pandas . activate pandas_0.20.3 cd ~/pandas/pandas $ python -m tests.io.generate_legacy_storage_files \ tests/io/data/legacy_pickle/0....
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.core.doctype.doctype.doctype import UniqueFieldnameError, IllegalMandatoryError, DoctypeLinkError, WrongOptionsDoctypeLinkErro...
import unittest import numpy as np import pandas as pd import tempfile import os import shutil from glob import glob from neurosynth.tests.utils import (get_test_dataset, get_test_data_path, get_resource_path) from neurosynth.base.dataset import Dataset from neurosynth.base import im...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" Implementation of Fully Convolutional Networks, in short, FCN. The FCN in the project is based on VGG 19 network, and there are two version of FCN implemented, FCN 4s, and FCN 32s, basically represent the different detail level. FCN4s is has more spatial information since it fuses the information from different la...
# -*- coding: utf-8 -*- """ Base module for loading and running the main SasView application. """ ################################################################################ # This software was developed by the University of Tennessee as part of the # Distributed Data Analysis of Neutron Scattering Experiments (DA...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Metacloud # # 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...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
"""The tests for the timer component.""" # pylint: disable=protected-access from datetime import timedelta import logging import pytest from homeassistant.components.timer import ( ATTR_DURATION, CONF_DURATION, CONF_ICON, CONF_NAME, DEFAULT_DURATION, DOMAIN, EVENT_TIMER_CANCELLED, EVEN...
# Copyright 2014 Cisco Systems, 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 requir...
from typing import Dict, Any, Union, List, Optional, Tuple, Iterable, TYPE_CHECKING import sys import shutil from pathlib import Path from wasabi import msg import srsly import hashlib import typer from click import NoSuchOption from click.parser import split_arg_string from typer.main import get_command from contextli...
""" Routers provide a convenient and consistent way of automatically determining the URL conf for your API. They are used by simply instantiating a Router class, and then registering all the required ViewSets with that router. For example, you might have a `urls.py` that looks something like this: router = route...
from __future__ import unicode_literals import re try: from collections import OrderedDict except ImportError: OrderedDict = None from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib import auth from django.contrib.auth import get_user_model from account.conf...
# Lint as: python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
#!/usr/bin/python # Copyright (c) 2016, Pierre Jodouin <pjodouin@virtualcomputing.solutions> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', ...
# Created By: Virgil Dupras # Created On: 2008-08-12 # Copyright 2011 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licens...
"""functions for external dependencies""" import os import filecmp from collections import OrderedDict from mod import log, util, registry, template from mod.tools import git #------------------------------------------------------------------------------- def get_imports(fips_dir, proj_dir) : """get the imports ...
#!/usr/bin/python3 # requires system Python and the python3-apt package import textwrap from collections import OrderedDict # Starting with Python 3.7, we could just use vanilla dicts import apt # ImportError? apt install python3-apt def describe(pkg): # Python 3.7 equivalent: # return {"Name": pkg.name, "Installed"...
import nengo from nengo.processes import Process import numpy as np import threading from .transmission_parameters import ( Transform, PassthroughNodeTransmissionParameters, NodeTransmissionParameters) from nengo_spinnaker.builder.builder import ObjectPort, spec, Model from nengo_spinnaker.builder.model im...
# -*- coding: utf-8 -*- import pytest from addons.wiki.tests.factories import NodeWikiFactory from api.base.settings import osf_settings from api.base.settings.defaults import API_BASE from api_tests import utils as test_utils from framework.auth import core from osf.models import Guid from osf_tests.factories import ...
from itertools import chain from stdnet import session_result, session_data, async from stdnet.utils import itervalues, iteritems from stdnet.utils.structures import OrderedDict from stdnet.utils.exceptions import * from .query import Q, Query, EmptyQuery __all__ = ['Session', 'SessionModel', ...