text stringlengths 2 999k |
|---|
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='CascadeEncoderDecoder',
num_stages=2,
pretrained='open-mmlab://resnet50_v1c',
backbone=dict(
type='ResNetV1c',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 1, 1),
... |
#!/usr/bin/env python
#
# 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 requir... |
from typing import List, Optional, Any
from pydantic import BaseModel
from user_manager.common.models import UserPropertyType, AccessType
class EnumValue(BaseModel):
value: str
title: str
class UserProperty(BaseModel):
key: str
type: UserPropertyType = ...
format: Optional[str]
format_hel... |
import pytest
import molssi_project as mp
import numpy as np
@pytest.mark.parametrize('n, answer', [(0, 0.), (1, 1.), (2, 2.), (3, 2.5), (4, 2.667)])
def test_euler(n, answer):
assert (mp.math.euler(n) == pytest.approx(answer,
abs=2)), 'Euler function for {n} does not... |
import os
import copy
import h5py
import pytest
import numpy as np
from os.path import join as pjoin
from dnnbrain.io import fileio as fio
from dnnbrain.dnn import core as dcore
from dnnbrain.dnn.base import dnn_mask, array_statistic, dnn_fe
DNNBRAIN_TEST = pjoin(os.environ['DNNBRAIN_DATA'], 'test')
TMP_DIR = pjoin(o... |
from plotly.basedatatypes import BaseTraceType
import copy
class Parcoords(BaseTraceType):
# customdata
# ----------
@property
def customdata(self):
"""
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note that,
"s... |
import os
NAME='rbthreads'
try:
RUBYPATH = os.environ['UWSGICONFIG_RUBYPATH']
except:
RUBYPATH = 'ruby'
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
CFLAGS.append('-DRUBY19')
CFLAGS.append('-Wno-unused-parameter')
rbconfig = 'RbConfig'
... |
#!/usr/bin/env python
"""
====================
Generators - Classic
====================
Unit tests for various classic graph generators in generators/classic.py
"""
import itertools
from nose.tools import *
import networkx as nx
from networkx import *
from networkx.algorithms.isomorphism.isomorph import graph_could_... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
class CosineLinear(nn.Module):
def __init__(self, in_features, out_features):
super(CosineLinear, self).__init__()
self.in_features = in_features
self.out_features = out_features
... |
# coding: utf-8
"""
timelight
This is the timelight api. # noqa: E501
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class SourceGroupListDto(object):
"""NOTE: This class is auto generated ... |
#!/usr/bin/env python2
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
BUILDDIR="/home/gabi/Desktop/Emixil-project/1604/emixil-win"
EXEEXT=".exe"
# These will turn into commen... |
# pylint: disable=invalid-name, unused-variable
"""
REGION Operator
====================
Region operator, used in darknet.
"""
from __future__ import absolute_import as _abs
import tvm
from ... import cpp
@tvm.target.generic_func
def region(data, num, classes, coords, background, softmax=True):
"""Region forward o... |
expected_output = {
"lisp_router_instances": {
2: {
"service": {
"ethernet": {
"map_server": {
"sites": {
"prov1": {
"allowed_configured_locators": "any",
... |
"""
Mongodb-based Trials Object
===========================
Components involved:
- mongo
e.g. mongod ...
- driver
e.g. hyperopt-mongo-search mongo://address bandit_json bandit_algo_json
- worker
e.g. hyperopt-mongo-worker --loop mongo://address
Mongo
=====
Mongo (daemon process mongod) is used for IP... |
from __future__ import annotations
from typing import Any, Dict, Tuple
Color = Tuple[int, int, int, int]
class Label:
"""A label with the name and color."""
def __init__(self, name: str, color: Color) -> None:
"""
:param name: The name of the color.
:param color: An R, G, B, alpha t... |
from Crypto.Cipher import AES
import base64
code_path = "./static/content/"
def get_full_code_history():
file_path = code_path + "code_list.txt"
result = None
with open(file_path, 'r') as f:
result = [line.strip().split(' ') for line in f.readlines() if line != '']
return result
def save_code... |
except:
print("inside except block")
|
import unittest
from vodem.api import apn_config
class TestApnConfig(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.valid_response = {
'APN_config0': 'Default($)Default($)manual($)*99#($)none($)($)($)IP($)auto($)($)auto($)($)',
'APN_config1': '',
'APN_c... |
# Copyright (C) 2018 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... |
"""
pycraigslist.tests.test_api.test_exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests proper exception raises from pycraigslist.api.* instances.
"""
from functools import partial
import pytest
from pytest import mark
import specs
# Make a tuple of invalid pycraigslist.api.* partial instances for `test_... |
options = {
'base': 'models/04_zencoder_audio_net/base.gin',
'encoder': [
'models/04_zencoder_audio_net/spectral_net.gin',
'models/04_zencoder_audio_net/spectral_net_mfcc.gin',
'models/04_zencoder_audio_net/ff2_net.gin',
'models/04_zencoder_audio_net/dilated_conv_net.gin',
]
... |
#!/usr/bin/python
#
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# pylint: disable=missing-docstring
import requests
import onap_tests.ut... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
import numpy as np
from dataloader.image.image import Image
from utils.file_manager import FileManager
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
class TestFileManager(unittest.TestCase):
def test_save_a... |
import functools
import jax.numpy as jnp
import jax
from jax import grad
import numpy as np
def extreme_value_cdf_family(x, mu=6.0, sigma=1.0, e=-0.75):
tail_prob = 1e-3
tail_length = 10
upper_limit = mu - (sigma / e)
mask = x >= upper_limit
z = (x[~mask] - mu) / sigma
tx = (1 + e * z) ** (-1... |
# code from Project 01 - Rainbow HAT
# import the rainbowhat and time modules
import rainbowhat
import time
# a while True loop keeps doing things until interrupted
while True:
# take the temperature and show it on the display
temperature = rainbowhat.weather.temperature()
rainbowhat.display.p... |
# Once for All: Train One Network and Specialize it for Efficient Deployment
# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han
# International Conference on Learning Representations (ICLR), 2020.
import json
import torch
import torch.nn as nn
# from layers import *
from ofa.layers import MyModule, ZeroLayer,... |
#!/usr/bin/env python
from __future__ import print_function
import gc
import sys
import os
import select
import signal
import unittest
import tempfile
import time
import faulthandler
import random
import copy
import psutil
import platform
from collections import deque
from threading import Thread, Event
from inspect i... |
from talon.voice import Word, Context, Key, Rep, RepPhrase, Str, press
from talon import ctrl, clip
from talon_init import TALON_HOME, TALON_PLUGINS, TALON_USER
import string
alpha_alt = 'air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip'.spli... |
"""
A wrapper for ncclimo climatology generation
"""
import os
import logging
from jobs.job import Job
from lib.jobstatus import JobStatus
from lib.filemanager import FileStatus
from lib.util import get_climo_output_files, print_line
class Climo(Job):
def __init__(self, *args, **kwargs):
super(Climo, sel... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test SQLite driver functionality.
# Author: Frank Warmerdam <warmerdam@pobox.com>
#
#######################################################... |
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.assistant.guides import GUIDES
from sentry.testutils import APITestCase
class AssistantActivity(APITestCase):
def setUp(self):
super(AssistantActivity, self).setUp()
self.login_as(user=self.user)
... |
from ..data_types import Station
# noinspection SpellCheckingInspection
stations: list[Station] = [
Station(id=41394, zh="永通路", en="YongTongLu"),
Station(id=21542, zh="金河客运站(终点站)", en="JinHeKeYun"),
Station(id=21541, zh="金河客运站(终点站)", en="JinHeKeYun"),
Station(id=21540, zh="金河客运站(终点站)", en="JinHeKeYun")... |
"""Flask App for Predicting Optimal AirBnB prices in Berlin"""
from flask import Flask, jsonify, request
import numpy as np
import pandas as pd
import pickle
from joblib import load
# import xgboost as xgb
import os
# local import:
from .api_function import get_lemmas
from dotenv import load_dotenv
load_do... |
#!/usr/bin/env python2
import sys
sys.path.insert(0, '..')
from cde_test_common import *
def checker_func():
assert os.path.isfile(CDE_ROOT_DIR + '/home/pgbovine/epd-6.2-2-rh5-x86/bin/python')
generic_test_runner(["python", "proc_self_pid_exe_test.py"], checker_func)
|
import logging
from datetime import datetime
from util import parse_datetime
class ResponseStatus(object):
def __init__(self):
self.code = None # type: int
self.response = None # type: unicode
self.message = None # type: unicode
self.server_id = None # type: unicode
... |
import datetime
import os
import time
import torch
import torch.utils.data
import transforms as T
from torch import nn
import torchvision
import numpy as np
import scipy.io
import random
from PIL import Image
import matplotlib.image as mpimg
from tqdm import tqdm
from coco_utils import get_coco
import presets
import ut... |
import sqlite3
from typing import List
from pydantic import parse_obj_as
from .exceptions import Things3DataBaseException, Things3StorageException, Things3NotFoundException
from .models import Task, TaskFilter, Project, ProjectFilter, Area, AreaFilter
from .models import TaskStatus, TaskType
from .query import Sqlite... |
"""\
Generate fragments for the initial model building simulations. Note that it's
a little bit weird to use fragments even though the models are allowed to
design in these simulations. Conformations that are common for the current
sequence but rare for the original one might not get sampled. However, we
believe tha... |
import re
import yaml
from . import gcloud
from .cluster_config import ClusterConfig
DEFAULT_PROPERTIES = {
"spark:spark.task.maxFailures": "20",
"spark:spark.driver.extraJavaOptions": "-Xss4M",
"spark:spark.executor.extraJavaOptions": "-Xss4M",
'spark:spark.speculation': 'true',
"hdfs:dfs.replic... |
#Write a program (function!) that takes a list and returns a new list that contains all the elements of the
# first list minus all the duplicates.
#Extras:
##Write two different functions to do this - one using a loop and constructing a list, and another using sets.
##Go back and do Exercise 5 using sets, and write t... |
from pathlib import Path
from tempfile import NamedTemporaryFile
from typing import Optional
import yaml
from scripts.utils.logger import logger
from scripts.utils.models import HelmValues, SubprocessResult
from ..utils.general import run_os_command
class Helm:
"""
A wrapper class around various Helm tools... |
import sys
sys.path.append("..")
import numpy as np
from model.ssgpr import SSGPR
from math import floor
def test_predict():
np.random.seed(1) # set seed
precision = 5
# load the data
data = np.load("../data/test_data/test_predict_data.npy")
solution = np.load("../data/test_data/test_predict_solu... |
"""The unittest module for Administrator model.
"""
import unittest
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm.exc import FlushError
from app import create_app, db
from app.models.administrator import Administrator
class AdministratorModelTestCase(unittest.TestCase):
"""The test class for Admi... |
from modules import podbean
with open('config/podbean.txt', 'r') as f:
lines = f.readlines()
if len(lines) != 2:
raise IOError()
else:
pbid = lines[0].strip()
pbsecret = lines[1].strip()
pb = podbean.Podbean(pbid, pbsecret)
'''
# login
pb.auth()
title = 'This is a title'
c... |
import json
from udpipe import Model
from tqdm import tqdm
model_map = {
'English': 'udpipe/english-ewt-ud-2.5-191206.udpipe',
'Chinese': 'udpipe/chinese-gsd-ud-2.5-191206.udpipe',
'Arabic': 'udpipe/arabic-padt-ud-2.5-191206.udpipe'
}
def get_conllu_text(sentence_index, model, key):
sentences = []
... |
"""Tests for init."""
from unittest.mock import patch
import pytest
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from pytest_homeassistant_custom_component.common import MockConfigEntry
from custom_components.mail_and_packages.const import DOMAIN
from tests.const import (
FAKE_CONFIG_DATA,... |
"""Calendar Maker, by Al Sweigart al@inventwithpython.com
Create monthly calendars, saved to a text file and fit for printing.
This code is available at https://nostarch.com/big-book-small-python-programming
Tags: short"""
import datetime
# Set up the constants:
DAYS = ('Sunday', 'Monday', 'Tuesday', 'Wednesd... |
import struct
import pymap3d as pm
import base64
from helpers.constants import *
'''
Used when a user selects an enc from the dropdown and memory_data['type']
is either 'loaded' or 'generated'. The only difference between this function
and parse_enc_data_from_encounters_data is how the data is read in. In... |
import airflow
from airflow import models
from airflow.models import Variable, TaskInstance
from airflow.operators.python import PythonOperator, PythonVirtualenvOperator
from airflow.providers.google.cloud.transfers.gcs_to_gcs import GCSToGCSOperator
from airflow.utils.dates import days_ago
import os
import json
impor... |
{'application':{'type':'Application',
'name':'Template',
'backgrounds': [
{'type':'Background',
'name':'standaloneBuilder',
'title':u'PythonCard standaloneBuilder',
'size':(800, 610),
'statusBar':1,
'menubar': {'type':'MenuBar',
'menus': [
... |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
import os
from PIL import Image
from six import BytesIO
from versatileimagefield.datastructures import SizedImage
from versatileimagefield.datastructures.sizedimage import (
SizedImageInstance,
MalformedSizedImageKey,
settings,
cache,
VERSATILEIMAGEFIELD_CACHE_LENGTH,
)
from versatileimagefield.regi... |
from __future__ import absolute_import
import datetime
import logging
import os
import socket
from socket import error as SocketError, timeout as SocketTimeout
import warnings
from .packages import six
from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection
from .packages.six.moves.http_client imp... |
# Copyright 2015 iWeb Technologies 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 2021 The Tekton 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 in wr... |
user_ids = {"teraCoder": 9018293, "proProgrammer": 119238}
user_ids.update({"theLooper": 138475, "stringQueen": 85739})
print(user_ids) |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'transaction.ui',
# licensing of 'transaction.ui' applies.
#
# Created: Sun Jun 16 21:23:02 2019
# by: pyside2-uic running on PySide2 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PySide2 import QtCore, QtGui, Qt... |
#!/usr/bin/env python
# Author: TehZig#1949
import discord
import time
import os
curDir = os.path.dirname(os.path.realpath(__file__))
config = open(curDir + "/../include/config")
lines = config.readlines()
TOKEN = lines[0].rstrip()
zigID = lines[1].rstrip()
client = discord.Client()
@client.event
async def on_ready(... |
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Aplicações distribuídas - Projeto 2 - lock_stub.py
Grupo: ad007
Números de aluno: 50006, 50013, 50019
"""
import net_client
class LockStub:
def __init__(self):
self.socket = None
def connect(self, host, port):
self.socket = net_client.server(hos... |
# 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... |
# -*- coding: utf-8 -*-
#############################################################################
#
# Copyright © Dragon Dollar Limited
# contact: contact@dragondollar.com
#
# This software is a collection of webservices designed to provide a secure
# and scalable framework to build e-commerce websites.
#
# This s... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SerialSet.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
|
#!/usr/bin/env python3
"""Convert .itermcolors to base24 scheme
"""
import os
import sys
import argparse
import defusedxml.ElementTree as ET
import yaml
from metprint import (
LogType,
Logger
)
import base24tools
def rgb_to_hex(rgb):
''' Converts rgb to hex '''
return '%02x%02x%02x' % rgb
def iterm2hex(root):
"... |
import os.path
import inspect
import sys
# completion types.
TYPE_IMPORT = '0'
TYPE_CLASS = '1'
TYPE_FUNCTION = '2'
TYPE_ATTR = '3'
TYPE_BUILTIN = '4'
TYPE_PARAM = '5'
def _imp(name, log=None):
try:
return __import__(name)
except:
if '.' in name:
sub = name[0:name.rfind('.')]
... |
"""
Openstack Cloud Driver
======================
:depends: `shade>=1.19.0 <https://pypi.python.org/pypi/shade>`_
OpenStack is an open source project that is in use by a number a cloud
providers, each of which have their own ways of using it.
This OpenStack driver uses a the shade python module which is managed by t... |
# Implementation of B+-tree functionality.
from index import *
# You should implement all of the static functions declared
# in the ImplementMe class and submit this (and only this!) file.
class ImplementMe:
# Returns a B+-tree obtained by inserting a key into a pre-existing
# B+-tree index if the k... |
# subprocess - Subprocesses with accessible I/O streams
#
# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
#
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details.
r"""Subprocesses with ... |
from lib.action import NapalmBaseAction
class NapalmGetEnv(NapalmBaseAction):
"""Get Environment details from a network device via NAPALM
"""
def run(self, **std_kwargs):
with self.get_driver(**std_kwargs) as device:
result = {'raw': device.get_environment()}
if self.htm... |
"""Provide a main module."""
from .app import main
if __name__ == "__main__":
main()
|
# @file HostUnitTestDscCompleteCheck.py
#
# This is a copy of DscCompleteCheck with different filtering logic.
# It should be discussed if this should be one plugin
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import logging
import os
from edk2toolext.environment.plugintype... |
from gitspindle import *
from gitspindle.ansi import *
import datetime
import getpass
import github3
import github3.gists
import glob
import os
import re
import requests
import socket
import sys
import tempfile
import time
import webbrowser
class GitHub(GitSpindle):
prog = 'git hub'
what = 'GitHub'
spindle... |
"""Save and retrieve boog data"""
from datetime import date
import os
import hashlib
import cherrypy
from random import random
from lib.variables import book_empty_default
from lib.sanity_check import sanity_check
import lib.db_books as db_books
from lib.templates import ORDER
def get_book_data(username, book_id):
... |
# coding: utf-8
"""
Add migration_indices table to database.
"""
import os
MIGRATION_INDEX = 0
MIGRATION_NAME, _ = os.path.splitext(os.path.basename(__file__))
def run(db):
# Skip migration by condition
migration_index_exists = db.session.execute("""
SELECT column_name
FROM information_schem... |
from .spectra import Spectra
from .realtime import RealTime
|
import copy
import importlib
import logging
import math
import os
import torch
import torch.distributed as dist
from torch.utils.tensorboard import SummaryWriter
from utils import distributed as udist
from utils.model_profiling import model_profiling
from utils.config import FLAGS
from utils.meters import ScalarMeter... |
#!/usr/bin/env python3
from mq_server_base import MessageQueueServerBase,MessageQueueClientBase
import argparse
import os, sys
import time
import re
import gc
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from config import config
from super_model import SuperN... |
from Jumpscale import j
def main(self):
"""
to run:
kosmos 'j.tools.logger.test(name="base")'
"""
j.shell()
|
from functools import partial
import threading
from PyQt5.QtCore import Qt, pyqtSignal, QRegExp
from PyQt5.QtGui import QRegExpValidator
from PyQt5.QtWidgets import (QVBoxLayout, QLabel, QGridLayout, QPushButton,
QHBoxLayout, QButtonGroup, QGroupBox,
QTextEdit,... |
from locust import HttpLocust, TaskSet, task
import string,random
def id_generator(size=6, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
class WebsiteTasks(TaskSet):
question_no = 1
next_btn = True
first_question = 1
last_question_no = 31
... |
from app1.models import *
from app1.util.utils import *
def addStudents(request):
'''
http://127.0.0.1:8000/app5/addStudents?sno=2019001&sname=张星新&sgender=女&dno=002
'''
try:
if(request.method=='POST'):
studata=json.loads(request.body)
data=studata["data"]
for... |
def fat(n):
if n == 0: return 1
return n * fat(n - 1)
while True:
e = str(input()).strip()
if e == '0': break
print(fat(len(e)))
|
# Classification (U)
"""Program: blackbox_libs.py
Description: Blackbox libraries for the test testing of rmq_2_sysmon.py
program.
Usage:
test/blackbox/rmq_2_sysmon/blackbox_libs.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import os
import sys
# Third-party
import... |
# type: ignore
# HTTP client functional tests against aiohttp.web server
import asyncio
import datetime
import http.cookies
import io
import json
import pathlib
import socket
import ssl
from typing import Any
from unittest import mock
import pytest
from multidict import MultiDict
from yarl import URL
import aiohttp
... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# scrapy_spider_scheduler documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are prese... |
import logging
from os import getpid
from pathlib import Path
import re
import subprocess
import threading
from time import monotonic, time, sleep
from .port_guard import PortGuard
from .util import patch_pymongo_periodic_executor, drop_all_dbs
from .util import tcp_conns_accepted_on_port, to_path
logger = logging.g... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... |
"""
used to validate listings of goods being sold
"""
class GoodsSellerValidator:
pass |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def bfeed(path):
"""data from Section 1.14
The `bfeed` data frame has ... |
'''
Created on May 11, 2012
@author: h87966
'''
from unit5.user_datastore_factory import UserDataStoreFactory
from unit5.user_data import UserData
from unit5.validation import UserSignupValidation, LoginValidation
from unit5.user_error import UserRegistrationError, LoginError,\
InvalidCookieError
from unit5.crypt ... |
# coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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... |
# import the ExponentialFunction class to use the ExponentialFunction
from ExponentialFunction import ExponentialFunction
# import array to use the array object
# Calculator class is the main class where user can choose the desired function
class Calculator:
# Calculator has one parameter
# history is an arr... |
from FamilyPropertyMS.util.Permission import ParentPermission
from django.http import JsonResponse, QueryDict
from rest_framework.views import APIView
from FamilyPropertyMS.util.Tool import send_message, response_detail
from userManage.models import User
from .models import Family, FamilyMembers, Application
# Create ... |
import pytest
def test_example():
assert True == True
|
# 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... |
"""
Data handling using Mantid
"""
import os
class ApplicationConfiguration(object):
r"""Application-level configuration
1. Selection of the mantid version and installation location:
- Version is preferred in the following order, from most to least preferred: ['4.2.0', '4.1.0', '4.0.0']
-... |
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import time
import ray
from ray.experimental.sgd.tfbench.test_model import TFBenchModel
from ray.experimental.sgd.sgd import DistributedSGD
parser = argparse.ArgumentPar... |
import boto3
import json
from .FileOs import FileOs
from botocore.exceptions import ClientError
class FileS3(FileOs):
def read_json_file(self, key):
body = self.read_file(key=key)
return json.loads(body)
def read_file(self, key):
if self.check_existence(key=key):
client = ... |
# Copyright 2018 The Cirq Developers
#
# 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.