input
stringlengths
2.65k
237k
output
stringclasses
1 value
#!/usr/bin/env python # # Copyright (C) 2014 <NAME>, <NAME>, # Regents of the University of California # # This implementation utilizes code and methods from Riccardo Vianello # as well as code structure and inspiration from geoalchemy2 import base64 import contextlib import functools import numbers import operator im...
shared_memory='20M', modules=[__name__], options={'scheduler.retry_num': 1}) as cluster: with self.assertRaises(ExecutionFailed): try: cluster.session.run(tensor, timeout=_exec_timeout) except ExecutionFailed as ex: self.assertIsInstance(ex.__cause__, TypeError) raise data = mt.tensor(np.random.rand(10, 20)) ...
<gh_stars>1-10 ## InferenceDataset import numpy as np import glob import cv2 import os from plane_decoder.utils import * from plane_decoder.plane_dataset import * #from datasets.plane_dataset import * ## Yolo LoadImagesAndLabels import glob import math import os import random import shutil import time from pathli...
4.21e-16, 4.63e-16, nan ], [ 2800, 35.7167, 0.4392, 44.5733, 0.3519, 20.0275, 0.7832, 20.2618, 0.7741, 4.06e-16, 4.47e-16, 4.06e-16, nan ], [ 2900, 36.9877, 0.4549, 47.8134, 0.3519, 20.8733, 0.8061, 21.4311, 0.7851, 5.49e-16, 4.70e-16, 4.70e-16, nan ], [ 3000, 38.5516, 0.4671, 48.5364, 0.3710, 21.6957, 0.8299, 21.30...
EnumItem(0).set_string('32kHz') ADLSampleRate_44P1KHz = EnumItem(1).set_string('44.1kHz') ADLSampleRate_48KHz = EnumItem(2).set_string('48kHz') ADLSampleRate_88P2KHz = EnumItem(3).set_string('88.2kHz') ADLSampleRate_96KHz = EnumItem(4).set_string('96kHz') ADLSampleRate_176P4KHz = EnumItem(5).set_string('176.4kHz')...
(ds.longitude - lon)**2 + (ds.latitude - lat)**2 ds = ds.isel(points=c.argmin()) # the prcp dataset needs to be restructured to have values for each day prcp = ds['tp'].data * 1000 # just assume that precipitation is every day the same: prcp = np.repeat(prcp, ds['time.daysinmonth']) # Attention the unit is now p...
is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. """ pulumi.set(__self...
MixedContainer.TypeString: outfile.write('<%s>%s</%s>' % ( self.name, self.value, self.name)) elif self.content_type == MixedContainer.TypeInteger or \ self.content_type == MixedContainer.TypeBoolean: outfile.write('<%s>%d</%s>' % ( self.name, self.value, self.name)) elif self.content_type == MixedContainer.Type...
start = '14:30' , end = '17:15' , work_location = '6' , wp = '15' ) db.time_record.create \ ( daily_record = dr , start = '09:00' , end = '14:00' , work_location = '6' , wp = '15' ) db.time_record.create \ ( daily_record = dr , start = '17:15' , end = '20:30' , time_activity = '10' , work_location = '1...
#!/usr/bin/env python3.6 # coding=utf-8 ''' UCCAGraph representing UCCA graph as PTBTrees with other coreference edges make UCCAGraph as a proxy for UCCA parsing, by offering a construct to transform a MRP graoh in UCCAGraph @author: <NAME> (<EMAIL>) @since: 2019-06-07 ''' from utility.constants import * import netwo...
""".replace( '$tdw_count', type_uids_dict[D_UID_TDW_TABLE_KEY] ) if bk_biz_id_list_uids: data_mart_dgraph_uids_query_final += gen_bk_biz_id_list_query(bk_biz_id_list_uids) if (need_detail_type == NEED_DATA_SET_ID_DETAIL and need_only_uids) or need_all_data_dict_list: # 按照存储类型过滤 if storage_type: data_mart_dgra...
'rotate', 'rotates', 'rotfl', 'rotten', 'rottenly', 'rouge', "rouge's", 'rougeport', 'rouges', 'rough', 'roughtongue', 'rougue', 'round', 'round-a-bout', 'round-up', 'rounded', 'rounder', 'rounders', 'roundest', 'roundhouse', 'rounding', 'roundly', 'roundness', 'rounds', 'roundup', 'route', 'r...
fnss.add_stack(topology, v, 'source') for v in receivers: fnss.add_stack(topology, v, 'receiver') for v in routers: fnss.add_stack(topology, v, 'router') # label links as internal or external for u, v in topology.edges(): if u in sources or v in sources: topology.edges[u, v]['type'] = 'external' # this preven...
<reponame>hhucn/dbas """Introducing an API to enable external discussions. This is the entry point for the API. Here are views defined, which always return JSON objects which can then be used in external websites. .. note:: Methods **must not** have the same name as their assigned Service. """ import logging from typ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
<filename>tests/test_regen.py import re import unittest from typing import List, Tuple from grascii import regen, grammar, similarities class TestAnnotationRegex(unittest.TestCase): def check_strictness_low(self, annotations: List[str], texts: List[Tuple[str, str]]): builder = regen.RegexBuilder(annotation_mode=...
import os.path as osp import argparse import torch import torch.nn.functional as F import torch_geometric.utils.num_nodes as geo_num_nodes from torch_geometric.datasets import Planetoid import torch_geometric.transforms as T from torch_geometric.nn import GCNConv # noga from utils import * from pytorch_train import * i...
= F_uv3 if loop_ >=1: no_change = np.isclose(F_uv, F_UVs[loop_-1], rtol=1e-04, atol=1e-08) bad_iter = (F_uv >= F_UVs[loop_-1]) if no_change or bad_iter: if verbose: print('\tIteration %d loop %d end - no significant updates\n'%( run_count,loop_)) if bad_iter: print('***diverged wrt last iteration') if ve...
""" Supplement for Embodied AI lecture 20170112 Some Reinforcement Learning examples Implementing only Temporal Difference methods so far: - TD(0) prediction - Q-Learning - SARSA TODO - x use function approximation for v,q,q_Q,q_SARSA - policy search for continuous space - use state matrix as visual input / co...
<reponame>jmcb/murderrl<filename>builder/builder.py #!/usr/bin/env python """ Attempt to create a "manor" akin to:: ############################################### #.........#......#........#...........#.......# #.........#......#........#...........#.......# #.........#......#........#...........#.......# #........
<filename>lib/kb_cocacola/Utils/CocacolaUtil.py import errno import json import os import subprocess import sys import time import uuid import zipfile from Bio import SeqIO from installed_clients.AssemblyUtilClient import AssemblyUtil from installed_clients.DataFileUtilClient import DataFileUtil from installed_clients...
<reponame>langrenn-sprint/race-service<gh_stars>0 """Integration test cases for the raceplans route.""" from copy import deepcopy import os from typing import Any, Dict, List import uuid from aiohttp import hdrs from aiohttp.test_utils import TestClient as _TestClient from aioresponses import aioresponses import jwt i...
{ "float_op": p[0], "fast_math_flag": f, "float_type": t[1], "float_operandA": oA, "float_operandB": o, } ) variations_fl_t_op_x.append( { "float_op": p[1], "fast_math_flag": f, "float_type": t[0], "float_operandA": oA, "float_operandB": o, } ) variations_fl_t_op_y.append( { "float_op": p[1], "fast_...
<filename>ricecooker/classes/nodes.py<gh_stars>0 # Node models to represent channel's tree import json import uuid import os import csv from le_utils.constants import content_kinds, exercises, file_formats, format_presets, languages, roles from .licenses import License from .. import config, __version__ from ..excep...
logout_uri: (optional) path for user logout. :attr float max_req_per_min: (optional) The number of `/api/*` requests per minute to allow. Exceeding this limit results in 429 error responses. :attr float max_req_per_min_ak: (optional) The number of `/ak/api/*` requests per minute to allow. Exceeding this limit resul...
<filename>notify.py #!/usr/bin/env python3 # _*_ coding:utf-8 _*_ import base64 import hashlib import hmac import json import os import re import threading import time import urllib.parse import requests # 原先的 print 函数和主线程的锁 _print = print mutex = threading.Lock() # 定义新的 print 函数 def print(text, *args, **kw): """ ...
# python modules from subprocess import Popen, PIPE from os import path import traceback from time import sleep from uuid import uuid4 # local imports from utils import Utils, Log, Command import settings ################################################################################ # IOS UTILS FUNCTIONS #########...
parser: titus.datatype.ForwardDeclarationParser :param parser: used to interpret ``fromType`` :rtype: ``None`` or result of one of the ``cases`` callable :return: if ``partial``, returns ``None``, else returns the result of the matching case """ fromType = parser.getAvroType(fromType) for name, toType, clause i...
<reponame>UniversitaDellaCalabria/storage.portale from rest_framework import generics, permissions from rest_framework.response import Response from rest_framework.schemas.openapi import AutoSchema from .filters import * from .models import DidatticaTestiRegolamento from .serializers import * from .services import *...
<filename>games/necrowar/controllers/central_command.py import logging import heapq import numpy as np from enum import Enum, auto from collections import defaultdict from ..game import Game from ..tile import Tile from ..player import Player from ..unit import Unit import random class UnitTypes(Enum): WORKER = auto...
ntuniprot(RecName_Full='Uncharacterized protein YGR066C'), 'P53243' : ntuniprot(RecName_Full='Zinc finger protein YGR067C'), 'P53244' : ntuniprot(RecName_Full='Arrestin-related trafficking adapter 5'), 'P53246' : ntuniprot(RecName_Full='Late endosome and vacuole interface protein 11'), 'P53248' : ntuniprot(RecName_...
states from a controller. Returns `True` if any names specified to `buttons` reflect `testState` since the last :py:class:`~Rift.updateInputState` or :py:class:`~Rift.flip` call. If multiple button names are specified as a `list` or `tuple` to `buttons`, multiple button states are tested, returning `True` if all ...
<gh_stars>1-10 # -*- coding: utf-8 -*- # # Copyright (c) 2012-2014 <NAME> <<EMAIL>> # Copyright (c) 2013-2019 <NAME> <<EMAIL>> # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission noti...
print('Min: {} Max: {}'.format(frame['UTAS'].min(), frame['UTAS'].max())) for y_feature in Y_features_continous: output = crude_reg(frame, x_feature, y_feature, covars, 'False', 'csv', True) text_writing(name, frame, x_feature, y_feature, all_vars, output_path_model3_noadj, output, "linear_reg_{}_{}_log({}).txt"....
Event is a message containing another message. Forwarded messages have no ID, so we # use a Message instead of a SentMessage here, unless they come from a channel. forward_id = forward_channel = forward_user = None if message.forward.channel_id and message.forward.channel_post: forward_channel = immp.Channel(telegr...
# Virtual memory analysis scripts. # Developed 2012-2014 by <NAME>, <EMAIL> # Copyright (c) 2012-2014 <NAME> and University of Washington from trace.vm_regex import * from util.pjh_utils import * from analyze.process_group_class import * from trace.vm_common import * import itertools import os import re import shutil ...
#!/usr/bin/env python # <NAME> # <EMAIL> # ######################################################################## # Copyright 2013 Mandiant # Copyright 2014,2018 FireEye # # Mandiant licenses this file to you under the Apache License, Version # 2.0 (the "License"); you may not use this file except in compliance with...
<filename>src/mbed_cloud/_backends/update_service/models/update_campaign.py # coding: utf-8 """ Update Service API This is the API documentation for the Device Management deployment service, which is part of the Update service. OpenAPI spec version: 3 Generated by: https://github.com/swagger-api/swagger-codege...
<reponame>jensgk/optbinning """ Optimal binning algorithm 2D. """ # <NAME> <<EMAIL>> # Copyright (C) 2021 import matplotlib.pyplot as plt import numpy as np import pandas as pd from mpl_toolkits.axes_grid1 import make_axes_locatable from ...formatting import dataframe_to_string from ..binning_statistics import _che...
<filename>1_exploration/functions.py """ This script centralized the functions for the data exploration. The functions in this script are: * load_ds: Load a device-specific dataframe located in the folder ../data/interim. If it does not exist, it will start load_raw_data that will create all the device-specific datafr...
<reponame>kevinastone/luma.lcd # -*- coding: utf-8 -*- # Copyright (c) 2013-17 <NAME> and contributors # See LICENSE.rst for details. """ Collection of serial interfaces to LCD devices. """ # Example usage: # # from luma.core.interface.serial import spi # from luma.core.render import canvas # from luma.lcd.device imp...
<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...
MRK1'), 'P50874' : ntuniprot(RecName_Full='Origin recognition complex subunit 5'), 'P50875' : ntuniprot(RecName_Full='Transcription factor SPT20'), 'P50896' : ntuniprot(RecName_Full='Protein PSP1'), 'P50942' : ntuniprot(RecName_Full='Polyphosphatidylinositol phosphatase INP52'), 'P50944' : ntuniprot(RecName_Full='...
# This file was automatically created by FeynRules 2.3.24 # Mathematica version: 11.0.1 for Linux x86 (64-bit) (September 21, 2016) # Date: Tue 21 Feb 2017 10:41:19 from __future__ import division from object_library import all_particles, Particle import parameters as Param import propagators as Prop a = Particle(p...
periods must be double quoted, e.g. ``'scratch."my.table"'``. api_key : DEPRECATED str, optional Your Civis API key. If not given, the :envvar:`CIVIS_API_KEY` environment variable will be used. client : :class:`civis.APIClient`, optional If not provided, an :class:`civis.APIClient` object will be created from th...
cos(1) """ from sympy.integrals import integrate if x is None: x = self.x elif iterable(x): return integrate(self.function, x) f = integrate(self.function, x) ind = integrate(self.ind, x) ind += (f - ind).limit(x, 0) # constant of integration pow_xk = self._get_pow_x(self.xk.formula) ak = self.ak k = ak....
<reponame>picsag/NLP from utils import process_tweet, lookup import numpy as np import pandas as pd import pickle def test_count_tweets(target): successful_cases = 0 failed_cases = [] test_cases = [ { "name": "default_check", "input": { "result": {}, "tweets": [ "i am happy", "i am tricked", "i am sad", "...
<filename>schedule.py #schedule.py #importing time import time #Making time readable format clock = (time.ctime()) hour = clock[11:13] minute = clock[14:16] currenttime = 60*int(hour) + int(minute) day = clock[0:3] print (currenttime) print (clock) #IDK why this is here whatclass = ("none") #used to read White and Go...
N.array([1,1,2]) transformations.append((rot, trans_num, trans_den)) rot = N.array([0,-1,0,-1,0,0,0,0,-1]) rot.shape = (3, 3) trans_num = N.array([0,0,1]) trans_den = N.array([1,1,2]) transformations.append((rot, trans_num, trans_den)) sg = SpaceGroup(93, 'P 42 2 2', transformations) space_groups[93] = sg space_groups[...
archive_dir) if not str(file_tuple[2]).endswith('/'): util.rename(file_tuple[2], archive_dir) logging.warn( 'The file %s archive success' % file_tuple[2]) else: rest = obspycmd.OBSRequestDescriptor(request_type='', ak=user.ak, sk=user.sk, auth_algorithm=running_config[ 'AuthAlgorithm'], virtual_host=running_...
entropy - all nos equally likely p_max = [[[0, 0.0] for bin in range(time_bins)] for var in range(variables_number)] for t in range(time_bins): for var in range(variables_number): for dom in range(domain_size): # normalize probabilities with regard to the maximum entropy on each time bin if probabilities[var][t][...
<gh_stars>0 from gurobipy import * import docplex.mp.model as cpx import pulp as plp import cplex from database.models import Building, Component, Battery import json # https://medium.com/opex-analytics/optimization-modeling-in-python-pulp-gurobi-and-cplex-83a62129807a # http://ibmdecisionoptimization.github.io/docple...
import argparse import sys import mdtraj as md import numpy as np import matplotlib.pyplot as plt from numpy import linalg as LA from sklearn import cluster, datasets from scipy.optimize import minimize from sklearn.neighbors import kneighbors_graph from sklearn.manifold import SpectralEmbedding from scipy.spatial.dist...
#!/usr/bin/env python ############################################################################# ## # This file is part of Taurus ## # http://taurus-scada.org ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Taurus is free software: you can redistribute it and/or modify # it under the terms of t...
None, "place": None, "in_reply_to_status_id": None, "in_reply_to_user_id": None, "quoted_status_id": None, "retweet_count": 2, "favorite_count": 3, "lang": "en", "withheld_copyright": False, "withheld_in_countries": None, "entities": { "urls": [] }, "source": "Twitter Web App", "videos": 0, "photos": 0, ...
<gh_stars>0 import random def Output_Board(Round): x = [" _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______", " 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 "] for i in range(0,2): print(x[i]) if Round == 0: print("\n SET UP") else: prin...
provisioning. Default behavior is to use the underlying vagrant default. Note: If provision and no_provision are not None, no_provision will be ignored. ''' provider_arg = '--provider=%s' % provider if provider else None prov_with_arg = None if provision_with is None else '--provision-with' providers_arg = None ...
'0.1.0') f1 = self._add_notes_file('slug1') self.repo.git('tag', '-s', '-m', 'alpha tag', '1.0.0.0a1') f2 = self._add_notes_file('slug2') self.repo.git('tag', '-s', '-m', 'beta tag', '1.0.0.0b1') f3 = self._add_notes_file('slug3') self.repo.git('tag', '-s', '-m', 'release candidate tag', '1.0.0.0rc1') self.c.ove...
__author__ = "<NAME>" __credits__ = "<NAME>" import unittest import os from nose.plugins.attrib import attr from jnpr.junos import Device from jnpr.junos.exception import RpcError from ncclient.manager import Manager, make_device_handler from ncclient.transport import SSHSession from mock import MagicMock, patch imp...
break # dSleep(waitTime * 1000) def SetEndEffectorParamsEx(api, xBias, yBias, zBias, isQueued=0): ret = SetEndEffectorParams(api, xBias, yBias, zBias, isQueued) while(True): if ret[0] <= GetQueuedCmdCurrentIndex(api)[0]: break dSleep(5) def SetPTPJointParamsEx(api, j1Velocity, j1Acceleration, j2Velocity, j2Ac...
<gh_stars>1-10 """Implementations for corpus and lexicon encoding and weighting""" import collections import logging import math import re from .utils import _progress _logger = logging.getLogger(__name__) class Encoding(object): """Base class for calculating the entropy (encoding length) of a corpus or lexicon....
1}, status=200, content_type='application/json', ) # prepare registration data registration_data = { "stage": "prebirth", "mother_id": "mother00-9d89-4aa6-99ff-13c225365b5d", "data": REG_DATA["hw_pre_father_and_mother"].copy(), "source": self.make_source_adminuser() } registration_data["data"]["preg_week"] = ...
使用用户名、密码登陆, 如果成功,返回用户可用的策略帐号列表 print("\nTradeApi login {}@{}".format(username, address)) user_info, msg = self.login(username, password) if not (msg == '0,'): print(" login failed: msg = '{}'\n".format(msg)) else: print(" login success. user info: \n" " {:s}\n".format(str(user_info))) self.user_info = user_in...
<reponame>maxibor/nyoka<gh_stars>1-10 """ Copyright (c) 2004-2016 Zementis, Inc. Copyright (c) 2016-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use thi...
<gh_stars>1-10 # coding: utf-8 from __future__ import unicode_literals import functools import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( format_field, int_or_none, parse_resolution, str_or_none, try_get, unified_timestamp, url_or_none, urljoin, OnDemandPagedLi...
#!/usr/bin/env python # Copyright 2014 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 bz2 import gzip import json import logging import logging.handlers import os import re import shutil import subprocess import sy...
kwargs.get('hold', 'off') if hold not in ('on', 'off'): raise ValueError("if specified, hold must be 'on' or 'off'") if hold == 'off': self.default_color_index = 0 self.new_data(x, y, style, name, yaxis, hold) self.xaxis_mode = 'log' pos_x_values = 0 total_x_values = 0 for curve_name in self.curves.keys(): ...
== "none" : _allowed_namespace = None _curr_tries = 0 _max_tries = int(obj_attr_list["update_attempts"]) _wait = int(obj_attr_list["update_frequency"]) sleep(_wait) self.common_messages("VMC", obj_attr_list, "cleaning up vms", 0, '') obj_attr_list["adapter_force_all"] = force_all self.connect(obj_attr_list["...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\umt_work.ui' # # Created by: PyQt5 UI code generator 5.15.0 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Qt...
'abc': filepath = mayaNode2FilePath(mayaElementPath, self.fileDir, 'abc', relativePath=True) newElement = scenegraphXML.Reference(curNodeName, refType='abc', refFile=filepath, groupType=nodeGroupType) abcFilePath = mayaNode2FilePath(mayaElementPath, self.fileDir, 'abc', relativePath=False) # if staticComponent for...
after calling :func:`imshowhs_grid`, as desired. Node coordinates are printed when a mouse button is pressed on a cell in the plot. For now, this function only works with regular grids. Developed by: <NAME> Parameters ---------- grid : ModelGrid Grid containing the field to plot, or describing the geometry ...
import datetime import enum import json import logging import os import pathlib import typing import xml.etree.ElementTree import peewee import playhouse.sqlite_ext as peewee_sqlite import objective_turk.color_logs import mturk CASCADE = "CASCADE" NO_ACTION = "NO ACTION" logger = logging.getLogger(__name__) logger....
# <NAME> 2021 # Vennt API example client import requests import json import uuid import argparse import time url = 'http://localhost:3004/' parser = argparse.ArgumentParser(description='Vennt API example client.') parser.add_argument('--verify', action='store_true', help="Stop running the example when a ...
<reponame>srccircumflex/SefiTrash # MIT License # # Copyright (c) 2022 <NAME> [srccircumflex] # # 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 limitati...
<filename>sango/test_ext.py<gh_stars>0 from functools import wraps from ._vars import ref_ import pytest from ._vars import Storage from ._ext import ( vals, Action, Conditional, Sequence, task, var_, ClassArgFilter, TypeFilter, Fallback, Tree, task_, Parallel, loads, TaskLoader, loads_, actionf, condf, condvar, ...
E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.view_fundingsv3_with_http_info(orcid, async_req=True) >>> result = thread.get() :param async_req bool :param str orcid: (required) :return: FundingsV30 If the method ...
Sample, <NAME>, <NAME>, <NAME>, <NAME>. Airaksinen, <NAME>, <NAME>, <NAME>, and U. Schieferd, "A mathematical description of nerve fiber bundle trajectories and their variability in the human retina. Vision Research 49:2157-2163, 2009. """ # Check for the location of the optic disc: loc_od = (self.loc_od_x, self...
''' Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
= pd_DataFrame([self.seq], columns=lst_clm).to_dict(orient='records')[0] if spr: self.spr_nit() if rtn: return self.seq def nfd(self, spr=False, rtn=False): """ unfold dict cells inside a list or dict object. :param spr: let dcz = dcz.seq or not, default False :param rtn: return the result or not, default Fal...
<reponame>MTC-ETH/Federated-Learning-source # Import required libraries import pickle import copy import pathlib import dash import dash_auth import math import datetime as dt import pandas as pd from dash.dependencies import Input, Output, State, ClientsideFunction import dash_core_components as dcc import dash_html_c...
<reponame>stefanthoss/enviroplus_exporter #!/usr/bin/env python3 import argparse import logging import os import subprocess import time from threading import Thread import aqi import requests import ST7735 from bme280 import BME280 from enviroplus import gas from fonts.ttf import RobotoMedium as UserFont from influxd...
<filename>st2common/tests/unit/test_shell_action_system_model.py # -*- coding: utf-8 -*- # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 obtai...
print("Starting ") from tkinter import * from tkinter import filedialog from tkinter import font from tkinter import messagebox from tkinter import colorchooser from tkinter import messagebox from tkinter import ttk from tkinter.ttk import * try: from tkinter import * from tkinter import filedialog from tkinter...
dset_id = 3902716 elif dsid == 'FloodModeling1': dset_id = 3902694 elif dsid == 'FloodModeling2': dset_id = 3902696 elif dsid == 'FloodModeling3': dset_id = 3902698 elif dsid == 'AustraliaRainfall': dset_id = 3902654 elif dsid == 'PPGDalia': dset_id = 3902728 elif dsid == 'IEEEPPG': dset_id = 3902710 elif dsid =...
#--------------------------------------------------------------------------- # Returns a list of Actions that will create 'new' objects: #--------------------------------------------------------------------------- def _new_actions ( self, node, object ): """ Returns a list of Actions that will create new objects. ...
""" semvermanager ================= `semvermamager` exports a single class Version which implements a restricted subset of the SEMVER_ standard. .. _SEMVER: http://semver.org/ Version defines a Semantic version using the following field structure: .. code-block:: python # MAJOR.MINOR.PATCH-TAG int MAJOR # 0 to N...
which highlights unlexed data with the `CssLexer`. """ name = 'CSS+Ruby' aliases = ['css+erb', 'css+ruby'] alias_filenames = ['*.css'] mimetypes = ['text/css+ruby'] def __init__(self, **options): super(CssErbLexer, self).__init__(CssLexer, ErbLexer, **options) def analyse_text(text): return ErbLexer.analyse...
max_range + 1 for object in objects: if object.fighter and not object == player and libtcod.map_is_in_fov(fov_map, object.x, object.y): dist = player.distance_to(object) if dist < closest_dist: closest_dist = dist closest_enemy = object return closest_enemy ############################ # Item: i...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import hashlib import binascii from ..asn1crypto import keys, x509, algos, core, pem from ..asn1crypto.util import OrderedDict from . import backend from ._errors import pretty_message from ._types import type_name, st...
# encoding: utf-8 from __future__ import division, print_function, unicode_literals ########################################################################################################### # # # Filter List Manager # A plugin for the Glyphs font editor # Copyright 2018 <NAME> # Apache License 2.0 # # ##############...
"keyword2", "mb_strtolower": "keyword2", "mb_strtoupper": "keyword2", "mcal_append_event": "keyword2", "mcal_close": "keyword2", "mcal_create_calendar": "keyword2", "mcal_date_compare": "keyword2", "mcal_date_valid": "keyword2", "mcal_day_of_week": "keyword2", "mcal_day_of_year": "keyword2", "mcal_days_in_mon...
-19.774 -7.635 11.075 1.00 30.00 C ATOM 17 N6 DA X 1 -20.805 -8.088 10.364 1.00 30.00 N ATOM 18 N1 DA X 1 -18.572 -7.478 10.476 1.00 30.00 N ATOM 19 C2 DA X 1 -17.541 -7.038 11.204 1.00 30.00 C ATOM 20 N3 DA X 1 -17.514 -6.699 12.489 1.00 30.00 N ATOM 21 C4 DA X 1 -18.724 -6.865 13.048 1.00 30.00 C ATOM 22 P DA X 2 -15...
= None self.t005 = None self.t020 = [] self.t022 = [] self.t024 = [] self.t028 = [] self.t336 = [] self.t901 = [] self.t947 = [] self.sierraId = sierraId self.title = None self.bCallNumber = None self.rCallNumber = [] # parse 001 field (control field) if "001" in bib: self.t001 = bib["001"].data # par...
<filename>utility/dm_utils/DMGraph.py<gh_stars>1-10 #!/usr/bin/env python3.6 # coding=utf-8 ''' DMGraph representing DM graph as networkx graph, Being able to apply recategorization to original graph, which involves collapsing nodes for concept identification and unpacking for relation identification. @author: <NAME>...
<filename>Tax-Calculator-3.0.0/taxcalc/calcfunctions.py """ Tax-Calculator functions that calculate payroll and individual income taxes. These functions are imported into the Calculator class. Note: the parameter_indexing_CPI_offset policy parameter is the only policy parameter that does not appear here; it is used i...
/ (prefix + "p101303679-p101460357.7z"), page_ids=range(101303679, 101460358), darus_id=92947, sha1="6945f93a63f865411c9f5f38f2544bce392c8479", size=278653572, auto_download=auto_download, ), WikidatedV1_0EntityStreamsFile( archive_path=dataset_dir / (prefix + "p101460358-p101621678.7z"), page_ids=range(101460...
# -*- coding: UTF-8 -*- """ Software: LingFeat - Comprehensive Linguistic Features for Readability Assessment Page: extractor.py License: CC-BY-SA 4.0 Original Author: <NAME> (이웅성) @brucewlee Affiliation 1: LXPER AI, Seoul, South Korea Affiliation 2: University of Pennsylvania, PA, USA Contributing Author: - Affiliati...
*data* : numpy.array multichannel data matrix *Nrep* = 100 : int number of resamples *alpha* = 0.05 : float type I error rate (significance level) *verbose* = True : bool if True it prints dot on every realization, if False it's quiet. *params* : additional parameters specific for chosen estimator Returns: ...
# # cmap.py -- color maps for fits viewing # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import absolute_import, print_function from .util import six import warnings import numpy as np __all__ = ['ColorMap', 'add_cmap', 'get_cmap', 'ha...
''' root/code/block_definitions/utilities/argument_types.py Overview: Strongly typing the CGP and having a separate GA evolution for our arguments means it would be easiest to create individual classes for each of our argument data types but at least have all follow the same abstract class. At the minimum, it needs a ...