input
stringlengths
2.65k
237k
output
stringclasses
1 value
############################################################################## # # Copyright (c) 2011 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFT...
import os, decimal import numpy as np import csv, math, json, pprint from sklearn.manifold import TSNE import pandas as pd import string from operator import itemgetter def pipeline(): # raw file : NBA Season Data.csv # rawfile = "../../static/skyflow/data/original/NBA Season Data.csv" # rawfile_rows = read(rawfil...
# Copyright 2018 <NAME> # Licensed under the MIT license """ Async-compatible version of itertools standard library functions. These functions build on top of the async builtins components, enabling use of both standard iterables and async iterables, without needing to use if/else clauses or awkward logic. Standard i...
<gh_stars>0 # -*- coding: utf-8 -*- import os import sys import time import stat from core.env import env import core.colorconsole as cc import core.utils as utils class InstallerBase: def __init__(self): self._all_ok = True self._err_msg = list() self._is_installed = False self._install_path ...
<gh_stars>0 """Exception-catching middleware that allows interactive debugging. This middleware catches all unexpected exceptions. A normal traceback, like produced by ``weberror.exceptions.errormiddleware.ErrorMiddleware`` is given, plus controls to see local variables and evaluate expressions in a local context. Th...
"""Module for classification using quantum machine learning models. """ import numpy as np import pickle import json from tqdm.auto import tqdm from scipy.optimize import minimize from .circuitML import circuitML from .utility import CE_loss SCIPY_METHODS = { 'bfgs', 'nelder-mead', 'powell', 'cg', 'newton-cg', '...
long > > > Create a vector of length p with with matrices with symbolic primitives of sym(str name, int nrow, int ncol, int p) -> std::vector< casadi::Matrix< long long >,std::allocator< casadi::Matrix< long long > > > Create a vector of length p with nrow-by-ncol symbolic primitives. sym(str name, Sparsity sp, int...
import imp import numpy import torch from torch._C import set_flush_denormal import torch.nn as nn import torch.nn.functional as F from torch import Tensor import copy from typing import Optional from einops import rearrange import math """ TranST: spatial_encoder, temporal_encoder, Args: """ class TranST(nn.Modul...
Ltd", "CED", datetime.date(1996, 11, 29)), "CMR": pnp.Vendor("Cambridge Research Systems Ltd", "CMR", datetime.date(2002, 4, 25)), "CNN": pnp.Vendor("Canon Inc", "CNN", datetime.date(1996, 11, 29)), "CAI": pnp.Vendor("Canon Inc.", "CAI", datetime.date(2001, 11, 6)), "UBU": pnp.Vendor("Canonical Ltd.", "UBU", dateti...
a tank wall.") def checkClosure(start_point, end_point): if start_point == end_point: return True def addCorner(corner_flag): if corner_flag == 'x-y-': corner = [[self.x0, self.y0]] elif corner_flag == 'x+y-': corner = [[self.x1, self.y0]] elif corner_flag == 'x+y+': corner = [[self.x1, self.y1]] elif corn...
<reponame>rperrin22/FEHM_supplementary import numpy as np import pandas as pd from pylagrit import PyLaGriT from matplotlib import pyplot as plt from scipy import interpolate from scipy.interpolate import griddata class create_FEHM_run: def __init__(self,test_number,param_file): # read in the parameter fi...
l.area = 3 and wn_id is not null) )) UNION (SELECT h.wn_id FROM (SELECT l.wn_id, COUNT(*) as job FROM location as l WHERE l.area = 1 GROUP BY l.wn_id) as h WHERE h.job < 4)" elif areaa == 2: sql9 = "(SELECT wn_id FROM ward_nurse WHERE wn_id NOT IN ((SELECT wn_id FROM location l WHERE l.area = 1 and wn_id is not null)...
a review is public, it cannot be made ' 'private again.', }, 'summary': { 'type': str, 'description': 'The new review request summary.', }, 'target_groups': { 'type': str, 'description': 'A comma-separated list of review groups ' 'that will be on the reviewer list.', }, 'target_people': { 'type': str, 'de...
"Offsetdrucker", "<NAME>", "Zugverkehrsleiter", "Regulatory Affairs Specialist", "Redaktionsassistent", "Kleiderverkäufer", "Leiter E-Marketing", "Schulratspräsident", "<NAME>", "Schulassistent", "Fahrzeug-Aufbereiter", "Schleifer", "<NAME>", "Musiklehrer", "Sachbearbeiter Soziale Dienste", "<NAME>", "Hauswirtsch...
= mt.atan2(temp1,temp2) return trim class trig_atan2d2(funcionestrig): def __init__(self, exp1, exp2 ): self.exp1 = exp1 self.exp2 = exp2 def ejecutar(self): try: temp1 = float(self.exp1) temp2 = float(self.exp2) except ValueError: e = errores.CError(0,0,"Error en funcion trigonometrica",'Semantico'...
<filename>flarepy/utils/database_utils.py # -*- coding: utf-8 -*- """ Created on Sun Oct 29 12:30:07 2017 @author: alex_ """ from sunpy.io import fits, file_tools as sunpy_filetools import sunpy.database from astropy.units import Unit, nm, equivalencies from sunpy.database.tables import * from sunpy.time import parse...
DZITA', 66388: 'OLD PERMIC LETTER E', 66411: 'OLD PERMIC LETTER EF', 66386: 'OLD PERMIC LETTER GAI', 66412: 'OLD PERMIC LETTER HA', 66393: 'OLD PERMIC LETTER I', 66421: 'OLD PERMIC LETTER IA', 66418: 'OLD PERMIC LETTER IE', 66394: 'OLD PERMIC LETTER KOKE', 66395: 'OLD PERMIC LETTER LEI', 66396: 'OLD PERMIC LETTER MENOE...
field `Relative Humidity Fraction 14`""" self["Relative Humidity Fraction 14"] = value @property def water_vapor_diffusion_resistance_factor_14(self): """field `Water Vapor Diffusion Resistance Factor 14` | Units: dimensionless Args: value (float): value for IDD Field `Water Vapor Diffusion Resistance Factor ...
# in best case integrated into netzob later on # netzob/src/netzob/Inference/Vocabulary/PayloadFinder.py or alike # netzob import from netzob.Common.Utils.Decorators import typeCheck from netzob.Inference.Vocabulary.Format import Format from netzob.Model.Vocabulary.Messages.RawMessage import RawMessage from netzob.Mod...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
0.6848, 't3.large': 0.162, 't3.medium': 0.0856, 't3.micro': 0.026, 't3.nano': 0.013, 't3.small': 0.052, 't3.xlarge': 0.3424, 'x1.16xlarge': 15.949, 'x1.32xlarge': 31.898}}, 'us-east-1': {'linux': {'a1.2xlarge': 0.204, 'a1.4xlarge': 0.408, 'a1.large': 0.051, 'a1.medium': 0.0255, 'a1.xlarge': 0.102, 'c1.med...
<reponame>dvtrung/dl-torch<filename>dlex/torch/backend.py """Train a model.""" import os import random import sys import traceback from collections import namedtuple, defaultdict from datetime import datetime from typing import Callable, Dict import torch from dlex import FrameworkBackend, TrainingProgress from dlex.c...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This script builds the domain specific language model for the Public Transport Info domain (Czech) The training procedure is as follows: #. Append bootstrap text, possibly handwritten, to the text extracted from the indomain data. #. Build a class based language mode...
All required parameters must be populated in order to send to Azure. :param directory: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the giv...
if self.TrailerAccessible is not None: namespaceprefix_ = self.TrailerAccessible_nsprefix_ + ':' if (UseCapturedNS_ and self.TrailerAccessible_nsprefix_) else '' showIndent(outfile, level, pretty_print) outfile.write('<%sTrailerAccessible>%s</%sTrailerAccessible>%s' % (namespaceprefix_ , self.gds_format_boolean(self...
<gh_stars>1-10 import asyncio import sys import numpy as np import pandas as pd import serial import serial.tools.list_ports import bokeh.plotting import bokeh.io import bokeh.layouts import bokeh.driving from bokeh.server.server import Server from bokeh.application import Application from bokeh.application.handler...
import pymc3 as pm import numpy as np import scipy as sp import theano.tensor as tt import patsy as p import utilities def cross_validate_rwfmm(rwfmm_args,rwfmm_kwargs,param_for_tuning,tuning_set,criterion='LOO'): model_dict = {} trace_list = [] for param_val in tuning_set: modified_kwargs = rwfmm_kwargs.copy()...
total std > ts better ts = config.ef_ts for i in range(config.num_label): mask = (lab_labels == i).nonzero() mask_num = mask.nelement() if mask_num <= 1: continue part_lab_feat = lab_feat[mask[:,0]] plf_std = torch.std(part_lab_feat, 0) ef_loss += torch.mean(torch.max(plf_std - ts, Variable(torch.zeros(plf_st...
# -------------------------------------------------------- # Who_where # Copyright (c) 2016 University of Virginia # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> @ U.Va (2016) # -------------------------------------------------------- import os, cv2 import os.path as osp import numpy as...
<gh_stars>1-10 from collections import OrderedDict, namedtuple from datetime import datetime from decimal import Decimal import functools import io from pathlib import Path from typing import Any, Callable, Mapping, Sequence, Union import aiohttp import aiohttp.web from dateutil.tz import tzutc from multidict import C...
pdb]} atomList1.append(atomEntry1)#atomic count else: if(residue2 in interfaceDictionary[uniprotPair2]): if(atomEntry2 not in atomList2): #atomic count interfaceDictionary[uniprotPair2][residue2][1] += 1 atomList2.append(atomEntry2) #atomic count if(chainPair2 not in interfaceDictionary[uniprotPair2][r...
""" SR²: Super-Resolution With Structure-Aware Reconstruction sr2/src/utils @author: <NAME> """ import os import random import h5py import numpy as np import scipy.io as sio import tensorflow as tf from skimage.filters import gaussian from skimage.transform import rescale from random import sample ...
import datetime import urllib import urllib.parse import urllib.request import pprint as pp from collections import defaultdict from .utils import createSign, http_get_request, http_post_request from ..exchange import Exchange class Huobi(Exchange): def __init__(self, key, secret): self.api = HuobiAPI(key, secret)...
dfs_sel[col] # slice TMDs out of dfs_sel, and save them in the new df_TMD df_TMD['%s_SW_query_seq' % TMD] = dfs_sel.apply(utils.slice_SW_query_TMD_seq, args=(TMD,), axis=1) df_TMD['%s_SW_markup_seq' % TMD] = dfs_sel.apply(utils.slice_SW_markup_TMD, args=(TMD,), axis=1) df_TMD['%s_SW_match_seq' % TMD] = dfs_sel.app...
segPair in self.expansionSegmentPairs: dbs.extend(segPair.get_dbs()) return dbs # -------------------------------------------------------------------- def getExpansionSegPairList(self): """Returns a list of all SegmentPair objects that make up the new segments of an expansion""" return self.expansionSegmentPair...
not match") band = dataset.GetRasterBand(1) if DEBUG: print('Overviews:', band.GetOverviewCount()) self.assertEqual(band.GetOverviewCount(), 7, "Overview count does not match") # Convert and compare MRF img = gdal.Open(self.output_img_d) if DEBUG: print('Size: ', img.RasterXSize, 'x', img.RasterYSize, 'x', im...
""" :mod:`hashdist.core.execute_job` --- Job exection ================================================= Executes a set of commands in a controlled environment. This should usually be used to launch a real script interpreter, but basic support for modifying the environment and running multiple commands are provided thr...
<reponame>UttaranB127/GeneratingEmotiveGaits<filename>utils/processor_legacy_1.py<gh_stars>1-10 import math import os import torch.optim as optim import torch.nn as nn from net import quater_emonet from torchlight.torchlight.io import IO from utils.mocap_dataset import MocapDataset from utils.visualizations import dis...
MPxNode_setInternalValueInContext(*args, **kwargs): pass def MPx3dModelView_getObjectsToView(*args, **kwargs): pass def MPxManipContainer_newManipulator(*args, **kwargs): pass def MPxSurfaceShape_nodeBoundingBoxSizeX_get(*args, **kwargs): pass def MPxObjectSet_dagSetMembers_set(*args, **kwargs): pass def...
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. # # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. import copy import os import sys from contextlib import suppress from typing import Any, List, Type, cast import numpy a...
<reponame>humblef00ls/PokerData # Project Euler Library - Written in Python # This library contains all the functions needed to solve # the problems from the website #!usr/bin/python import math, time, itertools # number of digits def num_digits(n): return int(math.log10(n)) + 1 # Check if it's a prime number def i...
Estado Nº 355" -33.4391488 -70.6495695 "Estado 355, Santiago, Chile") '("Ahumada - Moneda N° 975, local 3" -33.44183489 -70.650444 "Moneda N° 975, local 3") '("Hospital Clínico Universidad de Chile - Santos Dumont 999" -33.420406 -70.65295 "Santos Dumont 999") '("Bci Home Santiago - Bandera 341, Piso 9" -33.439186 -...
<filename>tests/hwsim/test_wpas_wmm_ac.py # Test cases for wpa_supplicant WMM-AC operations # Copyright (c) 2014, Intel Corporation # # This software may be distributed under the terms of the BSD license. # See README for more details. from remotehost import remote_compatible import logging logger = logging.getLogger(...
<filename>Code/Python/Apps/Whiteboard/App/Whiteboard.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not th...
import os import numpy as np import h5py import sqlite3 import sys from datetime import datetime as dt from multiprocessing import Process, Lock, BoundedSemaphore from GCR import GCRQuery import GCRCatalogs import lsst.sims.photUtils as sims_photUtils from lsst.sims.catUtils.dust import EBVbase from . import sqlite_...
scan_j: :class`~.ScanBase` Returns ------- :class:`float` ''' peak_set_a = self.peak_getter(scan_i) peak_set_b = self.peak_getter(scan_j) return peak_set_similarity( peak_set_a, peak_set_b) def find_best_cluster_for_scan(self, scan): '''Locate the best cluster to add ``scan`` to according to precursor mass...
<reponame>RohiBaner/Beijing-Air-Quality-Prediction<gh_stars>1-10 ''' --------------------------------------------IMPORTING NECESSARY LIBRARIES------------------------------------------- ''' import numpy as np import pandas as pd from math import radians, cos, sin, asin, sqrt from sklearn.preprocessing import MinMax...
#!/usr/bin/env python import added_routines as AR, itertools, pickle, hashlib from operator import itemgetter ########################################################################### # This module creates a cell dictionary from added_routines and a SolutionObject # which is an object based on the concept of taking...
of the segment, which is done outside of this class).a # # This function may reduce start_index and/or increase end_index by # including a single adjacent 'tainted' line from the ctm-edits file. This # is only done if the lines at the boundaries of the segment are currently # real non-silence words and not non-sco...
while attempting to work with dir={} stdout=\"{}\" stderr=\"{}\"".format(args.gitWorkingDir, output, stderr)) shutil.rmtree(args.gitWorkingDir) os.makedirs(args.gitWorkingDir) logger.debug("Attempting clone again from url={}".format(args.gitRepoURL)) if args.gitFirstConnection: # This is a once off make it a swit...
be normalized by the sampling rate as well as the length of the signal (as in nitime). %(verbose)s See Also -------- mne.time_frequency.psd_multitaper """ def __init__(self, sfreq=2 * np.pi, fmin=0, fmax=np.inf, bandwidth=None, adaptive=False, low_bias=True, n_jobs=1, normalization='length', verbose=None): #...
network.offset: o_row = logit_mean(O[i,:]) if np.isfinite(o_row): theta[B + 1 + i] -= o_row for j in range(N-1): theta[B + 1 + (M-1) + j] += \ logit((c[j] + 1.0) / (M + 2.0)) if network.offset: o_col = logit_mean(O[:,j]) if np.isfinite(o_col): theta[B + 1 + (M-1) + j] -= o_col alpha_out = network.row_covari...
import functools import urlparse import urllib import json import endpoint import protocol from response import Response, ResponseException from temporal.validate import check_time_param def make_series_url(key): """For internal use. Given a series key, generate a valid URL to the series endpoint for that key. :p...
# -*- coding: utf-8 -*- """ Created on Tue Nov 1 22:28 2016 @author: scott [ 20B14: This module basically implements my own version of JSON, which I did not know about when I wrote it. It is in ToDo.txt to change uses of Object_Files to uses of JSON. Because: Simple is better than complex. There should be one...
import struct import zlib from zlib import crc32 from collections import deque from itertools import cycle from enum import IntEnum class Chunk(): @classmethod def from_buffer(cls, buf): """read a single chunk from the head of the buffer""" new = cls() length = struct.unpack(">I", buf[:4])[0] new.type = buf[4:...
<filename>poker_server.py import sys import socket import struct import threading import time import argparse import re #from pynput import keyboard import select from math import sqrt, log, ceil from random import randrange import pyDes import base64 import pickle import game_utils SIZE = 1024 PORT = 12345 # Maximum ...
used for this lookup. If a mark filtering set is provided, `LOOKUP_FLAG_USE_MARK_FILTERING_SET` will be set on the lookup's flags. """ def __init__(self, font, location): LookupBuilder.__init__(self, font, location, "GPOS", 6) self.marks = {} # glyphName -> (markClassName, anchor) self.baseMarks = {} # glyphNa...
[0.1, 0.05, 1.0, 1.0] self._box_odd_coordinates = [0.1625, 0.2125, 0.5625, 0.9625] def test_max_distance_for_overlap(self): """Test that the distance ensures the IoU with random boxes.""" # TODO(vighneshb) remove this after the `_smallest_positive_root` # function if fixed. self.skipTest(('Skipping test because...
<filename>scripts/vcp.py<gh_stars>0 #!/usr/bin/python # -*-coding=utf-8-*- import os import re import time import datetime from datetime import datetime from datetime import timedelta import requests import pandas as pd from pandas import Series import numpy as np from requests.api import get import tushare as ts impor...
import collections import ctypes import functools import os.path import subprocess from six import iteritems, itervalues, integer_types, PY2 from six.moves import UserDict from .lexer import AssemblyLexer from .parser import AssemblyParser from .ast import FileNode, LabelNode, GlobalDirectiveNode, FileDirectiveNode, ...
The URI that can be used to request the next set of paged results. :type next_link: str """ _attribute_map = { 'value': {'key': 'value', 'type': '[Task]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, **kwargs ): super(TaskListResult, self).__init__(**kwargs) self.value = kwargs....
= np.zeros((self.num_models, num_windows, self.get_caffe_output_size())) num_mini_batches = int(np.ceil(np.float(num_windows)/self.caffe_batch_size)) for i in range(num_mini_batches): batch_start = i*self.caffe_batch_size batch_end = (i+1)*self.caffe_batch_size if batch_end > num_windows: batch_end_resize = num_...
ret = inst.listvirus() # callback 함수가 있다면 callback 함수 호출 if isinstance(cb_fn, types.FunctionType): cb_fn(inst.__module__, ret) else: # callback 함수가 없으면 악성코드 목록을 누적하여 리턴 vlist += ret if self.verbose: print ' [-] %s.listvirus() :' % inst.__module__ for vname in ret: print ' - %s' % vname except AttributeError...
bbox_inches='tight') plt.close() # Generate plot showing only elevations, and only the convnet results width = 8 scale = width/(srtm.shape[1]) height = 1.05 * 3 * srtm.shape[0] * scale fig, axes = plt.subplots(nrows=3, figsize=(width,height)) # Row 1: LiDAR DTM axes[0].imshow(dtm, aspect='equal', cmap=elv_c...
message['t_ToRecipients']['t_Mailbox'] = [recipients_mailbox] summary = {'subject': message.get('t_Subject'), 'create_time': message.get('t_DateTimeCreated'), 'sent_time': message.get('t_DateTimeSent')} action_result.update_summary(summary) # Set the Status return action_result.set_status(phantom.APP_SUCCESS) ...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import scipy from scipy.spatial.distance import cdist from .anchor_head_template import AnchorHeadTemplate class Self_Attn(nn.Module): """ Self attention Layer""" def __init__(self,in_dim,activation): super(Self_Attn,self).__init...
server # fntag = pfn is used for OutPutFileCatalog.xml that is used by the mover for the stage out # The SURL will be added to the metadata file for fntag = lfn to allow for server side LFC registration status = True flist = [] glist = [] from SiteMover import SiteMover # get the experiment object thisExperim...
<filename>background/sql_math.py<gh_stars>1-10 #! /usr/bin/python3 import mysql.connector import datetime import json import os # for writing to file mydb = mysql.connector.connect( # connect to database host="127.0.0.1", user="root", password="<PASSWORD>", auth_plugin='mysql_native_password', database="SNCF" ) ...
must be specified") self.thermodynamic_state = thermodynamic_state self.sampler_state = sampler_state # Initialize self.iteration = 0 # For GHMC / Langevin integrator self.collision_rate = 1.0 / unit.picoseconds self.timestep = 2.0 * unit.femtoseconds self.nsteps = 500 # number of steps per update self.verbos...
<reponame>AlainLich/dpath-python<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -*- mode: Python -*- # from dpath import options import dpath.segments as api import dpath from hypothesis import given, assume, settings, HealthCheck import hypothesis.strategies as st import unittest import os import sys i...
FrequencyFW(Firework): def __init__( self, molecule=None, name="frequency calculation", qchem_cmd=">>qchem_cmd<<", multimode=">>multimode<<", max_cores=">>max_cores<<", qchem_input_params=None, db_file=None, parents=None, **kwargs ): """ Optimize the given structure. Args: molecule (Molecule): Input mo...
<reponame>gitter-badger/goes2go<filename>goes2go/rgb.py ## <NAME> ## August 8, 2019 """ =========== RGB Recipes =========== .. image:: /_static/RGB_sample.png These functions take GOES-East or GOES-West multichannel data on a fixed grid (files named ``ABI-L2-MCMIPC``) and generates a 3D Red-Green-Blue (RGB) array ...
<reponame>SkyLined/mHTTP<filename>cHTTPClientSideProxyServer.py import re, time; try: # mDebugOutput use is Optional from mDebugOutput import *; except: # Do nothing if not available. ShowDebugOutput = lambda fxFunction: fxFunction; fShowDebugOutput = lambda sMessage: None; fEnableDebugOutputForModule = lambda mMo...
<reponame>ewengillies/sqlalchemy import logging.handlers import sqlalchemy as tsa from sqlalchemy import bindparam from sqlalchemy import Column from sqlalchemy import MetaData from sqlalchemy import or_ from sqlalchemy import select from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import uti...
instead See http://trac.sagemath.org/14801 for details. sage: h = f.convolution(g) doctest:...: DeprecationWarning: use lower-case piecewise instead See http://trac.sagemath.org/14801 for details. doctest:...: DeprecationWarning: use lower-case piecewise instead See http://trac.sagemath.org/14801 for details. do...
# 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 writing, software # distributed under the L...
frequency agility requested channel change", 0x1F, "Zigbee no joinable beacons; execute ATFR", 0x20, "Zigbee token space recovered", 0x21, "Zigbee token space unrecoverable", 0x22, "Zigbee token space corrupt", 0x23, "Zigbee dual-mode metaframe error", 0x24, "BLE connect", 0x25, "BLE disconnect", 0x34, "Bandmas...
<gh_stars>0 ''' Process data and prepare inputs for Neural Event Model. ''' import bz2 import gzip import json import logging import numpy as np import sys from gensim import models from scipy.sparse import csr_matrix from six import iteritems from sklearn.preprocessing import normalize, LabelEncoder from typing impo...
dest, src srcRegsRelativeLats = [0, 0, 0, 1, 1, 0] class HPI_CLZ_T1(MinorFUTiming): description = 'HPI_CLZ_T1' mask, match = t32_opcode('1111_1010_1011_xxxx__1111_xxxx_1000_xxxx') srcRegsRelativeLats = [3, 3, 2, 2, 2, 1, 0] class HPI_CLZ_A1(MinorFUTiming): description = 'HPI_CLZ_A1' mask, match = a32_opcode('xx...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------------...
#!/usr/bin/env python version=1.8 nimda = """ {} mm m mmmmm m m mmmm mm #"m # # ## ## # "m ## # #m # # # ## # # # # # # # # # # "" # # # #mm# # ## mm#mm # # #mmm" # #.py {} v {} {} """ try: import argparse import operator import requests import datetime import time import sys import os except ImportError...
the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ :param Mapping[str, 'SeldonDeploymentSpecPredictorsComponentSpecsSpecEphemeralContainersResourcesRequestsArgs'] requests: Requests describes the minimum amount of compute re...
import itertools import networkx as nx def get_animate_words(): animate_words = set(line.strip() for line in open('../animacy/animate.unigrams.txt', 'r', encoding='utf8')) animate_words.update({"i", "me", "myself", "mine", "my", "we", "us", "ourself", "ourselves", "ours", "our", "you", "yourself", "yours", ...
import dataclasses import datetime from pyactus.domain import enums from pyactus.domain import primitives @dataclasses.dataclass class Stock(): """STK :: Stock. Any instrument which is bought at a certain amount (market price normally) and then follows an index. """ # Calendar :: Calendar defines the non-wor...
iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('flush_args') if self.filedesc is not None: opr...
#!/usr/local/uvcdat/1.3.1/bin/python # TODO List # 1) Fix multiple plots->single png (set 3, set 6 primarily, set 1/2 level vars). Need to investigate template stuff # 2) Fix obs vs model variable name issues (requires lots of framework changes, probably need Jeff to poke at it) DONE for hardcoded variables # 3) Merg...
is None def chickering_distance(self, other) -> int: """ Return the total number of edge reversals plus twice the number of edge additions/deletions required to turn this DAG into the DAG ``other``. Parameters ---------- other: the DAG against which to compare the Chickering distance. Returns ------- int ...
<reponame>rgschmitz1/BioDepot-workflow-builder """ Orange Canvas Tool Dock widget """ import sys from AnyQt.QtWidgets import ( QWidget, QSplitter, QVBoxLayout, QTextEdit, QAction, QSizePolicy, QApplication, ) from AnyQt.QtGui import QPalette, QDrag from AnyQt.QtCore import ( Qt, QSize, QObject, QProperty...
<filename>test/python/WMCore_t/WMSpec_t/Steps_t/Executors_t/LogArch_t.py """ Created on Jun 18, 2009 @author: meloam """ from __future__ import print_function try: # https://pylint.pycqa.org/en/latest/technical_reference/features.html # W1626: the `reload` built-in function is missing in python3 # we can use imp.r...
} ], "revisions": { "v6.0.0": True, "v7.0.0": True, "v6.0.5": True, "v6.4.4": True, "v7.0.1": True, "v6.4.0": True, "v6.4.1": True, "v6.2.0": True, "v6.2.3": True, "v6.2.5": True, "v6.2.7": True, "v6.0.11": True } }, "dns_mode": { "type": "string", "options": [ { "value": "manual", "revisions": { ...
<filename>cqlengine/tests/columns/test_container_columns.py from datetime import datetime, timedelta import json from uuid import uuid4 from cqlengine import Model, ValidationError from cqlengine import columns from cqlengine.management import create_table, delete_table from cqlengine.tests.base import BaseCassEngTest...
<reponame>wasimaftab/kindred import sys import itertools import kindred import pickle import argparse import codecs import time import re import string from collections import defaultdict,Counter import json import six import os def acronymMatch(words,pos,currentAcronym,atStart,subpos=None): if len(currentAcronym) ==...
"""***************************************************************************************** MIT License Copyright (c) 2022 <NAME>, <NAME>, <NAME>, <NAME>, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to dea...
import re from .AssertionException import AssertionException class _Assert(object): def __init__(self, log): if callable(log): self.__log = log else: self.__log = log # def isIn(self, value, valueList, message = None): Assert.l_isIn(self.__log, value, valueList, message) # def isNotIn(sel...
<filename>inpystem/signals.py # -*- coding: utf-8 -*- """This package defines all sort of classes to handle data for inpystem. """ import abc import pathlib import configparser import logging import copy import numpy as np import matplotlib.pyplot as plt import hyperspy.api as hs from . import restore from .tools im...
<filename>comp_imprinting.py #!/usr/bin/env python ''' ------------------------- Usage: compare_imprinting.py status1.txt status2.txt homologs.txt outprefix [options] This is a short script for comparing imprinting between two different species (species 1 and species 2). Uses output from call_imprinting.sh ("locus_...
{} form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/app/rest/buildTypes/{btLocator}/parameters/{name}', 'PUT', path_params, query_params, header_params, b...
<reponame>DONG-Jason/chia-blockchain import asyncio import dataclasses import logging import time import traceback from pathlib import Path from typing import AsyncGenerator, Optional, Dict, Callable, List, Tuple, Any, Union, Set import aiosqlite from blspy import AugSchemeMPL import src.server.ws_connection as ws # ...
getConsolePort(self): """For use only by image.py and XendCheckpoint.py""" return self.console_port def getFeatures(self): """For use only by image.py.""" return self.info['features'] def getVCpuCount(self): return self.info['VCPUs_max'] def getVCpuAvail(self): return self.info['vcpu_avail'] def setVCpuCo...
<filename>src/sasctl/tasks.py #!/usr/bin/env python # encoding: utf-8 # # Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Commonly used tasks in the analytics life cycle.""" import json import logging import math import pickle import os import re impo...