text
stringlengths
3.07k
22.1k
#!/usr/bin/env python3.6 # -*- coding: utf8 -*- ''' ELQuent.link RegEx cleaner for links <NAME> github.com/MateuszDabrowski linkedin.com/in/mateusz-dabrowski-marketing/ ''' # Python imports import os import re import sys import pyperclip from colorama import Fore, Style, init # ELQuent imports import utils.api.api ...
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import time from datetime import datetime from itertools import chain import click from elasticsearch import Elasticsearch, helpers from elasticsearch.exceptions import NotFoundError from pkg_resources import iter_entry_points from click_conf import conf from click_stream...
""" Preview helper functions """ import os import pathlib from unittest import TestCase from unittest.mock import patch import pyarrow.parquet as pq from py_w3c.validators.html.validator import HTMLValidator from t4_lambda_shared.preview import ( extract_excel, extract_fcs, extract_parquet, get_bytes,...
################################################################################# #Script to calculate an input percentile for precipitation totals as a function of #space, smooth window-to-window variability in percentile threshold via Fourier #harmonics, and saves the result in netCDF4 format. Loads .npy files saved ...
"""General validation functions""" from __future__ import absolute_import, division, print_function import logging import types import inspect from pbcommand.models import (FileTypes, TaskTypes, SymbolTypes, ResourceTypes, FileType) from pbsmrtpipe.exceptions import (MalformedMetaTaskError, MalformedPipelineError) ...
# Copyright 2019 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
"""Provide pre-made queries on top of the recorder component.""" from __future__ import annotations from collections.abc import Iterable from datetime import datetime as dt, timedelta from http import HTTPStatus import logging import time from typing import cast from aiohttp import web from sqlalchemy import not_, or...
# Copyright 2017 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...
import json import django from django.apps import apps from django.conf import settings try: from django.core.urlresolvers import reverse except ImportError: # TODO: swap this over when Django 2+ becomes more prevalent from django.urls import reverse from django.forms.widgets import Select, SelectMultiple...
from argparse import ArgumentParser from pathlib import Path import torch import torch.nn.functional as F from torch import nn from torch.optim import SGD from torch.optim.lr_scheduler import StepLR from torch.utils.data import DataLoader from torchvision.datasets import MNIST from torchvision.transforms import Compos...
from rvce_web_results import app,db from flask import render_template, flash, redirect,session from rvce_web_results.forms import * from rvce_web_results.models import * from fuzzywuzzy import fuzz from fuzzywuzzy import process import operator #download data into shelf file using rvresult.py,(status, sd) = scrape_s...
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
import os import sys import pandas as pd path = os.path.dirname(os.path.abspath(__file__)) from ..constant import CM_NAME from ..helper import generate_output_file_tif, create_zip_shapefiles, generate_output_file_shp, generate_output_file_csv """ Entry point of the calculation module function""" if path not in sys.pa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.schedulers import SchedulerNotRunningError from aliyunsdkcore.client import AcsClient from urllib.request import urlopen import colorlog import logging import json import time impo...
""" Process an input dataset into a format suitable for machine learning. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import gzip import pandas as pd import numpy as np import csv import numbers import tempfile from rdkit.Chem import rdmolf...
# 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...
# =============================================================================== # Copyright 2012 <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/LI...
# Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is # licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
import logging import random import time from ..candidate_generation import candidates_per_query, syntactically_relevant_indexes from ..selection_algorithm import DEFAULT_PARAMETER_VALUES, SelectionAlgorithm from ..utils import get_utilized_indexes, mb_to_b # budget_MB: The algorithm can utilize the specified storage...
import pygame, random, math, sys, sqlite3 # Classes class Bullet(): def __init__(self, type='a', dmg=1, dx=0): self.image = pygame.image.load(type+'.png').convert_alpha() self.dmg = dmg self.dx = dx self.existence = True self.rect = self.image.get_rect() self.rect.x...
import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) import P4Transformer.pointnet2_utils as pointnet2_utils from typing import List class P4DConv(nn.Module): d...
from django.core.exceptions import ValidationError from django.utils.module_loading import import_string from django.utils.safestring import SafeText, mark_safe from django.utils.text import slugify from bs4 import BeautifulSoup from v1.atomic_elements import atoms from v1.util.util import get_unique_id try: fr...
""" Figures Celery tasks. Initially this module contains tasks for the ETL pipeline. The higher level task is responsible for error handling of functions it calls """ from __future__ import absolute_import import datetime import time import six from django.contrib.sites.models import Site from django.utils.timezone...
"""Torch Module for Atomic Convolution Layer""" # pylint: disable= no-member, arguments-differ, invalid-name import numpy as np import torch as th import torch.nn as nn class RadialPooling(nn.Module): r"""Radial pooling from paper `Atomic Convolutional Networks for Predicting Protein-Ligand Binding Affinity <h...
from ast import literal_eval import copy import yaml import numpy as np import os import argparse class AttrDict(dict): def __getattr__(self, name): if name in self.__dict__: return self.__dict__[name] elif name in self: return self[name] else: raise Att...
import json from typing import List from injector import inject from sqlalchemy import text from infrastructure.dependency.scopes import IScoped from infrastructure.json.JsonConvert import JsonConvert from models.configs.ApplicationConfig import ApplicationConfig @JsonConvert.register class Pagination: def __i...
# Copyright 2017 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...
"""Analysis functions for career decisions data.""" import pandas as pd import numpy as np def get_prepare_ekw_ext_data(file): """Read and reformat career decisions data (file). Parameters: ----------- file: str Path and filename of career decisions data (data to load). Returns:...
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
#!/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. import unittest from test.generic.config_utils import get_test_model_configs import torch import torch.nn as nn from c...
### Reduces the video and exports only every nth frame ### Exports the current Streams7 scene as TIFF files ### Author: <NAME> ### using code borrowed from Levi ("SPythonTestMultiCamsStartTimeScript") ### and example code ("ExportMultiStreamFileReducedVideo") ### 14 Jun 2017 ## 27 Jun 2017 ## Choose n for each camera...
## @package net_builder # Module caffe2.python.net_builder from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, context from caffe2.python.task import Task, TaskGroup @context.define_contex...
#!/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. import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from gym import spaces from habi...
from django.contrib.auth.models import User from django.core import exceptions from django.shortcuts import render, redirect from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.decorators import login_required from .forms import CreateProfileForm from django.http import HttpResponseRedirect,H...
import selenium.webdriver as web_driver import selenium.webdriver.support.ui as html_elem import selenium.webdriver.support.expected_conditions as econ import selenium.webdriver.common.by as b import termcolor as pr import time import os #import random #tempval = ''.join(random.sample(val, 8)) # identi...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import numpy as np import tensorflow as tf import model from data_reader import load_data, DataReader flags = tf.flags # data flags.DEFINE_string('data_dir', 'data', 'data directo...
#!/usr/bin/env python """ Code to load an expert policy and generate roll-out data for behavioral cloning. Example usage: python run_expert_pytorch.py experts/Humanoid-v1.pkl Humanoid-v2 --render \ --num_rollouts 20 Author of this script and included expert policies: <NAME> (<EMAIL>) """ import pickl...
import re import copy import pickle import numpy as np from collections import OrderedDict import torch from torch.autograd import Variable import global_variables as g def save_checkpoint(state, filename='./checkpoints/checkpoint.pth.tar'): print('save model!', filename) torch.save(state, filename) def sav...
import json import os import logging import tempfile import shlex import shutil import sys from subprocess import Popen, PIPE from .. import package_info from . import client from .constants import InsightsConstants as constants from .config import InsightsConfig logger = logging.getLogger(__name__) net_logger = logg...
import json from django.template.loader import render_to_string from django.utils.decorators import method_decorator from django.utils.translation import ugettext_lazy from django.views.decorators.cache import cache_control from django.http import HttpResponse, Http404 from django.http import HttpResponseRedirect from...
import math import warnings from bw2data import Database from bw2data.logs import close_log, get_io_logger from stats_arrays import LognormalUncertainty, UndefinedUncertainty from ..utils import es2_activity_hash, format_for_logging from .migrations import migrate_exchanges, migrations def link_biosphere_by_flow_uu...
# encoding: utf-8 from __future__ import unicode_literals try: import urllib.request as urllib_request import urllib.error as urllib_error except ImportError: import urllib2 as urllib_request import urllib2 as urllib_error try: from cStringIO import StringIO except ImportError: from io import ...
import pandas as pd import matplotlib.pyplot as plt from sklearn import preprocessing from sklearn.model_selection import train_test_split from keras.models import Sequential from keras.layers import Dense, Dropout, BatchNormalization from keras import optimizers from dataset import * def process(df): df['pickup_...
# Project 1-2 # # Code by <NAME> import imp_xyz as ix import m_tools as mt import time import itertools file_name = "propanediol-1" _, _, mol = ix.import_xyz("molecule_models/{}.xyz".format(file_name)) dmol = ix.select_by_name(mol,'C') + ix.select_by_name(mol,'O') # De-signing dmol (taking absolute value) to obtain...
# -*- coding: utf-8 -*- # Copyright 2009-2013, <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 applica...
import asyncio from pathlib import Path from copy import deepcopy import pytest from pytest import fixture, mark from ..query import QueryResult, QueryLevel from ..net import LocalEntity from ..route import StaticRoute, DynamicRoute, Router from ..sync import SyncManager from ..store import TransferMethod from ..stor...
# ่ฟ่กŒๅ‚ๆ•ฐ๏ผš --model_dir=E:\model\official_myDataset --data_dir=E:\data\my_dataset --train_epochs=10 --distribution_strategy=one_device --num_gpus=1 --download # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Collection of approximation methods Global methods are used on a distribution as a wrapper. Local function are used by the graph-module as part of calculations. Functions --------- pdf Probability density function (local) pdf_full Probability density function (global) ppf Inverse CD...
import pygame class color: black = (0, 0, 0) white = (255, 255, 255) red = (255, 0, 0) blue = (0, 0, 255) green = (0, 255, 0) yellow = (255, 255, 0) dark_red = (100, 0, 0) dark_blue = (0, 0, 100) dark_green = (0, 100, 0) dark_yellow = (100, 100, 0) class button: func = No...
"""Hub for communication with 1-Wire server or mount_dir.""" from __future__ import annotations import logging import os from typing import TYPE_CHECKING from pi1wire import Pi1Wire from pyownet import protocol from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_IDENTIFIER...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import numpy as np import argparse import random import torch import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.utils.data import torchvision.transforms as transforms from torch.autograd import Variable import utils from util...
__all__ = () import sys import objc from objc._objc import _nameForSignature basic_types = { objc._C_VOID: "void", objc._C_INT: "int", objc._C_UINT: "unsigned int", objc._C_LNG: "long", objc._C_ULNG: "unsigned long", objc._C_LNG_LNG: "long long", ...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import abc import base64 import json import time from uuid import uuid4 import six from msal import TokenCache from azure.core.pipeline.policies import ContentDecodePo...
from enum import Enum from typing import Optional, Tuple, Union import scipy.sparse import torch class SparseType(Enum): """Whether a `SparseTensor` is in CSC or CSR format. """ CSR = "csr" CSC = "csc" def __str__(self): return self.value def __repr__(self): return str(self)...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import itertools import posixpath from urllib.parse import urlparse from flask import current_app, g, ren...
# Python-bioformats is distributed under the GNU General Public # License, but this file is licensed under the more permissive BSD # license. See the accompanying file LICENSE for details. # # Copyright (c) 2009-2014 Broad Institute # All rights reserved. ''' metadatatools.py - mechanism to wrap some bioformats metad...
"""Support for the Mediaroom Set-up-box.""" import logging from pymediaroom import ( COMMANDS, PyMediaroomError, Remote, State, install_mediaroom_protocol, ) import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Test components of foremanlite.machine The tests in here are pretty basic and non-exhaustive. Could use more work to get truly full coverage. """ import re import typing as t import pytest from hypothesis import given from hypothesis import strategies as st from for...
# Copyright 2013-2014 The Meson development team # 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 agree...
from pathlib import Path from django.core.exceptions import ValidationError from django.db import models from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from computedfields.models import ComputedFieldsModel, computed from safedelete.managers import SafeDeleteDeletedManage...
# *SymmetryFinder*: platform-independent symmetry finder, wrapping Spglib code # *SymmetryHandler*: symmetry inferences for 0D-, 1D-, 2D- and 3D-systems # Author: <NAME> from numpy.linalg import det from ase.atoms import Atoms from ase.geometry import cell_to_cellpar import spglib as spg class SymmetryFinder: ...
# coding: utf-8 # In[ ]: import random import operator import copy import file_writer_FMnist as fm import subprocess import datetime import os import shutil import time """ fitness = gene[0] lr = gene[1] initW = gene[2] optim = gene[3] actF = gene[4] kernel_size = gene[5] depth = gene[6]...
#!/usr/bin/env python __author__ = "<EMAIL>" """ Reporter for junction summary for one or more samples. Recommended to run before scrubbing sample GFFs prior to chaining. Suggested process is: 1. run collapse to get GFF for each sample 2. run this report script on all sample GFFs 3. run scrubber on all sample GFFs 4....
import asyncio import discord from discord.ext import commands import prawcore # because praw exceptions inherit from here import random import re as regex # pylint: disable=import-error from CatLampPY import reddit from cogs.misc.isAdmin import isAdmin import datetime from hastebin import get_key async def sendPost...
#!/usr/bin/env python # # svnshell.py : a Python-based shell interface for cruising 'round in # the filesystem. # ###################################################################### # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOT...
import os import wsgiref.handlers import logging import time import webapp2 as webapp import json from google.appengine.api import memcache from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.api.labs.taskqueue import Task from google.appengine.runtime import DeadlineExceededError from api...
import datetime import json import time from typing import List, Tuple, Optional, Any, Callable, Awaitable, TypeVar, Generic from dataclasses import dataclass from . import scheduler from . import log from . import parser as p from . import commands as c from .control import Control, CommandContext from .commands impo...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import json import pprint import sys import tempfile from importlib import import_module from pydoc import locate from typing import Dict, List, Optional, Union import click import torch from pytext import create_predictor f...
#!/usr/bin/python2.7 # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt """ # Integrating PayPal ### 1. Validate Currency Support Example: from frappe.integration_broker.doctype.integration_service.integration_service import get_integra...
# imports shared throughout the project import sys import importlib import time import numpy as np import pandas as pd import matplotlib.pyplot as plt # CONSTANTS PJ_TO_GWH = 277.7778 # [GWh / PJ] GWH_TO_PJ = 1/PJ_TO_GWH #[PJ/GWH] # HELPER import FLUCCOplus.config as config EM_TO_EXCEL_colnames = { "pow...
import os import pytest import math from astropy.io import fits from astropy.table import Table import numpy as np import stwcs from stwcs import updatewcs from stsci.tools import fileutil from ci_watson.artifactory_helpers import get_bigdata_root from ci_watson.hst_helpers import raw_from_asn, ref_from_image, downl...
import numpy as np np.random.seed(10) import tensorflow as tf tf.random.set_seed(10) tf.keras.backend.set_floatx('float64') import matplotlib.pyplot as plt from tensorflow.keras import Model from tensorflow.keras import optimizers, models, regularizers from tensorflow.keras import backend as K from tensorflow.keras.ca...
#!/usr/bin/env python3 """ 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 dist...
# ยฉ 2019 University of Illinois Board of Trustees. All rights reserved """ Prepare a VCF file from a set of features in the current directory """ import glob import pickle from vcfFromContigs import createVcfRecord from PySamFastaWrapper import PySamFastaWrapper as ReferenceCache from multiprocessing import Pool impor...
import csv import os import os.path import shutil import util def get_version(): with open("version") as verfile: return verfile.read().strip() class Plant: def __init__(self, dic): self.id = util.str_to_int_or_zero(dic["id"]) self.name = dic["name"] self.descr1 = dic["descr_...
# Copyright 2017, Google LLC 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 applicable law or a...
"""Utilities to help job and tool code setup jobs.""" import json import os from typing import ( Any, cast, Dict, List, Optional, Tuple, Union, ) from galaxy.files import ( ConfiguredFileSources, DictFileSourcesUserContext, ProvidesUserFileSourcesUserContext, ) from galaxy.job_e...
# coding=utf-8 # Copyright 2019 The Google Research 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 applicab...
# OneShot Save Utility # https://github.com/hunternet93/oneshot-save-utility # =========== # UI Settings # =========== bgcolor = '#13041B' textcolor = '#FFFFAA' highlightcolor = '#888844' font = ('vgasys', 14) # =============== # Initial imports # =============== from rubymarshal.reader import load as rb_load from...
import os is_pyd = os.environ.get('PYD') is_pynih = os.environ.get('PYNIH') def test_array(): import pytest from pyd import Foo, get, set, test f = Foo(2) # the bug only exists for pyd, not pynih if is_pyd: # FIXME - see #54 with pytest.raises(AttributeError): assert ...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import io import logging import contextlib import os import datetime import json import numpy as np import cv2 import math import torch from PIL import Image from fvcore.common.timer import Timer from detectron2.structures import BoxMode, Polygon...
import asyncio # import numpy as np # import importlib # import pkgutil import logging import aiohttp import voluptuous as vol # from ledfx.events import Event from ledfx.integrations import Integration from ledfx.utils import async_fire_and_forget, resolve_destination # import time # import os # import re _LOGGER...
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. Pytorch modules some classes are modified from HuggingFace (https://github.com/huggingface/transformers) """ import copy import json import logging from io import open import torch from torch import nn #from apex.normalization.fused_layer_norm i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: library.py # # Copyright 2018 <NAME> # # 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 limitatio...
import logging import os from functools import wraps from rcon.commands import CommandFailedError from discord_webhook import DiscordEmbed from rcon.recorded_commands import RecordedRcon from rcon.player_history import ( save_player, save_start_player_session, save_end_player_session, safe_save_player...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/python3 # file: realtime_communication_model.py # Created by Guang at 19-8-6 # description: # *-* coding:utf8 *-* # ๅณๆ—ถ้€šไฟกๆจกๅ—๏ผŒ ๅ‚่€ƒๅ‚่€ƒ import random import time class Message(object): def __init__(self, msgarr=[], toacc=''): self.msgbody = msgarr # ๆญคๅค„ไธบMsgDictๅฏน่ฑกๅฎžไพ‹็š„ๅˆ—่กจๆˆ–่€…็ฉบๅˆ—่กจ self.toacc = toacc...
__copyright__ = "Copyright (c) Microsoft Corporation and Mila - Quebec AI Institute" __license__ = "MIT" import unittest import numpy as np from segar.factors import ( Charge, Magnetism, Mass, Floor, Heat, Friction, GaussianNoise, Label, Position, ID, ) from segar.mdps.initiali...
"""Tools for managing OS commands Copyright (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt * AUTHOR : <NAME> * DATE : Apr 2019 General Example: How to launch the OpendTect software from python terminal >>> execnm = 'od_main' #execnm is executable name=od_main for the OpendTect so...
# Import Modules import re, datetime, time, os, sys #standard modules import random import textwrap # standard module for removing trailing idnents in post string import json # https://docs.python.org/3/library/json.html import logging # https://docs.python.org/3/library/logging.html import threading # https...
# imports from __future__ import print_function from IPython.display import display, Image from six.moves import cPickle as pickle from six.moves.urllib.request import urlretrieve from sklearn.linear_model import LogisticRegression import imageio import matplotlib.pyplot as plt import numpy as np import os import sys i...
from logging.config import fileConfig from sqlalchemy import engine_from_config from sqlalchemy import pool from alembic import context # To set register primary key operation: from alembic.operations import Operations, MigrateOperation import sqlalchemy as sa # Custom database types to support UUID: from sqlalche...
#!/usr/bin/env python # vim:set et sw=4 ts=4 foldmethod=manual foldlevel=99: # ===============================================================================# # MIT License # # ...
from meta_policy_search.utils import logger import numpy as np import tensorflow as tf from collections import OrderedDict from meta_policy_search.optimizers.base import Optimizer class FiniteDifferenceHvp(Optimizer): def __init__(self, base_eps=1e-5, symmetric=True, grad_clip=None): self.base_eps = np.ca...
#!/usr/bin/env python3 # Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author : <NAME> # E-mail : <EMAIL> # Description: # Date : 21/10/2020 14:20 # File Name : generate-dataset-Dexterous_vacuum.py import numpy as np import sys import pickle import datetime from vstsim.grasping.quality import PointGraspMetrics3D from vstsim....