content
stringlengths
5
1.05M
"""CrowdStrike Falcon Detections API interface class. _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|...
list = [997430015, 'Удалённый профиль'] text = ','.join(list) print(text)
"""Implementation of an Experience Replay Buffer.""" import numpy as np import torch from torch.utils import data from torch.utils.data._utils.collate import default_collate class StateExperienceReplay(data.Dataset): """A State distribution Experience Replay buffer. The Experience Replay algorithm stores st...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from scipy import misc import sys import os import argparse import tensorflow as tf import numpy as np import facenet import align.detect_face import cv2 import random from time import sleep from tensorflow.pyt...
#!/usr/bin/env python2.7 import sys import os import operator from StringIO import StringIO import unittest import snapconf import snapconfshared import snaputil import snaptron import snannotation import snquery import sqlite3 snaptron.sconn = sqlite3.connect(snapconfshared.SNAPTRON_SQLITE_DB) snaptron.snc = snaptro...
""" Author: George Azzari ([email protected]) Center on Food Security and the Environment Department of Earth System Science Stanford University """ import ee class Daymet: def __init__(self): # NOTE: no filterBounds needed; DAYMET is composed by whole-CONUS images self.wholecoll = ee.ImageCol...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Bout (read bank-out) extracts transactions from pdf bank statements. _ _ (_) (_) (_) _ _ _ _ _ _ _ _ _ (_) _ _ (_)(_)(_)(_)_ _ (_)(_)(_) _ (_) (_)(_)(_)(...
import random def select(array, i): if len(array) <= 5: copy = array[:] copy.sort() return copy[i - 1] else: medians = [] j = 0 while j < len(array): subarray = array[j:j+5] medians.append(select(subarray, len(subarray) / 2)) j ...
import numpy as np import pandas as pd import xarray as xr def new_test_dataset(time, height=180, **indexers): """ Create a test dataset with dimensions ("time", "lat", "lon") and data variables given by *indexers*. :param time: Single date/time string or sequence of date-time strings. :param height:...
from .util import * from .web import * from .setup import *
import coreapi import coreschema from rest_framework.schemas import AutoSchema from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status from core.models import (Yearref, Govrank, Govindicatorrank) class B...
import types mpt = types.MappingProxyType({'k1': 'v1'}) print(mpt) print('k1' in mpt) print(mpt['k1']) print(iter(mpt)) print(len(mpt)) print(mpt.copy()) print(mpt.get('k1')) print(mpt.items()) print(mpt.keys()) print(mpt.values())
# Copyright (c) OpenMMLab. All rights reserved. """ python demo/bottom_up_img_demo.py \ configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_anim_512x512_udp.py \ work_dirs/higherhrnet_w32_anim_512x512_udp/best_AP_epoch_20.pth \ --img-path data/anim/train \ --show """ imp...
"""empty message Revision ID: a5879be2fd07 Revises: d5f87144251f Create Date: 2019-06-03 15:29:01.144838 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a5879be2fd07' down_revision = 'd5f87144251f' branch_labels = None depends_on = None def upgrade(): # ...
# -*- coding: utf-8 -*- import re def strPreProcess(question): value = question try: if re.search(r'为负值|为负|是负', value): value = re.sub(r'为负值|为负|是负', '小于0', value) if re.search(r'为正值|为正|是正', value): value = re.sub(r'为正值|为正|是正', '大于0', value) # X.x块钱 X毛钱 ...
from drltools.utils import trainer, ddpg_config from drltools.agent.agent import DDPGAgent from unityagents import UnityEnvironment env = UnityEnvironment(file_name="unity_environments/Reacher_mac.app", worker_id=1) config = ddpg_config agent_class = DDPGAgent n_episodes = 2000 max_t = 1000 solved_score = 30 title = ...
# -*- coding: utf-8 -*- from typing import Any # , Any import logging from collections import namedtuple import contextlib import decimal import terminaltables import colorclass from .utils import colorize from .param_types import Currency, Percentage # logging.basicConfig(level=logging.DEBUG) logger = logging.get...
#! /usr/bin/python """ This index page includes 2 kinds of searches: gene names (IDs and symbols) search and gene functions. Each directs to genesearch.py and gosearch.py, respectively. """ import cgi if __name__=='__main__': print 'Content-type: text/html' print print '<html><head><title>' print 'Arabdopsis At...
# -*- coding: utf-8 -*- import mimetypes import os from hashlib import md5 from lektor.publisher import Publisher, PublishError from lektor.pluginsystem import Plugin from lektor.project import Project from lektor.types.formats import Markdown from algoliasearch import algoliasearch class AlgoliaPlugin(Plugin): ...
# -*- coding: utf-8 -*- import unittest import libot.grasp.libot_trainer as trainer import libot.grasp.libot_model as model import collections class NaoDialogTest(unittest.TestCase): def setUp(self): self.naoDialogUtil = model.NaoDialogUtil() pass def util_find_reponse(self, naoDialogModel,...
import os from celery.schedules import crontab from flask_appbuilder.const import AUTH_OAUTH from cachelib import RedisCache from superset.custom_sso_security_manager import CustomSsoSecurityManager OAUTH_ENABLED = int(os.getenv('OAUTH_ENABLED', 0)) SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI'] RED...
# Generated by Django 3.2.8 on 2021-10-31 03:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('twilio_management', '0002_alter_messagingservice_inbound_request_url'), ] operations = [ migrations.AlterField( model_name='mess...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @title: Non-Exhaustive Gaussian Mixture Generative Adversarial Networks (NE-GM-GAN) @topic: I-means Model @author: Jun Zhuang, Mohammad Al Hasan @ref: https://math.stackexchange.com/questions/20593/calculate-variance-from-a-stream-of-sample-values """ import numpy...
# coding utf-8 from selenium import webdriver import time import os import re import urllib import sys from bs4 import BeautifulSoup import logging from datetime import datetime from datetime import timedelta from datetime import date import threading import json import xlrd import xlwt from xlrd import open_workb...
from flask import Flask from flask_sqlalchemy import SQLAlchemy import os import os.path from flask_login import LoginManager, UserMixin from .constantes import SECRET_KEY chemin_actuel = os.path.dirname(os.path.abspath(__file__)) templates = os.path.join(chemin_actuel, "templates") statics = os.path.join(chemin_actu...
import torch class GPU: """ Class to work with GPUs """ def __init__(self): pass def get_default_device(self): """ Get the default device, if cuda is available get cuda. """ if torch.cuda.is_available(): return torch.device('cuda') else: ...
from aws_cdk import core from aws_cdk.aws_route53 import MxRecord, MxRecordValue, HostedZone from kesher_service_cdk.service_stack.constants import KESHER_DOMAIN_NAME class KesherGlobal(core.Construct): # pylint: disable=redefined-builtin,invalid-name def __init__(self, scope: core.Construct, id: str) -> Non...
sub2main_dict = {'1': 'rice', '2': 'egg', '3': 'egg', '4': 'egg', '5': 'rice', '6': 'meat', '7': 'toufu', '8': 'toufu', '9': 'vegetable', '10': 'vegetable', '11': 'vegetable', '12': 'vegetable', '13': 'vegetable', '14': 'vegetable', '15': 'vegetable', '16': 'vegetable', '17': 'mix', '18': 'noddle', '19': 'meat', '20': ...
import copy _base_ = '../../base.py' # model settings model = dict( type='BYOL', pretrained=None, base_momentum=0.99, pre_conv=True, backbone=dict( type='ResNet', depth=50, in_channels=3, out_indices=[4], # 0: conv-1, x: stage-x norm_cfg=dict(type='SyncBN')),...
""" ******************************************************************************** compas_fab.backends ******************************************************************************** .. currentmodule:: compas_fab.backends This package contains classes backends for simulation, planning and execution. V-REP ----- ...
import argparse import math class HMMPredictor(): def __init__(self): self.words_lines = [] self.tags_lines = [] self.preditions = [] self.accuracy = 0 self.avg_log_likelihood = 0 self.idx_to_tag = {} self.idx_to_word = {} self.prior_table = {} ...
from .makeconfig import MakeConfig from .pyson import Pyson from . import checks from .syscheck import syscheck from .Bot_Logging import log_error, Bot_Logging from .Bot_Settings import Bot_Settings
from tkinter import simpledialog class Dialog: def __init__(self, title, message): self.messagebox.showinfo(title, message) self.answer = simpledialog.askstring("Input", "What is your first name?", parent=window)
from pandas import DataFrame from weaverbird.backends.pandas_executor.types import DomainRetriever, PipelineExecutor from weaverbird.pipeline.steps import DeleteStep def execute_delete( step: DeleteStep, df: DataFrame, domain_retriever: DomainRetriever = None, execute_pipeline: PipelineExecutor = Non...
""" Test Carousel core. """ from carousel.core import Q_, UREG from nose.tools import eq_, ok_ def test_pv_context(): """ Test Pint PV context - specifically suns to power flux and v.v. """ esun = Q_(876.5, UREG.W / UREG.m / UREG.m) eq_(esun.to('suns', 'pv'), 0.8765 * UREG.suns) esun = Q_(0.8...
#!/usr/bin/env python #coding=utf-8 import json from lib.sqs import zhihufav_sqs from lib.tasks import add_note if __name__=="__main__": sqs_info = zhihufav_sqs.get_messages(1) for sqs in sqs_info: sqs_body = sqs.get_body() receipt_handle = sqs.receipt_handle sqs_json = json.loads(sqs...
import braintree import weasyprint from django.shortcuts import render, redirect, get_object_or_404 from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.template.loader import render_to_string from orders.models import Order from ...
from .build import build_dataset_from_cfg import datasets.KITTIDataset import datasets.PCNDataset import datasets.ShapeNet55Dataset
from os import sep from .ExamplePage import ExamplePage class View(ExamplePage): """View the source of a Webware servlet. For each Webware example, you will see a sidebar with various menu items, one of which is "View source of <em>example</em>". This link points to the View servlet and passes the f...
import torchvision.models as models import torch class resnet50(torch.nn.Module): def __init__(self, dropout): super().__init__() resnet50 = models.resnet50(pretrained=False) modules = list(resnet50.children())[:-1] self._resnet50 = torch.nn.Sequential(*modules) self.outpu...
# baleen.ingest # The ingestion runner that implements ingestion for a collection of feeds. # # Author: Benjamin Bengfort <[email protected]> # Created: Wed Mar 02 23:23:06 2016 -0500 # # Copyright (C) 2016 Bengfort.com # For license information, see LICENSE.txt # # ID: ingest.py [4ee79a0] [email protected] ...
''' Задание. Компьютер загадывает целое число от 1 до 100, и нам нужно написать программу, которая угадывает число за как можно меньшее количество попыток. ''' import np def guesswork(number): '''Сначала устанавливаем любое random число, а потом уменьшаем или увеличиваем его в зависимости от того, больше оно или...
#!/usr/bin/python # Wflow is Free software, see below: # # Copyright (c) J. Schellekens/Deltares 2005-2013 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX # All rights reserved. import os from traits.api import ( HasTraits, Directory, Str, Instance, provides ) from force_gromacs.core.i_process import IProcess from force_gromacs.simulation_builders.gromacs_topology_data import ( GromacsTopologyData ) @pr...
# -*- coding: utf-8 -*- from mptools.frameworks.py4web.controller import LocalsOnly from .... import settings from .common import pbfWebWrapper from .callbacks import vtile_ @action(f'{settings.PATHROOT}/vtile/<xtile:int>/<ytile:int>/<zoom:int>', method=['GET']) @action.uses(LocalsOnly()) @action.uses(pbfWebWrapper)...
import discord from discord.ext import commands from discord.utils import get class c205(commands.Cog, name="c205"): def __init__(self, bot: commands.Bot): self.bot = bot @commands.command(name='Manoeuvre_Salt_the_Earth', aliases=['c205', 'Scorn_Operative_11']) async def example_embed(self, ctx): ...
# Copyright (c) 2015, Dataent Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import dataent from dataent.translate import send_translations @dataent.whitelist() def get(name): """ Return the :term:`doclist` of the `Page` specified by `name` """ pa...
def main(): primes = [2] x = 3 while primes[-1] <= 2e6: for p in primes: if x % p == 0: break if p * p > x: primes.append(x) break x += 1 print(sum(primes[:-1])) main()
# Telemetry ZeroMQ TCP Publisher # Copyright (c) 2022 Applied Engineering import concurrent.futures import logging import msgpack import queue import threading import traceback import zmq import time import random # Set logging verbosity. # CRITICAL will not log anything. # ERROR will only log exceptions. # INFO will...
def main(): print('hola mundo') if __name__ == '__main__': main()
from int_to_str import int_to_str # Number Names # Show how to spell out a number in English. You can use a pre-existing implementation or make your own, but you should support inputs up to at least one million (or the maximum value # of your language’s default bounded integer type, if that’s less). def main(): i...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from mitemp_bt.mitemp_bt_poller import MiTempBtPoller from btlewrap.bluepy import BluepyBackend import sys from btlewrap.base import BluetoothBackendException import paho.mqtt.client as mqtt import time import json import logging import yaml _LOGGER = logging.getLogger(_...
import torch import torch.nn as nn import torch.nn.functional as F from src.models.modules.loss_modules import conv_bn_layer, tconv_bn_layer, tconv_layer, conv_layer, fc_layer, fc_bn_layer class V_CNN(nn.Module): def __init__(self, nc, ndf, height, width): super(V_CNN,self).__init__() self.nc = nc...
import sys import math from FASTA import FASTA from WaveletTree import WaveletTree import Utils def report_3(read_stopwatch, build_stopwatch, select_avg_time, rank_avg_time, access_avg_time): report_2(read_stopwatch, build_stopwatch) rank_file = open('rank.out', 'w') rank_file.write(str(rank_avg_time)) ...
from requests.structures import CaseInsensitiveDict def fetch(session, url, data): try: headers = CaseInsensitiveDict() headers["Content-Type"] = "application/json" result = session.post(url, data, headers=headers) return result.json() except ValueError: return {'Error'...
import pytest import numpy as np from transboost.weak_learner.decision_stump import MulticlassDecisionStump from transboost.label_encoder import OneHotEncoder class TestMulticlassDecisionStump: def setup_method(self): self.X = np.array([[0,13,255],[0,52,127],[3,4,204]]) self.Y = np.array([0,1,1])...
import os import click import audiomate from audiomate import annotations import spoteno @click.command() @click.argument('full_folder', type=click.Path()) @click.argument('out_folder', type=click.Path()) def run(full_folder, out_folder): if not os.path.exists(out_folder): print('Load source corpus') ...
import numpy as np niter=1500 #trials per worker r_values=np.array([0.1,0.2,0.3,0.4,0.5,.6,.7,.8,.9,1.,2.])#cm D_values=np.array([0.2,1.0,1.5,2.0,3.,4.,5.])#cm^2/s A_values=np.array([20.25,25,39,50,56.25,100,156.25,189,250])[::-1]#cm^2 L_values=np.sqrt(A_values)#cm kappa_values=np.array([5,10,15,20,25,30,35,40,45,50,55...
''' Adapted from source files located here https://github.com/Halogen002/Flare-Qt My thanks go to Halogen002 for providing me with the information I needed to write this definition. I extended it to include xbox gametypes as well ''' from reclaimer.common_descs import * from reclaimer.mi...
"""Deprecated.""" load("//bzllib:defs.bzl", _src_utils = "src_utils") src_utils = _src_utils
# coding=utf-8 from .base import TethysGizmoOptions __all__ = ['PlotObject', 'LinePlot', 'PolarPlot', 'ScatterPlot', 'PiePlot', 'BarPlot', 'TimeSeries', 'AreaRange', 'HeatMap'] class PlotViewBase(TethysGizmoOptions): """ Plot view classes inherit from this class. """ gizmo_name = "plot_vie...
from Graph import Graph from Graph import Tree NUMBER_OF_NODES = 512 class NineTailModel: def __init__(self): edges = getEdges(); # Create a graph vertices = [x for x in range(NUMBER_OF_NODES)] graph = Graph(vertices, edges) # Obtain a BSF tree rooted at the target...
#!/usr/bin/env python import sys import os def print_context(frame, assembly_file, address): address_without_0x = address.replace("0x", "").replace("[", "").replace("]", "") function = "NULL" instruction = "NULL" for line in open(assembly_file): if len(line) >= 4 and line[0] == "0" and line[...
import os # noqa: F401 from typing import List, Optional, Tuple, Union from .types import KNOWN_LICENSES, License, trigrams def guess_text(license_text: str) -> Optional[License]: """ Returns the most matching license iif it is 85% similar to a known one. This logic mirrors that of https://github.com/s...
""" Functions for loading prepackaged datasets Authors: Matthew Bernstein <[email protected]> """ import pkg_resources as pr import json from os.path import join import anndata def load_dataset(dataset_id): """Load a prepackaged spatial gene expression dataset. Parameters ---------- dataset_...
from gsrest.model.common import ConvertedValues class Block: """ Model representing block header fields and summary statistics """ def __init__(self, height, block_hash, no_txs, timestamp): self.height = height self.block_hash = block_hash self.no_txs = no_txs self.timestamp =...
from workon.utils.auth import * from workon.utils.cache import * from workon.utils.celery import * from workon.utils.color import * from workon.utils.date import * from workon.utils.debug import * from workon.utils.email import * from workon.utils.file import * from workon.utils.hashtag import * from workon.utils.html ...
from turkey import Turkey import random class DuckAdapter(Turkey): def __init__(self, duck): self.duck = duck def gobble(self): self.duck.quack() def fly(self): if random.randrange(0, 5) == 0: self.duck.fly()
from rest_framework import serializers from accounts.api.serializers import UserDisplaySerializer from employees.models import Employee class StdImageFieldSerializer(serializers.ImageField): """ Get all the variations of the StdImageField """ def to_native(self, obj): return self.get_variati...
from .resnet import resnet from .vgg16 import vgg16
import numpy as np from gym import utils from gym.envs.mujoco import mujoco_env class ReacherEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self): utils.EzPickle.__init__(self) mujoco_env.MujocoEnv.__init__(self, 'aubo_i5.xml', 2) def _step(self, a): vec = self.get_body_com("r...
# -*- coding: utf-8 -*- """ This module implements tools to perform PCA transformation. The main element is the **PcaHandler** class which is a user interface. It performs direct and inverse PCA transformation for 3D data. **Dimension_Reduction** is the background function which performs PCA while the **EigenEstimate...
# -*- coding: utf-8 -*- # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) import logging import sys from cached_property import cached_property import pytest from goodplay import ansible_support, docker_support, junitxml from goodplay.context import GoodplayContext j...
import graphene import json import uuid from datetime import datetime class Post(graphene.ObjectType): title = graphene.String() content = graphene.String() class User(graphene.ObjectType): id = graphene.ID(default_value=str(uuid.uuid4())) username = graphene.String() created_at = graphene.DateT...
#!/bin/sh ''''which python3.6 >/dev/null 2>&1 && exec python3.6 "$0" "$@" # ''' ''''which python3.5 >/dev/null 2>&1 && exec python3.5 "$0" "$@" # ''' ''''exec echo "Error: I can't find python3.[6|5] anywhere." # ''' from argh import ArghParser, arg, wrap_errors, expects_obj from connexion import FlaskApp import s...
import db import functools import logging from models.exceptions import InvalidComparisonError logger = logging.getLogger(__name__) class User(object): def __init__(self, _id, name, email): self.id = _id self.name = name self.email = email @classmethod @functools.lru_cache(None) ...
from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.views.generic import CreateView, ListView from django.template import Template from tryon.models import Tryon from tryon.forms import TryonForm import os from os import path import sys sys.path.append(os.path.abspath('model')...
import logging import sys import time from unittest import TestCase from hsmpy import HSM, State, FINAL, Condition, Event logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) logger = logging.getLogger(__name__) class TestHSM(TestCase): def test_run(self): class S1(State): def __init...
import os from negociant.trader.app.ctaStrategy.ctaBacktesting import DAILY_DB_NAME from negociant.trader.app.ctaStrategy.ctaHistoryData import loadDailyQuandlCsv loadDailyQuandlCsv(os.path.join('.', 'PAdjM.csv'), DAILY_DB_NAME, 'p.HOT') loadDailyQuandlCsv(os.path.join('.', 'SRAdjM.csv'), DAILY_DB_NAME, 'SR.HOT')
import torchtext import string import re import random from torchtext.vocab import Vectors def preprocessing_text(text): for p in string.punctuation: if (p == ".") or (p == ","): continue else: text = text.replace(p, " ") text = text.replace(".", " . ") text...
""" [5/28/2014] Challenge #164 [Intermediate] Part 3 - Protect The Bunkers https://www.reddit.com/r/dailyprogrammer/comments/26oop1/5282014_challenge_164_intermediate_part_3_protect/ ##Description Most of the residential buildings have been destroyed by the termites due to a bug in /u/1337C0D3R's code. All of the civ...
#!/usr/bin/env python3 __all__=("bind", "bindVarsToFunc", "modifyCode", "UnbindableException") __author__="KOLANICH" __license__="Unlicense" __copyright__=r""" This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this softwar...
from .ReadHelper import read_int_8, read_int_24be, signed24, read_int_16be PC_SIZE_CONVERSION_RATIO = 5.0 / 3.0 def read_pc_file(f, out, settings=None): pcm_threads = [ {"color": 0x000000, "description": "PCM Color 1"}, {"color": 0x000080, "description": "PCM Color 2"}, {"color":...
# -*- coding: utf-8 -*- # Author: XuMing <[email protected]> # Brief: from __future__ import print_function from setuptools import setup, find_packages from parrots import __version__ long_description = ''' ## Usage ### install * pip3 install parrots * Or ``` git clone https://github.com/shibing624/parrots.git cd p...
#!/usr/bin/env python import imp import io import os import sys from setuptools import find_packages, setup def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\n') buf = [] for filename in filenames: with io.open(filename, encoding=encoding) as...
''' Comparison of Dual Averaging algorithms @author: Maximilian Balandat @date: May 8, 2015 ''' # Set up infrastructure and basic problem parameters import multiprocessing as mp import numpy as np import datetime, os from ContNoRegret.Domains import nBox, UnionOfDisjointnBoxes, DifferenceOfnBoxes, unitbox, hollowbox ...
""" This module contains all the methods related to "buildtest build" which is used for building test scripts from a Buildspec """ import json import logging import os import re import shutil import sys import tempfile import traceback from datetime import datetime from buildtest import BUILDTEST_VERSION from buildtes...
import datetime import enum import functools from typing import List class Op(enum.Enum): Equal = "eq" NotEqual = "ne" Less = "lt" LessEqual = "le" Greater = "gt" GreaterEqual = "ge" class FilterInstance: def __init__(self, name, operator: Op, value): self.name = name sel...
import scipy import numpy as np import skimage import scipy.misc import skimage.measure image_list = ['27', '78', '403', '414', '480', '579', '587', '664', '711', '715', '756', '771', '788', '793', '826', '947', '994', '1076', '1097', '1099', '1141', '1197', '1263', '1320', '1389', '1463', '1563'] #image_list = ['27'...
"""An example to run the minitaur environment of trotting gait. """ import time import os import numpy as np import tensorflow as tf from pybullet_envs.minitaur.envs import minitaur_gym_env from pybullet_envs.minitaur.envs import minitaur_trotting_env #FLAGS = tf.flags.FLAGS #tf.flags.DEFINE_string("log_path", None, ...
__author__ = 'Jonathan Spitz' # ##################################### PICKER CLASS ##################################### # # A Picker object selects the best genomes from the given population based on their # fitness values. # To create an object you'll need to provide: class Picker(): def __init__(self): ...
from __future__ import unicode_literals, print_function, division import sys __author__ = 'dongliu' class OutputLevel(object): ONLY_URL = 0 HEADER = 1 TEXT_BODY = 2 ALL_BODY = 3 class ParseConfig(object): """ global settings """ def __init__(self): self.level = OutputLevel.ONLY_URL...
from System.Collections.Specialized import * from System.IO import * from System.Text import * from Deadline.Scripting import * from DeadlineUI.Controls.Scripting.DeadlineScriptDialog import DeadlineScriptDialog ######################################################################## ## Globals #####################...
"""Input/Output module. """ from .io_base import save, load #from .mechanics_run import MechanicsHdf5Runner
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras.models import Model, load_model from tensorflow.keras.layers import Dense, Input, Concatenate, Lambda from scipy.stats import entropy from matplotlib.lines import Line2D import...
""" This module provides several probability distributions for drawing synthetic data for clusters. CLASSES AND METHODS GaussianData : draw Gaussian data for cluster __init__(self) sample_cluster(self,class_size,mean,axes,sd) ExpData : draw doubly exponentially distributed data for cluster __init__(self) s...
import sys import r2pipe def extract_ehframe(infile, outfile): # store needed (eh_frame) sessions ehframe_sessions = [] r2 = r2pipe.open(infile) r2.cmd("aaa") allsessions = r2.cmd("iS").split('\n') for allsession in allsessions: if "eh_frame" in allsession: ehframe_session...
""" decorator example to enforce argument types to a decorated function. Because @wraps is used, the metadata is preserved. AUTHOR Colt Steele and some chipotage and testing by Tony Perez """ from functools import wraps def enforce(*types): """ decorator function enforcing, and converting, argument d...
#return the suffix of the ordinal day number. e.g., the "st" in "31st day of March" #only works for two-digit or smaller integers #only uses the whole number portion of any number passed (won't account for decimals) def ordinalSuffix(number): #truncate any decimals, and use only last 2 digits of resutling int...
from django.urls import path from evap.results import views app_name = "results" urlpatterns = [ path("", views.index, name="index"), path("semester/<int:semester_id>/evaluation/<int:evaluation_id>", views.evaluation_detail, name="evaluation_detail"), path("evaluation/<int:evaluation_id>/text_answers_ex...