input
stringlengths
2.65k
237k
output
stringclasses
1 value
trackSort = cms.string('sip2dSig'), useCategories = cms.bool(True), useTrackWeights = cms.bool(True), vertexFlip = cms.bool(False) ), tagInfos = cms.VInputTag(cms.InputTag("pfImpactParameterTagInfos"), cms.InputTag("pfInclusiveSecondaryVertexFinderCvsLTagInfos"), cms.InputTag("softPFMuonsTagInfos"), cms.InputTag("...
import pydotplus as pdp import networkx as nx from copy import deepcopy import itertools as it from ..utilities.util import Util from IPython.display import Image from IPython import get_ipython import logging logger = logging.getLogger('cegpy.chain_event_graph') class ChainEventGraph(nx.MultiDiGraph): """ Class:...
""" GP + transit example for Kepler 1627 / exoplanet case-studies docs. """ import exoplanet as xo xo.utils.docs_setup() print(f"exoplanet.__version__ = '{xo.__version__}'") ########################################## import lightkurve as lk import numpy as np, matplotlib.pyplot as plt # Get long cadence light curve...
isinstance(hsg_thing, np.ndarray): self.parameters = parameter_dict.copy() # Probably shouldn't shoehorn this in this way self.addenda = [] self.subtrahenda = [] self.ccd_data = np.array(hsg_thing) self.ccd_data[:, 0] = 1239.84 / self.ccd_data[:, 0] # This data won't have an error column, so attached a column of ...
from django.test import TestCase, Client from django.urls import reverse from django.test.utils import setup_test_environment from bs4 import BeautifulSoup import re import time from projects.models import * from projects.forms import * client = Client() # length of base template, used to test for empty pages LEN_B...
<gh_stars>10-100 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. impor...
from __future__ import division import logging import sys import os import math from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import xml.etree.ElementTree as ET from collections import OrderedDict import numpy as NP from scipy.constants import mu_0 from scipy.io import savemat from scipy.interpol...
""" A ProblemSet contains one or more (related) Problems. Each Problem has one or more Instances corresponding a to a different input. A "simple" problem like (lambda x: x + "world" == "Hello world") that has no inputs has just one instance, It is important that different ProblemSets do not overlap, in terms of duplic...
row_number = row_count - (sheet_count * row_limit) if sheet_count > 0: row_number += 1 return sheets[sheet_count], sheets[sheet_count].row(row_number) # Write the table contents subheading = None odd_style = styles["odd"] even_style = styles["even"] subheader_style = styles["subheader"] for row in rows: # Cu...
""" aspen.configuration +++++++++++++++++++ Define configuration objects. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import errno import mimetypes import os import sys import traceback import pkg_resources fr...
"""Defines metrics used to evaluate uncertainty.""" import numpy as np from scipy.stats import norm from utils.util import to_one_hot def gaussian_nll(y, mu, var): """Calculates the negative log likelihood of Gaussian distribution. Args: y: numpy array, shape [batch_size], the true labels. mu: numpy array, sh...
(Edges)" "dim" value: 2 "single" value: - Type: Group of Faces Number: 1 Name: "AllSubShapes (Faces)" "dim" value: 3 "single" value: - Type: Group of Solids Number: 1 Name: "AllSubShapes (Solids)" Conditions of use: - """ if dim not in [0, 1, 2, 3]: print "[X] There is no shape to return ...
""" Copyright (c) 2019, 2020, Oracle Corporation and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. Utility CLS methods shared by multiple tools. """ import os from java.io import File from java.io import IOException from java.lang import Ille...
from typing import Tuple import numpy as np import pandas as pd from pvrpm.core.enums import ConfigKeys as ck from pvrpm.core.case import SamCase from pvrpm.core.utils import summarize_dc_energy from pvrpm.core.logger import logger from pvrpm.core.modules import failure, monitor, repair class Components: """ Dat...
+ len(name), 0x1206) + name.encode( "ascii" ) if ( (self.rotation is not None) or (self.magnification is not None) or self.x_reflection ): word = 0 values = b"" if self.x_reflection: word += 0x8000 if not (self.magnification is None): # This flag indicates that the magnification is absolute, not # relativ...
import time from random import randint import board import simpleio import busio import terminalio import neopixel from digitalio import DigitalInOut, Direction, Pull from analogio import AnalogIn import displayio import adafruit_imageload from adafruit_display_text import label import adafruit_displayio_ssd1306 # unco...
self.comp_ids = dataset['comp_ids'] except KeyError: pass if 'centered' in dataset.keys(): self.centered = dataset['centered'][()] def load(self, dataset_path): """Read data set. Parameters ---------- dataset_path : :obj:`str` Path to NumPy ``npz`` file. """ dataset_npz = np.load(dataset_path, allow_pic...
"evap"), ("/staff/semester/1/import", "evap"), ("/staff/questionnaire/create", "evap"), ("/staff/user/create", "evap"), ] for form in forms: response = self.get_submit_assert_200(form[0], form[1]) self.assertIn("is required", response) forms = [ ("/student/vote/5", "lazy.student"), ("/staff/semester/1/course...
<gh_stars>0 from __future__ import annotations import os import sys import numpy as np import openpyxl import pandas as pd import printj from ortools.sat.python import cp_model from printj import ColorText as ct # from typing import Union class TimeVar: def __init__(self, hours: int, minutes: int): while minutes...
province in Canada. Notes - Creating geolocation and geolocation alias resource record sets in private hosted zones is not supported. - If you create separate resource record sets for overlapping geographic regions (for example, one resource record set for a continent and one for a country on the same continent)...
# -*- coding: utf-8 -*- import os import re import traceback import shutil import urllib import xml.etree.ElementTree as ET import xbmc import xbmcvfs import xbmcaddon # Import the common settings from settings import Settings from settings import log from settings import os_path_join from settings impo...
SGTE Data for Pure Elements, NPL Report DMA(A)195, Rev. August 1990' REF78 DUP-ALNI '<NAME>, J Alloy and Compounds, (1997); Al-Ni' 87GU3 87Gui3 '<NAME>, Z Metallkde, Vol 78 (1987) p 639-647 TRITA-MAC 324B (1986); CO-NI' 87GU4 87Gui4 '<NAME>, Int. J of Thermophys vol 8 (1987) p 481-510, TRITA-MAC 308 (1986); CO...
# import mysql.connector as mysql import datetime from types import resolve_bases from dotenv import load_dotenv import os from flaskext.mysql import MySQL import pymysql from datetime import date load_dotenv() SQL_HOST = os.getenv("SQL_HOST") SQL_USER = os.getenv('SQL_USER') SQL_PASSWORD = os.getenv('SQ...
for reduction if post_reduction: stage += 1 stage_type = "red_out" placeholders.add("ops%d" % stage) post_reduction = False stage_map[arg_i] = (stage,stage_type) for i in range(2): operand_i, operand = stack.pop() if operand[0] is ng.GPUTensor: stage_map[operand_i] = (stage,stage_type) elif arg_type in _fl...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe, erpnext import frappe.model from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry from frap...
<filename>python/cm/tests_upgrade.py # 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...
<reponame>IBM/networking-services-python-sdk # coding: utf-8 # (C) Copyright IBM Corp. 2020. # # 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 # ...
"""pywizlight integration.""" import asyncio import json import logging import socket from time import time from typing import Any, Dict, Tuple, Optional, Union, List from asyncio_dgram.aio import connect as connect_dgram, DatagramStream from pywizlight.bulblibrary import BulbClass, BulbType from pywizlight.exception...
the object's current state. If # any object in the transaction does not fit that rule, refuse # to undo. In theory this means arbitrary transactions can be # undone (because we actually match the MD5 of the state); in practice it # means that it must be the most recent transaction those # objects were involved in....
't_3'), ('v_6', 't_3')}, '>': {('c_1', 'v_5'), ('t_3', 'v_8'), ('t_3', 'v_9'), ('c_1', 't_4'), ('t_2', 'v_5'), ('t_2', 'v_6'), ('t_3', 'v_10'), ('t_2', 'v_7'), ('c_1', 'v_7'), ('t_4', 'v_8'), ('c_1', 'v_6'), ('t_4', 'v_10'), ('c_1', 't_3'), ('t_2', 'v_9'), ('c_1', 'v_8'), ('c_1', 't_2'), ('c_1', 'v_9'), ('t_4', 'v_5...
<gh_stars>0 import time import tkinter as tk from tkinter import ttk, messagebox import socket import chat_utils as utils import threading import json import sys class Main_GUI(tk.Tk): def __init__(self): super(Main_GUI, self).__init__() self.client = Client(self) self.client.init_chat() self.LO...
<reponame>mogorman/openpilot-1 from selfdrive.car import apply_toyota_steer_torque_limits from selfdrive.car.chrysler.chryslercan import create_lkas_hud, create_lkas_command, \ create_wheel_buttons_command, create_lkas_heartbit, \ acc_command, acc_command_v2, acc_log from selfdrive.car.chrysler.values import CAR, Car...
number of satisfied requests self.n_satisfied_interval = 0.0 self.n_sat_cloud_interval = 0 self.n_instantiations_interval = 0 # Cache and storage self.cache_hits = 0 self.storage_hits = 0 self.cache_misses = 0 self.storage_misses = 0 self.serv_hits = 0 self.flow_start = {} # flow_id to start time self.flow...
snapshot[<span class="pl-s"><span class="pl-pds">&#39;</span>SnapshotType<span class="pl-pds">&#39;</span></span>] <span class="pl-k">==</span> <span class="pl-s"><span class="pl-pds">&#39;</span>shared<span class="pl-pds">&#39;</span></span> <span class="pl-k">and</span> pattern <span class="pl-k">==</span> <span clas...
timestep=timestep, lower=lower, upper=upper, minsize=conf_idfy["minsize"], maxsize=conf_idfy["maxsize"], split_levels=conf_split["levels"], split_seed_minsize=conf_split["seed_minsize"], split_seed_minstrength=conf_split["seed_minstrength"], topo_filter_apply=conf_topo["filter_apply"], topo_filter_mode=conf_to...
following verifications are available for this keyword. They are exposed as additional methods on this object. - :meth:`energy_cutoff` - :meth:`forces` - :meth:`kpoints` - :meth:`pressure_residual` - :meth:`stress_tensor` Returns: list: Nearest neighbors bond lengths of the relaxed structure per ordered set ...
pipeline is not None else self.pipeline kvy = kvy if kvy is not None else self.kvy tvy = tvy if tvy is not None else self.tvy exc = exc if exc is not None else self.exc rvy = rvy if rvy is not None else self.rvy while True: # continuous stream processing never stop try: done = yield from self.msgParsator(ims=i...
the list. """ hl7V2Stores = _messages.MessageField('Hl7V2Store', 1, repeated=True) nextPageToken = _messages.StringField(2) class ListLocationsResponse(_messages.Message): r"""The response message for Locations.ListLocations. Fields: locations: A list of locations that matches the specified filter in the req...
defaults tests.append(""" Sub MySub(x As Single, y, z As Boolean, a, Optional b = 10, Optional c="hello") a=10 n=20 c="hello" End Sub """) # simple sub with optional arguments and defaults tests.append(""" Sub MySub(x As Single, y, z As Boolean, a, Optional b = 10, Optional c As String = "hello") a=10 n=20 c="hello" E...
flavor = "variable-font" _attrs = ('filename', 'axisSubsets', 'lib') filename = posixpath_property("_filename") def __init__(self, *, name, filename=None, axisSubsets=None, lib=None): self.name: str = name """string, required. Name of this variable to identify it during the build process and from other parts of...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, <NAME>. 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 Lice...
import database as d import numpy as np import random from transitions import Machine #Conversations are markov chains. Works as follows: a column vector for each CURRENT state j, a row vector for each TARGET state i. #Each entry i,j = the probability of moving to state i from state j. #target state D = end of convers...
from dataclasses import dataclass from datetime import date, datetime import mock from pdfminer.layout import LTChar, LTCurve, LTFigure, LTImage, LTTextBoxHorizontal, LTTextLineHorizontal from typing import List from rdr_service.services.consent import files from tests.helpers.unittest_base import BaseTestCase class...
from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os import tool_shed.base.test_db_util as test_db_util emboss_datatypes_repository_name = 'emboss_datatypes_0050' emboss_datatypes_repository_description = "Datatypes for emboss" emboss_datatypes_repository_long_description = "Long description of Embos...
import hashlib import importlib import os import os.path as osp import pkg_resources import re import subprocess import tarfile import typing from collections import defaultdict from distutils.version import LooseVersion from pkg_resources import parse_version from typing import Any, List, Optional, Tuple, Union impor...
from pxr import * import os, os.path import numpy import re import usdUtils import math import imp usdStageWithFbxLoaded = True try: imp.find_module('fbx') import fbx except ImportError: usdUtils.printError("Failed to import fbx module. Please install FBX Python bindings from http://www.autodesk.com/fbx and add p...
num_layers, dropout=0, **kwargs): super(Seq2SeqEncoder, self).__init__(**kwargs) self.embedding = nn.Embedding(vocab_size, embed_size) self.rnn = rnn.LSTM(num_hiddens, num_layers, dropout=dropout) def forward(self, X, *args): X = self.embedding(X) # X shape: (batch_size, seq_len, embed_size) X = X.swapaxes(0, 1...
<reponame>dirtybrain/DAnTE_V2 #!usr/bin/env python3 __author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright 2020 Westwood Robotics" __date__ = "Jan 8, 2020" __version__ = "0.1.0" __status__ = "Beta" import time import os import sys from pathlib import Path from Play.motor_controller import MotorControll...
leads to a whole load of wrongdoings.", "vote_count": 7, "first_air_date": "2013-09-24", "backdrop_path": "/yVsEJ9Y4c50I5ZY5Fo7odcde2cd.jpg", "poster_path": "/wGpeMDbep7sn4m4OQbu3WQ1Bdwy.jpg", "genre_ids": [35], "name": "London Irish", "original_language": "en", "original_name": "London Irish", "popularity": 2...
fields for fc. If none specified, all fields are returned. Supports fields in list [] or comma separated string "field1,field2,.." where -- optional where clause params -- dictionary of parameters for query """ lyr = self.layer(layer_name) lyr.layer_to_kmz(flds, where, params, kmz=out_kmz) def createReplica(sel...
np.cos(locs1[..., 1] - locs2[..., 1]) return 6367000 * np.arccos( cos_lat_d - cos_lat1 * cos_lat2 * (1 - cos_lon_d)) def isopoly_to_gdf(collec_poly, levels, field_name="levels"): """ Convert a collection of matplotlib.contour.QuadContourSet to a GeoDataFrame Set an attribute `field_name` on each feature, accordi...
if content_type is None: raise ValueError( "Missing the required parameter `content_type` " "when calling `get_account_attachment_by_file_name`" ) collection_formats = {} path_params = { "AccountID": account_id, "FileName": file_name, } query_params = [] header_params = { "xero-tenant-id": xero_tenant_id...
** 4 ) # calc kinematic viscosity from celsius temperature AND RETURN IT, VDI # Wärmeatlas 2013 table D2.1: @njit(nogil=GLOB_NOGIL, cache=True) def ny_water(T): # 4th degree: # Tclp = T.copy() # Tclp[Tclp > 100.] = 100. return ( 1.7764473380494155e-06 - 5.5640275781265404e-08 * T + 1.0243072887494426e-09 * T ...
self.window, self.theme.text_state[state], False, None, self, None, dst_x, dst_y, layout) cr.restore() return def __draw_part_bg(self, cr, part, w, h, state, shape, style, r, aw, shapes): # outer slight bevel or focal highlight shapes[shape](cr, 0, 0, w, h, r, aw) cr.set_source_rgba(0, 0, 0, 0.055) cr....
""" Cadastre - Export method class This plugins helps users to import the french land registry ('cadastre') into a database. It is meant to ease the use of the data in QGIs by providing search tools and appropriate layer symbology. begin : 2013-06-11 copyright : (C) 2013, 2019 by 3liz email : <EMAIL> This program is...
""" FUNÇÕES UTEIS PARA PRÉ PROCESSAMENTO DA IMAGEM, ANTES DA APLICAÇÃO DO OCR. 1. A IMAGEM É LIDA EM ESCALA DE CINZA; 2. GAUSSIAN BLUR É EXECUTADO PARA REMOVER QUALQUER RUÍDO DISPONÍVEL; 3. O LIMIAR ADAPTATIVO É APLICADO À IMAGEM BORRADA; 4. APLICA-SE TRANSFORMAÇÕES MORFOLÓGICAS PARA DILATAÇÃO DA IMAGEM. 5. ENC...
""" Unit cell stacker ================= This code can be used for stacking the unit cells of different content and dimension to a single cell. This is intended to be helpful for constructing complex super cell structures. The unit cells should be given in Gaussian format, where the lattice vectors are input in the sa...
overwrite == True) and output.find('toaBr') == -1: print(image) #raw_input() try: convert(image, output, Format = out_format) except: print('Could not convert', image) else: print(os.path.basename(output), 'already exists') ########################################################################################...
<reponame>djconly85/PPA2_0_code # -------------------------------- # Name: utils.py # Purpose: Provides general PPA functions that are used throughout various PPA scripts and are not specific to any one PPA script # NOTE: # This version, in the __init__ method of the Publish class, hard-codes in variables # that normal...
from collections import defaultdict import datetime from operator import itemgetter import re from uuid import getnode as getmac from gmusicapi import session from gmusicapi.clients.shared import _Base from gmusicapi.protocol import mobileclient from gmusicapi.utils import utils class Mobileclient(_Base): """Allows...
<filename>ludwig/combiners/combiners.py<gh_stars>1-10 #! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber 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 # # ht...
<filename>examples/fixed_axis_tsne.py """ Copyright 2020 heucoder @ https://github.com/heucoder/dimensionality_reduction_alo_codes/blob/master/codes/T-SNE/TSNE.py 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 ...
<gh_stars>0 from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np #import os import sys sys.path.insert(0,'/home/joshi/fixed_point_edits') import os import absl from tensorflow.python.ops import parallel_for as pfor from FixedPointStore import...
<gh_stars>0 # Copyright (c) 2017-2019, <NAME> # Copyright (c) 2014-2018, iocage # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyrig...
import os import fnmatch import logging import hashlib import json from collections import defaultdict, namedtuple from flask import url_for as flask_url_for from flask import current_app from boto.s3.connection import S3Connection from boto.s3 import connect_to_region from boto.exception import S3CreateError, S3Respo...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # 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...
``name`` property) does not affect equality. Parameters ---------- other : GeneticCode Genetic code to test for inequality against. Returns ------- bool Indicates whether the genetic code is not equal to `other`. """ return not (self == other) @stable(as_of="0.4.0") def translate(self, sequence, readin...
num_trees, feature_subset_strategy, seed, subsampling_rate, train, test): code = self.session_assertion() + textwrap.dedent(""" from pyspark.ml.classification import RandomForestClassifier from pyspark.ml.evaluation import MulticlassClassificationEvaluator import io, pandas as pd str_io = io.StringIO() (...
<reponame>anthok/overwatch-api<filename>overwatch_api/core.py import asyncio import aiohttp import async_timeout from overwatch_api.constants import * from overwatch_api.exceptions import * """The async interface to the OWAPI (https://github.com/SunDwarf/OWAPI) api.""" # TODO Handle being ratelimited, asyncio.slee...
<gh_stars>0 import cv2 import numpy as np from numpy import linalg as npla import scipy as sp def color_transfer_sot(src,trg, steps=10, batch_size=5, reg_sigmaXY=16.0, reg_sigmaV=5.0): """ Color Transform via Sliced Optimal Transfer ported by @iperov from https://github.com/dcoeurjo/OTColorTransfer src - any floa...
abc('st;dc2') abc('w %s_temp_initial.aig'%f_name) ni = n_pis() + n_latches() res = 1 abc('st;if -a -K %d'%k) # to get plain direct map if n_nodes() > n_initial: abc('r %s_temp_initial.blif'%f_name) res = 1 #plain n_plain = n_nodes() ## print nl() abc('write_blif %s_temp_plain.blif'%f_name) ## print 'wrote bli...
<reponame>piotrmirowski/arnheim<filename>arnheim_3/src/main.py # Copyright 2021 DeepMind Technologies Limited # # 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...
<filename>src/firebolt/async_db/cursor.py from __future__ import annotations import logging import re import time from enum import Enum from functools import wraps from inspect import cleandoc from types import TracebackType from typing import ( TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Tup...
<filename>google/cloud/aiplatform_v1beta1/services/job_service/transports/grpc.py # -*- coding: utf-8 -*- # Copyright 2020 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...
#!/usr/bin/env python3.7 # -*- coding: utf-8 -*- import argparse import asyncio import configparser import os from collections import namedtuple from dataclasses import dataclass, field from datetime import datetime, date, timedelta from typing import List, Tuple, Dict import aiohttp import keyring import pytz @data...
""" Downloading NeuroImaging datasets: atlas datasets """ import os import warnings import xml.etree.ElementTree from tempfile import mkdtemp import json import shutil import nibabel as nb import numpy as np from numpy.lib import recfunctions from sklearn.utils import Bunch from .utils import _get_dataset_dir, _fetch...
<reponame>bugface/transformers # Copyright 2020 The HuggingFace Team. 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 # # U...
config] ##------------------------------------------------------------------------------------ ## Old Shapes TESTING ##------------------------------------------------------------------------------------ def prep_oldshapes_test(init_with = None, FCN_layers = False, batch_sz = 5, epoch_steps = 4, training_folder= ...
from __future__ import print_function, division import numpy as np import matplotlib.pyplot as plt from numpy import linalg as LA from matplotlib.animation import FuncAnimation from matplotlib.ticker import FormatStrFormatter from mpl_toolkits.mplot3d import Axes3D from operator import itemgetter, attrgetter, truediv i...
## ## Instructions: ## 1) Install python-protobuf for your IDAPython installation. This probably means ## downloading it from https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz ## and manually running setup.py ## 2) This script should be run via IDA's batch mode. See the output ## of --help for more details o...
standard supervised training error_metrics = train_super(basic_setting['epochs'], model, optimizer, train_loader, test_loader, basic_setting['b']) super_results[str(k)] = error_metrics # semi-supervised training using pseudo-labels # error_metrics = train_semisuper(basic_setting['epochs'], model, optimizer, train...
# -*- coding: utf-8 -*- """ Source: http://www.turingfinance.com/random-walks-down-wall-street-stochastic-processes-in-python/ https://github.com/StuartGordonReid/Python-Notebooks/blob/master/Stochastic%20Process%20Algorithms.ipynb Processes that can be simulated in this module are: - Brownian Motion - Geometric Brown...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
#!/usr/bin/env python #%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%# #%!%!% ----------------------------- FPTE_Result_Stress_2nd ----------------------------- %!%!%# #%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%# ...
council to deal only with the important and necessary matters, we should not only refuse to obey you, but consider you insane or criminals.", "Even Lucifer was not guilty of so great a sacrilege in heaven, for he only presumed to be God's equal. God help us!", "You condemned the holy gospel and replaced it with the t...
the layer's input: all the outputs of the previous layers, resulting in [x_0, ..., x_l-1, x_l]. Returns the layer's output, as well as the input of its conv2d. Args: _input: tensor, the operation's input; layer: `int`, identifier number for this layer (within a block); growth_rate: `int`, number of new convolut...
sage: x.is_gamma0_equiv(y, 3, 'matrix') (False, None) sage: Cusp(1/2).is_gamma0_equiv(1/3,11,'corner') (True, 19) sage: Cusp(1,0) Infinity sage: z = Cusp(1,0) sage: x.is_gamma0_equiv(z, 3, 'matrix') ( [-1 1] True, [-3 2] ) ALGORITHM: See Proposition 2.2.3 of Cremona's book 'Algorithms for Modular Ellipt...
import cv2 import math import numpy as np import random import torch from scipy import special from scipy.stats import multivariate_normal from torchvision.transforms.functional_tensor import rgb_to_grayscale # -------------------------------------------------------------------- # # --------------------------- blur ke...
<reponame>queueit/KnownUser.V3.Python<filename>SDK/test_integration_config_helpers.py<gh_stars>1-10 import unittest from queueit_knownuserv3.integration_config_helpers import * from queueit_knownuserv3.http_context_providers import HttpContextProvider class HttpContextProviderMock(HttpContextProvider): def __init__...
from __future__ import division from __future__ import print_function from __future__ import absolute_import import sys import os import os.path import numpy as np from collections import namedtuple from collections import OrderedDict import json import deeplift import tensorflow as tf NEAR_ZERO_THRESHOLD = 10**(-7) ...
<gh_stars>1-10 import os, json, sys import os.path as osp import argparse import warnings from tqdm import tqdm import cv2 import numpy as np from skimage.io import imsave from skimage.util import img_as_ubyte from skimage.transform import resize from skimage.color import label2rgb import shutil from PIL import Image f...
# coding: utf-8 # Welcome to the fourth Lab session of the "Advanced algorithmics and graph theory with Python" MOOC. In this exercise you will learn how to find solutions to the Traveling Salesman Problem. # # The main objective of this exercise is to: # * Describe the classic traveling salesman problem and use it a...
import numpy as np import scipy.interpolate as interpolate import h5py as h5 import os from lxml import objectify, etree import sharpy.utils.generator_interface as generator_interface import sharpy.utils.settings as settings import sharpy.utils.cout_utils as cout @generator_interface.generator class TurbVelocityFiel...
logger.info("HA Deployment set to DISABLED") HA_DEPLOYMENT = False if write_flag == 0: # reload odim-controller conf with haDeployment param yaml.SafeDumper.org_represent_str = yaml.SafeDumper.represent_str yaml.add_representer(str, represent_yaml_multline_str, Dumper=yaml.SafeDumper) with open(CONTROLLER_CONF_FI...
# -*- coding: utf-8 -*- # $Id: itgTableDaa.py $ """ DAA (instruction) result table. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or ...
# coding: utf-8 # <NAME> (<EMAIL>, twitter @hirax) # This code is based on Brun0oO's work(MIT License) # https://github.com/Brun0oO/Pythonista/blob/master/arkit/main.py # and Char<NAME>'s work. # https://github.com/scj643/objc_tools/blob/master/objc_tools/scenekit/sk_scene.py # Following thread will be heplful for unde...
import sys import datetime import reportconfig import projectmetrics import os import numpy as np import matplotlib import matplotlib.dates as mdates # check for headless executions if "DISPLAY" not in os.environ: if os.system('python -c "import matplotlib.pyplot as plt; plt.figure()"') != 0: print("INFO: Lack of di...
"Q25228": { "description": "British Overseas Territory in the Caribbean", "label": "Anguilla" }, "Q25279": { "description": "island country in the Caribbean, part of the Kingdom of the Netherlands", "label": "Curaçao" }, "Q25305": { "description": "British overseas territory in the Caribbean", "label": "Briti...
self.m_dist2SL, self.m_dh, self.m_dt) else: return '(%f, %f)' % (self.m_dh, self.m_dt) def loadTide(self, dt, dh, data, dataDir, dilution): self.m_dt = dt self.m_dh = dh self.m_tideDta = {} for i, j, a, in data: self.m_tideDta.setdefault(i, []) self.m_tideDta[i].append( (j,a) ) self.m_dataDir = dataDir self...
<reponame>Adiapohon/BROCANTO /* MIT License * Copyright (c) 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 limitation the rights * ...