input
stringlengths
2.65k
237k
output
stringclasses
1 value
weekly recurrence. """ return pulumi.get(self, "weekly_recurrence") @weekly_recurrence.setter def weekly_recurrence(self, value: Optional[pulumi.Input['WeekDetailsArgs']]): pulumi.set(self, "weekly_recurrence", value) @pulumi.input_type class SharedPublicIpAddressConfigurationArgs: def __init__(__self__, *, i...
<gh_stars>1-10 from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from keras import backend, constraints, initializers, layers, models, regularizers from keras.backend import convert_inputs_if_ragged, maybe_convert_to_ragged from keras.u...
#!/usr/bin/env python from Errors import NoncriticalError, CriticalError import sys import numpy import libsbml import warnings import misc import math import sympy sbo_type2id = {'activator': 21, 'inhibitor': 20, 'enzyme': 14} TIME_VARIABLE = 'SBML_MCA_TIME_VARIABLE' MAX_MODEL_SIZE = 2500 class Model: def __in...
occurrence base is a single document. privates = {w for (w, base) in occurrenceBase.items() if len(base) == 1} len(privates) # ### Peculiarity of documents # # As a final exercise with words, lets make a list of all documents, and show their # # * total number of words # * number of private words # * the percentage o...
index text_4.tStart = t # local t and not account for scr refresh text_4.tStartRefresh = tThisFlipGlobal # on global time win.timeOnFlip(text_4, 'tStartRefresh') # time at next scr refresh text_4.setAutoDraw(True) if text_4.status == STARTED: # is it time to stop? (based on global clock, using actual start) if t...
person_plugin_wrapper(*args, **kwargs): person = person_from_environ(request.environ) if person is None or person.uname is None: log(f'person is None') return page('error', summary = 'authentication failure', message = f'Unrecognized user identity.') if 'person' in inspect.getfullargspec(route.callback)[0]: kwar...
string + WS + leading text Shouldn't gobble""" self.verify(" -- #attr $test = 'blarg' \n$test", " -- \nblarg") class DefDirective(OutputTest): def test1(self): """#def without argstring""" self.verify("#def testMeth\n1234\n#end def\n$testMeth", "1234\n") self.verify("#def testMeth ## comment\n1234\n#end def...
<gh_stars>0 #!/usr/bin/env python """Train a simple deep CNN on the CIFAR10 small images dataset. GPU run command with Theano backend (with TensorFlow, the GPU is automatically used): THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatx=float32 python cifar10_cnn.py It gets down to 0.65 test logloss in 25 epochs, and down t...
import os from itertools import chain from statistics import mean import numpy as np import pandas as pd import torch from torch.utils.data import TensorDataset class ThymioState: """ Object containing all the agent information :param state_dict """ def __init__(self, state_dict): for k, v in state_dict.items(...
ordinary function/method templated function/method # go through child elements, collecting ordinary args and possibly template params template_params_list = [] # list of tuple, e.g. [('typename', 'T', ''), ('void (*)()', 'F', ''), ('int', 'N', '0')] template_params_repr_list = [] # list of str, e.g. ['typename T', '...
many problems # if (only_scope is not None): new_scope = phil_object.get(only_scope) scope_master = self.master_phil.get(only_scope) fetched_scope = scope_master.fetch(source=new_scope) #fetched_scope.show() find_and_replace_scope( current_phil=self.working_phil, new_scope=fetched_scope, scope_name=only_scope)...
JOIN (SELECT SVR_IP, SVR_PORT, VALUE1, VALUE2, GMT_CREATE FROM OCEANBASE.__ALL_SERVER_EVENT_HISTORY WHERE EVENT = 'minor merge finish' AND (EFFECTIVE_TENANT_ID() = 1 OR VALUE1 = EFFECTIVE_TENANT_ID())) B ON A.SVR_IP = B.SVR_IP AND A.SVR_PORT = B.SVR_PORT AND A.VALUE1 = B.VALUE1 AND A.VALUE2 = B.VALUE2 ORD...
#!/usr/bin/env python #pylint: disable=C0103 """ This module provides business object class to interact with File. """ from __future__ import print_function from WMCore.DAOFactory import DAOFactory from dbs.utils.dbsExceptionHandler import dbsExceptionHandler from sqlalchemy.exc import IntegrityError as SQLAlchemyInteg...
"""The WaveBlocks Project Compute some observables like norm, kinetic and potential energy of Hagedorn wavepackets. This class implements the mixed case where the bra does not equal the ket. @author: <NAME> @copyright: Copyright (C) 2014, 2016 <NAME> @license: Modified BSD License """ from functools import partial f...
import copy import gc import pickle import sys import unittest import warnings import weakref import inspect import types from test import support _testcapi = support.import_module('_testcapi') # This tests to make sure that if a SIGINT arrives just before we send into a # yield from chain, the KeyboardInterrupt is...
frame must be None' # Check sizing total_title_height = self._frame_title.get_height(apply_padding=False) assert button.get_height() <= total_title_height, \ f'{button.get_class_id()} height ({button.get_height()}) must be lower' \ f' than frame title height ({total_title_height})' # Add frame to button kwargs ...
column + '_months' days = column + '_days' # Date time to unix timestamp for feature in include_columns: df_copy[feature] = pd.to_datetime( df_copy[feature], infer_datetime_format=True, errors='coerce') try: df_copy[feature] = df_copy[feature].dt.tz_localize(None) except: pass # calculate diffs timeDiffs =...
<gh_stars>1-10 """ Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 <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 limitat...
obj_dict.items(): piv_pos += cmds.xform(vtx, q=True, t=True, ws=True) piv_pos = self.get_piv_pos(piv_pos) #print 'Pivot COG :', piv_pos if sid == 0 or sid ==4: cmds.scale(add_scale[0], add_scale[1], add_scale[2], r=True, ws=True, p=piv_pos, smn=sym) if sid == 1 or sid == 2 or sid == 5: cmds.scale(add_scale[0], a...
try: deployment = client.deployments.create( blueprint_id, deployment_id, inputs=inputs, visibility=visibility, skip_plugins_validation=skip_plugins_validation, site_name=site_name, runtime_only_evaluation=runtime_only_evaluation, labels=labels, display_name=display_name ) except (MissingRequiredDeploymentI...
des): lines = self.lines handled = True # Create map to es2 function objects es2funcs = {} for f in des.es2.group: cname = f.shortname es2funcs[cname] = f if des.name == 'uniform': for t in ('float', 'int'): for i in (1,2,3,4): args = ', '.join(['v%i'%j for j in range(1,i+1)]) cname = 'uniform%i%s' % (i...
<gh_stars>1-10 #!python # set PYSPARK_DRIVER_PYTHON=python # set PYSPARK_DRIVER_PYTHON_OPTS= # spark-submit --master local[7] --deploy-mode client SectionPerfTest.py import gc import scipy.stats, numpy import time import random from LinearRegression import linear_regression from pyspark.sql import SparkSession from pys...
""" Link: https://github.com/honglianghe/CDNet/blob/f436555539e140ff8bafa3c9f54cbc2550b7cebd/my_transforms.py Author: <NAME> """ import torch import random from PIL import Image, ImageOps, ImageEnhance, ImageFilter import numpy as np import numbers import collections from skimage import morphology import SimpleITK ...
def enterUnbound_type121_name(self, ctx): pass # Exit a parse tree produced by CSharp4Parser#unbound_type121_name. def exitUnbound_type121_name(self, ctx): pass # Enter a parse tree produced by CSharp4Parser#generic_dimension_specifier. def enterGeneric_dimension_specifier(self, ctx): pass # Exit a parse tr...
Z[zn] = fsxn.to_standard(Z_xr[zn]) if dzndc != -1: P_deriv = P.deriv() deriv_scale = dx_xr[0] / kc[0] Z[dzndc] = fsxn.to_standard( P_deriv.__call__(c_scaled) * deriv_scale ) if (dzndz != -1): Z[dzndz] = 1. return numba_init_impl # Defines iterate via a function factory - jitted implementation def numba_ite...
import numpy as np import ast import sys import json from auxiliary_functions import SampleListToArray import matplotlib from matplotlib import rc rc('text', usetex=True) rc('font', **{'family': 'serif', 'serif': ['Computer Modern']}) matplotlib.rc('xtick', labelsize=30) matplotlib.rc('ytick', labelsize=30) import ...
import random import numpy from matplotlib import pyplot as plt ''' INPUT VARIABLES n: the number of active devices in the network id_length: if given, all the binary id strings will be in certain length. ''' def initialiseIDs(): ''' Given parameters n(the number of active devices in the network) and id_length(The ...
from __future__ import division import os from collections import OrderedDict from future.utils import iteritems import numpy as np import scipy.stats from scipy.integrate import cumtrapz from scipy.interpolate import interp1d from scipy.special import erf, erfinv # Keep import bilby statement, it is necessary for s...
backColor[2] pointColor = alpha + pointColor[0] * 256 * 256 + pointColor[1] * 256 \ + pointColor[2] # Make a call to the API, and save the result in a variable. r = etapi.PerformCalibration(ctypes.c_int32(noPoints), \ ctypes.c_int32(location), ctypes.c_bool(randomizePoints), \ ctypes.c_bool(slowMode), ctypes.c_...
for gathering data. If None, there is no limit. Returns ------- None """ #Note: same beginning as gather_slices (TODO: consolidate?) if comm is None: return # no gathering needed! #Perform broadcasts for each slice in order my_rank = comm.Get_rank() arIndx = [slice(None, None)] * arToFill.ndim arIndx[0:len...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # quick script for installing tap # ## import subprocess,re,os,shutil,sys import base64 from src.core.tapcore import ssh_keygen from src.core.tapcore import motd from src.core.tapcore import set_background import getpass import sys try: import pexpect except ImportError...
<reponame>camUrban/PteraSoftware """This module contains vortex class definitions, and useful aerodynamic functions. This module contains the following classes: LineVortex: This class is used to contain line vortices. HorseshoeVortex: This class is used to contain horseshoe vortices. RingVortex: This class is use...
Error on the observed nuv-u colour of a galaxy :age: Observed age of a galaxy, often calculated from the redshift i.e. at z=0.1 the age ~ 12.5. Must be in units of Gyr. :get_c_one: Function to return one colour prediction, maybe predict_c_one if not using lookup table, and lookup_col_one if using a lookup table ...
monitored > four times per day nrow += 1 cell = self._merge_cells(table, nrow, 0, nrow + 1, 0) text = 'Blood Glucose Level (BGL) monitored > four times per day' self._add_column_name(cell, text, alignment='left', bold=True) columns = [ 'Day of admission', 'Day two of admission', ] self._insert_subrows(table=t...
self.dropout1 = nn.Dropout(dropout) self.dropout2 = nn.Dropout(dropout) self.activation = _get_activation_fn(activation) self.normalize_before = normalize_before def with_pos_embed(self, tensor, pos: Optional[Tensor]): return tensor if pos is None else tensor + pos def forward_post(self, src, src_mask: Optio...
#!/usr/bin/env python # # analyse_solid_run.py: analyse and report on SOLiD sequencer runs # Copyright (C) University of Manchester 2011-12,2019 <NAME> # ######################################################################## # # analyse_solid_run.py # ##################################################################...
from copy import deepcopy from itertools import product # Internal format for formulas: # Each subformula within a formula is a list # For example, (p or ¬p) parses as [['p'], '˅', ['¬',['p']]] # Parser accepts things such as "(if p then q)" and "if p then q" # Unary connectives go out before the formula they apply t...
import pygame, random, math, queue, os from dataclasses import dataclass, field from typing import Any @dataclass(order=True) class PrioritizedItem(): priority: int item: Any=field(compare=False) pygame.init() clock = pygame.time.Clock() size = (600, 600) screen = pygame.display.set_mode(size) #C...
r""" Yangians AUTHORS: - <NAME> (2013-10-08): Initial version """ #***************************************************************************** # Copyright (C) 2013 <NAME> <tc<EMAIL> at <EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
copy : bool, default False Whether to ensure that the returned value is a not a view on another array. Note that ``copy=False`` does not *ensure* that ``to_numpy()`` is no-copy. Rather, ``copy=True`` ensure that a copy is made, even if not strictly necessary. Returns ------- numpy.ndarray See Also -------- ...
def __init__(self, document_data): self.document_data = document_data self.field_paths = [] self.deleted_fields = [] self.server_timestamps = [] self.array_removes = {} self.array_unions = {} self.set_fields = {} self.empty_document = False prefix_path = FieldPath() iterator = self._get_document_iterator(pre...
<gh_stars>0 from abc import ABC, abstractmethod from datetime import datetime, timedelta from enum import Enum import logging import os from os import PathLike from pathlib import Path import sys from textwrap import indent from typing import Iterator, List, Tuple, Union if sys.version_info >= (3, 8): from importlib ...
# flake8: noqa from contextlib import ExitStack import click from omegaconf import OmegaConf from pfb.workers.main import cli import pyscilog pyscilog.init('pfb') log = pyscilog.get_logger('SPIFIT') @cli.command() @click.option('-image', '--image', required=True, help="Path to model or restored image cube.") @click.o...
<reponame>webclinic017/gs-quant """ Copyright 2019 <NAME>. 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...
= ObjectTypeClass self.ObjectType = ObjectType self.ObjectLabel = ObjectLabel self.SlantPlane = SlantPlane self.GroundPlane = GroundPlane self.Size = Size self.Orientation = Orientation if isinstance(Articulation, str): self.Articulation = CompoundCommentType(Value=Articulation) elif isinstance(Articulation,...
<filename>cybox/bindings/network_socket_object.py # Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from mixbox.binding_utils import * from . import cybox_common from . import socket_address_object class SocketOptionsType(GeneratedsSuper): """The Soc...
import click import ast import requests import pandas as pd import numpy as np from pysradb.sraweb import SRAweb import requests import pysam import re import pyfastx import pkg_resources # part of setuptools import json import warnings import sys import os from .run_workflow import make_snakes # Allows passing string...
headers = dingtalkyida__1__0_models.GetPlatformResourceHeaders() return await self.get_platform_resource_with_options_async(request, headers, runtime) def get_platform_resource_with_options( self, request: dingtalkyida__1__0_models.GetPlatformResourceRequest, headers: dingtalkyida__1__0_models.GetPlatformResource...
'%d%d' % (m, i) if is_prime(int(chk)) is False: continue chk = '%d%d' % (i, m) if is_prime(int(chk)) is False: continue chk = '%d%d' % (j, m) if is_prime(int(chk)) is False: continue chk = '%d%d' % (m, j) if is_prime(int(chk)) is False: continue chk = '%d%d' % (k, m) if is_prime(int(chk)) is False: contin...
<gh_stars>0 non_sparse_consts = [ {"algorithm": "zlib", "name": "zinflate_lengthStarts", "size": "L", "array": [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 ]}, {"algorithm": "zlib", "name": "zinflate_lengthExtraBits", "size": "L", "array": ...
<gh_stars>0 # Copyright (c) 2018 NVIDIA Corporation """ RNN-based encoders """ from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import tensorflow as tf from tensorflow.contrib.cudnn_rnn.python.ops import cudnn_rnn_ops from OpenSeq2Seq.open_seq2seq.parts.rnns.uti...
= Var(within=Reals,bounds=(0,45),initialize=0) m.x1877 = Var(within=Reals,bounds=(0,45),initialize=0) m.x1878 = Var(within=Reals,bounds=(0,45),initialize=0) m.x1879 = Var(within=Reals,bounds=(0,45),initialize=0) m.x1880 = Var(within=Reals,bounds=(0,45),initialize=0) m.x1881 = Var(within=Reals,bounds=(0,45),initialize=0...
<reponame>michaelansel/evennia """ Account (OOC) commands. These are stored on the Account object and self.caller is thus always an Account, not an Object/Character. These commands go in the AccountCmdset and are accessible also when puppeting a Character (although with lower priority) These commands use the account_...
the gobbli download directory if it doesn't already exist there. Stream the download to avoid running out of memory. Args: url: URL for the file. filename: If passed, use this as the filename instead of the best-effort one determined from the URL. Returns: The path to the downloaded file. """ if filename is ...
data. """ import torch.nn as nn import torch.nn.functional as F simple_model = nn.Sequential( nn.Conv2d(3, 8, kernel_size=3, stride=1, padding=1), nn.MaxPool2d(2, 2) ) """Refer to [Sylvian's post](https://sgugger.github.io/convolution-in-depth.html) for an explanation of `kernel_size`, `stride` and `padding`. """ ...
<gh_stars>100-1000 import hail as hl from hail.expr.expressions import expr_float64, expr_numeric, analyze from hail.typecheck import typecheck, oneof, sequenceof, nullable from hail.utils import wrap_to_list, new_temp_file @typecheck(weight_expr=expr_float64, ld_score_expr=expr_numeric, chi_sq_exprs=oneof(expr_flo...
block devices that should be detached from the instance. :param destroy_disks: Indicates if disks should be destroyed :param migrate_data: implementation specific params """ raise NotImplementedError() def cleanup(self, context, instance, network_info, block_device_info=None, destroy_disks=True, migrate_data=No...
# -*- coding: utf-8 -*- """ Created on Wed Feb 1, 2017 Updated Mon Oct 22, 2018 @author: <EMAIL> """ import numpy as np import os import EXOSIMS.MissionSim as MissionSim import sympy from sympy.solvers import solve import scipy.integrate as integrate import scipy.interpolate as interpolate import scipy.optimize as op...
= [] for item in armor: if item != {}: item_details = [] item_name = item_name_formatter(item["name"]) rarity = item["rarity"].capitalize() enchants = enchant_formatter(item["attributes"]["enchantments"]) item_details.append(item_name) item_details.append(rarity) item_details.append(enchants) item...
equipment: a list of dictionaries specifying which equipment objects should be constructed activities: list of dictionaries specifying which activities should be performed during the simulation Each of the values the sites and equipment lists, are a dictionary specifying "id", "name", "type" and "properties". Here ...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may ch...
a "*" marker, indicating this is a place where the left # and right pages line up. Get the lowest y coordinate of a change # above this point and the highest y coordinate of a change after # this point. If there's no overlap, we can split the PDF here. try: y1 = max(b["y"]+b["height"] for j, b in enumerate(changes...
-> Tuple[Point, ...]: """Return a tuple of labelled points, in the order they were labelled.""" self._fix_array() return tuple(point for point in self._points if not point.isnan()) def _fix_array(self): """Fix PointArray after nodes have been added or removed. This updates the PointArray as required by comparin...
<gh_stars>10-100 # Copyright 2017 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import itertools import logging import os.path as osp import tempfile from collections import OrderedDict import mmcv import numpy as np import pycocotools from mmcv.utils import print_log from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from mmdet.core...
import cStringIO as StringIO import logging # yes, i know this is evil from spitfire.compiler.ast import * class CodegenError(Exception): pass class CodeNode(object): def __init__(self, src_line=None): self.src_line = src_line self.child_nodes = [] def append_line(self, line): self.append(CodeNode(line)) ...
<gh_stars>100-1000 from __future__ import absolute_import, division, print_function from libtbx.test_utils import show_diff from libtbx import easy_run import sys def run_and_compare(commands, expected_output): def digest(lines): result = [] for line in lines: if (line.strip().startswith("Change of basis: ")): con...
{'заведение': 3}, {'зависимость': 1}, {'идти': 1}, {'иметься': 2}, {'интересный': 1}, {'конкуренция': 1}, {'купить': 4}, {'магазин': 9}, {'мало': 1}, {'менее': 1}, {'место': 1}, {'многие': 1}, {'наиболее': 2}, {'небольшой': 1}, {'новый': 1}, {'определять': 1}, {'отношение': 1}, {'очень': 2}, {'поверит...
""" functions to handle data loading TO DO: data augmentation for xyz coordinates data augmentation by adding gaussian noise """ import numpy as np import copy import tensorflow as tf from collections import Counter from numpy.linalg import norm class Data_Loader: input_mean = None input_std = None output_m...
import sys from basic import * import tcr_distances import parse_tsv import numpy as np from scipy.cluster import hierarchy from scipy.spatial import distance import util import html_colors from all_genes import all_genes with Parser(locals()) as p: #p.str('args').unspecified_default().multiple().required() p.str('...
"""Beam lifetime calculation.""" import os as _os import importlib as _implib from copy import deepcopy as _dcopy import numpy as _np from mathphys.functions import get_namedtuple as _get_namedtuple from mathphys import constants as _cst, units as _u, \ beam_optics as _beam from . import optics as _optics if _impl...
import os import h5py import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler def put_static_first(data, col, static_col): """Simple function putting the static columns first in the data. Args: data: Dict with a data array for each split. col: Ordered list of the columns in the d...
<reponame>djhohnstein/Mythic # -*- coding: utf-8 -*- import peewee as p import datetime from app import mythic_db import app.crypto as crypto import json from uuid import uuid4 def gen_uuid(): return str(uuid4()) class Operator(p.Model): light_config = json.dumps( { "background-color": "white", ...
# -*- coding: utf-8 -*- from collections import Sequence from datetime import datetime try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin # NOQA from xively.models import ( Datapoint, Datastream, Feed, Key, Location, Permission, Resource, Trigger, Unit, Waypoint, ) c...
# if we don't have urls, but the service type contains OGC: .. , download or website, then we have an error # TODO: document if (protocolstxt.find("OGC:") > -1 or protocolstxt.find("download") > -1 or protocolstxt.find("website") > -1) and nrurls == 0: score = 0 # checkid = 6, so the index in the matrix is: 5 resu...
[mRNA_AC,protein_id,protein_seq]; values = string.join(values,'\t')+'\n'; datar.write(values) datad.write(mRNA_AC+'\t'+string.replace(cds_location,'..','\t')+'\n') translated_mRNAs[mRNA_AC]=[] ### Parse new line #>ENST00000400685 cdna:known supercontig::NT_113903:9607:12778:1 gene:ENSG00000215618 t= string.sp...
/ 2 phi["C"] = - np.pi / 2 phi["O"] = - np.pi / 2 # Define init_values # Estimate the mean helix axis... nv_dict = {} for i in xyzs_dict.keys(): nv_dict[i] = estimate_axis(xyzs_dict[i]) nv_array = np.array( [ v for v in nv_dict.values() ] ) nv = np.nanmean(nv_array, axis = 0) nv /= np.linalg.norm(nv) # Calc...
from utils import UtilMethods as Utils from pipeprediction import Extractor, DimensionHandler, Loader import re, os import numpy as np import pandas as pd from sklearn.model_selection import GridSearchCV, train_test_split, StratifiedKFold from sklearn import svm from sklearn.gaussian_process import GaussianProcessClass...
retcode self.signal_message = message return retcode, message # parse process log def load_process_log( self ): Msg.fout( self.process_log, "dbg" ) with open( self.process_log , "r" ) as my_flog: try: for my_line in my_flog: Msg.user("Load: %s" % my_line , "PROCESS-LINE") self.load_process_line( my_line ) ...
<reponame>ZJONSSON/fasteignamat-functions<gh_stars>1-10 # -*- coding: utf-8 -*- #Fasteignamat.py - functions for scraping info from Fasteignamat Íslands (www.skra.is) #For fastanr.: # Returns general info # Return extended info # Returns land info and landnr #For landnr.: # Return geo info from skra.is geoserver + ISN...
60) & (datset_churn['MonthlyCharges'] <= 80 ), 'MonthlyChargesCat'] = 3 datset_churn.loc[(datset_churn['MonthlyCharges'] > 80) & (datset_churn['MonthlyCharges'] <= 100 ), 'MonthlyChargesCat'] = 4 datset_churn.loc[ datset_churn['MonthlyCharges'] > 100, 'MonthlyChargesCat'] = 5 #Checking the categories datset_churn[['Mo...
<reponame>ruby-compiler-survey/pypy import py, os, sys from .support import setup_make currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("datatypesDict.so")) def setup_module(mod): setup_make("datatypesDict.so") class AppTestDATATYPES: spaceconfig = dict(usemodules=['_cppyy', '_rawffi', 'i...
""" Tests the inference module. """ # pylint: disable=protected-access # pylint: disable=invalid-name # pylint: disable=missing-docstring # pylint: disable=too-many-public-methods import unittest from numpy.testing import assert_array_almost_equal import numpy as np from pyugm.factor import DiscreteFactor, Discrete...
None ) : o0OO0O0OO0oO0 = ( "sudo iptables -A POSTROUTING -t mangle -p tcp -j " + "CHECKSUM --checksum-fill; " ) if 9 - 9: oO0o % i11iIiiIii / Oo0Ooo o0OO0O0OO0oO0 += ( "sudo iptables -A POSTROUTING -t mangle -p udp -j " + "CHECKSUM --checksum-fill; " ) if 20 - 20: oO0o * O0 + I11i - OoooooooOO . I11i o0OO0O0OO0oO0...
find the same functionality in tehir python version) # check the new versions of these libraries to see if they added more capabilities # if coords1==coords2: print('same....') t0 = datetime.datetime.now() if job_num==-1: job_num = 0 parallel = False else: parallel = True tqdm_kwargs['position'] = job_num ...
""" The :class:`Structure` object is a collection of atoms in a periodic box. The mandatory inputs are the cell vectors of the box and the chemical species and *Cartesian coordinates* of the atoms. The atoms are automatically folded back into the primary cell, so the input coordinates don't need to lie inside the box. ...
<gh_stars>1-10 #!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2003, 2004 <NAME> # Copyright (C) 2003, 2004 <NAME> # Copyright (C) 2003 - 2005 Michael 'Mickey' Lauer # Copyright (C) 2005 <NAME> # Copyright (C) 2005 ROAD GmbH # Copyright (C...
if r.has_surface(): cr,cg,cb = r.surface_piece.color[:3] #r.color[:3] r.surface_piece.color = ( cr, cg, cb, 1.0 ) r.surface_piece.displayStyle = r.surface_piece.Mesh r.surface_piece.lineThickness = 1.0 def SelectAllRegions ( self ) : smod = self.CurrentSegmentation() if smod == None : return sel_regs = set...
<reponame>marcus-h/python-keyring-keyutils """A high-level interface for reading and writing BER/DER data. Currently, only a few ASN.1 types are supported. This implementation is based on the rules that are specified in X.690 (08/2015). Note: there are probably better BER readers/writers out there - I just wrote this...
<filename>pyfolio/utils.py<gh_stars>0 # # Copyright 2018 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
# -*- coding: utf-8 -*- # Copyright (c) 2015, C0D1G0 B1NAR10 and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.model.mapper import get_mapped_doc from frappe.utils import cint, flt import shuti...
__author__ = "<NAME>" __maintainer__ = "<NAME>" __license__ = "MIT" __version__ = "0.2.5" __status__ = "Prototype" __name__ = "QmlReader" # last edited: 2020-04-16 import lxml from lxml import objectify import logging from qmlReader import questionnaire import re class QmlReader: """ Class for Reading and extract...
""" aav.readers ~~~~~~~~~~~ :copyright: (c) 2018 <NAME> :copyright: (c) 2018 Leiden University Medical Center :license: MIT """ from functools import reduce from math import log10 from typing import Optional, List, Type, Tuple, Set import logging from .variation import (Variant, InfoFieldNumber, InfoField, Genotype, ...
= 0x838F FancyLedB144 = 0x8390 FancyLedB145 = 0x8391 FancyLedB146 = 0x8392 FancyLedB147 = 0x8393 FancyLedB148 = 0x8394 FancyLedB149 = 0x8395 FancyLedB150 = 0x8396 FancyLedB151 = 0x8397 FancyLedB152 = 0x8398 FancyLedB153 = 0x8399 FancyLedB154 = 0x839A FancyLedB155 = 0x839B FancyLedB156 = 0x839C FancyLedB15...
We do a couple sanity checks in here to be sure we can format a valid AdbMessage for our underlying AdbConnection, and then send it. This method can be used to send any message type, and doesn't do any state tracking or acknowledgement checking. Args: command: The command to send, should be one of 'OKAY', 'WRTE',...
facility treatment type dictionary treat_dict = {'raw discharge': 'wastewater_no_treatment', 'primary (45mg/l< bod)': 'wastewater_primary_treatment', 'advanced primary': 'wastewater_advanced_treatment', 'secondary wastewater treatment': 'wastewater_secondary_treatment', 'secondary': 'wastewater_secondary_treatment...
"Huawei CLT-L09", "Huawei CLT-L29", "Huawei CLT-TL00", "Huawei CLT-TL01", "Huawei ANE-LX1", "Huawei ANE-LX2", "Huawei ANE-LX3", "Huawei CLT-L09", "Huawei CLT-L29", "Huawei HW-02L", "Huawei VOG-AL00", "Huawei VOG-AL10", "Huawei VOG-L04", "Huawei VOG-L09", "Huawei VOG-L29", "Huawei VOG-TL00", "Huawei MAR-...
<reponame>ethers/pyethereum import rlp from opcodes import opcodes import utils import time import blocks import transactions import trie import sys import logging import json import time logger = logging.getLogger(__name__) class PBLogger(object): log_pre_state = True # dump storage at account before execution l...
<filename>dit/abstractdist.py """ Abstract implementation of dense random vectors. """ import itertools import numpy as np __all__ = ( 'AbstractDenseDistribution', 'distribution_constraint', 'brute_marginal_array', 'get_abstract_dist', ) class AbstractDenseDistribution(object): """ An abstract, dense distrib...
the module To print customized extra information, you should reimplement this method in your own modules. Both single-line and multi-line strings are acceptable. """ return '' def __repr__(self): # We treat the extra repr like the sub-module, one item per line extra_lines = [] extra_repr = self.extra_repr() ...