input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>backend/causx_application.py from flask.helpers import make_response, send_file import pandas as pd import os import sys import tempfile import json import zipfile import uuid import datetime import jwt from io import BytesIO from pathlib import Path from flask import request from werkzeug.utils import secure...
running-config | section bgp # router bgp 10 # neighbor peer2 peer-group # neighbor peer2 maximum-routes 12000 # neighbor 1.1.1.1 maximum-routes 12000 # ! # address-family ipv4 # neighbor 1.1.1.1 activate # network 1.1.1.0/24 # network 1.5.1.0/24 route-map MAP01 # redistribute ospf3 match external # ! # address-family ...
options of an |AnalogOut| channel node. Parameters: channel_index (int): The |AnalogOut| channel. node (DwfAnalogOutNode): The channel node. Returns: List[DwfAnalogOutFunction]: The available node waveform shape functions. Raises: DwfLibraryError: An error occurred while executing the operation. """ c_func_...
(p45 - 1)*(apd + (np.exp(-p44*apd) - 1)/p44) if flags['sw'][8]: t[8]=apdf*(p[32] + p[45]*plg[3] + p[34]*plg[10] + \ (p[100]*plg[1] + p[101]*plg[6] + p[102]*plg[15])*cd14*flags['swc'][4] + (p[121]*plg[2] + p[122]*plg[7] + p[123]*plg[16])*flags['swc'][6]*np.cos(hr*(tloc - p[124]))) if flags['sw'][9] and inputp['g_l...
load the model twice if not self.options['gauge']=='Feynman' and 'QED' in coupling_type: logger.info('Switch to Feynman gauge because '+\ 'model loop_qcd_qed_sm is restricted only to Feynman gauge.') self._curr_model = None mg_interface.MadGraphCmd.do_set(self,'gauge Feynman') if coupling_type == ['QCD',]: add_o...
19) not in self.prov_hols[province]) def test_naefelser_fahrt(self): known_good = [(2018, 4, 5), (2019, 4, 4), (2020, 4, 2), (2021, 4, 8), (2022, 4, 7), (2023, 4, 13), (2024, 4, 4), (2025, 4, 3), (2026, 4, 9), (2027, 4, 1), (2028, 4, 6), (2029, 4, 5), (2030, 4, 4), (2031, 4, 3), (2032, 4, 1), (2033, 4, 7), (203...
<gh_stars>1-10 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # Copyright (c) 2022 by <NAME>, UC3M. + # All rights reserved. This file is part of the HH-VAEM, and is released under + # the "MIT License Agreement". Please see the LICENSE file that should have + # been included as part ...
<gh_stars>0 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
<filename>tests/_core/test_intrusive.py # _core/test_intrusive.py """Tests for rom_operator_inference._core._intrusive.py.""" import pytest import numpy as np from scipy import linalg as la import rom_operator_inference as roi from . import MODEL_FORMS, MODEL_KEYS, _get_data, _get_operators # Mixins (private) ====...
<filename>Extended_Figure_7/scripts/datasets_build.py import os import gzip import sys sys.path.append('../') import pickle import json import tqdm import glob import click from multiprocessing import Pool import pandas as pd import numpy as np from sklearn.metrics import roc_auc_score from mutrate import set_mutrate...
Data.RStar.median() EStar_lower_err = np.percentile(Data.EStar.as_matrix(), 25) EStar_upper_err = np.percentile(Data.EStar.as_matrix(), 75) RStar_lower_err = np.percentile(Data.RStar.as_matrix(), 25) RStar_upper_err = np.percentile(Data.RStar.as_matrix(), 75) cNorm = colors.Normalize(vmin=MinMChi, vmax=MaxMChi) ...
<reponame>iTecAI/SPEAR from asyncio.streams import StreamWriter from socket import * import asyncio from cryptography.fernet import Fernet, InvalidToken import rsa import hashlib import random import time import functools import threading import base64 import json from concurrent.futures import ThreadPoolExecutor impor...
if ftype == TType.STRING: self.success = iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() self.validate() def write(self, oprot): sel...
self.health_errors = None class MasterTargetServer(msrest.serialization.Model): """Details of a Master Target Server. :param id: The server Id. :type id: str :param ip_address: The IP address of the server. :type ip_address: str :param name: The server name. :type name: str :param os_type: The OS type of the...
True else: bool_2 = False if "Bounty" in getCheckBoxes: bool_3 = True else: bool_3 = False # No Answers if bool_1 and bool_2 == False and bool_3 == False: print("Only First is True, Without Query") questions = Question.objects.all().annotate( answers=Count('answer')).filter( answers=0, is_deleted=False).or...
### Use Fixed Vertical Shift Check Box useFixedVertShiftChkState = tk.BooleanVar() useFixedVertShiftChkState.set(False) useFixedVertShift_checkBox = tk.Checkbutton(measErrorLabelframe, text = 'Use Fixed Vertical Shift', font=('Arial', 12), var=useFixedVertShiftChkState, command=useVertShiftCallback) useFixedVert...
= stamp return True def on_msg__b(self, msg, stamp): with self._lock: if self._state == 2: assert len(self._pool) >= 1, 'missing trigger event' while self._pool and (stamp - self._pool[0].timestamp) >= 0.1: self._pool.popleft() if not self._pool: self._state = 3 self.time_state = stamp if self._state == 2: ...
<reponame>ResearchSoftwareInstitute/MyHPOM from django.test import TestCase from django.contrib.auth.models import Group from django.core.exceptions import PermissionDenied from hs_access_control.models import UserResourceProvenance, UserResourcePrivilege, \ GroupResourceProvenance, GroupResourcePrivilege, \ UserGro...
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.167983, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 2.76118, 'S...
<filename>src/MSongsDB/PythonSrc/DatasetCreation/dataset_creator.py """ <NAME> (2010) Columbia University <EMAIL> This code contains code used when creating the actual MSong dataset, i.e. functions to create a song HDF5 at the right place, with proper locks for multithreading. This is part of the Million Song Dataset...
import math from decimal import Decimal from .. import tag from . import Widget, ClosedWidget, FieldArg, FieldArgList, FieldArgTable, FieldArgDict class Arrow1(ClosedWidget): """An svg arrow shape, fitting in a 100x100 space """ # This class does not display any error messages display_errors = False _poin...
<reponame>thiippal/AI2D-RST # -*- coding: utf-8 -*- # Import modules from .draw import * def process_command(user_input, mode, diagram, current_graph): """ A function for handling generic commands coming in from multiple annotation tasks. Parameters: user_input: A string containing the command entered by the u...
# Copyright (c) 2020 PaddlePaddle 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 applicabl...
ntuniprot(RecName_Full='Plasma membrane-associated coenzyme Q6 reductase PGA3'), 'Q12748' : ntuniprot(RecName_Full='Inner kinetochore subunit CTF3 {ECO:0000305}'), 'Q12749' : ntuniprot(RecName_Full='Structural maintenance of chromosomes protein 6'), 'Q12751' : ntuniprot(RecName_Full='RNA polymerase II assembly facto...
<reponame>preym17/csit<gh_stars>0 # Copyright (c) 2018 Cisco and/or its affiliates. # 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 re...
import os import csv import json import re import datetime import requests from .. import package_metadata, occurrences from ..gbifutils import ( is_not_none, is_none, stop, gbif_GET, gbif_GET_write, gbif_DELETE, ) import logging def _parse_args(x): if re.match("geometry", x): geometry = re.search("(POLY|MUL...
current count value for progress bar self.__progressBarCount.set(xx+10) ## increment that value self.__singleSipmIvsVline = [] if(self.__cmjPlotDiag > 4): print(("__multiWindow__unpackSipmgetIvsVforSipm: len(self.__localSipmIvsVresult) = %d, self.__localSipmIvsVresult = %s \n") % (len(self.__localSipmIvsVresult),sel...
''' 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 use this fi...
# 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 use...
nothing received for 30 seconds, resubscribe. erc.subscribe() count = 0 else: #If nothing received for 5 seconds, up the count and # try again. count = count + 1 # If the display/main thread hasn't done anything in 10 # minutes, let us restart entv. #TO DO - get_time if enstore_display.message_queue.get_time...
<reponame>Amirsorouri00/neolej ''' .d8888b. 888 888 888 8888888 888 d88P Y88b 888 888 888 888 888 888 888 888 888 888 888 888 888 888 .d88b. 88888b. 8888b. 888 888 88888b.d88b. 88888b. .d88b. 888d888 888888 .d8888b 888 88888 888 d88""88b 888 "88b "88b 888 888 888 "888 "88b 888 "88b d88""88b 888P" 888 88K 888 888 ...
cmap_file = os.path.join(CMAPSFILE_DIR, "colorbrewer", "piyg_9.rgb") cmap = Colormap(self._coltbl(cmap_file)[::-1], name=cname) matplotlib.cm.register_cmap(name=cname, cmap=cmap) return cmap @property def prgn(self): cname = "prgn" if cname in matplotlib.cm._cmap_registry: return matplotlib.cm.get_cmap(cname) ...
""" Contains reusable elements for the gui, primarily menus, as well as some functions for generating widely used menus, such as unit dropdowns """ import os import base64 from dash import dcc from dash import html import dash_bootstrap_components as dbc import dash_cytoscape as cyto from dash import dash_table from ....
LISP_MAX_MAP_NOTIFY_RETRIES ) : lprint ( "DDT Map-Request retry limit reached for EID {}, nonce 0x{}" . format ( green ( OoOoOooOOOOO0 , False ) , lisp_hex_string ( iIiIi1i1Iiii ) ) ) if 76 - 76: I1ii11iIi11i - ooOoO0o % OoooooooOO / Oo0Ooo % IiII / ooOoO0o mr . dequeue_map_request ( ) return if 57 - 57: O0 if 23...
<gh_stars>0 import tkinter as tk import os from sys import exit import xml.etree.ElementTree as ET import requests import urllib.request from tkinter import font as tkfont, filedialog from io import BytesIO from tkcalendar import DateEntry from babel.numbers import * from zipfile import ZipFile from tkinter ...
# coding: utf-8 """ Automated Tool for Optimized Modelling (ATOM) Author: Mavs Description: Unit tests for basepredictor.py """ # Standard packages import pytest import numpy as np import pandas as pd from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA # Own modules from atom import ATOMClas...
<gh_stars>0 # -*- coding: utf-8 -*- """ ================================================================================== """ import copy from itertools import takewhile from rdflib import ( BNode, Graph, Literal, RDF, URIRef, Variable, ) from rdflib.util import first from rdflib.namespace import split_uri fro...
<gh_stars>0 """Support for real-time plotting of LinearActuator state.""" # Standard imports import asyncio import datetime import logging # External imports from bokeh import layouts from bokeh.models import ( ColumnDataSource, DatetimeTickFormatter, annotations, arrow_heads, widgets ) from bokeh.plotting import fig...
from platform import python_version from itertools import zip_longest import itertools import math from typing import final print('Hello World!') num = int(input()) a, b = 1, 2 # a = 1, b = 2 def numbers(): return 1, 2, 3, 4, 5 a, b, c, d, e = numbers() print(3 + 2) # 5 += print(3 - 2) # 1 -= print(3 * 2) # 6 *= p...
else: E.append(1 - AC) # Now deal with the peripheral faces for tet in tri.tetrahedra(): for j in range(4): E.append(0) return E # 6. Coboundary # Suppose that e is a truncated edge. Let LF be the set of truncated # faces to the left of e and let RF be the set of faces to the right. Then # \delta e^* = \sum_{...
import os import warnings from collections import OrderedDict from typing import Optional, Union import imageio import cv2 import numpy as np import torch from torch.utils import data import datautils __all__ = ["RIO10"] class RIO10(data.Dataset): r"""Expecting the RIO10 Dataset to be in this format: .. code-blo...
<gh_stars>1-10 # # gemini_python # # primitives_qa.py # ------------------------------------------------------------------------------ import numpy as np import math import operator from copy import deepcopy from collections import namedtuple from astropy.stats import sigma_clip from scipy.special import j1 from gemi...
<filename>skfem/quadrature.py """Tabulated and generated quadrature points for various reference domains.""" import numpy as np from typing import Tuple def get_quadrature(refdom: str, norder: int) -> Tuple[np.ndarray, np.ndarray]: """Return a nth order accurate quadrature rule for different reference do...
threshold: to_keep = np.where(global_scores[picked] >= threshold)[0] to_delete = np.where(global_scores[picked] < threshold)[0] # print(picked.shape) picked = picked[to_keep] # print(picked.shape) topk = picked.shape[0] for x in to_delete: sizes[x] = 0 # print(topk) if not topk: break global_scores /= len(s...
<gh_stars>0 import os as _os from isopy import core import csv as csv import datetime as dt import numpy as np import chardet import openpyxl import pyperclip from openpyxl import load_workbook import itertools import io __all__ = ['read_exp', 'read_csv', 'write_csv', 'read_xlsx', 'write_xlsx', 'read_clipboard', 'ar...
<reponame>szyminson/jsos-msg-lookup<gh_stars>10-100 #!/usr/bin/env python3 # coding=utf-8 import signal import requests import os from dotenv import load_dotenv import getpass import schedule import time from datetime import datetime import urllib.parse as urlparse from urllib.parse import parse_qsl from bs4 import B...
<filename>oPB/gui/mainwindow.py #!/usr/bin/python # -*- coding: utf-8 -*- """ This module is part of the opsi PackageBuilder see: https://forum.opsi.org/viewforum.php?f=22 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), ...
<gh_stars>1-10 from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from conductor.client.http.api_client import ApiClient class QueueAdminResourceApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not ed...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Implement the explicit finite difference method to calculate the price of various options @author: ucaiado Created on 07/03/2016 """ # import libraries import matplotlib.pylab as plt import math import numpy as np import pandas as pd from scipy import stats import seabor...
an image viewer program when you are using 'tempfile' image # handler. This option is a list of string where the first element is the # command itself and reminders are the options for the command. You can use # {file} and {format} in the string to represent the location of the generated # image file and image format. ...
big_ax = fig.add_subplot(111) big_ax.set_axis_bgcolor('none') big_ax.tick_params(labelcolor='none', top='off', bottom='off', left='off', right='off') big_ax.set_xticks([]) big_ax.set_yticks([]) big_ax.set_xlabel(r'$|\mathbf{b}|$ [m]', fontsize=24, weight='medium', labelpad=20) big_ax.set_ylabel(r'$V_{b\tau}^\math...
<filename>pylayers/mobility/transit/vec3.py ##################################################################### # vec3 - 3-dimensional vector # # Copyright (C) 2002, <NAME> (<EMAIL>) # # You may distribute under the terms of the BSD license, as # specified in the file license.txt. ####################################...
# rare case we don't worry too much about alignment.) mc = self.assembler.mc current_pos = mc.get_relative_pos() target_pos = (current_pos + 15) & ~15 target_pos = max(target_pos, self.min_bytes_before_label) insert_nops = target_pos - current_pos assert 0 <= insert_nops <= 15 for c in mc.MULTIBYTE_NOPs[insert_n...
""" Manage the sparse pointlike data. Duplicates the functionality of the C++ class BinnedPhotonData Implements the new standard data format http://gamma-astro-data-formats.readthedocs.io/en/latest/skymaps/healpix/index.html#hpx-bands-table """ import os, glob, StringIO, pickle import healpy from collections import Co...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # C++ version Copyright (c) 2006-2011 <NAME> http://www.box2d.org # Python port by <NAME> / http://pybox2d.googlecode.com # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages ...
<reponame>zanussbaum/Transformers4Rec # # Copyright (c) 2021, NVIDIA 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 req...
# Generated from Java9.g4 by ANTLR 4.7.2 from antlr4 import * if __name__ is not None and "." in __name__: from .Java9Parser import Java9Parser else: from Java9Parser import Java9Parser # This class defines a complete generic visitor for a parse tree produced by Java9Parser. class Java9Visitor(ParseTreeVisitor): ...
batch_size batch_params = [] batch_total_rewards = [] for idx in batch_idxs: batch_params.append(self.params[idx]) batch_total_rewards.append(self.total_rewards[idx]) return batch_params, batch_total_rewards def append(self, observation, action, reward, terminal, training=True): """Append a reward to the memo...
<gh_stars>100-1000 from collections import defaultdict import numpy as np import torch import torch.nn as nn from metal.utils import move_to_device, recursive_merge_dicts, set_seed model_defaults = { "seed": None, "device": 0, # gpu id (int) or -1 for cpu "verbose": True, "fp16": False, "model_weights": None, #...
import random from otp.ai.AIBase import * from direct.distributed.ClockDelta import * from toontown.battle.BattleBase import * from toontown.battle.BattleCalculatorAI import * from toontown.toonbase.ToontownBattleGlobals import * from toontown.battle.SuitBattleGlobals import * from pandac.PandaModules import * from too...
of the member function whose DLL entry description is to be returned. invKind: Specifies the kind of member identified by memid. """ pass def GetDocumentation(self, index, strName, strDocString, dwHelpContext, strHelpFile): """ GetDocumentation(self: UCOMITypeInfo, index: int) -> (str, str, int, str) ...
# coding=utf-8 # Copyright 2020 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 applicable l...
# -*- coding: utf-8 -*- """ contest models: Contest, Contestant, Donor, and Founder :copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved. :license: Apache, see LICENSE for more details. """ import datetime import decimal import math import pytz import random import re import flask import sqlalch...
<reponame>virtUOS/siddata_backend<filename>backend/api_views.py """ api_views.py """ import base64 import logging import datetime import json import hashlib import io from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound, JsonResponse...
# coding=utf-8 from src.testcase.GN_F1331.LaunchApp import * from src.utils.GetSerial import * # 多线程返回值 class MyThread(threading.Thread): def __init__(self, target, args=()): super(MyThread, self).__init__() self.func = target self.args = args def run(self): self.result = self.func(*self.args) def get_resul...
"1980/81:148"): "metadataonly", ("prop", "1980/81:155"): "metadataonly", ("prop", "1980/81:157"): "metadataonly", ("prop", "1980/81:159"): "metadataonly", ("prop", "1980/81:160"): "metadataonly", ("prop", "1980/81:162"): "metadataonly", ("prop", "1980/81:161"): "metadataonly", ("prop", "1980/81:163"): "metadatao...
""" Code associated with the left-hand tree view for tests """ import gtk, gobject, pango, guiutils, plugins, logging from ordereddict import OrderedDict class TestColumnGUI(guiutils.SubGUI): def __init__(self, dynamic, testCount): guiutils.SubGUI.__init__(self) self.addedCount = 0 self.totalNofTests = testCoun...
""" common_sim_browndye2 Base objects and routines for preparing and running Browndye2 simulations. """ import xml.etree.ElementTree as ET from xml.dom import minidom import os import glob import re import parmed import numpy as np BROWNDYE_TRAJ_PREFIX = "traj" BROWNDYE_INPUT_FILENAME = "input.xml" BROWNDYE_APBS_I...
# -*- coding: utf-8 -*- import re import sys from unittest.mock import MagicMock from asyncy.Exceptions import AsyncyError, \ TypeAssertionRuntimeError, TypeValueRuntimeError from asyncy.Stories import Stories from asyncy.processing import Story from asyncy.processing.internal import File, Http, Json, Log from pytes...
# -*- coding: utf-8 -*- from app.const import * from app.base.logger import log from app.base.db import get_db, SQL from app.model import syslog from app.model import policy from app.base.utils import AttrDict, tp_timestamp_sec def get_by_id(pid): s = SQL(get_db()) s.select_from('audit_policy', ['id', ...
#!/usr/bin/env python3 import re import glob import json import lzma import argparse from functools import reduce from collections import OrderedDict, defaultdict from datetime import datetime, timedelta def main(): parser = argparse.ArgumentParser(description="Parse result files and render an HTML page with a statu...
0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+...
= Var(within=Reals,bounds=(0,None),initialize=0) m.x598 = Var(within=Reals,bounds=(0,None),initialize=0) m.x599 = Var(within=Reals,bounds=(0,None),initialize=0) m.x600 = Var(within=Reals,bounds=(0,None),initialize=0) m.x601 = Var(within=Reals,bounds=(0,None),initialize=0) m.x602 = Var(within=Reals,bounds=(0,None),initi...
<gh_stars>100-1000 # imports import hashlib import json import os import os.path import random import re import shutil import stat import urllib.parse # constants world_x_schema = "world_x_cities" world_x_table = "cities" # schema name can consist of 51 reserved characters max, server supports up to # 64 chars but wh...
await self.account.blockchain.getcid(hash=content["hash"]) await content_collection.find_one_and_update({"txid":txid}, {"$set":{"cid":int(cid)}}) await content_collection.find_one_and_update({"txid":txid}, {"$set":{"hash":None}}) updated = await content_collection.find_one({"txid":txid}) return {i:updated...
all regs""" res_str = '' for i in range(2, self.NUM_GPRS): res_str += ('r' + str(i)).rjust(3) + ': ' + hex(self.get_gpr(i)) + '\n' return res_str def get_s_reg_table(self, header): """Get a table with hexstrings of all special registers""" res_str = '' if header: res_str += self.get_limb_header() res_str += ...
from flask import Flask, render_template, session, request, redirect, url_for from CreateForm import CreateInputForm from collections import defaultdict from grab_data import grab_data, grab_works from os import urandom import re app = Flask(__name__) app.secret_key = urandom(24) books = ["Genesis", "Exodus", "Levitic...
<reponame>SaitoYutaka/microbitAnim<filename>microbitAnim.py # -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Aug 8 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ######################...
:obj:`str`: The full path to the 'psadilookup.dat' file. """ return os.path.join(os.path.dirname(__file__), "data", "psadilookup.dat") def get_filepath(obj): try: path = obj.filepath() except AttributeError: try: path = obj.file.path except: # Let's make up a filename from the first file time found = Fa...
<reponame>topnoom259/railblock<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # # RaiBlocks Telegram bot # @RaiWalletBot https://t.me/RaiWalletBot # # Source code: # https://github.com/SergiySW/RaiWalletBot # # Released under the BSD 3-Clause License # """ Usage: Press Ctrl-C on the command line or send...
<reponame>mariusleu/openstack-nannies #!/usr/bin/env python # # Copyright (c) 2018 SAP SE # 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/lice...
import pbge from game.content.plotutility import LMSkillsSelfIntro from game.content import backstory from pbge.plots import Plot from pbge.dialogue import Offer, ContextTag from game.ghdialogue import context import gears import game.content.gharchitecture import game.content.ghterrain import random from game import m...
<gh_stars>10-100 # coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import unittest import numpy as np import pandas as pd import os import re from pyiron_base import Proj...
import jwt from datetime import datetime, timedelta import unittest from unittest import mock import pytest import os import json from lib.TokenService import TokenService from pactman import Consumer, Provider from src import bootstrap from RDS import Token, OAuth2Token, BaseService, OAuth2Service, User from lib.Excep...
<gh_stars>0 #!/usr/bin/env python2 """ builtin_assign.py """ from __future__ import print_function from _devbuild.gen import arg_types from _devbuild.gen.option_asdl import builtin_i from _devbuild.gen.runtime_asdl import ( value, value_e, value_t, value__Bool, value__Str, value__MaybeStrArray, value__AssocArray, l...
for characters * ``'-1'`` for strings * ``True`` for boolean values * XXX: I just obtained these values empirically """ # Only one item in the input sequence ? if (len(seqarrays) == 1): seqarrays = np.asanyarray(seqarrays[0]) # Do we have a single ndarray as input ? if isinstance(seqarrays, (ndarray, np.void))...
__syncthreads(); // 循环前同步 callback_for_runge_kutta4_for_magnet_with_single_qs(t0, Y0, k1, k, kls, p0s, *current_element_number, qs_data); // 已同步 if(tid == 0){ vct6_dot_a_v_ret(dt / 2., k1, temp); // temp = dt / 2 * k1 vct6_add_local(temp, Y0); // temp = Y0 + temp } __syncthreads(); callback_for_runge_kutta4_...
\ as JSONSchemaValidatorAba4991D4E9B8747_v2_1_2 from .validators.v2_1_2.jsd_aeb4dad04a99bbe3 \ import JSONSchemaValidatorAeb4Dad04A99Bbe3 \ as JSONSchemaValidatorAeb4Dad04A99Bbe3_v2_1_2 from .validators.v2_1_2.jsd_aeb9eb67460b92df \ import JSONSchemaValidatorAeb9Eb67460B92Df \ as JSONSchemaValidatorAeb9Eb67460B92D...
that the underlying gRPC stub method was called. assert len(call.mock_calls) == 1 _, args, _ = call.mock_calls[0] assert args[0] == services.GetJobTemplateRequest() # Establish that the response is the type that we expect. assert isinstance(response, resources.JobTemplate) assert response.name == "name_value" ...
"""Cabal packages""" load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") load(":cc.bzl", "cc_interop_info") load(":private/actions/info.bzl", ...
<reponame>Sharath302/popmon # Copyright (c) 2021 ING Wholesale Banking Advanced Analytics # # 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 t...
###################################################################### # # # Copyright 2009-2019 <NAME>. # # This file is part of gdspy, distributed under the terms of the # # Boost Software License - Version 1.0. See the accompanying # # LICENSE file or <http://www.boost.org/LICENSE_1_0.txt> # # # ####################...
<gh_stars>10-100 from __future__ import division, print_function import numpy as np import matplotlib.pyplot as plt from NGSIM_env.vehicle.control import ControlledVehicle from NGSIM_env import utils from NGSIM_env.vehicle.dynamics import Vehicle from NGSIM_env.vehicle.behavior import IDMVehicle from NGSIM_env.vehicle....
default store object in cache if cache: # Check if the user has defined that the parameter has or not to be # cache explicitly if name in self.decorator_arguments: use_cache = self.decorator_arguments[name].cache else: if is_vararg(name): vararg_name = get_name_from_vararg(name) use_cache = self.decorator_arg...
import csv import datetime import os import sys import time import traceback from sys import platform 'Driver' from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains 'Driver Exceptions' from selenium.common.exceptions import * 'Parser' from bs4 import BeautifulSoup from bs4.e...
import tensorflow as tf import numpy as np import collections from rpn_tools.my_anchor_target_layer_modified import AnchorTargetLayer from rpn_tools.proposal_layer_modified import ProposalLayer_Chunk from rpn_tools.proposal_target_layer_modified import ProposalTargetLayer from tensorflow.python.framework import ops fro...
# -*- coding: utf-8 -*- # Standard library imports from shutil import which from ctypes import WINFUNCTYPE, windll from ctypes.wintypes import BOOL, DWORD import codecs import os import re import shlex import signal import socket import subprocess import threading import time from shutil import which # Local imports ...
from misc import ln, softmax import numpy as np import scipy.special as scs from misc import D_KL_nd_dirichlet, D_KL_dirichlet_categorical class HierarchicalPerception(object): def __init__(self, generative_model_observations, generative_model_states, generative_model_rewards, transition_matrix_context, prior_s...
<gh_stars>0 #Es.1 Dato un array contenente solo 0 e 1 fare un programma che lo ordina in tempo lineare senza usar array o liste di appoggio def ordina(A): v0=0 for i in range(len(A)): if A[i]==0: v0=(v0+1) print("v0: " + str(v0)) for j in range(0,v0): A[j]=0 start = (v0) stop = (len(A)) for x in ra...