input
stringlengths
2.65k
237k
output
stringclasses
1 value
""" Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). :param resource_group_name: Name of resource group :type resource_group_name: str :param name: Name of hostingEnvironment (App Service Environment) :type name: str :param worker_pool_name: Name of worker pool :type ...
import matplotlib.pyplot as plt from pathlib import Path import pandas as pd import os import numpy as np def get_file_paths(file_directory): file_paths = os.listdir(file_directory) file_paths = list(filter(lambda f_path: os.path.isdir(file_directory / f_path), file_paths)) return file_paths def plot_day(plot_di...
<reponame>Anton-Latukha/wakatime # -*- coding: utf-8 -*- """ wakatime.arguments ~~~~~~~~~~~~~~~~~~ Command-line arguments. :copyright: (c) 2016 <NAME>. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import re import time import traceback from .__about__ impor...
<reponame>cajal/inception_loop2019<filename>staticnet_analyses/utils.py<gh_stars>1-10 is_cuda = lambda m: next(m.parameters()).is_cuda from datajoint.expression import QueryExpression import numpy as np import torch import torch.nn as nn import pandas as pd from contextlib import contextmanager import hashlib from sc...
<gh_stars>1-10 #!/usr/bin/python import numpy as np import timeit from enum import Enum import logging __author__ = 'Reem' _log = logging.getLogger(__name__) D_ROWS = 0 D_COLS = 1 D_ROWS_COLS = 2 class Levels(Enum): detail = 4 middle = 2 overview = 0 # reads a csv file (using full file path) and returns the d...
the default reaction.upper_bound = 1000. # This is the default reaction.add_metabolites({ATP_SLP_EEO: -1.0, ATP_SLP: EEO_Abnd}) model.add_reactions([reaction]) print(reaction.name + ": " + str(reaction.check_mass_balance())) reaction = Reaction('EEO_ATP_HYDRO') reaction.name = 'ATP (excess) consumed via hydr...
\text{cond} \cdot \sigma_1`. If :attr:`cond`\ `= None` (default), :attr:`cond` is set to the machine precision of the dtype of :attr:`A`. This function returns the solution to the problem and some extra information in a named tuple of four tensors `(solution, residuals, rank, singular_values)`. For inputs :attr:`A`, :...
= V_{i+1}(:,k)'*VV_{i+1}(:,j) R[k, j] = np.dot(mat[:, indspk], A[:, j]) # UU_{i+1}(:,j) = UU_{i+1}(:,j) - U_{i+1}(:,k)B_{i+1}(k,j) # VV_{i+1}(:,j) = VV_{i+1}(:,j) - V_{i+1}(:,k)A_{i+1}(k,j) # prod[0:m, j] = prod[0:m, j] - T[s*i+k, s*(i-1)+j]*U[0:m, s*i+k] # prod[0:n, j] = prod[0:n, j] - T[inds+j, indspk]*V[0:n, in...
<reponame>mahs4d/tsetmc-webservice<gh_stars>1-10 from datetime import date from decimal import Decimal from enum import Enum from typing import List import zeep class Flow(Enum): GENERAL = 0 BOURSE = 1 FARABOURSE = 2 ATI = 3 PAYE_BOURSE = 4 PAYE_FARABOURSE = 5 class WebserviceClient: def __init__(self, user...
# Author: <NAME> <<EMAIL>> # License: Python Software Foundation License """ A Python wrapper to access Amazon Web Service(AWS) E-Commerce Serive APIs, based upon pyamazon (http://www.josephson.org/projects/pyamazon/), enhanced to meet the latest AWS specification(http://www.amazon.com/webservices). This module defin...
<filename>agent0/common/atari_wrappers.py import copy from collections import deque, defaultdict import cv2 import gym import numpy as np from gym import spaces from lz4.block import compress cv2.ocl.setUseOpenCL(False) class ClipActionsWrapper(gym.Wrapper): def step(self, action: int): action = np.nan_to_num(act...
<gh_stars>10-100 import json import os import time from csep.core import forecasts from csep.core import catalogs from csep.core import poisson_evaluations from csep.core import catalog_evaluations from csep.core import regions from csep.core.repositories import ( load_json, write_json ) from csep.core.exceptions ...
from collections import namedtuple import operator import typing import warnings import numpy as np import audeer from audmetric.core.utils import ( assert_equal_length, infer_labels, scores_per_subgroup_and_class, ) def accuracy( truth: typing.Sequence[typing.Any], prediction: typing.Sequence[typing.Any], l...
def source_defines_messageID(self): """True if this message is :attr:`CON<Type_CON>` or :attr:`NON<Type_NON>`. :attr:`CON<Type_CON>` and :attr:`NON<Type_NON>` messages are responsible for selecting a :attr:`messageID` at the :attr:`source_endpoint`. :attr:`ACK<Type_ACK>` and :attr:`RST<Type_RST>` messages are m...
- 3.92092028715294E-11*m.x623 - 5.55124997142466E-9*m.x624 - 6.71129331537853E-8*m.x625 - 5.55124997142466E-9*m.x626 - 3.92092028715291E-11*m.x627 - 2.7693971587199E-13*m.x628 - 3.92092028715291E-11*m.x629 - 4.74027403715494E-10*m.x630 - 3.92092028715291E-11*m.x631 - 2.76939715871989E-13*m.x632 - 3.16502532425133E-1...
of (+) -> TTTG_24_58847416_24_58847448_137M10S_147M_fwd_R1 NB500964:12:HTTG2BGXX:4:22601:26270:1144|TTTG 99 24 58847416 17 137M10S 24 58847448 137 R2 of (+) -> TTTG_24_58847448_24_58847416_137M10S_147M_rev_R2 NB500964:12:HTTG2BGXX:4:22601:26270:1144|TTTG 147 24 58847448 17 147M 24 58847416 147 R1 of (-) -> TGTT_2...
= 0.0 Hprime[n:, 0:n] = 0.0 Hprime[n:, n:] = 0.0 # Step3: transform back to original coordinate system w -> v = invB @ w projected_hessian = B.T @ Hprime @ B return projected_hessian def _opt_projection_for_operation_cis(self, method="L-BFGS-B", maxiter=10000, maxfev=10000, tol=1e-6, verbosity=0): printer = _...
<gh_stars>1-10 # Working on: EOL Reached. # Finished: FINAL RELEASE v2.0 # Update Description: Finishes up all features. Everything will be completed after 2.0 gets released. This will be the last update to S.A.N.E. # Future Ideas: NEOL Reached. # Imports from tkinter.constants import END import speech_recognition a...
<filename>venv/Lib/site-packages/matplotlib/image.py """ The image module supports basic image loading, rescaling and display operations. """ import math import os import logging from pathlib import Path import numpy as np import PIL.PngImagePlugin import matplotlib as mpl from matplotlib import _api ...
<filename>xxurl/xxurl.py import os import re import elist.elist as elel import edict.edict as eded import tlist.tlist as tltl import estring.estring as eses import urllib.parse import ipaddress import posixpath from efdir import fs # https://url.spec.whatwg.org/#concept-url-origin # https://docs.python....
self).__init__(**kwargs) self.value = value self.location = None self._type = 'News' class NewsArticle(Article): """Defines a news article. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :param _ty...
<reponame>avilella/modPhred<gh_stars>1-10 #!/usr/bin/env python3 desc="""Generate plots based on var.tsv.gz (mod_report.py output). More info at: https://github.com/lpryszcz/modPhred Dependencies: numpy, pandas, matplotlib """ epilog="""Author: <EMAIL> Barcelona, 23/06/2019 """ import gzip, os, pickle, sys from dat...
let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b in a + b + let a = b i...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_stats_utils.ipynb (unless otherwise specified). __all__ = ['cPreProcessing', 'cStationary', 'cErrorMetrics'] # Cell import numpy as np import pandas as pd from scipy.stats import boxcox, pearsonr from scipy.special import inv_boxcox from pandas.tseries.frequencies im...
<reponame>bgraedel/arcos4py """Module to track and detect collective events. Example: >>> from arcos4py.tools import detectCollev >>> ts = detectCollev(data) >>> events_df = ts.run() """ from typing import Union import numpy as np import pandas as pd from scipy.spatial import KDTree from sklearn.clus...
<gh_stars>1-10 #!/usr/bin/env python3 """ does distributed load testing using Locust on NCS instances """ # standard library modules import argparse import contextlib import getpass import json import logging import os import socket import signal import subprocess import sys import threading import time import uuid #...
while len(result)!=k+1: result=result+a+b a=b b=result if len(result)>=k: break return result[k] #Rversing the Reversed def reverse_reversed(items): reversed = [] for item in items[::-1]: if isinstance(item, list): reversed.append(reverse_reversed(item)) else: reversed.append(item) re...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<reponame>c-nuro/airflow # 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 # "L...
8, 9, 6], [7, 2, 9, 5, 4, 1], [6, 3, 9, 2, 5, 2], [3, 7, 5, 8, 9, 3], ], dtype=np.float32, ), ) ) def _test_eager_boxing_with_overlapping_placement_s1_to_b( test_case, in_device, out_device ): if flow.env.get_rank() == 0: np_arr = np.array( [ [4, 6, 5, 20, 8, 9], [6, 8, 9, 0, 4, 6], [3, 7, 5, 0, 3, 5],...
self._find_key.delete(key) self._match_doc_id.delete(doc_id) self._find_key_in_leaf.delete(containing_leaf_start, key) return True def delete(self, doc_id, key, start=0, size=0): containing_leaf_start, element_index = self._find_key_to_update( key, doc_id)[:2] self._delete_element(containing_leaf_start, element...
<reponame>XilinJia/Negociant ''' Project: Negociant Copyright (c) 2017 <NAME> <https://github.com/XilinJia> This software is released under the MIT license https://opensource.org/licenses/MIT ''' # encoding: utf-8 ''' 本文件包含了CTA引擎中的策略开发用模板,开发策略时需要继承CtaTemplate类。 ''' from datetime import datetime, timedelta, time impo...
if_none_match, 'str') if if_tags is not None: header_parameters['x-ms-if-tags'] = self._serialize.header("if_tags", if_tags, 'str') # Construct and send request request = self._client.put(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs...
date when you are installing new packages. # ### Managing `conda` environments # # #### What is a conda environment and why is it so useful? # # Using `conda`, you can create an isolated R or Python virtual environment for your project. # The default environment is the `base` environment, # which contains only the e...
by")) notes = models.TextField(_("Notes"), max_length=765, blank=True, null=True) create_date = models.DateTimeField(null=True, blank=True) edit_date = models.DateTimeField(null=True, blank=True) objects = StakeholderManager() class Meta: ordering = ('country','name','type') verbose_name_plural = _("Stakeholder...
other are equal, false otherwise.""" if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other: 'AssetSystemMetadataUsage') -> bool: """Return `true` when self and other are not equal, false otherwise.""" return not self == other class DataFlowPagedColl...
(SELECT name FROM temp.temp_not_used_terms);\n' % (table, term)) out.write('DROP TABLE temp.temp_not_used_terms;\n') out.write('DROP TABLE temp.temp_all_terms;\n') out.write('DROP TABLE temp.temp_used_terms;\n') out.write('\n') def update_mapped_terms(out): """ Update the terms with the values from the existin...
1213 "https://play.google.com/store/apps/details?id=com.globalegrow.app.gearbest", # 1214 "http://amazon.com/gp/bestsellers/electronics/281052", # 1215 "http://amazon.ca/", # 1216 "https://www.bukalapak.com/", # 1217 "http://www.olx.in/", # 1218 "http://photo.gmw.cn/2016-01/04/content_18342869.htm", # 1219 ...
sequence per batch. window_per_building : dict Keys are Building instance integers. Must have one for each building. Values are (<start>, <end>) dates (or whatever nilmtk.DataSet.set_window() accepts) """ self._set_logger(logger) self.dataset = DataSet(filename) self.appliances = appliances if max_input_pow...
True]) assert result.equals(expected) def test_fill_null(): arr = pa.array([1, 2, None, 4], type=pa.int8()) fill_value = pa.array([5], type=pa.int8()) with pytest.raises(pa.ArrowInvalid, match="Array arguments must all be the same length"): arr.fill_null(fill_value) arr = pa.array([None, None, None, None], ty...
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from django.utils.translation import gettext as _ from django.core.exceptions import ObjectDoesNotExist from sales.models import Sales, SalesDetails # from purchases.models import PurchasesProductsDetails from datetim...
the mw_lutman for the AWG8 # only x2 and x3 downsample_swp_points available angles = np.arange(0, 341, 20 * downsample_swp_points) p = mqo.conditional_oscillation_seq_multi( Q_idxs_target, Q_idxs_control, Q_idxs_parked, platf_cfg=self.cfg_openql_platform_fn(), disable_cz=disable_cz, disabled_cz_duration=disab...
<reponame>AbhinavGopal/ts_tutorial """Agents for neural net bandit problems. We implement three main types of agent: - epsilon-greedy (fixed epsilon, annealing epsilon) - dropout (arXiv:1506.02142) - ensemble sampling All code is specialized to the setting of 2-layer fully connected MLPs. """ import numpy as np im...
""" Test of Summary tables. This has many test cases, so to keep files smaller, it's split into two files: test_summary.py and test_summary2.py. """ import actions import logger import summary import testutil import test_engine from useractions import allowed_summary_change from test_engine import Table, Column, View...
<reponame>learnforpractice/pyeos<gh_stars>100-1000 import eoslib from eoslib import N,read_message,require_auth,now try: import struct except Exception as e: #load struct module in micropython import ustruct as struct exchange = N(b'exchange') currency = N(b'currency') table_account = N(b'account') table_asks = N(...
import numpy as np from . import regimes as REGI from . import user_output as USER import multiprocessing as mp import scipy.sparse as SP from .utils import sphstack, set_warn, RegressionProps_basic, spdot, sphstack from .twosls import BaseTSLS from .robust import hac_multi from . import summary_output as SUMMARY from ...
des reinettes king of the pippins apples", "3352": "reinettes and heritage varieties incl canada blanc reinette du mans armorique vigan calville apples", "3353": "st edmunds pippin apples", "3354": "ripe ready to eat avocados", "3355": "strawberries nominal 500g 1 litre berries", "3356": "strawberries nominal250g ...
<gh_stars>0 #!/usr/bin/env python3 # MIT License # # Copyright (c) 2020 ADCIRC Development Group # # 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 limit...
<filename>expand.py #!/usr/bin/env python2 from base import * from atom import * from quilt import * import drum import flatten import globs import vat ExFunc, ExStaticDefn, ExInnerFunc = ADT('ExFunc', 'ExStaticDefn', 'ExInnerFunc', ('closedVars', 'set([*Var])')) EXFUNC = new_env('EXFUNC', ExFunc) ExGlobal = DT('E...
<gh_stars>1-10 #coding: utf-8 #created by @hiromin0627 #<NAME> v5 mlgbotver = '5.1.2' import glob import gettext import os import discord import asyncio import re,random import datetime from threading import (Event, Thread) from urllib import request import configparser import json ini = configparser.ConfigParser() i...
<gh_stars>1-10 #!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. <NAME> (<EMAIL>) and the # RMG Team (<EMAIL>) # # Permission is hereby granted, free of charge, to any person ...
<reponame>sboosali/commands-frontends-dragon13 # # Python Macro Language for Dragon NaturallySpeaking # (c) Copyright 1999 by <NAME> # Portions (c) Copyright 1999 by Dragon Systems, Inc. # # _mouse.py # Sample macro file which implements mouse and keyboard movement modes # similar to DragonDictate for Windows # # April...
# # Author: <NAME> 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy import special from scipy.special import entr, logsumexp, betaln, gammaln as gamln from scipy._lib._numpy_compat import broadcast_to from scipy._lib._util impo...
<reponame>DaniDuran/Selenium_Inmofianza import openpyxl import pyodbc as pyodbc from functions.Inicializar import Inicializar from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as E...
<reponame>thaibault/boostNode #!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # region header ''' This module provides an easy way to compile, run and clean up a various \ number of scripts. ''' # # python3.5 # # pass from __future__ import absolute_import, division, print_function, \ unicode_literals # # ''' ...
import datetime import json from aiohttp import request import random import inspect import os import dbl import aiohttp import io import asyncpraw import discord import DiscordUtils import httpx from discord.ext import commands from dotenv import load_dotenv from prsaw import RandomStuff from dotenv import load_dotenv...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Mar 24 13:43:28 2017 @author: nightowl """ from __future__ import print_function import os # from fuzzywuzzy import fuzz from shutil import copyfile from ..io.database.sql_to_python import QuerySQL from ..io.database.sql_connector import DVH_SQL from ....
pulumi.get(self, "mirror_overwrites_diverged_branches") @property @pulumi.getter(name="mirrorTriggerBuilds") def mirror_trigger_builds(self) -> bool: return pulumi.get(self, "mirror_trigger_builds") @property @pulumi.getter(name="mirrorUserId") def mirror_user_id(self) -> int: return pulumi.get(self, "mirror_...
<gh_stars>10-100 # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ Flex Messaging implementation. This module contains the message classes used with Flex Data Services. @see: U{RemoteObject on OSFlash (external) <http://osflash.org/documentation/amf3#remoteobject>} @since: 0.1 """ import uuid ...
<reponame>BlackLight/platypush<filename>platypush/backend/button/flic/fliclib/aioflic.py """Flic client library for python Requires python 3.3 or higher. For detailed documentation, see the protocol documentation. Notes on the data type used in this python implementation compared to the protocol documentation: All k...
<filename>orix/tests/quaternion/test_symmetry.py<gh_stars>1-10 # -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix 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 Foun...
#!/usr/bin/env python from __future__ import print_function import re import shutil import unittest from ruffus.combinatorics import * from ruffus.ruffus_utility import RUFFUS_HISTORY_FILE, CHECKSUM_FILE_TIMESTAMPS from ruffus.ruffus_exceptions import RethrownJobError from ruffus import pipeline_run, pipeline_printout,...
from typing import List from summer.compute import ComputedValueProcessor from autumn.models.covid_19.constants import ( INFECT_DEATH, INFECTION, Compartment, NOTIFICATIONS, HISTORY_STRATA, INFECTION_DEATHS, COMPARTMENTS, Vaccination, PROGRESS, Clinical, History, Tracing, NOTIFICATION_CLINICAL_STRATA, HOSTPIALISED...
<reponame>vermaport/crossenv import venv import os import sysconfig import glob import sys import shutil from textwrap import dedent import subprocess import logging import importlib import types from configparser import ConfigParser import random import shlex import platform import pprint import re from .utils import...
related to Diagnosis. **Inclusion Criteria:** Includes only relevant concepts associated with a diagnosis of optic chiasm disorders or injuries or optic glioma. **Exclusion Criteria:** Excludes concepts that pertain to 'unspecified eye.' """ OID = '2.16.840.1.113883.3.526.3.1457' VALUE_SET_NAME = 'Disorders of ...
<reponame>holly-evans/airflow # # 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 (t...
''' Created on 5 Jan 2022 @author: laurentmichel ''' from lxml import etree from copy import deepcopy from . import logger from .exceptions import * from .annotation_seeker import AnnotationSeeker from .resource_seeker import ResourceSeeker from .table_iterator import TableIterator from .static_reference_resolver impo...
Se ha producido un error comprobando apuestas, cancelamos") print(e) flag_click = 0 contador = 0 while(flag_click == 0): try: cancelar = driver.find_element_by_xpath("(//button[@class='deleteAll button button-md button-clear button-clear-m...
import argparse import json import logging import operator import os import re import sys import traceback import yaml from collections import defaultdict from greent.servicecontext import ServiceContext from greent.graph import Frame from greent.graph import TypeGraph from greent.graph_components import KNode, KEdge f...
<gh_stars>10-100 """ qtl.py contains wrappers around C++ Limix objects to streamline common tasks in GWAS. """ import scipy as SP import scipy.stats as ST import limix import limix.utils.preprocess as preprocess import limix.deprecated.modules.varianceDecomposition as VAR import limix.utils.fdr as FDR import time #TO...
from __future__ import (division) from pomegranate import * from pomegranate.io import DataGenerator from pomegranate.io import DataFrameGenerator from nose.tools import with_setup from nose.tools import assert_almost_equal from nose.tools import assert_equal from nose.tools import assert_not_equal from nose.tools im...
<gh_stars>0 """API for JupyterHub's proxy. Custom proxy implementations can subclass :class:`Proxy` and register in JupyterHub config: .. sourcecode:: python from mymodule import MyProxy c.JupyterHub.proxy_class = MyProxy Route Specification: - A routespec is a URL prefix ([host]/path/), e.g. 'host.tld/path/' f...
<filename>resrace_ppo.py<gh_stars>1-10 import numpy as np import tensorflow.compat.v1 as tf import gym import time import math import pybullet import matplotlib.pyplot as plt import spinup.algos.tf1.ppo.core as core from spinup.utils.logx import EpochLogger from spinup.utils.mpi_tf import MpiAdamOptimizer, sync_all_par...
"GYRAL", "GYRED", "GYRES", "GYRON", "GYROS", "GYRUS", "GYTES", "GYVED", "GYVES", "HAAFS", "HAARS", "HABLE", "HABUS", "HACEK", "HACKS", "HADAL", "HADED", "HADES", "HADJI", "HADST", "HAEMS", "HAETS", "HAFFS", "HAFIZ", "HAFTS", "HAGGS", "HAHAS", "HAICK", "HAIKA", "HAIKS", "HAIKU", "HAILS", ...
# -*- coding: utf-8 -*- """ Created on Thu Feb 16 15:24:36 2017 @author: Zoë """ import numpy as np #%% # Implement an 8x3x8 autoencoder. This neural network should take a matrix input and return the same matrix as an output. # First, represent the neural network as a list of layers, where each layer in the network ...
<reponame>tecnickcom/binsearch<filename>python/test/test_binsearch_col.py """Tests for binsearch module - column mode.""" import binsearch as bs import os from unittest import TestCase nrows = 251 testDataCol8 = [ (0, 251, 0x00, 0, 0, 0, 1, 2, 2), (1, 251, 0x00, 1, 1, 1, 1, 2, 2), (0, 251, 0x01, 2, 2, 2, 2, 3, 3...
os.mkdir mode parameter must have length of 4") pythonPg = """\"\"\"import os if os.path.exists('%s') == False: os.mkdir('%s', %s)\"\"\" """ % (directory, directory, str(mode)) cmdStr = """python -c %s""" % pythonPg Command.__init__(self,name,cmdStr,ctxt,remoteHost) @staticmethod def remote(name,remote_host,dir...
<reponame>timcu/irc_builder<filename>python/ircbuilder/__init__.py import base64 import json import logging import math import pprint import queue import random import socket import ssl import string import sys import threading import time import zlib from contextlib import contextmanager from ircbuilder import nodeb...
from time import sleep import uuid import requests from requests import RequestException import logging from typing import Union from prefect import Task from prefect.engine.signals import FAIL from prefect.utilities.tasks import defaults_from_attrs class ConnectionNotFoundException(Exception): pass class Airby...
<filename>test/mitmproxy/test_flow.py import mock import io import netlib.utils from netlib.http import Headers from mitmproxy import filt, controller, flow, options from mitmproxy.contrib import tnetstring from mitmproxy.exceptions import FlowReadException from mitmproxy.models import Error from mitmproxy.models impo...
1. Does not require partial derivatives, thus can be used with complicated, 3D velocity structures 2. Accurate recovery of moderately irregular (non-ellipsoidal) PDF's with a single minimum 3. Only only moderately slower (about 10 times slower) than linearised, iterative location techniques, and is much faster (a...
from collections import defaultdict import numpy as np import pandas as pd from scipy.stats import chi2_contingency, fisher_exact, f_oneway from .simulations import classifier_posterior_probabilities from .utils.crosstabs import (crosstab_bayes_factor, crosstab_ztest, top_bottom_crosstab) from .utils.validate impor...
an instance attribute using the general syntax `object.attribute`: # Check gary's attributes print(gary.sound) # This is an class attribute print(gary.name) # This is a instance attribute For completeness' sake, note that we are still able to carry out the associated `Dog` methods on `gary`: # Check gary's methods g...
<reponame>zc-BEAR/Course_Repo<filename>CS303_Pro/AI_Project1/test1.py import numpy as np COLOR_BLACK = 1 COLOR_WHITE = -1 COLOR_NONE = 0 class AI(object): def __init__(self, chessboard_size, color, time_out): self.chessboard_size = chessboard_size self.color = color self.time_out = time_out self.candidate_list =...
# 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...
#!/usr/bin/env python3 # Copyright (C) 2020 <NAME> and mtrycz # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Tests basic functionality of the getblocktemplatelight and submitblocklight RPC methods. """ import os import platf...
___class_destructor__ = _gui.GuiWindowArray____class_destructor__ GuiWindowArray_swigregister = _gui.GuiWindowArray_swigregister GuiWindowArray_swigregister(GuiWindowArray) def GuiWindowArray_class_info(): return _gui.GuiWindowArray_class_info() GuiWindowArray_class_info = _gui.GuiWindowArray_class_info def GuiWindo...
<reponame>adrienxu/SATE<filename>fairseq/models/dlcl_transformer.py # 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. from typing import Any, Dict, List, Optional, Tuple import logging import...
<reponame>jojoba106/OpenPype<filename>openpype/modules/default_modules/ftrack/event_handlers_server/event_push_frame_values_to_task.py import collections import datetime import ftrack_api from openpype_modules.ftrack.lib import ( BaseEvent, query_custom_attributes ) class PushFrameValuesToTaskEvent(BaseEvent): # ...
self._xref_table(model, 'kzz_table', msg=msg) self._xref_table(model, 'cp_table', msg=msg) self._xref_table(model, 'hgen_table', msg=msg) def uncross_reference(self) -> None: """Removes cross-reference links""" self.mid = self.Mid() self.kxx_table = self.Kxx_table() self.kxy_table = self.Kxy_table() self.kxz_t...
<filename>AlGDock/argument_parser.py import os import multiprocessing import cPickle as pickle import gzip import numpy as np from collections import OrderedDict from AlGDock import arguments from AlGDock import dictionary_tools from AlGDock import path_tools from AlGDock.IO import load_pkl_gz from AlGDock.IO impo...
<reponame>Aazhar/biblio-glutton-harvester import boto3 import botocore import sys import os import shutil import gzip import json import pickle import lmdb import uuid import subprocess import argparse import time import S3 from concurrent.futures import ThreadPoolExecutor import subprocess import tarfile from random i...
source_ca_cert target_api_addrs_ = target_api_addrs target_ca_cert_ = target_ca_cert # Validate arguments against known Juju API types. if attempt_ is not None and not isinstance(attempt_, int): raise Exception("Expected attempt_ to be a int, received: {}".format(type(attempt_))) if migration_id_ is not None an...
#------------------------------------------------------------------------------- # The Blob Test # Based on the test presented in # 1. <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, et al. # Fundamental differences between SPH and grid methods. Monthly Notices of # the Royal Astronomical Society. 2007; 380(3):963-97...
''' Copyright 2017, Fujitsu Network Communications, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
<gh_stars>0 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- # @Time : 2019/9/13 15:36 # @Author : liufang # @File : model.py import os import sys import cv2 import numpy as np import torch import torch.nn as nn from torch.nn import init import torch.optim as optim import torch.nn.functional as F import functools from ...
). The name can be up to 256 characters long. When using ReceiveMessage , you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.* . (string) -- MaxNum...
!= 0: raise PulpSolverError("Error in CPXmipopt status=" + str(status)) else: status = CPLEX_DLL.lib.CPXlpopt(self.env, self.hprob) if status != 0: raise PulpSolverError("Error in CPXlpopt status=" + str(status)) self.cplexTime += clock() def actualSolve(self, lp): """Solve a well formulated lp problem""" #...
<filename>foo/wx/wx_voucher.py #!/usr/bin/env python # _*_ coding: utf-8_*_ # # Copyright 2016 <EMAIL> # <EMAIL> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
# Copyright 2017 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...