input
stringlengths
2.65k
237k
output
stringclasses
1 value
in the new mapping if nffg is not None and nf_id in nffg: new_running_nfs = [n.id for n in nffg.running_nfs(infra_id)] # And connected to the same infra if nf_id in new_running_nfs: # NF was not moved, Skip deletion self.log.debug('Unchanged NF: %s' % nf_id) continue # If the NF exists in the new mapping, but m...
## @file scrumbotCog.py # @author <NAME>, <NAME>, <NAME> # @brief A cog containing all commands related to projects. # @date Mar 12, 2020 import discord from discord.ext import commands import os, sys, inspect currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentDir = o...
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, ...
from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * import sys import math from GraphicsView import * ''' 10/16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - drawing works in test.py and would like to integrate it back over here - work like to fix the editing pa...
East Asian ideograph 0x295825: (0x9CBA, 0), # East Asian ideograph 0x224D73: (0x6FB6, 0), # East Asian ideograph 0x224652: (0x6C0D, 0), # East Asian ideograph 0x234653: (0x93F1, 0), # East Asian ideograph 0x225851: (0x739E, 0), # East Asian ideograph 0x6F4E40: (0xB5D1, 0), # Korean hangul 0x213868: (0x58D5, 0), ...
size for first batch returned. produce_cursors (bool): Whether to generate cursors from query. start_cursor: Starting point for search. end_cursor: Endpoint point for search. timeout (Optional[int]): Override the gRPC timeout, in seconds. deadline (Optional[int]): DEPRECATED: Synonym for ``timeout``. read_consis...
% key ) params[key] = val del params['kwargs'] # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): raise ValueError("Missing the required parameter `id` when calling `get_items_by_id_download`") # noqa: E501 collection_formats = {} path_params = {} if 'id' in params:...
to do. """ for act in self._cleanup_actions(): return True return False def _cleanup_actions(self): """Iterator giving (func,args,kwds) tuples of cleanup actions. This encapsulates the logic of the "cleanup" method without actually performing any of the actions, making it easy to check whether cleanup is req...
{}, "ccapAppTypeHisPSTNOutCallHandedOut": {}, "ccapAppTypeHisPSTNOutCallInHandoff": {}, "ccapAppTypeHisPSTNOutCallInHandoffRet": {}, "ccapAppTypeHisPSTNOutCallSetupReq": {}, "ccapAppTypeHisPSTNOutCallTotConn": {}, "ccapAppTypeHisPlaceCallAttempts": {}, "ccapAppTypeHisPlaceCallFailure": {}, "ccapAppTypeHisPlaceC...
from __future__ import absolute_import, print_function, division import os import numpy as np from glob import glob import matplotlib from matplotlib import pyplot as plt import astropy.units as u from astropy.constants import R_sun from astropy.coordinates import SphericalRepresentation from .lightcurve import LightC...
<filename>emat/analysis/explore_2/explore_visualizer.py import numpy import pandas import warnings import functools from ...viz import colors from ...scope.box import GenericBox from traitlets import TraitError from plotly import graph_objs as go from ipywidgets import Dropdown import ipywidgets as widget import log...
<gh_stars>0 """ Objects for dealing with Laguerre series. This module provides a number of objects (mostly functions) useful for dealing with Laguerre series, including a `Laguerre` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomia...
import support.classes as classes import numpy as np import scipy from scipy import stats class LgstReg(classes.Data): def __init__(self, dinfo): ''' Given data with X_tr, X_te, y_tr, y_te, we initialize a model object with loss functions, gradients, Hessians, etc., as well as an "eval" method which automatica...
# # 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...
<gh_stars>1-10 """ Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc). Representation: * course_index: a dictionary: ** '_id': a unique id which cannot change, ** 'org': the org's id. Only used for searching not identity, ** 'course': the course's catalog numbe...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirnam...
from cam_functions import extract_feat_cam from utils import create_folders, save_data, preprocess_images, load_data, print_classes from pooling_functions import weighted_cam_pooling, descriptor_aggregation, retrieve_n_descriptors, compute_pca, sum_pooling from scipy.misc import imread import math from reranking i...
offset = -2.5*np.log10(res1[:,1]) if full_output: print( "Impossible to return proper residuals" ) residuals = None else: # Calculate the residuals in the magnitude domain res1 = np.array([ Utils.Misc.Fit_linear(self.data['mag'][i]-pred_flux[i], err=self.data['mag_err'][i], m=0., inline=True) for i in np.arange(se...
tz } url_args = endpoint.make_url_args(params) url = '?'.join([url, url_args]) resp = self.session.get(url) return resp @with_cursor(protocol.DataPointCursor, protocol.MultiPoint) def read_multi_rollups(self, key, start, end, rollups, period, tz=None, interpolationf=None, interpolation_period=None, limit=5000...
from math import sqrt from collections import namedtuple import torch from e3nn import o3 from e3nn.util import eval_code def _prod(x): out = 1 for a in x: out *= a return out class TensorProduct(torch.nn.Module): r"""Tensor Product with parametrizable paths Parameters ---------- in1 : `Irreps` or list of...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File game_pong.py created on 12:56 2018/1/6 @author: <NAME> @version: 1.0 """ from math import sqrt from interfaces import * import pygame class PongState(State): def __init__(self, s, flag=0): super(PongState, self).__init__(s) self.flag = flag @staticmethod ...
brush = QtGui.QBrush(QtGui.QColor(127, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Dark, brush) brush = QtGui.QBrush(QtGui.QColor(170, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Mid, brush) brush = Q...
import numpy as np from .._wcs_utils import WCSInversionInterpolator, WCSGridScalarInterpolator from ...wcs import FastHashingWCS COADD_WCS = FastHashingWCS({ 'xtension': 'BINTABLE', 'bitpix': 8, 'naxis': 2, 'naxis1': 24, 'naxis2': 10000, 'pcount': 83807884, 'gcount': 1, 'tfields': 3, 'ttype1': 'COMPRESSED_D...
<reponame>thuleqaid/boost_study<gh_stars>1-10 # voom_mode_asciidoc.py # Last Modified: 2014-05-21 # VOoM -- Vim two-pane outliner, plugin for Python-enabled Vim 7.x # Website: http://www.vim.org/scripts/script.php?script_id=2657 # Author: <NAME> (<EMAIL> DOT <EMAIL> AT <EMAIL> DOT <EMAIL>) # License: CC0, see http://cr...
sequence=None): items = [] if sequence is None: sequence = method method = obj for item in sequence: items.append(method(item)) else: for item in sequence: items.append(method.call(obj, item)) return items def reduce(func, iterable, initializer=JS("(function(){return;})()")): try: iterable = iter(itera...
<gh_stars>1-10 from __future__ import annotations import os from os.path import join from typing import Union import numpy as np import pandas as pd from astropy.cosmology import Planck18 as cosmo # noqa from redback.get_data.directory import afterglow_directory_structure from redback.transient.transient import Tran...
delta_o_2 = N.zeros((self.timeSteps,self.no)) delta_h_1 = N.zeros((self.timeSteps,self.nh1)) delta_h_2 = N.zeros((self.timeSteps,self.nh2)) delta_c_1 = N.zeros((self.timeSteps,self.nh1)) delta_c_2 = N.zeros((self.timeSteps,self.nh2)) delta_p_1 = N.zeros((self.timeSteps,self.np1)) delta_p_2 = N.zeros((self.timeSte...
<reponame>stangelid/qt import sys import os.path import json import argparse from random import seed from time import time import math from scipy.cluster.vq import kmeans import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import StepLR from tor...
= [] if icdf.idl > -1: wrk = ncid.variables[icdf.tname][:] self.T_LIST = list(wrk) else: self.T_LIST = [] self.DATE = [] for i in range(icdf.nt): self.DATE.append(num2date(self.T_LIST[i], \ units=icdf.time_units, \ calendar=icdf.time_calendar)) # ======================== def plot_initialize(self): # ====...
<filename>__init__.py #importazione dei pacchetti necessari from flask import Flask, redirect, url_for, render_template, request, session, flash, send_file, send_from_directory from datetime import timedelta, datetime import pytz from flask_sqlalchemy import SQLAlchemy import time import smtplib, ssl from email.message...
an alias. # # item_names is the set of final names or aliases for each item in the SELECT list. item_names = set() for item in select_items: if not item.alias and not item.val_expr.is_col: continue if item.name in item_names: item.alias = '*CONFLICT*' else: item_names.add(item.name) # base_item_name_counts ...
<reponame>helenacuesta/multif0-estimation-polyvocals import os import glob import json import csv import ast import numpy as np import matplotlib.pyplot as plt import pandas as pd import scipy import utils import pescador import mir_eval import keras.backend as K ''' TRAINING UTIL FUNCTIONS Some of the functio...
import numpy as np import pandas as pd class ConflictManager: """In charge of calculating the conflict meassurements, and all the related dataframes with intermediate steps. Attributes: all_content (pd.DataFrame): All content as per received through the Wikiwho Actions API conflicts (pd.DataFrame): The actions ...
get_p_tz(self, density=True, light_weighted=False): """Get p(t,z) Args: density (bool): whether to return probabilty density (True) or the volume-element weighted probabilty (False) light_weighted (bool): whether to return light-weighted (True) or mass-weighted (False) quantity Returns: array """ p_tz_x = ...
""" some tools about fcm""" # -*- coding: utf-8 -*- import csv import os import random import time from math import exp import matplotlib # matplotlib.use('Agg') import matplotlib.colors as pltColors import matplotlib.pyplot as plt import numpy as np import pandas as pd from collections import deque def saveUV(U, V,...
# -*- coding: utf-8 -* from pathlib import Path import ujson as json import numpy as np from . import _deck from . import _utils _BONUS_CARDS = {_deck.Card(c) for c in ["Qh", "Kh"]} class DefaultPlayer: # pylint: disable=too-many-instance-attributes """Player which selects one card randomly at each round. Note ...
import time import base64 import os import pathlib import random import string import subprocess from kubernetes import client, watch, config from kubernetes.dynamic.exceptions import ConflictError KUBE_SYSTEM = "kube-system" META_URL = os.getenv("JUICEFS_META_URL") or "" ACCESS_KEY = os.getenv("JUICEFS_ACCESS_KEY") ...
# # Copyright (c) 2015,2017 - Adjacent Link LLC, Bridgewater, New Jersey # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # no...
""" SPC Statistical Process Control provides means to monitor process behaviour using statistical tools defined by Shewhart and others. The process run is shown as Quality Control Charts (QCC). Author: <NAME> <<EMAIL>> License: MIT """ """ Edited by <NAME> Added: Missing Rules Some changes Changepoint is added, when ...
from scipy.optimize import root import numpy as np import cantera as ct import pandas as pd from solventx import result_struct as rs from solventx import utilities from solventx import config import operator import os class solventx: coltypes = ['Extraction','Scrub','Strip'] ml2l = 0.001 # mililiter to liter ...
<filename>ramldocgen/generator.py from xml.sax.saxutils import escape import pyraml.parser as ramlparser from .inlines import highlight_inline_js, api_doc_inline_css from collections import OrderedDict import re import sys import json no_short_close = ['div', 'span', 'script'] def idfirst(od): res = OrderedDict() ...
import json import os import pytest import requests from tests.acceptance.helpers import ENDPOINT_ACTIVATE from tests.acceptance.helpers import ENDPOINT_CONFIG from tests.acceptance.helpers import create_and_validate_request_and_response from tests.acceptance.helpers import sort_response expected_activate_ab = """[ ...
from __future__ import absolute_import, print_function, division import threading import time import traceback import h2.exceptions import hyperframe import six from h2 import connection from h2 import events from six.moves import queue import netlib.exceptions from mitmproxy import exceptions from mitmproxy import ...
get children sections of root for s in sections: txt += u"""<section>\n<sectionLabel> {0} </sectionLabel>\n""".format(s) markups = self.getSectionMarkups(s) for m in markups: txt += u"<sentence>\n<sentenceNumber> %d </sentenceNumber>\n<sentenceOffset> %d </sentenceOffset></sentence>\n%s"%( (m[0],sentenceOffsets...
bgp_v4_neighbors_output = \ """ BGP neighbor is 10.0.0.57, remote AS 64600, local AS 65100, external link Description: ARISTA01T1 Member of peer-group PEER_V4 for session parameters BGP version 4, remote router ID 172.16.58.3, local router ID 10.1.0.32 BGP state = Established, up for 00:00:39 Last read 00:00:00, L...
<filename>feedbag/day2/2.passwords.py #original sample data #policy = [ #"1-3 a: abcde", #"1-3 b: cdefg", #"2-9 c: ccccccccc" #] # Given puzzle data policy = [ "3-5 f: fgfff", "6-20 n: qlzsnnnndwnlhwnxhvjn", "6-7 j: jjjjjwrj", "8-10 g: gggggggggg", "5-6 t: ttttttft", "6-11 h: khmchszhmzm", "4-6 q: qqbjqqqj", "6-8 j: g...
<gh_stars>0 # -*- coding: utf-8 -*- """ Vector Autoregression (VAR) processes References ---------- Lรผtkepohl (2005) New Introduction to Multiple Time Series Analysis """ from __future__ import division, print_function from statsmodels.compat.python import (range, lrange, string_types, StringIO, iteritems) from coll...
fraction """ fnames = [] for frac_d in xrange(self.num_dates_fracs): frac_id = (frac_num, frac_d) fnames.append(self.frac_fname(frac_id)) return fnames def load_frac_by_num(self, frac_num, t_from=None, t_to=None, hdfs_client=None): """ Load a fraction given its frac_num and a date range """ if t_from is No...
"973": 15992, "OTA": 15993, "รฏ": 15994, "38)": 15995, "vent": 15996, "โ–Wij": 15997, "228": 15998, "ging": 15999, "โ–Aldri": 16000, "โ–Zvez": 16001, "0.1": 16002, "โ–Hoy": 16003, "โ–cool": 16004, "โ–es": 16005, "books": 16006, "โ–Date": 16007, "kla": 16008, "โ–Fresh": 16009, "โ–Popular": 16010, "โ–flu": 16011,...
<reponame>TimSweering/PolyReach """ This file contains function / classes to get the Polyflow operator / error bound """ from typing import Type, Tuple from typing import List import json import cvxpy as cp import numpy as np import numba as nb from scipy.linalg import expm from scipy import optimize from sympy.print...
assert_labels(Assert): def wrap(self, testcase, *args, **kwargs): # pylint: disable=arguments-differ # Strip off the "test_" from the function name name = self.func.__name__[5:] alias = self.translator.ALIASES_REVMAP.get(name) labels = ["foo", "bar=baz", {"hello": "world"}] expected = {"foo": "", "bar": "baz", "h...
<reponame>pulumi/pulumi-libvirt # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
"""------------------for AC""" import enum import logging from typing import Optional from .device import ( UNIT_TEMP_CELSIUS, UNIT_TEMP_FAHRENHEIT, Device, DeviceStatus, ) from . import ( FEAT_ENERGY_CURRENT, FEAT_HUMIDITY, FEAT_HOT_WATER_TEMP, FEAT_IN_WATER_TEMP, FEAT_OUT_WATER_TEMP, ) from .core_exceptio...
<filename>appengine/flexible/hello_world/app/firestore_service.py import datetime import firebase_admin from flask import session from firebase_admin import firestore app = firebase_admin.initialize_app() db = firestore.client() ## when you use document.get() return a list [] ## when you use collection.stream() retur...
import unittest from bfdpie import * class Test(unittest.TestCase): def test_large_vma(self): b = Binary() # 32-bit limit test dis1 = b.disassemble(b"\x90", ARCH_I686, 0x80000000) dis2 = b.disassemble(b"\x90", ARCH_X86_64, 0x80000000) self.assertTrue(dis1[0].vma >= 0) self.assertTrue(dis2[0].vma >= 0) # 64-...
<reponame>ratt-ru/codex-africanus<gh_stars>10-100 # -*- coding: utf-8 -*- from collections import namedtuple import numpy as np import numba from numba.experimental import jitclass import numba.types from africanus.constants import c as lightspeed from africanus.util.numba import generated_jit, njit, is_numba_type_n...
# coding: utf8 """ Viewer classes Original author: <NAME> """ from tkinter import * from tkinter import ttk from tkinter import messagebox from tkinter.filedialog import * import PIL from PIL import ImageTk, Image, ImageOps from PIL.Image import * from PIL.Image import BOX, LINEAR, NEAREST, EXTENT, fromarray import num...
was not initially created by from_db, # assume content has been modified. content_modified = True if content_modified: # If content has been modified, then save normally. return super().save(**kwargs) else: # If content has not been modified, then exclude all of the # Metadata fields as well as modified_dateti...
time.time() + last_time) last_time = time.time() else: print("malformed rhythm pattern: " + rhythm_substr) break # print("AUDIO THREAD: Beginning post_ems display: time since start: " + str(time.time()-time_naught)) if post_ems_test_flag: for i in range(post_ems_repeats): # present the rhythm with appropriate nu...
, weekend_allowed = 0 , required_overtime = 0 ) db.time_record.create \ ( daily_record = dr , start = '14:30' , end = '16:30' , work_location = '1' , wp = '6' ) db.time_record.create \ ( daily_record = dr , start = '08:15' , end = '13:00' , work_location = '1' , wp = '6' ) db.time_record.create \ ( da...
# -*- coding: utf-8 -*- from __future__ import print_function import bitso import requests from pprint import pformat as pf import datetime import csv import time import sys # from ..helpers import ottoHelpers # Need to update to Python3 class Bitso(object): """ Class to perform Bitso trades over crypto-currencies ...
is None D = {1:2} def f(): g(D) return g() a = self.RPythonAnnotator() s = a.build_types(f, []) assert s.knowntype == bool assert not s.is_constant() def test_issubtype_and_const(self): class A(object): pass class B(object): pass class C(A): pass b = B() c = C() def g(f): if f == 1: x = b elif f =...
<gh_stars>0 import os import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_almost_equal import resqpy.derived_model as rqdm import resqpy.fault as rqf import resqpy.grid as grr import resqpy.lines as rql import resqpy.model as rq import resqpy.olio.uuid as bu import resqpy.olio....
<filename>pldm_bej_encoder_decoder.py """ PLDM BEJ Encoder/Decoder File : pldm_bej_encoder_decoder.py Brief : This file allows encoding a JSON file to PLDM Binary encoded JSON (BEJ) and decoding a PLDM BEJ file back into JSON. """ import argparse import json import io import sys import os import re import string ...
from contextlib import ExitStack from queue import Queue from tempfile import gettempdir from threading import Event from unittest import TestCase from unittest.mock import MagicMock, call, patch from packaging.version import Version from path import Path from dakara_player.media_player.base import ( InvalidStateErr...
#!/usr/bin/env python # The piwheels project # Copyright (c) 2017 <NAME> <https://github.com/bennuttall> # Copyright (c) 2017 <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of so...
#!/usr/bin/env python # # This file is part of snmpsim software. # # Copyright (c) 2010-2018, <NAME> <<EMAIL>> # License: http://snmplabs.com/snmpsim/license.html # # SNMP Simulator MIB to data file converter # import getopt import sys import os import time import socket import struct import bisect import traceback tr...
<reponame>andyruddh/irl-maxent<gh_stars>10-100 """ Maximum Entropy Inverse Reinforcement Learning and Maximum Causal Entropy Inverse Reinforcement Learning. Based on the corresponding paper by <NAME> et al. (2008) and the Thesis by Ziebart (2010). """ import numpy as np from itertools import product # -- common fun...
The last global batch only contains data for one replica. if drop_remainder: expected_values = [[[0, 1], [2, 3]], [[4, 5], [6, 7]]] else: expected_values = [[[0, 1], [2, 3]], [[4, 5], [6, 7]], [[8], []]] distribution.extended.experimental_enable_get_next_as_optional = True self._test_input_iteration( input_type,...
cnn=False, leakage_model=LeakageModelType.AES_MULTI, input_type=AIInputType.SIGNAL, augment_shuffle=True, n_hidden_layers=1, n_hidden_nodes=256, activation='leakyrelu', metric_freq=100, regularizer=None, reglambda=0.001, model_suffix=None, use_bias=True, batch_norm=True, hamming=False, key_low=1, key_hig...
<reponame>dlfming/dd_catl_demo<filename>venv/Lib/site-packages/baidubce/services/bes/bes_client.py<gh_stars>0 # Copyright 2014 Baidu, 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...
import os import os.path as op import ast from werkzeug import secure_filename from werkzeug.datastructures import FileStorage from wtforms import ValidationError, fields from wtforms.widgets import HTMLString, html_params try: from wtforms.fields.core import _unset_value as unset_value except ImportError: from w...
๋Œ€ํ•œ๋ฏผ๊ตญ ์ „๋ผ๋ถ๋„ ์ „์ฃผ์‹œ ์™„์‚ฐ๊ตฌ์—์„œ ์•„๋ฒ„์ง€ ๊น€์ข…๊ตฌ, ์–ด๋จธ๋‹ˆ ๊น€ํฌ์ž ์‚ฌ์ด์˜ 1๋‚จ 2๋…€ ์ค‘ ๋‘˜์งธ๋กœ ํƒœ์–ด๋‚ฌ๋‹ค. ๊ฐ€์กฑ์œผ๋กœ๋Š” ์˜ค๋น  ๊น€์ง€์›…, ์—ฌ๋™์ƒ ๊น€ํ•˜์—ฐ์ด ์žˆ๋‹ค. ์–ด๋ฆด ์ ๋ถ€ํ„ฐ ์ถค์„ ์ข‹์•„ํ–ˆ๊ณ  ํŠนํžˆ ๋ช…์ ˆ ๋•Œ๋Š” ์นœ์ฒ™๋“ค์ด ์ถค์„ ์‹œํ‚ค๋ฉด ๊ณง์ž˜ ์ถ”์—ˆ๋‹ค๋˜ ํƒœ์—ฐ์€ TV์—์„œ ๋ณด์•„๋ฅผ ๋ณด๊ณ  ๊ฐ€์ˆ˜์˜ ๊ฟˆ์„ ๊ฐ–๊ฒŒ ๋˜์—ˆ๋‹ค๊ณ  ํ•œ๋‹ค. ์ „์ฃผ์–‘์ง€์ดˆ๋“ฑํ•™๊ต๋ฅผ ์กธ์—…ํ•˜์˜€๊ณ  ์ „์ฃผ์–‘์ง€์ค‘ํ•™๊ต 2ํ•™๋…„์ด๋˜ 2003๋…„ SM์•„์นด๋ฐ๋ฏธ ์Šคํƒ€๋ผ์ดํŠธ ๋ฉ”์ธ์ง€๋ฐฉ๋ณด์ปฌ๊ณผ 4๊ธฐ์— ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜๋ฉด์„œ ์•„๋ฒ„์ง€์™€ ํ•จ๊ป˜ ์ฃผ๋ง๋งˆ๋‹ค ์ „์ฃผ์—์„œ ์„œ์šธ๋กœ ์ด๋™ํ•˜๋ฉฐ ๊ฐ€์ˆ˜์˜ ๊ฟˆ์„ ํ‚ค์› ๋‹ค. 2004๋…„์— ๋‹น์‹œ ๋ณด์ปฌ ํŠธ๋ ˆ์ด๋„ˆ์˜€๋˜ ๋” ์›์˜ ์ •๊ทœ 2์ง‘ ์ˆ˜๋ก๊ณก ใ€ˆYou Bring ...
power = {'BUSES': {'Area': 1.33155, 'Bus/Area': 1.33155, 'Bus/Gate Leakage': 0.00662954, 'Bus/Peak Dynamic': 0.0, 'Bus/Runtime Dynamic': 0.0, 'Bus/Subthreshold Leakage': 0.0691322, 'Bus/Subthreshold Leakage with power gating': 0.0259246, 'Gate Leakage': 0.00662954, 'Peak Dynamic': 0.0, 'Runtime Dynamic': 0.0, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # BibleBooksCodes.py # # Module handling BibleBooksCodes functions # # Copyright (C) 2010-2022 <NAME> # Author: <NAME> <<EMAIL>> # License: See gpl-3.0.txt # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
<filename>tests/labhub_test.py import queue import textwrap from unittest.mock import Mock, MagicMock, create_autospec, PropertyMock, patch import github3 import IGitt from IGitt.GitHub.GitHubMergeRequest import GitHubMergeRequest from IGitt.GitLab.GitLabMergeRequest import GitLabMergeRequest from IGitt.GitHub.GitHubI...
stack. See also: AWS API Documentation :example: response = client.describe_layers( StackId='string', LayerIds=[ 'string', ] ) :type StackId: string :param StackId: The stack ID. :type LayerIds: list :param LayerIds: An array of layer IDs that specify the layers to be described. If you omit this par...
<filename>tests.py<gh_stars>0 __author__ = "<NAME>" __license__ = "MIT" __email__ = "<EMAIL>" # MODULE EXPOSURE __all__ = [ "assert_eq", "assert_identical", "assert_is", "assert_not_identical", "none", ] # IMPORTS from pyrat.base import identical, vector # FUNCTIONS def assert_eq(a, b): test = (a == b...
servers elv_ctx = context.elevated() if port_id: relay_servers = self._get_port_relay_servers(elv_ctx, port_id) else: relay_servers = [] filters = {'device_owner': [l3_db.DEVICE_OWNER_ROUTER_INTF], 'device_id': [router_id]} ports = self.get_ports(elv_ctx, filters=filters) for port in ports: port_relay_servers...
# mapper.py # <NAME> # Lines to sentences code partially taken/modified from project with Dr. Harrison import re import sys from unidecode import unidecode import zipimport importer = zipimport.zipimporter('nltk.mod') nltk = importer.load_module('nltk') try: from nltk.corpus import stopwords except Exception as e: p...
#! /usr/bin/env python """Experimental module for Python 2 compatibility. The purpose of this module is to enable Pyslet to be gradually converted to Python3 while retaining support for Python 2.7 and 2.6. This fills a similar role to the six module but the idea is to minimise the number of required fixes by making th...
self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] self.warnings = kwargs['warnings'] self.statistics = kwargs.get('statistics', None) class DocumentError(msrest.serialization.Model): """DocumentError. All required parameters must be populated in order to send to Azure. :param...
data by before performing the comparison. source_by (list): A list of field names to sort the source data by before performing the comparison (uses ``by`` if not given). target_by (list): A list of field names to sort the target data by before performing the comparison (uses ``by`` if not given). Examples: As...
# # Utility functions for loading and creating and solving circuits defined by # netlists # import numpy as np import codecs import pandas as pd import liionpack as lp import os import pybamm import scipy as sp from lcapy import Circuit def read_netlist( filepath, Ri=None, Rc=None, Rb=None, Rt=None, I=None, ...
import numpy as np import collections from gensim import matutils import os import codecs import sys import glob import gensim # NOTE that you can give a dModels as input (this allows for # adding to/replacing models already loaded). def loadAllModels(sGlobPattern, dModels={}, bReplace=True, bBinary=True): for sMode...
<reponame>nwukie/ChiDG from __future__ import division import sys import os import time import numpy import pickle from sympy import * from sympy.tensor.array import MutableSparseNDimArray def update_progress(job_title, progress): length = 20 # modify this to change the length block = int(round(length*progress)) ...
<gh_stars>10-100 from __future__ import absolute_import, division, print_function, with_statement from __future__ import unicode_literals from deepstreampy.constants import topic as topic_constants from deepstreampy.constants import actions as action_constants from deepstreampy.constants import event as event_constant...
# (c) Copyright IBM Corp. 2020. All Rights Reserved. # -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use """Function implementation""" import logging import json import csv import re import sys import time if sys.version_info.major < 3: from StringIO import StringIO from io import BytesIO e...
""" SPADE is the combination of a mining technique and multiple statistical tests to detect and assess the statistical significance of repeated occurrences of spike sequences (spatio-temporal patterns, STP). Given a list of Neo Spiketrain objects, assumed to be recorded in parallel, the SPADE analysis can be applied a...
tick_delta, tikz_str=""): x, y = start_cs return [ vertical_line_segment([x + i * tick_spacing, y], tick_delta, tikz_str) for i in range(num_ticks) ] def vertical_ticks(start_cs, num_ticks, tick_spacing, tick_delta, tikz_str=""): x, y = start_cs return [ vertical_line_segment([x, y + i * tick_spacing], tick_...
<filename>support.py """ All necessary utilities (take and evaluate a picture, estimate position, drive towards position,...) are implemented in this module """ import configparser import anki_vector import time import threading from anki_vector.util import degrees, distance_mm, speed_mmps, Pose, Angle from anki_vecto...
""" Mininet: A simple networking testbed for OpenFlow/SDN! author: <NAME> (<EMAIL>) author: <NAME> (<EMAIL>) Mininet creates scalable OpenFlow test networks by using process-based virtualization and network namespaces. Simulated hosts are created as processes in separate network namespaces. This allows a complete ...
list_sk_pvalue del H Comp_Nuba_350_df = pd.DataFrame(Composites_Nuba_350, index = c) Sk_Nuba_stat_350_df = pd.DataFrame(Sk_Nuba_stat_350, index = c) Sk_Nuba_pvalue_350_df = pd.DataFrame(Sk_Nuba_pvalue_350, index = c) Sk_Nuba_stat_348 = {} Sk_Nuba_pvalue_348 = {} Composites_Nuba_348 = {} for i in df_FH_nuba_348_groupH...
>>> # xdoc: +REQUIRES(--download, module:ndsampler) >>> from netharn.models.yolo2.yolo2 import * # NOQA >>> info = dev_demodata() >>> self, output, target = ub.take(info, ['criterion', 'outputs', 'target']) >>> model = info['model'] >>> self = YoloLoss(model.coder) >>> loss_parts = self.forward(output, target) >...
<gh_stars>0 import hashlib import itertools import json import logging import multiprocessing import os import shutil import stat import tarfile import time from _hashlib import HASH as Hash from enum import Enum from fnmatch import fnmatch from datetime import datetime from collections import defaultdict from glob i...
result.detrivialize() self.negated = thing = self.negated.detrivialize() if thing is None: return ~BTPredicate() # uniquely false if thing.false: return None # uniquely true return self def __call__(self, boundtuples, toplevel=0): from types import IntType tt = type current = BTPredicate.__call__(self...
""" Module to access the Channels endpoints """ # pylint: disable=too-many-lines,too-many-locals,too-many-public-methods,too-few-public-methods from typing import Any, Dict, List, Optional, Union, cast from pydantic import BaseModel from ...models import ( AddChannelMemberJsonBody, Channel, ChannelListWithTeamDat...
import json from io import BytesIO from app.ext.api.exceptions import ( ChefNotFound, InvalidToken, MaximumImageCapacityError, OperationNotAllowed, RecipeWithoutIngredient, RecipeWithoutPreparationMode, ) from app.ext.api.services import token_services def test_edit_recipe(client, admin_user): new_user1 = { ...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Sat May 9 14:44:18 2020 @author: Janice """ #%% imports from nltk.stem import WordNetLemmatizer from nltk.corpus import stopwords from nltk.tokenize import word_tokenize import pandas as pd import numpy as np import re from collections import Counter, defaultdict ...