input
stringlengths
2.65k
237k
output
stringclasses
1 value
import csv def parse(path): data = {} with open(path, newline='') as csvfile: for func in [ssh_client, zeroboot_client, racktivity_client, zeroboot_racktivity_host, ipmi_clients, zeroboot_ipmi_host]: # all the method expect to read from the begining of the file csvfile.seek(0, 0) reader = csv.reader(csvfile, ...
<filename>applaud/fields.py # This file is autogenerated by `applaudgen` from `app_store_connect_api.json`. # Do not modify this file -- YOUR CHANGES WILL BE ERASED! from .schemas.enums import StringEnum class AppCategoryField(StringEnum): PARENT = 'parent' PLATFORMS = 'platforms' SUBCATEGORIES = 'subcategories' ...
<gh_stars>10-100 # -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # Copyright (c) 2015, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met...
'../third_party/WebKit/WebCore/plugins/win/PluginPackageWin.cpp', '../third_party/WebKit/WebCore/plugins/win/PluginViewWin.cpp', '../third_party/WebKit/WebCore/plugins/wx/PluginDataWx.cpp', '../third_party/WebKit/WebCore/plugins/wx/PluginPackageWx.cpp', '../third_party/WebKit/WebCore/plugins/wx/PluginViewWx.cpp', ...
level ({self.depth(nid)}) must be greater than its ' f'parent\'s level ({level})!') # Ascend to the appropriate level while ancestor is not None: ascendant_level = self.depth(ancestor) if ascendant_level == level: return lookup_nodes_fun(ancestor) else: ancestor = self.nodes[ancestor].predecessor(tree_id) # Ge...
<filename>src/assembler.py # Notes: # -> Add decimal and binary base functionality ############################################################################################################## import re import sys import argparse import table import instructions #######################################################...
<reponame>ahijevyc/NSC_objects #!/usr/bin/env python from netCDF4 import Dataset import numpy as np from datetime import * import pygrib import time, os, sys import scipy.ndimage as ndimage import pickle as pickle import multiprocessing from scipy import spatial from mpl_toolkits.basemap import * import scipy.ndimage....
<filename>ddc_pub/ddc_v3.py<gh_stars>1-10 import os import numpy as np import tensorflow as tf config = tf.ConfigProto() config.gpu_options.allow_growth = True sess = tf.Session(config=config) os.environ[ "TF_CPP_MIN_LOG_LEVEL" ] = "3" # Suppress UserWarning of TensorFlow while loading the model from datetime import...
# duration # repeating # Mentions mention_all = await self.config.guild(guild).mention_all() if mention_all == 1: mentions = {} for role in guild.roles: if role.mentionable == True: mentions[role.id] = role.id else: mentions = await self.config.guild(guild).mentions() if len(mentions) != 0: i = 1 mentio...
<filename>debacl/utils.py ############################################ ## <NAME> ## debacl_utils.py ## Created: 20120718 ## Updated: 20130625 ## A library of helper functions for the DEnsity-BAsed CLustering (DeBaCl) ## package. ########################################### ############## ### SET UP ### ############## "...
# Standard Library import pandas as pd import statistics as st import numpy as np import imdb from datetime import datetime from datetime import timedelta import multiprocessing import json import time import re import random import matplotlib.pyplot as plt # Email Library from email.mime.text import MIMEText as text i...
*args, **kwargs): """ Raise PermissionDenied if the authenticating user does not pass the checks in require_operator_permission for the carrier and region on the FeedShelf object they are attempting to update. """ self.require_object_permission(request.user, self.get_object()) return super(FeedShelfViewSet, self...
COMPUTER INC.", "0018F4": "EO TECHNICS Co., Ltd.", "0018F5": "Shenzhen Streaming Video Technology Company Limited", "0018F6": "Thomson Telecom Belgium", "0018F7": "Kameleon Technologies", "0018F8": "Cisco-Linksys LLC", "0018F9": "VVOND, Inc.", "0018FA": "Yushin Precision Equipment Co.,Ltd.", "0018FB": "...
legacy add column from_quest boolean;" , "alter table legacy add column from_store boolean;" , "alter table legacy add column from_invasion boolean;" , "alter table legacy add column out_of_game boolean;" , "alter table legacy add column is_rare boolean;" ) params = '' for query in queries: #print 'Running query: '+q...
+ ' ' +\ 'healthy: ' + repr(self.healthy) + ' ' +\ 'tags: ' + repr(self.tags) + ' ' +\ 'secret_store_id: ' + repr(self.secret_store_id) + ' ' +\ 'egress_filter: ' + repr(self.egress_filter) + ' ' +\ 'hostname: ' + repr(self.hostname) + ' ' +\ 'auth_database: ' + repr(self.auth_database) + ' ' +\ 'port_override: ...
AND orientation refinement # in this function calibration is not refined (but values are needed!), arr_indexvaryingparameters must only contain index >= 5 DATA_Q array of hkl vectors pixX arrays of pixels exp. peaks X positions [Xs g1,Xs g2] pixY arrays of pixels exp. peaks Y positions [Ys g1,Ys g2] absolutespots...
"lon", "z"] CSPYCE_ABSTRACT ["reccyl"] = """ Convert from rectangular to cylindrical coordinates. """ CSPYCE_DEFINITIONS["reccyl"] = { "rectan": "Rectangular coordinates of a point.", "r": "Distance of the point from z axis.", "lon": "Angle (radians) of the point from xZ plane", "z": "Height of the point above xY plane...
<gh_stars>10-100 # File: CeFs.py ; This file is part of Twister. # version: 3.026 # Copyright (C) 2012-2014, Luxoft # Authors: # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
<gh_stars>0 import numpy as np import math import itertools import numpy from enum import Enum from pylab import * import sys import pdb class PosecellExperience: x_pc = 0.0 y_pc = 0.0 th_pc = 0.0 vt_id = 0 class PosecellVisualTemplate: pc_x = 0.0 pc_y = 0.0 pc_th = 0.0 decay = 0.0 exps = []; def __init__(...
<reponame>OpenSwitchNOS/openswitch-ops-aaa-utils #!/usr/bin/env python # Copyright (C) 2015-2016 Hewlett Packard Enterprise Development LP # 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...
"""Interval and NumericSet classes with methods to work with numeric intervals. Interval methods ---------------- get_formatted - return formatted interval as a string is_overlapping - determine whether intervals overlap is_almost_overlapping - determine whether intervals almost overlap includes - determine whet...
This is an approximate number. :type ConsistencyLevel: string :param ConsistencyLevel: Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object. :rtype: dict :return: { 'Children': { 'string': 'string' }, 'NextToken':...
in response): currLRCEURBid = float(response["bestBid"]) #print("€ LRC Bid: " +str(currLRCEURBid) +" | LRC Ask: " +str(currLRCEURAsk)) if(response["market"] == "LRC-EUR" and "bestAsk" in response): currLRCEURAsk = float(response["bestAsk"]) #print("€ LRC Bid: " +str(currLRCEURBid) +" | LRC Ask: " +str(currLRCEURA...
<filename>mpBuild/ESP32_BPI_bit/lib/microbit.py from time import time, sleep_ms from utime import sleep_ms as sleep from machine import Pin, ADC, DAC from neopixel import NeoPixel def PixelPower(bool): Pin(2, Pin.OUT).value(bool) class Pixel(NeoPixel): def __init__(self): self.Min, self.Max, self.Sum = 0, 5, 25 ...
[] for index, y_value in y.timeseries.iteritems(): if self._multimodel: annual_index = y.convert_to_annual_index(index) else: annual_index = 1 featuredates = self._aggregate_featuredates(index) X_values = self._aggregate_features(featuredates, self._X) if not isnan(y_value) and not isnan(X_values).any(): y...
a duration string, for example "30s" or "1d". Supported are: seconds (s), minutes (m), hours (h) and days (d). The argument here is either a string or an object with string attrs type and duration. The arg can be either a window or a duration. If no arg is supplied or set to None, the window_type is set to 'glob...
# ======================================================================== # Copyright 2020 Emory University # # 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...
<filename>tests/test_nonbonded.py # (ytz): check test and run benchmark with pytest: # pytest -xsv tests/test_nonbonded.py::TestNonbonded::test_dhfr && nvprof pytest -xsv tests/test_nonbonded.py::TestNonbonded::test_benchmark import copy import gzip import pickle import unittest from jax.config import config config....
1, "span may not be negative" self.element.setAttribute("rowspan", span) return self class Td(Widget): _tagName = "td" def _getColspan(self): span = self.element.getAttribute("colspan") return span if span else 1 def _setColspan(self, span): assert span >= 1, "span may not be negative" self.element.setAttr...
self.assertEqual(menubar.get_title_offset()[0], 9) self.assertEqual(menubar.get_title_offset()[1], 10) menu.set_title('nice2') self.assertEqual(menu.get_title(), 'nice2') self.assertEqual(menubar.get_title_offset()[0], theme.title_offset[0]) self.assertEqual(menubar.get_title_offset()[1], theme.title_offset...
<filename>tools/deployment/lsst_nb_deploy/deploy.py #!/usr/bin/env python3 """This is a wrapper around an LSSTNotebookAspectDeployment class. The class, at the moment, assumes the following: 1) Deployment is to Google Kubernetes Engine. You have chosen a cluster name and optionally a namespace. 2) Your DNS zone for y...
call_idx=k, cash_now=cash_now, position_now=position_now, debt_now=debt_now, free_cash_now=free_cash_now, val_price_now=val_price_now, value_now=value_now, return_now=return_now, pos_record_now=pos_record_now ) order = order_func_nb(order_ctx, *pre_segment_out, *order_args) if np.isinf(order.price): if i > ...
j +=1 i = 0 while i < len(remaining_path) - 1 : start = remaining_path[i] end = remaining_path[i +1] check_cells = get_list_of_voxels_to_check(start, end) for cell in check_cells: free = local_map.getOccupancyStatus30andUP(cell) if free == False: just_outer_rim = local_map.get_occupancy_status(cell) if just...
<reponame>artyompal/imet #!/usr/bin/python3.6 ''' Trains a model or infers predictions. ''' import argparse import math import os import pprint import random import re import sys import time import yaml from typing import * from collections import defaultdict, Counter from glob import glob import numpy as np import ...
<reponame>septimit/odatapy-client # OData Python Client and Server Libraries ver. 1.0.0 # Copyright (c) Microsoft Corporation # All rights reserved. # MIT License # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # ...
"""Define high level structure StagyyData and helper classes. Note: The helper classes are not designed to be instantiated on their own, but only as attributes of StagyyData instances. Users of this module should only instantiate :class:`StagyyData`. """ from __future__ import annotations from collections import ...
""" @file name_handler.py @details Contains common functions for working on names @package name_handler @copyright 2020-21 PMFuzz Authors SPDX-license-identifier: BSD-3-Clause """ import doctest import re import tempfile from os import path from helper.common import * AFL_DIR_NM = '.afl-results' ST2_MIN_DIR = '@t...
in conjunction with all the addresses created in the range. e.g., a prefix of 24 = 255.255.255.0 for IPv4. - Suspended (bool): If this is true, the VSI will have the Suspended Flag set in the VDP TLVs. - Uuid (str): The UUID for the interface. It is available only when the VSIID format is set to UUID. - UuidIncremen...
Iso('Ag-119', 'silver-119', 47, 119, 118.915570, False), 'Ag-120': Iso('Ag-120', 'silver-120', 47, 120, 119.9187848, False), 'Ag-121': Iso('Ag-121', 'silver-121', 47, 121, 120.920125, False), 'Ag-122': Iso('Ag-122', 'silver-122', 47, 122, 121.923664, False), 'Ag-123': Iso('Ag-123', 'silver-123', 47, 123, 122.925337...
list of connected LCD Sys Info devices, with zero (the default) being the first device. Raises: IOError: An error ocurred while opening the LCD Sys Info device. RuntimeError: PyUSB 0.4 or later is required. """ if usb is None: raise ImportError('No module named usb') dev = self._find_device(0x16c0, 0x05dc, in...
collection_formats=collection_formats) def delete_corporate_action_source(self, scope, code, **kwargs): # noqa: E501 """[BETA] Delete a corporate action source # noqa: E501 Deletes a single corporate action source # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP ...
<filename>tools/scheduler.py #!/usr/bin/env python import os import pickle import sys import time import socket import random from optparse import OptionParser import threading import subprocess from operator import itemgetter import logging import signal import zmq ctx = zmq.Context() import dpark.pymesos as mesos i...
== logging.DEBUG): log.debug("eval_arg: Not found as variable name: %r" % arg) pass else: if (log.getEffectiveLevel() == logging.DEBUG): log.debug("eval_arg: Do not try as variable name: %r" % arg) # This is a hack to get values saved in the .text field of objects. # To do this properly we need to save "FOO.tex...
workbook to query information about. Returns ------- anonymous : dict Dict of workbook details from Tableau Server. """ # noinspection PyProtectedMember func = sys._getframe().f_code.co_name # pylint: disable=protected-access logging.info(f'Querying workbook on `Tableau REST API` (site={self.site})') url = ...
#!/usr/bin/env python3 # # Tool for upgrading/converting a db # Requirements: # 1) Databse Schema - schema for the new database you what to upgrade to # 2) Config File - the config file that describes how to convert the db # # Notes: # 1) Will attempt to convert the db defined in /etc/planetlab/plc_config # 2) Does not...
from __future__ import print_function from itertools import chain import logging import numpy import pywt import SimpleITK as sitk import six from six.moves import range logger = logging.getLogger(__name__) def getBinEdges(binwidth, parameterValues): r""" Calculate and return the histogram using parameterValues ...
# Add region infront of self.rank self.rank = 'NC: '+self.rank self.loc_names = ['North Dakota','South Dakota','Illinois','Kansas', 'Oklahoma','Nebraska','Minnesota','Arkansas', 'Missouri','Iowa','Wisconsin'] # Get geometries self._get_geoms('admin_1_states_provinces_shp', 'name') self.strcol = 'black' # L...
E501 return self.api_client.call_api( '/api/v1/integrations/sigfox/{routingKey}', 'HEAD', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='DeferredResultResponseEntity', # noqa: E501 auth_settings=auth_settings, async_req=params.get('...
import re import random import base64 import mongoengine as me from libcloud.compute.base import NodeSize, NodeImage, NodeLocation from libcloud.compute.types import Provider from libcloud.compute.base import NodeAuthSSHKey from tempfile import NamedTemporaryFile import mist.api.tasks from mist.api.clouds.models imp...
the animation ''' Cmds.setParent(self.animationsLayout) Cmds.rowLayout(numberOfColumns = 5, columnWidth5 = [35, 185, 50, 50, 35], columnAttach=[1, 'left', 8]) self.AnimationUIs[animation.Id] = AnimationUI(self, animation) def Refresh(self, extraArg=None): ''' Refreshes the animations UI ''' # Process selec...
#!/usr/bin/env python # coding: utf-8 # In[2]: import numpy as np import torch from functools import reduce import matplotlib.pyplot as plt get_ipython().run_line_magic('matplotlib', 'inline') # In[3]: torch.__version__ # In[4]: np.random.seed(1943) torch.manual_seed(1943) # In[5]: # setosa: (1,0,0) # ve...
# %% comments starting with double percent sign are hydrogen cell separators from math import pi from math import e as euler # prevent duplicating elementary charge from math import log as ln # log defaults to ln from math import exp, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, degrees, rad...
#!/usr/bin/python3 # Using the pack: http://packs.download.atmel.com/Atmel.SAMD51_DFP.1.2.139.atpack # This script can be used to generate code from an atdf file: # - peripheral IDs for the GCLK device # - GPIO functions # - Device package with peripheral instances # - Main_Clock on/off procedures for peripherals # -...
_bytes(name))) @deprecate("Parser functions have been deprecated.") def parser_get_float_property(parser: Any, name: str) -> float: return float(lib.TCOD_parser_get_float_property(parser, _bytes(name))) @deprecate("Parser functions have been deprecated.") def parser_get_string_property(parser: Any, name: str) -> s...
""" Routines for working with rotation matrices """ """ comment author : <NAME> date : April-2018 """ import numpy as np import sympy from collections import namedtuple # The following construct is required since I want to run the module as a script # inside the skinematics-directory import os import sys file_dir =...
not specifying `selectvar`, which means values are stored for all observations specified. Specifying `selectvar` as -1 means that observations with missing values for the variables specified in `var` are to be skipped. Raises ------ ValueError This error can be raised if - any of the variable indices or na...
a destination (that is, an Amazon Kinesis stream or an Amazon Kinesis Firehose delivery stream), and record the formation to use when writing to the destination. Name (string) -- [REQUIRED]Name of the in-application stream. KinesisStreamsOutput (dict) --Identifies an Amazon Kinesis stream as the destination. Resourc...
<reponame>jramapuram/datasets import cv2 import torch import contextlib import numpy as np from typing import Tuple from copy import deepcopy from PIL import Image from torchvision import transforms import datasets.loader as ldr from datasets.samplers import ClassSampler, FixedRandomSampler cv2.setNumThreads(0) # s...
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = ["GP"] import warnings import numpy as np from scipy.linalg import LinAlgError from . import kernels from .solvers import TrivialSolver, BasicSolver from .modeling import ModelSet, ConstantModel from .utils import multivariate_gaussia...
self.app_context = self.app.app_context() self.app_context.push() db.create_all() populate_db('enzyme', self.client) def tearDown(self): db.session.remove() db.drop_all() self.app_context.pop() def test_modify_enzyme_change_all(self): current_isoenzyme = 'PFK1' current_organism_name = '<NAME>' current_unip...
<filename>burst.py #!/usr/bin/env python import basics import boto3 import yaml import syslog import getopt import signal import sys import time import datetime import dateutil import json import urllib2 from math import ceil,floor def print_usage(): print "Automated cloud bursting script\n" print "usage: " + __file...
{cyan}") else: if magenta < 0 or magenta > 100: raise GraphicsError("\n\nGraphicsError: magenta value for CMYK to HSV conversion must be " f"between 0 & 100, inclusive, 0 <= magenta <= 100, not {magenta}") else: if yellow < 0 or yellow > 100: raise GraphicsError("\n\nGraphicsError: yellow value for CMYK to HSV c...
values with no units and unity value x_norm = Quantity(1, '') if isinstance(y_norm, bool) and y_norm: y_norm = self.y_norm if self.y_norm == Quantity(1, ''): warn("No normalisation value is stored for the y-axis") elif isinstance(y_norm, Quantity): y_norm = y_norm elif isinstance(y_norm, bool) and not y_norm: ...
Number of folds the cross validation performs :param scorer: The scoring function to perform each fold. \ The function must take the true targets as the first parameter and \ predicted targets as the second parameter. e.g sklearn.metrics.f1_score :param kfold_reproducible: Whether the train and validation splits ar...
your own risk. ```python import pulumi import pulumi_aws as aws main_vpc = aws.ec2.Vpc("mainVpc", cidr_block="172.16.58.3/16", enable_dns_hostnames=True, tags={ "name": "emr_test", }) main_subnet = aws.ec2.Subnet("mainSubnet", vpc_id=main_vpc.id, cidr_block="172.16.58.3/20", tags={ "name": "emr_test", ...
<gh_stars>1-10 ''' Created on May 2014 @author: klc Base class for importing anaysis result files ''' from __future__ import division import os import logging import re import copy from datetime import datetime from prettytable import PrettyTable from uuid import uuid4 import elasticsearchloader.file_utils as fx from...
import torch import time import numpy as np from torch.utils.data import TensorDataset, DataLoader from deepLFM.likelihoods import Gaussian from deepLFM.utils import DKL_Gaussian class deepLFM(torch.nn.Module): def __init__(self, d_in, d_out, n_hidden_layers=1, n_lfm=2, n_rff=20, n_lf=2, mc=100, q_Omega_fixed_epochs...
<reponame>JixunMoe/ContraNES1TranslationPatch """The P65 Assembler passes P65's design philosophy is to build the IR once, then run a great many assembler passes over the result. Thus, each pass does a single, specialized job. When strung together, the full translation occurs. This structure also makes the assembl...
# Copyright 2019 <NAME>. # # This file is part of Mi3-GPU. # # Mi3-GPU 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. # # Mi3-GPU is distributed in the hope that it will be useful, #...
# -*- coding: utf-8 -*- """ Dynamic programming algorithm to solve nonograms (using recursion) See details: https://www.cs.bgu.ac.il/~benr/nonograms/ """ from __future__ import unicode_literals import logging from collections import defaultdict from functools import reduce from itertools import product from six.mov...
<gh_stars>1-10 import ni_mon_client, ni_nfvo_client from ni_mon_client.rest import ApiException from ni_nfvo_client.rest import ApiException from datetime import datetime, timedelta from config import cfg from torch_dqn import * import numpy as np import datetime as dt import math import os import time i...
# # # Copyright (C) 2007, 2011, 2012, 2013 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
<reponame>pkgw/wwt-aligner # Copyright 2020-2021 the .NET Foundation # Licensed under the MIT License. """ Entrypoint for the "wwt-aligner[-agent]" command-line interface. """ import argparse import json import logging import os.path import shutil import sys import tempfile import time __all__ = ['entrypoint'] from...
"""API Orchestation of Pipellines and Validations.""" import asyncio import logging import shutil import sqlalchemy from flask import Response, jsonify, request, send_file from flask_restful import Api, Resource, fields, marshal_with from werkzeug.exceptions import Conflict, UnprocessableEntity from meltano.api.api_...
'script' }, 'constantfile': { 'section': 'prefix', 'conf_lib': ['design', 'func', 'automated' ], 'html': 'script' }, 'template': {}, 'image': { 'sticky_conf_lib': ['design/img'] } } # generally, text is not written directly into the output; rather it is # 'written' by appending it to the appropriate section....
# Copyright The PyTorch Lightning team. # # 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 wr...
import logging import hashlib import hmac import requests from time import sleep, time from datetime import datetime from enum import Enum logger = logging.getLogger('cryptocom_api') RATE_LIMIT_PER_SECOND = 10 # LIMIT_ORDER = 1 # MARKET_ORDER = 2 # STOP_LOSS = 3 # STOP_LIMIT = 4 # TAKE_PROFIT = 5 # TAKE_PROFIT_LIMIT ...
<reponame>FreeDelete-Software/ALPACAS-evennia """ Test the funcparser module. """ import time from ast import literal_eval from simpleeval import simple_eval from parameterized import parameterized from django.test import TestCase, override_settings from evennia.utils import funcparser, test_resources def _test_c...
<reponame>gideonbros/polyaxon<gh_stars>0 #!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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....
# Copyright 2015 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 ...
key :param sortstyle: Sorting can be "COMPOUND" or "INTERLEAVED" (https://docs.aws.amazon.com/redshift/latest/dg/t_Sorting_data.html) :param sortkey: List of columns to be sorted :param primary_keys: Primary keys :param preserve_index: Should we preserve the Dataframe index? :param mode: append, overwrite or upser...
from typing import List, Dict, Callable from expanded_checklist.checklist.test_suite import TestSuite from expanded_checklist.checklist.editor import Editor from munch import Munch import itertools from collections import OrderedDict, namedtuple from typing import Tuple, Collection import src.config as cfg import reg...
`--fit-to-width` is specified." ), ) size_options.add_argument( "--fit-to-width", action="store_true", help=( "Fit the image to the available terminal width. " "`--v-allow` has no effect i.e vertical allowance is overriden." ), ) cli_options.add_argument( "-O", "--oversize", action="store_true", help=( ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021 4Paradigm # # 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...
import numpy as np import networkx as nx import matplotlib.pyplot as plt import threading from threading import Lock, Thread import random import time as timeee transactionCounter = 0 lock = Lock() succesfulAttacks = 0 failedAttacks = 0 class User(object): def __init__(self, id: int, malicious: bool): self.id = i...
<reponame>redeltaglio/rasberry-remote-stash<filename>Utilities/hda-analyzer_hda_proc.py<gh_stars>1-10 #!/usr/bin/env python # # Copyright (c) 2008-2012 by <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
""" Gets the client data for a client. :param client: The client name or IP+port to get. :type client: Client :param get_as_dict: A boolean representing if the client data should be returned as a dictionary. Otherwise, it'll be returned as an instance of :class:`ClientInfo`. Default is False. :type get_as_dict...
self.fig self.fig = None # NOTE: to simplify the pager implementation, just destroy-old-and-create-new SimpleMatrixPlotter instances. # Should it be clear that the overhead of this approach is not acceptable, then reset-and-reuse shall be # considered. # # As of now, using pager does caps memory usage (in addition t...
# -*- coding: utf-8 -*- # # Copyright 2012-2014 <NAME> # # 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 ...
PackBase.__init__(self, data, broadcast, reshapein=self._reshape_packed, reshapeout=self._reshape_unpacked, validatein=self._validate_packed, validateout=self._validate_unpacked, **keywords) self.set_rule('T', lambda s: PackOperator(s.data, broadcast=s.broadcast)) self.set_rule('T,.', '1', CompositionOperator) ...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os import os.path as osp import re import shutil import sys from glob import glob from pathlib import Path from subprocess import CalledProcessError from unittest.mock import call import pytest from jupyter_rel...
ns: namespace name - qualifier: tablename """ def __init__(self, ns=None, qualifier=None,): self.ns = ns self.qualifier = qualifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, i...
in range(0, numberOfCoefficients-1): if (currentOrderOfThePolynomial == (orderOfPolynomialKernel+1)): currentOrderOfThePolynomial = 1 currentVariable = currentVariable + 1 actualIc = actualIc + kernelCoefficients[currentIndependentVariable+1][0]*self.x_samplesList[row][currentVariable]**(currentOrderOfThePolynomial...
<reponame>lavanyajagan/cocotb # Copyright cocotb contributors # Licensed under the Revised BSD License, see LICENSE for details. # SPDX-License-Identifier: BSD-3-Clause import distutils import logging import os import subprocess import sys import sysconfig import textwrap from distutils.ccompiler import get_default_co...
<gh_stars>0 # Copyright 2020-2021 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.org/licenses/LICENSE-2.0 # # Unless required by applicable...
- 'half' - 'full' ssl-pfs: type: str description: 'Select the cipher suites that can be used for SSL perfect forward secrecy (PFS). Applies to both client and server sessions.' choices: - 'require' - 'deny' - 'allow' ssl-send-empty-frags: type: str description: 'Enable/disable sending empty fragments to avoi...
= dwell['tstop'] stats = {k: obs[k] for k in ['agasc_id', 'obsid', 'slot', 'type', 'mp_starcat_time', 'timeline_id']} stats['mp_starcat_time'] = stats['mp_starcat_time'] droop_shift = get_droop_systematic_shift(star['MAG_ACA']) responsivity = get_responsivity(start) stats.update({'tstart': start, 'tstop': stop,...
# Do not modify this file by hand. # # It is automatically generated by src/api_wrappers/generatePythonAPIWrappers.py. # (Run make api_wrappers to update it.) from __future__ import print_function, unicode_literals, division, absolute_import import sys from dxpy import DXHTTPRequest from dxpy.utils import Nonce def...
# coding: utf-8 """ GamificationApi.py Copyright 2016 SmartBear Software 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 applica...
""" Construct static arbitrage constraints for a given finite collection of call option prices. """ # Copyright 2018-2021 <NAME>. # Affiliation: Mathematical Institute, University of Oxford # Email: <EMAIL> import numpy as _np import pandas as _pd class Normalise: """ Normalises and pre-processes data: (1) Norma...