gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Utilities for interpreting CSS from Stylers for formatting non-HTML outputs. """ import re from typing import Dict, Optional import warnings class CSSWarning(UserWarning): """ This CSS syntax cannot currently be parsed. """ def _side_expander(prop_fmt: str): def expand(self, prop, value: str): ...
# -*- coding: utf-8 -*- """Unit testing for django-generic-confirmation.""" import time from django import VERSION from django import forms from django.utils import timezone from django.test import TestCase, override_settings from django.test.client import Client from django.contrib.auth.models import User, Group from...
from rpython.memory.gctransform.transform import GCTransformer, mallocHelpers from rpython.memory.gctransform.support import find_gc_ptrs_in_type, \ get_rtti, _static_deallocator_body_for_type, LLTransformerOp, ll_call_destructor from rpython.rtyper.lltypesystem import lltype, llmemory from rpython.rtyper.lltypesy...
import base64 import json import logging from google.appengine.api import urlfetch from google.appengine.ext import ndb from consts.event_type import EventType from controllers.api.api_status_controller import ApiStatusController from datafeeds.datafeed_base import DatafeedBase from models.event_team import EventTea...
"""File Utils.""" __author__ = 'pramodg@room77.com (Pramod Gupta)' __copyright__ = 'Copyright 2012 Room77, Inc.' from contextlib import contextmanager from datetime import datetime import distutils.dir_util as ddu import os import re import stat import sys from pylib.base.term_color import TermColor class FileUtil...
# 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...
# Copyright (c) 2015-2022 Vector 35 Inc # # 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, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime import itertools from fabric.api import env, run, runs_once, sudo, task from fabric.utils import puts, fastprint import six from dockermap.utils import expand_path from . import cli from .api import docker_fabric from .utils...
#!/usr/bin/env python """Routine to make it easy to read command line arguments in a keyword=value style format. Also has support for --help, help=, -h. lists can be given as e.g.: 1-3;5,6 which becomes: [[1,2,3],[5,6]] File globbing and expansion of ~ is supported for strings @filename will read filename and put eac...
#!/usr/bin/env python # # Copyright 2015 Google 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 o...
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
from __future__ import division from itertools import product import warnings import numpy as np from numpy.linalg import norm from numpy.testing import (run_module_suite, assert_, assert_allclose, assert_raises, assert_equal) from scipy.sparse import issparse, lil_matrix from scipy.sparse...
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # t...
""" Various utility functions. ----- Permission to use, modify, and distribute this software is given under the terms of the NumPy License. See http://scipy.org. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. Author: Pearu Peterson <pearu@cens.ioc.ee> Created: May 2006 ----- """ __all__ = ['split_comma'...
# Natural Language Toolkit: Graphical Representations for Trees # # Copyright (C) 2001 University of Pennsylvania # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id: tree.py,v 1.2 2005/07/19 04:28:36 adastra Exp $ """ Graphically displ...
""" api/Sets.py Author: Josh Williams Date Added: Fri Jan 26 10:18:26 CST 2007 Manages user album sets. """ ## STD LIBS import datetime import time ## OUR LIBS from AZTKAPI import AZTKAPI from decorators import stack, zapi import validation, utils, errors ## 3RD PARTY LIBS from twisted.internet.defer import Deferre...
#!/usr/bin/env python import json import os import pytz import requests import threading import time from collections import OrderedDict from datetime import datetime class Error(Exception): pass class Auditor(object): def __init__(self, hostname, port, secure=False, buffer_secs=None): self.hostna...
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: PyParse.py import re import sys C_NONE, C_BACKSLASH, C_STRING_FIRST_LINE, C_STRING_NEXT_LINES, C_BRACKET = range(5) _synchre = re.compile('\n ^\n ...
import datetime import pandas as pd import pytest from pandas.testing import assert_frame_equal, assert_index_equal import pandas_market_calendars as mcal from pandas_market_calendars.exchange_calendar_nyse import NYSEExchangeCalendar from tests.test_market_calendar import FakeCalendar, FakeBreakCalendar def test_g...
# Village People, 2017 import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable from models import FuN from collections import namedtuple from termcolor import colored as clr _fields = 'state' _fields += ' policy action goals m_value w_value ...
# Copyright (C) 2017, 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 agreed to in w...
''' Created on Jul 14, 2011 @author: sean ''' from __future__ import print_function from opcode import * import _ast import sys from meta.utils import py3, py3op, py2op from meta.asttools.visitors.print_visitor import print_ast, dump_ast from meta.asttools import cmp_ast from meta.decompiler.expression_mutator impor...
# stdlib from collections import defaultdict from Queue import Empty, Queue import threading import time # project from checks import AgentCheck from checks.libs.thread_pool import Pool from config import _is_affirmative TIMEOUT = 180 DEFAULT_SIZE_POOL = 6 MAX_LOOP_ITERATIONS = 1000 FAILURE = "FAILURE" class Status...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
""" Low-level BLAS functions (:mod:`scipy.linalg.blas`) =================================================== This module contains low-level functions from the BLAS library. .. versionadded:: 0.12.0 .. note:: The common ``overwrite_<>`` option in many routines, allows the input arrays to be overwritten to avoid...
"""The tests for MQTT device triggers.""" import json import pytest import homeassistant.components.automation as automation from homeassistant.components.mqtt import DOMAIN, debug_info from homeassistant.components.mqtt.device_trigger import async_attach_trigger from homeassistant.helpers import device_registry as d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# Copyright 2011 Piston Cloud Computing, 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 # # Unle...
"""The Synology DSM component.""" from __future__ import annotations import asyncio from datetime import timedelta import logging import async_timeout from synology_dsm import SynologyDSM from synology_dsm.api.core.security import SynoCoreSecurity from synology_dsm.api.core.system import SynoCoreSystem from synology_...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 Thomas Voegtlin # # 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Gtacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
# # 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 # ...
#!/usr/bin/env python # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (t...
#!/usr/bin/python # # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # """ Responsible for generating the testing decoders based on parsed table representations. """ # This file generates testing ...
# Copyright 2019 The TensorNetwork 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 ...
# 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...
# -*- coding: utf-8; -*- # Details about the API are given at # http://ccg.doc.gold.ac.uk/research/flowr/flowrweb/ (Click through # "Editor" to switch to Admin mode, and then click "API".) # See API.org in this directory for a summary of commands. # Here is the simple sample Unix command to show the basic idea of how...
""" image.py This module provides a simple interface to create a window, load an image and experiment with image based algorithms. Many of which require pixel-by-pixel manipulation. This is a educational module, its not intended to replace the excellent Python Image Library, in fact it uses PIL. The module and its...
from __future__ import division from datetime import datetime import config import logging import os import pickle import re import simplejson as json logger = logging.getLogger("ghc.repos") class Repo: def __init__(self, id, user, name, date, fork=None): self.id = int(id) self.user = user ...
# coding=utf-8 # Copyright 2020 The Real-World RL Suite 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 appl...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import division from itertools import izip, islice from random import shuffle from contextlib import contextmanager from collections import Counter from operator import itemgetter import argparse import subprocess import tempfile import os import logging im...
#! /usr/bin/env python3 import matplotlib matplotlib.use('agg') import argparse import logging import sys import matplotlib.pyplot as plt import numpy as np import scipy.io import tqdm import pbio.utils.bed_utils as bed_utils import pbio.misc.parallel as parallel import pbio.misc.logging_utils as logging_utils impo...
import warnings from wtforms import fields, validators from sqlalchemy import Boolean, Column from flask_admin import form from flask_admin.model.form import (converts, ModelConverterBase, InlineModelConverterBase, FieldPlaceholder) from flask_admin.model.fields import AjaxSelectFi...
__author__ = 'Thomas Rueckstiess and Tom Schaul' from scipy import pi, dot, array, ones, exp from scipy.linalg import norm from pybrain.rl.environments.cartpole.nonmarkovpole import NonMarkovPoleEnvironment from pybrain.rl.environments.cartpole.doublepole import DoublePoleEnvironment from pybrain.rl.environments impo...
# Copyright (c) 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys from dataclasses import _MISSING_TYPE, dataclass, field from typing import Any, List, Optional import torch from omegaconf import ...
#! /usr/bin/env python """Store collections of data fields. """ import types import inspect from .scalar_data_fields import ScalarDataFields, FieldError class Error(Exception): """Base class for errors in this module.""" pass class GroupError(Error, KeyError): """Raise this error for a missing group nam...
# Copyright 2013, Nachi Ueno, NTT MCL, 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 # # Unles...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** from . import AWSObject, AWSProperty, PropsDictType from .validators import boolean, integer from .validators.imagebuilder import ( component_pl...
print("importing modules...") from datetime import datetime, date import time print("> Flask") from flask import Flask,session, flash, url_for, redirect, render_template, abort , g, make_response, stream_with_context, request, Response print("> Flask-sqlalchemy") from flask_sqlalchemy import SQLAlchemy from sqlalchemy ...
## ### # IP: GHIDRA # # 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 writin...
# Copyright 2017 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 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...
# -*- coding: utf-8 -*- """Pylab (matplotlib) support utilities. Authors ------- * Fernando Perez. * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2009 The IPython Development Team # # Distributed under the terms of the BSD License. The full lice...
"""Interact with the OSM APIs.""" import datetime as dt import json import logging as lg import re import socket import time from collections import OrderedDict from hashlib import sha1 from pathlib import Path from urllib.parse import urlparse import numpy as np import requests from dateutil import parser as date_pa...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
import datetime import os from django.conf import settings from django.db.models.fields import Field from django.core.files.base import File, ContentFile from django.core.files.storage import default_storage from django.core.files.images import ImageFile, get_image_dimensions from django.core.files.uploadedfile import...
# 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 agreed to in writing, ...
# Copyright 2015-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
import json import pytest from django.test.client import Client as DjangoClient from oauthost.models import AuthorizationCode, Token, Client, RedirectionEndpoint, Scope from oauthost.toolbox import register_client from oauthost.exceptions import OauthostException URL_TOKEN = '/token/' URL_AUTHORIZE = '/auth/' cl...
# Copyright (c) 2020, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
# Copyright (c) 2010, Mats Kindahl, Charles Bell, and Lars Thalmann # All rights reserved. # # Use of this source code is goverened by a BSD licence that can be # found in the LICENCE file. """Test of the binary log reader. """ import sys import os.path _HERE = os.path.dirname(os.path.abspath(__file__)) _ROOTPATH = o...
#!/usr/bin/env python """Library for handling batch HTTP requests for apitools.""" import collections import email.generator as generator import email.mime.multipart as mime_multipart import email.mime.nonmultipart as mime_nonmultipart import email.parser as email_parser import itertools import time import uuid impor...
# # 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...
# Copyright (c) 2016 Derek Gustafson <degustaf@gmail.com> # Copyright (c) 2016 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2016 Glenn Matthews <glenn@e-dad.net> # Copyright (c) 2016 Ashley Whetter <ashley@awhetter.co.uk> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For de...
"""Standalone Authenticator.""" import collections import errno import logging import socket from typing import DefaultDict from typing import Dict from typing import List from typing import Set from typing import Tuple from typing import TYPE_CHECKING import OpenSSL from acme import challenges from acme import stand...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from helpdesk.settings import HAS_TAG_SUPPORT class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Ticket.tags' if HAS_TAG_SUPPORT is True if HAS...
# # 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...
# Copyright 2012 Big Switch Networks, 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 appl...
#SPDX-License-Identifier: MIT import logging, os, sys, time, requests, json from datetime import datetime from multiprocessing import Process, Queue from urllib.parse import urlparse import pandas as pd import sqlalchemy as s from sqlalchemy import MetaData from sqlalchemy.ext.automap import automap_base from workers.w...
# Python Imports import datetime import csv import itertools as it import collections as co import argparse import os # Django Imports from django.core.management.base import BaseCommand, CommandError from django.utils import timezone from django.db import models , transaction # Local Imports import contacts.models a...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_spectastic ---------------------------------- Tests for `spectastic` module. """ from builtins import str from math import isnan from mock import patch import json import six from hypothesis import ( strategies as st, assume, given, ) from werkzeug.d...
import gzip import pickle from collections import Counter from threading import Lock from typing import List, Dict, Iterable, Tuple, Optional import numpy as np from docqa.dataset import TrainingData, Dataset from tqdm import tqdm from docqa.utils import split, flatten_iterable, group, ResourceLoader from docqa.confi...
import asyncio import pytest from gator.aiojob import (HandlerNotFound, Job, JobSimpleDispatchMixin, NotAJobClassError) @pytest.fixture def dispatch_cls(): class Dispatcher(JobSimpleDispatchMixin): pass return Dispatcher def test_simple_coro_registration(dispatch_cls): ...
import sys sys.path.insert(0,'../') if sys.version_info[:2] == (2,6): import unittest2 as unittest else: import unittest import os import re import datetime,time from rivets_test import RivetsTest import rivets import execjs import lean class EnvironmentTests(object): def testWorkingDirectoryIsDefaultRoot(self): ...
#!/usr/bin/env python # Copyright (c) 2012 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. """End to end tests for ChromeDriver.""" import ctypes import optparse import os import sys import unittest import chromedriver i...
# -*- coding:utf-8 -*- """ Sample script of Sequence to Sequence model for ChatBot. This is a train script for seq2seq.py You can also use Batch and GPU. args: --gpu (flg of GPU, if you want to use GPU, please write "--gpu 1") """ import os os.environ["CHAINER_TYPE_CHECK"] = "0" import pickle import argparse import n...
#!/usr/bin/python import csv import xml.etree.ElementTree as ET import os import sys import shutil # ######################################################### # Represents all the metadata classes for import # ######################################################### class RecordInfo: """Holds record info inform...
# cli commands from twisted.python import log, usage from twisted.internet import defer from opennsa import constants as cnt, nsa, error LABEL_MAP = { 'vlan': cnt.ETHERNET_VLAN, 'mpls': cnt.MPLS } def _createSTP(stp_arg): if not ':' in stp_arg: raise usage.UsageError('No ":" in stp, invalid for...
import json, re, struct import os.path from tblgen import interpret, Dag, TableGenBits def dag2expr(dag): def clean(value): if isinstance(value, tuple) and len(value) == 2 and value[0] == 'defref': return value[1] return value def sep((name, value)): if name is None: return clean(value) return name if...
from typing import List, Iterator, Dict, Tuple, Any, Type, Union, Optional import logging from os import PathLike import json import re from contextlib import contextmanager import numpy import torch from torch.utils.hooks import RemovableHandle from torch import Tensor from torch import backends from allennlp.common...
from twisted.python import failure, reflect, log as twlog from twisted.internet import defer from foolscap import copyable, slicer, tokens from foolscap.copyable import AttributeDictConstraint from foolscap.constraint import ByteStringConstraint from foolscap.slicers.list import ListConstraint from tokens import Bana...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
# 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) 2013 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 ...
from configparser import RawConfigParser from attic.remote import cache_if_remote import msgpack import os import sys from binascii import hexlify import shutil from .key import PlaintextKey from .helpers import Error, get_cache_dir, decode_dict, st_mtime_ns, unhexlify, UpgradableLock, int_to_bigint, \ bigint_to_i...
import numpy as np from numpy import array class Holder(object): pass data = Holder() data.comment = 'generated data, divide by 1000' data.name = 'data' data.xo = array([[ -419, -731, -1306, -1294], [ 6, 529, -200, -437], [ -27, -833, -6, -564], [ -304, -273, -502, -739], ...
import json from httpretty import HTTPretty from ...exceptions import AuthFailed from .oauth import OAuth2Test class GithubEnterpriseOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.github_enterprise.GithubEnterpriseOAuth2' user_data_url = 'https://www.example.com/api/v3/user' expected_user...
""" This is an implementation of the Linear Fascicle Evaluation (LiFE) algorithm described in: Pestilli, F., Yeatman, J, Rokem, A. Kay, K. and Wandell B.A. (2014). Validation and statistical inference in living connectomes. Nature Methods 11: 1058-1063. doi:10.1038/nmeth.3098 """ import numpy as np import scipy.sparse...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
# 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...
from datetime import datetime from operator import attrgetter from django.core.exceptions import FieldError from django.db.models import ( CharField, DateTimeField, F, Max, OuterRef, Subquery, Value, ) from django.db.models.functions import Upper from django.test import TestCase from .models import Article, Autho...
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field available_timeslots on 'ProposalVersion' db.create_table('reviews_proposalversion_available_tim...
import io import json import warnings from .core import url_to_fs from .utils import merge_offset_ranges # Parquet-Specific Utilities for fsspec # # Most of the functions defined in this module are NOT # intended for public consumption. The only exception # to this is `open_parquet_file`, which should be used # place...
# 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...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
class SpecialFunctions(object): """ This class implements special functions using high-level code. Elementary and some other functions (e.g. gamma function, basecase hypergeometric series) are assumed to be predefined by the context as "builtins" or "low-level" functions. """ defined_functi...