input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>wf49670/dpwb #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ppscan.py MIT license (c) 2018 Asylum Computer Services LLC """ import re import sys import os import argparse from time import gmtime, strftime # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # class Cget # gets a ch...
import pandas as pd import plotly.express as px import dash_table import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State from dataclasses import dataclass, field from typing import List import random import numpy from dash_extensions import ...
<gh_stars>1-10 # CAR25onCSV.py # # A program to read a .CSV file that contains a list of trades # and computes the safe-f and CAR25 metrics that best # estimate the future performance of the system that produced # these gains and losses. # The risk_normalization library is managed by PyPi. # Before running this progra...
from locust import HttpUser,SequentialTaskSet,task, between from random import randrange from random import randint import json import csv import string import random #import sys, logging #constants def string_generator(size=7): chars = string.ascii_lowercase + string.digits return ''.join(random.choice(...
<reponame>PavloWasTaken/ProjectEyeliner import cv2 import matplotlib.pyplot as plt from matplotlib import transforms import numpy as np from Objects.ImageSegmentationClass import ImageSegmentationClass from Objects.LayerClass import LayerClass from Objects.ResultClass import ResultClass from Utils import utils from sci...
t.type]) return any(semantic_tags) @property def contains_correspondence(self): 'Boolean property indicating if this series containes correspondence.' return 'correspondence' in unicode(self.did.unittitle).lower() @property def rdf_type(self): ''''rdf type to use for a semantically-tagged component item''' #...
<gh_stars>0 """Re-Implementation of https://msdn.microsoft.com/en-us/library/windows/desktop/aa369729%28v=vs.85%29.aspx using the CFFI""" import os import cffi import numpy import time import re import collections _ffi = cffi.FFI() _package_dir, _ = os.path.split(__file__) with open(os.path.join(_package_dir, 'mediaf...
from __future__ import unicode_literals import configparser import logging import re import time from urllib.parse import urlparse from collections import OrderedDict from contextlib import closing import requests import io import socket import xml.etree.ElementTree as elementtree # Constants PREFIX_COUNTRY = 'countr...
those in incapacitated list should still be in combatants also msglist = [ob.character for ob in self.ndb.combatants] + self.ndb.observers if not exclude: exclude = [] msglist = [ob for ob in msglist if ob not in exclude] for ob in msglist: mymsg = message ob.msg(mymsg, options) # -----------------------------...
<filename>3DLSCPTR/db/tools/utils.py<gh_stars>10-100 """ Utility functions and default settings Author: <NAME> (<EMAIL>) Date: March, 2020 """ import argparse import errno import os import sys import cv2 import matplotlib import numpy as np import torch import torch.nn.init as init import torch.opti...
< ( (self.min_r + 1) - self.annulus_width): r_dim = 1 else: r_dim = int(cd[2] - self.annulus_width) cv2.circle(labeled_annulus_mask, (int(cd[0]), int(cd[1])), r_dim, (0, 0, 0), -1) return labeled_annulus_mask def overlay_image(self, image, annulus=None, dim=None): """Overlay image with circles of labeled mas...
our decoder_inputs which will be output_sequence_length long for index, decoder_input in enumerate(decoder_inputs): # If there has been a previous output then we will determine the next input if previous_output is not None: # Create the input layer to our DNN network = previous_output # shape = (current_batch_size...
import itertools import json import os import random import unicodedata import uuid from collections import defaultdict from typing import Type, Union from unittest.mock import patch from django.conf import settings from django.contrib.auth.models import Group, Permission from django.contrib.sites.models import Site f...
except __builtin__.Exception: self.this = this def clear(self): """ clear(MatrixBaseQuaternion self) Parameters ---------- self: SimTK::MatrixBase< SimTK::Quaternion_< double > > * """ return _simbody.MatrixBaseQuaternion_clear(self) def setTo(self, t): """ setTo(MatrixBaseQuaternion self, Quaternion t...
# -*- coding:utf-8 -*- # author:平手友梨奈ii # e-mail:<EMAIL> # datetime:1993/12/01 # filename:configs.py # software: PyCharm import numpy as np import tensorflow as tf import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model from keras.optimizers import Adam from keras.callbacks impo...
# # if no previewer can be found if previewer_func is None: return msg try: result = previewer_func(filename, None, style) if not result: return msg if isinstance(result, str): msg.append(['stream', {'name': 'stdout', 'text': result}]) elif isinstance(result, dict): msg.append([ 'display_data', { 'source':...
import collections import hashlib import inspect import os import pathlib import click import django from django.conf import settings from django.db import connections from django.db.migrations import executor as django_migration_executor from django.db.migrations import loader as django_migration_loader from django.u...
1919 str_multi_scene_14 = 1920 str_multi_scene_15 = 1921 str_multi_scene_end = 1922 str_multi_game_type_1 = 1923 str_multi_game_type_2 = 1924 str_multi_game_type_3 = 1925 str_multi_game_type_4 = 1926 str_multi_game_type_5 = 1927 str_multi_game_type_6 = 1928 str_multi_game_type_7 = 1929 str_multi_game_type_8 ...
# -*- coding: utf-8 -*- import os import abc import yaml from datetime import datetime import pytsk3 from dfvfs.helpers import file_system_searcher from dfvfs.resolver import resolver as path_spec_resolver from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.lib import errors as dfvfs_errors from dfvfs....
raise value error if not verified self._verify_node(node) # check the dag itself if not self._verify_dag(): return False return True def _verify_node(self, node): # type: (PipelineController.Node) -> bool """ Raise ValueError on verification errors :return: Return True iff the specific node is verified "...
# -*- coding: utf-8 -*- import os import tempfile import shutil from io import BytesIO import random import pytest from django.core.files.uploadedfile import SimpleUploadedFile from .utils import versioned_reverse as reverse from django.test.utils import override_settings from PIL import Image as PILImage from .utils ...
<gh_stars>1-10 import re, os, itertools, string from collections import Counter from nltk.stem.wordnet import WordNetLemmatizer from nltk.corpus import words import numpy as np import pandas as pd import emoji import utils def get_morphems(morpheme): mp = morpheme.split(';') out_list = [] for i in mp: out = re.spl...
value: RAM counter for stage, objs in sorted(schedule_table.items(), key=lambda x: x[0]): cnt = collections.Counter() for obj in objs: if not bt.is_operator(obj): continue if (bt.is_output_chainable_operator(obj) and not obj.chain_head): continue stream_hash = obj.get_stream_hash() input_rams, output_rams...
3.0 The *rootUEP* parameter has been renamed into *root_uep*. filters : Filters An instance of the Filters (see :ref:`FiltersClassDescr`) class that provides information about the desired I/O filters applicable to the leaves that hang directly from the *root group*, unless other filter properties are specified f...
<reponame>groschovskiy/vroom """Vroom vim management.""" import ast from io import StringIO import json import re import subprocess import tempfile import time # Regex for quoted python string literal. From pyparsing.quotedString.reString. QUOTED_STRING_RE = re.compile(r''' (?:"(?:[^"\n\r\\]|(?:"")|(?:\\x[0-9a-fA-F]...
shell-style wildcards to filter directory names. :param list exclude_dirs: An optional list of patterns used to exclude directories :param list exclude_files: An optional list of patterns used to exclude files. :param list namespaces: A list of namespaces to include in the resource information. :param page: May...
and 7 for n={} are: {}'.format(n, ','.join(values))) # empty list del values[:] # ----------------------------------------- # Question 66 # Please write assert statements to verify that every number in the list [2,4,6,8] is even. # # Hints: # Use "assert expression" to make assertion. def check_list_evens(list): ...
<reponame>HenrikPilz/BMEcatConverter<filename>src/importer/xml/bmecatImportHandler.py ''' Created on 05.05.2017 @author: henrik.pilz ''' from array import array from datetime import datetime from xml.sax import handler import logging from datamodel import Feature from datamodel import FeatureSet from data...
<filename>py3plex/core/HINMINE/decomposition.py # this is the code for the network decomposition from math import log import numpy as np from collections import defaultdict def aggregate_sum(input_thing, classes, universal_set): if type(input_thing) == list: return sum(input_thing) elif type(input_thing) == dict:...
if pos_paths is None: raise KeyError(('Raw/online position tracking file does not exist ' 'for animal ({}), date ({}) and epoch ({}).'). format(self.anim_name, date, epoch)) return pos_paths def get_raw_pos_path(self, date, epoch, label_ext): return self.get_raw_pos_paths(date, epoch)[label_ext] def get_raw_p...
<filename>carpyncho.py #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2020, <NAME> # License: BSD-3-Clause # Full Text: https://github.com/carpyncho/carpyncho-py/blob/master/LICENSE # ============================================================================= # DOCS # ===============================...
from __future__ import print_function import os import time import numpy as np import theano import theano.tensor as T import lasagne import matplotlib.pyplot as plt from tqdm import tqdm from mpl_toolkits.axes_grid1 import make_axes_locatable from lasagne.layers import InputLayer, Conv1DLayer, Pool1DLayer from lasag...
data is not None else None if datatype == "album": data = await self.api_request( { "user": username, "method": "user.gettopalbums", "limit": limit, }, ignore_errors=True, ) return data["topalbums"]["album"] if data is not None else None if datatype == "track": data = await self.api_request( { "user": use...
import logging import quopri import re from datetime import datetime from email import utils as email_utils from email.message import EmailMessage from typing import List, Optional, Set, Tuple from aiohttp.web_exceptions import HTTPBadRequest from bs4 import BeautifulSoup from buildpg.asyncpg import BuildPgConnection ...
shape is not None: if not isinstance(shape, dict): raise TypeError('Window shape must be specified as a dictionary') for key in ['cc', 'sim']: if not isinstance(shape[key], str): raise TypeError('Window shape must be a string') if shape[key] not in ['rect', 'bhw', 'bnw', 'RECT', 'BHW', 'BNW']: raise ValueError('...
node) event = self.parse_event_expr(node, literal=False) if event is not None: event.record_history = True expr.pattern = self.pattern_from_event(event) if node.func.id == KW_RECV_QUERY: expr.domain = self.create_expr(dast.ReceivedExpr, node) else: expr.domain = self.create_expr(dast.SentExpr, node) expr.domai...
""" Inference: loads models from hdf5-files and renders them """ import os import numpy as np import torch import torch.nn.functional as F from typing import Union, List, Any, Optional import enum import h5py import io import collections import imageio from functools import lru_cache import logging imp...
from sklearn.metrics.pairwise import cosine_similarity from sklearn.manifold import TSNE from sklearn.cluster import AgglomerativeClustering, KMeans from sklearn.preprocessing import StandardScaler, MinMaxScaler from sklearn.preprocessing import MaxAbsScaler from scipy.special import softmax import matplotlib.pyplot as...
for mp_ in self.metapartitions] if any( [mp_["label"] in existing_label for mp_ in metapartition.metapartitions] ): raise RuntimeError( "Duplicate labels for nested metapartitions are not allowed!" ) if schema_validation: table_meta = {} for table, meta in self.table_meta.items(): other = metapartition.tabl...
<reponame>tudelft-eemcs-dml/fltk-testbed-gr-1<filename>fltk/synthpriv/attacks/nasr.py """ Membership inference attack based on https://github.com/privacytrustlab/ml_privacy_meter/blob/master/ml_privacy_meter/attack/meminf.py """ import datetime from itertools import zip_longest import matplotlib matplotlib.use("Agg")...
import datetime import errno import json import os import select import signal import socket import struct import subprocess import warnings from contextlib import closing from collections.abc import Mapping import grpc from . import proto from .exceptions import (context, ConnectionError, TimeoutError, Application...
<filename>correction_tools/alignment.py import os,time import numpy as np from .. import _allowed_colors, _image_size, _num_buffer_frames, _num_empty_frames, _image_dtype from .. import _correction_folder def _find_boundary(_ct, _radius, _im_size): _bds = [] for _c, _sz in zip(_ct, _im_size): _bds.append([max(_c-_r...
""" Transform contains structures helpful for writing analysis and transformation passes over blocks. Most of the functions in this module are for advanced users only. However, the following functions are prebuilt transformations that everyone can use: (As of 7/1/16 there are none in this folder). Other user accessib...
#!/usr/bin/env python try: import tkinter import tkinter.simpledialog import tkinter.filedialog except ImportError: import tkinter as Tkinter # Python 3 from tkinter import simpledialog as tkSimpleDialog from tkinter import filedialog as tkFileDialog from graphics import Pmw import AUTOutil from graphics import o...
if dependency not in instance: yield ValidationError( "%r is a dependency of %r" % (dependency, property) ) def validate_enum(self, enums, instance, schema): if instance not in enums: yield ValidationError("%r is not one of %r" % (instance, enums)) def validate_ref(self, ref, instance, schema): with self.reso...
<filename>src/tests/core/test_scenario.py from datetime import datetime from unittest.mock import Mock, patch, call from pytest import raises from cicadad.core import scenario as scenario_module from cicadad.services import datastore from cicadad.util.constants import DOCKER_CONTAINER_MODE @patch("cicadad.services.d...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator from django.db.models.signals import post_save from django.dispatch import receiver import datetime import ipaddress fro...
<reponame>nakedible/vpnease-l2tp """L2TP UI specific helpers.""" import os import re import datetime import textwrap import formal from twisted.internet import reactor, protocol, defer, error from twisted.python.util import mergeFunctionMetadata from nevow import inevow, url, appserver, tags as T, static from twiste...
<reponame>moazzamwaheed2017/carparkapi<gh_stars>0 from arcgis._impl.common._mixins import PropertyMap from arcgis.features import FeatureLayer, FeatureLayerCollection from arcgis.features._version import Version, VersionManager ######################################################################## class ParcelFabric...
""" Python Lexical Analyser Regular Expressions """ import array import string import types from sys import maxsize from plex import errors # # Constants # BOL = 'bol' EOL = 'eol' EOF = 'eof' nl_code = ord('\n') # # Helper functions # def chars_to_ranges(s): """ Return a list ...
# This file is part of GridCal. # # GridCal is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # GridCal is distributed in the hope that...
<gh_stars>0 import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches from scipy.spatial import Delaunay from quadtree.point import Point from quadtree.utils import find_children, get_neighbor_of_greater_or_equal_size, Direction, deeper, DEBUG_MODE, is_inside_polygon, node_is_inside_polygo...
from collections import defaultdict from rdflib.namespace import RDF, RDFS, OWL prefixes = {'rdf:type': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'rdf:comment': 'http://www.w3.org/2000/01/rdf-schema#comment', 'rdfs:subClassOf': 'http://www.w3.org/2000/01/rdf-schema#subClassOf', 'rdfs:label': 'http://www.w3...
<gh_stars>1-10 # -*- coding: utf-8 -*- """Decorators for functions accepting Astropy Quantities.""" __author__ = "<NAME>" __credit__ = "astropy" __all__ = ["quantity_output", "QuantityInputOutput", "quantity_io"] ############################################################################## # IMPORTS import text...
"▁value": 22392, ":53": 22393, "math": 22394, "tulo": 22395, "▁Lue": 22396, "▁Zeland": 22397, "▁Ziel": 22398, "▁pool": 22399, "▁today": 22400, "cado": 22401, "ffet": 22402, "ionis": 22403, "olan": 22404, "▁versi": 22405, "ZS": 22406, "bide": 22407, "gazi": 22408, "shak": 22409, "È": 22410, "▁Bachelor...
RECORD IOD': ['Treatment Record'], }, # AnnotationPosition 0x20300010L: { 'BASIC ANNOTATION BOX IOD': ['Basic Annotation Box'], None: ['Basic Annotation Box'], }, # ScheduledHumanPerformersSequence 0x00404034L: { 'UNIFIED PROCEDURE STEP IOD': ['Unified Procedure Step'], 'GENERAL PURPOSE SCHEDULED PROCEDURE STEP IOD...
notebook_type = notebook.get('type', 'notebook') save_as = False if notebook.get('parentSavedQueryUuid'): # We save into the original saved query, not into the query history notebook_doc = Document2.objects.get_by_uuid(user=user, uuid=notebook['parentSavedQueryUuid']) elif notebook.get('id'): notebook_doc = Docu...
Optional["ResourceId"] = None, application_sharing_policy: Optional[Union[str, "ApplicationSharingPolicy"]] = "Shared", ssh_settings: Optional["ComputeInstanceSshSettings"] = None, **kwargs ): super(ComputeInstanceProperties, self).__init__(**kwargs) self.vm_size = vm_size self.subnet = subnet self.application_...
# Copyright (c) 2018 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Provide accessors to enhance interoperability between XArray and MetPy.""" from __future__ import absolute_import import functools import logging import re import warnings impor...
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Find files on any machine in your environment with a Cybereason sensor installed" class Input: FILE_FILTER = "file_filter" SERVER_FILTER = "server_filter" class Output: RESPONSE = "respons...
per vertex displacement due to the blend shapes Parameters ---------- betas : torch.tensor Bx(num_betas) Blend shape coefficients shape_disps: torch.tensor Vx3x(num_betas) Blend shapes Returns ------- torch.tensor BxVx3 The per-vertex displacement due to shape deformation ''' # Displacement[b, m, k] = s...
<reponame>alejandroviegener/copy-test<filename>muttlib/forecast.py<gh_stars>10-100 """Module to give FBProphet a common interface to Sklearn and general utilities for forecasting problems like limiting the datasets to the last n days, allowing wider grid search for hyperparameters not available using standard FBProphet...
# Copyright (C) 2021 <NAME> # MIT License # Generate an abstract syntax tree via a recusive descent parser from src.error import ErrorHandler, ParseError from src.tokenizer import Token, TokenType from src.node import Binary, Unary, Variable, Literal, Grouping, Assignment from src.node import Logical from src.node i...
<reponame>balazsgaspar/whoville # coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand cl...
import argparse import pickle import numpy as np import os import pandas as pd import scipy.sparse as sp import torch from torch import nn import torch.nn.functional as F from scipy.sparse import linalg from torch.autograd import Variable from torch.utils.data.dataset import Dataset from pygsp import graphs, filters i...
<reponame>iceprincefounder/selected-sources<filename>USD-Scripts/python/scenegraphLIB/lcShotgun.py # coding=utf-8 """ lcShotgun.py get and store shot gun info from project and shot name """ import sys import os import shutil global ET #we cannot use lxml in maya2013. use default xmltree try: import maya.cmds as cmd...
+ 14*np.log(1 - mckin/mbkin)))/(567*mbkin**6) + (810496*mckin**7*(1 + 14*np.log(2) + 14*np.log(1 - mckin/mbkin)))/ (189*mbkin**7) - (3241984*mckin**8*(1 + 14*np.log(2) + 14*np.log(1 - mckin/mbkin)))/(729*mbkin**8) + (810496*mckin**9*(1 + 14*np.log(2) + 14*np.log(1 - mckin/mbkin)))/ (243*mbkin**9) - (1620992*mckin...
<filename>fhirclient/models/paymentreconciliation.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/PaymentReconciliation) on 2019-01-22. # 2019, SMART Health IT. from . import domainresource class PaymentReconciliation(domainresource.D...
"/queries/string/null" # Construct parameters query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if string_query is not None: query_parameters["stringQuery"] = _SERIALIZER.query("string_query", string_query, "str") # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[st...
<gh_stars>0 # Copyright 2015-2016 Mirantis, 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 ...
<reponame>kubkon/DM-Simulator #!/usr/bin/env python # encoding: utf-8 """ dm.py Created by <NAME> on 2012-08-22. Copyright (c) 2012 University of Strathclyde. All rights reserved. """ import csv import functools import logging import matplotlib.pyplot as plt import numpy as np import os import re import simulator.erro...
<reponame>chombatant/python-kik-chatbot import re import regex as re2 from regex import sub as sub2 from collections import defaultdict from datetime import datetime from ngrams.ngrams import corrections, Pw import nltk # =========================================================================================== ...
staticmethod(SaveFrugalInt) def LoadFrugalInt(*args): """ LoadFrugalInt(char * pSrc, int & i) -> char * Parameters: pSrc: char * i: int & """ return _snap.TInt_LoadFrugalInt(*args) LoadFrugalInt = staticmethod(LoadFrugalInt) def TestFrugalInt(): """TestFrugalInt()""" return _snap.TInt_TestFrugalInt() T...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. .. currentmodule:: thelma.tools.metadata.generation This is the handler for experiment design parsers. It is a component of the :class:`ExperimentMetadataGe...
# Copyright 2020 Open Reaction Database Project Authors # # 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...
may conain NULL after sort() if site == 'NULL': continue if prevIsJEDI: foundRelease = True winv = 1 else: # get SiteSpec if siteMapper.checkSite(site): tmpSiteSpec = siteMapper.getSite(site) else: tmpLog.debug(" skip: %s doesn't exist in DB" % site) continue # ignore test sites if (prevManualPreset is Fa...
<reponame>xinranzhu/GPTune-1<filename>examples/GCN/gcn_MB.py #! /usr/bin/env python # GPTune Copyright (c) 2019, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of any # required approvals from the U.S.Dept. of Energy) and the University of # California,...
from copy import deepcopy import numpy as np from numpy.lib.npyio import _savez from matplotlib.collections import LineCollection import matplotlib.pyplot as plt from seispy.trace import Trace, FourierDomainTrace from seispy.errors import EmptyStreamError, DataTypeError, \ SamplingError, SamplingRateError, NptsError, ...
}, { "stepBegin": 55, "stepEnd": 60, "vector": { "x": 0, "y": 0.25, "z": 0 } }], "rotates": [{ "stepBegin": 1, "stepEnd": 2, "vector": { "x": 0, "y": 45, "z": 0 } }, { "stepBegin": 11, "stepEnd": 12, "vector": { "x": 0, "y": -45, "z": 0 } }, { "stepBegin": 55, "stepEnd": 56, "vector": { "x"...
return ret # NOTE: Uncomment this code if PSSH should be parsed as a box container @property def childpos(self): return self.offset+32 class saiz_box(full_box): def __init__(self, *args): full_box.__init__(self, *args) @property def default_sample_info_size(self): offset = 12 if self.flags and 1: offset ...
<filename>lsteamclient/gen_wrapper.py #!/usr/bin/env python3 #NOTE: If you make modifications here, consider whether they should #be duplicated in ../vrclient/gen_wrapper.py from __future__ import print_function CLANG_PATH='/usr/lib/clang/13.0.0' from clang.cindex import CursorKind, Index, Type, TypeKind import ppr...
'type': 'bool'}, 'status': {'key': 'properties.status', 'type': 'str'}, 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, } def __init__( self, *, location: Optional[str] = None, auto_delete_on_idle: Optional[str] = None, default_message_time_to_live: Optional[str] = None, dead_lettering_on_...
<reponame>amdhacks/Cirq # Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
entity = self.entity_wikid2id[rows[i][j]['surfaceLinks'][0]['target']['id']] entity_cells[i,j] = entity tmp_entities.append([(i,j), entity]) tmp_entities_text.append(rows[i][j]['text']) except: entity_cells[i,j] = 0 else: entity_cells[i,j] = 0 if len(tmp_entities) == 0: continue if self.mode == 0: if i == 0 ...
<gh_stars>1-10 import attr from functools import total_ordering from uuid import uuid4 from sqlalchemy import Float, String, and_, between, case, cast, func, or_, text from recipe.exceptions import BadIngredient from recipe.utils import AttrDict, filter_to_string from recipe.utils.datatype import ( convert_date, conv...
source, convolved in zip(self.sources, self.convolved): source[yslice, xslice] = value # Reconvolve the changed region. reconv = scipy.signal.convolve( source[ylos:yhis, xlos:xhis], self.kernel, mode='same') # Copy the changed region into the full convolution. convolved[conv_slice] = reconv[y1:y2, x1:x2] return ...
a variable's name. if self.peek()[0][0] == "NAME": # Save the variable's name. var = self.peek()[0][1] self.discard() # Make sure this variable isn't already declared. if var in self.names: self.error(Error.REDFINED_VAR) # Check to see if we need to allocate a vector on the stack. if self.peek()[0][0] == "S...
is not None: self.ALIGNABLE_ANNOTATION.export(outfile, level, namespace_, name_='ALIGNABLE_ANNOTATION', pretty_print=pretty_print) if self.REF_ANNOTATION is not None: self.REF_ANNOTATION.export(outfile, level, namespace_, name_='REF_ANNOTATION', pretty_print=pretty_print) def build(self, node): already_processed =...
<gh_stars>1-10 """ Sentinel-1 EW reader. The script provides Sentinel1Product and Sentinel1Band classes. Sentinel1Product class describes the product and consists of two Sentinel1Band classes, landmask information (and function to find it), location of borders (x_min and x_max). Sentinel1Band class describes a band of ...
None: # ax.set_xlim(xlim) # if ylim is not None: # ax.set_ylim(ylim) episode_length = data["experiment"]["environment"]["steps_per_episode"] # Plot with the standard error for i in range(len(ind)): timesteps, mean, std = exp.get_mean_err(data, type_, ind[i], smooth_over, exp.stderr, keep_shape=keep_shape) t...
[[], [], []] if to_sort is None: to_sort = list() for item in to_sort: len_ = len(item) by_prim_type[len_-2].append(item) return by_prim_type def set_primitive_indices(self, define_prims=None): stretches, bends, dihedrals = self.sort_by_prim_type(define_prims) self.set_bond_indices(stretches) self.set_bendin...
<reponame>govtmirror/PriceHistoryGUI<filename>PPBottleApp.py from bottle import Bottle, run, template,request,TEMPLATE_PATH,static_file,HeaderDict,BaseResponse,response,redirect import time import urllib import ast import sys import LogFeedback import LogActivity import requests import os import PriceHistoryAuth.LogA...
# Copyright (c) 2014, Oracle and/or its affiliates. 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 ...
#!/usr/bin/env python2.7 # encoding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals """Convert (to and) from rdflib graphs to other well known graph libraries. Currently the following libraries are supported: -...
89); }\n" "")) self.gb_pb_sell_volume_row_5_6.setFlat(True) self.gb_pb_sell_volume_row_5_6.setObjectName(_fromUtf8("gb_pb_sell_volume_row_5_6")) self.gb_pb_sell_volume_row_minus_5_6 = QtGui.QPushButton(self.gb_ETFOrder_6) self.gb_pb_sell_volume_row_minus_5_6.setGeometry(QtCore.QRect(180, 40, 31, 23)) self.gb_pb_se...
B*B*A + B*A*B + A*B*B q = A*A*A + B*B*B p1 = p.subs({"A": A+B, "B": A-B}) assert p1 == 4*A*A*A + 4*B*B*B verbose = argv.verbose r = argv.get("r", 1) # degree m = argv.get("m", 3) code = reed_muller(r, m) code.dump() p = code.weight_enum(A, B) if verbose: print("code:") print(p) dual = code.get_dual() ...
this risk level. returned: on success type: int sample: 56 auditing_findings_count: description: - The number of findings in the Auditing category. returned: on success type: int sample: 56 authorization_control_findings_count: description: - The number of findings in the Authorization Control category. re...
else: self.gd['mapped_ica'][ica_lookup].update({'template' : map_itemWidget}) if icn_lookup: if icn_lookup not in self.gd['mapped_icn'].keys(): self.gd['mapped_icn'].update({icn_lookup : {}}) if ica_lookup: self.gd['mapped_icn'][icn_lookup].update({ica_lookup : map_itemWidget}) else: self.gd['mapped_icn'][icn_l...
(numpy.ndarray): An array containing a thresholded gridded truth at an equivalent validity time to the forecast array. Returns: numpy.ndarray: An array containing reliability table data for a single time and threshold. The leading dimension corresponds to the rows of a calibration table, the second dimension to ...
<gh_stars>1-10 import base64 import hashlib import hmac import os import random import re import string import urllib.request from datetime import datetime, timedelta import pytz from flask import request from todoist import TodoistAPI def process_webhook(req, user): api = initiate_api(user.access_token) if api is ...