input
stringlengths
2.65k
237k
output
stringclasses
1 value
= "right") except: #If icon not found self.step3_label.config(text = "Cracking password locally   ☐") self.info_label.config(text = "Cracking password locally.") check_wifi_connect_states = "nmcli d show " + selected_interface + " 2>&1 | grep 'GENERAL.STATE:' | awk '{print $3}'" get_wifi_connect_states = subproces...
and the required # input form. taus = [ [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], [3.458, -586.1, 0, 0, 0, 0]], [[-0.801, 246.2, 0, 0, 0, 0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]] ] alphas = [[[0.0, 0.0], [0.0, 0.0]], [[0.3, 0], [0.0, 0.0]] ] pp = Nrtl(tau_coeffs=taus, alpha_coeffs=alphas, VaporPressures=m.VaporPressures, Tm...
108.60 5/2017 1 cu-cx-cu 100.4 50.91 5/2017 2 0.0020 cu-cx-cx 92.5 58.44 5/2017 28 0.4472 cu-cx-hc 46.9 118.69 5/2017 29 0.5914 cx-cx-cx 90.2 60.00 5/2017 1689 0.8111 cx-cx-cy 62.1 125.01 5/2017 7 2.6658 cx-cx-f 85.1 118.81 5/2017 17 1.2118 cx-cx-h1 45.9 118.69 5/2017 1339 1.3738 cx-cx-hc 46.1 117.69 5/2017 3482 0.9446...
box if print_color == blue_sum: # determing the colour, the highest value is equal to and returning that value in a string object_color = "Blue" elif print_color == green_sum: object_color = "Green" elif print_color == red_sum: object_color = "Red" elif print_color == yellow_sum: object_color = "Yellow" elif p...
import cv2 import time import math import statistics import numpy as np import matplotlib.pyplot as plt import itertools import random from Lidar_tools import find_lidar_phi_from_coord, find_lidar_theta_from_coord, find_lidar_theta_phi_from_image, \ find_sample_from_angle, interpolation, polar_to_cartesia...
import os import os.path as op from os.path import join as pjoin import sys import warnings import pytest from mayavi import mlab import nibabel as nib import numpy as np from numpy.testing import assert_array_equal, assert_array_less from unittest import SkipTest from surfer import Brain, io, utils from surfer.util...
#!/usr/bin/python #! --*-- utf-8 --*-- from vlcp.config import defaultconfig from vlcp.server.module import Module,depend,call_api,api from vlcp.event.runnable import RoutineContainer from vlcp.utils.ethernet import ip4_addr from vlcp.utils.dataobject import updater,\ set_new,dump,ReferenceObject,\ request_context, ...
# Copyright 2018-2019 <NAME>) # SPDX-License-Identifier: Apache-2.0 from robotScenarioBase import * from FalconsCoordinates import Vec2d, RobotPose from math import pi import logging # Script for Robocup World Championship 2018, tech challenge run 1 # Conditions: # two robots, wifi on, normal MSL field and lighting #...
# -*- coding: utf-8 -*- """ Created on Sat Feb 18 16:35:08 2017 @author: Aeolitus """ import Definitionen import logging import unicodedata import os import re from Wolke import Wolke import Objekte class VoraussetzungException(Exception): pass class WaffeneigenschaftException(Exception): pass class Hilfsmethoden...
return prim.If(rec_cond, self.rec(expr.then, callables_table=callables_table, guarding_predicates=( guarding_predicates | frozenset([rec_cond])), nresults=nresults), self.rec(expr.else_, callables_table=callables_table, guarding_predicates=( guarding_predicates | frozenset([prim.LogicalNot(rec_cond)])), nresu...
np.max(img_h, axis=2) # (N_Ms, N_pts) img_w_max = np.max(img_w, axis=2) img_h_min = np.min(img_h, axis=2) img_w_min = np.min(img_w, axis=2) img_h_resol = (img_h_max - img_h_min + 0.0) / _cube_D_ img_w_resol = (img_w_max - img_w_min + 0.0) / _cube_D_ compress_h = compress_ratio * img_h_resol.mean() / image_compre...
use as a directory name Multiple disallowed characters in a row are substituted with a single instance of the relevant replacement character: e.g., Hello,,,,Sunshine becomes Hello-Sunshine Parameters ---------- x : str Returns ------- str the input string with whitespaces replaced with underscores and a...
<reponame>beAWARE-project/crisis-classification<gh_stars>0 # Created Date: 11/09/2018 # Modified Date: 12/09/2018 # # Implements the 2nd algorithm of Crisis Classification module # based on the measurements of water levels from sensors for a # specific 3 weather stations at a) last measurement # or b) at particular dat...
7.049456954407E-02, 7.049456954407E-02, 7.049456954407E-02, 7.049456954407E-02, 7.049456954407E-02, 7.049456954407E-02, 7.049456954407E-02, 1.385029207141E-02, -4.488982302467E-02, -8.350115450764E-02, -7.975908114097E-02, -5.651707329729E-02, -4.876973734940E-02, -5.651707329729E-02, -7.975908114097E-02, -8.350115...
\ xi_tree * (1-np.exp(-(xs/rswitch)**4)) elif logdens1 < -5.75 and logdens2 >= -5.75: xi_dir = self._get_xiauto_direct( xs, -5.75, logdens2, redshift) * self.g1.bias_ratio(redshift, logdens1) rswitch = min(60., 0.5 * self.cosmo.get_BAO_approx()) xi_tot = xi_dir * np.exp(-(xs/rswitch)**4) + \ xi_tree * (1-np.exp(...
<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import division __copyright__ = "Copyright (C) 2015 <NAME>" __license__ = """ 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 restrict...
<filename>tests/strategies/test_vertical.py import unittest from unittest.mock import patch, Mock from datetime import datetime import pandas as pd from pandas.testing import assert_frame_equal from parameterized import parameterized from dgraphpandas.strategies.vertical import vertical_transform class Vertical(uni...
count, size = 0, len(self.articles) for id_ in self.articles: count = self.progression(count=count, modulo=self.modulo_articles, size=size, text='article') try: self.articles[id_].compute_corpus_annotations() except ParseError: raise Exception("Data is not clean, remove data %s and start again." % id_) self.w...
# coding: utf-8 """ Determined API (Beta) Determined helps deep learning teams train models more quickly, easily share GPU resources, and effectively collaborate. Determined allows deep learning engineers to focus on building and training models at scale, without needing to worry about DevOps or writing custom code...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
an subject should fail path = self._url('/v1/subjects/%s/file' % subject_id) headers = self._headers({'Content-Type': 'application/octet-stream'}) response = requests.get(path, headers=headers) self.assertEqual(403, response.status_code) # Subject Deletion should work path = self._url('/v1/subjects/%s' % subject...
<gh_stars>1-10 # -*- coding: utf-8 -*- import pandas as pd import os import sys import json import tqdm # import requests ## if we query xml # import xmltodict from gr_allenFISH_utils import ( check_gene_cached, check_gene_cached_images, check_cache_AtlasImage, # check_cache_AtlasDataFrame, load_cache...
<gh_stars>10-100 from __future__ import division import math import random as rd import networkx as nx import numpy as np from pysbm import sbm class NetworkSuppplier(object): """ Create different types of graphs""" STANDARD_SEED = 42 def __init__(self): self.partition_class = sbm.NxPartition def get_all_te...
<reponame>rdass1/IDScanningSystem from distutils.log import error from PIL import Image, ImageDraw, ImageFont, ImageOps import qrcode import random import sys import json from datetime import datetime from os.path import exists import time blankIDCardFront = "./server/idCreator/Slide1.PNG" # Link to the temp...
"""Tests for collection requests.""" import uuid import requests # avoid pylint errors because of fixtures # pylint: disable = redefined-outer-name, unused-import from helpers import ( TEST_LABEL, USERS, as_user, collection_for_tests, make_request, make_request_all_roles, mdb, random_string, ) import helpers...
place for eastern blue elephant g.make_move('e4', 'e5') # red soldier moves to make place for eastern red elephant try: valid_move = g.make_move('g10','e7') #blue elephant moves self.assertIs(valid_move, True) except: self.fail("Blue Elephant from east is either not transposed correctly with Horse in the inital ...
ON reporting_aws_compute_summary (usage_start, instance_type) ; CREATE MATERIALIZED VIEW reporting_aws_compute_summary_by_service AS( SELECT row_number() OVER(ORDER BY date(usage_start), product_code, product_family, instance_type) as id, date(usage_start) as usage_start, date(usage_start) as usage_end, product_...
"providers": { "dso": _("Electricity DSO"), "gas_dso": _("Gas DSO"), "h2_dso": _("H2 DSO"), "heat_dso": _("Heat DSO"), }, "production": { "pv_plant": _("PV Plant"), "wind_plant": _("Wind Plant"), "biogas_plant": _("Biogas Plant"), "geothermal_conversion": _("Geothermal Conversion"), "solar_thermal_plant": _(...
the suffix `_meta`. The new dimension has the dimension labels `total_count` and `valid_count`. """ return _process('aggregate_spatial', data=data, geometries=geometries, reducer=reducer, target_dimension=target_dimension, context=context) def aggregate_spatial_binary(data, geometries, reducer, target_dimension=UN...
<reponame>tetframework/Tonnikala import ast from ast import * from collections.abc import Iterable from .astalyzer import FreeVarFinder from ..base import LanguageNode, ComplexNode, BaseGenerator from ...helpers import StringWithLocation from ...runtime.debug import TemplateSyntaxError import sys try: # pragma: no ...
+= '\n' parameter_index = None if 'deg' in kinetics[2]: reaction_index += 1 parameter_index = reaction_index for sp in floating_ids: ant_str += 'J' + str(reaction_index) + ': S' + str(sp) + ' ->; ' + 'k' + str(reaction_index) + '*' \ + 'S' + str(sp) + '\n' reaction_index += 1 ant_str += '\n' ro = list(ro) ...
<filename>nuplan/planning/nuboard/base/simulation_tile.py import json import logging import lzma import pathlib import pickle from functools import partial from pathlib import Path from typing import Any, Dict, List, Optional import msgpack from bokeh.document.document import Document from bokeh.layouts import gridplo...
* Constants.c_in_cm * Constants.h / (Constants.k_b * temp) s_v = Constants.r * ((x / (np.exp(x) - 1.0)) - np.log(1.0 - np.exp(-x))) s_r = Constants.r * (0.5 + np.log(np.sqrt((8.0 * np.pi**3 * mu_prime * Constants.k_b * temp) / (Constants.h**2) ))) w = 1.0 / (1.0 + (omega_0 / freq)**alpha) s += w * s_v + (1.0 - ...
<reponame>bdeetz/pynos<gh_stars>10-100 """ Copyright 2015 Brocade Communications Systems, 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 re...
same rank as `y_true`, and must be broadcastable to `y_true`. Returns: Update op. """ return metrics_utils.update_confusion_matrix_variables( { metrics_utils.ConfusionMatrix.TRUE_POSITIVES: self.true_positives, metrics_utils.ConfusionMatrix.TRUE_NEGATIVES: self.true_negatives, metrics_utils.ConfusionMatrix.FA...
from cached_property import cached_property from csv import writer from datetime import date from decimal import Decimal from decimal import InvalidOperation from onegov.core.collection import Pagination from onegov.swissvotes.models import ColumnMapperDataset from onegov.swissvotes.models import PolicyArea from onegov...
"3"], screen_info={"cols": 80}) self.assertEqual( 2, out.annotations[debugger_cli_common.INIT_SCROLL_POS_KEY]) index = self._findSourceLine(out, self._u_line_number) self.assertEqual( ["L%d u = variables.VariableV1(u_init, name=u_name)" % self._u_line_number, " simple_mul_add/u", " simple_mul_add/u/Assign", ...
# coding:utf-8 import kivy kivy.require('1.7.2') # replace with your current kivy version ! from kivy.app import App from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition from kivy.properties import ListProperty, ObjectProperty, StringProperty, NumericProperty from kivy.factory import Factory from ki...
<gh_stars>1-10 """ Tacotron + stepwise monotonic attention """ import jax import jax.numpy as jnp import pax def conv_block(in_ft, out_ft, kernel_size, activation_fn, use_dropout): """ Conv >> LayerNorm >> activation >> Dropout """ f = pax.Sequential( pax.Conv1D(in_ft, out_ft, kernel_size, with_bias=False), pa...
= "deviceType" deviceListEntries = "deviceList" deviceTags = ["friendlyName","modelDescription","modelName","modelNumber","modelURL","presentationURL","UDN","UPC","manufacturer","manufacturerURL"] #Find all device entries listed in the XML file for device in xmlRoot.getElementsByTagName(devTag): try: #G...
or func == "servercount" or func == "membercount": return str(ctx.guild.member_count) if ctx.guild else "2" elif func == "channel": return ctx.channel.name if ctx.guild else "Direct Message" elif func == "channelid": return str(ctx.channel.id) if ctx.channel else "0" elif func.startswith("randuser"): ...
<reponame>sparkslabs/kamaelia_orig<filename>Sketches/MPS/BugReports/FixTests/Kamaelia/Test/Internet/test_Selector.py #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www....
""" Power Flow Analysis: Support Functions Created By: <NAME> <NAME> """ import numpy as np from numpy.linalg import inv import pandas as pd """ Imports Bus and line data from excel sheets Takes in an array containing ['File Location', 'Sheet Name'] Returns two panda data frames for the bus and li...
) kwargs['_check_input_type'] = kwargs.get( '_check_input_type', True ) kwargs['_check_return_type'] = kwargs.get( '_check_return_type', True ) kwargs['_spec_property_naming'] = kwargs.get( '_spec_property_naming', False ) kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs...
<reponame>maragraziani/intentionally_flawed_models<gh_stars>1-10 import keras.backend as K import numpy as np import keras.datasets import matplotlib.pyplot as plt import keras #from memorization_utils import * import os from sklearn.linear_model import Ridge import sys sys.path.append('../rcvs_fexps/') sys.path.appen...
GetLabeledByCore(self, *args): #cannot find CLR method """ GetLabeledByCore(self: ItemAutomationPeer) -> AutomationPeer Gets the System.Windows.Automation.Peers.AutomationPeer for the System.Windows.Controls.Label that is targeted to the specified System.Windows.UIElement. Returns: The System....
<gh_stars>0 import glob import json import os import shutil import operator import sys import argparse import math import numpy as np from copy import deepcopy parser = argparse.ArgumentParser() parser.add_argument('-na', '--no-animation', help="no animation is shown.", action="store_true") parser.add_argument('-np',...
only): The below values should be specified as integers. date Date of last change of password, represented in days since epoch (January 1, 1970). mindays The minimum number of days between password changes. maxdays The maximum number of days between password changes. inactdays The number of days after a ...
<filename>src/netappfiles-preview/azext_netappfiles_preview/_help.py # coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license...
<reponame>UltraCart/rest_api_v2_sdk_python<gh_stars>1-10 # coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six clas...
""" attribute_update.py - classes to update the values of files' attributes and keep the files, directory structure and DMT consistent. """ from abc import ABCMeta, abstractmethod import logging import os import re import shutil import six import tempfile from pdata_app.models import (Checksum, ClimateModel, DataReque...
delay. :type maximum_inbound_round_trip_delay: ~datetime.timedelta :param maximum_outbound_jitter: The maximum outbound stream network jitter. :type maximum_outbound_jitter: ~datetime.timedelta :param maximum_outbound_packet_loss_rate_in_percentage: The maximum outbound stream packet loss rate in percentage (0-100...
#!/usr/bin/env python3 import os import argparse import time import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.style.use('clint.mpl') from pprint import pprint import scipy.signal as signal import itertools from pygama import DataSet import pygama.utils as pu import pygama.analysis.histograms ...
Parameters ---------- None Returns ------- float Length of the perimeter """ try: return self._perimeter except AttributeError: self._perimeter = self.polygon.length return self._perimeter @property def cmp_index(self): """Calculates the value of the compactness index Parameters ---------- None ...
<filename>cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_policy_repository_oper.py """ Cisco_IOS_XR_policy_repository_oper This module contains a collection of YANG definitions for Cisco IOS\-XR policy\-repository package operational data. This module contains definitions for the following management objects\: r...
""" Tests the higher level functions in bet_sizing.py. """ import unittest from unittest.mock import patch import datetime as dt import numpy as np import pandas as pd from scipy.stats import norm, moment from mlfinlab.bet_sizing.bet_sizing import (bet_size_probability, bet_size_dynamic, bet_size_budget, b...
# -------------------------------------------------------------------------- # Core functions to train on NGA data. # -------------------------------------------------------------------------- import gc # clean garbage collection import glob # get global files from directory import random # for random integers from tqd...
<filename>cfn_pyplates/core.py # Copyright (c) 2013 MetaMetrics, Inc. # # 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, ...
# Get the one char pass the char pointed to by the file buffer pointer # # @param self The object pointer # @retval Char Next char # def _NextChar(self): if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1: return self.Profile.FileLinesList[self.CurrentLineNu...
self.span_embedding.output_size, "position_embedding": position_embedding, "allowed_a2h_relations": allowed_a2h_relations, "allowed_a2a2h_relations": allowed_a2a2h_relations, "constrained_outputs": constrained_outputs, **chunk_decoder, }}) multilabels = {} ner_label_to_multilabels = [None] * len(ner_labels) ...
<reponame>openstack/oslo.policy # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
#!/usr/bin/env python3 ################################################################################ #### ABOUT: #### #### Render script for the SVGs in the SOURCE_DIR directory. #### #### The renders will be placed in RENDER_DIR. #### #### If possible, SVGs containing AUTH_TAG or PRINT_TAG will have #### #### the ...
and "QtAssistant" in self._qt: if "QtGui" not in self._qt: self._qt.append("QtGui") if "QtNetwork" not in self._qt: self._qt.append("QtNetwork") for mod in self._qt: lib = self._qt_module_to_lib(mod) libs.append(self.platform_lib(lib, self._is_framework(mod))) if sys.platform == "win32": # On Windows the dep...
import os, sys import re import zipfile import requests import warnings import logging import pandas as pd import numpy as np from stat import S_IREAD, S_IRGRP, S_IROTH import getpass import pymysql # Code by <NAME> (<EMAIL>), 2016-2017 class LoadData(): """ This class is inherited by the Data class, and contains t...
+ 2: path = pf.get_safest_path(game, player, game.get_ball_position()) if path is not None: p = game.get_pickup_prob(player, game.get_ball_position(), allow_team_reroll=True) p = path.prob * p if pickup_p is None or p > pickup_p: pickup_p = p pickup_player = player pickup_path = path if pickup_player is not No...
**kwargs): pass def count(*args, **kwargs): pass def dump(*args, **kwargs): pass def insertItem(*args, **kwargs): pass def insertStretch(*args, **kwargs): pass def invalidate(*args, **kwargs): pass def itemAt(*args, **kwargs): pass def itemSpacing(*args, **kwargs): pass d...
result of old_node. old_node : FunctionNode Original function (wrap fortran). new_node : FunctionNode New function (wrap c) that passes arg. """ attrs = arg.attrs meta = arg.metaattrs c_attrs = new_node.ast.attrs f_attrs = old_node.ast.attrs if f_attrs["deref"] is None: f_attrs["deref"] = "allocatable" at...
#!/usr/bin/env python3 """ Transcrypt CI testserver. Hit /index with a browser and you'll see what it does. In travis we hit it via `xvfb-run firefox \ http://127.0.0.1:8080/do/hello,time,transcrypt/dictionaries,...` This is to speed up CI testing: - phantomjs was no option, too much incompat with real browsers - st...
def function_f_x_k(funcs, args, x_0, mu=None): ''' Parameters ---------- funcs : sympy.matrices.dense.MutableDenseMatrix 当前目标方程 args : sympy.matrices.dense.MutableDenseMatrix 参数列表 x_0 : list or tuple 初始迭代点列表(或元组) mu : float 正则化参数 Returns ------- float 迭代函数值 ''' import numpy as np funcsv = n...
from __future__ import division from libtbx import adopt_init_args import mmtbx.utils from mmtbx.building.loop_closure import utils from mmtbx.validation.ramalyze import ramalyze, RAMALYZE_OUTLIER, \ RAMALYZE_ALLOWED, RAMALYZE_FAVORED from scitbx.matrix import project_point_on_axis import math from scitbx.array_famil...
# voxelnet does occupancy but with a bit of randomness in terms of the reflectance value i think inbounds = self.get_inbounds(xyz, Z, Y, X, already_mem=True) x, y, z = xyz[:,:,0], xyz[:,:,1], xyz[:,:,2] mask = torch.zeros_like(x) mask[inbounds] = 1.0 # set the invalid guys to zero # we then need to zero out 0,0...
#!/usr/bin/env python import AcqirisWrapper as Aq import InstrumentDriver from InstrumentConfig import InstrumentQuantity import numpy as np # for long integer py2/py3 compatibility from builtins import int class Error(Exception): pass class Driver(InstrumentDriver.InstrumentWorker): """ This class implements the ...
<filename>kvmagent/kvmagent/plugins/prometheus.py import os.path import threading import typing from prometheus_client import start_http_server from prometheus_client.core import GaugeMetricFamily, REGISTRY from kvmagent import kvmagent from zstacklib.utils import http from zstacklib.utils import jsonobject from zsta...
<filename>assign-random-peer-reviewer-by-section.py<gh_stars>10-100 #!/usr/bin/python3 # -*- coding: utf-8 -*- # -*- mode: python; python-indent-offset: 4 -*- # # ./assign-random-peer-reviewer-by-section.py course_id new_assignment_id [old_assignment_id ] # # This program assigns each user in a course (course_id) with ...
values[1] ) or values[0] != values[1] ) visibilities = [ len( values ) > 0 and values[0] is not None, len( values ) > 1 and values[1] is not None and different ] for i in range( 0, 2 ) : self.frame( i ).setVisible( visibilities[i] ) cornerWidget = self.getCornerWidget( i ) if cornerWidget is not ...
#MONKFISH v 0.1 #<EMAIL> import pandas as pd import numpy as np import random print("\nLoading data...\n") ################################################## ###YOU CAN CHANGE THE NAME OF DATA FILE HERE!!!### data = pd.read_csv('preferences2.csv', header=0,encoding="utf-8-sig")### ####################################...
= 0 if mac != None: self.mac = mac else: self.mac = [0,0,0,0,0,0] return def pack(self): packed = [] packed.append(struct.pack("!H", self.vlan_vid)) packed.append(struct.pack("!6B", *self.mac)) return functools.reduce(lambda x,y: x+y, packed) @staticmethod def unpack(reader): obj = bsn_vlan_mac() obj.vl...
""" Ledalab analysis functions (original folder: Ledalab/analyze) """ from __future__ import division import numpy as np from numpy import array as npa import math from scipy import stats from scipy.signal import convolve from scipy import interpolate from scipy.linalg import norm from . import leda2 from . import util...
Required. Number of transactions for the request. :type transactions_count: long """ _validation = { 'documents_count': {'required': True}, 'valid_documents_count': {'required': True}, 'erroneous_documents_count': {'required': True}, 'transactions_count': {'required': True}, } _attribute_map = { 'documents_...
<gh_stars>0 import typing from functools import partial import six from dagster import check from dagster.core.storage.type_storage import TypeStoragePlugin from .builtin_config_schemas import BuiltinSchemas from .builtin_enum import BuiltinEnum from .config import List as ConfigList from .config import Nullable as ...
# -*- coding: utf-8 -*- # # name: test_record.py # author: <NAME> | Prestix Studio, LLC. # email: <EMAIL> # created on: 05/25/2019 # """ Functional tests for cloudns_api's record module. """ from pytest import raises from cloudns_api import record from cloudns_api.validation import ValidationError from .helpers imp...
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # pylint: disable=duplicate-code # pylint: disable=li...
# Copyright (C) 2014-2017 <NAME>, <NAME>, <NAME>, <NAME> (in alphabetic order) # # This file is part of OpenModal. # # OpenModal 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, version 3 of the License. # ...
= np.zeros((2 * ref_orbit_len,), dtype=numba.float64) M_bla_new, r_bla_new, bla_len, stages = init_BLA_BS( M_bla, r_bla, Zn_path, dfxdx, dfxdy, dfydx, dfydy, kc_std, eps ) return M_bla_new, r_bla_new, bla_len, stages @numba.njit def init_BLA(M_bla, r_bla, Zn_path, dfdz, kc_std, eps): """ Initialize BLA tree at ...
if not all(type(n) == str for n in f): return False return True def convert_dictable_namedtuple(nt_instance, typename=None, module=None, **kwargs) -> Union[NamedTuple, Dict]: """ Convert an existing :func:`collections.namedtuple` instance into a dictable_namedtuple instance. **Example** First we create a named...
from __future__ import absolute_import from __future__ import print_function import os import veriloggen import axi_stream expected_verilog = """ module blinkled ( input CLK, input RST, input [32-1:0] axi_a_tdata, input axi_a_tvalid, output axi_a_tready, input axi_a_tlast, output reg [32-1:0] axi_b_tdata, out...
<reponame>GeorgiyDemo/FA<filename>Course I/Практика Python/Part1/pract2/task1.py """ Реализовать текстовый калькулятор нескольких правильных, неправильных и смешанных дробей и обычных чисел с математическим порядком вычисления. Способ записи смешанных дробей – 5(1/4), правильных – 5/9, неправильных 19/7. Результат долж...
def declarePrimedVar(self): return self.getTypedRuleContext(SygusParser.DeclarePrimedVarContext,0) def invConstraintCmd(self): return self.getTypedRuleContext(SygusParser.InvConstraintCmdContext,0) def getRuleIndex(self): return SygusParser.RULE_cmd def enterRule(self, listener:ParseTreeListener): if hasatt...
# (Note the window is not actually displayed until someone calls # our go() method.) inst.title(title) # Set the window width and height. inst.config(width=width, height=height) # Raise the guiapp.mainWinExists flag to announce that the main # window exists now - in case some other thread has been hanging ...
<reponame>ghostbar/swift-lang.deb # capi.py - sourcekitd Python Bindings -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LI...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 7 21:43:26 2019 @author: tc """ # import numpy as np import pandas as pd from queue import Queue from datetime import datetime, timedelta import math from sklearn.utils import Bunch import numpy as np import sys from enum import Enum PICKLE_EXT = "...
<filename>src/fastqfilter.py #! /usr/bin/env python3 # Copyright <NAME>, 2015. www.sovic.org # # A script that takes an input FASTA/FASTQ file and performs various methods # of filtering on it. Examples include: selecting sequences that contain certain # strings in their header, and others. import re import os import...
<reponame>buaales/tt_offline_scheduler import typing import networkx import networkx.algorithms.approximation import matplotlib.pyplot as plt import pprint import math import pandas from fractions import Fraction from collections import defaultdict class Frame: _id = 0 def __init__(self, app: 'Application', peroid...
# -*- coding: utf-8 -*- import urllib, urllib2, re, os, sys, math import xbmcgui, xbmc, xbmcaddon, xbmcplugin from urlparse import urlparse, parse_qs import urlparse from BeautifulSoup import BeautifulSoup import time, datetime import HTMLParser #todo: BeautifulSoup scriptID = 'plugin.video.mrknow' scriptname = "Film...
True, a space is inserted between values; if False, a tab is used use_binary (boolean, optional, default False): if True, a pure binary copy of the array is written binary_only (boolean, optional, default False): if True, and if use_binary is True, then no ascii file is generated; if False (or if use_binary is Fal...
mov.draw() self.window.flip() def run(self): # loop over trials self.all_trial_response = [] # pre-allocate for self.trial in self.target_file.index: # get trial_info + stims self._get_trial_info() # get current time (self.t0) self.t0 = self.get_current_trial_time() # show the fixation for the durati...
<reponame>KnowingNothing/akg-test #!/usr/bin/env python3 # coding: utf-8 # Copyright 2019 Huawei Technologies Co., Ltd # # 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.or...
self.searching_done.clear() def Redraw(self): with self.redraw_lock: try: os.write(self._redraw_fd, b"?") except: logging.error(traceback.format_exc()) def _FdWriteHandler(self, data): self.event_loop.draw_screen() class BibtexRepo(BibRepo): def __init__(self, glob_expr, event_loop, enabled): super().__ini...
import datetime import json from typing import Dict, List, Optional import json_merge_patch from loguru import logger from sqlalchemy import Column, DateTime, MetaData, Table, func, text from sqlalchemy.dialects import postgresql from sqlalchemy.engine import Row from sqlalchemy.exc import ( IntegrityError, NoResult...
""" Windows XP functions """ from typing import Sequence, List, Tuple, Dict, Callable, Union, Optional from ctypes import c_wchar_p, c_int from ctypes import sizeof as c_sizeof from ctypes import cast as c_cast import atexit from .windows_common import ( byref, create_unicode_buffer, DWORD, UINT, LONG, CHAR, BOOL, ...