input
stringlengths
2.65k
237k
output
stringclasses
1 value
SCARD_S_SUCCESS: raise error, 'Failed to transmit: ' + SCardGetErrorMessage(hresult) ... """ SCARD_F_COMM_ERROR = _scard.SCARD_F_COMM_ERROR r""" This function return a human readable text for the given PC/SC error code. from smartcard.scard import * ... hresult, response = SCardTransmit(hcard, SCARD_PCI_T0, S...
<filename>pyiron/table/datamining.py # coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import codecs from collections import OrderedDict from datetime import datetime imp...
mask[i]) seg.append((c_seg, h_seg)) c = ew.float_cast(c, dtype=tf.float32) h = ew.float_cast(h, dtype=tf.float32) states = tf.stack([c, h], 0) # We calculate the gradient internally. # Don't let other layer's gradients flow into here. # This is possible because the last cell has free c and h # params that a...
# -*- coding: utf-8 -*- import sys import os import datetime import time import logging import sqlalchemy as sa import click import pandas as pd from cointrader import Base, engine, db from cointrader.asset_fond import asset_fond from cointrader.indicators import ( WAIT, BUY, SELL, QUIT, Signal, signal_map ) from coin...
#!BPY """ Name: 'Interactive Python Console' Blender: 245 Group: 'System' Tooltip: 'Interactive Python Console' """ __author__ = "<NAME> aka ideasman42" __url__ = ["www.blender.org", "blenderartists.org", "www.python.org"] __bpydoc__ = """\ This is an interactive console, similar to Python's own command line interpre...
<gh_stars>0 #!/usr/bin/env python3 r""" usage: read.py [-h] [-e] [-p PROMPT] [-r] [-s] [--splat [SPLAT]] [--lines] read one line of standard input, and print it optional arguments: -h, --help show this help message and exit -e let people edit input and history -p PROMPT chars to print out before reading input (de...
segments = dof/2 m = (n / N).astype("int64") # Number of degrees of freedom (power of 2) dof = 2 * m # Frequency resolution at dof degrees of freedom. df = 1 / (N * dt) # Transfer function f = fft.ifftshift(np.linspace(-N / 2, N / 2 - 1, N) / N / dt) H1 = (1 + 1j * 2 * np.pi * f * tau1) * np.exp(1j * 2 * np.p...
= self.driver.id self.client.credentials(HTTP_AUTHORIZATION=self.token) response = self.client.post(self.create_url, self.minimum_valid_data, format='json') self.assertEqual(response.status_code, status.HTTP_201_CREATED) def test_create_waytracker_gps_device_with_full_valid_data(self): self.client.credentials(HTT...
# Copyright 2020 Juneau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
combines series which have sparseness disabled with series which have # sparseness enabled with self.assertRaises(ValueError): graphite_api = GraphiteApi( self.schema, ImmutableMultiDict({ 'target': 'sumSeries(group('\ 'clusters.*.*.service_1.process_1.m_1,'\ 'clusters.*.*.Diamond.m_2))', 'from': '-6h', 'unti...
dci in which current pr_obj exists. fabrics is the list of peer_fabrics exists in all list of dci. - dci_dict has a key as dci name (either l2 or l3 mode) who has current pr_obj. value is dictionary of 'import_policy': [<strin1>, <string2>], 'policies' : [Abstractcfg.PolicyParameters( name, comments, import_targe...
import pprint import re # noqa: F401 import six class WorkflowSummary(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict)...
%s" % str(ft) for e in ft: if keypoint (e[0], e[1]) inside the homography of the rectangle of the frame then the keypoint is in reduced_feature_set """ return (vis, inputFrame, refFrame, status) ############################################################################### #######################################...
#!/usr/bin/env python3 # Copyright 2018 <NAME> <<EMAIL>> # 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 # # U...
array of primary key attribute values that define specific items in the table. * ``ProjectionExpression`` - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result. * ``ConsistentRead`` - The con...
# # Log-likelihood functions # # This file is part of PINTS (https://github.com/pints-team/pints/) which is # released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # from __future__ import absolute_import, division from __future__ import print_function, un...
= degree of polynomial to differentiate t sigma = standard deviation of gaussian smoother only applies if time_diff = 'FDconv' default = 2 Output: ut = column vector of length u.size R = matrix with ((D+1)*(P+1)) of column, each as large as ut rhs_description = description of what each column in R is """ n, m...
1, 1) self.txt_scale = QtGui.QLineEdit(self.tab_interactive) self.txt_scale.setEnabled(False) self.txt_scale.setAcceptDrops(False) self.txt_scale.setToolTip(_fromUtf8("")) self.txt_scale.setReadOnly(True) self.txt_scale.setObjectName(_fromUtf8("txt_scale")) self.gridLayout_21.addWidget(self.txt_scale, 1, ...
<gh_stars>0 """ POVM operator """ import logging from typing import List, Optional, Tuple, Union from copy import deepcopy from qiskit.quantum_info import Pauli from qiskit import QuantumRegister, ClassicalRegister from qiskit.aqua.operators.legacy import WeightedPauliOperator from qiskit.aqua import AquaError impor...
any entropy pkg.flash(VF=0, P=1E5, zs=m.zs) S1 = pkg.entropy_Cpg_Hvap() T = pkg.T pkg.flash(T=T, P=2E5, zs=m.zs) S2 = pkg.entropy_Cpg_Hvap() assert_allclose(S1-S2, 0) @pytest.mark.deprecated def test_IdealCaloric_enthalpy_Cpl_Cpg_Hvap_binary_Tc_ref(): w = Chemical('water') MeOH = Chemical('methanol') m = Mi...
access to the django admin to all users self.is_staff = True if not using: using = getattr(self, "_state", None) if using: using = using.db else: from .middleware import _thread_locals using = getattr(_thread_locals, "database", DEFAULT_DB_ALIAS) scenarios = [ i["name"] for i in Scenario.objects.using(DEFA...
# MIT License # # Copyright (c) 2018 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publi...
import math import warnings import numpy as np from scipy import stats from statsmodels.tsa import stattools from scipy.interpolate import interp1d from scipy.stats import chi2 from .Base import Base from .features.irregular_autoregressive import IAR_phi, CIAR_phiR_beta from .features.structure_function import SF_...
<reponame>rts-rob/serverless-application-model # Help resolve intrinsic functions from samtranslator.intrinsics.actions import Action, SubAction, RefAction, GetAttAction # All intrinsics are supported by default DEFAULT_SUPPORTED_INTRINSICS = {action.intrinsic_name: action() for action in [RefAction, SubAction, GetAt...
The default is the global variable number_of_circle_facets. .. figure:: ../examples/images/example_cone1_128.png :target: ../examples/images/example_cone1_512.png .. literalinclude:: ../examples/example_cone1.py :lines: 10 """ sizes = vector( radius1, radius2, height ) # see remark in circle if facet...
if sesiones_hora.count() > 0: # info_dia['sesiones_dia'].append(sesiones_hora) # sesiones.append(info_dia) # html = render_to_string('horario_ge_content.html', # {'horas_ge': horas_ge, 'sesiones': sesiones, 'gauser_extra': ge, # 'request': request}) # return JsonResponse({'ok': True, 'html': html}) try: horario...
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2018, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <<EMAIL>> <<EMAIL>> import re import os import math import time import warnings import threading from collections import Iterable from ..core.comm import SerialPort, Socket...
# # Attempting to make a simple editor for micropython # ''' Feature set working: if key == 0: # move to begin of line if key == $: # move to end of line if key == ESC: # command mode from insert,append, etc... if key == ':': # os command: e w q if key == '.': # repeat last edit command - not navigation, not sear...
import math import uuid import re import copy from jumpscale.loader import j from jumpscale.sals.reservation_chatflow import deployer from jumpscale.sals.reservation_chatflow.deployer import DeploymentFailed from .base_component import VDCBaseComponent from .scheduler import CapacityChecker, Scheduler from .size impor...
print("Fixed for initial search:", rid, "flux_opt ", flux_opt_rid, "value", fixed_flux, flux_lower, flux_upper, "interation", i) initial_state_flag = 0 for job_n in range(job_number): state, flux_opt = self.generate_initial_states( initial_search_repeats_in_grid_search, 1, template=flux, method="parallel") ...
<filename>tfttemplates.py #!/usr/bin/python ################################################################################## # IMPORTS ################################################################################## import tftmenu from tftutility import * ####################################################...
namespace_='', name_='AAChar', fromsubclass_=False): for meta_ in self.get_meta(): meta_.export(outfile, level, namespace_, name_='meta') def hasContent_(self): if ( self.meta or super(AAChar, self).hasContent_() ): return True else: return False def exportLiteral(self, outfile, level, name_='AAChar'): leve...
import os import sys import copy #import fcntl import pty import threading import subprocess from lxml import etree try: # py2.x from urllib import pathname2url from urllib import url2pathname from urllib import quote pass except ImportError: # py3.x from urllib.request import pathname2url from urllib.reques...
in range(x1, x2+1): for y in range(y1, y2+1): if self.moveMap[x, y] > 0: rtMap[x, y] = rtMap[x, y] | msk for x in range(self.n_row+1): for y in range(self.n_row+1): if (self.moveMap[x, y] > 0) and (rtMap[x, y] == 0): rtMap[x, y] = 1 << _get_pred_room_tp_id('outdoor') def _find_components(self, x1, y1, x2, y2,...
<filename>predict.py from myutils import * import numpy as np from time import * from pcheck import * import sys from copy import * def filter_data(F, R, variants): m = len(F) n = len(F[0]) F1 = [[zero for _ in range(len(F[0]))] for _ in range(len(F))] R1 = [[zero for _ in range(len(R[0]))] for _ in range(len(R))...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.358082, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
plate, '', ['Peptide_1', 'Peptide_2'], 1.5, 3.5 ) self.assertEqual(exp_readings, obs_readings) def test_highlight_outliers(self): """ Tests highlight_outliers in parse_array_data.py """ print('Testing highlight_outliers') input_dfs = {1: pd.DataFrame({}), 2: pd.DataFrame({'1': [1.0, 2.0, 13.0], '2': [np.n...
`target`, which is typically in another store. Return the number of files copied (0 or 1). The `target` specifies the name corresponding the the name of `self`. If `target` is an existing directory, a `FileExistsError` is raised. A copy is not placed *into* the target directory. This behavior differs from the L...
> 0: scanrefer_val_new.append(scanrefer_val_new_scene) scanrefer_val_new_scene = [] if len(scanrefer_val_new_scene) >= args.lang_num_max: scanrefer_val_new.append(scanrefer_val_new_scene) scanrefer_val_new_scene = [] scanrefer_val_new_scene.append(data) if len(scanrefer_val_new_scene) > 0: scanrefer_val_new.app...
<gh_stars>1-10 import argparse, time, logging, os, math, random os.environ["MXNET_USE_OPERATOR_TUNING"] = "0" import numpy as np from scipy import stats import mxnet as mx from mxnet import gluon, nd from mxnet import autograd as ag from mxnet.gluon import nn from mxnet.gluon.data.vision import transforms from gluon...
<gh_stars>10-100 from __future__ import print_function import contextlib from future.moves import collections from llvmlite import ir # Emitting code from the AST # ========================== # # The LLVM code for the program is emitted after the program has been fully # parsed. This is required because B functions m...
# -*- coding: utf-8 -*- """ =============== NIMS =============== * deals with reading in NIMS DATA.BIN files This is a translation from Matlab codes written and edited by: * <NAME> * <NAME> * <NAME> * Possibly others. I've tested it against a version, and it matches. The data/GPS gaps I still don't underst...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # General imports. import numpy as np from warnings import warn from scipy.integrate import AccuracyWarning from scipy.sparse import find, diags, identity, csr_matrix from scipy.sparse.linalg import spsolve from scipy.interpolate import interp1d, RectBivariateSpline # Pl...
<reponame>yuishihara/chainer-bear<filename>bear.py import numpy as np import pathlib import logging import chainer import chainer.functions as F from chainer import optimizers from chainer.dataset import concat_examples class OptimizableLagrangeMultiplier(chainer.Chain): def __init__(self, initial_value=None): s...
<gh_stars>0 # -*- coding: utf-8 ; test-case-name: bridgedb.test.test_Bridges -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: see AUTHORS file # :copyright: (c) 2007-2014, The Tor Project, Inc. # :license: 3-Clause BSD, see LICENSE for licensing information """This module has low-...
Test that an invalid refit param raises appropriate error messages for refit in ["", 5, True, 'recall', 'accuracy']: assert_raise_message(ValueError, "For multi-metric scoring, the " "parameter refit must be set to a scorer key", GridSearchCV(clf, {}, refit=refit, scoring={'acc': 'accuracy', 'prec': 'precision'} ...
<reponame>hsph-qbrc/mev-backend<gh_stars>0 import os import logging import uuid from django.conf import settings from rest_framework import generics from rest_framework import permissions as framework_permissions from rest_framework.views import APIView from rest_framework.response import Response from rest_framework...
from re import X import cv2 import core.utils as utils import matplotlib.pyplot as plt import math import numpy as np import tensorflow as tf import time from absl import app, flags, logging from absl.flags import FLAGS from core.config import cfg from core.yolov4 import filter_boxes from PIL import Image from tensorf...
#!/usr/bin/python2 # # Copyright 2008 <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 la...
<filename>reprohack_hub/models.py """ ReproHack Venue, Event, Author, Paper and Review models. Todo: * Check if default submission_date for Event and Paper is redundant. """ from datetime import datetime, timedelta from typing import Any, Tuple, Dict from django.contrib.auth import get_user_model from django.db.mod...
<reponame>JackMcCubbineGA/GeodePy #!/usr/bin/env python3 """ Geoscience Australia - Python Geodesy Package Constants Module """ from math import sqrt from datetime import date c_vac = 299792.458 k_0 = 0.9996 # Ellipsoid Constants class Ellipsoid(object): def __init__(self, semimaj, inversef): self.semimaj = semi...
<gh_stars>1-10 #!/usr/bin/env python # # DataPipeline - A data import and fitting tool # Copyright (C) 2011 <NAME> # # 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 version 3 of the Licen...
<reponame>carneirofc/lnls """library to read rotation coil data and create excitation data file.""" import os as _os import numpy as _np from siriuspy import envars as _envars from siriuspy import util as _util from siriuspy.magnet import util as _mutil from siriuspy.ramp import util as _rutil from matplotlib import ...
remove why offline') if self.debuggeofence: self.newlogger.info(u"{0:=^160}".format("")) self.newlogger.debug(u'Offline Device:' + unicode(iDevUniqueName) + u' is OFFLINE and within Geofence:' + unicode(igeoName) + u' .Dont remove why offline') self.newlogger.info(u"{0:=^160}".format("")) iDevGeoInRange = 'true' ...
from abc import ABCMeta, abstractmethod import numpy as np from numba import njit, vectorize, float64, int64 from sstcam_simulation import Photoelectrons from scipy.spatial import cKDTree as KDTree from scipy.stats import norm __all__ = [ "single_gaussian", "sipm_gentile_spe", "SPESpectrum", "SiPMGentileSPE", "Si...
TABLE_INVENTORY, TABLE_OPERATIONS, TABLE_TRANSACTIONS_VIEW] table = tables[current.get_current_value()] self.load_table(table) def reload_search(self, refilter=True): query_functions = { TABLE_COMPANIES: self.db.query_companies, TABLE_INVENTORY: self.db.query_inventory, TABLE_OPERATIONS: self.db.query_operat...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import z3 chars = [z3.Int('c%d' % i) for i in range(50)] solver = z3.Solver() for c in chars: solver.add(z3.And(c >= 0x0, c <= 0xff)) solver.add(chars[0] == ord('V')) solver.add(chars[1] == ord('o')) solver.add(chars[2] == ord('l')) solver.add(chars[3] == ord('g')) sol...
#!/usr/bin/env python3 import fnmatch import io import json import logging import re import sys import os import glob import struct import zlib from collections import defaultdict from hashlib import sha256 import click import coin_info from coindef import CoinDef try: import termcolor except ImportError: termcolo...
13:00:00"): _, cycle = self.generator.generate_cycle(wf) self.assertEqual(cycle.start_date, datetime.date(2015, 9, 15)) self.assertEqual(cycle.end_date, datetime.date(2015, 9, 15)) _, cycle = self.generator.generate_cycle(wf) _, cycle = self.generator.generate_cycle(wf) self.assertEqual(cycle.start_date, datet...
import math import cv2 as cv import numpy as np class ImageProcessor: """Class for image processing. Attributes: """ def __init__(self, fp=None): """Initialize image process class. Args: fp (str) : File path to the image. """ if fp is not None: self.load_img(fp) else: self.img = None self.processed_...
int pitchadj)") del_items(0x800907A8) SetType(0x800907A8, "void AS_CallBack0__Fi(int handle)") del_items(0x800907BC) SetType(0x800907BC, "void AS_CallBack1__Fi(int handle)") del_items(0x800907D0) SetType(0x800907D0, "void AS_WasLastBlock__FiP6STRHDRP6SFXHDR(int ah, struct STRHDR *sh, struct SFXHDR *sfh)") del_items(0x8...
<reponame>rhan1498/marine-integrations<gh_stars>0 """ @package mi.instrument.satlantic.suna_deep.ooicore.test.test_driver @file marine-integrations/mi/instrument/satlantic/suna_deep/ooicore/driver.py @author <NAME> @brief Test cases for ooicore driver USAGE: Make tests verbose and provide stdout * From the IDK $ bi...
######################################################################################## # Domoticz Tuya Smart Plug Python Plugin # # # # MIT License # # # # Copyright (c) 2018 tixi # # # # Permission is hereby granted, free of charge, to any person obtaining a copy # # of this software and associated documentation fil...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-21 03:24 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def create_card_set_seed_data(apps, schema_editor): CardSet = apps.get_model("cards", "CardSet") CardSet.objects.using(schema_e...
<filename>src/amuse/ic/_limepy/limepy.py<gh_stars>100-1000 # -*- coding: utf-8 -*- import numpy import scipy from scipy.interpolate import BPoly, interp1d, UnivariateSpline from numpy import exp, sqrt, pi, sin, cos, log10 from scipy.special import gamma, gammainc, hyp1f1 from scipy.integrate import ode, simps, quad fr...
the set of pods is running """ def __init__(__self__, *, topology_key: str, label_selector: Optional['outputs.IBMBlockCSISpecControllerAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector'] = None, namespaces: Optional[Sequence[str]] = None): """ Defines a set of pods (namely those ...
import extinction import astropy.io.ascii as ascii import numpy as np f=extinction.Fitzpatrick99(1.766) A_lamda=f(np.array([4400,5400,6500,8100]),1.06) mwdust=[0.123, 0.095, 0.076, 0.055] bandlist = ['B', 'V', 'R', 'I']#,'g','r','i']#, 'J', 'H', 'K'] incat1=incat[incat['DET']=='Y'] # use data detected only Rcat=incat...
<reponame>Sina-Mehdiz/Bioptim import pytest from casadi import DM, Function import numpy as np import biorbd from bioptim import ( OptimalControlProgram, DynamicsList, DynamicsFcn, Bounds, InitialGuess, Objective, ObjectiveFcn, Axis, ConstraintFcn, Constraint, Node, ) from bioptim.interfaces.ipopt_interface...
from django.http import HttpResponse #JsonResponse from django.contrib import messages from django.shortcuts import render, redirect, get_object_or_404 from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.views import generic from django.db.models import Avg from datetime import dat...
self.exportAttributes(outfile, level, already_processed, namespaceprefix_, name_='Message') if self.hasContent_(): outfile.write('>%s' % (eol_, )) self.exportChildren(outfile, level + 1, namespaceprefix_='', name_='Message', pretty_print=pretty_print) showIndent(outfile, level, pretty_print) outfile.write('</%s%s>...
import dataclasses from functools import lru_cache import jax.numpy as jnp import numpy as np import scipy.sparse as sp from .typing import Size, Size3, Spacing, Optional, List, Union, Dict, Op, Tuple from .utils import curl_fn, yee_avg, fix_dataclass_init_docs, Box try: DPHOX_IMPORTED = True from dphox.pattern im...
-0.77955255265301, -0.88237984073213], [-0.47942955477061, -0.76829026258645, -0.87784903872726], [-0.28327162633948, -0.76310720981260, -0.87584012489183], [-0.07778103895609, -0.76310720981260, -0.87584012489183], [0.12556885608432, -0.76829026258645, -0.87784903872726], [0.31669594286504, -0.77955255265301, -0....
<filename>src/SuperDuperMetroid/SM_Constants.py # This file will hold data specific to Super Metroid which both the patcher and the interface use. # This file only holds constants - any data specific to a given patch or version is not present. class SuperMetroidConstants: # Dictionary of locations by their in-game b...
<reponame>rjones30/cvmfs-singularity-sync # MIT License # # Copyright (c) 2017 <NAME> (mumblepins) # # 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 lim...
<gh_stars>10-100 # stdlib import logging import sys import json import re from pathlib import Path from typing import Tuple, List, Optional, DefaultDict, Dict, Union from collections import defaultdict from timeit import default_timer as timer # 3rd party import numpy as np from qtpy import QtWidgets, QtGui, QtCore, Q...
comparison which will always return a # "True" value (i.e. a BinaryClause...) return col in util.Set(self) class FromClause(Selectable): """Represent an element that can be used within the ``FROM`` clause of a ``SELECT`` statement. """ def __init__(self, name=None): self.name = name def _get_from_objects(sel...
self.warr_a or warr_match is warr: warr_match = warr_match.copy() return warr_match def gethints_all(self, iword, warr=None): """Try a word (int array) against entire vocabulary. Parameters: - iword: int array (5,) representing a trial word. - warr: vocabulary array (n, 5) to test against; default all. Ret...
from __future__ import division import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import matplotlib.ticker as mticker import gsd import gsd.fl import numpy as np import os import sys import datetime import time import pickle from shutil import copyfile import inspect import md_tools...
<filename>IM_test_zhou_alexnet.py ## script to get data from Zhou's version of AlexNet using imagenet input data ## thingys we need import csv import os import sys from collections import OrderedDict import Automation_experimental_functions as A from Make_activation import combine_h5_files_in_activation_table from h5...
<filename>sfrmaker/preprocessing.py import os from pathlib import Path import shutil import yaml import textwrap import affine import numpy as np import pandas as pd import xarray as xr import geopandas as gpd import fiona import rasterio from shapely.geometry import shape, MultiLineString, box from rasterstats import ...
'Shanwei, Guangdong', 'zh': u('\u5e7f\u4e1c\u7701\u6c55\u5c3e\u5e02')}, '86181380':{'en': 'Jiangmen, Guangdong', 'zh': u('\u5e7f\u4e1c\u7701\u6c5f\u95e8\u5e02')}, '86181383':{'en': '<NAME>', 'zh': u('\u5e7f\u4e1c\u7701\u4f5b\u5c71\u5e02')}, '86181382':{'en': '<NAME>', 'zh': u('\u5e7f\u4e1c\u7701\u6df1\u5733\u5e02')}...
<reponame>Samuel-Buteau/universal-battery-database import numpy from django.core.management.base import BaseCommand from cycling.neware_processing_functions import * from cell_database.models import * from Key import Key def get_dry_cell_metadata(cell_id): """ TODO(harvey) Args: cell_id: TODO(harvey) Returns: TO...
string is then an unambiguous EOF indication. It ' 'is also\n' ' possible (in cases where it might matter, for example, ' 'if you want\n' ' to make an exact copy of a file while scanning its ' 'lines) to tell\n' ' whether the last line of a file ended in a newline or ' 'not (yes\n' ' this happens!).\n',...
library path for the SECREAD command. APDL Command: /SECLIB Parameters ---------- option READ READ - Sets the read path (default). STATUS - Reports the current section library path setting to the Jobname.LOG file. path Defines the directory path from which to read section library files. Notes ----- W...
<gh_stars>0 #!/usr/bin/env python # encoding=utf-8 # # lock_tests.py: testing versioned properties # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation...
self.ne0_sp(self.psi_on_grid) self.ni0_on_grid = self.ni0_sp(self.psi_on_grid) #ne fluctuations on 3D grid if(not self.Equilibrium_Only): self.dne_ad_on_grid = np.zeros((self.n_cross_section,len(self.time_steps),r3D.shape[0],r3D.shape[1],r3D.shape[2])) if self.HaveElectron: self.nane_on_grid = np.zeros(self.dn...
<reponame>gregorjerse/resolwe-bio<gh_stars>0 from pathlib import Path from guardian.shortcuts import assign_perm from resolwe.flow.models import Data, Entity, Relation, RelationPartition, RelationType from resolwe.test import tag_process, with_resolwe_host from resolwe_bio.utils.test import KBBioProcessTestCase cl...
st = self.parent.parent.parent.st MainPanel = self.parent.parent.parent.MainPanel MainPanel.ListBox.st = st.LISTBOX MainPanel.PlayBox.st = st.PLAYBOX MainPanel.SetBackgroundColour((0, 0, 0)) MainPanel.ListBox.SetBackgroundColour(st.LISTBOX.LIST_BG_COLOR) MainPanel.ListBox.List.SetBackgroundColour(st.LISTBOX.LIST_...
<gh_stars>0 # # Copyright (c) 2019 UAVCAN Development Team # This software is distributed under the terms of the MIT License. # Author: <NAME> <<EMAIL>> # from __future__ import annotations import enum import typing import logging import pyuavcan from ._frame import Frame from ._common import TransferCRC _logger = l...
<filename>lom/auxiliary_functions.py #!/usr/bin/env python """ LOM Various auxiliary functions """ import numpy as np import sys import tempfile import sklearn import itertools from lom._numba import lambda_updates_numba # import lom._cython.matrix_updates as cf from numpy.random import binomial from numba import jit...
[] im = self.cached_length_maps()[1] for proper_param, dt_normal, tev in zip(pts, dt_normals, tevs): param = im(proper_param) stab_calc = self.get_stability_calc_obj(param) xi_A_up.append(stab_calc.xi_vector(dt_normal, tev, up=True, r_hat=r_hat)) if full_output: xi_A.append(stab_calc.xi_vector(dt_normal, tev, u...
f.get_arcs(): for v in a.get_vertices(): lut[v.get_id()] = True # Add arcs whose points have not been added before arcs = list() for f in self.__filaments: for a in f.get_arcs(): count = 0 for v in a.get_vertices(): if lut[v.get_id()]: count += 1 if a.get_nvertices() > count: arcs.append(a) return arcs ...
= Button(description='total', disabled=True, layout=name_button_layout) name_btn.style.button_color = 'lightgreen' self.float603 = FloatText(value='1767', step='100', style=style, layout=widget_layout) units_btn = Button(description='1/min', disabled=True, layout=name_button_layout) units_btn.style.button_color = '...
""" return len(self.profiles) > 0 @property def notebooks(self): """ Get a list of all non-skipped notebooks. If you want all notebooks, including the skipped ones, use all_notebooks. :return: a list of NotebookData objects """ return [n for n in self._notebooks if not n.skip] @notebooks.setter def notebo...
from trp.t_pipeline import add_page_orientation, order_blocks_by_geo from typing import List from trp.t_pipeline import add_page_orientation, order_blocks_by_geo, pipeline_merge_tables, add_kv_ocr_confidence from trp.t_tables import MergeOptions, HeaderFooterType import trp.trp2 as t2 import trp as t1 import json impor...
<gh_stars>0 import os import json import numpy as np from naming_conventions import languages, languages_readable from uriel import Similarities import uriel import copy import pickle from collections import defaultdict import matplotlib.pyplot as plt from scipy import stats from matplotlib import colors import seab...
import numpy as np import pandas as pd import indicators import config import util import sys from pathlib import Path def get_algo_dataset(choose_set_num: int): """run_set = ['goldman', 'index', '^BVSP', '^TWII', '^IXIC', 'index_sampled'] Returns df_list, date_range, trend_list, stocks """ # Do not change run_set...
<reponame>turiphro/dockerfiles<filename>devbox/etc/.vim/bundle/jedi-vim/jedi/jedi/evaluate/imports.py """ :mod:`jedi.evaluate.imports` is here to resolve import statements and return the modules/classes/functions/whatever, which they stand for. However there's not any actual importing done. This module is about finding...
"privateIPAllocationMethod": "Dynamic", "provisioningState": "Succeeded", "publicIPAddress": { "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup/providers/Microsoft.Network/publicIPAddresses/testvm10_PIP01", "name": "testvm10_PIP01", "properties": { "idleTimeoutInMinutes": 4...
): # Update the list of recent ISOs in the settings object and settings file. settings.remove_option( 'Recent Files', pathToMostRecentISO.replace(':', '|') ) with open( settingsFile, 'w') as theSettingsFile: settings.write( theSettingsFile ) return # Scroll to the appropriate section, if any ...