text
stringlengths
2
999k
# Copyright 2019, The Emissions API Developers # https://emissions-api.org # This software is available under the terms of an MIT license. # See LICENSE fore more information. class RESTParamError(ValueError): """User-specific exception, used in :func:`~emissionsapi.utils.polygon_to_wkt`. """ pass def b...
from sys import stderr class Logger: ERROR=0 QUIET=0 BASIC=1 WARNING=2 DETAIL=3 DEBUG=4 io_level = 0 @classmethod def set_io_level(cls, lev): cls.io_level = lev @classmethod def basic(cls, message): if cls.io_level >= cls.BASIC: print(message) ...
from binascii import unhexlify from json import JSONDecodeError, loads from sys import version_info from unittest import SkipTest, TestCase, skipIf from urllib.error import URLError from urllib.request import urlopen from fastecdsa.curve import ( P224, P256, P384, P521, brainpoolP224r1, brainpoolP256r1, brainp...
import numpy as np class DQN(object): def __init__(self, max_memory=100, discount=0.9): self.memory = list() self.max_memory = max_memory self.discount = discount def remember(self, transition, game_over): self.memory.append([transition, game_over]) if len(self.memory) ...
from django import forms from .models import User class UserForm(forms.ModelForm): class Meta: model = User fields = [ 'first_name', 'last_name', 'email', 'username', 'password', 'finance_id', 'end_date', ...
""" MIT License Copyright (c) 2021 TheHamkerCat 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, ...
from tkinter import Entry, Label, Frame, Tk, filedialog, Misc from tkinter import * import os #listeler from typing import Any, Union ekleme = ["1","2","3","4","5","6","7","8","9","0","01","02","03","04","05","06","07","08","09","10","11","12","123", "001","002","003","007","1903","1905","1907","1954","1963",...
import os import requests from flask import Flask, request, url_for, redirect, render_template, abort, g, flash, _app_ctx_stack, send_from_directory from flask_restful import reqparse, abort, Api, Resource from flask_pymongo import PyMongo app = Flask(__name__) api = Api(app) # Setup Mongo app.config["MONGO_URI"] = o...
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compil...
from subprocess import call from os import path import hitchpostgres import hitchselenium import hitchpython import hitchserve import hitchredis import hitchtest import hitchsmtp # Get directory above this file PROJECT_DIRECTORY = path.abspath(path.join(path.dirname(__file__), '..')) class ExecutionEngine(hitchtest...
import matplotlib import matplotlib.pyplot as plt import numpy as np import os import sys import platform from math import exp ######################################################################### # TDSpectrum # # Made by: Leonardo Israel Lu...
# coding: utf-8 # flake8: noqa """ Companies No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import # im...
""" Interpolates OMI data to leo trajectory """ import os, sys from datetime import date, datetime, timedelta from dateutil.parser import parse as isoparser from dateutil.relativedelta import relativedelta import numpy as np from glob import glob impo...
from tkinter import Button, W, StringVar # Default variables operation: str = '' isInputNumeric: bool = False # Render numeric buttons def render_button(data, frame, text, row, column): button = Button( frame, text=text, width=3, height=3, command=lambda: enter_data(data,...
from django.conf.urls import url from front_end.views.api import api_index urlpatterns = [ url(r'^index/', api_index, name='api_index'), ]
salario = float(input("Digite seu salario: ")) if salario >= 1250.00: aumento = salario + (0.1 * salario) print("o seu salario agora é de: {}".format(aumento)) else: aumento = salario + (0.15 * salario) print("o seu salario agora é de: {}".format(aumento))
from falcon.testing import Result, TestClient from sustainerds.api.entities.user.model import UserDbModel ############################################################################### # model tests ############################################################################### def test_something(): d = UserDbM...
from collections import defaultdict from collections import deque, OrderedDict from itertools import islice import numpy as np import matplotlib.pyplot as plt import random from softlearning.samplers.cpo_sampler import CpoSampler from softlearning.policies.safe_utils.logx import EpochLogger from softlearning.policies...
import datetime import time import logging from ..utils import to_amazon_timestamp from ..parsers.reports import RequestReportResponse, GetReportRequestListResponse from .base import raise_for_error from ..mws_overrides import OverrideReports class ReportFailedError(ValueError): def __init__(self, report_reques...
# 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...
# coding:utf8 import sys import subprocess # Adapted from Eric IDE's install.py script def pip_install(package_name, message): """ Install the given package via pip. @param package_name name of the package to be installed @type str @param message message to be shown to the user @type str ...
#!/usr/bin/env python """ Generates images that resemble input images. Stacked denoising autoencoder-style neural network code using theano. Written with reference to tutorial code from: https://github.com/lisa-lab/DeepLearningTutorials.git Tutorial page: http://deeplearning.net/tutorial/SdA.html """ import os i...
#!/usr/bin/env python3 from cereal import car from panda import Panda from selfdrive.car.tesla.values import CANBUS, CAR from selfdrive.car import STD_CARGO_KG, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness, get_safety_config from selfdrive.car.interfaces import CarInterfaceBase from common.dp_common i...
import json import os import csv users = [] for filename in os.listdir('./Features/'): with open('./Features/' + filename) as json_file: data = json.load(json_file) try: big5 = data['personality'] user = { 'Name' : filename[:-5]} for i in big5: use...
''' Copyright 2020 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the "license" file accompanying this...
# Generated by Django 3.0.3 on 2020-08-25 06:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sequence', '0001_initial'), ] operations = [ migrations.AlterField( model_name='transporttype', name='description', ...
# Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved # encoding: 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 'Experiment.plan' db.add...
#!/usr/bin/env python # coding: utf-8 # Copyright 2017 The Crashpad 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/LICEN...
import enum import time from collections import defaultdict from contextlib import contextmanager from typing import TYPE_CHECKING from typing import Callable from typing import Dict from typing import List from typing import Optional from typing import Tuple from typing import Union from cleo.io.io import IO from p...
__author__ = 'achamseddine' from django.core.management.base import BaseCommand from internos.activityinfo.tasks import migrate_tag class Command(BaseCommand): help = 'migrate_tag' def add_arguments(self, parser): parser.add_argument('--from_tag', default=None) parser.add_argument('--to_tag'...
import numpy as np import matplotlib.pyplot as plt def readData(csvname): data = np.loadtxt(csvname, delimiter=',') x = data[:-1, :] y = data[-1:, :] return x, y fot = lambda x : np.exp(-x) / (1 + np.exp(-x)) sot = lambda x : ( 1 / (1 + np.exp(x))) * (1 - ( 1 / (1 + np.exp(x)))) # power is y_p * x_p...
import discord, sqlite3 from discord.ext import commands import modules.member_helper as helper import modules.sql_init as sqlinit sql = sqlinit.SQLInit() class Quote(): def __init__(self, bot): self.bot = bot @commands.command() async def quote(self, *, author : str = "Mitt Romney"):...
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the RPC call related to the uptime command. Test corresponds to code in rpc/server.cpp. """ impo...
import time import weatherhat sensor = weatherhat.WeatherHAT() print(f""" basic.py - Basic example showing how to read Weather HAT's sensors. Press Ctrl+C to exit! """) while True: sensor.update(interval=60.0) wind_direction_cardinal = sensor.degrees_to_cardinal(sensor.wind_direction) print(f""" Syst...
from . import compat have_greenlet = False if compat.py3k: try: import greenlet # noqa F401 except ImportError: pass else: have_greenlet = True from ._concurrency_py3k import await_only from ._concurrency_py3k import await_fallback from ._concurrency_py3k i...
import serial ser = serial.Serial('COM7',115200, timeout=1) while True: print("R: ", ser.readline())
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'tim'
# -*- coding: utf-8 -*- """ Created on Tue Oct 20 18:27:37 2020 @author: xyz """ info = open("hours.txt") listOfLines = info.readlines() print(listOfLines) print(listOfLines[0]) print(listOfLines[1]) print(listOfLines[2])
# Copyright 2019, OpenTelemetry 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 i...
from distutils.core import setup setup( name='doge', version='3.4.0', url='https://github.com/thiderman/doge', author='Lowe Thiderman', author_email='lowe.thiderman@gmail.com', description=('wow very terminal doge'), license='MIT', packages=['doge'], package_data={'doge': ['static/*...
"""Dev setttings.""" from .base import * import os STATIC_ROOT = os.path.join(BASE_DIR, 'www') HOST = 'http://localhost:8000'
import spacy as spacy_en import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer import pickle import os model = spacy_en.load('en_core_web_md') def clean_my_text(song): """ It filters punctuation, numbers, stop word and ret...
from unittest import mock import numpy as np import pytest from autocnet.matcher import cpu_ring_matcher as rm @pytest.mark.parametrize('arr, expected', [ (np.array([[1,0],[1,1], [2,3]]), (1,2)), (np.array([[0,0], [1,1], [2,2]]), (3,2) )]) def...
# -*- coding: utf-8 -*- # Copyright (c) 2021 Brian Scholer (@briantist) # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils.basic import AnsibleModule ...
# from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python logging. # This line sets up logge...
# pylint: disable = C0103, C0111, C0301, R0914 """Model definitions for celebA This file is partially based on https://github.com/carpedm20/DCGAN-tensorflow/blob/master/main.py https://github.com/carpedm20/DCGAN-tensorflow/blob/master/model.py They come with the following license: https://github.com/carpedm20/DCGAN-...
from string import ascii_uppercase from typing import List from ... import BaseProvider class Provider(BaseProvider): """Implement automotive provider for ``en_PH`` locale. Vehicle registration in the Philippines has many controversies and is full of quirks. On top of that, some terms are highly subject...
def resolve(): ''' code here ''' from functools import lru_cache N = int(input()) @lru_cache(maxsize=10000000) def fina(n): if n == 0: return 1 if n == 1: return 1 return fina(n-1) + fina(n-2) print(fina(N)) if __name__ ==...
from pyrogram import * from pyrogram.types import * import requests from requests_html import HTMLSession from bs4 import BeautifulSoup import sys # Getting currently airing Anime from the API # Returns an "Inline Keyboard List" of Currently airing Anime def airing_eps(client, message): url = f"https://gogoanime2...
x1, y1 = input().split() x2, y2 = input().split() if x1 == x2 and y1 == y2: print("Soltar pacote") else: print("Nao soltar pacote")
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class GetAcc...
#coding=utf-8 ''' Created on 2015-6-10 @author: Devuser ''' from doraemon.automationtesting.models import AutoTaskQueue class DAL_AutoTaskQueue(object): @staticmethod def add_task_inqueue(queuetask): queuetask.save()
from tkinter import Frame,Label,Button,Menu class Application(Frame): def __init__(self, master=None,): Frame.__init__(self, master) #窗口大小位置 self.pack() self.createWidgets() menu = self.creatMenu() self.master.config(menu=menu) def creatMenu(self): ...
from inspect import trace from fastapi import APIRouter, Depends, status, Response from typing import Optional from pydantic import BaseModel from core.config import ( ALLOWED_HOSTS, PROJECT_NAME, PROJECT_VERSION, API_PORT, DATABASE_NAME, NER_LABEL_COLLECTION, Feedback_Template_Collection...
#!/usr/bin/env python3 import argparse import copy from datetime import datetime from distutils.util import strtobool from distutils.version import LooseVersion import functools import os import pathlib import shutil import signal import subprocess import sys import tempfile import torch from torch.utils import cpp_e...
import numpy as np from sklearn.base import BaseEstimator, RegressorMixin from sklearn.utils.validation import check_X_y from fireTS.utils import shift, MetaLagFeatureProcessor from sklearn.model_selection import GridSearchCV class TimeSeriesRegressor(BaseEstimator, RegressorMixin): """ TimeSeriesReg...
import logging from typing import Any, Optional, Text, Tuple, Union from rasa.nlu import config from rasa.nlu.components import ComponentBuilder from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.model import Interpreter, Trainer from rasa.nlu.training_data import load_data from rasa.nlu.training_data.loadin...
import _plotly_utils.basevalidators class TickformatValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="contour.colorbar", **kwargs ): super(TickformatValidator, self).__init__( plotly_name=plotly_name, par...
"""Implementation of the semi-Lagrangian method of Germann et al (2002).""" import numpy as np import scipy.ndimage.interpolation as ip import time def extrapolate(R, V, num_timesteps, outval=np.nan, **kwargs): """Apply semi-Lagrangian extrapolation to a two-dimensional precipitation field. Parameters ...
from typing import List from shapely.geometry import Point, MultiPoint, Polygon, MultiPolygon, LineString, MultiLineString from shapely.geometry.base import BaseGeometry def assign_all() -> bool: geoms = [Point, MultiPoint, Polygon, MultiPolygon, LineString, MultiLineString] assign_udt_shapely_objects(geoms=...
from threading import Thread from unittest import TestCase, main from expects import expect, be_false, be_true from twin_sister import close_all_dependency_contexts, dependency, \ open_dependency_context from twin_sister.injection.singleton_class import SingletonClass class Canary: def __init__(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=44 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
n1 = int(input('Digite o primeiro valor: ')) n2 = int(input('Digite o segundo valor: ')) # print('A Soma entre', n1, 'e', str(n2) + ', vale', n1 + n2) print(f'A Soma entre {n1} e {n2}, vale {n1 + n2}') # Exercícios: 3 e 4
# Example to display raw packets including header # Author: Jerry Needell # import board import busio import digitalio import adafruit_rfm9x # Define radio parameters. RADIO_FREQ_MHZ = 915.0 # Frequency of the radio in Mhz. Must match your # module! Can be a value like 915.0, 433.0, etc. # Define pins connected to t...
import unittest from unittest.mock import MagicMock, patch from aioredis_models.redis_client import RedisClient class RedisClientTests(unittest.TestCase): @staticmethod def test_init_succeeds(): RedisClient(MagicMock()) def test_get_connection_when_no_transaction_started_returns_redis(self): ...
import os import sys import logging logging.basicConfig(format='%(asctime)s %(levelname)-8s [%(process)d] %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') import numpy as np from sklearn import preprocessing from sklearn.model_selection import GridSearchCV from sklearn.metrics import accuracy_score _c...
# All rights reserved. """ Heroku manager for your userbot """ import heroku3 import asyncio import os import requests import math from userbot.utils import register from userbot.utils import admin_cmd Heroku = heroku3.from_key(Var.HEROKU_API_KEY) heroku_api = "https://api.heroku.com" @register(outgoing=True, p...
import os.path import subprocess import sublime from xml.etree.ElementTree import Element, SubElement, tostring, parse class ColtPreferences(object): NAME = "Preferences.sublime-settings" def isColtFile(view): if view.file_name() is None : return False filename = view.file_na...
""" test_domain_py ~~~~~~~~~~~~~~ Tests the Python Domain :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from unittest.mock import Mock import pytest from docutils import nodes from sphinx import addnodes from sphinx.addnodes import ...
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import GenericRepr, Snapshot snapshots = Snapshot() snapshots['test_definition_parser_raises_error_schema_str_contains_multiple_types 1'] = GenericRepr("<ExceptionInfo ValueError('MyType clas...
# Authors: Manoj Kumar <manojkumarsivaraj334@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Joel Nothman <joel.nothman@gmail.com> # License: BSD 3 clause import warnings import numbers import numpy as np from scipy import sparse from math import sqrt from ..me...
# Take the size and list of elements of a list as input. Create a tuple with the elements and # their cubes. Print the tuple. lst = [] n = eval(input("Enter the number of element in a list: ")) print("Enter the elements of the list: ") for i in range(n): num = eval(input()) lst.append(num) print(f"T...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
#!/usr/bin/env python # coding: utf-8 # # Optimization # In[101]: import numpy as np import matplotlib.pyplot as plt from scipy import stats # These are some parameters to make figures nice (and big) #%matplotlib inline #%config InlineBackend.figure_format = 'retina' params = {'legend.fontsize': 'x-large', ...
import logging import numpy as np from smarts.core.agent import Agent, AgentSpec from smarts.core.agent_interface import AgentInterface from smarts.core.controllers import ActionSpaceType from smarts.zoo.registry import register class PoseBoidAgent(Agent): def __init__(self): self._log = logging.getLogg...
import time from absl import app, flags, logging from absl.flags import FLAGS import os import numpy as np import argparse import pandas as pd import cv2 import csv from sklearn.metrics import classification_report, confusion_matrix from normalizer import Normalizer import tensorflow as tf config = tf.compat.v1.Config...
# -*- coding: utf-8 -*- # # django-audit-log documentation build configuration file, created by # sphinx-quickstart on Wed Apr 6 10:51:31 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
""" Django settings for crowdfundadmin project. Generated by 'django-admin startproject' using Django 2.1.1. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ impor...
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
# Exercise 6.6 from random import random def count(aList, x): countTimes = 0 for item in aList: if item == x: countTimes += 1 return countTimes def isIn(aList, x): for item in aList: if item == x: return True return False def getIndex(aList, x...
import pytest # type: ignore from snyk.client import SnykClient from snyk.errors import SnykError from snyk.managers import Manager from snyk.models import Organization, Project class TestManager(object): @pytest.fixture def client(self): return SnykClient("token") def test_factory(self, client...
import abc import math import six import warnings from optuna import distributions from optuna import logging from optuna import type_checking if type_checking.TYPE_CHECKING: from typing import Any # NOQA from typing import Dict # NOQA from typing import Optional # NOQA from typing import Sequence ...
import logging import gym from smarts.core.utils.episodes import episodes from smarts.core.agent_interface import AgentInterface, AgentType from smarts.core.agent import AgentSpec, Agent from examples import default_argument_parser logging.basicConfig(level=logging.INFO) AGENT_ID = "Agent-007" class KeepLaneAge...
from setuptools import setup, find_packages import glob setup(name='loki', version='0.1', packages=find_packages(), scripts=glob.glob("scripts/*.py") )
import pytest import PIL from rhizo.extensions.camera import encode_image from flow.blocks.filters.brightness import Brightness from flow.blocks.filters.blur import Blur from flow.blocks.filters.sma import SimpleMovingAverage from flow.blocks.filters.ema import ExponentialMovingAverage brightness = Brightness(None) b...
import logging import pathlib import re from abc import ABC from dataclasses import dataclass, field from re import Pattern from typing import Iterable, Optional, List, Dict, Union, Tuple, Callable from prompt_toolkit import PromptSession as PTSession from prompt_toolkit.auto_suggest import AutoSuggestFromHistory from...
from .base_exercice import BaseExercice from LeFramework.common.objs import * from LeFramework.common.regulators import Timer from rlbot.utils.structures.game_data_struct import GameTickPacket class NormalGameExercice(BaseExercice): def vars(self): self.timer.set_stop() def reward(self, packet): """ :retu...
import tensorflow as tf import keras import numpy as np import matplotlib.pyplot as plt import seaborn as sb import sys sys.setrecursionlimit(100000) fashion = keras.datasets.fashion_mnist (train_images, train_labels), (test_images, test_labels) = fashion.load_data() class_names = ['T-shirt/top', 'Trouser'...
# pylint: disable=missing-docstring import os import unittest import numpy as np import tensorflow as tf from tensorflow.python.framework import errors from tensorflow.python.framework.errors import NotFoundError import tf_encrypted as tfe dirname = os.path.dirname(tfe.__file__) so_name = "{dn}/operations/secure_ran...
"""All settings common to debug and production""" import os from sys import path # Staging tag, when DEBUG is false and this true allows some unsafe behaviour. STAGING = False FAKER_LOCALE = 'en_GB' RANDOM_SEED = 'The quick brown fox jumped over the lazy ocean diver' # Make HTTPResponse do unicode DEFAULT_CHARSET ...
import abc from collections import OrderedDict class ControlArchitecture(abc.ABC): def __init__(self, robot): self._robot = robot self._state = 0 self._prev_state = 0 self._state_machine = OrderedDict() self._trajectory_managers = OrderedDict() self._hierarchy_manan...
#!/usr/bin/env python3 from collections import namedtuple import pickle import itertools as it from os.path import join, exists from glob import glob import csv AttackRun = namedtuple("AttackRun", ("dataset", "bounds", "method", "recenter", "N", "d","seed", "success", "time", "block_size", "info", "liars", "real_info"...
# -*- coding: utf-8 -*- # # Copyright 2017-2020 Data61, CSIRO # # 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 ...
__version__ = "1.0.1" import logging logger = logging.getLogger(__name__) from .bindings import Detector, Detection
from .airos import AirOS from .base import SNMP from .openwrt import OpenWRT __all__ = ['SNMP', 'OpenWRT', 'AirOS']
""" A pytest module to test instantiation of new Galois field arrays. """ import random import pytest import numpy as np import galois from ..helper import array_equal DTYPES = galois.dtypes.DTYPES + [np.object_] def test_cant_instantiate_GF(): v = [0, 1, 0, 1] with pytest.raises(NotImplementedError): ...
# -*- coding: utf-8 -*- """ Created on Mon Aug 9 20:15:24 2021 @author: Divyabrata """ repeatQueue=[[0,0]] c=0 class MissCann: def __init__(self,a,b,c): self.leftState=a self.rightState=b self.boat=c self.carry=[(2,0,0),(1,0,0),(1,1,0),(0,1,0),(0,2,0)] ...
# Copyright (c) 2019 Eric Steinberger import copy import numpy as np import sys from PokerRL.game._.tree.MCPublicTree import MCPublicTree from PokerRL.game.wrappers import HistoryEnvBuilder from PokerRL.rl.rl_util import get_env_cls_from_str class MCCFRBase: """ base class to all full-width (i.e. non MC) ...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from ax.service.utils import early_stopping as early_stopping_utils from ax.utils.common.testutils import TestCase from ax.utils.testing.cor...
from typing import Tuple from loguru import logger from numpy.core.numeric import roll from annotation_driven_dataframe_calcs.caching_tools import LRU from annotation_driven_dataframe_calcs.column_names import ( ACCOUNT_NO, PARAM_A, PARAM_B, PARAM_C, SERIES_A_PRIME, TIMESTEP_NO, ) import pandas...