text
stringlengths
1
927k
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
#!/usr/bin/env python3 # 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. from mephisto.abstractions.blueprint import ( Blueprint, OnboardingRequired, BlueprintArgs, SharedTaskSt...
# Copyright 2011 Cloudscaling Group, 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 applicabl...
import pytest import os import tempfile import numpy as np from numpy.testing import assert_allclose from keras.models import Model, Sequential from keras.layers import Dense, Dropout, Lambda, RepeatVector, TimeDistributed from keras.layers import Input from keras import optimizers from keras import objectives from ke...
"""personalGallery URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') ...
from __future__ import print_function import argparse as ap import os import multiprocessing def get_args(): parser = ap.ArgumentParser( description="General manager for durham grid storage") parser.add_argument( "directories", help="gfal directories to look in", nargs="*") ...
from invoke import task @task def clean(ctx): """Remove virtual environement""" ctx.run("pipenv --rm", warn=True) @task def init(ctx): """Install production dependencies""" ctx.run("pipenv install --deploy") @task def init_dev(ctx): """Install development dependencies""" ctx.run("pipenv in...
# Generated by Django 3.1.3 on 2020-11-26 16:19 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0014_auto_20201126_1943'), ] operations = [ migrations.AddField( model_name='reservation', n...
VAX_DASH_URL = ( 'https://www.presidentsoffice.gov.lk/index.php/vaccination-dashboard/' ) REMOTE_DATA_DIR = 'https://raw.githubusercontent.com/nuuuwan/covid19/data' CACHE_NAME = 'covid19.lk_vax_centers' CACHE_DIR = '/Users/nuwan.senaratna/Not.Dropbox/_CACHE' CACHE_TIMEOUT = 86400 * 90
""" There are people sitting in a circular fashion, print every third member while removing them, the next counter starts immediately after the member is removed. Print till all the members are exhausted. For example: Input: consider 123456789 members sitting in a circular fashion, Output: 369485271 """ def josephus...
"""Tests for MPA Class-Incremental Learning for semantic segmentation with OTE CLI""" # Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # import os import pytest from ote_sdk.test_suite.e2e_test_system import e2e_pytest_component from ote_cli.registry import Registry from ote_cli.utils.t...
""" The http module contains the primary HTTP class which provides convenience methods for making calls to the LCMAP service. Supporting module-level functions are also provided. The conveniences provided by the HTTP class include: * session setup * default headers * header updates based upon state changes * path-base...
#!/usr/bin/env python import gym import rospy from sensor_msgs.msg import Joy from std_msgs.msg import String from model_based_shared_control.msg import State from pyglet.window import key import numpy as np class LunarLander(): def __init__(self): # initalize node rospy.init_node('lunar_lander') # re...
""" Reading and writing an elephant =============================== Read and write images """ import numpy as np import matplotlib.pyplot as plt ################################# # original figure ################################# plt.figure() img = plt.imread('../data/elephant.png') plt.imshow(img) ##############...
# 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 the...
"""Tests for the Renault integration.""" from __future__ import annotations from types import MappingProxyType from typing import Any from unittest.mock import patch from renault_api.kamereon import schemas from renault_api.renault_account import RenaultAccount from homeassistant.components.renault.const import DOMA...
# # Copyright (c) 2021 steelpy # # # Python stdlib imports import datetime # # package imports #from iLift.codes.AISC360.July2016.AISC360_16 import * #from iLift.codes.AISC360.print_report import * #from iLift.codes.process.process import SummaryResults # # # #------------------------------------------------- # class...
"""Tests for go.apps.sequential_send.vumi_app""" from datetime import datetime from vumi.components.schedule_manager import ScheduleManager from vumi.tests.utils import LogCatcher from vumi.tests.helpers import VumiTestCase class TestScheduleManager(VumiTestCase): def assert_schedule_next(self, config, since_dt...
print("hello NItish Susuant Khrolia") print ("list fuction, tuple, how to interchange numbers") # list function #fencing = ["glove","mask","wepone"] {list } #print (fencing[2]) #{this how we print element of list} #numbers = [9,8,1,6,7,5,4,0,3,2] #print (numbers[6]) #{this how we print element of list} #numbe...
import os import sys import yaml from pyrfdata.file import File class Template: def __init__(self, loc, request): self.loc = loc self.request = request self.files = [] self.template_yml = None def load(self): template_file = open(self.loc, "r") self.template_ym...
# 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 # d...
#!/usr/bin/env python3 # # Copyright 2018 The Bazel 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 ...
import re import textwrap from core.exceptions import InvalidMemoryAddress, MemoryLimitExceeded class Hex: def __init__(self, data: str = "0x00", _bytes: str = 1, *args, **kwargs) -> None: self._bytes = _bytes self._base = 16 self._format_spec = f"#0{2 + _bytes * 2}x" self._format...
# Copyright (c) 2019 Sony Corporation. 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 applicabl...
from multiprocessing.connection import Listener import os import subprocess import socket import tempfile from contextlib import closing import argparse import uuid import getpass import atexit import pathlib import asyncio import glob from datetime import date HARD_CODED_AFFILIATIONS = { "192.168.1.11": ["192.168...
import plotly import plotly.graph_objs as go import pandas as pd import sys mobility_germany = pd.read_csv("../data/mobility_germany.csv") mobility_germany = mobility_germany.loc[mobility_germany.sub_region_1.isnull(), :] colors = (['indianred']*2+['lightsalmon']*5)*12 + ['indianred'] fig = go.Figure() fig.add_tra...
import tweepy import time api_key = '<api_key>' api_key_secreat = '<api_key_secreat>' access_token = '<access_token>' access_token_secreat ='<access_token_secreat>' auth = tweepy.OAuthHandler(api_key,api_key_secreat) auth.set_access_token(access_token,access_token_secreat) api = tweepy.API(auth,wait_on_rate_limit=T...
from django.db import models from servers.models import Server from django.conf import settings import os import hashlib import string class Share(models.Model): """A share""" server = models.ForeignKey(Server) name = models.CharField(max_length=255) path = models.CharField(max_length=255, help_t...
#Copyright (c) 2013 Matthew Robinson # #See the file LICENSE for copying permission. import string def readConfig(config): f = open(config, "r") options = {} for line in f: if string.find(line, '#') != 0 or string.find(line, '\n') != 0: equals = string.find(line, "=") opt...
from typing import List, Optional from athenian.api.models.web.base_model_ import Model class JIRAFilterWith(Model): """Group of JIRA issue participant names split by role.""" openapi_types = { "assignees": Optional[List[Optional[str]]], "reporters": Optional[List[str]], "commenters"...
#this is a project made at hackriddle 2016 #it is a "smart" toaster using clarifai, simplecv, and twilio #by: Jessie Pullaro, Frank Calas, Max Farrel and Kyle Spomer from clarifai import rest from clarifai.rest import ClarifaiApp #pulls the api keys from keys.py app = ClarifaiApp("nnDJHbfgjR6qFYT_zv9RVoMBmR9-vFn...
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements outlier detection from pyOD.""" import numpy as np from sklearn.base import clone from sktime.annotation.base._base import BaseSeriesAnnotator __author__ = ["mloning", "satya-pattna...
# -*- Python -*- # license # license. # ====================================================================== import logging; module_logger = logging.getLogger(__name__) # ---------------------------------------------------------------------- def encode(name): for char in "% :()!*';@&=+$,?#[]": # the samae as i...
import numpy as np from scipy.sparse import issparse from scipy.sparse.linalg import svds from scipy.linalg import svd as full_svd from jive.lazymatpy.interface import LinearOperator from jive.lazymatpy.convert2scipy import convert2scipy def svd_wrapper(X, rank=None): """ Computes the (possibly partial) SVD ...
import operator import os from time import time from nose.plugins.base import Plugin class TimerPlugin(Plugin): """This plugin provides test timings """ name = 'timer' score = 1 def _timeTaken(self): if hasattr(self, '_timer'): taken = time() - self._timer else: ...
# -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup import cookiecutter-project version = cookiecutter-project.__version__ setup( name='cookiecutter-project', version=version, author='', au...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import pandas as pd import xlrd class xlsFetcher(object): """ xlsFetcher: fetches xls files """ def __init__(self): self.flag_final = True def parse_xls(self, url): """ parses data from url to dataframe PARAMETERS: ----------- url: String ...
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ from __future__ import abs...
HelpX = """ MDTextField: hint_text: "Enter username" helper_text: "or click on forgot username" helper_text_mode: "on_focus" icon_right: "android" icon_right_color: app.theme_cls.primary_color pos_hint:{'center_x': 0.5, 'center_y': 0.5} size_hint_x:None width:300 """
import json # with open('/path/to/jidl_1.json', 'r') as f: # jidl_1 = json.load(f) jidl_1 = { "namespaces": {}, "enumerations": {}, "unions": {}, "structures": { "Structure1": { "byteSize": 8, "members": { "a": { "byteOffset": 0, ...
#!/usr/bin/env python3 """Scrapes the list of provided subreddits for images and downloads them to a local directory""" __author__ = "Patrick Guelcher" __copyright__ = "(C) 2016 Patrick Guelcher" __license__ = "MIT" __version__ = "4.0" import json import os import requests import urllib.error import wget # Configur...
import os, sys, re, json from subprocess import Popen, PIPE, STDOUT # By default use builds/ammo.js. Or the commandline argument can override that. build = os.path.join('builds', 'ammo.js') if len(sys.argv) > 1: build = sys.argv[1] print 'Using build:', build build = os.path.basename(build) exec(open(os.path.expand...
import argparse import asyncio import json import logging import os import typing import warnings from collections import defaultdict, namedtuple from typing import Any, Dict, List, Optional, Text, Tuple from rasa.core.events import ( ActionExecuted, UserUttered, ActionExecutionRejected) if typing.TYPE_CHECKI...
from os import path import pytest import autofit as af import autolens as al directory = path.dirname(path.realpath(__file__)) class MockClass: pass @pytest.fixture(name="label_config") def make_label_config(config): return config["notation"]["label"] class TestLabel: def test_basic(self, label_con...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
from __future__ import absolute_import from datetime import timedelta from rest_framework.response import Response from sentry.api.bases import OrganizationEventsEndpointBase, OrganizationEventsError, NoProjects from sentry.api.serializers.snuba import SnubaTSResultSerializer from sentry.utils.dates import parse_stat...
# coding=utf-8 from setuptools import setup, find_packages readme = open('README.md', 'r') README_TEXT = readme.read() readme.close() setup( name='rummy', version='1.1.7', url='https://github.com/sarcoma/Python-Rummy', license='MIT', author='sarcoma', author_email='sean@orderandchaoscreative.c...
import math from overrides import overrides import torch from torch.nn.parameter import Parameter from allennlp.modules.similarity_functions.similarity_function import SimilarityFunction from allennlp.nn import Activation, util @SimilarityFunction.register("linear") class LinearSimilarity(SimilarityFunction): "...
# -*- coding: utf-8 -*- from guillotina import configure from guillotina._cache import FACTORY_CACHE from guillotina._cache import PERMISSIONS_CACHE from guillotina.api.service import Service from guillotina.component import getMultiAdapter from guillotina.component import query_utility from guillotina.component import...
import numpy as np from sklearn.metrics import confusion_matrix, roc_curve, auc import plotly.graph_objs as go import plotly.figure_factory as ff from plotly.offline import iplot from palantiri.BasePlotHandlers import PlotHandler class ClassifierPlotHandler(PlotHandler): """ Handles all the plots related of th...
""" Test cases for ldaptor.protocols.ldap.delta """ from twisted.trial import unittest from ldaptor import delta, entry, attributeset, inmemory from ldaptor.protocols.ldap import ldapsyntax, distinguishedname, ldaperrors class TestModifications(unittest.TestCase): def setUp(self): self.foo = ldapsyntax.LD...
import open3d as o3d import numpy as np import re import os import sys from open3d_test import download_fountain_dataset def get_file_list(path, extension=None): def sorted_alphanum(file_list_ordered): convert = lambda text: int(text) if text.isdigit() else text alphanum_key = lambda key: [ ...
from .views import FrontendAppView from django.urls import path urlpatterns = [ path('', FrontendAppView.as_view(), name='frontend'), ]
import pandas as pd import numpy as np def create_subsample(df_var, df_pref, nobj, index): """ Create sub-dataframes with the features (alternatives) and target (value in the objective space). :param df_var: :param df_pref: :param nobj: :param index: :return: """ # Create a df_aux...
""" Implementation of some basic randomized algorithms. NOT including random generator algorithm (yet(?)). """ #----------- Psuedo Random Generator ------------ # This part is just for testing. import random as _librandom def setSeed(seed=None): """ Set the random seed. Quote from <random>: None or no argumen...
from .AudioModels import * from .ImageModels import *
#!/usr/bin/env python3 #**************************************************************************************************************************************************** # Copyright (c) 2014 Freescale Semiconductor, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without #...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. import asyncio import pytest import logging import json from utils import get_random_dict logger = logging.getLogger(__name__) logger.setLevel(level=logging.INFO)...
"""This package contains modules related to objective functions, optimizations, and network architectures. To add a custom model class called 'dummy', you need to add a file called 'dummy_model.py' and define a subclass DummyModel inherited from BaseModel. You need to implement the following five functions: -- <__...
import contextlib from tempfile import TemporaryDirectory from typing import Any from typing import Dict from typing import Generator from typing import List from typing import Optional from unittest import mock import numpy as np import pytest import optuna from optuna.integration._lightgbm_tuner.optimize import _Ba...
from .models import load from .VERSION import __version__ __all__ = ["__version__", "load"]
import sys from argparse import ArgumentParser from typing import Any, Union from django.core.exceptions import ValidationError from django.core.management.base import CommandError from django.db.utils import IntegrityError from zerver.lib.domains import validate_domain from zerver.lib.management import ZulipBaseComm...
def default_transformer(results): results_cleaned = results return results_cleaned class InvanaBotTranformerBase(object): def __init__(self, cti_config=None, transformer_name=None, cit_id=None, crawled_id=None, job_id=None): if ...
pkgname = "chroot-util-linux" _mver = "2.32" version = f"{_mver}.1" revision = 0 wrksrc = f"util-linux-{version}" build_style = "gnu_configure" configure_args = [ "--without-ncurses", "--without-ncursesw", "--without-udev", "--without-systemd", "--disable-libuuid", "--disable-libblkid", "--disable-libmount"...
# -*- coding:UTF-8 -*- # Author:Tiny Snow # Date: Fri, 26 Feb 2021, 00:55 # Project Euler # 060 Prime pair sets #==================================================================Solution import os, sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(BASE_DIR.partition('...
import argparse import os import numpy as np import pandas as pd import torch import tqdm from jtvae import (Vocab, JTNNVAE) class Options: def __init__(self, jtvae_path="./jtvae/", hidden_size=450, latent_size=56, depth=3, ...
import asyncio import logging from abc import ABC, abstractmethod from collections.abc import AsyncIterator, Sequence from contextlib import asynccontextmanager from typing import Any, Callable, Optional from aiorwlock import RWLock from .cluster_config import ClusterConfig from .config import Config from .config_cli...
""" Components/ButtonPanel ====================== .. rubric:: A collapsable panel of buttons Example ------- .. code-block:: python from kivy.lang import Builder from kivymd.app import MDApp import kivymd_extensions.akivymd # NOQA kv_string = ''' MDScreen: AKButtonPanel: ...
# LUIS POZAS PALOMO - PR - PRUEBA 20 MAYO # ----------------------------------------------------- # Para ejecutar el código podéis hacer lo siguiente: # python3 escuchandoMusica.py < input1.txt > escuchandoMusica.smt2 # z3 escuchandoMusica.smt2 # ----------------------------------------------------- #!/usr/bin/python3...
# coding:utf-8 ''' Email address validation plugin for yahoo.com email addresses. Notes for primary e-mail: 4-32 characters must start with letter must end with letter or number must use letters, numbers, underscores (_) only one dot (.) allowed no consecutive ...
from pathlib import Path import matplotlib import matplotlib.pyplot as plt import numpy as np import pytest import ctd matplotlib.use("Agg") data_path = Path(__file__).parent.joinpath("data") def _assert_is_valid_plot_return_object(objs): if isinstance(objs, np.ndarray): for el in objs.flat: ...
#!/usr/bin/env python import argparse import sys # use packaging from PIP as it is always present on system we are testing on from pip._vendor.packaging.version import parse import urllib.parse try: import pip._internal.utils.compatibility_tags as p except ImportError: try: import pip._internal.pep425ta...
import datetime import gnupg import smtplib conf = [line.strip('\n') for line in open('/etc/breakout/conf.v20')] def sendEmail(text,subject): ''' Sending relevant information about initial buy/sell target prices as well as stop loss and take profit prices, executed buy/sell orders, when all trades...
# Copyright 2020 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...
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class Titlefont(BaseLayoutHierarchyType): # color # ----- @property def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba stri...
#coding:utf-8 from detector.other import normalize import numpy as np import numpy as np from detector.utils.cython_nms import nms as cython_nms try: from detector.utils.gpu_nms import gpu_nms except: gpu_nms =cython_nms def nms(dets, thresh): if dets.shape[0] == 0: return [] try: ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import multiprocessing # To make python setup.py test happy import os import shutil import subprocess from distutils.command.clean import clean from setuptools import setup multiprocessing PACKAGE = 'ndkale' __version__ = None wi...
""" Enough Mach-O to make your head spin. See the relevant header files in /usr/include/mach-o And also Apple's documentation. """ __version__ = '1.10'
""" Declaration of the Settings class and instance that can be used to get any setting required, using dotenv-settings-handler and python-dotenv. """ from typing import Optional from dotenv import load_dotenv from dotenv_settings_handler import BaseSettingsHandler load_dotenv() class Settings(BaseSettingsHandler): ...
import tensorflow as tf import pathlib import os import numpy as np import shutil flags = tf.compat.v1.flags flags.DEFINE_string('input', './input', 'Directory to input.') flags.DEFINE_string('output', './output', 'Directory to output. ') flags.DEFINE_float('ratio', 0.2, 'ratio') FLAGS = flags.FLAGS def main(_): ...
import keras import numpy as np import math class PriorProbability(keras.initializers.Initializer): """ Initializer applies a prior probability. """ def __init__(self, probability=0.01): self.probability = probability def get_config(self): return { 'probability': sel...
import asyncio import copy import glob import json import os.path import pickle import traceback from base64 import b64encode from collections import defaultdict, namedtuple from app.objects.c_ability import Ability from app.objects.c_adversary import Adversary from app.objects.c_fact import Fact from app.objects.c_pa...
#!/usr/bin/env python3 import os bind = '0.0.0.0:8171' workers = os.environ['GUNICORN_WORKERS'] if 'GUNICORN_WORKERS' in os.environ else 5 preload_app = True # Server Hooks def post_fork(server, worker): pass
# Generated by Django 2.1.15 on 2021-08-28 02:07 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
import asyncio async def worker(name, queue): print('start worker: ', name) while True: await asyncio.sleep(1) s = await queue.get() print(s, end='', flush=True) queue.task_done() async def cr1(): print('[f1]') queue = asyncio.Queue() queue.put_nowait('a') queue.put_nowait('b') queue....
import torch from dltranz.lightning_modules.AbsModule import ABSModule from dltranz.metric_learn.losses import get_loss from dltranz.metric_learn.metric import BatchRecallTopPL from dltranz.metric_learn.sampling_strategies import get_sampling_strategy class EmbModule(ABSModule): """pl.LightningModule for trainin...
from django.contrib import admin from .models import ( StructuralVariant, StructuralVariantGeneAnnotation, StructuralVariantFlags, StructuralVariantComment, ImportStructuralVariantBgJob, StructuralVariantSet, ) # Register your models here. admin.site.register(StructuralVariant) admin.site.reg...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- 7oars.com) # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """A RESTful document store. Each document is stored with a key...
from dataclasses import dataclass from src.dhl.structures.structure_base import StructureBase @dataclass class ItemToPrint(StructureBase): label_type: str shipment_id: int LABEL_TYPES = ('BLP', 'ZBLP', 'LP') def build_client_object(self, client_type): if self.label_type not in self.LABEL_TY...
import gc import pprint class Graph: def __init__(self, name): self.name = name self.next = None def set_next(self, next): print('Linking nodes {}.next = {}'.format(self, next)) self.next = next def __repr__(self): return '{}({})'.format( self.__class...
# Generated by Django 4.0.2 on 2022-02-22 16:57 from django.db import migrations, models import reviewApp.models class Migration(migrations.Migration): dependencies = [ ('reviewApp', '0012_alter_artist_background_image_alter_artist_image'), ] operations = [ migrations.AddField( ...
# Create by Packetsss # Personal use is allowed # Commercial use is prohibited from .settings import * import os os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" import sys import time import pathlib import numpy as np import pygame as pg pg.init() pg.font.init()
import csv import os import random import time import atexit import numpy as np from datetime import datetime from pommerman.agents.abstract_mcts_skeleton import AbstractMCTSSkeleton from pommerman import utility from pommerman import constants from pommerman import make def run(env, agent_names, config, render, do_...
# Copyright 2020 Graphcore Ltd import os import pytest from examples_tests.test_util import SubProcessChecker working_path = os.path.dirname(__file__) class Test(SubProcessChecker): """ Test the contrastive divergence vae model. """ @pytest.mark.ipus(1) @pytest.mark.category1 def test_train_one_epoch...
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick # -------------------------------------------------------- from __future__ import absolute_import from __...
import csv import os import subprocess from src.app.config.hard_constants import HardConstants from src.app.helpers.db_helper import db_session from src.app.models.job_log import JobLogStatus, JobLogDAO from src.app.models.job_log import JobLogType from src.app.models.nicoru import NicoruDAO from src.app.services.nico...
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..preprocess import FWHMx def test_FWHMx_inputs(): input_map = dict(acf=dict(argstr='-acf', usedefault=True, ), args=dict(argstr='%s', ), arith=dict(argstr='-arith', xor=['geom'], ), aut...
"""Helper for evaluation on the Labeled Faces in the Wild dataset """ # MIT License # # Copyright (c) 2016 David Sandberg # # 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 restric...
from distutils.core import setup setup(name='aiospider', description='Python asyncio spider', author='HeartUnchange', author_email='haoxiangzhao@outlook.com', version='0.0.1', packages=['aiospider',"examples"], )