text
stringlengths
3.07k
22.1k
#Here goes the code that was written for n-dimensional minimum volume ellipsoid. import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas as pd import numpy as np import sys from sklearn.cluster import KMeans import os # Get Current working Directory currentDirectory = os.getcwd() current...
# Copyright (c) Microsoft Corporation. # # 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 wri...
import os import shutil import uuid import numpy as np import tensorflow as tf from tensorflow.python.framework import ops from tensorflow.python.ops import array_ops import math LIB_NAME = 'focal_loss' def load_op_module(lib_name): """ Load TensorFlow operator library. """ # use absolute path so that ops.p...
#!/usr/bin/env python3 import rospy import tf2_ros import tf2_geometry_msgs from tf.transformations import quaternion_from_euler, euler_from_quaternion from nav_msgs.msg import Odometry from std_msgs.msg import Float64MultiArray, MultiArrayLayout, MultiArrayDimension from visualization_msgs.msg import MarkerArray from...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not ...
''' Created on 2013 2 18 @author: <NAME> (<EMAIL>) Wrappers for games to interface them with artificial players. These are based on the PyBrain RL framework of Environment and Task classes. ''' import pygame from numpy import zeros from pybrain3.rl.environments.environment import Environment from pybrain3.rl.environ...
import unittest import itertools import rpy3.rlike.container as rlc class OrdDictTestCase(unittest.TestCase): def testNew(self): nl = rlc.OrdDict() x = (('a', 123), ('b', 456), ('c', 789)) nl = rlc.OrdDict(x) def testLen(self): x = rlc.OrdDict() self.assertEquals(0, l...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
from typing import ( Tuple, Type, Union, List ) from pandas import ( DataFrame, Series, to_datetime ) import numpy as np from .directive import parse from .common import ( meta_property, copy_stock_metas, ensure_return_type, KEY_ALIAS_MAP, KEY_COLUMNS_INFO_MAP, KE...
import torch import torch.nn as nn import torch.nn.functional as F import pydestruct import disc_span_parser import cpp_disc_span_parser import pydestruct.input def get_indices(cst_weights, pred_cst, device="cpu"): pred_cst_indices = torch.zeros_like(cst_weights, requires_grad=False, device="cpu") for label, ...
import json import arrow import geojson from geojson import LineString, Point, Polygon, Feature, FeatureCollection from rest_framework import serializers from registry.models import Firmware from .data_definitions import PlanFile, PlanFileMission, SimpleMissionItem, ComplexMissionItem, \ TransectStyleComplexItem,...
import torch from torch import nn import numpy as np import copy from pcfg import PCFG from pcfg_logprob import LogProbPCFG from program import Function, Variable, BasicPrimitive, New device = 'cpu' def guess_output_size(latent_encoder, H): test_input = torch.zeros(H) with torch.no_grad(): output =...
# encoding: utf-8 import _thread from datetime import datetime import itchat, time import requests from itchat.content import * from apscheduler.schedulers.blocking import BlockingScheduler # 自动登陆,命令行二维码,退出程序后暂存登陆状态 from DateUtil import get_week_day times = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.tim...
# ActivitySim # See full license in LICENSE.txt. from builtins import object import logging import numpy as np import pandas as pd from . import tracing from . import pipeline logger = logging.getLogger(__name__) EXP_UTIL_MIN = 1e-300 EXP_UTIL_MAX = np.inf PROB_MIN = 0.0 PROB_MAX = 1.0 def report_bad_choices(ba...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2019 PreSeries Tech, SL import logging import xmljson from xml.etree.ElementTree import fromstring from caravaggio_rest_api.utils import quarter from davinci_crawling.example.bovespa import BOVESPA_CRAWLER from davinci_crawling.example.bovespa.models import \ DFP_BAL...
from pymtl import * from lizard.util.rtl.interface import Interface, UseInterface from lizard.util.rtl.method import MethodSpec from lizard.util.rtl.register import Register, RegisterInterface from lizard.util.rtl.onehot import OneHotEncoder from lizard.util.rtl.async_ram import AsynchronousRAM, AsynchronousRAMInterfa...
# Copyright 2018-2021 Streamlit 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 wr...
#!/usr/bin/env python from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import shutil import os import argparse from subprocess import Popen, PIPE import pwd #import bytes # parse args parser = argparse.ArgumentParser(...
import numpy as np from libs.kernel import Kernel from libs.optimizer import Optimizer ### class SVM(): def __init__(self, kernel='linear', C=None, deg=None): self._kernel = None self._kernel_type = kernel self._kernel_function = None self._multipliers = None self._lambd...
from __future__ import print_function #pylint bug workaround import argparse import pandas import h5py import numpy as np from neuralnets.utils import one_hot_array, one_hot_index from sklearn.model_selection import train_test_split MAX_NUM_ROWS = 500000 SMILES_COL_NAME = "structure" CATEGORIES_COL_NAME = "edge_categ...
import os import cv2 import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import argparse import segmentation_models_v1 as sm sm.set_framework('tf.keras') from unet_std import unet # standard unet architecture from helper_function import plot_deeply_history, plot_history, save_history from helpe...
""" Functions for creating the TaxBrain COMP outputs """ from bokeh.models import (ColumnDataSource, Toggle, CustomJS, NumeralTickFormatter, HoverTool) from bokeh.models.widgets import Tabs, Panel, Div from bokeh.embed import json_item from bokeh.layouts import layout from bokeh.plotting impor...
# ============== INIT ============== # Flask from flask import Flask, make_response, request, flash, redirect, render_template, g # # Forms from werkzeug.datastructures import MultiDict # # Minify from flask_minify import minify # # Bootstrap from flask_bootstrap import Bootstrap # # Nav from flask_nav import Nav f...
"""Tests for parallel client.py Authors: * <NAME> """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this soft...
# -*- coding: utf-8 -*- # Author <NAME> <EMAIL> # Use this little program as you wish, if you # include it in your work, let others know you # are using it preserving this note, you have # the right to make derivative works, Use it # at your own risk. # Tested to work on(etch testing 13-08-2007): # Python 2.4.4 (#2, J...
from os.path import dirname, join, realpath, expanduser, isdir from os import chmod import platform import sys import shutil from app.util import autoversioning, fs from app.util.conf.configuration import Configuration from app.util.conf.config_file import ConfigFile BASE_CONFIG_FILE_SECTION = 'general' class Base...
""" Extracts images from Open Images (downloaded with download_open_images.py) into "food" and "not_food" categories, training, evaluation and test sets are ignored. Original data downloaded here: https://voxel51.com/docs/fiftyone/tutorials/open_images.html """ import pandas as pd import os import argparse import path...
# -*- coding: utf-8 -*- from __future__ import print_function import tensorflow as tf import numpy as np import matplotlib.pyplot as plt def positional_encoding(seq_len, num_units, visualization=False): """ Positional_Encoding for a given tensor. Args: :param inputs: [Tensor], A tensor contains the ...
from functools import wraps from threading import Lock, Event from weakref import WeakValueDictionary from os import walk from os import curdir from os import listdir from os import makedirs from os import unlink from os.path import relpath from os.path import join from os.path import abspath from os.path import exists...
# <NAME> <<EMAIL>> import time import logging import pytest from collections import deque try: import unittest.mock as mock except ImportError: import mock from alphatwirl.concurrently import TaskPackageDropbox ##__________________________________________________________________|| @pytest.fixture() def packa...
import sys import os import random import numpy as np from sklearn.neural_network import MLPRegressor from sklearn.linear_model import LinearRegression from sklearn.preprocessing import OneHotEncoder from sklearn.preprocessing import RobustScaler from sklearn.preprocessing import StandardScaler from sklearn.preprocessi...
__all__ = ["PuffinProvider"] import logging import os import socket import threading import time from base64 import b64decode, b64encode from Cryptodome.Cipher import PKCS1_v1_5 from Cryptodome.PublicKey import RSA from bidfx._bidfx_api import BIDFX_API_INFO from bidfx.exceptions import PricingError, IncompatibleVer...
#!/usr/bin/env python3 # Copyright 2016 <NAME> # # 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 agre...
try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser # type: ignore import os import re import sys import traceback from appdirs import user_config_dir from pygments import highlight from pygments.formatters import Terminal256Formatter as TerminalFormatter from...
''' Created on Jun 2, 2015 @author: <NAME><<EMAIL>> ''' import codecs, math, argparse, os from nltk.tokenize import regexp_tokenize from nltk.stem import SnowballStemmer, WordNetLemmatizer from nltk.tag import pos_tag from collections import defaultdict from compose_corpus import DocumentCorpus, get_document_class, ge...
from hashlib import md5 from typing import Optional from urllib.parse import urlencode import aiohttp import attr from ...box import box from ...command import argument from ...event import Message from ...utils import json from ...utils.datetime import fromtimestamp from ...utils.http import USER_AGENT box.assert...
from database import ( fix_ids, ImageModel, CategoryModel, AnnotationModel, DatasetModel, TaskModel, ExportModel ) # import pycocotools.mask as mask import numpy as np import time import json import os from celery import shared_task from ..socket import create_socket @shared_task def ex...
#-*- coding: utf-8 -*- ''' Helper script to train neuromodulated agents in the CT-graph environment.''' from __future__ import print_function from __future__ import division import gc # to free memory. useful for cuda setup of feature extractor for multiprocessing import argparse import json import datetime import num...
# Deprecation warning: Accumulator Framework in this file is deprecated in # favour of Combiner framework (combiner.py) and will be removed soon. import abc import copy import typing import pickle from dataclasses import dataclass from functools import reduce from typing import Iterable, Optional, Tuple, Union import...
## @package net_printer # Module caffe2.python.net_printer from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.proto.caffe2_pb2 import OperatorDef from caffe2.python.checkpoint import Job from caffe2.python.cor...
from django.utils.translation import LANGUAGE_SESSION_KEY, ugettext_lazy as _ from django.utils.six import iteritems from django.db import models from django.conf import settings from timezone_field import TimeZoneField # noinspection PyProtectedMember from phonenumbers.data import _COUNTRY_CODE_TO_REGION_CODE import ...
from concurrent import futures from time import sleep from google.protobuf.timestamp_pb2 import Timestamp from google.protobuf.struct_pb2 import Struct from google.rpc import code_pb2, status_pb2, error_details_pb2 from grpc_status import rpc_status from PIL import Image as Im import gym import gym_BitFlipper from gym ...
import pytest import io import builtins # Tady by normálně byly importy (např. "from piskvorky import vyhodnot"). # Aby základní fungovaly i když některé moduly ještě nejsou napsané, # jsou importy až v testovacích funkcích. To se normálně nedělá. @pytest.mark.level(1) def test_import_vyhodnot(): """Funkce piskvo...
from rpython.jit.metainterp.history import AbstractDescr, getkind from rpython.jit.codewriter.flatten import Register, Label, TLabel, KINDS from rpython.jit.codewriter.flatten import ListOfKind, IndirectCallTargets from rpython.jit.codewriter.format import format_assembler from rpython.jit.codewriter.jitcode import Swi...
from __future__ import annotations from datetime import datetime from enum import Enum from reminderbot.conf import get_database from typing import Any, Dict, Iterator, Tuple, TYPE_CHECKING from logging import getLogger from sqlalchemy import select, desc, asc from telegram.ext import CommandHandler from reminderbot....
import os import errno import numpy as np import itertools import six from scipy import sparse import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.patches import Wedge from sklearn.metrics import confusion_matrix from textwrap import wrap def savefig_and_close(fig, figname, path='', bbox_extr...
import os import sys from six.moves import configparser import argparse import uuid import logging import shutil import subprocess from multiprocessing import Process from json import dumps from datetime import datetime from cwl_airflow.utils.mute import Mute from airflow import conf as conf from airflow.models import ...
import asyncio import logging from functools import partial from types import TracebackType from typing import Any, Callable, Dict, Optional, Tuple, Type, TypeVar, Union from warnings import warn import aiormq import aiormq.abc from aiormq.tools import censor_url from pamqp.common import FieldTable from yarl import UR...
#!/usr/bin/env python # coding=utf-8 # ==================================================== # File Name : pg_degw.py # Creation Date : 05-09-2018 # Created By : <NAME> # Contact : <EMAIL> # ==================================================== from __future__ import print_function, absolute_import import ...
import numpy as np import torch from torch import nn from torch import optim from torch.nn import functional as F import time import utils class Base(nn.Module): """ This class is the base structure for all of classification/regression DNN models. Mainly, it provides the general methods for training, evaluati...
"""Data model for the PyPi JSON API. Copyright (c) 2020 The Valiant Authors 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, co...
#!/usr/bin/env python3 """ This script is used to test the minimal DDR litex design. It performs the calibration step by sending commands and data through an UART bridge to the DDR controller. It makes use of the litex RemoteClient. This script is able to calculate which are the correct bitslip and delay values of t...
import os from typing import List, Optional, Tuple, Union import vapoursynth as vs from bvsfunc.util import ap_video_source from lvsfunc.misc import source from lvsfunc.types import Range from vardautomation import (JAPANESE, AudioStream, FileInfo, Mux, Patch, PresetAAC, PresetWEB, RunnerCo...
import hashlib import json import os import signal import subprocess import time from contextlib import contextmanager from typing import List, Set import requests def getDefaultExpectedHash() -> bytes: # "uniquestring" is stored in /etc/unique of the SSH server. We then run # the command `sha1sum /etc/uniqu...
import argparse import json import ntpath import os from collections import OrderedDict import ast import pandas as pd import xlrd # noqa: E211 def assign_function_params( function_data_dict, function_purpose): # `function_purpose` must be in ["damage_function", "recovery_function"] functi...
from collections import namedtuple, defaultdict import numpy as np from polara.recommender.data import RecommenderData from polara.lib.similarity import build_indicator_matrix from polara.recommender.hybrid.data import (IdentityDiagonalMixin, SideRelationsMixin) class Item...
from board.models import Topic, Post, Profile, Forum, PostIcon from django.contrib.auth.models import User from datetime import datetime, timedelta from django.utils import timezone class FakeUser: def __init__(self, name, pw, location, custom_title): u = User.objects.create_user(name, password=pw) u.profile.crea...
import json import os import shutil import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable from skimage.exposure import equalize_hist from skimage.metrics import structural_similarity as ssim class bcolors: """ printing helper class """ HEADER = '\03...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gym import numpy as np import tensorflow.compat.v2 as tf from gym import spaces from gym.utils import seeding import dice_rl.utils.common as common_utils class PointMaze(gym.Env): def __init__(sel...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
from pydispatch import dispatcher from twisted.internet import utils from phxd.constants import * from phxd.permissions import * from phxd.server.config import conf from phxd.server.decorators import * from phxd.server.signals import * from phxd.types import HLException, HLFile, HLResumeData from phxd.utils import HLE...
# Copyright 2021 MosaicML. All Rights Reserved. from __future__ import annotations import logging import os import sys import uuid import warnings from queue import Queue from threading import Thread from typing import Dict, List, Optional import requests from composer.core.logging import LogLevel, RankZeroLoggerBa...
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
""" Wrap sasmodels for direct use by bumps. :class:`Model` is a wrapper for the sasmodels kernel which defines a bumps *Parameter* box for each kernel parameter. *Model* accepts keyword arguments to set the initial value for each parameter. :class:`Experiment` combines the *Model* function with a data file loaded by...
from glob import glob import pandas as pd import numpy as np from datetime import datetime import xml.etree.ElementTree as ET import requests # function strips white space from downloaded text file def read_csv_regex(data, date_columns=[]): df = pd.read_csv(data, sep="\t", quotechar='"', parse_dates=date_columns...
""" Definition and registration of display hooks for the IPython Notebook. """ from functools import wraps from contextlib import contextmanager import sys, traceback import IPython from IPython import get_ipython import holoviews from holoviews.plotting import Plot from ..core.options import (Store, StoreOptions, S...
import os import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim from torch.utils.data import DataLoader from torch.autograd import Variable from torchvision import models import torch.nn.functional as F import numpy as np import time from tensorboar...
import copy import uuid import pytest from mock import patch, MagicMock from jsonschema.exceptions import ValidationError from tests_ma.test_api.test_routes.test_resource_helpers import FAKE_CREATE_TIMESTAMP, FAKE_UPDATE_TIMESTAMP from tests_ma.test_api.conftest import create_test_user from db.errors import EntityDoe...
from ColObjBase import * import mathPaths as mp from direct.task import Task from pandac.PandaModules import WindowProperties props = WindowProperties() props.setTitle('By <NAME>') class Universe(InvCollideObj): def __init__(self, modelPath, parentNode, nodeName, texPath, posVec, scaleVec): base.win.reque...
import cv2 import numpy as np import skimage.morphology from skimage.morphology import convex_hull_image, erosion from skimage.morphology import square import math class MinutiaeFeature(object): def __init__(self, locX, locY, Orientation, Type): self.locX = locX; self.locY = locY; self.Orie...
################################################################################ # Copyright 2016-2021 Advanced Micro Devices, Inc. All rights reserved. # # 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 t...
# type: ignore # -*- coding: utf-8 -*- # # ramstk.analyses.prediction.Meter.py is part of the RAMSTK Project # # All rights reserved. # Copyright 2007 - 2017 <NAME> doyle.rowland <AT> reliaqual <DOT> com """Meter MIL-HDBK-217F Calculations Module.""" # Standard Library Imports from typing import Any, Dict PART_...
import argparse import torch import mmcv import tempfile import os.path as osp import torch.distributed as dist import shutil from mmcv.runner import load_checkpoint, parallel_test, obj_from_dict, get_dist_info from mmcv.parallel import scatter, collate, MMDataParallel, MMDistributedDataParallel from mmaction.apis imp...
import numpy as np import gurobipy as grb from scipy import interpolate def interp1d4s(Ns, Os, Nx): f = interpolate.interp1d(Ns, Os) return float(f(Nx)) def re_allocate(cmap, jmin, jmax, Ns, Os, Tfwd, res_up, res_dw, time_limit): nJ, nN = cmap.shape J = range(nJ) N = range(nN) assert len(jmin)...
from requests.auth import HTTPBasicAuth from requests_oauthlib import OAuth1Session, OAuth2Session from oauthlib.oauth2 import BackendApplicationClient from oauthlib.common import to_unicode from . import __version__ import requests import json TWITTER_API_VERSION = '1.1' TWITTER_BASE_API_URL = 'https://%s.twitter.co...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from sklearn import preprocessing from .data import Data from ..backend import tf from ..utils import run_if_any_none class MfFunc(Data): """Multifidelity function approximation.""" ...
# Copyright 2021 Huawei Technologies Co., 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 agreed to...
#!/usr/bin/python """ Module sudoku_py.ui.cli.terminal_utils Defines utility functions for simple but often required operations, amongst others: *) clearing of the console *) emulation of the fixed size console of the smaller width than the actual *) emulation of the paginated output of a large text Funct...
import os import re import socket import sys import time import traceback import urllib.parse as urllib import vim from . import dbgp from . import error from . import log from . import opts class ExceptionHandler: """ Exception handlers """ def __init__(self, session_handler): self._session_handl...
import sqlite3 import os import glob import gzip from collections import defaultdict from . import util import datetime #SCRIPTS creation_script=""" CREATE TABLE gcvb(id INTEGER PRIMARY KEY, command_line TEXT, yaml_file TEXT, modifier TEXT, ...
import hashlib import hmac import json import ssl from datetime import datetime import requests # from pythonwhois.parse import parse_raw_whois from mongoengine import FieldDoesNotExist from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager from core.analytics import ...
# -*- coding:utf-8 -*- """ Simple static page generator. Uses Jinja2 to compile templates. """ from __future__ import absolute_import, print_function import inspect import logging import os import re import shutil import warnings from jinja2 import Environment, FileSystemLoader from .reloader import Reloader de...
#!/usr/bin/env python from suburi_generator import generate_suburis sample = [{ "surt": "com,example,domain,sub)/p1/p2/file.ext?a=b&c=d", "suburis": [ "com)/", "com,example)/", "com,example,domain)/", "com,example,domain,sub)/", "com,example,domain,sub)/p1", "co...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# We thought about making pycaption.base objects immutable. This would be nice # in a lot of cases, but since the transformations on them could be quite # complex, the deepcopy method is good enough sometimes. from copy import deepcopy from .base import DFXPWriter, DFXP_DEFAULT_REGION from ..base import BaseWriter, Ca...
import os import shutil import posixpath from collections import OrderedDict from lektor._compat import text_type, iteritems, string_types from lektor.metaformat import serialize from lektor.utils import atomic_open, is_valid_id, secure_filename, \ increment_filename from lektor.environment import PRIMARY_ALT ...
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import logging from itertools import chain from typing import Any, Callable, Dict, List, Tuple from datadog_checks.base import AgentCheck from datadog_checks.base.utils.db.types import QueriesExecutor, Qu...
""" This file implements a general simulation interface. The SimulationWindow has a space for thedisplay of a specific task, a display area showing the counts of steps and episodes so far, and buttons for controlling the simulation. It also adds two menus - a File menu and a Simulation menu. It is easy to make a GUI si...
import itertools import os from leapp.exceptions import StopActorExecutionError from leapp.libraries.actor import constants from leapp.libraries.common import dnfplugin, mounting, overlaygen, rhsm, utils from leapp.libraries.stdlib import CalledProcessError, api, run, config from leapp.models import (RequiredTargetUse...
#!/usr/bin/env python # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
from copy import deepcopy from collections.abc import Sequence, Mapping from .. import contracts from .. import exc from ..types import chars from . import abstract class List(abstract.Validator): """ List Validator :param Validator item: validator for list items. :param bool nullable: ...
"""Internal module for accessing EuXFEL HDF5 files This includes convenience features for getting the metadata & indexes from a file, as well as machinery to close less recently accessed files, so we don't run into the limit on the number of open files. """ from collections import defaultdict, OrderedDict import h5py ...
""" NRPy+ Loop Generation The following script generate a single or nested loop of arbitrary dimension in C, and has support for cache blocking (loop tiling). """ # Author: <NAME> # Email: zachetie **at** gmail **dot* com # Contributor: <NAME> # Email: ksible *at* outlook *dot* com import re, sys def...
# Copyright 2013 Novo Nordisk Foundation Center for Biosustainability, # Technical University of Denmark. # # 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/LI...
# coding=utf-8 # 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 ...
# Parses a collection of news outlet RSS feeds for recently published articles, # then converts those articles to plaintext and searches them for mentions of # given words or phrases, and posts the results to Twitter. from __future__ import unicode_literals import argparse import importlib import json import os import...
from discord.ext import commands from cogs.utils.formats import human_join import discord import asyncio import yarl import re DISCORD_PY_GUILD_ID = 336642139381301249 DISCORD_PY_BOTS_ROLE = 381980817125015563 DISCORD_PY_REWRITE_ROLE = 381981861041143808 DISCORD_PY_JP_ROLE = 490286873311182850 DISCORD_PY_PROF_ROLE = 3...
import re from collections import defaultdict from datetime import date, timedelta from artifactory import ArtifactoryPath from teamcity.messages import TeamcityServiceMessages from artifactory_cleanup.rules.base import Rule TC = TeamcityServiceMessages() class RuleForDocker(Rule): """ Parent class for Doc...
import unittest from libraries import database from libraries import game_data from libraries import interface from libraries import mechanics from zulip_bots.simple_lib import SimpleStorage class GridTest(unittest.TestCase): def test_out_of_grid(self): points = [[v, h] for h in range(7) for v in range(...