input
stringlengths
2.65k
237k
output
stringclasses
1 value
# Copyright (c) 2016 Presslabs SRL # # 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...
The most general expression for the conductivity is given by the Kubo formula .. math:: \\sigma(q,\\omega)=\\frac{ie^2\\omega}{q^2}\\chi^0(q,\\omega). where :math:`\\chi^0` is the Polarizibility. If ``q`` is nonzero, this form is used. However, it is common to use a simpler limiting cases of this expression. T...
input, its input regularizer is from dw1. conv = self.GetConv('conv1') gamma = self.GetGammaAbsValue('conv1') # The effective size for dw can be computed from its gamma, and # the loss may be computed as follows: # gamma_dw = self.GetGammaAbsValue('dw1') # expected_loss = _coeff(conv) * ( # gamma.sum() * (gamma_...
import re import os import logging from copy import deepcopy from .exceptions import InterpolationError from .backends import YAMLBackend, SopsYAMLBackend, JSONBackend from .util import LookupDict, sym_lookup function = re.compile(r'''%\{(scope|hiera|lookup|literal|alias)\(['"](?:::|)([^"']*)["']\)\}''') interpolate ...
<gh_stars>0 import itertools import hashlib import pypipegraph as ppg import numpy as np import pandas as pd from pandas import DataFrame from mbf_genomics import DelayedDataFrame from mbf_qualitycontrol import register_qc, qc_disabled from mbf_genomics.util import parse_a_or_c_to_anno from mbf_genomics.annotator impor...
(" + str(authenticators.messageData[1]) + ")", 400 return json.dumps(authenticators.messageData) ''' PATH: /im/as/authenticator N/A ACTIONS: POST, PUT, PATCH, DELETE ''' def post_as_authenticator(self): return "NOT AVAILABLE", 405 def put_as_authenticator(self): return "NOT AVAILABLE", 405 ...
import json import re from struct import unpack BLEND_MODE = ( 'normal', 'additive', 'multiply', 'screen' ) ATTACHMENT_TYPE = ( 'region', 'boundingbox', 'mesh', 'skinnedmesh' ) scale = 1 class BinaryStream: def __init__(self, base_stream): self.base_stream = base_stream def readBool(self): return self....
the current working Strike List.([{id: 'b/b/v/f'}, {id: 'aa/f/h'}]) @staticmethod def _strikeList_operations_add(self, strike): """ Adds a list of strikes to the current working Strike List.([{id: 'b/b/v/f'}, {id: 'aa/f/h'}]) :param strike (list): The list of strikes to add. list of object with fields id (java.l...
# -*- coding: utf8 -*- # # Module PLOT # # Part of Nutils: open source numerical utilities for Python. Jointly developed # by HvZ Computational Engineering, TU/e Multiscale Engineering Fluid Dynamics, # and others. More info at http://nutils.org <<EMAIL>>. (c) 2014 """ The plot module aims to provide a consistent inte...
<reponame>ACSLab/pheeno_robot_code<gh_stars>1-10 """ Author: <NAME> based heavily upon <NAME>'s tracking code from UCLA REU (camera.py). """ # Import NumPy Libraries import numpy as np from numpy import average as avg from numpy import subtract as sub # Import System Libraries import math # Import OpenCV Libraries im...
<gh_stars>10-100 #!/usr/bin/env python3 """Starts the user interface of gmoshui.""" from _version import __version__ from view import mainwindow, progressdialog from PySide2 import QtCore, QtGui from PySide2.QtWidgets import * from PySide2.QtGui import * from PySide2.QtCore import * from functools import partial impor...
[] r1430_1500_tomorrow = [] r1500_1530_tomorrow = [] r1530_1600_tomorrow = [] r1600_1630_tomorrow = [] r1630_1700_tomorrow = [] r1700_1730_tomorrow = [] r1730_1800_tomorrow = [] r1800_1830_tomorrow = [] r1830_1900_tomorrow = [] r1900_1930_tomorrow = [] r1930_2000_tomorrow = [] r2000_2030_tomorrow = [] r203...
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
For now, will # resort to ssh into the host and start a new "rinetd" instance each # time a new vmattach is issued. try : _proc_man = ProcessManagement(username = "root", \ hostname = obj_attr_list["host_cloud_ip"], \ cloud_name = obj_attr_list["cloud_name"]) if operation == "setup" : _cmd = "echo \"0.0.0.0...
"""Tests the dependency analyzer and `dump` backend.""" from unittest import TestCase import os import tempfile from plumbum import local from .common import run_vhdeps DIR = os.path.realpath(os.path.dirname(__file__)) class TestDump(TestCase): """Tests the dependency analyzer and `dump` backend.""" def test_basi...
<reponame>Kami-DiscordBot/Predeactor-Cogs import logging from contextlib import suppress from datetime import datetime from typing import Optional, Union import discord from redbot.core import Config, commands from redbot.core.bot import Red from redbot.core.utils.chat_formatting import bold, error, humanize_list fro...
underworld_graph = { 992: { "title": "Darkness", "description": "You are standing on grass and surrounded by darkness.", "terrain": "NORMAL", "coordinates": "(75,61)", "elevation": 0, "w": 966 }, 966: { "title": "Darkness", "description": "You are standing on grass and surrounded by darkness.", "terrain": "...
<filename>libs/html5lib/filters/optionaltags.py import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2 = previous1 previous1 = token yield previous2, previous1, None de...
<reponame>ozdanborne/felix # -*- coding: utf-8 -*- # Copyright (c) 2015-2016 Tigera, Inc. All rights reserved. # Copyright 2015 Cisco Systems # # 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 #...
Size of population 2 after split. b1: Population growth coefficient of population 1 b2: Population growth coefficient of population 2 m12: Migration from pop 2 to pop 1 (2*Na*m12). m21: Migration from pop 1 to pop 2. Tam: The scaled time between the split and the end of ancient migration (in units of 2*Na generati...
<gh_stars>0 #!/bin/env python3 import sys import os import traceback import ast from neo4j import GraphDatabase sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../reasoningtool/QuestionAnswering/") from KGNodeIndex import KGNodeIndex sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../"...
filter_by(reserved=reserved).\ filter_by(address=address).\ update(params, synchronize_session='evaluate') if not rows_updated: LOG.debug('The row was updated in a concurrent transaction, ' 'we will fetch another row') raise exception.FixedIpAssociateFailed(net=network_id) return fixed_ip_ref @require_admin_...
import os import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html import geopandas as gpd import pandas as pd import plotly.graph_objects as go import plotly.express as px from scipy import stats from peaky_finders.predictor import ( create_load_dura...
<reponame>victorfica/utils<filename>myboxplot.py<gh_stars>0 import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from numpy.random import permutation, seed import pandas as pd import seaborn as sns from itertools import cycle from vectools import untangle try: import numba as nb from bootstra...
m.b1108 <= 0) m.e1739 = Constraint(expr= -m.b1098 + m.b1108 <= 0) m.e1740 = Constraint(expr= -m.b1099 + m.b1108 <= 0) m.e1741 = Constraint(expr= -m.b1098 + m.b1109 <= 0) m.e1742 = Constraint(expr= -m.b1099 + m.b1109 <= 0) m.e1743 = Constraint(expr= -m.b1100 + m.b1109 <= 0) m.e1744 = Constraint(expr= -m.b1097 + m.b1110 ...
default=-1) return retval @property def hsrp_priority(self): ## For API simplicity, I always assume there is only one hsrp ## group on the interface if not self.has_ip_hsrp: return 0 # Return this if there is no hsrp on the interface retval = self.re_match_iter_typed(r'^\s*standby\s+(\d+\s+)*priority\s+(\d+)'...
<gh_stars>0 # coding=utf-8 from django.test import TestCase import json # Create your tests here. from django.test import override_settings @override_settings(DEBUG=True) class TestSimpleCreate(TestCase): @classmethod def setUpTestData(cls): # Set up data for the whole TestCase cls.user_from = {} cls.user_from...
<gh_stars>1-10 import torch import os import argparse from dataset import DataLoader from utils import MidtoCorner, IoU from collections import Counter from model import YOLOv1 # Argparse to start the YOLO training ap = argparse.ArgumentParser() ap.add_argument("-tip", "--test_img_files_path", default="bdd100k/images...
설명 초기 코드에 주어진 class Node 와 class BinSearchTree 를 기반으로, 이진 탐색 트리 (binary search tree) 에 새로운 원소를 삽입하는 insert(key, data) 연산의 구현을 완성하세요. class BinSearchTree 에는 이미 insert(key, data) 메서드가 구현되어 있습니다. 이것을 그대로 이용하고, class Node 의 insert(key, data) 메서드를 재귀적 방법으로 구현하세요. 강의에서 언급한 바와 같이, 이미 트리 안에 들어 있는 것과 같은 (중복된) 키를 이용하여 삽입을 시도하는 ...
import requests import pandas as pd import numpy as np import configparser from datetime import datetime from dateutil import relativedelta, parser, rrule from dateutil.rrule import WEEKLY class WhoopClient: '''A class to allow a user to login and store their authorization code, then perform pulls using the code in...
_x_max = _df_kde_i[_x_name].iloc[-1] _x_i = np.extract((_x > _x_min) & (_x < _x_max), _x) _mean, _std = stats.norm.fit(_x_i) _df_kde_ex['mean'].loc[_index] = _mean _df_kde_ex['std'].loc[_index] = _std _df_kde_ex['range'].loc[_index] = _x_max - _x_min _df_kde_ex['range_min'].loc[_index] = _x_min _df_kde_ex['r...
struct OPCITEMHEADER1 { OPCHANDLE hClient; DWORD dwValueOffset; WORD wQuality; WORD wReserved; FILETIME ftTimeStampItem; }; """ SetLocalType(-1, OPCITEMHEADER1_str, 0) Til2Idb(-1, "OPCITEMHEADER1") OPCITEMHEADER2_str = """ struct OPCITEMHEADER2 { OPCHANDLE hClient; DWORD dwValueOffset; WORD wQuality; WORD...
from django.shortcuts import render_to_response, get_object_or_404, redirect from django.http import HttpResponseRedirect, Http404, HttpResponse, HttpResponseForbidden from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.contrib....
c_key.kind() != "Conference": raise endpoints.NotFoundException( 'No conference found with key: %s' % wsck) conf = c_key.get() if email in conf.followedBy: raise ConflictException( "You already follow this conference") if conf.seatsAvailable > 0: retVal = False else: conf.followedBy.append(email) conf.put(...
1) SM.SetFlightDeckUnitLoadout('Kevlavik', 'Shipwreck 2-2', '2 Kh-22MP;1 Kh-22MP;25 Flare-1;25 Chaff-1;') SM.AddUnitToFlightDeck('Kevlavik', 'Tu-22ME', 'Shipwreck 2-3', 1) SM.SetFlightDeckUnitLoadout('Kevlavik', 'Shipwreck 2-3', '2 Kh-22MP;1 Kh-22MP;25 Flare-1;25 Chaff-1;') SM.AddUnitToFlightDeck('Kevlavik', 'T...
\text{other}) Parameters ---------- input : dragon.vm.torch.Tensor The input tensor. other : Union[dragon.vm.torch.Tensor, number] The tensor to compare. out : dragon.vm.torch.Tensor, optional The output tensor. Returns ------- dragon.vm.torch.Tensor The output tensor. """ return _binary_func(input, ot...
import argparse import sys import pandas as pd import matplotlib.pyplot as plt import numpy as np import re from collections import defaultdict from math import log10 import matplotlib.patches as mpatches import statistics NO_THREADS_BASELINE = "DEFAULT" def main(): font = {'font.family': 'normal', # 'font.weight'...
"metadataonly", ("prop", "1909:9"): "metadataonly", ("prop", "1909:90"): "metadataonly", ("prop", "1909:91"): "metadataonly", ("prop", "1909:92"): "metadataonly", ("prop", "1909:93"): "metadataonly", ("prop", "1909:94"): "metadataonly", ("prop", "1909:95"): "metadataonly", ("prop", "1909:96"): "metadataonly", ...
<gh_stars>1-10 """ This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Tools involved the execution of library creation worklists. AAB """ from everest.entities.utils import get_root_aggregate from thelma.tools.s...
# # This file is part of Brazil Data Cube Collection Builder. # Copyright (C) 2019-2020 INPE. # # Brazil Data Cube Collection Builder is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """Define Brazil Data Cube utils.""" # Python Nat...
in the first r columns, then keep its segment number cur_segment_id = segmented_img[y, x] segmented_img[y, x] = cur_segment_id lowest_active_point_per_col[x] = y else: # not continuopus image, but one with borders # go over all active points # start with points after height of r and later between 0 and r fo...
"""Module alphabet_soup.""" __author__ = '<NAME> (japinol)' __all__ = ["AlphabetSoup"] from sys import exit import logging from alphabetsoup.utils import remove_diacritics_from_str # Module Constants WORDS_MIN_CHARS = 3 # Minimum characters for each word to be searched WORDS_MIN_SEARCH = 1 # Minimum wor...
scheduled[1].entry_date == GeneratedDate(2020, 9, 15) records = [ Transaction(date(2019, 3, 1), "ABC", 1, Amount(100)), Transaction(date(2019, 6, 1), "ABC", 1, Amount(100)), Transaction(date(2019, 9, 1), "ABC", 1, Amount(100)), Transaction(date(2019, 11, 1), "ABC", 1, Amount(100)), # dated in the future ] sche...
k, dim in zip(key, self.dims) if not isinstance(k, integer_types) ) new_key = [] for k in key: if isinstance(k, Variable): k = k.data if not isinstance(k, BASIC_INDEXING_TYPES): k = np.asarray(k) if k.size == 0: # Slice by empty list; numpy could not infer the dtype k = k.astype(int) elif k.dtype.kind == "...
}, { 'type': TYPE_UINT32, 'name': 'eventId' }, { 'type': TYPE_UINT32, 'name': 'deviceId' }, { 'type': TYPE_UINT32, 'name': 'eventSecond' }, { 'type': TYPE_UINT32, 'name': 'impact' }, { 'type': TYPE_IPV6, 'name': 'sourceIpAddress' }, { 'type': TYPE_IPV6, 'name': 'destinationIpAddress' }, { 'block': BLOCK_STRING, ...
Default is 0.8. sampleRateHz : int Samples rate of the audio for playback. channels : int Number of channels for the output. Returns ------- AudioClip """ samples = squaretone(duration, freqHz, dutyCycle, gain, sampleRateHz) if channels > 1: samples = np.tile(samples, (1, channels)).astype(np.float32) r...
<filename>gamemodes/comDifficulty/hard.py import gamemodes.assets.turnCounter from random import randint from tkinter import * import platform # Player is O, Computer is X. def playerVsComputer(ticTacPyApp): field = [[" ", " ", " "], [" ", " ", " "], [" ", " ", " "]] def fieldFilled(): notice = Topleve...
import numpy as np from matplotlib import pyplot as plt from mpl_toolkits import mplot3d import neural_net import utils def plot_lra_random_weight_losses(linear_regressor_ann, input_dim, output_dim, train1_x, train1_nb_examples, train1_y): min_lra_loss = np.inf random_weights = np.arange(-10,11) fig = plt.figure(...
# -*- coding: utf-8 -*- """ This is the base file that can serve as a starting point for the Python Adaptor development. This file can also be used as template for Python modules. main_logger. """ import argparse as ap import csv import datetime import logging import os import pandas as pd from pathlib import Path im...
from flask import render_template, flash, redirect, url_for, request, Flask, jsonify, send_from_directory from app import app, db, ImmigrationToolBox, DataWizardTools from app.models import User, Post from app.forms import PostForm from werkzeug.urls import url_parse from datetime import datetime import pandas as...
this test if it completely | | notContains | surrounds a feature in selectingLayer. No portion of the | | | containing feature; however, the contained feature is allowed | | | to touch the containing feature (that is, share a common | | | point along its boundary). | | | | | | contains-If a feature in layer conta...
<gh_stars>1-10 # Copyright (c) 2021 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 requir...
<gh_stars>10-100 # -*- coding: utf-8 -*- """ Created on Thu Nov 10 20:21:46 2015 @author: derrick """ from __future__ import print_function, absolute_import, unicode_literals, division import glob import itertools import json import os import random import numpy as np import obspy import pandas as pd from six import...
<reponame>yawatajunk/Wi-Sun_EnergyMeter<filename>sem_com.py #!/usr/bin/python3 # coding: UTF-8 import argparse import binascii import datetime import glob import json import threading import time import os import pickle import socket import sys import RPi.GPIO as gpio from y3module import Y3Module from echonet_lite i...
<reponame>SimonasJocys/retina_net """ Copyright 2018 <NAME> This file was derived from eval.py, implementing RSNA metric calculation. Copyright 2017-2018 Fizyr (https://fizyr.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may o...
import os from nipype.interfaces.afni.base import (AFNICommandBase, AFNICommandOutputSpec, isdefined) from nipype.utils.filemanip import split_filename as split_f from nipype.interfaces.base import (CommandLine, CommandLineInputSpec, TraitedSpec, traits, File) def interative_flirt(anat_file, anat_file_BET, temp...
expansion? Numeric integer.", default="OFF") parser.add_option("--query", action="store", type="string", dest="query", help="Query collections of cells whose enrichment will be searched in target cells", default="OFF") parser.add_option("--source", action="store", type="string", dest="source", help="File source for i...
""" server.py Provides classes to create servers and handle their clients. """ import socket from . import logger from .settings import default_header_size, default_chunk_size, default_port, default_queue from abc import ABC, abstractmethod import threading from typing import Tuple, Any, Callable, List, Union import ...
Check for connecting lanes. This is pretty much for the roundabouts, but some weird geometries # make it possible for single junctions to have the same road entering and exiting. Two cases, # Lanes that exit one junction and enter another (or viceversa) exit_lane_keys = [get_lane_key(wp) for wp in exit_lane_wps] en...
is not exist in the current DB-Structure".format(dbname), exc_info=self._logger_traceback) return Status(status=None, track_id=self._error_track_id.incr(), func_name=function_name(-2)) ### Update Attribute if "info" in self.tables(dbname=dbname): try: #cursor = self._db.cursor() self._threads_cursors[thread_nam...
# -*- coding: utf-8 -*- """ Created 5 March 2019 epsc_peak_x.y.z.py """ # from __main__ import * import pandas as pd import numpy as np import matplotlib.pyplot as plt import elephant from neo.io import IgorIO import os from collections import OrderedDict import math def get_metadata(file, data_notes): '''Takes a ...
#!python # Produces the set of factorial implementations (defined by models argument) from input RT-level model # for given configuration of implementation flow (config.flow in the input configuration argument) # Author: <NAME>, Universitat Politecnica de Valencia import sys import xml.etree.ElementTree as ET import r...
insert_xforwarded_for: Optional[pulumi.Input[str]] = None, lws_separator: Optional[pulumi.Input[str]] = None, lws_width: Optional[pulumi.Input[int]] = None, name: Optional[pulumi.Input[str]] = None, oneconnect_transformations: Optional[pulumi.Input[str]] = None, proxy_type: Optional[pulumi.Input[str]] = None, red...
<gh_stars>0 from __future__ import annotations import datetime as _datetime import logging as _logging import os import pathlib import re from contextlib import contextmanager from dataclasses import dataclass from enum import Enum from typing import Any, Dict, Generator, List, Optional from flytekit.clients import f...
self.printLevel >= 2: print("==== Current state: ", self.zt, ". Location: ", loc) def evaluateCost(self, t, xt, bt): return np.max(np.dot(self.V[t][xt].T, bt)) def updateBelief(self, xt, xNext, at, ot, bt): return np.dot( self.M[at][xt][xNext][ot], bt )/np.sum(np.dot( self.M[at][xt][xNext][ot], bt )) def ge...
from enum import IntEnum from ctypes import ( Union, c_char, c_uint16, c_uint8, c_uint32, c_uint64, c_int32, ) from DyldExtractor.structure import Structure class LoadCommands(IntEnum): """An Enum for all the load commands. """ """ After MacOS X 10.1 when a new load command is added that is required to b...
<gh_stars>0 from scoring import scoring from objects import Spectrum, SequenceAlignment, HybridSequenceAlignment, Database, Alignments, DEVFallOffEntry from alignment import alignment_utils, hybrid_alignment import objects import utils import database import gen_spectra import math import re import time FIRST_ALIGN_...
from __future__ import annotations import dataclasses import enum import io import secrets import struct from typing import Callable, Generator, Optional, Sequence, Tuple from . import exceptions, extensions from .typing import Data try: from .speedups import apply_mask except ImportError: # pragma:...
bid=_bid) saliva_sample_data = self._get_usable_saliva_sample(pid=participant_matrix.pids[i], bid=_bid) # Determine which sample ID to use sample_data = self._determine_best_sample(blood_sample_data, saliva_sample_data) # update the sample id, collected site, and biobank order if sample_data is not None: part...
# -*- coding: utf-8 -*- """ modify and save the xml file for icc profile. ============================================ """ # import standard libraries import os import xml.etree.ElementTree as ET from datetime import datetime # import third-party libraries import numpy as np # import my libraries import icc_profile...
lista de asistencias de mes son {0}".format(asistencias_curso_mes)) matriculados_aula = AulaMatricula.objects.filter(aula=aula).order_by('matricula__alumno__apellido_pa') alumnos = [] for matriculado in matriculados_aula: alumnos.append(matriculado.matricula.alumno) num_alumnos = len(alumnos) logger.info("El núm...
import xarray as xr import numpy as np import datetime import healpy as hp import time from torch.utils.data import Dataset, DataLoader from modules.data import WeatherBenchDatasetIterative # Utils def _inner(x, y): result = np.matmul(x[..., np.newaxis, :], y[..., :, np.newaxis]) return result[..., 0, 0] def inner...
<gh_stars>0 #!/usr/bin/env python from __future__ import division import os import argparse import itertools from functools import partial import numpy as np import pandas as pd from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import seaborn as...
<reponame>bordplate/Ghostwriter<gh_stars>0 #!/usr/bin/python3 # -*- coding: utf-8 -*- """This module contains the tools required for generating Microsoft Office documents for reporting. The Reportwriter class accepts data and produces a docx, xlsx, pptx, and json using the provided data. """ import re import io impor...
<reponame>edgardmota/vent import datetime import docker import json import math import multiprocessing import os import pkg_resources import platform import re import requests from subprocess import check_output, Popen, PIPE from vent.api.templates import Template from vent.helpers.paths import PathDirs from vent.hel...
== 3 and self.dim_L == 6 self.T_min = self.T_initial self.L_min = self.L_initial self.S_min = self.S_initial self.x = self.pack(self.T_min, self.L_min, self.S_min) self.n = self.x.size() self.minimizer = lbfgs.run( target_evaluator = self, termination_params = lbfgs.termination_parameters( max_iterations = max...
<reponame>chunmk/modeldb # -*- coding: utf-8 -*- from __future__ import print_function import ast import copy import glob import os import pathlib2 import pprint import shutil import sys import tempfile import time import warnings import zipfile import requests from .entity import _ModelDBEntity, _MODEL_ARTIFACTS_A...
<gh_stars>0 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# ecm_7_008 R0(C0R1(Q0R2))(C1R3) # def RaCRaQRbbaCRb(w, R0, C0, R1, Q0_pair, R2, C1, R3 ): R0, C0, R1 = para_list[:3] Q0_pair = para_list[3:5] R2, C1, R3 = para_list[5:7] z_list = [RaCRaQRbbaCRb(i, R0, C0, R1, Q0_pair, R2, C1, R3) for i in w] elif serial == 9: # ecm_7_009 R0(C0R1)(C1R2)(C2R3) # def RaCRbaCRbaCR...
field name ends with ``__ext`` doesn't part of Resource StructureDefinition, instead used to enable Extensibility feature for FHIR Primitive Data Types. Links this graph makes rules about. """ resource_type = Field("GraphDefinitionLink", const=True) description: fhirtypes.String = Field( None, alias="descrip...
<reponame>GaffaSnobb/kshell-utilities import sys, time, warnings from typing import Union, Tuple, Optional from fractions import Fraction from itertools import chain import numpy as np import matplotlib.pyplot as plt from scipy.stats import chi2 from scipy.optimize import curve_fit from .parameters import flags def cr...
# Copyright 2016, 2017, 2018 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
<gh_stars>0 #!/usr/bin/env python3 # coding: utf-8 """ 4oBe4e Console Client Usage: console_client.py <server_address> <player_name> [--logger=<level>] console_client.py (-h | --help) console_client.py --version Options: -h --help Show this screen --version Show version --logger=<level> Log level [default: war...
values into sets in case these are already templates. values1 = set(lel1.attrib[key].split(cls.VALUES_SEPARATOR)) if key in lel1.attrib else set() values2 = set(lel2.attrib[key].split(cls.VALUES_SEPARATOR)) if key in lel2.attrib else set() if values1 != values2: if not overwrite or key in unstable_attributes_in_lel...
<filename>routeTracker/UI.py import tkinter as tk import ctypes import time import math import pickle import winsound from tkinter.filedialog import askopenfilename, askdirectory from tkinter import messagebox import os import pyperclip import webbrowser import traceback import datetime import sys if ge...
<filename>cf_xarray/accessor.py import functools import inspect import itertools import warnings from collections import ChainMap from typing import ( Any, Callable, Dict, Hashable, Iterable, List, Mapping, MutableMapping, Set, Tuple, Union, ) import xarray as xr from xarray import DataArray, Dataset from ...
<filename>tempest/scenario/manager.py<gh_stars>0 # Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp. # 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 # # ht...
<reponame>seidelma/id3c<gh_stars>0 """ Datastore abstraction for our database. """ import logging import psycopg2 from functools import wraps from psycopg2 import DataError, DatabaseError, IntegrityError, ProgrammingError, sql from psycopg2.errors import InsufficientPrivilege from typing import Any from uuid import UUI...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.329955, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
elif wordNext == "this" and wordNextNext == "evening": remainder = "pm" used = 2 daySpecified = True elif wordNext == "at" and wordNextNext == "night": if strHH and int(strHH) > 5: remainder = "pm" else: remainder = "am" used += 2 else: if timeQualifier != "": military = True if strHH and int(strHH) <= 12 ...
<filename>src/evaluation/experiment.py ''' Created on Nov 1, 2016 @author: <NAME> ''' import logging import pickle import pandas as pd import datetime import configparser import os, subprocess import sklearn.metrics as skm import numpy as np import glob #import lample_lstm_tagger.lstm_wrapper as lstm_wrapper import ...
# %% md # Data Loading # %% import os os.environ['CUDA_VISIBLE_DEVICES'] = '0,1,2,3' # specify GPUs locally import pandas as pd from matplotlib import pyplot as plt # import seaborn as sns # %% #os.listdir('../input/cassava-leaf-disease-classification') # %% train = pd.read_csv('/root/disk/csy/cassava/data/da...
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Tests for the Data Store (data.py/data_smart.py) # # Copyright (C) 2010 <NAME> # Copyright (C) 2012 <NAME> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
# osid.resource.ResourceAdminSession.can_update_resources return (self._can('update') or bool(self._get_overriding_catalog_ids('update'))) @raise_null_argument def get_qualifier_form_for_update(self, qualifier_id): # Implemented from azosid template for - # osid.resource.ResourceAdminSession.get_resource_form_fo...
<reponame>kazoup/boto # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without l...
. target_eid , I11i1i1i1iii . rloc , to_etr = True ) if 60 - 60: I1ii11iIi11i * iII111i / OoOoOO00 . o0oOOo0O0Ooo / iIii1I11I1II1 return ( [ ooOOOo0o0oo . eid , ooOOOo0o0oo . group , LISP_DDT_ACTION_MS_ACK ] ) if 94 - 94: OoO0O00 . ooOoO0o if 25 - 25: I1Ii111 % OOooOOo if 82 - 82: Ii1I if 17 - 17: iII111i . i1IIi...
['id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument...
3932, 3721, 4910, 5801, 6580, 5195, 3551, 5907, 3221, 3471, 3029, 6019, 3999, 5908, 5909, 5266, 5267, 3444, 3023, 3828, 3170, 4796, 5646, 4979, 4259, 6356, 5647, 5337, 3694, 6357, 5648, 5338, 4520, 4322, 5802, 3031, 3759, 4071, 6020, 5586, 4836, 4386, 5048, 6581, 3571, 4679, 4174, 4949, 6154, 4813, 3787, 3402, 3822,...
# 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 ... import _utilities fro...
<filename>regraph/category_op.py """Category operations used by graph rewriting tool.""" import networkx as nx import copy from regraph.primitives import (add_node, add_edge, set_edge, add_node_attrs, get_edge, add_edge_attrs, clone_node, merge_nodes, update_node_attrs, remove_node, remove_edge, remove_node...