input
stringlengths
2.65k
237k
output
stringclasses
1 value
in {("list", "dyn"), ("list", "var")}: self.interpreter_error("Unhandled array type [%s], for now only [dyn] and [var] are supported" % (ty[1],)) if not isinstance(value, ArrayVariable): self.interpreter_error("Type check failure, value should be an array: %r : %r" % (value, ty)) return # Handle all scalar cases ...
<gh_stars>1-10 from comet_ml import OfflineExperiment # needed at top for Comet plugin from collections import defaultdict, OrderedDict import torch import torch.nn as nn import tqdm import time from sklearn.metrics import f1_score, precision_score, recall_score import torch.nn.functional as F from utils import * impor...
<reponame>YosephKS/qiskit-terra # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # An...
+ 1 # sp = sorted(counts.items(), key = lambda i:-i[1]) # for j in range(10): # print("E (KeV): {:>8.3f} - count {:>8}".format(*sp[j])) # plt.subplot(1,3,ich+1) # plt.hist(this_e, histtype='step', bins=np.linspace(59.3,60,1000), label="ch {}".format(ch)) # plt.legend() # plt.xlabel("E (KeV...
from django.conf import settings from django.contrib import messages from django.core.mail import send_mail from django.db import transaction from django.db.models import Count from django.http import HttpResponse from django.shortcuts import get_object_or_404, redirect, render from django.template.defaultfilters impor...
#!/usr/bin/python # -*- coding: utf-8 -*- """ This is an example of working with very large data. There are about 700,000 unduplicated donors in this database of Illinois political campaign contributions. With such a large set of input data, we cannot store all the comparisons we need to make in memory. Instead, we ...
<filename>ap_perf/expression.py<gh_stars>1-10 from enum import Enum import math import numpy as np import abc # Type of the entity in the cnfusion matrix class CM_Type(Enum): TP = 1 FP = 2 FN = 3 TN = 4 AP = 5 AN = 6 PP = 7 PN = 8 ALL = 9 class CM_Category(Enum): CELL = 1 ACTUAL_SUM = 2 PREDICTION_SUM = 3...
import pandas as pd import numpy as np import math import os from scipy.interpolate import interp1d import time from sklearn.ensemble import RandomForestRegressor import xgboost as xgb from lightgbm import LGBMRegressor from catboost import CatBoostRegressor from information_measures import * from joblib import Para...
<reponame>va7eex/docker-ldbprocessor #!/bin/python3 __author__ = "<NAME>" __credits__ = ["<NAME>"] __license__ = "MIT" __version__ = "1.0.1" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Production" import os import csv import string import random import json import time import logging from datetime ...
<filename>elegantrl/agents/AgentPPO.py import torch import numpy as np from elegantrl.agents.AgentBase import AgentBase from elegantrl.agents.net import ActorPPO, CriticPPO from elegantrl.agents.net import ActorDiscretePPO, SharePPO '''[ElegantRL.2021.12.12](github.com/AI4Fiance-Foundation/ElegantRL)''' class AgentP...
#!/Users/nabin.acharya/anaconda/bin/python from string import Template import urllib import zipfile import StringIO import os import urllib2 import getopt import sys from pandas_datareader import data as pd_data import matplotlib.pyplot as plt import pandas as pd import numpy as np import datetime as dtt from sklear...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.146602, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
[task], mode) if mode in ["bus_width_modulation","loop_iteration_modulation"]: move_to_apply.design_space_size[mode] += len(value) else: move_to_apply.design_space_size[block_of_interest.type + "_"+ mode] += len(value) for block_type in ["pe", "mem", "ic"]: if block_type == block_of_interest.type: move_to_appl...
<gh_stars>0 #! /usr/bin/env python # -*- coding: utf-8 -*- # # GUI module generated by PAGE version 4.20 # in conjunction with Tcl version 8.6 # Feb 01, 2019 12:08:48 PM MST platform: Windows NT ############################################################################### ####################################...
''' @Author: ConghaoWong @Date: 2019-12-20 09:39:02 LastEditors: <NAME> LastEditTime: 2020-09-16 16:46:14 @Description: file content ''' import os import random import cv2 import matplotlib.pyplot as plt import numpy as np from tqdm import tqdm from helpmethods import (calculate_ADE_FDE_numpy, dir_check, predict_lin...
values are real floats matching shape of model and data. These are only used to find delays from itegrations that are unflagged for at least two frequency bins. In this case, the delays are assumed to have equal weight, otherwise the delays take zero weight. refant : antenna number integer to use as a reference, ...
at least one null byte nameBytes.extend( (0x20 - len(nameBytes)) * b'\00' ) nameChecksOut = True else: msg( 'Unable to encode the new name into 31 bytes. Try shortening the name.' ) except: msg( 'Unable to encode the new name into 31 bytes. There may be an invalid character.' ) ...
in the property expectedResult = None if propType == "String": expectedResult = stringArray[2] elif propType == "Integer": expectedResult = int(stringArray[2]) elif propType == "Decimal": expectedResult = decimal.Decimal(stringArray[2]) else: expectedResult = False if str.lower(stringArray[2]) == 'true': ...
stock level first_and_last_days = [] for i, y in enumerate(sorted(self.three_by_year.keys())): if (i == 0 and (len(self.stocklevels) > 0)): # on the first loop, use the earliest stocklevel # instead of january 1 of that year if self.stocklevels[0]['date'].year in self.three_by_year.keys(): first_and_last_days.ap...
import math import itertools from operator import itemgetter import json import os import random from .geom import hflip_pattern, vflip_pattern, rot_pattern from .patterns import ( get_pattern_size, get_pattern_livecount, get_grid_empty, get_grid_pattern, segment_pattern, methuselah_quadrants_pattern, pattern_un...
attributes compare_system_and_attributes_csv(self, '03') def test_system_importer_file_csv_upload_post_minimal_headline(self): """test importer view""" # change config set_config_headline() # login testuser self.client.login( username='testuser_system_importer_file_csv_minimal', password='<PASSWORD>', ) #...
multivariate Laurent polynomial during conversion. INPUT: - ``P`` -- the parent to which we want to convert. - ``M`` -- the parent from which we want to convert. - ``d`` -- a dictionary mapping tuples (representing the exponents) to their coefficients. This is the dictionary corresponding to an element of ``...
<reponame>jiayiliu/gradio """ This module defines various classes that can serve as the `input` to an interface. Each class must inherit from `InputComponent`, and each class must define a path to its template. All of the subclasses of `InputComponent` are automatically added to a registry, which allows them to be easi...
""" 인터넷에서 유용한 정보를 가져옵니다. Class: :obj:`~openpibo.collect.Wikipedia` Functions: :meth:`~openpibo.collect.Wikipedia.search` Class: :obj:`~openpibo.collect.Weather` Functions: :meth:`~openpibo.collect.Weather.search` Class: :obj:`~openpibo.collect.News` Functions: :meth:`~openpibo.collect.News.search` **단어정보, 날씨 정보,...
<reponame>IcyW/SMIIP #!/usr/bin/env python # Copyright 2016 Johns Hopkins University (author: <NAME>) # Apache 2.0. from __future__ import print_function import argparse import sys, os from collections import defaultdict parser = argparse.ArgumentParser(description="This script reads stats created in analyze_align...
size = random.sample(range(0, 4), 3) size = sorted(size) if j == 5 : SIZE = [[], [], []] while len(SIZE[2]) == 0: SIZE = [] size0 = random.randint(2, 4) size1 = random.randint(2, 4) L1 = random.sample(range(0, 4), size0) L2 = random.sample(range(0, 4), size1) L3 = [] L = L1 + L2 for l in L: ...
# -*- coding: utf-8 -*- # from __future__ import unicode_literals # NO DESCOMENTAR! ROMPE TODO! from django.db import models, connection, connections from django.contrib.auth.models import User from django.conf import settings # import mapscript from layerimport.models import TablaGeografica, ArchivoRaster from layers...
<filename>train_tempobert.py #!/usr/bin/env python """ Training script for temporal BERT model using temporal attention. Based on https://github.com/huggingface/transformers/blob/master/examples/pytorch/language-modeling/run_mlm.py """ import math from dataclasses import dataclass, field from datetime import datetime ...
<gh_stars>1-10 # -*- coding: utf-8 -*- import subprocess from pymatgen.io.vasp.sets import DictSet #!!! The warning that is raised here is because there is no YAML! It can be ignored class StaticEnergyCalc(DictSet): CONFIG = { "INCAR": { "EDIFF": 1.0e-07, "EDIFFG": -1e-04, "ENCUT": 520, "ISIF": 3, # !!! do I w...
<gh_stars>0 """ s3peat - Fast uploading directories to S3 .. rubric:: Example usage .. code-block:: python from s3peat import S3Bucket, sync_to_s3 # Create a S3Bucket instance, which is used to create connections to S3 bucket = S3Bucket('my-bucket', AWS_KEY, AWS_SECRET) # Call the sync_to_s3 method failures =...
tile_size + tile_half_size,int(starting_positions[player_index][1]) * tile_size + tile_half_size) pygame.draw.rect(self.preview_map_image,tile_color,pygame.Rect(pos_x,pos_y,tile_size,tile_size)) pygame.draw.circle(self.preview_map_image,Renderer.COLOR_RGB_VALUES[player_index],draw_position,tile_half_size) y = til...
order = None ): """ https://developer.nulab-inc.com/docs/backlog/api/2/get-comment-list """ params = { "apiKey": self.apikey } _addkw( params, "minId", minId ) _addkw( params, "maxId", maxId ) _addkw( params, "count", count ) _addkw( params, "order", order ) url = self._makeurl( "/api/v2/issues/" + str( issueI...
""" This script prepares data in the format for the testing algorithms to run The script is expanded to the """ from __future__ import division from queue import PriorityQueue from datetime import datetime import shared_variables from shared_variables import get_unicode_from_int import copy import csv import re imp...
<filename>mindboggle/guts/compute.py #!/usr/bin/env python """ Compute functions. Authors: - <NAME>, 2012-2016 (<EMAIL>) http://binarybottle.com Copyright 2016, Mindboggle team (http://mindboggle.info), Apache v2.0 License """ def distcorr(X, Y): """ Compute the distance correlation function. Parameters ---...
<gh_stars>0 #!/usr/bin/python '''The MIT License (MIT) Copyright (c) 2017 <NAME>(<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 limitation the righ...
= None self.success = None self.error = None APIREFRESHLOADBALANCERMSG_FULL_NAME = 'org.zstack.network.service.lb.APIRefreshLoadBalancerMsg' class APIRefreshLoadBalancerMsg(object): FULL_NAME='org.zstack.network.service.lb.APIRefreshLoadBalancerMsg' def __init__(self): #mandatory field self.uuid = NotNoneField(...
optional: Optional[bool] = None): if key is not None: pulumi.set(__self__, "key", key) if name is not None: pulumi.set(__self__, "name", name) if optional is not None: pulumi.set(__self__, "optional", optional) @property @pulumi.getter def key(self) -> Optional[str]: return pulumi.get(self, "key") @propert...
Controller -> Radio 1: CLR Radio -> Controller 1: CLR,OK NOTE: This command is only acceptable in Programming Mode. This command needs about 10 seconds execution time. """ self.device.serial.timeout = 10 response = self.device.command('CLR') self.device.serial.timeout = self.device.timeout return respons...
Security) self.security._validate() @property def log_level(self): return self._log_level @log_level.setter def log_level(self, log_level): self._log_level = LogLevel(log_level) def __repr__(self): return 'Master<...>' @classmethod @implements(Specification.from_dict) def from_dict(cls, obj, **kwargs): ...
""" A simple and basic Python 3 https://aoe2.net/ API wrapper for sending `GET requests`. Available on GitHub (+ documentation): https://github.com/sixP-NaraKa/aoe2net-api-wrapper Additional data manipulation/extraction from the provided data by this API wrapper has to be done by you, the user. See https://aoe2.net/...
Fields: exportUri: Required. A Google Cloud Storage URI for the exported BAM file. The currently authenticated user must have write access to the new file. An error will be returned if the URI already contains data. projectId: Required. The Google Developers Console project ID that owns this export. The caller mus...
import os import sys import json import numpy as np import pandas as pd import dataloader.file_io.dir_lister as dl import dataloader.file_io.get_path as gp SUPPORTED_DATASETS = ('cityscapes', 'cityscapes_video', 'cityscapes_sequence', 'cityscapes_extra', 'cityscapes_part', 'kitti', 'kitti_2012', 'kitti_2015', 'virtu...
__all__ = [ "fit_gp", "ft_gp", "fit_lm", "ft_lm", "fit_rf", "ft_rf", "fit_kmeans", "ft_kmeans", ] ## Fitting via sklearn package try: from sklearn.base import clone from sklearn.linear_model import LinearRegression from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process....
Oo0Ooo + i1IIi + OoooooooOO % o0oOOo0O0Ooo if ( iIiiII != None ) : oOo0OOOOOO , o0O0 = iIiiII . rloc_next_hop o00ooO0Ooo = bold ( "nh {}({})" . format ( o0O0 , oOo0OOOOOO ) , False ) lprint ( " Install host-route via best {}" . format ( o00ooO0Ooo ) ) lisp_install_host_route ( I1iiIiiii1111 , None , False ) lisp_...
<gh_stars>0 """annotator_distance.py - statistical significance of distance between genomic segments ===================================================================================== Purpose ------- The script :file:`annotator_distance.py` computes the statististical significance of the association between segmen...
self.var, False, layer_3.h, 64, a, None) layer_1_copy = layer_1.copy(state) layer_2_copy = layer_2.copy(layer_1_copy.h) layer_3_copy = layer_3.copy(layer_2_copy.h) layer_q_copy = layer_q.copy(layer_3_copy.h) layer_a_copy = layer_a.copy(layer_3_copy.h) h_qvalue = layer_q.h h_action = layer_a.h h_qvalue_copy =...
array. This overrides the _generic NDArray version """ # Test for simple case first if isinstance(arr, NumArray): if (arr.nelements() == 0 and self.nelements() == 0): return if (arr._type == self._type and self._shape == arr._shape and arr._byteorder == self._byteorder and _gen.product(arr._strides) != 0 and...
from data import * from utils.augmentations import SSDAugmentation, BaseTransform from utils.functions import MovingAverage, SavePath from utils import timer from layers.modules import MultiBoxLoss from yolact import Yolact import os import sys import time import math from pathlib import Path import torch from torch.au...
machine): super(MockResult, self).__init__(mylogger, label, logging_level, machine) def FindFilesInResultsDir(self, find_args): return '' # pylint: disable=arguments-differ def GetKeyvals(self, temp=False): if temp: pass return keyvals class ResultTest(unittest.TestCase): """Result test class.""" def __i...
import collections import logging import uuid from contextlib import contextmanager import requests from kinto_http import utils from kinto_http.session import create_session, Session from kinto_http.batch import BatchSession from kinto_http.exceptions import ( BucketNotFound, CollectionNotFound, KintoException, K...
0", so the sign flag would be set to 1 if the value isn't # accessible. # We inline the Shadow::IsAccessible function for performance reasons. # This function does the following: # - Checks if this byte is accessible and jumps to the error path if it's # not. # - Removes the memory location from the top of the stack. _...
not None: self._logger.info(' '.join(['SPECTRAL INDICES COMMAND:', cmd])) output = '' try: output = utilities.execute_cmd(cmd) finally: if len(output) > 0: self._logger.info(output) def generate_surface_water_extent(self): """Generates the Dynamic Surface Water Extent product """ options = self._parms['o...
ASE2020 Performance') MlPrediction(x_train, y_train, x_test, y_test, y_pred_bats=y_preds, test_case_similarity_list=test_case_similarity_list, algorithm='lr', comparison=ASE2020, cutoff=cut_off).predict() MlPrediction(x_train, y_train, x_test, y_test, y_pred_bats=y_preds, test_case_similarity_list=test_case_similarit...
import os from pathlib import Path from gd.api.database import Database from gd.async_utils import run_blocking from gd.crypto import ( DEFAULT_ENCODING, DEFAULT_ERRORS, decode_os_save, decode_save, encode_os_save, encode_save, ) from gd.logging import get_logger from gd.platform import LINUX, MACO...
# -*- coding: utf-8 -*- import hashlib import logging import os import warnings from collections.abc import MutableMapping from pathlib import Path from typing import Callable, Dict, List, Optional, Union import imageio import numpy as np from matplotlib import cm, colors, patches from matplotlib import pyplot as plt ...
#!/usr/bin/env python3 """ Module to implement the Modified Seminario Method Originally written by <NAME>, TCM, University of Cambridge Modified by <NAME> and rewritten by <NAME>, Newcastle University Reference using AEA Allen, MC Payne, DJ Cole, J. Chem. Theory Comput. (2018), doi:10.1021/acs.jctc.7b00785 """ from Q...
p = Process(target=subprocess.Popen, args=(command,), kwargs=dict(shell=True)) p.start() def build_toy_socket_server_c(): """Build the socket server with the toy socket evaluator in C""" # Make sure only toy socket is the only evaluator that is built (set the values of all # rw_evaluators to zero) for rw_evaluat...
import coopihc from coopihc.space import StateElement, State, StateNotContainedError import gym import numpy import sys import copy _str = sys.argv[1] # -------- Correct assigment if _str == "correct" or _str == "all": x = StateElement( values=[ numpy.array([1]).reshape( 1, ), 2, 3, ], spaces=[ coopihc.spa...
pool members on each BIG-IP monitor_states = \ hostbigip.pool.get_members_monitor_status( name=pool['id'], folder=pool['tenant_id'], config_mode=self.conf.icontrol_config_mode ) for member in service['members']: if member['status'] in update_if_status: # create the entry for this # member in the return status...
<reponame>mkhalil8/hnn-core """Network class.""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> import itertools as it from copy import deepcopy import numpy as np from .drives import _drive_cell_event_times from .drives import _get_target_...
"""Check that `query`ing an `NEODatabase` accurately produces close approaches. There are a plethora of ways to combine the arguments to `create_filters`, which correspond to different command-line options. This modules tests the options in isolation, in pairs, and in more complicated combinations. Althought the t...
command in. Max 5 channels per server. Overrides previous settings. [Options] Info (-info): check the options of the mapfeed on your server. Map Status (-st): 1 = Ranked, 2 = Approved, 3 = Qualified, 4 = Loved. Exclusively these map statuses. Modes (-m #): 0 = std, 1 = taiko, 2 = ctb, 3 = mania. Exclusively these ...
<filename>build/lib/smileml/ml/random_layer.py # -*- coding: utf8 # Author: <NAME> [dcl -at- panix -dot- com] # Copyright(c) 2013 # License: Simple BSD """The :mod:`random_layer` module implements Random Layer transformers. Random layers are arrays of hidden unit activations that are random functions of input activat...
<filename>nodes/cozmo_driver.py #!/usr/bin/python3.5 # -*- encoding: utf-8 -*- """ This file implements an ANKI Cozmo ROS driver. It wraps up several functionality of the Cozmo SDK including camera and motors. As some main ROS parts are not python3.5 compatible, the famous "transformations.py" is shipped next to this n...
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: <NAME> # PRPE technical version 6 #============================================================================= import sys from collections import Counter from copy import deepcopy from numpy import argmin goodroots = Counter() badroots = {} goodprefixes = Counter...
event_pair in event_matches.items(): edges = self.graph.get_edges(event) new_edges = [] for edge in edges: (vertex, type) = edge new_edges.append((event_matches[vertex], type)) new_edges = set(new_edges) edges_pair = set(other.graph.get_edges(event_pair)) if new_edges != edges_pair: return False return True...
# This file implements spiking neural networks as described # in the work: # <NAME>, Coarse scale representation of spiking neural networks: # backpropagation through spikes and applications to neuromorphic hardware, # International Conference on Neuromorphic Systems (ICONS), 2020 import argparse import torch ...
return '' def normalize_rev(self, rev): return to_unicode(self._resolve_rev(rev).oid.hex) def short_rev(self, rev): rev = self.normalize_rev(rev) git_repos = self.git_repos for size in xrange(self.shortrev_len, 40): short_rev = rev[:size] try: git_object = git_repos[short_rev] if git_object.type == GIT_OBJ_...
<reponame>Skepay/Resume-Projects # Contains all npcs and puzzles for the game. #TODO: Convert to all object-oriented. from src import * #~/ SHOP \~# class WanderingTraveler: def __init__(self, player): ClearConsole() TypeOut("Wandering Traveler: Welcome to my shop!") time.sleep(1.25) self.name = "<NAME>" self.sh...
import datetime from dateutil.relativedelta import relativedelta from rest_framework import status, viewsets from rest_framework.decorators import link, list_route from rest_framework.exceptions import ParseError from rest_framework.fields import ValidationError from rest_framework.response import Response from dbser...
role == "Administrator" or role == "admin" or role == "Agent" or role == "agent": isAllowed = True botlog.LogSymphonyInfo("Role of the calling user: " + role) else: isAllowed = False botlog.LogSymphonyInfo("The calling user is a Zendesk " + role) ################################################# botlog.LogSymp...
import io from atws.wrapper import Wrapper from django.core.management import call_command from django.test import TestCase from djautotask.tests import fixtures, mocks, fixture_utils from djautotask import models def sync_summary(class_name, created_count, updated_count=0): return '{} Sync Summary - Created: {}, Up...
# -*- coding: utf-8 -*- # # Copyright 2010 <NAME> # # Distributed under the terms of the MIT license # import warnings as _warnings import os as _os import ctypes as _ct from ctypes.util import find_library as _find_library import numpy as _np from numpy.ctypeslib import ndpointer as _ndpointer import pkg_resource...
# -*- coding: utf-8 -*- """ v9s model * Input: v5_im Author: Kohei <<EMAIL>> """ from logging import getLogger, Formatter, StreamHandler, INFO, FileHandler from pathlib import Path import subprocess import argparse import math import glob import sys import json import re import warnings import scipy import tqdm impo...
0.0452150644285857, -0.0220226812226592, -0.0556777449240322, -0.106839588557335, -0.124419677875331, -0.15802574281452, -0.0722707700506129, -0.105116727222253, -0.693738296346539, 0.124279255191775, 0.560069134869483, 0.6841791124165, -0.107031678165138, -0.0412583559665033, 0.00896442684349225, 0.08447869069310...
:py:class:`ActionOpcode <ydk.models.cisco_ios_xr.Cisco_IOS_XR_skp_qos_oper.ActionOpcode>` """ _prefix = 'skp-qos-oper' _revision = '2016-02-18' def __init__(self): super(PlatformQos.Nodes.Node.Interfaces.Interface.Output.SkywarpQosPolicyClass.QosShowPclassSt.Marking.MarkOnly.MarkDetail, self).__init__() s...
Calculation of the right part """ zeros = '1' + len(rightmost)*'0' length = int(zeros) next = int(rightmost)/length list_of_numbers = [] length = 0 while length <= 20: if next * 2< 1: list_of_numbers.append(0) next = next * 2 else: next = next * 2 num = int(next) list_of_numbers.append(1) next = next -...
SALES_QUOTE_LINES = "salesQuoteLines" SHIPMENT_METHOD = "shipmentMethod" class Enum31(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ID = "id" AMOUNT = "amount" APPLIES_TO_INVOICE_ID = "appliesToInvoiceId" APPLIES_TO_INVOICE_NUMBER = "appliesToInvoiceNumber" COMMENT = "comment" CONTACT_ID = "contactId" ...
getdata = GetData() getdata.inventory = reply_inv log.debug("send GetData in reply to Inv for %s item(s)" % len(reply_inv)) self.send_message(getdata) else: if self.have_all_block_data(): self.loop_exit() def add_sender_info( self, sender_txhash, nulldata_vin_outpoint, sender_out_data ): """ Record sender ...
<filename>Ctrax/draw.py # draw.py # KMB 11/10/08 import os import pdb import sys import matplotlib #matplotlib.use( 'WXAgg' ) matplotlib.interactive( True ) import matplotlib.backends.backend_wxagg import matplotlib.figure import matplotlib.cm import matplotlib.pyplot as plt if hasattr( plt, 'tight_layout' ): # matpl...
# Copyright (c) OpenMMLab. All rights reserved. import copy import csv import json import os.path as osp import warnings from collections import OrderedDict, defaultdict import mmcv import numpy as np import torch.distributed as dist from mmcv.runner import get_dist_info from mmcv.utils import print_log from mmdet.co...
# -*- coding: utf-8 -*- import collections import inspect import time import random import selenium from selenium.webdriver import Ie, Opera, Chrome, Firefox, PhantomJS from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support....
<reponame>axonepro/sdk-ooti<filename>resources/ooti.py<gh_stars>1-10 import requests import json import sys # TODO Trouver comment refacto tous ces imports from .accounting import Accounting from .actions import Actions from .annexes import Annexes from .areas import Areas from .auth import Auth from .banks import Ban...
to the result :param should_escape: If the string should be HTML-escaped :return: A unicode string or strlist """ if value is None: return u'' type_ = type(value) if type_ is not strlist: if type_ is not str_class: if type_ is bool: value = u'true' if value else u'false' else: value = str_class(value) ...
<reponame>ChateauClaudia-Labs/apodeixi<filename>src/apodeixi/controllers/journeys/delivery_planning/journeys_controller.py<gh_stars>0 import itertools as _itertools from apodeixi.controllers.util.manifest_api import ManifestAPI from apodeixi.controllers.journeys.delivery_planning.journeys_posting_label import Journeys...
<reponame>ronaldseoh/transformers-nli<gh_stars>1-10 # coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
<gh_stars>0 # Copyright 2013-2017 The Meson development 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...
"""tests dynamic cards and dynamic load cards""" import unittest from io import StringIO import numpy as np import pyNastran from pyNastran.bdf.bdf import BDF, read_bdf, CrossReferenceError from pyNastran.bdf.cards.test.utils import save_load_deck #ROOT_PATH = pyNastran.__path__[0] class TestDynamic(unittest.TestCas...
self.eos_phase_ref.S_dep_l self.H_dep_T_ref_Pb = self.eos.to_TP(self.T_ref, 101325).H_dep_l self.S_dep_T_ref_Pb = self.eos.to_TP(self.T_ref, 101325).S_dep_l if self.Tb: self.eos_Tb = self.eos.to_TP(self.Tb, 101325) self.H_dep_Tb_Pb_g = self.eos_Tb.H_dep_g self.H_dep_Tb_Pb_l = self.eos_Tb.H_dep_l self.H_dep_Tb...
<filename>Java_customization/seleniumActions.py from cmath import e from re import X from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from RPA.Desktop import Desktop from io import BytesIO from PIL import Image, ImageFile, ImageGrab import oci import logging from selenium.webdr...
import numpy as np import warnings from stingray.base import StingrayObject from stingray.gti import check_separate, cross_two_gtis from stingray.lightcurve import Lightcurve from stingray.utils import assign_value_if_none, simon, excess_variance, show_progress from stingray.fourier import avg_cs_from_events, avg_pds...
if self.stop_btn.cget('state') == 'normal': # Stop button is enabled (program is ok to stop) self.__stop() # Stops program execution elif (self.row, self.col) != (None, None): # Checks that a square is selected if event.char.isnumeric(): # If entered key is a digit self.__display_number(self.row, self.col, event.ch...
#!/usr/bin/env python3 import argparse import tempfile import logging import difflib import glob import json import sys import os import re from pprint import pformat from .counter import PapersForCount, SenateCounter from .aecdata import CandidateList, SenateATL, SenateBTL, FormalPreferences from .common import logge...
"""Module that contains tests to check that xml file has been written""" import os from pathlib import Path from conftest import get_jarvis4se, remove_xml_file from xml_adapter import XmlParser3SE jarvis4se = get_jarvis4se() xml_parser = XmlParser3SE() def test_generate_xml_file_template(): """Notebook equivalent:...
<filename>clients/utils/geometry.py import copy import json import re from bisect import bisect_left from decimal import Decimal from itertools import product from math import cos, fabs, radians, sqrt from parserutils.numbers import is_number from pyproj import Proj, transform from pyproj.exceptions import CRSError f...
atom and residues for common group Adenin_Common_combine_Lig_Res_H_distance.setdefault('%s'%atmH,[]).append(distanceH)#creating dictionary with all lig atom and distance for table Adenin_Common_combine_Lig_Res_H_distance_uniquify={k:list(set(j)) for k,j in Adenin_Common_combine_Lig_Res_H_distance.items()} Adenin_Co...
''' Count-Min Sketch python implementation License: MIT Author: <NAME> (<EMAIL>) URL: https://github.com/barrust/count-min-sketch ''' from __future__ import (unicode_literals, absolute_import, print_function, division) import os import math from numbers import Number from struct import (pack, unpack, calcsize) fro...
import io import psycopg2 from psycopg2 import sql from psycopg2.extras import RealDictCursor import sys import json import datetime import decimal import time import os import binascii from distutils.sysconfig import get_python_lib import multiprocessing as mp import datetime import pandas as pd import pdb import ins...
<filename>dev/WebTrader.py #-*- coding:UTF-8 -*- from time import sleep from HTSocket import HTSocket import pandas as pd import tushare as ts import SocketTrader as st import ShellTrader as sht #from numba import jit import pymongo #import json import logging logging.basicConfig(level=logging.INFO, filename='.pyTrade...
<reponame>visdom2000/python-for-android<gh_stars>100-1000 from __future__ import print_function, unicode_literals import sys import types import traceback # Test imports. import time droid = None skip_gui = False fOutName = True # tests for python modification for android {{{1 def test_029_isfile(): # issue #29 {{{...