input
stringlengths
2.65k
237k
output
stringclasses
1 value
The current false positive rate""" num = self.number_hashes * -1 * self.elements_added dbl = num / self.number_bits exp = math.exp(dbl) return math.pow((1 - exp), self.number_hashes) def intersection(self, second) -> Union["BloomFilter", None]: """Return a new Bloom Filter that contains the intersection of the ...
>>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.portals_id_designs_nk_members_rel_fk_head_with_http_info(id, nk, fk, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str id: Portal id (required) :param str nk: ...
import cadquery as cq import cadquery.selectors as cqs import logging, importlib from types import SimpleNamespace as Measures # A plate for the Fansteck Galaxy Note9 case providing a Mollemount interface. log = logging.getLogger(__name__) class Caseplate: def __init__(self, workplane, measures): """ A parametri...
<reponame>voytekresearch/omapping<filename>om/meg/group.py """MEG-DATA Analysis Module - Group""" import os import pickle import datetime import numpy as np import scipy.io as sio from scipy.stats.stats import pearsonr from om.meg.single import MegSubj from om.core.osc import check_bands from om.core.errors import D...
# 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 # external import from __future__ import print_function import collections import datetime import errno from io import StringIO import logging import os import re import select import time import paramiko from . import util, exception logger = logging.getLogger(__name__) SSH_PORT = 22 class SSHSess...
# 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 # Filename: Estimator.py # Written by: <NAME> # Description: Contains estimators such as kalman filter, extended kalman filter, unscented kalman filter and simple moving horizon estimators from pynlcontrol.BasicUtils import Integrate, nlp2GGN, casadi2List, directSum, qrSym import casadi as ca import os...
'variable' N = self._nrows K = len(tempdict) - len(id_vars) #create an empty dataset mdata = type(self)({}) # reexpand any categoricals for col in id_vars: id_data = tempdict.pop(col) if TypeRegister.is_binned_array(id_data): # note: multikey categorical expands to a tuple of arrays # previous...
a library with PBC2 value of {:.2f}.'.format( pbc2_detail, alignment_file['output_type'], audit_link(path_to_text(alignment_file['@id']), alignment_file['@id']), PBC2_value ) ) if PBC2_value < 1: yield AuditFailure('severe bottlenecking', detail, level='NOT_COMPLIANT') elif PBC2_value >= 1 and PBC2_value < 1...
import json import redis import time import logging from glintwebui.glint_api import repo_connector from ast import literal_eval import config import os logger = logging.getLogger('glintv2') ''' Recieves a tuple of 3-tuples (repo, img_name, img_id) that uniquely identify an image_list then sorts them based on their r...
<filename>bellman/harness/harness.py # Copyright 2021 The Bellman Contributors # # 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...
#!/usr/bin/python #-*- coding: utf-8 -*- from __future__ import absolute_import import json from json.decoder import JSONDecodeError import base64 import hmac import hashlib import requests from .. import utils PROTOCOL = "https" HOST = "api.bitfinex.com" VERSION = "v1" PATH_SYMBOLS = "symbols" PATH_TICKER = "pubtic...
import argparse import sys import os import shutil import time import math import h5py import random import torch import torch.nn as nn import torch.optim import torchvision.transforms as transforms import torch.nn.functional as F import torch.nn.parallel import torch.distributed as dist from torch.nn.parallel import...
# the source codes of transE are from https://github.com/mklimasz/TransE-PyTorch from absl import app from absl import flags import os import numpy as np import torch.optim as optim from torch.utils import data as torch_data from torch.utils import tensorboard from collections import Counter from torch.utils import dat...
17869, 'tracts': 4}, 'Polk': {'population': 41475, 'tracts': 7}, 'Pulaski': {'population': 12010, 'tracts': 3}, 'Putnam': {'population': 21218, 'tracts': 5}, 'Quitman': {'population': 2513, 'tracts': 1}, 'Rabun': {'population': 16276, 'tracts': 5}, 'Randolph': {'population': 7719, 'tracts': 2}, 'Richmond': {'pop...
#!/usr/bin/env python import sys, os, time import logging import struct, socket from optparse import OptionParser parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ppparent_dir = os.path.dirname(os.path.dirname(parent_dir)) py_third_dir = os.path.join(ppparent_dir, 'py_third') sys.path = [parent_...
width, bottom=R5) p2 = plt.bar(ind, R2, width, bottom=R5+R4, color='orange') p3 = plt.bar(ind, R3, width, bottom=R5+R4+R2, color='green') plt.title('RU Count Frequency for GP1BA VNTR', y=1.05) plt.xticks((0, 1, 2), ('African', 'East Asian', 'European'), fontsize=13) plt.legend((p5[0], p4[0], p2[0], p3[0]), ('3 Re...
# -*- coding: utf-8 -*- """ Created on Fri Aug 14 10:12:03 2020 @brief: Library of ADI-styled Tkinter frames @description: Module containing modifications of the base Tkinter building blocks: - Window - Frame As well as new templates which inherit from these blocks: - adiConnectFrame : For connection through se...
"rmap_red1_ipv6", "direction": "out", } ] } } } } } }, }, }, ] } } result = create_router_bgp(tgen, topo, input_dict_4) assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result) step("Configure neighbor for route map in r2") input_dict_4 = { "r2": { "bgp": [ { "local_as...
import datetime import pathlib from math import sqrt import matplotlib.dates as mdates import numpy as np import steampi.json_utils # Reference: https://stackoverflow.com/a/3054314 from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from aggregate_steam_spy...
<reponame>masnes/publicprize<filename>publicprize/evc/form.py # -*- coding: utf-8 -*- """ contest forms: HTTP form processing for contest pages :copyright: Copyright (c) 2014 Bivio Software, Inc. All Rights Reserved. :license: Apache, see LICENSE for more details. """ import decimal import re import sys import fla...
+ -------| | | /1 \| | | sin|--|| | \ \u2// log(f(x)) = log(C1) + | ---------------- d(u2) | 2 | u2 | / >>> pprint(odesimp(eq, f(x), 1, set([C1]), ... hint='1st_homogeneous_coeff_subs_indep_div_dep' ... )) #doctest: +SKIP x --------- = C1 /f(x)\ tan|----| \2*x / """ x = func.args[0] f = func.func ...
self.https: port = 443 else: port = 80 if ':' in host: _host, _port = host.rsplit(':', 1) try: port = int(_port) host = _host fport = True except: pass return ( fport, host, port, path) def get_query(self): if self.https: url = 'https://%s/' % self.path else: url = self.path url_scm, _, _, _, _,...
<gh_stars>0 from cards import * from tkinter import ARC, _flatten from PIL import Image, ImageTk from aidan_graphics import * from npc_controls import * class Hand(object): count = 0 # Keep track of hand number for logs button_sprite = Image.open('resources/button.png').convert("RGB") SEATS = 8 PRE_FLOP = 0 FLOP...
<gh_stars>10-100 from amitools.vamos.error import * from amitools.vamos.log import log_mem_alloc from amitools.vamos.label import LabelRange, LabelStruct from amitools.vamos.astructs import AccessStruct class Memory: def __init__(self, addr, size, label, access): self.addr = addr self.size = size self.label = lab...
#!/usr/bin/env python from unicorn import * from unicorn.x86_const import * import re, struct, sys, base64, pefile, binascii, hashlib __author__ = "<NAME> [karttoon] @noottrak" __email__ = "<EMAIL>" __version__ = "1.2.1" __date__ = "21MAY2018" # v1.2.1 - e864f9735349e14c8c4583fe4c29b1b8eab5fca74855476f91e93349b796d81...
# coding: utf-8 # ## This notebook contains code to easily create the inputs required to run the process in one of the 'overlay' notebooks. # #### In addition to the outputs produced by this output, the user will need to also obtain from other sources elevation (NED DEM) and optionally ortho imagery data (NAIP)...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
import re import unicodedata import simplejson as json from django.db import models from django.utils import timezone from jsonfield import JSONField import clients.models as Clients import directory.models as directory import slog.models as slog import users.models as umodels import cases.models as cases from api.mod...
# Spices, anise seed 2003: ["Basil", "dried"], # Spices, basil, dried 2004: ["Bay leaf"], # Spices, bay leaf 2005: ["Caraway seed"], # Spices, caraway seed 2006: ["Cardamom"], # Spices, cardamom 2007: ["Celery seed"], # Spices, celery seed 2008: ["Chervil", "dried"], # Spices, chervil, dried 2009: ["Chili powder...
<reponame>aurelienpierre/colour """ Image Input / Output Utilities ============================== Defines the image related input / output utilities objects. """ from __future__ import annotations import numpy as np from dataclasses import dataclass, field from colour.hints import ( Any, ArrayLike, Boolean, DTy...
import os import sys import csv from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit from qiskit.tools.visualization import plot_histogram import numpy as np import lib.simulation as sim from lib.gateSet import * def run_test(args): if args.adder: para = args.adder test_adder(para[0], para[1], par...
import matplotlib.path as mplPath from abc import ABCMeta import abc from protodata.utils import read_json from protodata.columns import create_image_column import numpy as np import os import tensorflow as tf import logging logger = logging.getLogger(__name__) """ General functions for data manipulation """ cla...
/ 2], [-1 / 2, -1 / 2]), ("CRot", [math.pi / 2, 0, 0], [-1 / 2, -1 / 2]), ("CRot", [0, math.pi / 2, 0], [-1 / 2, 1 / 4]), ("CRot", [0, 0, math.pi / 2], [-1 / 2, -1 / 2]), ("CRot", [math.pi / 2, 0, -math.pi], [-1 / 2, -1 / 2]), ("CRot", [0, math.pi / 2, -math.pi], [-1 / 2, 1 / 4]), ("CRot", [-math.pi, 0, math.pi /...
"credit_percent" in stip and not isinstance( stip["credit_percent"], (int, float)): raise ValidationError(_("credit_percent must be a float")) if ("allowed_session_count" in stip and ( not isinstance(stip["allowed_session_count"], int) or stip["allowed_session_count"] < 0)): raise ValidationError( _("'allowed_s...
vol ) else: qtyNeeded = purchase.qty if not cost_result['consumables'].has_key(bottle.name): cost_result['consumables'][bottle.name] =0 cost_result['consumables'][ bottle.name ] = cost_result['consumables'][ bottle.name ] + (purchase.purchaseCost * qtyNeeded) cost_result['consumables'][...
<gh_stars>1-10 unicode_data_to_decomposition_start = { 160: "<noBreak> 0020", 168: "<compat> 0020 0308", 170: "<super> 0061", 175: "<compat> 0020 0304", 178: "<super> 0032", 179: "<super> 0033", 180: "<compat> 0020 0301", 181: "<compat> 03BC", 184: "<compat> 0020 0327", 185: "<super> 0031", 186: "<super> 006...
# -*- coding: utf-8 -*- db = DAL('mysql://root@localhost/sisventi') # by default give a view/generic.extension to all actions from localhost # none otherwise. a pattern can be 'maestrcontroller/function.extension' response.generic_patterns = ['*'] if request.is_local else [] import datetime from gluon.tools import M...
print(out.numpy()) Outputs: .. testoutput:: 0 """ if axis is None: assert not keepdims, "can not set axis=None and keepdims=True" inp = inp.flatten() axis = 0 axis = _normalize_axis(inp.ndim, axis, reverse=True) if isinstance(axis, collections.abc.Iterable): for ai in axis: op = builtin.Argmin(axis=ai...
postfix of the Sv file used to remove noise from, default to '_Sv' source_path : str path of Sv file used to remove noise from, can be one of the following: - None (default): use Sv in RAWFILENAME_Sv.nc in the same folder as the raw data file, or when RAWFILENAME_Sv.nc doesn't exist, perform self.calibrate() and u...
<filename>sdk/fedn/combiner/server.py from concurrent import futures import grpc import time import uuid import queue import threading import fedn.proto.alliance_pb2 as alliance import fedn.proto.alliance_pb2_grpc as rpc from datetime import datetime, timedelta from scaleout.repository.helpers import get_repository ...
from copy import copy, deepcopy import sqlite3 from hashlib import md5 import time import os import os.path as osp from base64 import b64encode, b64decode from zlib import compress, decompress import itertools as it import logging # instead of pickle we use dill, so we can save dynamically defined # classes import dil...
`decode` of some encoding stages only commute with sum if the number of summands is known. Consider the example of uniform quantization on a specified interval. Encoding applies a pre-defined linear transformation to the input, and maps the resulting values to a discrete set of values. Because of the linear trans...
in the pod's namespace """ def __init__(__self__, *, key: str, name: Optional[str] = None, optional: Optional[bool] = None): """ Selects a key of a secret in the pod's namespace :param str key: The key of the secret to select from. Must be a valid secret key. :param str name: Name of the referent. More info: h...
if files is None: return None mols = MoleculeSet([]) for file in files: mol = None self.lastDir = os.path.split(file)[0] self.fileExt = os.path.splitext(file)[1] if not self.fileExt in [".pdb",".pdbq", ".pdbqs", ".pdbqt", ".mol2", ".pqr", ".f2d", ".cif",".gro"]: # popup a pannel to allow the user to choose ...
# Copyright (c) 2015. # <NAME> <bytefish[at]gmx[dot]de> and # <NAME> <flier[at]techfak.uni-bielefeld.de> and # <NAME> <nkoester[at]techfak.uni-bielefeld.de> # # # Released to public domain under terms of the BSD Simplified license. # # Redistribution and use in source and binary forms, with or without # modification, a...
if hasattr(listener, "enterDistinct_clause"): listener.enterDistinct_clause(self) def exitRule(self, listener: ParseTreeListener): if hasattr(listener, "exitDistinct_clause"): listener.exitDistinct_clause(self) def distinct_clause(self): localctx = PigParser.Distinct_clauseContext( self, self._ctx, self.state...
#!/usr/bin/python #---------------------------------------------------------------------- # Jacked cube color picker to control LightBrick v1.0 AKA Optimus Shine # <NAME> 23 Sept 2010 #---------------------------------------------------------------------- # # Based on CUBECOLOURDIALOG Widget, Python Code By: # <...
) histogramBuilder.addVals( findSnpsMatchingConds( showHeadings = 'val', showVals = snpStat, **args ).val ) histogramBuilder.save( outFile ) def AddUpHistograms( histFiles, outFile, getio = None ): """Add up histograms from separate files, write results to new file""" outFileStats = AddFileSfx( outFile, 'stats...
patch def save_image_batch(self, cv, z_range, float_patch, bbox, mip, to_uint8=True): x_range = bbox.x_range(mip=mip) y_range = bbox.y_range(mip=mip) print("type of float_patch", type(float_patch), "shape", float_patch.shape) patch = np.transpose(float_patch, (2,3,0,1)) # patch = np.transpose(float_patch, (2,1,0...
# -*- coding: utf-8 -*- import time from time import strftime, localtime from datetime import datetime import numpy as np import tensorflow as tf from sklearn.metrics import classification_report import logging logger = logging.getLogger(__name__) # todo: hooks should also have prefixes so that one can use the sa...
<gh_stars>0 import pickle import os.path import sys, getopt from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request import html from collections import namedtuple from dataclasses import dataclass from typing import List fro...
<gh_stars>1-10 # Copyright 2018 <NAME> <EMAIL> # 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 w...
<gh_stars>0 #!/usr/bin/env python """Test suite for docformatter.""" from __future__ import (absolute_import, division, print_function, unicode_literals) import contextlib import io import os import random import shutil import string import subprocess import sys import tempfile import unittest if sys.version_inf...
== "_n_components": _val = [1 for objt in obj_type] attr = [objt + attr for objt in obj_type] elif attr in ["_longest_component", "_largest_component"]: _val = [cid for objt in obj_type] attr = [objt + attr for objt in obj_type] elif attr == "vertex_list": # reassigns vertex list + network, graph component verti...
pass # Exit a parse tree produced by SQLParser#tableConstraintDef. def exitTableConstraintDef(self, ctx:SQLParser.TableConstraintDefContext): pass # Enter a parse tree produced by SQLParser#constraintName. def enterConstraintName(self, ctx:SQLParser.ConstraintNameContext): pass # Exit a parse tree produced b...
import os, sys from random import randint, choice from math import sin, cos, radians import pygame from pygame import Rect, Color from pygame.sprite import Sprite from gridmap import GridMap from pathfinder import PathFinder from simpleanimation import SimpleAnimation from utils import Timer from vec2d import vec2d f...
== other.sequence.lower() and self.overhangsEqual(other): return True return False def overhangsEqual(self, other): if self.bottomLeftOverhang.sequence.lower() == other.bottomLeftOverhang.sequence.lower() and \ self.topLeftOverhang.sequence.lower() == other.topLeftOverhang.sequence.lower() and \ self.bottomRightO...
'e': e, 'False': False, 'inf': inf, 'None': None, 'True': True, 'pi': pi, } def add_binop(name, function, precedence): '''name: a string not already in ufunctions or binops. The name also shouldn't have any such names as substrings, or it might not work. function: a function that takes exactly two required arg...
<reponame>Golder06/Goldbot import asyncio import calendar import io import os import random from datetime import datetime, timedelta import discord import googletrans import wikipedia from discord.ext import commands, tasks from googletrans import Translator from iso639 import languages import botutilities import goo...
<reponame>v0rts/crossfeed import traceback try: from source import ( alerts, list_organizations, alias_organization, mentions, root_domains, creds, top_cves, ) from redact import redact_pii import psycopg2 import psycopg2.extras as extras import os import pandas as pd import datetime from datetime impor...
SQLParser#simpleExprWindowingFunction. def exitSimpleExprWindowingFunction(self, ctx:SQLParser.SimpleExprWindowingFunctionContext): pass # Enter a parse tree produced by SQLParser#simpleExprBinary. def enterSimpleExprBinary(self, ctx:SQLParser.SimpleExprBinaryContext): pass # Exit a parse tree produced by SQLP...
def eventFilter(*args, **kwargs): pass def horizontalScrollBar(*args, **kwargs): pass def horizontalScrollBarPolicy(*args, **kwargs): pass def keyPressEvent(*args, **kwargs): pass def maximumViewportSize(*args, **kwargs): pass def minimumSizeHint(*args, **kwargs): pass def mouseD...
the local basis indices. This is prerequisite for calculating the tangent vector parameters B, which optimally approximate the exact time evolution. These are to be used on one side of the super-operator when applying the nearest-neighbour Hamiltonian, similarly to C in eqn. (44) of arXiv:1103.0936v2 [cond-ma...
str tools : Version ''' tag_ = tag tools_ = Version.from_json(tools) if tools else None # Validate arguments against known Juju API types. if tag_ is not None and not isinstance(tag_, (bytes, str)): raise Exception("Expected tag_ to be a str, received: {}".format(type(tag_))) if tools_ is not None and not isi...
<reponame>fabmiz/osf.io<gh_stars>1-10 from datetime import timedelta import json import logging import re import sys from modularodm import Q from modularodm.storage.base import KeyExistsException from framework.mongo import database from framework.transactions.context import TokuTransaction from scripts import utils...
}, "GUELPH": { "de_DE": "Guelph", "es_ES": "Guelph", "fr_FR": "Guelph", "it_IT": "Guelph", "ja_JP": "ゲルフ", "ko_KR": "궬프", "pl_PL": "Guelph", "pt_BR": "Guelph", "ru_RU": "Гуэлф" }, "GUIMARAES": { "de_DE": "Guimarães", "es_ES": "Guimarães", "fr_FR": "Guimarães", "it_IT": "Guimarães", "ja_JP": "ギマランイス", ...
frame_no_key = '%02d' % frame_no ray_background = rayleigh.rvs(loc=0, scale=1, size=(img_h, img_w)) #sigma_n=E(n^2) = 2*scale^2 # Erc: average clutter energy. erc = np.sum(ray_background ** 2) / ray_background.size #add targets on the simulated position in each frame simulated_frame = ray_background # Each frame ...
{} form_params = [] body_params = None # HTTP header `Accept` header_params["Accept"] = self.api_client.select_header_accept( ["application/json"] ) # Authentication setting auth_settings = ["OAuth2"] url = self.get_resource_url("/LinkedTransactions/{LinkedTransactionID}") try: return self.api_client.call...
import os import sys import threading from fanstatic import compat import fanstatic.checksum import fanstatic.registry DEFAULT_SIGNATURE = 'fanstatic' VERSION_PREFIX = ':version:' BUNDLE_PREFIX = ':bundle:' NEEDED = 'fanstatic.needed' DEBUG = 'debug' MINIFIED = 'minified' _resource_file_existence_checking = True...
<gh_stars>1-10 import requests import json import base64 import threading import time from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtPrintSupport import * from PyQt5.QtCore import * from PyQt5 import sip import sys # import win32api # import win32con from PIL import Image import numpy as np import...
== easy_read_format_from_detection_corpus( corpus_format), easyread_format + "VS\n" + \ easy_read_format_from_detection_corpus(corpus_format) assert corpus_format == detection_corpus_format_from_easy_read( easyread_format), corpus_format + "VS\n" + \ detection_corpus_format_from_easy_read(easyread_format) # add t...
<gh_stars>0 import os import re import logging from django.conf import settings from django.contrib.gis.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.formats import date_format from easy_thumbnails.alias import aliases from easy_thumbnails.exceptions import InvalidImageFor...
<filename>engine/2.80/scripts/addons/archipack/archipack_reference_point.py # -*- coding:utf-8 -*- # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either...
9, 2, 9, 0))) def testToStrHourlyByHour(self): self._rrulestr_reverse_test(rrule(HOURLY, count=3, byhour=(6, 18), dtstart=datetime(1997, 9, 2, 9, 0))) def testToStrHourlyByMinute(self): self._rrulestr_reverse_test(rrule(HOURLY, count=3, byminute=(6, 18), dtstart=datetime(1997, 9, 2, 9, 0))) def testToStrH...
True @receiver(post_save, sender=User) def create_associated_email(sender, **kwargs): """ Creates and attaches a primary AssociatedEmail when a User object is created. """ user = kwargs['instance'] if kwargs['created']: email = AssociatedEmail(user=user, email=user.email, is_primary_email=True) if user.is_acti...
R16 = params["R16"] R17 = params["R17"] R18 = params["R18"] R19 = params["R19"] R20 = params["R20"] R21 = params["R21"] R22 = params["R22"] R23 = params["R23"] R24 = params["R24"] R25 = params["R25"] R26 = params["R26"] R27 = params["R27"] R28 = params["R28"] R29 = params["R29"] R30 = params["R30"] R31 =...
YESIEUNG-SIOS 11F2 HANGUL JONGSEONG YESIEUNG-PANSIOS 11F3 HANGUL JONGSEONG PHIEUPH-PIEUP 11F4 HANGUL JONGSEONG KAPYEOUNPHIEUPH 11F5 HANGUL JONGSEONG HIEUH-NIEUN 11F6 HANGUL JONGSEONG HIEUH-RIEUL 11F7 HANGUL JONGSEONG HIEUH-MIEUM 11F8 HANGUL JONGSEONG HIEUH-PIEUP 11F9 HANGUL JONGSEONG YEORINHIEUH 11FA HANGUL JONGSEONG K...
<gh_stars>1-10 # # Copyright (c) 2018, 2021 <NAME> <<EMAIL>> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE...
# -*- coding: utf-8 -*- """Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/11wBui-tMpkLXlYGZAgE7-77MpWtpKRXP Package Imports """ import numpy as np import pandas as pd from collections import Counter # imports for Part II from sklearn.model_selection imp...
<reponame>zysszy/Recoder<filename>testDefect4jv_2.py<gh_stars>10-100 import os import javalang #from ast import nodes from graphviz import Digraph import json import pickle from tqdm import tqdm import numpy as np from run import * from stringfycode import stringfyRoot from copy import deepcopy import time import io im...
"end is restoring the boresight" self.moveBoresight( self.begBoreXYDeg, doWait = False, ) if self.didTakeImage and (self.doWindow or doRestoreBoresight): if self.sr.debug: print "end is taking a final exposure" exposeCmdDict = self.getExposeCmdDict(doWindow=False) sr.startCmd(**exposeCmdDict) def formatBinF...
= feeders[feeders['id_f'] == inbound] #st.write("handle*Id, feeders_1= ", feeders_1) feeders_1['id_f_nf'] = feeders_1['id_f'] + '_' + feeders_1['id_nf'] # extract these outgoings from the FSU database # if outbounds has ids not in fsu, this approach will not work fsu_outbound = pd.merge(fsu, outbounds, how='inne...
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Intel Corporation # # 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 to use, copy,...
if try_times > connect_try: break msg_from_client_str = str(msg_from_client.decode('utf-8')) print(msg_from_client_str + " " + "try_time: " + str(try_times)) # try_times = try_times + 1 matched = re.match(legal_pattern, msg_from_client_str) if matched is not None: break if not msg_from_client: break response ...
<filename>BPG/photonic_core.py import os import sys import bag import bag.io import abc import yaml import logging import math import string from .logger import setup_logger from pathlib import Path from itertools import chain # BAG imports from bag.core import BagProject, create_tech_info, _import_class_from_str from...
start: Time of the first log entry to be gathered. Defaults to 0. :type start: int, optional :param end: Time of the last log entry to be gathered. Defaults to current time. :type end: int, optional :param excludeInfo: Filter Info log level messages :type excludeInfo: bool, optional :param excludeWarning: Filter ...
return m class SpatialCrop: """ General purpose cropper to produce sub-volume region of interest (ROI). If a dimension of the expected ROI size is bigger than the input image size, will not crop that dimension. So the cropped result may be smaller than the expected ROI, and the cropped results of several images ...
#! python from behave import given, then from renderer.bolts import Tuple, Point, Vector, Color from math import isclose, sqrt, pi from renderer.matrix import IdentityMatrix EPSILON = 0.0001 #def determineValue(stringval): # if stringval == 'π': # return pi # else: # return float(stringval) #def determineNumeric(st...
**kwargs): """ Compute standard deviation of groups For multiple groupings, the result will be a MultiSet Parameters ---------- ddof : integer, default 1 degrees of freedom """ return self._calculate_all(GB_FUNCTIONS.GB_STD, *args, **kwargs) #-----------------------------------------------------...
X): """ Predicts the output given an array of instances. Parameters ---------- X : (n, d) array like The covariates on which to predict Returns ------- predictions : {(n,) array, (n,p) array} The predicted mean outcomes """ if X is None: X = np.empty((1, 0)) if self.fit_intercept: X = add_constant(X, h...
= elements['font-style'] if fontStyle == 'italic' or fontStyle == 'oblique': font.slant = 0.2 elif fontStyle == 'normal': font.slant = 0.0 if 'font-weight' in elements: fontWeight = elements['font-weight'] if fontWeight == 'normal': weight = 400 elif fontWeight == 'bold': weig...
''' This submodule provides basic preprocessing functionality to work with hyperspectral data/images. E.g. - Normalization - Baseline Correction/Removal - RGB-Image standardization - Scatter correction (especially RMieS-correction) - Data transformations from 3D to 2D and reverse - ... ''' # IMPORTS ######### impor...
import time import numpy as np from matplotlib import pyplot as plt import matplotlib.animation as animation import pandas as pd import sys from matplotlib import gridspec import matplotlib.pyplot as plt import cartopy import cartopy.io.shapereader as shpreader import cartopy.crs as ccrs import geopandas as gpd def f...
<reponame>Agoniii/tensorflow<filename>tensorflow/python/framework/config.py<gh_stars>1-10 # Copyright 2019 The TensorFlow 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 Li...
{'url': '/jobs/{id}'} def purge_command_queue( self, id, custom_headers=None, raw=False, **operation_config): """Delete all the pending commands for this device from the IoT hub. :param id: Device ID. :type id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns t...
import sys import re import json import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.cluster import KMeans from sklearn.decomposition import PCA from sklearn.preprocessing import MultiLabelBinarizer from scipy.spatial.distance import cdist from colorama import Fore, Style from kneed impo...
SMALL LIGATURE FF}', u'ff', decode=False) self.register(u'\N{GREEK SMALL LETTER ALPHA}', u'\\alpha', mode='math') self.register(u'\N{GREEK SMALL LETTER BETA}', u'\\beta', mode='math') self.register(u'\N{GREEK SMALL LETTER GAMMA}', u'\\gamma', mode='math') self.register(u'\N{GREEK SMALL LETTER DELTA}', u'\\delta', ...
text) text = re_sub(r'№№?', r' № ', text) # апостроф в начале или в конце строки - кавычки text = re_sub(r"^'|'$", '"', text) # если несколько символов ., ?, !, подряд, то если среди них есть # ?, то меняем всё на него, если есть !, то на него, иначе ставим # три точки text = re_sub(r'[.?!]{2,}', lambda x: ' ' ...