input
stringlengths
2.65k
237k
output
stringclasses
1 value
m.x1218 == 0) m.c719 = Constraint(expr= - m.x413 - 0.93056815579703*m.x415 - 0.432978546291743*m.x417 - 0.134305349107462*m.x419 + m.x1219 == 0) m.c720 = Constraint(expr= - m.x414 - 0.93056815579703*m.x416 - 0.432978546291743*m.x418 - 0.134305349107462*m.x420 + m.x1220 == 0) m.c721 = Constraint(expr= - m.x421 - 0....
""" This script shows how to use Guru's SDK to publish cards, boards, or entire collections to an external site -- in this case, Salesforce Knowledge. This script takes the contents of a board in Guru and makes API calls to Salesforce to create or update Knowledge objects as needed. 1. Behind the scenes, the SDK enum...
68, }, 69: { 'col_and_row': u'F9', 'row': 6, 'col': 9, 'well_id': 69, }, 70: { 'col_and_row': u'F10', 'row': 6, 'col': 10, 'well_id': 70, }, 71: { 'col_and_row': u'F11', 'row': 6, 'col': 11, 'well_id': 71, }, 72: { 'col_and_row': u'F12', 'row': 6, 'col': 12, 'well_id': 72, }, 73: { 'col_and_r...
to a list, annotating them with logical levels.""" # declarations processed, now for statements while (line != '' and line.rstrip() != '}'): # process statements toks, chars = ctok_nspace(line) if (len(toks) > 2 and (toks[0] in decl.keys()) and (toks[1] == '=' or toks[1] == '+=' or toks[1] == '-=' or toks[...
# # The script to run maze navigation experiment with Novelty Search optimization # using the MultiNEAT library # # The Python standard library import import os import shutil import math import random import time import copy import argparse import pickle # The MultiNEAT specific import MultiNEAT as NEAT from MultiNEA...
= "DriveID"', ]) # << Parsing tests >> (28 of 61) # Unicode tests.extend([ 'cIÅ = 10', 'a = cIÅ + 30', 'a = "cIÅ there"', ]) # Unicode sub tests.append(""" Sub cIÅ() a=10 n=20 c="hello" End Sub """) # << Parsing tests >> (29 of 61) # Simple If tests.append(""" If a = 10 Then b = 20 End If If c < 1 Then d = 15 End I...
SetAutoContrast (self,value): if value != self.auto_contrast: self.auto_contrast = value self.adjust_contrast() self.Refresh() AutoContrast = property(GetAutoContrast,SetAutoContrast,doc= "Automatically scale the image intensity") def adjust_contrast (self): "This automatically scales the intensity of the ima...
else: accumulate_local_X(Xcomp, indexes, *Xcomp.shape[1:], self.n_freqs, X) compute_X() return X def fit(self, org_Y, n_iter=100, update_flags=[True,True,True], post_process=None, log_interval=10): '''Fit model to `org_Y` Args: org_Y (xp.ndarray): Observed magnitude spectrogram, n_freqs x n_frames n_iter (in...
members of the current meme. E.g. we don't want to create members when we are running a restore from DB at engine startup If restore is True, then the current entity is being restored from the database and we don't want to either create members (they already exist) or set the properties, as property state exists...
self._inner_dict.get('version') # type: ignore @version.setter def version(self, value: Union[None, "VersionTagClass"]) -> None: """Setter: Version of the MLPrimaryKey""" self._inner_dict['version'] = value @property def sources(self) -> List[str]: """Getter: Source of the MLPrimaryKey""" return self._inn...
TType.DOUBLE: self.complete_latency_ms = iprot.readDouble() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.tr...
from tkinter import * import tkinter.font as font from functions import * from tkinter import messagebox from tkinter.filedialog import askopenfilename import string from tkinter.ttk import Separator, Style # Main Application Class class BreadthFirstSearch: def __init__(self, master): self.master = master master....
**kwargs): requires_backends(self, ["torch"]) class ProphetNetEncoder(metaclass=DummyObject): _backends = ["torch"] def __init__(self, *args, **kwargs): requires_backends(self, ["torch"]) class ProphetNetForCausalLM(metaclass=DummyObject): _backends = ["torch"] def __init__(self, *args, **kwargs): requires...
height): return _gui.GuiTree_set_line_height(self, height) def refresh(self): return _gui.GuiTree_refresh(self) def show(self): return _gui.GuiTree_show(self) def draw(self, dc): return _gui.GuiTree_draw(self, dc) def set_size(self, x, y, w, h): return _gui.GuiTree_set_size(self, x, y, w, h) def resize(s...
<reponame>EtienneFrigo/AnimGAN #Loading Libraries from __future__ import print_function import argparse import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from PIL import Image import math import random from keras.models import Sequential from keras.layers import Dense, Resh...
try: q = quantity.HeatCapacity(1.0,"kJ/K") self.fail('Allowed invalid unit type "kJ/K".') except quantity.QuantityError: pass def test_kJpermolperK(self): """ Test the creation of a heat capacity quantity with units of kJ/(mol*K). """ q = quantity.HeatCapacity(1.0,"kJ/(mol*K)") self.assertAlmostEqual(q.value...
KMS and None. For the China region the possible values are None, and Legacy. - **ClusterVersion** *(string) --* The version ID of the Amazon Redshift engine that is running on the cluster. - **AllowVersionUpgrade** *(boolean) --* A boolean value that, if ``true`` , indicates that major version upgrades will be a...
""" Classes on handling HTTP requests towards Mix API endpoints """ from abc import ABCMeta, abstractmethod import copy import json from typing import Optional, Union, List, Dict, Callable, Any, Tuple import requests import re from io import BytesIO from requests import Response from .logging import Loggable from .au...
<filename>mrush.py #Передаю спасибо и привет https://github.com/Wilidon, если бы не он я бы не разобрался как обойти анти-бот систему #Связь со мной: @a352642 (telegram) import os import time try: import requests from bs4 import BeautifulSoup as BS except: print("Installing module 'requests'") os.syste...
'sibling_timestamp' ] ) self._Execute( 'CREATE TABLE ' + pending_tag_siblings_table_name + ' ( bad_master_tag_id INTEGER, good_master_tag_id INTEGER, account_id INTEGER, reason_id INTEGER, PRIMARY KEY ( bad_master_tag_id, account_id ) ) WITHOUT ROWID;' ) self._CreateIndex( pending_tag_siblings_table_name, [ 'accoun...
compute_fractures(self, vols_per_ellipsoid, centers): """ Generate fractures according to the instance parameters `fracture_shape` and `num_fractures`. Parameters ---------- vols_per_ellipsoid : list A list of Pymoab's ranges describing the volumes inside each ellipsoid. centers : numpy.array Array contain...
geometry if geometry_defined_everywhere: full_mask = None masked_cp_array = ma.masked_array(cp_array, mask = ma.nomask) log.info('geometry present for all cells') else: full_mask = cp_nan_mask.reshape((nk, nj, ni, 1)).repeat(24, axis = 3).reshape((nk, nj, ni, 2, 2, 2, 3)) masked_cp_array = ma.masked_array(cp_arr...
<gh_stars>100-1000 import networkx import nose import numpy as np import numpy.testing as tst import skfuzzy as fuzz import skfuzzy.control as ctrl from pytest import approx, raises try: from numpy.testing.decorators import skipif except AttributeError: from numpy.testing.dec import skipif except ModuleNotFoundError...
A4 A5 A7 B4 F7 # Score 5 for path: ['E', 'E', 'S', 'S', 'S', 'E', 'N', 'E', 'S', 'S', 'S', 'W', 'W', 'W', 'N', 'N'] # A5 B2 B5 E3 F5 # Score 5 for path: ['S', 'W', 'W', 'W', 'N', 'E', 'N', 'N', 'N', 'N', 'E', 'E', 'S', 'S', 'E', 'N'] # D6 D7 F6 F7 I5 # checkExhaustivePathsWithAutoRepairPatterns(12, 8) # Score 8 for pa...
"""Model for concept detection, and its training and evaluation handle.""" # Copyright (c) 2020 Continental Automotive GmbH import hashlib import logging from typing import Optional, Tuple, Dict, Any, Sequence, Callable import numpy as np import torch import torch.nn from .base_handles import EarlyStoppingHandle, Re...
bool :param object body: The machine IDs for which to pause replication. (required) :param str project_id: (required) :return: CloudEndureMachinesListInvalidIDsAndJob If the method is called asynchronously, returns the request thread. """ kwargs["_return_http_data_only"] = True if kwargs.get("async_req"): retu...
child, change all children to this relation generic_query("UPDATE rst_nodes SET relname=? WHERE id=? and doc=? and project=? and user=?",(new_rel,node_id,doc,project,user)) children = get_children(parent_id,doc,project,user) for child in children: if get_rel_type(get_rel(child[0],doc,project,user),doc,proj...
if _la==MyGrammerParser.ENDEND: self.state = 144 self.declare_ending_end() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx class ExprContext(ParserRuleContext): __slots__ = 'parse...
#!/usr/bin/python import pandas as pd import matplotlib.pyplot as plt import numpy as np import time import sys import threading import random import Queue from sklearn import preprocessing, svm, tree from sklearn.ensemble import RandomForestClassifier from sklearn.decomposition import PCA import math import pickle imp...
The message is routed to the bound Queue by comparing the attribute key-value pair and the bound attribute key-value pair. :param pulumi.Input[str] instance_id: The ID of the instance. :param pulumi.Input[bool] internal: Specifies whether an exchange is an internal exchange. Valid values: * false: The exchange is no...
############ DISTILFND Class ############ """ Author: <NAME> Date: 26.09.2021 Master thesis: Explanatory detection of fake news with Deep Learning University: University of Hagen, Hagen, Germany, Faculty for Mathematics and Computer Science """ # Importing needed modules from PIL import Image, ImageFile # Truncating i...
''' Created on 28 apr 2019 @author: Matteo ''' import traceback import struct import asyncio from base64 import b64decode, b64encode import json import time from Crypto.Cipher import AES import random import string import binascii from hashlib import md5 from . import _LOGGER from .const import (CD_AD...
""" Configuration file! """ import os import sys from argparse import ArgumentParser import numpy as np ROOT_PATH = os.path.dirname(os.path.realpath(__file__)) DATA_PATH = os.path.join(ROOT_PATH, 'data') OLD_DATA_PATH = '../Large-Scale-VRD.pytorch/data/' CO_OCCOUR_PATH = os.path.join(DATA_PATH, 'co_occour_count.npy') ...
<gh_stars>1-10 import cubic_spline_interpolation import matplotlib.pyplot as plt import numpy as np import sys filename_measurements = '20160810-0955_measurements_CNN0a.dat' filename_result = '20160810-0955_result_CNN0a.dat' filename_measurements = '20160811-1459_measurements_CNN0a.dat' filename_result = '20...
+ \ "[xx.xN xx.xW] IS CURRENTLY IN A STATE OF UNREST AND COULD ERUPT WITH " + \ "LITTLE NOTICE. MARINERS TRAVELING IN THE VICINITY OF [VOLCANO NAME] " + \ "ARE URGED TO EXERCISE CAUTION. IF MARINERS ENCOUNTER VOLCANIC ASH OR " + \ "FLOATING VOLCANIC DEBRIS...YOU ARE ENCOURAGED TO REPORT THE OBSERVATION " + \ "TO T...
this interface **type**\: bool **config**\: False .. attribute:: is_passive_interface Passive interface indicator **type**\: bool **config**\: False .. attribute:: multicast_address Use broadcast address for v2 packets **type**\: bool **config**\: False .. attribute:: accept_metric ...
### ### ### ### AMBReader.py is a script I've been using to explore & experiment with AMB files. In the process I've also built it up as an AMB reader, though ### it's by no means a user friendly format loading library. ### BASIC USAGE: First set civ3_root_dir below to your Civ 3 install directory. Then run the ...
if column not in cif_table.columns: continue try: ctx = self.cif_data[table_name] except KeyError: continue ## dictionary of [primary_key_value] = cif_row primary_values = {} for crx in ctx: try: value = crx[column] except KeyError: pass else: primary_values[value] = crx for cif_row in cif_table: try...
key, used to sign auth tokens.", ) streaming_artifacts_compression: Optional[str] = Field( None, concourse_env_var="CONCOURSE_STREAMING_ARTIFACTS_COMPRESSION", description="Compression algorithm for internal streaming. (default: gzip)", ) syslog_address: Optional[str] = Field( None, concourse_env_var="CONCOURS...
and Gaussian. Parameters ---------- X: array-like of size (n_samples_test,n_features) Matrix of explanatory variables Returns ------- probs: numpy array of size (n_samples_test,) Estimated probabilities of target classes ''' y_hat = self.decision_function(X) X = check_array(X, accept_sparse=None, dtype =...
<reponame>salt-die/graphvy<gh_stars>1-10 """ Hold shift to drag-select vertices. Ctrl-click to select individual vertices, and again to pin them. Space to pause/unpause the layout algorithm. Ctrl-Space to pause/unpause the Graph callback. """ from functools import wraps from math import hypot from random import random ...
from __future__ import print_function import sys sys.path.append('home/tdteach/workspace/models/') import os from absl import app from absl import flags as absl_flags from absl import logging os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2" logging.set_verbosity(logging.ERROR) import tensorflow as tf from official.utils.flag...
<filename>equilibrium_points/statistics_brief.py import os import warnings import numpy as np import random as rand import matplotlib.pyplot as plt import dynalysis.basics as bcs import dynalysis.classes as clss from itertools import combinations from scipy.stats import pearsonr from sklearn.cluster import KMeans from ...
# 16 # PARAM stored_images = 0 num_queued_images = 0 base_json_path = base_dir seedA = [] seedB = [] with open(base_json_path + '/' + interp_data[0][0] + ".json", 'r') as f: seedA = json.load(f) with open(base_json_path + '/' + interp_data[0][1] + ".json", 'r') as f: seedB = json.load(f) total_frame_num = 0...
make it a torch tensor if verbose==True: print("Creating low pass filter ...", end='\r') start = time() lowpass_filter = torch.tensor(create_lowpass_filter( band_center = 0.5, kernelLength=256, transitionBandwidth=0.001 ) ) # Broadcast the tensor to the shape that fits conv1d self.register_buffer('lowpass_f...
<gh_stars>0 """ This module provides a prototypical interface that allows the user to train approximation models based on given training datasets. """ import copy import numpy as np import pandas from scipy.stats import randint as sp_randint from scipy.stats import uniform as sp_uniform from sklearn import...
<reponame>zhaofang0627/face-deocc-lstm<gh_stars>10-100 from util import * import numpy as np class LSTM(object): def __init__(self, lstm_config): self.name_ = lstm_config.name num_lstms = lstm_config.num_hid assert num_lstms > 0 self.num_lstms_ = num_lstms self.has_input_ = lstm_config.has_input self.has_output...
<filename>checklistcombobox.py import tkinter as tk # Python 3 only import tkinter.ttk as ttk import tkinter.font as tkfont import numpy as np # GUI features to test (X means completed): # 1.) Both 'normal' and 'readonly' # X Pressing Tab at any time (popdown or no) moves to the next widget # X Pressing Tab with an it...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use t...
'453242' : u'建设银行-VISA准贷记卡(银联卡)-准贷记卡', '491031' : u'建设银行-VISA准贷记金卡-准贷记卡', '524094' : u'建设银行-乐当家-借记卡', '526410' : u'建设银行-乐当家-借记卡', '53242' : u'建设银行-MASTER准贷记卡-准贷记卡', '53243' : u'建设银行-乐当家-准贷记卡', '544033' : u'建设银行-准贷记金卡-准贷记卡', '552245' : u'建设银行-乐当家白金卡-借记卡', '589970' : u'建设银行-金融复合IC卡-借记卡', '620060' : u'建设...
+ str(line_number) + ": " + inFile_strings[line_number] + " This program is scanning through each line in the template, and expects to find an ID as the second token on this line #" + i + ": " + currentLine) print("but there are only " + len(temp) + " tokens on the line.") return -48, '', '' myLabel = temp[1] myLab...
0b1 matching_target_attestations = get_matching_target_attestations(state, current_epoch) # Current epoch if get_attesting_balance(state, matching_target_attestations) * 3 >= get_total_active_balance(state) * 2: state.current_justified_checkpoint = Checkpoint(epoch=current_epoch, root=get_block_root(state, current_...
# -*- coding: utf-8 -*- """ TopGun Backtest Class @author: David """ # %% IMPORTs CELL # Default Imports import numpy as np import pandas as pd # Plotly for charting import plotly.express as px import plotly.graph_objs as go import plotly.io as pio # %% CLASS MODULE class BacktestAnalytics(object): """ Backtest ...
rest of word parts = list( filter( None, settings.begin_punctuations_pattern.split(word_text, maxsplit=1), ) ) first_word = True while word_text and (len(parts) == 2): punct_text, word_text = parts if first_word: # Preserve leadingwhitespace punct_text = first_ws + punct_text first_word = False punct_te...
# -*- coding: utf-8 -*- """ Azure Resource Manager (ARM) Virtual Network Gateway State Module .. versionadded:: 1.0.0 :maintainer: <<EMAIL>> :configuration: This module requires Azure Resource Manager credentials to be passed via acct. Note that the authentication parameters are case sensitive. Required provider p...
path = urllib_parse.unquote(req.path) new_metadata = extract_object_metadata_from_headers(req.headers) try: head_response = self.rpc_call(ctx, rpc.head_request(path)) raw_old_metadata, mtime, _, _, inode_number, _ = \ rpc.parse_head_response(head_response) except utils.RpcError as err: if err.errno in (pfs_errn...
time. """ def _handle_session_timeout(): if not self.session_started_event.is_set(): log.debug("Session start has taken more " + \ "than %d seconds", self.session_timeout) self.disconnect(reconnect=self.auto_reconnect) self.schedule("Session timeout check", self.session_timeout, _handle_session_timeout) de...
import numpy as np from collections import namedtuple from pomegranate import GeneralMixtureModel,NormalDistribution import pandas as pd def smooth(ser, sc): return np.array(pd.Series(ser).rolling(sc, min_periods=1, center=True).mean()) origin = namedtuple("origin",["pos","firing_time","L_fork_speed","R_fork_speed"...
values are vnodes. self.path = None self.root = None self.VNode = TestVNode if test else leoNodes.VNode self.test = test #@+others #@+node:ekr.20180602103135.3: *3* fast_at.get_patterns #@@nobeautify def get_patterns(self, delims): '''Create regex patterns for the given comment delims.''' # This must be a f...
range(len(vertice_count) - 2): v = vertice_with_id[v][1] num_ids = vertices[v][3] delete_ids |= set(num_ids) if debug_msg: print >> sys.stderr, v, "is removed with", num_ids else: for v in range(len(vertices)): assert len(vertices) >= 2 relative_avg = (sum(vertice_count) - vertice_count[v]) / float(len(vertice...
equal-sized masks. Used for testing on artificially generated np.arrays Dice Coefficient: https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient Need smooth, because otherwise 2 empty (all zeros) masks will throw an error instead of giving 1 as an output. :param mask_1: first mask :param mask_2: s...
found in Solr!') earliestDoc = results.docs[0][timestampField] earliestTime = dateutil.parser.parse(earliestDoc) results = solr.search(timestampField+':[* TO *]', **{'sort':timestampField+' DESC'}) latestTime = dateutil.parser.parse(results.docs[0][timestampField]) duration = (latestTime-earliestTime).total_secon...
#!/usr/bin/python # -*- coding: utf-8 -*- import re from collections import defaultdict, OrderedDict from .xrenner_classes import Markable from six import iteritems, iterkeys """ Marker module for markable entity recognition. Establishes compatibility between entity features and determines markable extension in token...
# -*- coding: utf-8 -*- """ aid_img some functions for image processing that are essential for AIDeveloper --------- @author: maikherbig """ import numpy as np import os, shutil,h5py import pandas as pd rand_state = np.random.RandomState(117) #to get the same random number on diff. PCs import aid_bin from...
<NAME>., & <NAME>. (1998). Optimizing sound features for cortical neurons. Science, 280(5368), 1439-1444. <NAME>., <NAME>., <NAME>., <NAME>., & <NAME>. (2003). Spectrotemporal structure of receptive fields in areas AI and AAF of mouse auditory cortex. Journal of neurophysiology, 90(4), 2660-2675. ''' # Hard code ...
<filename>src/python/grpcio/grpc/_adapter/rear.py # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyrig...
+ "^3")] = ( 1 * beta ) exact_solution[ i, reference_polynomial.index("x" + str(i) + "^2 x" + str(i + 1)) ] = (3 * beta) exact_solution[ i, reference_polynomial.index("x" + str(i) + " x" + str(i + 1) + "^2") ] = (-3 * beta) exact_solution[ i, reference_polynomial.index("x" + str(i - 1) + " x" + str(i) + "^2")...
<Bit>0</Bit> </StructEntry> <StructEntry Name="Bit1" NameSpace="Custom"> <Bit>1</Bit> </StructEntry> <StructEntry Name="Bit2" NameSpace="Custom"> <Bit>2</Bit> </StructEntry> </StructReg> <Port Name="MyPort"/> """ Camera = CNodeMapRef() Camera._LoadXMLFromFile("GenApiTest", "NodeTestSuite_TestStructReg"...
<reponame>gitter-badger/galaxy2galaxy # coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
<filename>ef_knnlm/domain_adaptation/adaptive_retrieval/adaptive_retrieval.py import json import sys import os import argparse import time import torch import torch.nn as nn import torch.optim as optim import numpy as np from collections import Counter, OrderedDict from scipy.special import logsumexp from datasets imp...
of ``"fix"`` or ``"silentfix"`` with ``"+ignore"``, ``+warn``, or ``+exception" (e.g. ``"fix+warn"``). See :ref:`verify` for more info. clobber : bool When `True`, overwrite the output file if exists. checksum : bool When `True` adds both ``DATASUM`` and ``CHECKSUM`` cards to the headers of all HDU's written t...
stats[0].otherReferenceName) ) fig, pdf = libplot.initImage( 12.0, 8.0, options ) axes = fig.add_axes( [0.09, 0.2, 0.9, 0.6] ) drawCompareData( axes, options, stats, isAbs ) libplot.writeImage( fig, pdf, options ) #================== DRAW ONLY BASES OF EACH SAMPLE THAT MAPPED TO CACTUS REF ================== def ...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # # Description: generate inputs and targets for the DLRM benchmark # # Utility function(s) to download and pre-process public data sets # - Cr...
be removed, then the package is being updated and it should be listed. if self._to_install_package_dict.keys(): all_installed_ids = all_installed_ids.union(set(self._to_install_package_dict.keys())) return all_installed_ids ## Get a list of tuples that contain the package ID and version. # Used by the Marketplac...
<filename>theano/ptrnets.py from collections import OrderedDict import cPickle as pkl import sys import time import argparse import random import numpy import theano from theano import config import theano.tensor as tensor from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from shapely.geometry.poly...
<filename>generate.py #!/usr/bin/env python # Contains very primitive and incomplete parser of C preprocessor directives. # May accidentally read invalid C source without any errors. import collections import json import os.path import re import sys import six _TOKENS = ( _T_HASH, _T_IDENTIFIER, _T_INT, _T_STR...
<gh_stars>0 # Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import collections import json import logging from abc import abstractmethod from datetime import date, datetime, timedelta from operator import attrgetter from typing import (Any, Callable, Dict, Iterable, List, Mappin...
<reponame>cameronelliott/sdp-antlr-abnf # Generated from sdp.g4 by ANTLR 4.8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u0102") buf.write("\u0403\b\1\4\2\t\2\4\3\t...
<reponame>RobotTeam2/rMule #!/usr/bin/python3 import time import sys import glob #import serial import re import threading import queue import os from logging import getLogger, StreamHandler, FileHandler, Formatter, DEBUG import redis #import redis_serial as serial client = redis.StrictRedis(host='node2.ceph.wator.x...
4, 6, 9), (50, 60, 70, 80, 90), (50, 50, 50, 50, 50)))}, 'dt': {'name': TTLocalizer.SuitDoubleTalker, 'singularname': TTLocalizer.SuitDoubleTalkerS, 'pluralname': TTLocalizer.SuitDoubleTalkerP, 'level': 2, 'hp': (20, 30, 42, 56, 72), 'def': (10, 15, 20, 25, 30), 'freq': (50, 30, 10, 5, 5), 'acc': (65, 7...
<reponame>manuelmuehlig/ToolBOSCore<filename>include/ToolBOSCore/GenericGUI/TerminalWidget.py # -*- coding: utf-8 -*- # # Terminal for remote process execution monitoring # # Copyright (c) Honda Research Institute Europe GmbH # # Redistribution and use in source and binary forms, with or without # modification, are per...
"""Module for creating strawberry types for entity models.""" import dataclasses import enum import sys from inspect import isclass from typing import Any, Dict, ForwardRef, List, Optional, Tuple, Type, Union, cast import strawberry from strawberry.annotation import StrawberryAnnotation from strawberry.arguments impo...
no drainage field and more than one exit for at least one lake needDrainage = False if streamDrainageIndex < 0: for data in exitData.values(): if len(data) > 1: needDrainage = True break if needDrainage: self.drainAreas = zeros((maxChLink + 1), dtype=float) gridCellArea = self.dx * self.dy * gv.gridSize * gv.g...
<gh_stars>1-10 [262144, 18, 0, 0, 0, 0.303334], [262440, 3, 8, 1, 0, 0.428383], [262500, 2, 1, 5, 1, 0.530909], [263424, 8, 1, 0, 3, 0.461892], [264600, 3, 3, 2, 2, 0.454827], [268800, 9, 1, 2, 1, 0.455837], [268912, 4, 0, 0, 5, 0.482812], [270000, 4, 3, 4, 0, 0.417645], [272160, 5, 5, 1, 1, 0.46049], [273375, 0, 7, 3,...
at ~15 species). - *IsOnlyLastTimepoint* [default = False] (boolean) - *critical_reactions* [default = [] ] (list) ONLY for the tau-leaping method where the user can pre-define reactions that are "critical". Critical reactions can fire only once per time step. - *reaction_orders* [default = [] (list) ONLY for the ta...
fac in self.structures(UnitTypeId.FACTORYFLYING).idle: possible_land_positions_offset = sorted( (Point2((x, y)) for x in range(-10, 10) for y in range(-10, 10)), key=lambda point: point.x ** 2 + point.y ** 2, ) offset_point: Point2 = Point2((-0.5, -0.5)) possible_land_positions = (fac.position.rounded + offset_po...
Optional[float] = None, with_replacement: bool = False, shuffle: bool = False, seed: Optional[int] = None, ) -> DF: """ Sample from this DataFrame by setting either `n` or `frac`. Parameters ---------- n Number of samples < self.len() . frac Fraction between 0.0 and 1.0 . with_replacement Sample with rep...
<reponame>farziengineer/nni<filename>src/sdk/pynni/nni/ppo_tuner/ppo_tuner.py<gh_stars>0 # Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, # to any person obtaining a copy of this software and associated # documentation files (the "Software"),...
<filename>pyaz/storage/fs/directory/__init__.py ''' Manage directories in Azure Data Lake Storage Gen2 account. ''' from .... pyaz_utils import _call_az from . import metadata def create(name, account_key=None, account_name=None, auth_mode=None, connection_string=None, metadata=None, permissions=None, sas_token=None,...
#!/usr/bin/python2 # coding=utf-8 # code by Bangsat-XD # my facebook ( https://www.facebook.com/AA.RAKA2708 ) # (C) Copyright 407 Authentic Exploit # Rebuild Copyright Can't make u real programmer:) # Coded By Bangsat-XD. import os try: import requests except ImportError: print '\n [×] Modul requests belum terinsta...
###################################################################### # # Software Name : Cloudnet TOSCA toolbox # Version: 1.0 # SPDX-FileCopyrightText: Copyright (c) 2020-21 Orange # SPDX-License-Identifier: Apache-2.0 # # This software is distributed under the Apache License 2.0 # the text of which is available at ...
largefiles. This makes the merge proceed and we can then handle this # case further in the overridden manifestmerge function below. def overridecheckunknownfile(origfn, repo, wctx, mctx, f): if lfutil.standin(repo.dirstate.normalize(f)) in wctx: return False return origfn(repo, wctx, mctx, f) # The manifest merge h...
<filename>03_preprocessing_musdb_audio_txt_char.py """ This script reads the MUSDB lyrics annotation files, cuts the audio into snippets according to annotated lines, and saves audio and text files accordingly (both as torch files). Please note that when this file was written, the vocals category annotations were done...
<gh_stars>0 # -*- coding: utf-8 -*- # # Copyright © 2009 <NAME> # Licensed under the terms of the MIT License # (see pydeelib/__init__.py for details) """ Dictionary Editor Widget and Dialog based on PyQt4 """ #TODO: Multiple selection: open as many editors (array/dict/...) as necessary, # at the same time...
== furl.furl(f).url == furl.furl(f.url).url assert f is not f.copy() and f.url == f.copy().url # URL paths are optionally absolute if scheme and netloc are # empty. f = furl.furl() f.path.segments = ['pumps'] assert str(f.path) == 'pumps' f.path = 'pumps' assert str(f.path) == 'pumps' # Fragment paths are op...
projected RoI """ rois = im_rois.astype(np.float, copy=False) * scales levels = np.zeros((im_rois.shape[0], 1), dtype=np.int) return rois, levels def _add_multilevel_rois_for_test(blobs, name): """Distributes a set of RoIs across FPN pyramid levels by creating new level specific RoI blobs. Arguments: blobs (...
# -*- coding: utf-8 -*- """ Created on Tue Mar 12 16:04:45 2019 @author: 13383861 """ import sys sys.path.append('.') import os import time from abc import ABC, abstractmethod import numpy as np from OccupancyGrid.Agents.BaseOccupancyGridAgent import BaseGridAgent from Utils.Vector3r import Vector3r from Utils.UE4G...
<filename>outlookmsgfile.py # This module converts a Microsoft Outlook .msg file into # a MIME message that can be loaded by most email programs # or inspected in a text editor. # # This script relies on the Python package compoundfiles # for reading the .msg container format. # # Referencecs: # # https://msdn.microsof...
<filename>tests/stress/concurrent_select.py<gh_stars>0 #!/usr/bin/env impala-python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this ...
runtime=self._runtime, effective_agent_id=self.get_effective_agent_id(), proxy=self._proxy) self._forms[obj_form.get_id().get_identifier()] = not CREATED return obj_form @utilities.arguments_not_none def create_log_entry(self, log_entry_form): """Creates a new ``LogEntry``. arg: log_entry_form (osid.logging.L...