input
stringlengths
2.65k
237k
output
stringclasses
1 value
<gh_stars>1-10 from congregation.lang import * from congregation.dag import Dag from congregation.dag.nodes.internal import * from congregation.comp import compile_dag from tests.utils import create_cols, compare_to_expected import pytest """ Tests for correct propagation of the following relation-level and column-le...
from itertools import count import os import csv import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import imageio import math from .plot_ss import * def count_line(file_path): with open(file_path) as f: for line_count, _ in enumerate(f, 1): pass return lin...
( "ERROR! XSDataResultBioSaxsHPLCv1_0 constructor argument 'subtractedCurve' is not XSDataFile but %s" % self._subtractedCurve.__class__.__name__ ) raise BaseException(strMessage) if autoRg is None: self._autoRg = None elif autoRg.__class__.__name__ == "XSDataAutoRg": self._autoRg = autoRg else: strMessage = ...
"▁ille": 35192, "▁knows": 35193, "▁lapse": 35194, "▁mere": 35195, "▁perdi": 35196, "▁pirat": 35197, "▁procedure": 35198, "▁reserve": 35199, "▁sep": 35200, "▁supply": 35201, "▁travers": 35202, "▁vegeta": 35203, "▁vitam": 35204, "▁xal": 35205, "▁Ä": 35206, "丘": 35207, "奈": 35208, "庫": 35209, "战": 35210,...
#!/usr/bin/env python ''' Dashboard: A graphical interface to view the status of various systems on NaviGator and a control panel to interact with the running system. ''' import functools import os from navigator_alarm import AlarmListener from navigator_msgs.msg import Hosts, Host from python_qt_binding import QtC...
= ldata[y] ydata[p] = (val, dev) script = '''r=%s\n''' % json.dumps(data) return script # ----------------------------------------------------------------------------- def tmdata(): """ Controller to extract tree map data """ MAX_LEVEL = 3 # the lowest level for child lookups # Requested locations if not len...
"gari": 14712, "pou": 14713, "xer": 14714, "▁she": 14715, "▁Kuch": 14716, "IDA": 14717, "▁Allar": 14718, "▁Kaf": 14719, "adis": 14720, "imin": 14721, "▁fake": 14722, "gina": 14723, "▁1300": 14724, "lagen": 14725, "▁FF": 14726, "dere": 14727, "mele": 14728, "rana": 14729, "▁more": 14730, "203": 14731,...
<filename>pip_tests.py # Source code to reproduce the results given in the paper: # "A Novel Point Inclusion Test for Convex Polygons Based on Voronoi Tessellations" # BSD 3-Clause License # # Copyright (c) 2020, <NAME>, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or witho...
""" show_isis.py IOSXE parsers for the following show commands: * show isis neighbors * show isis hostname * show isis lsp-log * show isis database * show isis database detail * show isis database verbose * show isis node * show isis topology * show isis topology {flex_algo} * show isis flex-algo * show is...
<reponame>google-cloud-sdk-unofficial/google-cloud-sdk """Generated client library for sddc version v1alpha1.""" # NOTE: This file is autogenerated and should not be edited by hand. from __future__ import absolute_import from apitools.base.py import base_api from googlecloudsdk.third_party.apis.sddc.v1alpha1 import s...
in the local history Arguments: * operation -- the operation source * history_content -- the content needed to keep """ settings = context.get_settings() if not settings["keep_operation_history"]: return splits = operation.split("/") if len(splits) == 1: folder, operation = "", splits[0] elif len(splits) =...
isinstance(op, StridedSliceOp): # StridedSliceOps can have mask attributes get_slice_attributes_from_op(tf_sess, tf_op, op) elif isinstance(op, SplitOp): get_split_attributes_from_op(tf_sess, tf_op, op) elif isinstance(op, (Conv2DOp, Conv2DGradFilterOp, Conv2DGradInputOp)): get_conv_attributes_from_op(tf_sess,...
<reponame>evereux/catia_python #! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscri...
new_df.iloc[:, :split_id].copy(deep=True) to_split = df[[col_name]].copy(deep=True) to_join = df.iloc[:, (split_id+1):].copy(deep=True) cols_to_add = np.hstack((org_col_index[(split_id+1):], '')) to_join[''] = pd.Series([np.NaN]*to_join.shape[0]) #split the column: to_split = to_split[col_name].str.split(self.r...
Format string for text file output. Each entry in the array is formatted to text by first converting it to the closest Python type, and then using "format" % item. Notes ----- This is a convenience function for quick storage of array data. Information on endianness and precision is lost, so this method is not a...
<reponame>Martje55555/carla-rl-agent """Proximal Policy Optimization Agent""" import os import gym import time import numpy as np import tensorflow as tf import tensorflow_probability as tfp import random from typing import Union from rl import utils from rl.agents.agents import Agent from rl.parameters import Dynam...
# -*- coding: utf-8 -*- # # Copyright (c) nexB Inc. and others. # SPDX-License-Identifier: Apache-2.0 # # Visit https://aboutcode.org and https://github.com/nexB/ for support and download. # ScanCode is a trademark of nexB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this f...
output form." % output) if rp is not None and rp < 0: raise ValueError("passband ripple (rp) must be positive") if rs is not None and rs < 0: raise ValueError("stopband attenuation (rs) must be positive") # Get analog lowpass prototype if typefunc == buttap: z, p, k = typefunc(N) elif typefunc == ...
import functools import hashlib import logging import os import shutil import sys from io import BytesIO from shutil import copy, rmtree from tempfile import mkdtemp import pytest from mock import Mock, patch import pip from pip._internal.download import ( CI_ENVIRONMENT_VARIABLES, MultiDomainBasicAuth, PipSession...
p1Five +=1 # else: # p2Five +=1 # #Five to the right # if j < 11: # if state[i][j] == state[i][j+1] == state[i][j+2] == state[i][j+3] == state[i][j+4]: # if state[i][j] == p1Marker: # p1Five +=1 # else: # p2Five +=1 # #Five to the upper right # if i > 3...
from collections.abc import Callable, Iterable, Mapping from neuwon.database import memory_spaces from neuwon.database.database import DB_Class, DB_Object, Database from neuwon.database.doc import Documentation from neuwon.database.dtypes import * import cupy import numpy as np class DataComponent(Documentation): """...
#!/usr/bin/env vpython3 # Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import base64 import os import sys import unittest import six # Same reasoning as below. if six.PY3: import urllib.error # This s...
new_loc = DFLocation() new_loc.set_to_other(self) return new_loc def _exec_arithmetic( self, other: typing.Union[ "DFLocation", typing.Optional[typing.Iterable[AnyNumber]], AnyNumber ], arithmetic: typing.Callable, *, op_name: str ): """Executes some arithmetic within the Location and returns a new one. Pa...
(self.samples_per_cluster[idx, i] == 0): # raise ValueError("\n\nCluster %d of file %s has no samples!\n\n" % (i, fpath)) if (np.sum(self.samples_per_cluster[idx, :]) != self.num_samples): raise ValueError("\n\nSamplers per cluster sum: %d, not equal to total num samples: %d\n\n" % (np.sum(self.samples_per_cluster[i...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from djitellopy.tello import Tello import cv2 import numpy as np import time import datetime import os import argparse # standard argparse stuff parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False) parser.add_argument('-h', '--help', action='help', default=argparse.S...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 18-8-8 下午8:06 # @Author : Tom.Lee # @File : mysqld_exporter.py # @Product : PyCharm # @Docs : # @Source : from .exporter import Exporter from ..prometheus import prom class MysqlExporter(Exporter): """ mysql status info """ @prom def mysql_exporter_colle...
#!/usr/bin/env python # System import sys from subprocess import call import string import os import pwd import grp import json from distutils.util import strtobool import re # Third Party import configargparse class Installer: FLAVOR_VANILLA = "vanilla" FLAVOR_DCOS = "dcos" def main(self): # Handle argumen...
<filename>src/config/vnc_openstack/vnc_openstack/tests/test_firewall.py # Copyright 2018 Juniper Networks. 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....
already removed') # Kafka endpoint functions kafka_server = 'localhost' class KafkaReceiver(object): """class for receiving and storing messages on a topic from the kafka broker""" def __init__(self, topic, security_type): from kafka import KafkaConsumer remaining_retries = 10 port = 9092 if security_type != ...
<reponame>fahlmant/openshift-tools #!/usr/bin/env python ''' Interact with Trello API as a CLI or Sopel IRC bot module ''' import argparse from datetime import date from email.mime.text import MIMEText import json import os import re import smtplib import sys # sopel is only for IRC bot installation. Not required fo...
the bucket where the artifact resides" ) region: Optional[str] = Field( None, description="Region contains the optional bucket region" ) roleARN: Optional[str] = Field( None, description="RoleARN is the Amazon Resource Name (ARN) of the role to assume.", ) secretKeySecret: Optional[v1.SecretKeySelector] = Fiel...
self.pupil = np.zeros([self.m_crop, self.n_crop], dtype=np.complex128) # Keep track of which iteration we are on self.current_itr = 0 # Store frame_state_list self.frame_state_list = dataset.frame_state_list # Multiplexing parameters # self.multiplexing = True # if self.multiplexing: # self.numlits = np.ones...
<gh_stars>0 """ Author : <NAME> Mail : <EMAIL> Version : 0.1 Date : 04/12/2019 Update : 14/12/2019 Python : 3.6.5 Update Note : Arranging system of ODE methods and descriptions. This script written by @Author for personal usage. Prerequest : numpy """ import numpy as np class ODE(): """ This class written for...
<filename>build/lib/bilateralshapley/bilateralshapley.py # -*- coding: utf-8 -*- """ Created on Thu Oct 19 11:39:17 2017 @title: Bilateral Shapely Value @author: <NAME> """ import networkx as nx from operator import attrgetter class BSV: ''' Tasks: 1. Establish two networks graphs based on agent a...
------- Signal S_out(i,j) corrected for memory effect Notes ----- * approximation first read-out is obviously wrong, but first readout is not used anyway... * error estimate not implemented """ if verbose: print('(1) Perform memory correction (Reticon detectors)') smr.errorType = 'A' # # read memory correc...
min_tls_version) if tls13 is not None: pulumi.set(__self__, "tls13", tls13) @property @pulumi.getter def ciphers(self) -> Optional[Sequence[str]]: """ List of SSL/TLS ciphers to associate with this certificate. """ return pulumi.get(self, "ciphers") @property @pulumi.getter def http2(self) -> Optional[str...
import hashlib import itertools import logging from django.utils.translation import ugettext as _ import psycopg2 import sqlalchemy from memoized import memoized from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import Index, PrimaryKeyConstrain...
<gh_stars>1-10 # =============================== # author : <NAME> # contact: <EMAIL> # github : github.com/mrluin # =============================== import math import torch import os import time import logging import json from exp.sufficient_update.run_manager import * from utils.common import set_manual_seed from u...
'batchnorm' ] # or: # operations = [ 'relu', 'conv', 'renorm' ] for operation in operations: if operation == 'conv': a = [] for opt_name in [ 'param-stddev', 'bias-stddev', 'use-natural-gradient', 'max-change', 'rank-in', 'rank-out', 'num-minibatches-history', 'alpha-in', 'alpha-out', 'num-filters-in', 'num-f...
edges_original = [(1, 8, {"type": "taxi"}), (1, 9, {"type": "taxi"}), (1, 58, {"type": "bus"}), (1, 46, {"type": "bus"}), (1, 46, {"type": "metro"}), (2, 10, {"type": "taxi"}), (2, 20, {"type": "taxi"}), (3, 4, {"type": "taxi"}), (3, 11, {"type": "taxi"}), (3, 12, {"type": "taxi"}), (3, 22, {"type": "bus"}), ...
"""DGL PyTorch DataLoaders""" from collections.abc import Mapping, Sequence from queue import Queue, Empty, Full import itertools import threading from distutils.version import LooseVersion import math import inspect import re import atexit import os import psutil import torch import torch.distributed as dist from tor...
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 ...
3.</_></rects> <tilted>0</tilted></_> <_> <rects> <_> 10 15 1 2 -1.</_> <_> 10 16 1 1 2.</_></rects> <tilted>0</tilted></_> <_> <rects> <_> 10 15 2 2 -1.</_> <_> 10 15 1 1 2.</_> <_> 11 16 1 1 2.</_></rects> <tilted>0</tilted></_> <_> <rects> <_> 10 16 1 2 -1.</_> <_> 10 17 1 1 2.</_></rects> <t...
not False and keypoints is not None: # self.data['keypoints'] = keypoints if 'kp_classes' not in locals(): kp_classes = list(range(self.data['keypoints'].shape[1])) # HACK self.meta['kp_classes'] = kp_classes self.meta['classes'] = classes return self # --- Data Properties --- @property def class_probs(sel...
try: from TACT import logger except ImportError: pass import pandas as pd import sys import matplotlib.pyplot as plt plt.ioff() # setting to non-interactive import numpy as np import sys from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score from sklearn.metrics import mean_squared_er...
img_inds = np.arange(len(image_paths)) for j in range(num_batches): batch_inds = img_inds[j * batch_size:(j + 1) * batch_size] batch_images, _, batch_lms_small = \ load_images_landmarks_maps( self.img_menpo_list, batch_inds, primary=True, image_size=self.image_size, c_dim=self.c_dim, num_landmarks=self.num_landm...
<filename>commands/serverstats.py import discord from discord.ext import commands from mojang import MojangAPI from utils.utils import hypixel, utils from utils.embeds import Embeds import random import datetime import time as thyme import mystbin import re mystbin_client = mystbin.MystbinClient() class ServerStats(c...
#_ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # <NAME> # Copyright 2018 Keeper Security Inc. # Contact: <EMAIL> # import re import os import base64 import argparse import logging import datetime import getpass from typing import Optional, List import requests...
yaml|grep -w ha|wc -l'.format(vmid) flag = False eventlet.monkey_patch() with eventlet.Timeout(180, False): while 1: time.sleep(0.5) ret = sshClient.tunction(ip=ip, username=username, password=password, cmd=cmd) if not cancle: if int(ret): flag = True break else: if not int(ret): flag = True break assert...
<filename>Chatops/Chatops/run.py import math from mattermostdriver import Driver, Websocket import json from Chatops import config, dialogflowfile, instances import asyncio import threading import boto3 import boto3.session import requests from datetime import datetime from botocore.exceptions import ClientError from t...
<reponame>harvardnlp/readcomp import argparse from collections import defaultdict import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import datastuff class Reader(nn.Module): """ attn sum style reader dealie """ def __init__(self, word_embs, words_new2old, opt): s...
<reponame>entelecheia/electra-tf2<filename>electra/pretrain/pretrain_utils.py # coding=utf-8 # Copyright 2020 The Google Research Authors. # Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wit...
<reponame>mohanedmoh/TBS # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=unused-argument import mock from pyfakefs import fake_filesystem_unittest from py_utils import cloud_storage im...
amber: print("Turning on build of AMBER parameter/coordinate files in order to obtain files for GROMACS via conversion.") amber = True #NOW GENERATE FINAL STORAGE FOR FILE NAMES/COMPONENT LISTS #Now that we're building, we can generate the full set of components #we will be using since we're done adding component...
22, 5): if P[i] in p1: c.append(1) else: c.append(0) else: if not 0 in c: pc.pop(pc.index(j)) if j==4: c = [] for i in range(2, 23, 5): if P[i] in p1: c.append(1) else: c.append(0) else: if not 0 in c: pc.pop(pc.index(j)) if j==5: c = [] for i in range(3, 24, 5): if P[i] in p1: c...
raise Exception("Expected notes_ to be a str, received: {}".format(type(notes_))) if series_ is not None and not isinstance(series_, (bytes, str)): raise Exception("Expected series_ to be a str, received: {}".format(type(series_))) if size_ is not None and not isinstance(size_, int): raise Exception("Expected siz...
:param max_message_size: The maximum allowed message size negotiated for the Link. :type max_message_size: int :param link_properties: Data to be sent in the Link ATTACH frame. :type link_properties: dict :param link_credit: The sender Link credit that determines how many messages the Link will attempt to handle p...
""" ietf_netconf_acm NETCONF Access Control Model. Copyright (c) 2012 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simpl...
< -180: dv.append(diff + 360) else: dv.append(diff) dr = np.array(end_d['r']) - np.array(beg_d['r']) return (np.array(dv), dr) def _add_scalar_data(self, data): """Add scalar values to dataset""" array_id = self._mesh_dataset.point_data.add_array(data) self._mesh_dataset.point_data.get_array(array_id).name = ...
from __future__ import print_function import json import os from faker import Faker from flask import Flask, request from flask_restful import Api from nose.tools import eq_ from jsonpath_ng import jsonpath, parse from halo_flask.base_util import BaseUtil from halo_flask.flask.utilx import Util, status from halo_flas...
<filename>taxontabletools/site_occupancy.py def site_occupancy_barchart(TaXon_table_xlsx, meta_data_to_test, taxonomic_level, path_to_outdirs, x_site_occ, y_site_occ, template, theme, font_size): import os, webbrowser import pandas as pd from pandas import DataFrame from pathlib import Path import plotly.graph_ob...
#!/usr/bin/env python import numpy as np from tqdm import tqdm from astropy.constants import G as Ggrav from .low_level_utils import fast_dist G = Ggrav.to('kpc Msun**-1 km**2 s**-2').value def all_profiles(bins, positions, velocities, masses, two_dimensional=False, zcut=None, ages=None, pbar_msg='Making profiles...
advertise IPv6 graceful restart capability to this neighbor. type: str choices: - enable - disable capability_orf: description: - Accept/Send IPv4 ORF lists to/from this neighbor. type: str choices: - none - receive - send - both capability_orf6: description: - Accept/Send IPv6 ORF lists to/from this ne...
# Author: <NAME> # Contributors: <NAME> import numpy as np import scipy import torch class Geometry(): """Helper class to calculate distances, angles, and dihedrals with a unified, vectorized framework depending on whether pytorch or numpy is used. Parameters ---------- method : 'torch' or 'numpy' (default='t...
button1.bind(on_press=self.crv_callback_click) button1.bind(on_release=self.crv_callback_reqhomebutton) self.data.datarecord.setobject('reqhomebutton', button1, 'button') button1.disabled = True button2 = MyButton(text='Manage Crew') button2.bind(on_release=self.crv_callback_managecrew) button2.bind(on_press=sel...
# coding: utf-8 from __future__ import absolute_import, print_function """ Interface with Spectrum Investigation """ __author__ = "<NAME> <<EMAIL>>" import logging import multiprocessing as mp import numpy as np import os import re import shutil import scipy.optimize as op from random import choice from signal impo...
<gh_stars>1-10 from visupport import * class BaseModule: c = np.cast[theano.config.floatX](- 0.5 * np.log(2 * np.pi)) def __init__(self): # initialise internal energies for # [0]: time-dependent states # [1]: parameters # [2]: hyperparameters self.L = [0., 0., 0.] self._extra_args_ = tuple() def on_energy...
<reponame>termux-one/EasY_HaCk<gh_stars>1000+ from __future__ import print_function import cookielib import hashlib import hmac import HTMLParser import os import re import socket import sqlite3 import struct import sys import textwrap import time import urllib import urlparse # framework libs from recon.core import fr...
= self.at_directive_kind_pattern.match(s2) if m: word = m.group(1) if word not in g.globalDirectiveList: return at.noDirective s3 = s2[m.end(1):] if s3 and s3[0] in ".(": return at.noDirective return at.miscDirective return at.noDirective #@+node:ekr.20041005105605.200: *5* at.isSectionName # returns (flag, ...
max(out_in) _in_out = min(in_out) if _out_in < _in_out: return _out_in, _in_out else: return None def create_maze(shape): # Random Maze Generator using Depth-first Search # http://en.wikipedia.org/wiki/Maze_generation_algorithm # FB - 20121214 my, mx = shape maze = np.zeros(shape) dirs = [(0, 1), (0, -1),...
options: minimize, method='COBYLA' Nmax = 1000 # Max No. of iterations ctol = 1.0e-12 # Constraint absolute tolerance. rhobeg = 0.002 # Reasonable initial changes to the variables. elif method == 'SLSQP': # Optimiser options: minimize, method='SLSQP' Nmax = 1000 # Max No. of iterations ftol = 1.0e-12 # Precision ...
#Daily amount of distance Index('idx_global_statistics_time', 'time'),) # log activity from both mobile and web clients # Note: Web client doesn't have a device_id: Using the latest one for the user global client_log_table client_log_table = Table('client_log', metadata, Column('id', Integer, primary_key=True), ...
df.iloc[:,x][n*1200:1200*(n+1)] = df.iloc[:,x][n*1200:1200*(n+1)] - (df.iloc[:,x][n*1200:int(data.Qonset[n*12])+(n*1200)].mean() + df.iloc[:,x][int(data.Qoffset[n*12])+(n*1200):(n+1)*1200].mean()) / 2 elif rrint + data.Ponset[n*12] < 1200 and (data.Toffset[n*12]-rrint) < 0: temp = df.iloc[:,x][int(n*1200):int...
# -*- coding: utf-8 -*- ############################################################################# # # Copyright © <NAME> # contact: <EMAIL> # # This software is a collection of webservices designed to provide a secure # and scalable framework to build e-commerce websites. # # This software is governed by the CeCIL...
#!/usr/bin/env python3 # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 <EMAIL> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limita...
fc00::101/128 ! interface Loopback1 description Loopback1 ipv4 address 10.100.0.1 255.255.255.0 ipv4 address 10.100.1.1 255.255.255.0 secondary ipv4 address 10.100.2.1 255.255.255.0 secondary ipv6 address fc00:100::1/64 ipv6 address fc00:100::101/64 ipv6 address fc00:100::201/64 ! interface MgmtEth0/RP0/CPU0/0 ...
'cleanButton: ' + str(self.cleanButton) + '\n' s += 'maxButton: ' + str(self.maxButton) + '\n' s += 'distance: ' + str(self.distance) + '\n' s += 'rawAngle: ' + str(self.rawAngle) + '\n' s += 'angleInRadians: ' + str(self.angleInRadians) + '\n' # no data member needed for this next line s += 'angleInDegrees: ' + ...
important build fails to build.""" pass class LKGMCandidateSyncCompletionStage(ManifestVersionedSyncCompletionStage): """Stage that records whether we passed or failed to build/test manifest.""" def _GetSlavesStatus(self): if self._options.debug: # In debug mode, nothing is uploaded to Google Storage, so we byp...
from numpy import zeros, ones, ndarray, average from networkx import adjacency_matrix, Graph from scipy.sparse import diags, lil_matrix, spmatrix from scipy.sparse.linalg import lsqr def forward_hierarchical_levels(graph, weight=None): """Returns the forward hierarchical levels of the nodes of a network as an array...
"""weighted_graph.py: This file is part of the feyncop/feyngen package. Implements the WeightedGraph class. """ # See also: http://people.physik.hu-berlin.de/~borinsky/ __author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright (C) 2014 <NAME>" __license__ = "MIT License" __version__ = "1.0" # Copyrigh...
cmdln, **kwargs): self.cmdln = cmdln kwargs["prog"] = self.cmdln.name _OptionParserEx.__init__(self, **kwargs) self.disable_interspersed_args() def print_help(self, file=None): self.cmdln.onecmd(["help"]) def error(self, msg): raise CmdlnUserError(msg) class SubCmdOptionParser(_OptionParserEx): def set_cmd...
<filename>code/utils/data.py """ Created on Sun Mar 3 21:42:16 2019 @author: <NAME> """ import os import sys import gdal import numpy as np import pandas as pd from sklearn import preprocessing from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression import matplotlib....
enabled C{Status}. """ query_factory = mock_query_factory(payload.sample_s3_get_bucket_versioning_enabled_result) def check_query_args(passthrough): self.assertEqual(query_factory.credentials.access_key, "foo") self.assertEqual(query_factory.credentials.secret_key, "bar") self.assertEqual( RequestDetails( serv...
nan, 2700, 900, nan, 0.73, nan ], [ nan, 3000, 1000, nan, 0.99, nan ], [ nan, 6000, 2000, nan, 4.82, nan ], [ nan, 9000, 3000, nan, 12.88, nan ], [ nan, 12000, 4000, nan, 27.43, nan ], [ nan, 15000, 5000, nan, 46.47, nan ], [ nan, 18000, 6000, nan, 78.11, nan ], [ nan, 21000, 7000, nan, 117.80, nan ], [ nan, 24...
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
Axes will NOT auto-rescale after this is called. """ # 2010-12-02 19:58 IJC: Created from drawRectangle # 2014-03-01 13:51 IJMC: Added 'dodraw' option. import matplotlib.pyplot as plt import matplotlib.patches as mpatches if kw.has_key('ax'): ax = kw.pop('ax') else: ax = plt.gca() p = mpatches.Polygon(xy, ...
import os import re import sys import shutil import struct import capstone import tempfile import contextlib import subprocess import fnmatch import os import string from .errors import ASMConverterError, ASMConverterNotImplementedError class NasmException(Exception): pass class CLangException(Exception): pass ...
def _train_layer_call(self, inputs, input_mask, memory, mem_mask): att_res = self._train_self_att_block(inputs, input_mask) enc_att = self._train_memory_att_block(att_res, memory, mem_mask) res = self._train_ffd_block(enc_att) return res def _train_input_mask(self, input_mask): # input_mask: [batch, length] # n...
""" self.Result = None self.RequestId = None def _deserialize(self, params): if params.get("Result") is not None: self.Result = CosDownloadInfo() self.Result._deserialize(params.get("Result")) self.RequestId = params.get("RequestId") class DescribeGroupInstancesRequest(AbstractModel): """DescribeGroupInstan...
r""" EXAMPLES:: sage: from sage.schemes.toric.chow_group import * sage: P2=toric_varieties.P2() sage: A = ChowGroup_class(P2,ZZ,True); A Chow group of 2-d CPR-Fano toric variety covered by 3 affine patches sage: is_ChowGroup(A) True sage: is_ChowCycle(A.an_element()) True TESTS:: sage: A_ZZ = P2.Chow_grou...
<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import json from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from res...
def _create(cls, lims, creation_tag=None, udfs=None, **kwargs): """Create an instance from attributes and return it""" if not udfs: udfs={} instance = cls(lims, _create_new=True) if creation_tag: instance.root = ElementTree.Element(nsmap(cls._PREFIX + ':' + creation_tag)) elif cls._TAG: instance.root = ElementT...
html and xhtml are found above _type = Type.INLINEXBRL else: for pluginMethod in pluginClassMethods("ModelDocument.IdentifyType"): _identifiedType = pluginMethod(modelXbrl, rootNode, filepath) if _identifiedType is not None: _type, _class, rootNode = _identifiedType break if _type is None: _type = Type.Unknown...
<reponame>Malekhy/ws2122-lspm ''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
<reponame>OHMC/productos-satelitales<filename>src/plotters_lib/plot.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import logging from pathlib import Path import datetime import time as t import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.image as image from ma...
"""Unit tests for the ChangeMeta mutation.""" from __future__ import unicode_literals from django.db import models from nose import SkipTest try: # Django >= 1.11 from django.db.models import Index except ImportError: # Django <= 1.10 Index = None from django_evolution.mutations import ChangeMeta from django_ev...
<reponame>WojciechKusa/datasets # coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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 # ...
etc). This parameter only makes sense if the input comes in the form of molecular dynamics trajectories or data, and will otherwise create a warning and have no effect. top : str, optional, default = None A topology file name. This is needed when molecular dynamics trajectories are given and no featurizer is giv...
0.0225 o -ne-sx 79.7 108.92 SOURCE3 1 o -ne-sy 86.1 111.34 SOURCE3 1 p2-ne-pe 110.5 116.81 SOURCE3 1 p2-ne-px 105.8 128.35 SOURCE3 1 p2-ne-py 111.5 123.47 SOURCE3 1 p2-ne-sx 83.9 112.12 SOURCE3 1 p2-ne-sy 87.7 115.73 SOURCE3 1 pe-ne-s 87.0 115.73 SOURCE3 1 px-ne-s 81.8 131.84 SOURCE3 1 py-ne-s 90.3 116.18 SOURCE3 4 3.7...