input
stringlengths
2.65k
237k
output
stringclasses
1 value
considered as first day of pandemic in given voivodeship, based od percentage of counties in which died at least one pearson. + day number since 04-03-2020, which is considered as first day of pandemic in given voivodeship, based od percentage of counties in which died at least one pearson. + day number since 04-...
#!/usr/bin/env python3 """ Smoketest.py: Regression testing utility for Graphyne. Multiprocessing wrapper for Smokest, allowing multiple simultaneous tests against different persistence types. """ from tkinter.test.runtktests import this_dir_path from graphyne.DatabaseDrivers.DriverTermplate import linkTypes __autho...
"""Carry out off-policy analysis using previously generated obs. data.""" import argparse import pickle import os import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from sklearn.linear_model import LogisticRegression # config THRESHOLDS = np.arange(300, 850, 5) AXISFONTSIZE =...
file_out = './molgears/public/img/bitmap/thumb%s.bmp' %row.gid img.thumbnail(size, Image.ANTIALIAS) img.save(file_out) sheet.insert_bitmap(file_out , i,j, 5, 5) j+=1 if 'smiles' in options: sheet.write(i,j, str(row.mol.structure)) j+=1 if 'inchi' in options: sheet.write(i,j, str(row.mol.inchi)) j+=1 if 'lso'...
__author__ = 'ad' import six import json from abc import ABCMeta try: from collections import OrderedDict except ImportError: # For python 2.6 additional package ordereddict should be installed from ordereddict import OrderedDict try: from lxml.etree import fromstring as parse_xml_string from lxml.etree import _...
(redis_client.config_get("client-output-buffer-limit") ["client-output-buffer-limit"]) cur_config_list = cur_config.split() assert len(cur_config_list) == 12 cur_config_list[8:] = ["pubsub", "134217728", "134217728", "60"] redis_client.config_set("client-output-buffer-limit", " ".join(cur_config_list)) # Put a t...
"""Adapted from: @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn Licensed under The MIT License [see LICENSE for details] """ from __future__ import print_function import torch import torch.nn as nn import torch.backe...
"""Defines procedures for training, and evaluation automatic camfi annotation models, and for using them for making automatic annotations (inference). Depends on camfi.util, camfi.datamodel.autoannotation, camfi.datamodel.geometry, camfi.datamode.via, as well as ._torchutils and ._models.""" from datetime import datet...
<filename>ibis/omniscidb/operations.py<gh_stars>0 import warnings from datetime import date, datetime from io import StringIO import ibis import ibis.common.exceptions as com import ibis.common.geospatial as geo import ibis.expr.datatypes as dt import ibis.expr.operations as ops import ibis.expr.rules as rlz import ib...
logging.info( "No optimizer config provided, therefore no optimizer was created" ) return else: # Preserve the configuration if not isinstance(optim_config, DictConfig): optim_config = OmegaConf.create(optim_config) # See if internal config has `optim` namespace before preservation if self._cfg is not None a...
<filename>matrix-python-project/cover_generator/typesetting/model/four.py import sys, os, time, json, random from PIL import Image, ImageDraw, ImageFont, ImageFilter from cover_generator.typesetting.more import More from cover_generator.typesetting.mark import Mark from cover_generator.typesetting.build import Build fr...
event void printDependentParameters(); // Print couplings that are changed event by event void printDependentCouplings(); private: static Parameters_sm* instance; }; #endif // Pythia8_parameters_sm_H """% misc.get_pkg_info() goal_file_cc = \ """//===================================================================...
noqa: E501 return self.api_client.call_api( '/process-definition/key/{key}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ProcessDefinitionDto', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('asyn...
<reponame>ValentinoUberti/mcimporter # coding=latin-1 from fpdf import FPDF, HTMLMixin from dns.resolver import NoMetaqueries #from twisted.words.protocols.oscar import CAP_CHAT import os import datetime from money import * from datetime import timedelta from calendar import monthrange class MyFPDF(FPDF, HTMLMixin): p...
<filename>tacotron2/model.py<gh_stars>1-10 #: ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
emailAddress) emailZendesk = emailAddress connectionRequired = False except: connectionRequired = True #messageDetail.ReplyToChat("User is not connected with me") # messageDetail.ReplyToChat("User is not connected with me. Shall I send a Connection Request? Y/N") # # #askQuestion(messageDetail) # # autoConnec...
<reponame>larrywang0128/video_analyzer<gh_stars>0 # In[]: ################################################## ## Set up environment and load facial recognition model ################################################## import os import dlib import cv2 import numpy as np from scipy.spatial import distance as dist # import...
%d, geounits: %s, levels: %s', geolevel, geounit_ids, levels) for level in levels: # if this geolevel is the requested geolevel if geolevel == level.id: searching = True guFilter = Q(id__in=geounit_ids) # Get the area defined by the union of the geounits selection = safe_union(Geounit.objects.filter(guFilter))...
rotational axis and object's rotational axis obj_trans: object's rave_body transformation robot_trans: robot gripper's rave_body transformation axises: rotational axises of the object arm_joints: list of robot joints """ local_dir = np.array([0.0, 0.0, 1.0]) obj_dir = np.dot(obj_trans[:3, :3], local_dir) world...
<filename>src/RanorexLibrary.py ##################################################################### ### File created by <NAME>, 2018 ### ##################################################################### from distutils.util import strtobool from robot.api import logger import time class RanorexLibrary(object): ...
Raises ====== ValueError This error is raised when the coefficient matrix, non-homogeneous term or the antiderivative, if passed, are not a matrix or do not have correct dimensions NonSquareMatrixError When the coefficient matrix or its antiderivative, if passed is not a square matrix NotImplemented...
= data_sex[field_format][index] * gain fluxerr_aper = data_sex[field_format_err][index] * gain flux_diff = (flux_opt - flux_aper) / flux_aper xlabel = 'S/N (AUTO)' ylabel = '(E_FLUX_OPT - {}) / {}'.format(field_format, field_format) plot_scatter (s2n_auto, flux_diff, limits, class_star, xlabel=xlabel, ylabel=y...
<reponame>Ehsan-aghapour/AI-Sheduling-Reprodution<filename>examples/gemm_tuner/GemmTuner.py<gh_stars>1000+ # Copyright (c) 2019-2020 ARM Limited. # # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "...
<reponame>silvergasp/pigweed #!/usr/bin/env python3 # Copyright 2020 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
multi reg", "SBM" : "subtract multi reg", "SES" : "sign extend single", "SEW" : "sign extend word", "SF" : "set flags", "SL" : "shift left", "SLI" : "shift left immediate", "SLIM" : "shift left immediate multi reg", "SLM" : "shift left multi reg", "SMP" : "set memory protection", "SR" : "shift right", "SRI" ...
<gh_stars>0 import mysql.connector from image_scraping import * from auth import AUTH import json class Connector: def __init__(self): self.db = mysql.connector.connect(**AUTH) self.cur = None def create_cursor(self): """ Function: Creates the cursor in the var. self.cur to operate the database. """ self.cur...
<gh_stars>0 # -*- coding: utf-8 -*- """ Manage Rapyuta IO Resources Specify credentials either in a pillar file or in the minion's config file: .. code-block:: yaml rapyutaio.project_id: project-oidjfiasuhgw4hgfw4thw0hg rapyutaio.auth_token: <PASSWORD> It's also possible to specify ``project_id``, and ``auth_tok...
<gh_stars>0 import copy import warnings from functools import partial from typing import Any, Dict, List, Optional, Tuple, Type, Union import numpy as np import torch as th from gym import spaces from stable_baselines3.common.on_policy_algorithm import OnPolicyAlgorithm from stable_baselines3.common.policies import Ac...
local namespace. for func_name in func_names: setattr(base, func_name, func) func.__globals__[func_name] = _thunk return _thunk return inner class DirectOutputThingMixin: """This is the interface for OutputThings that should be directly scheduled by the scheduler (e.g. through schedule_recurring(), schedule_p...
<gh_stars>0 # -*- coding: utf-8 -*- ''' Tools for Web Flayer ''' # Python import os import re import sys import time import random import pprint import urllib # 3rd party import requests from termcolor import colored import psycopg2 from psycopg2.extras import Json from bs4 import BeautifulSoup # Internal import flay...
126 CA ALA C 8 134.694 148.314 139.861 1.00109.62 C ATOM 127 C ALA C 8 134.235 147.958 138.451 1.00104.90 C ATOM 128 O ALA C 8 135.061 147.658 137.588 1.00100.70 O ATOM 129 CB ALA C 8 133.968 147.451 140.881 1.00105.20 C ATOM 130 N LYS C 9 132.918 148.001 138.237 1.00110.41 N ATOM 131 CA LYS C 9 132.253 147.544 137.008...
hour_dict[key] = dat0 elif j == 1: hour_dict[key] = dat1 elif j == 2: hour_dict[key] = dat2 elif j == 3: hour_dict[key] = dat3 elif j == 4: hour_dict[key] = dat4 elif j == 5: hour_dict[key] = dat5 elif j == 6: hour_dict[key] = dat6 elif j == 7: hour_dict[key] = dat7 j += 1 mos_dict[apid] = hour_dict #m...
''' The MIT License (MIT) (c) <NAME> 2014 (<EMAIL>) 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...
<filename>fairseq/data/audio/word_aligned_audio_dataset.py<gh_stars>0 from fairseq.data import FairseqDataset # from .. import FairseqDataset import logging import numpy as np import os import pyarrow import re import torch import random from collections import defaultdict from tqdm import tqdm logger = logging.getLog...
''' test_modified_modules_backend.py Contains test cases related to the backend functions of modified modules. ''' from nose.tools import assert_equal, assert_not_equal, assert_true, assert_false from components import model from components import helper from components.handlers.modified_modules import Modified from ...
Primary trigger half-press 'Joy_2': {'Type': 'Digital', 'x': 2044, 'y': 424, 'width': 642, 'height': 108}, # Fire button 'Joy_3': {'Type': 'Digital', 'x': 2124, 'y': 234, 'width': 642, 'height': 108}, # S1 button 'Joy_4': {'Type': 'Digital', 'x': 3064, 'y': 496, 'width': 752}, # S2 button 'Joy_5': {'Type': 'Digital...
self.nodes[1].sendalerttoaddress(addr0, amount, '', '', False, False, 1, i) def test_alert_tx_change_is_by_default_sent_back_to_the_sender(self): addr0 = self.nodes[0].getnewaddress() alert_addr1 = self.nodes[1].getnewvaultinstantaddress(self.alert_instant_pubkey, self.alert_recovery_pubkey) # mine some coins to ...
nocomment(l,"--") # propagate line number codeonly.append((i," ".join(l))) weird = {} # stores all errors for i,line in codeonly: for token in tokenizer.findall(line): # it can be all in caps (constants) if token.upper() == token: continue # hex definition, give up if "0x" in token: continue #...
in range(len(tmpMatrix2)): result.append(tmpMatrix2[i]) for i in range(len(occurenceMatrix)): print(occurenceMatrix[i]) print("") return result elif (operator == 'under') and (score >= 0): for i in range(len(tmpMatrix)): if (float(tmpMatrix[i][s]) < score) and (float(tmpMatrix[i][s]) != -1): _scoreFilter1(i,t...
'inputs-parameters': {'parameter': []}, 'outputs-parameters': {'parameter': []}, 'agents': {'agent': []}, } return prop def updateTestFileProperties(self, itemId, properties): """ Update properties of a specific test suite @param itemId: @type itemId: @param properties: @type properties: """ testSuites ...
<reponame>mcraig-ibme/fsl_sub #!/usr/bin/env python import copy import io import getpass import os import socket import sys import tempfile import unittest import fsl_sub from ruamel.yaml import YAML from unittest import skipIf from unittest.mock import patch from unittest.mock import MagicMock from fsl_sub.exceptions ...
# -*- coding: utf-8 -*- """ mdfstudio utility functions and classes Edit history Author : yda Date : 2020-11-12 Package name changed - asammdf to mdfstudio Functions --------- * get_text_v3 - Apply UHC encoding * ChannelsDB.add - Do not add channel of same entry """ from functools import lru_cache import lo...
normalization_axes = x.axes.sample_axes() - x.axes.recurrent_axis() self.x = x - max(x, reduction_axes=normalization_axes) self.exps = exp(self.x) self.Z = sum(self.exps, reduction_axes=normalization_axes) self.value_tensor = self.exps / self.Z self.value_tensor.deriv_handler = self def generate_adjoints(self, a...
<filename>redpandas/redpd_plot/mesh.py """ Plot TFR """ import datetime as dt from typing import List, Union import matplotlib.pyplot as plt from matplotlib.colorbar import Colorbar from matplotlib.figure import Figure import matplotlib.ticker as mticker import numpy as np import pandas as pd from libquantum.plot_temp...
self.dilation_rate, 'activation': activations.serialize(self.activation), 'use_bias': self.use_bias, 'spatial_kernel_initializer': initializers.serialize(self.spatial_kernel_initializer), 'temporal_kernel_initializer': initializers.serialize(self.temporal_kernel_initializer), 'temporal_frequencies_initializer': in...
CoefsPow, bird): """ Perform the linear correlation function matrix multiplications """ bird.C11 = np.real(np.einsum('ns,ln->ls', CoefsPow, self.Mcf11)) def makeCct(self, CoefsPow, bird): """ Perform the counterterm correlation function matrix multiplications """ bird.Cct = self.co.s**-2 * np.real(np.einsum('ns,l...
policyType, name): """ The MonitorPolicy is initialized with simply a policy type and a name. There are two policy types: 'fabric' and 'access'. The 'fabric' monitoring policies can be applied to certain MonitorTarget types and 'access' monitoring policies can be applied to other MonitorTarget types. Initially ho...
<gh_stars>1-10 import matplotlib matplotlib.use('PS') matplotlib.rc('text', usetex=True) matplotlib.rcParams['font.size'] = 17 matplotlib.rc('xtick', labelsize=14) matplotlib.rc('axes', linewidth=1.2) matplotlib.rcParams['legend.fontsize'] = 12 matplotlib.rcParams['legend.handlelength'] = 5 matplotlib.rcParams['xtick.m...
# -*- coding: utf-8 -*- # Copyright (C) 2006-2012 <NAME>, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your op...
<gh_stars>0 import ply.yacc as yacc from soda.helpers import open_file, flatten, str_to_int_or_float from logging import getLogger from soda.distributed_environment.behavior import Behavior, ActionNode, IfNode, EndIfNode, ElseNode logger = getLogger(__name__) class AlgorithmParser(object): def p_algorithm(self, p):...
<reponame>sweh/sw.allotmentclub.backend<gh_stars>1-10 # coding:utf8 from __future__ import unicode_literals from .. import Member, BookingKind, User, Allotment from ..direct_debit import DirectDebit from ..log import user_data_log, log_with_user from ..base import parse_date from io import StringIO, BytesIO from pyrami...
""" Settings is for running experiments with different parameters. Supports stuff like auto grid search and logging (yes, logging!). TODO: - [ ] sanity check passed experiments to be of type 'list'. If passing a single setting that happens to be iterable it will happily iterate through, e.g., all characters of a st...
in str(e): print ("[E] contains duplicates .... trying again now...") remainingItems, rewarn=self.table_BatchSync(table, items, keys) else: #self.table_BatchSync(table, items, keys) raise ValueError("[E] Some other error... table_BatchSync :%s"%(e)) items=items+remainingItems warn=warn+rewarn return items, warn...
Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3', 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.3) Gecko/2009...
<gh_stars>0 #!/usr/bin/python3 # -*- coding: utf-8 -*- # https://en.wikipedia.org/wiki/Exact_cover # https://en.wikipedia.org/wiki/Sudoku_solving_algorithms # https://en.wikipedia.org/wiki/Knuth%27s_Algorithm_X import numpy as np from collections import Counter import csv, sys from dlist import DList BASE = 3 N_SYMBOL...
<gh_stars>0 #!/usr/bin/python3 # Filename: uplink_latency_analyzer.py """ uplink_latency_analyzer.py An analyzer to monitor uplink packet waiting and processing latency """ __all__ = ["FirstByteAnalyzer"] try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET from numpy.cor...
"cfmFlowMetricsIntOctets": {}, "cfmFlowMetricsIntPktRate": {}, "cfmFlowMetricsIntPkts": {}, "cfmFlowMetricsIntTime": {}, "cfmFlowMetricsIntTransportAvailability": {}, "cfmFlowMetricsIntTransportAvailabilityPrecision": {}, "cfmFlowMetricsIntTransportAvailabilityScale": {}, "cfmFlowMetricsIntValid": {}, "cfmFlowM...
""" Script and Functions to assmeble gates for the DMFT Loop """ from CQS.util.PauliOps import I from CQS.util.verification import Nident import qiskit from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, execute from collections import OrderedDict from openfermion.ops import FermionOperator, QubitOpe...
<filename>Lighthouse_problem.py #!/usr/bin/env python # coding: utf-8 # [1] import numpy as np;import matplotlib.pyplot as plt from IPython.display import Image from IPython.html.widgets import interact # [2] Image('Lighthouse_schematic.jpg',width=500) # The following is a classic estimation problem called the...
\ "OrCAD Files (*.top *.bot *.smt *.smb *.sst *.ssb *.spt *.spb);;" \ "Allegro Files (*.art);;" \ "Mentor Files (*.pho *.gdo);;" \ "All Files (*.*)" try: filename, _ = QtWidgets.QFileDialog.getOpenFileName(caption="Open Gerber with Follow", directory=self.get_last_folder(), filter=_filter_) except TypeError: f...
# Copyright 2019 <NAME>. 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 required by applicable law or agreed to...
0: temp += "W" if (segment.elfN_Phdr.p_flags & P_flags.PF_X) != 0: temp += "X" print "Flags: %s" % temp print "Align: 0x%x" % segment.elfN_Phdr.p_align # print which sections are in the current segment (in memory) temp = "" for section in segment.sectionsWithin: temp += section.sectionName + " " if temp != ...
# import images # import logging import csv import re import time from glob import iglob from os import access, R_OK from os.path import join, expanduser, isdir, sep import shutil # maintain this order of matplotlib # TkAgg causes Runtime errors in Thread import matplotlib matplotlib.use('Agg') import matplotlib.pyplo...
# # This file is part of LUNA. # # Copyright (c) 2020 Great Scott Gadgets <<EMAIL>> # Copyright (c) 2020 <NAME> <<EMAIL>> # # Code based in part on ``litex`` and ``liteiclink``. # SPDX-License-Identifier: BSD-3-Clause """ Soft PIPE backend for the Xilinx 7 Series GTP transceivers. """ from amaranth import * from amara...
"""This file contains code for use with "Think Bayes", by <NAME>, available from greenteapress.com Copyright 2012 <NAME> License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import math import numpy import random import sys import correlation import thinkplot i...
== 3) & (df['Year'] == 2020)].mean()) y62 = int(df['Hedva1-B'][(df['Bagrot math'] == 4) & (df['Year'] == 2020)].mean()) y63 = int(df['Hedva1-B'][(df['Bagrot math'] == 5) & (df['Year'] == 2020)].mean()) z11 = int(df['Hedva2-B'][(df['Bagrot math'] == 3) & (df['Year'] == 2015)].mean()) z12 = int(df['Hedva2-B'][(...
% sys.version_info[:3]) logger = logging.getLogger(progname) (loop_seconds, days, amount, zones_to_water, info, emulating, mysql_host, mysql_user, mysql_passwd) = parse_arguments(logger) logger.info("Started program %s, version %s", progname, version) if (days == 0): logger.info("Irrigating %.2f mm", amount) e...
__tablename__ = 'image_type' __table_args__ = ( {'schema': mbdata.config.schemas.get('cover_art_archive', 'cover_art_archive')} ) mime_type = Column(String, primary_key=True, nullable=False) suffix = Column(String, nullable=False) class CoverArt(Base): __tablename__ = 'cover_art' __table_args__ = ( Index('co...
8, (0, 'O'): 8, (0, 'P'): 8, (0, 'Q'): 8, (0, 'R'): 8, (0, 'S'): 8, (0, 'T'): 8, (0, 'U'): 8, (0, 'V'): 8, (0, 'W'): 8, (0, 'X'): 8, (0, 'Y'): 8, (0, 'Z'): 8, (0, '['): 18, (0, '\\'): 9, (0, ']'): 34, (0, '^'): 25, (0, '_'): 8, (0, 'a'): 10, (0, 'b'): 26, (0, 'c'): 10, (0, 'd'): 10, (0, 'e'): 10, ...
# -*- coding: utf-8 -*- # Import dependencies import json from mysql.connector import IntegrityError from app.app_modules import db from app.helpers import get_custom_logger, ApiError from app.mod_blackbox.controllers import get_account_public_key, generate_and_sign_jws from app.mod_database.helpers import get_db_curs...
<filename>Betsy/Betsy/rule_engine.py """ Functions: run_pipeline run_module """ # _make_file_refresher # # _get_available_input_combinations # _hash_module # _make_hash_units # _is_module_output_complete # _format_pipeline # _get_node_name # # _write_parameter_file # _read_parameter_file VERSION = 7 FINISHED_FILE...
<filename>pcg_gazebo/simulation/properties/collision.py<gh_stars>1-10 # Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
#! /usr/bin/python # -*- coding: utf-8 -*- # # tkinter example for VLC Python bindings # Copyright (C) 2015 the VideoLAN team # # 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 2 ...
# -*- coding: utf-8 -*- # This script gathers all .i18n files and aggregates them as a pair of .h/.cpp # file. # In practice, it enforces a NFKD normalization. Because Epsilon does not # properly draw upper case letters with accents, we remove them here. # If compression is activated, texts are grouped by languages, a...
<reponame>mariusgheorghies/python # coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: ...
<reponame>dadosgovbr/ckan<filename>ckan/tests/functional/test_authz.py from time import time from copy import copy import random import sqlalchemy as sa import ckan.model as model from ckan import plugins from ckan.tests import TestController, url_for, setup_test_search_index from ckan.lib.base import * import ckan.l...
the existing error mode. # See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx. error_mode = SEM_NOGPFAULTERRORBOX prev_error_mode = Win32SetErrorMode(error_mode) Win32SetErrorMode(error_mode | prev_error_mode) process = subprocess.Popen( shell = utils.IsWindows(), args = popen_args, **rest ) ...
""" (C) Crown Copyright 2017, the Met Office. Module to replicate data access API of the previous version of AutoAssess: - from loaddata import load_run_ss For information on the PP-Header attributes, see: Unified Model Documentation Paper F03: "Input and Output File Formats" available here: https://code.metoffice...
self.type = m.get('type') if m.get('agent_name') is not None: self.agent_name = m.get('agent_name') return self class ImportIotplatformMeshidResponse(TeaModel): def __init__( self, req_msg_id: str = None, result_code: str = None, result_msg: str = None, device_sn: str = None, ): # 请求唯一ID,用于链路跟踪和问题排查 self....
"' + ap + '"\n') except KeyError: fr.write('\t administrator_login_password= ""\n') pass # tags block try: mtags=azr[i]["tags"] fr.write('tags = { \n') for key in mtags.keys(): tval=mtags[key] fr.write('\t "' + key + '"="' + tval + '"\n') fr.write('}\n') except KeyError: pass fr.write('}\n') fr.close...
ToontownFriendSecret.unloadFriendSecret() FriendsListPanel.unloadFriendsList() messenger.send('cancelFriendInvitation') base.removeGlitchMessage() taskMgr.remove('avatarRequestQueueTask') OTPClientRepository.OTPClientRepository.exitPlayingGame(self) if hasattr(base, 'localAvatar'): camera.reparentTo(render) cam...
# -*- coding: utf-8 -*- """Interface to Lightnet object proposals.""" import logging from os.path import expanduser, join from wbia import constants as const import utool as ut import numpy as np import cv2 import random import tqdm import time import os import copy import PIL (print, rrr, profile) = ut.inject2(__name...
+ m.x486 + m.x516 + m.x546 + m.x576 + m.x606 + m.x636 + m.x666 + m.x696 + m.x726 == 1) m.c758 = Constraint(expr= m.x7 + m.x37 + m.x67 + m.x97 + m.x127 + m.x157 + m.x187 + m.x217 + m.x247 + m.x277 + m.x307 + m.x337 + m.x367 + m.x397 + m.x427 + m.x457 + m.x487 + m.x517 + m.x547 + m.x577 + m.x607 + m.x637 + m.x667 + m...
"""As an open source project, we collect usage statistics to inform development priorities. For more information, check out the docs at https://docs.dagster.io/install/telemetry/' To see the logs we send, inspect $DAGSTER_HOME/logs/ if $DAGSTER_HOME is set or ~/.dagster/logs/ See class TelemetryEntry for logged field...
from Part import * import math from math import sqrt from FreeCAD import Base # Block dimension information: # https://www.cailliau.org/en/Alphabetical/L/Lego/Dimensions/General%20Considerations/ # https://bricks.stackexchange.com/questions/288/what-are-the-dimensions-of-a-lego-brick mm = 1.0 # base unit is mm epsilo...
<reponame>bic2007/py-stellar-base # coding: utf-8 import requests from requests.adapters import HTTPAdapter, DEFAULT_POOLSIZE from requests.exceptions import RequestException from requests.compat import urljoin from time import sleep from urllib3.exceptions import NewConnectionError from urllib3.util import Retry from...
self.initial_temperature else: for elem in self.mesh.elems.values(): idxs = self.node_map.tags_to_idxs(elem.elem_node_tag_gen()) coords = elem.node_coords() for i in range(len(idxs)): t0[idxs[i]] = initial(coords[i, 0], coords[i, 1]) self.lst_tmp = t0 # Just to have the correct length list. Should be ...
values are: 'Updating', 'Deleting', and 'Failed'." name: description: - The name of the resource that is unique within a resource group. This name can be used to access the resource. etag: description: - A unique read-only string that changes whenever the resource is updated. backend_addresses: description: -...
n -> ... h n', h=self.H) # Augment B if state is not None: # Have to "unbilinear" the state to put it into the same "type" as B # Compute 1/dt * (I + dt/2 A) @ state # Can do this without expanding (maybe minor speedup using conj symmetry in theory), but it's easier to read this way s = _conj(state) if state.si...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math import numpy as np from Utils import GaussianBlur, CircularGaussKernel from LAF import abc2A,rectifyAffineTransformationUpIsUp, sc_y_x2LAFs,sc_y_x_and_A2LAFs from Utils import generate_2dgrid, generate_2dg...
<filename>pyNastran/converters/dev/calculix/nastran_to_calculix.py """ defines: - CalculixConverter """ from collections import defaultdict from numpy import array, zeros, cross from numpy.linalg import norm # type: ignore from pyNastran.bdf.bdf import BDF, LOAD # PBAR, PBARL, PBEAM, PBEAML, from pyNastran.bdf.cards...
<gh_stars>1-10 # # Create buildbot configuration based on a (almost) plain dict. # import random from buildbot.buildslave import BuildSlave from buildbot.config import BuilderConfig from buildbot.changes.gitpoller import GitPoller from buildbot.changes.filter import ChangeFilter from buildbot.interfaces import IEmailL...
sanitize: try: Chem.SanitizeMol(mol) #adding aromatic bonds...we may have a problem here except ValueError as e: logging.info("Skipping sanitization for molecule at pos:" + str(i+1)) if debug: w = Chem.SDWriter('tmp_pos'+str(i+1)+'.sdf') w.write(mol) w.close() # we cannot use it then... if mol is not None: ...
<gh_stars>1-10 #!/usr/bin/env python3 """An interactive viewer for todo-txt.""" import os import re import sys import time import argparse import subprocess import curses from contextlib import contextmanager, suppress """Maps a priority to a color. First entry is priority A, second B, and so on. If there are more p...
<reponame>artiya4u/Axela<filename>main.py #! /usr/bin/env python import os import time import sys import alsaaudio import requests import json from memcache import Client import vlc import threading import email import optparse import tunein import webrtcvad from pocketsphinx.pocketsphinx import * from creds import...
' + file_dir + file_name) os.system('cp -r ' + file_dir + file_name + '_nodeg ' + file_dir + file_name) os.system('rm -rf ' + file_dir + file_name + '_nodeg') return() def task_pbcorr( self, target = None, product = None, config = None, in_tag = 'orig', out_tag = 'pbcorr', extra_ext_in = '', extra_ext_out...
# !pip install segmentation-models import keras import warnings import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from PIL import Image from segmentation_models import Unet from segmentation_models.backbones import get_preprocessing from keras.models import load_model batch_s...
<filename>src/pyflask/api.py import json import logging import logging.handlers import os import sys import config from biotools import getUserDetails, loginToBioTools, registerTool, validateTool from figshare import ( createNewFigshareItem, deleteFigshareArticle, getFigshareFileUploadStatus, uploadFileToFigshare,...
# (c) Copyright [2018-2022] Micro Focus or one of its affiliates. # 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 applicabl...
346 1 0 106 1 347 1 0 105 1 348 1 0 104 1 349 1 0 103 1 350 1 0 102 1 351 1 0 101 1 328 1 0 98 1 329 1 0 97 1 330 1 0 96 1 333 1 0 93 1 334 1 0 92 1 335 1 0 91 1 352 1 0 90 1 353 1 0 89 1 354 1 0 88 1 358 1 0 252 1 359 1 0 251 1 360 1 0 250 1 371 1 0 249 1 372 1 0 248 1 373 1 0 247 1 374 1 0 246 1 375 1 0 245 1 376 1 0...