text
stringlengths
1
927k
import setuptools setuptools.setup( name="amortized_assimilation", version="0.0.1", author="Anonymized", author_email="Anonymized", description="Learned uncertainty-aware filters for assimilation noisy high dimensional observational data", url="Anonymized", packages=['amortized_assimilation...
""" Capstone Project. Code to run on the EV3 robot (NOT on a laptop). Author: Your professors (for the framework) and Zhicheng Kai. Winter term, 2018-2019. """ import rosebot import mqtt_remote_method_calls as com import time import shared_gui_delegate_on_robot def main(): """ This code, which mu...
import os from ast import literal_eval from collections import Counter def find_groups(techniques,softwares): f = open("groupInfo.txt", "r") data = f.read() data = literal_eval(data) techniques = techniques.split(",") softwares = softwares.split(",") rate = {} for group in data: rate[group] = 0 for t...
import time from collections import defaultdict from typing import Any, Dict, Iterable, Optional, Tuple from ....models.base import model_registry from ....models.checker import Checker, CheckException from ....models.fields import ( BaseGenericRelationField, BaseRelationField, BaseTemplateField, Gener...
import random import string import pytest from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', with_zookeeper=True) node2 = cluster.add_instance('node2', with_zookeeper=True) @pytest.fixture(scope="module") def start_cluster(): try: c...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import pyopenms import copy import os from pyopenms import String as s import numpy as np print("IMPORTED ", pyopenms.__file__) try: long except NameError: long = int from functools import wraps import sys def _testStrOut...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from numpy.testing import assert_allclose from gammapy.datasets import Datasets from gammapy.modeling.tests.test_fit import MyDataset @pytest.fixture(scope="session") def datasets(): return Datasets([MyDataset(name="test-1"), MyDataset(...
# 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 under t...
#MenuTitle: Vertical Metrics Manager # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals try: from builtins import str except Exception as e: print("Warning: 'future' module not installed. Run 'sudo pip install future' in Terminal.") __doc__=""" Manage and sync ascender, descende...
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ # # Softwa...
from flask_wtf import FlaskForm from wtforms import TextAreaField, StringField, validators from wtforms.validators import DataRequired from fuzzywuzzy import fuzz, process from TA_functions import * def closest_match(search): choices = get_ta_list() return process.extract(search, choices, limit=1) def closest_5_ma...
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-09-02 20:49 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pdl', '0001_initial'), ] operations = [ migrations.AddField( mod...
""" ASGI config for seleet project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTIN...
from imports import * from plotly_graphs import * from protodash import * from insights import * from plotly_css import * import pandasql as psql import string import random import os from apps import global_explanation, local_explanation, distribution, feature_interaction, cohort from app import app from what_if impor...
default_app_config = 'apps.people.apps.PeopleConfig'
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patched by Brad Chapman. # Chris Wroe added modifications for work in myGrid """ This modul...
from __future__ import unicode_literals # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Product._meta_title' db.add_column('shop_product', '...
#!/usr/bin/env python3 # Copyright (c) 2013-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv...
from yoyo import step __transactional__ = False step( """ create table rooms ( id text primary key, name text not null, occupancy_count smallint ) """, "drop table rooms" ) step( """ create table sensors ( id text primary key, room_id text, name text, type text, data tex...
def logic(a, b): print(('a and b:', a and b)) print(('a or b:', a or b)) print(('not a:', not a))
XSym 0074 fc129c94a8bb7a7f86d859205655f4a4 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/fnmatch.py
import datetime import decimal import re import time import math from itertools import tee import django.utils.copycompat as copy from django.db import connection from django.db.models.fields.subclassing import LegacyConnection from django.db.models.query_utils import QueryWrapper from django.conf import settings fro...
""" Django settings for my_project project. Generated by 'django-admin startproject' using Django 1.10. 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/settings/ """ import o...
from PLC.Parameter import Parameter, Mixed from PLC.Method import Method, xmlrpc_type from functools import reduce class methodSignature(Method): """ Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != ...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'helppeople.settings') try: from django.core.management import execute_from_command_line except I...
""" Read from the MLB Gameday API. Base URL: https://statsapi.mlb.com/docs/#operation/stats Hitter stat URL: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting """ from typing import Dict, List from schema.player import Player from schema.team import Team import requests import utils def get_top_hitt...
import os from glob import glob def get_latest_file_change(files): latest = 0 for file in files: src = file['src'] if os.path.isdir(src): date = get_latest_file_change(list({'src': x} for x in glob(os.path.join(src, '*')))) else: date = os.path.getmtime(src) ...
import operator import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import DataFrame, Series import pandas._testing as tm class TestSeriesAnalytics: def test_prod_numpy16_bug(self): s = Series([1.0, 1.0, 1.0], index=range(3)) result = s.pro...
from typing import List, Type from django.conf import settings from django.utils.module_loading import import_module from django.utils.translation import gettext_lazy as _ class MetricsProvider: """Base class for metrics providers.""" alias: str = 'generic' title: str = 'Generic Provider' # This ca...
#!/usr/bin/env python3 from ..approximate_gp import ApproximateGP class BayesianGPLVM(ApproximateGP): """ The Gaussian Process Latent Variable Model (GPLVM) class for unsupervised learning. The class supports 1. Point estimates for latent X when prior_x = None 2. MAP Inference for X when prior_x...
import numpy import os import numpy as np import logging from theano.tensor.signal import pool from theano.tensor.nnet.abstract_conv import bilinear_upsampling import joblib from theano.tensor.nnet import conv2d from theano.tensor.nnet import relu,softmax import theano import theano.tensor as T from theano.tensor.sign...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with self work for additional information # regarding copyright ownership. The ASF licenses self file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
""" makes python operators of Attribute instances use the attribute value. the reasoning was to make attribute access less verbose and making all Attribute operators useful. NOT USED BECAUSE: - can already be done using the attr value and python zen says: There should be one-- and preferably only one --obvious way t...
import replay import torch import os from bots import interactive from models.BasicModel import BasicModel class BasicBot(interactive.Interactive): def __init__(self, channel_id, name): super().__init__(channel_id) # Load pre-trained model and set-up the bot self.model = BasicModel() path = os.pat...
# Copyright 2020 MONAI Consortium # 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, s...
""" Defines helper methods useful for setting up ports, launching servers, and handling `ngrok` """ import os import socket import threading from flask import Flask, request, jsonify, abort, send_file, render_template from flask_cachebuster import CacheBuster from flask_cors import CORS import threading import pkg_res...
# flake8: noqa import os from .common import * # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ['DJANGO_SECRET_KEY'] # SECURITY WARNING: do...
from . import base class Section(base.SectionBase): @base.returns_single_item def wantlist(self, peer=None, **kwargs): """Returns blocks currently on the bitswap wantlist. .. code-block:: python >>> client.bitswap.wantlist() {'Keys': [ 'QmeV6C6XVt1wf7V7as7Yak3mxPma8jzpqyhtRtCvpKcfBb', 'QmdCW...
import unittest from clock import ( Clock, ) # Tests adapted from `problem-specifications//canonical-data.json` class ClockTest(unittest.TestCase): # Create A New Clock With An Initial Time def test_on_the_hour(self): self.assertEqual(str(Clock(8, 0)), "08:00") def test_past_the_hour(self):...
# coding: utf-8 # flake8: noqa """ Run the tests. $ pip install nose (optional) $ cd OpenAPIPetstore-python $ nosetests -v """ from collections import namedtuple import json import os import time import unittest import datetime import six import petstore_api from petstore_api.exceptions import ( ApiTypeError, ...
import os import sys import argparse import pickle import subprocess from time import sleep ''' Multiple GPUs and processes script for monocular 3D Tracking ''' def parse_args(): parser = argparse.ArgumentParser(description='Monocular 3D Estimation', formatter_class=argparse.ArgumentDefaul...
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 import logging import click from click import echo, style from sqlalchemy.exc import OperationalError import datacube from datacube.index impo...
import _plotly_utils.basevalidators class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="mesh3d.colorbar", **kwargs): super(TicktextValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_na...
''' This example demonstrates creating and using an AdvancedEffectBase. In this case, we use it to efficiently pass the touch coordinates into the shader. ''' from kivy.base import runTouchApp from kivy.properties import ListProperty from kivy.lang import Builder from kivy.uix.effectwidget import EffectWidget, Advance...
#!/usr/bin/env python import os.path as osp import re from setuptools import setup, find_packages import sys def get_script_path(): return osp.dirname(osp.realpath(sys.argv[0])) def read(*parts): return open(osp.join(get_script_path(), *parts)).read() def find_version(*parts): vers_file = read(*parts)...
n = int(input()) l = list(map(int, input().split())) ans = [] l = sorted(l) ans = [l[-1]] + l[1:(n-1)] + [l[0]] print(*ans)
import re import os import imp import sys import json import uuid import time import base64 import logging import zipfile import threading import traceback import hashlib from io import BytesIO from datetime import datetime from six.moves import cStringIO as StringIO from six.moves.urllib.parse import urlparse from fla...
# Generated by Django 2.2.4 on 2021-01-02 08:08 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(...
import numpy as np import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import trianglesCore as tc def draw(*surfaces, figure_size_tuple=(15,15)): sizex, sizey = figure_size_tuple matplotlib.rcParams['figure.figsize'] = [sizex, sizey] # necessary adjustment if `draw`...
# inspired from: # https://python-packaging-user-guide.readthedocs.io/guides/single-sourcing-package-version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py # pylint:disable=line-too-long __title__ = "snips_nlu" __summary__ = "Snips Natural Language Understanding library" __github_url__ = "htt...
from django.db import models from rest_framework import serializers class Tag(models.Model): """ Post tag model """ name = models.CharField(max_length=50, unique=True, primary_key=True) backend_tag = models.BooleanField(default=False) def __str__(self): return self.name class TagSer...
import pdb import logging import m_conf as conf logging.basicConfig() logger = logging.getLogger('fourcheball_daemon') logger.setLevel(conf.get_logger_level()) logger.info('Init daemon') while True: logger.debug('Run 1') raw_input() # dev purpose sleep(3)
# -*- coding: utf-8 -*- # Copyright 2019 Cohesity Inc. class VirtualDiskId(object): """Implementation of the 'Virtual Disk Id.' model. Specifies information about virtual disk which includes disk uuid, controller type, bus number and unit number. Attributes: bus_number (long|int): Specifies...
from django.urls import path from . import views urlpatterns = [ path('signup/', views.signup, name='signup'), path('login/', views.login_func, name='login'), path('logout/', views.logout_func, name='logout'), path('profile/', views.profile, name='profile'), ]
from django_evolution.mutations import AddField from django.db import models MUTATIONS = [ AddField('Repository', 'review_groups', models.ManyToManyField, related_model='reviews.Group'), AddField('Repository', 'public', models.BooleanField, initial=True), AddField('Repository', 'users', model...
from rest_framework import serializers from django.contrib.auth.models import User from .models import Product class ProductSerializer(serializers.ModelSerializer): class Meta: model = Product fields = '__all__'
from xml.etree import ElementTree as ET from enum import Enum class VariableLabel: def __init__(self, id=None, name=None): self.id = id self.name = name self.methods = [] def getMethod(self, searchFor): if type(searchFor) == str: for method in self.methods: ...
# Copyright 2019 D-Wave 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 law or...
# -*- coding: utf-8 -*- import torch # N is batch size; D_in is input dimension; # H is hidden dimension; D_out is output dimension. N, D_in, H, D_out = 64, 1000, 100, 10 # Create random Tensors to hold inputs and outputs x = torch.randn(N, D_in) y = torch.randn(N, D_out) # Use the nn package to define our model and...
import os import sys import glob script, boostDir, vcVer, vcDir, arch, runtimeLink, config, stageDir, logFilePath, guardFileBase, guardFilePath = sys.argv # For this to work, modify tools\build\v2\tools\msvc.jam with this: # # local rule auto-detect-toolset-versions ( ) # { # # pynja: add explicit control o...
import requests import jesse.helpers as jh from jesse import exceptions from jesse.modes.import_candles_mode.drivers.interface import CandleExchange class BinanceFutures(CandleExchange): def __init__(self) -> None: # import here instead of the top of the file to prevent possible the circular imports issu...
from operator import attrgetter import numpy as np from skmultiflow.core import MultiOutputMixin from skmultiflow.trees import iSOUPTreeRegressor from skmultiflow.utils import get_dimensions from skmultiflow.trees.split_criterion import IntraClusterVarianceReductionSplitCriterion from skmultiflow.trees.nodes import ...
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic...
import pytest from indy import IndyError from indy import wallet from indy.error import ErrorCode @pytest.mark.asyncio @pytest.mark.parametrize("wallet_config", [None, '{"freshness_time":1000}']) async def test_open_wallet_works(wallet_config, wallet_handle): pass @pytest.mark.asyncio async def test_open_walle...
import numpy as np from numba import cuda from . import cudautils, utils from .serialize import register_distributed_serializer class Buffer(object): """A 1D gpu buffer. """ _cached_ipch = None @classmethod def from_empty(cls, mem): """From empty device array """ return c...
from holland.backup.pgdump.interface import PgDump
import torchvision import torchvision.transforms as transforms import torch import torch.utils.data import resnet from torch.autograd import Variable from torch import nn import early_stop from tqdm import tqdm import os,sys import numpy as np os.environ["CUDA_VISIBLE_DEVICES"] = "2" train_globa_step=0 val_globa_ste...
# # Copyright 2021 Splunk 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 writing, so...
import yaml def parse_settings(settings_file: str) -> dict: """ The function parses settings file into dict Parameters ---------- settings_file : str File with the model settings, must be in yaml. Returns ------- ydict : dict Parsed settings used for m...
"""Mix-In Class to Export Decorated Methods using SOAP This file is not a Zope2 Product nor a Zope3 component. It is a simple Python module that adds two elements: a hook into the Zope publisher to intercept SOAP requests, and a mix-in class to your Zope2 folder classes that make them SOAP-aware, with que...
#!/usr/bin/env python # coding: utf-8 # In[1]: ## Python basics for novice data scientists, supported by Wagatsuma Lab@Kyutech # # The MIT License (MIT): Copyright (c) 2020 Hiroaki Wagatsuma and Wagatsuma Lab@Kyutech # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software ...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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,...
import json import nltk.data from flask import Flask from flask import escape from flask import Markup from flask import render_template from flask import request #from flask import send_static_file from flask_cors import CORS from nltk.sentiment.vader import SentimentIntensityAnalyzer app = Flask(__name__) CORS(app) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # read the contents of your README file from os import path from setuptools import setup this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="pysas...
""" A simple demo of the environment. Usage: python3 -m shrdlu_blocks.demo The environment will be displayed in a graphics window. The user can type various commands into the graphics window to query the scene and control the grasper. Type `help` to get a list of commands. """ import ast import io import logging...
from mp4box.box import MediaHeaderBox def parse_mdhd(reader, my_size): version = reader.read32() box = MediaHeaderBox(my_size, version, 0) if version == 0: box.creation_time = reader.read32() box.modification_time = reader.read32() box.timescale = reader.read32() box.durati...
# 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 ...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Gnutls(AutotoolsPackage): """GnuTLS is a secure communications library implementing the SS...
from pprint import pprint class Apriori(object): def __init__(self, data, minSupport = 0.7, minConf = 0.5): def calcConf(freqSet, H, supD, ans): prunedH = [] for conseq in H: conf = supD[freqSet] / supD[freqSet - conseq] if conf >= minCo...
from flask_cors import cross_origin from flask import request, jsonify from flask import current_app as app from api.controllers.beach_controller import BeachController @app.route('/api/beaches', methods=['GET']) @cross_origin() def get_all_beaches(): return jsonify(BeachController.get_all_beaches()) @app.route...
import turicreate as tc # Inferring using original Darknet-YOLO model handsModel = tc.load_model('Hands') # Evaluate the model and save the results into a dictionary test_data = tc.SFrame('test.sframe') metrics = handsModel.evaluate(test_data) print(metrics)
from paraview.simple import * from paraview import coprocessing #-------------------------------------------------------------- # Code generated from cpstate.py to create the CoProcessor. # ParaView 4.2.0-15-g46ac001 64 bits # ----------------------- CoProcessor definition ----------------------- def CreateCoProce...
# Copyright (c) 2015 Microsoft Corporation from z3 import * x = Real('x') y = Real('y') g = Goal() g.add(x > 10, y == x + 1) g.add(y > 1) print Probe('num-consts')(g) print Probe('size')(g) print Probe('num-exprs')(g)
import requests import json import datetime as dt from typing import Dict, Union, List, Optional from src.typeDefs.scadaApiDataSample import IScadaApiDataSample import pandas as pd import random class ScadaApiFetcher(): apiHost: str = '' apiPort: int = 80 isDummyFetch: bool = False def __init__(self,...
# File generated from our OpenAPI spec from __future__ import absolute_import, division, print_function from stripe import util from stripe.api_resources.abstract import CreateableAPIResource from stripe.api_resources.abstract import ListableAPIResource from stripe.api_resources.abstract import UpdateableAPIResource f...
"""Add slate information dynamically.""" import os from tempfile import mkdtemp from photoshop import Session with Session() as adobe: doc = adobe.app.documents.add(2000, 2000) text_color = adobe.SolidColor() text_color.rgb.red = 255 new_text_layer = doc.artLayers.add() new_text_layer.kind = adob...
# -*- encoding: utf-8 -*- from django.contrib.syndication.views import Feed from .models import Article class AllArticleRssFeed(Feed): title = '个人博客' link = '/' # 需要显示的条目 def items(self): return Article.objects.all()[:5] # 显示内容的标题 def item_title(self, item): return '[%s] %s'...
from rlkit.torch.sac.policies import TanhGaussianPolicy # from rlkit.torch.sac.sac import SoftActorCritic from rlkit.torch.networks import FlattenMlp import numpy as np from .rl_algorithm import RL_algorithm from rlkit.torch.sac.sac import SACTrainer as SoftActorCritic_rlkit import rlkit.torch.pytorch_util as ptu impor...
from settings import * from MazeRender import coin_collision from time import time class Player: def __init__(self, app): """initialize the player""" self.app = app self.player_color = self.app.settings['color'] self.player_speed = PLAYER_SPEED self.make_player() se...
import requests import tkinter as tk from tkinter import ttk def calculate_conversion(): # URL of respective API url = "https://api.exchangerate-api.com/v4/latest/INR" # Receive Data from API data = requests.get(url).json() currency_rates = data['rates'] # get From amount from GUI amount...
from pydip.player.player import Player from pydip.player.unit import UnitTypes, Unit
# Generated by Django 3.2.5 on 2021-08-02 10:10 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('profiles', '0002_alter_profile_profile_picture'), ] ...
from __future__ import division, print_function, absolute_import import numpy as np from scipy.optimize import minimize_scalar, brentq from ..constants import Na def dPsaft_fun(rho, x, temp_aux, saft): rhomolecular = Na * rho global Xass da, Xass = saft.d2afcn_drho_aux(x, rhomolecular, temp_aux, Xass) ...
from websocket_manager import WebsocketManager class HuobiWsManagerFactory(): def get_ws_manager(self, symbol: str): """Jay""" book_url = "wss://api-aws.huobi.pro/feed" trades_url = 'wss://api-aws.huobi.pro/ws' # Subscribe to channels def subscribe_book(ws_manager): ...
import ray from ray import tune import gym from align_rudder.learning.q_learning import Qlearning import numpy as np import random import os import pkg_resources import shutil config = { 'env_id': 'align_rudder:EightRooms-v0', # environment for the experiment 'exp_name': 'align-rudder', # name of the experim...
day = input() if day == "Monday" or day == "Tuesday" or day == "Wednesday" or day == "Thursday" or day == "Friday": print("Work day") elif day == "Saturday" or day == "Sunday": print("Weekend") else: print("Error")
'''Some helper functions for PyTorch, including: - get_mean_and_std: calculate the mean and std value of dataset. - msr_init: net parameter initialization. - progress_bar: progress bar mimic xlua.progress. ''' import os import sys import time import math import numpy as np from numpy import linalg as LA im...
""" WSGI config for dan3103_1_1 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_S...
import threading, atexit, sys try: from thread import start_new_thread except: from _thread import start_new_thread def _atexit(): print('TEST SUCEEDED') sys.stderr.write('TEST SUCEEDED\n') sys.stderr.flush() sys.stdout.flush() # Register the TEST SUCEEDED msg to the exit of the process...
from weconnect_cli.weconnect_cli_base import main if __name__ == '__main__': main()