input
stringlengths
2.65k
237k
output
stringclasses
1 value
['If user with email exists, reset token will be issued.']) # Submit password reset again response = self.client.post(url, data, format='json') self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual( response.json()['notes'], ['If user with email exists, reset token will be issued.']) # Ve...
""" Copyright (c) 2021 Aiven Ltd See LICENSE for details """ from astacus.common.exceptions import TransientException from astacus.common.ipc import BackupManifest, NodeResult, Plugin, SnapshotFile, SnapshotResult, SnapshotState from astacus.common.op import Op from astacus.common.progress import Progress from astacus....
<gh_stars>0 # -*- coding: latin-1 -*- # # wif.py - parse or generate Wi-Fi Simple Configuration data # from __future__ import absolute_import, division from .record import Record, GlobalRecord, hexlify, _PY2 from .record import DecodeError, EncodeError from collections import namedtuple from functools import reduce imp...
= request.POST.get('personal_equity').replace('\t', ' ').replace('\n', ' ').replace('\r', ' ') term_loan = request.POST.get('term_loan').replace('\t', ' ').replace('\n', ' ').replace('\r', ' ') other = request.POST.get('other').replace('\t', ' ').replace('\n', ' ').replace('\r', ' ') total_sources = request.POST.get...
''' Author: <NAME> Contact: <EMAIL> This file contains the contents for the "msAllele" utilities. Specifically, the tool queries one or more BWTs for a single pattern. It returns the counts for each BWT and extracts the reads for a visual display (provided there are relatively few reads). The main difference between th...
ocupante não especificado de um triciclo motorizado traumatizado em um acidente de trânsito'), ('V32.0', 'Ocupante de um triciclo motorizado traumatizado em colisão com outro veículo a motor de duas ou três rodas - condutor traumatizado em acidente não-de-trânsito'), ('V32.1', 'Ocupante de um triciclo motorizado trau...
: [u'y', u's'] , u'孙' : [u'x', u's'] , u'㫘' : [u'm'] , u'陛' : [u'b'] , u'淢' : [u'y', u'x'] , u'䍩' : [u'a', u'y'] , u'牳' : [u'm'] , u'嗲' : [u'd'] , u'郴' : [u'c', u'l'] , u'銉' : [u'y'] , u'洌' : [u'l'] , u'䦏' : [u'x'] , u'鸖' : [u'h'] , u'溡' : [u's'] , u'蘦' : [u'l'] , u'㴬' : [u'x'] , u'種' : [u'c', u'z'] , u'嚱' : [u'x'] , u...
46, default: 7) :param int n_rolling_volatility: number of days for Rolling n-day volatility- (statId: 34, default: 7) :param int num_sim_monte_carlo: number of simulations - (statId: 62, default: 1000) :param str period_type: Quarter (Q), Monthly (M) , Annually (Y), Daily (D) --caps matter, codes in () -Carries ou...
<filename>abps/abps_runners.py # coding=utf-8 # Copyright 2022 The Google Research 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 # # ...
= [{'volume_id': '235'}] validate(self.server, group_schemas.server) self.server.pop('block_device_mapping') self.server['block_device_mapping_v2'] = [{'volume_id': '235'}] validate(self.server, group_schemas.server) def test_blank_image(self): """ invalidates if imageRef is just whitespace """ self.server['i...
<filename>src/trw/train/metrics.py from abc import ABC, abstractmethod from typing import Dict, List, Optional import numpy as np from ..utils import to_value from . import losses from sklearn import metrics import collections import torch from .analysis_plots import auroc import torch.nn as nn # TODO discard sample...
<filename>scripts/ReachabilityAlgorithm.py<gh_stars>0 """ This file contains the functions related executing the PolyReach algorithm """ import copy import time from typing import List, Tuple from matplotlib import pyplot as plt import numpy as np import sympy from sympy import Poly from sympy.polys.polymatrix import...
max_gflatlanes = max(max_gflatlanes, len(gflatlanes)) self.max_gflatlanes = max_gflatlanes max_3dlanes = max(max_3dlanes, len(real_gt_3dlanes)) self.max_3dlanes = max_3dlanes self.max_2dpoints = max(self.max_2dpoints, max([len(l) for l in lanes])) self.max_gflatpoints = max(self.max_gflatpoints, max([len(l) for ...
"""python embed_fbanks.py pascal1k_crossnet_adadelta_emb_200.pickle""" from __future__ import division import cPickle as pickle import sys import os.path as path import glob import operator import os from collections import defaultdict import joblib from scipy.spatial.distance import pdist, cdist from scipy.io impor...
<gh_stars>0 import asyncio import io import os import re from datetime import datetime, timedelta import discord import psycopg2 import requests from PIL import Image from dateutil.relativedelta import relativedelta from discord.ext import commands SQLpath = os.environ["DATABASE_URL"] db = psycopg2.connect(SQLpath) #...
"""Datemath Module""" import logging import random import re import string from datetime import timedelta, datetime, date from time import time from elasticsearch.exceptions import NotFoundError from curator_api.exceptions import ConfigurationError, FailedExecution from curator_api.defaults.settings import date_regex ...
#! /usr/bin/env python # this import must comes first to make sure we use the non-display backend import matplotlib matplotlib.use('Agg') import os import sys import argparse import numpy as np import settings from optimize.gradient_optimizer import GradientOptimizer, FindParams from caffevis.caffevis_helper import ...
import datetime import factory from src.models import AlleleGeninteraction, Alleledbentity, DBSession, Functionalcomplementannotation, Genomerelease, Source, Colleague, ColleagueUrl, ColleagueRelation, ColleagueKeyword, Complexdbentity, Complexbindingannotation, Keyword, Dbuser, Dbentity, Edam, \ Referencedbentity, Jo...
any missing information (such as ``'scf_xc_energy'`` in MP2 calculations) is not an issue. Parameters ---------- outfile : :obj:`io.TextIOWrapper` Buffered text stream of the output file. line : :obj:`str` Parsed line from ``outfile``. """ while 'SCF CONVERGENCE' != line.strip(): # Nuclear Repulsion : 135.87...
<gh_stars>0 from datetime import datetime from itertools import cycle import logging import random from uuid import uuid4 from .exceptions import ( BadSuggestion, BlockedSpace, BoardIsFull, CardsAlreadyDealt, GameOver, InsufficientPlayers, InvalidHallway, InvalidPlayer, InvalidPlayerName, InvalidRoom, Inval...
['UniformNoise', 'NormalNoise', 'MNIST', 'FashionMNIST', 'NotMNIST', 'CIFAR10', 'STL10', 'CIFAR100', 'TinyImagenet'] d1_tasks = ['MNIST', 'STL10', 'FashionMNIST', 'CIFAR100' ] # d2_tasks = ['NormalNoise'] # d3_tasks = ['UniformNoise'] types = [2] n_votes = [1] centiles = [] for model_name in ["VGG", "Resnet"]:...
<reponame>joshfuchs/photometry<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Sun Aug 23 20:48:10 2015 @author: jmeza """ # =========================================================================== # Packages ================================================================== # ==================================...
Coupling(name = 'UVGC_428_54', value = {-1:'( (ee*complex(0,1)*G**2*sw)/(36.*cw*cmath.pi**2) if MD else -(ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) ) + (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2)',0:'( (5*ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) - (ee*complex(0,1)*G**2*sw*reglog(MD/MU_R))/(12.*cw*cmath.pi*...
<filename>app/celery/tasks.py import json from collections import defaultdict, namedtuple from datetime import datetime from typing import Any, Dict, List, Optional from uuid import UUID from flask import current_app from itsdangerous import BadSignature from more_itertools import chunked from notifications_utils.colu...
in Alexa global 'http://www.casualclub.com/', # Why: #4543 in Alexa global 'http://www.wanelo.com/', # Why: #4544 in Alexa global 'http://www.ipsosinteractive.com/', # Why: #4545 in Alexa global 'http://www.videohive.net/', # Why: #4546 in Alexa global 'http://www.fenzhi.com/', # Why: #4547 in Alexa global '...
<filename>nanobot/nanobot.py #! /usr/bin/env/python # Copyright (c) 2016 <NAME> # # 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 right...
from datetime import timedelta, datetime import htmls from django import test from django.utils import timezone from model_mommy import mommy from devilry.apps.core.models import Assignment, AssignmentGroup from devilry.devilry_cradmin import devilry_listbuilder from devilry.devilry_dbcache.customsql import Assignmen...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, <NAME>. # # 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 right...
#!/usr/bin/python """ (C) Copyright 2018-2020 Intel Corporation. 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 ...
from .bbox_utils import * import numpy as np import torch def get_sum_XQ(grad, box_vertices, dataset_name, box_w, box_l, sign, high_rez=False, scaling_factor=1, grad_copy=None): """ Calculates XQ based on the sum of attributions, using the original attribution values :param high_rez: Whether to upscale the resolu...
<reponame>olliemath/pypy<filename>rpython/rlib/test/test_rposix.py<gh_stars>0 from hypothesis import given, strategies as st, assume import pytest from rpython.rtyper.test.test_llinterp import interpret from rpython.translator.c.test.test_genc import compile from rpython.tool.pytest.expecttest import ExpectTest from r...
ML_SSE_m128_v1int32) _mm_set1_epi64x = EmmIntrin("_mm_set1_epi64x", arity = 1, force_folding = True, output_precision = ML_SSE_m128_v4int32) # Conversion of a scalar float contained in a __m128 registers to a signed # integer contained also in a __m128 register _mm_cvt_ss2si = XmmIntrin("_mm_cvt_ss2si", arity = 1) _...
<reponame>TomSmithCGAT/CamProt '''plot_tm_coverage ======================================================= :Author: <NAME> :Release: $Id$ :Date: |today| :Tags: Python Proteomics Purpose ------- Usage ----- Command line options -------------------- ''' import argparse import collections import os import re import ...
= ['content_type', 'app_id', 'authorization', 'x_sdk_date', 'x_project_id'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): local_var_params[attr] = getattr(request, attr) collection_formats = {} path_params = {} if 'app_id' in local_var_params: path_params['app_id'] = loca...
lambda m: m._load_user_attributes()['dev']) last_accessed = chips.LazyField("last_accessed", lambda m: m._load_user_attributes()['last_accessed']) viewed_alerts_at = chips.LazyField("viewed_alerts_at", lambda m: m._load_user_attributes()['viewed_alerts_at']) invites_left = chips.LazyField("invites_left", lambda m: m...
<gh_stars>0 # -*- coding: utf-8 -*- # # * Copyright (c) 2009-2017. Authors: see NOTICE file. # * # * 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/LI...
models to Blender.''' # pylint: disable=unused-argument, no-member bl_idname = "mcblend.import_model" bl_label = "Import Bedrock Model" bl_options = {'REGISTER', 'UNDO'} bl_description = "Import Minecraft Bedrock edition model from json file." # ImportHelper mixin class uses this filename_ext = ".json" filter_g...
bl["blacklist"]: try: random.choice(ABC).kickoutFromGroup(op.param1,[op.param2]) except: pass # group_id = op.param1 # user_id = op.param2 # subprocess.Popen('echo "'+ user_id+'|'+str(op.createdTime)+'" >> dataSeen/%s.txt' % group_id, shell=True, stdout=subprocess.PIPE, ) # except: # pass if op.type == 17: i...
# Data for board 1 # Copyright Symbol Facing Upwards # Unused attributes: starting_space B1_Data = { "i00": { "name": "i00", "dots": 3, "starting_space": False, "has_piece": False, "is_hole": False, "sub_dots": False, "return_moves": ["i10"], "moves_to": ["i03", "i33", "i30"], "adj": { "ul": False, "ur": F...
'niedergelegt', 'ist', '"', ',', 'sagte', 'Grindel', 'im', 'Fußball-Podcast', '"', 'Phrasenmäher', '"', 'der', '"', 'Bild-Zeitung', '.']] verify_encode_token(en_tokenizer, EN_SAMPLES, gt_en_tokenized) verify_encode_token(de_tokenizer, DE_SAMPLES, gt_de_tokenized) vocab = Vocab(collections.Counter(sum(gt_en_tokeniz...
# coding: utf-8 """ Harmony Connect An easy to use API that helps you access the Factom blockchain. # noqa: E501 OpenAPI spec version: 1.0.17 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility ...
df2 = ddf2.compute().sort_values(["b", "c"]) df1 = df1.sort_values(["b", "c"]) assert_eq(df1[["b", "c"]], df2[["b", "c"]], check_index=False) else: assert_eq(ddf1, ddf2, check_divisions=False, check_index=False) @write_read_engines() @pytest.mark.parametrize("aggregate_files", ["a", "b"]) def test_chunksize_aggre...
# Copyright 2016 <NAME>, 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, sof...
(γ-1) μ m_P / k_B where k_B is the Boltzmann constant γ is 5/3, the perfect gas constant m_P is the proton mass μ = 1 / (mean no. molecules per unit atomic weight) = 1 / (X + Y /4 + E) where E = Ne * X, and Y = (1-X). Can neglect metals as they are heavy. Leading contribution is from electrons, which is alread...
<reponame>LSSTDESC/WeakLensingDeblending """Manage the parameters that define a simulated survey's camera design and observing conditions. """ from __future__ import print_function, division import math import numpy as np import numpy.linalg import galsim from six import iteritems class Survey(object): """Survey ...
<reponame>msabramo/tox<gh_stars>1-10 import argparse import distutils.sysconfig import os import random import sys import re import shlex import string import subprocess import textwrap import pkg_resources from tox.interpreters import Interpreters import py import tox iswin32 = sys.platform == "win32" defaultenvs...
""" An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models. """ config_class = LxmertConfig base_model_prefix = "lxmert" @property def dummy_inputs(self) -> Dict[str, tf.Tensor]: return getattr(self, self.base_model_prefix).dummy_inputs @tf.fu...
<reponame>JohnGBaker/tess-short-binaries #Applies an algorithm to significantly decimate dense microlens data (eg from wfirst data challenge) without losing information. import numpy as np import argparse import matplotlib import matplotlib.pyplot as plt #The idea here is that we successively pass over the data, decim...
# ElectrumSV - lightweight Bitcoin client # Copyright (C) 2012 <EMAIL> # Copyright (C) 2019-2020 The ElectrumSV Developers # # 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 restrictio...
<reponame>yuvaraja2303/pycast # !/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2012-2015 <NAME> # # 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...
<filename>scripts/m18_submission_checker/aida_m18_submission_checker.py """ aida_m18_submission_checker.py June 21st, 2019 to run: python3 aida_m18_submission_checker.py <path/to/archive> or python aida_m18_submission_checker.py <path/to/archive> """ import sys import os import re import logging import tarfile impo...
3, 'sfn' : 'even', 'subf' : (1,)}, #49 {'format' : 3, 'sfn' : 'even', 'subf' : (4,)}, #50 {'format' : 3, 'sfn' : 'even', 'subf' : (7,)}, #51 {'format' : 3, 'sfn' : 'any', 'subf' : (1,)}, #52 {'format' : 3, 'sfn' : 'any', 'subf' : (4,)}, #53 {'format' : 3, 'sfn' : 'any', 'subf' : (7,)}, #54 {'format' : ...
BC_h_line.set_data([],[]) BC_q_point BC_h_point return Qline, WLline, BC_q_line, BC_h_line, BC_q_point, BC_h_point, day_text # animation function. this is called sequentially def animate_min(i): # discharge (ax1) x = Sub.XSname y= Sub.Qmin[Sub.Qmin.index == counter[i]].values[0] day_text.set_text('Date = ' + ...
Actions that initiate navigation, are waiting for these navigation to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to ``False``. ``*modifiers`` Modifier k...
''' Models for representing top-level plot objects. ''' from __future__ import absolute_import import warnings from six import string_types from ..core.enums import Location, OutputBackend from ..core.properties import Bool, Dict, Enum, Include, Instance, Int, List, Override, String, Float from ..core.property_mixi...
has changed, typically the score values? pass elif data["event"] == "timeSeriesWidget.newAnnotation": #self.logger.debug(f"draw anno!") self.__dispatch_function(self.draw_new_annotation) def update_scores(self): if self.server.fetch_score_variables(): if self.showScores: self.show_scores() def show_legend(s...
same type as `input`. """ _ctx = _context._context or _context.context() tld = _ctx._thread_local_data if tld.is_eager: try: _result = pywrap_tfe.TFE_Py_FastPathExecute( _ctx._context_handle, tld.device_name, "CrossReplicaSum", name, tld.op_callbacks, input, group_assignment) return _result except _core._Fall...
<gh_stars>0 from __future__ import absolute_import, unicode_literals import json import os import redis from statics.scripts import encryption,read_excel from saltops_v2.settings import SECRET_KEY,BASE_DIR,DATABASES from django.shortcuts import render,HttpResponse,redirect from django.views import View from django.uti...
import time import re import pyautogui import requests import sys import random import pandas as pd import imagehash import openpyxl from selenium import webdriver from bs4 import BeautifulSoup from datetime import datetime from PIL import Image from openpyxl.utils.dataframe import dataframe_to_rows class MyLikes: de...
<reponame>dumpmemory/google-research # coding=utf-8 # Copyright 2022 The Google Research 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....
arr = ds_tmp[var_].values[ds_tmp['IS_WATER'].values] # add to saved arrays dfALL[var_] = arr del ds_tmp # setup a dictionary of regions to plot from dfs = { '>=65N': pd.DataFrame(df65N), '>=65S': pd.DataFrame(df65S), 'Global': pd.DataFrame(dfALL), } # - plot up the PDF distribution of each of the variables. ...
not None: for k in map.get('VideoDNA'): temp_model = GetMediaDNAResultResponseDNAResultVideoDNA() temp_model = temp_model.from_map(k) self.video_dna.append(temp_model) else: self.video_dna = None return self class DeleteMezzaninesRequest(TeaModel): def __init__(self, owner_id=None, resource_owner_account=None...
import logging from datetime import datetime, timezone from unittest.mock import MagicMock, ANY, call import json import pytest import pandas as pd from app.tasks import ( send_activated_email, import_analyze_store_list, generate_summary_stats, send_report, extract_stats, init_list_analysis, update_stored_data, send...
people.</p> <p>The companies and the few who earn the big money in MLM are NOT going to tell you the real story. FINALLY, there is someone who has the courage to cut through the hype and lies and tell the TRUTH about MLM.</p> <p>HERE'S GOOD NEWS</p> <p>There IS an alternative to MLM that WORKS, and works BIG! If you ha...
<filename>simulation_4_RN.py from os import listdir from os.path import isfile, join import numpy as np import pandas as pd import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.applications.resnet50 import ResNet50 from tensorflow.keras.models import Model from tensorflow.keras.layers...
# encoding: utf-8 # # Copyright (C) 2010 <NAME> <<EMAIL>> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # Author: <NAME> <<EMAIL>> """Schema validation for Python data structures. Given eg. a nested data structur...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # pylint: disable=C0111,C0103,E1101 """DQN Solver package.""" import json import os import numpy as np import tensorflow as tf from snake.base import Direc, Pos, PointType from snake.solver.base import BaseSolver from snake.solver.dqn.memory import Memory from snake.so...
self.ghost_academies: if len(academy.orders) > 0 and academy.orders[0].ability.id in [AbilityId.BUILD_NUKE]: if self.already_pending(UnitTypeId.GHOST): for br in self.barracks: if len(br.orders) > 1: break if self.can_afford(UnitTypeId.REAPER): self.do(br.train(UnitTypeId.REAPER)) if self.chat: await self._cli...
# coding: utf-8 import os import webbrowser from typing import List from collections import OrderedDict from datetime import datetime import pandas as pd import traceback from .objects import Mark, Direction, BI, FakeBI, FX, RawBar, NewBar from .utils.echarts_plot import kline_pro from .signals import check_three_fd, c...
import collections import math from cctbx import sgtbx, uctbx from libtbx.math_utils import nearest_integer as nint from scitbx import matrix from dials.algorithms.integration import filtering from dials.array_family import flex from dials.util import tabulate Slot = collections.namedtuple("Slot", "d_min d_max") _st...
azimuth range'}, unfiltered_cross_correlation_ratio: { 'units': '-', 'standard_name': 'copolar_correlation_coefficient', 'long_name': 'Unfiltered copolar correlation coefficient (RHOHV)', 'coordinates': 'elevation azimuth range'}, uncorrected_cross_correlation_ratio: { 'units': '-', 'standard_name': 'copolar_...
email_re.findall(partner_info['full_name'] or '') email = emails and emails[0] or '' if email and self.email_from and email.lower() == self.email_from.lower(): partner_info['full_name'] = '%s <%s>' % (self.contact_name or self.partner_name, email) break return result @api.model def get_import_templates(self): ...
in statuses ] if created_by is not None: data['status_id'] = [ str(Testrail.get_user_by_name(u).id) for u in created_by ] if created_after is not None: data['created_after'] = int(time.mktime( created_after.timetuple() )) if created_before is not None: data['created_before'] = int(time.mktime( created_b...
type cast_match = re.match(r'([a-zA-Z0-9_]+)\s*::\s*([a-zA-Z0-9_]+)', select_statement) operation = ' '.join(select_statement.split(' ')[:-1]) column_name = select_statement.split(' ')[-1] print(operation) # Add the table and schema when a single table/schema is being selected from # if cast_match: # yield { # ...
import pandas as pd import re from IPython.display import display import matplotlib.pyplot as plt import numpy as np import os from pathlib import Path from glob import glob import black import natsort import operator # from matplotlib.pyplot import cm import matplotlib as mpl from constants import * from matplotlib.l...
from .base import * from .community_damage_sampling import * from .downtime_logistics import * def load_results(input_filenames, output_filename, i_analysis, options): #### [i_damage, i_impeding_factors, i_cordons] = i_analysis if input_filenames is None: new_analysis = False else: new_analysis = True [invent...
#!/usr/bin/env python3 # # pip install py-algorand-sdk import argparse import base64 import glob import json import logging import msgpack import os import re import signal import sys import tarfile import time import algosdk from util import maybedecode, mloads, unmsgpack logger = logging.getLogger(__name__) # al...
import logging from common_utils_py.agreements.service_agreement import ServiceAgreement from common_utils_py.metadata.metadata import Metadata from nevermined_gateway.compute_validations import is_allowed_read_compute import time from authlib.common.encoding import to_bytes from authlib.jose import jwt from authlib...
val in plot_z[model_number]: idx = (np.abs(z_array_full_allmodels[model_number] - val)).argmin() plot_snaps.append(idx) # Then plot only those snapshots. for count, snap in enumerate(plot_snaps): label = model_tags[model_number] ax[count].plot(mstar_bins[:-1] + mstar_bin_width*0.5, SMF[model_number][snap], col...
match. Write 2 pixels rowAsm.gen_loadstore_indexed(False, matchReg, regX, offX + 256*self.lineAdvance, "") # pop this byte command out of the Write list, and reiterate with the same idx to get the next byte command cmdBytesToWrite.pop(idx) # make lists of unique byte and word values to write uniqByteValues = [] u...
<reponame>addumb/python-aliyun # -*- coding:utf-8 -*- # Copyright 2014, Quixey 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 r...
this data will not load as stated, it must be on one line.) A set of examples X1 => Y1, X2 => Y2, and X3 => Y3 will be generated, forming one episode. However, Y1 => X2 and Y2 => X3 are not created as separate examples by default. To change this behavior, you can set opt['label_turns']. The default value is 'sec...
dets[d.uid] = d return dets def detail_list(self): ## # Returns a list of Detail objects which are attached to this Node. # # @return dets: <i>list</i> :: A list of Detail objects which are attached to this Node. # # @code # for d in n.detail_list(): # print d.anchor() == n # True # @endcode dets = [] for...
<filename>chemsolve/element.py #!/usr/bin/env python3 # -*- coding = utf-8 -*- from __future__ import division import operator from chemsolve.utils.periodictable import PeriodicTable from chemsolve.utils.warnings import ChemsolveDeprecationWarning from chemsolve.utils.constants import * from chemsolve.utils.errors im...
{4,S} {5,S} 2 Cb u0 {1,S} 3 Cb u0 {1,S} 4 Cd u0 {1,S} 5 S2s u0 {1,S} """, thermo = None, shortDesc = u"""""", longDesc = u""" """, ) entry( index = -1, label = "Cs-(Cds-Cd)CbCbSs", group = """ 1 * Cs u0 {2,S} {3,S} {4,S} {5,S} 2 Cd u0 {1,S} {6,D} 3 Cb u0 {1,S} 4 Cb u0 {1,S} 5 S2s u0 {1,S} 6 C u0 {2,D} """, t...
<reponame>ATikhonov2/leo-editor<gh_stars>1000+ # Leo colorizer control file for clojure mode. # This file is in the public domain. import re number_pat = re.compile('\\b0x[0-9a-fA-F]+|\\b\\d*\\.\\d+|\\b\\d+\\.?') def clojure_match_numbers(colorer, s, i): return colorer.match_compiled_regexp(s, i, 'literal4', number_pa...
fname def _get_keyword_updates(self): """ Compare the _fits_keywords list to the _standard_keywords list to find any differences and add these keywords to the keyword_updates list. """ # Use the FitsKeywordList.diff() method to compare the two lists and # update self.keyword_updates. updates = self._fits_keyw...
the container to terminate before forcefully removing it `(ms|s|m|h)`. * `stopSignal` (`str`) - Signal to stop the container. * `user` (`str`) - The user inside the container. * `forceUpdate` (`float`) * `log_driver` (`dict`) - See Log Driver below for details. * `name` (`str`) - The logging driver to use. Either...
<gh_stars>1-10 import numpy as np import pandas as pd import tensorflow as tf import math from sklearn.cluster import KMeans import Loaddata from numpy import random import time from datetime import date import matplotlib.pyplot as plt import os from pandas import DataFrame, concat import multiprocessing as mp class ...
#! /usr/bin/env python # """ This code uses matplotlib and numpy to produce a window within which a FITS image can be displayed. The reason for having this and not using the usual packages already in existence is that I will want specific functions on the image for data reduction. Usage: fits_image_display.py imagena...
<reponame>acbauer/SimBuilderTemplates<filename>PythonExporters/HydraExporter.py import smtk # Common data structures & functions ConfigData = type('ConfigData', (object,), dict()) def standard_section(attribute_type, title=None, group_name=None, comment=None): config = ConfigData() config.type = 'standard' config.a...
<reponame>aragubas/OneTrack #!/usr/bin/python3.7 # Copyright 2020 Aragubas # # 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 b...
"show media" followed by "show optic <slot>" for each slot Optionally use snmp snIfOpticalMonitoringInfoTable - ifIndex to optical parameters table :return: """ ''' command = 'show interfaces transceiver' output = self._send_command(command) # Check if router supports the command if '% Invalid input' in outpu...
"""Manipulate semantic versioning (SemVer) Manipulate semantic version strings: 1. Create a new version number, 1. initialize it with an existing number 1. Read it from an existing project setup.cfg file. 1. Validate the version string. 1. Compare one version number with another. See also https://sem...
# Copyright The IETF Trust 2016-2019, All Rights Reserved import debug # pyflakes:ignore import datetime from django.utils import timezone from ietf.doc.factories import WgDraftFactory, IndividualDraftFactory from ietf.group.factories import ReviewTeamFactory from ietf.group.models import Group, Role from ietf.name....
<filename>tools/preview/preview.py<gh_stars>1-10 #!/usr/bin/env python3 """ Tool to preview swaps and tweak configuration prior to running a convert """ import logging import random import tkinter as tk from tkinter import ttk import os import sys from configparser import ConfigParser from threading import Event, Loc...
# MIT License # Copyright 2020 <NAME> # # 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 rights # to use, copy, modify, merge, publish, di...
#!/usr/bin/env python # _*_ coding: utf-8 _*_ class cp2k_motion_free_energy_alchemical_change: def __init__(self): self.params = {} self.status = False def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t&ALCHEMICAL_CHANGE\n") for item in self.params: if self.pa...
where @property def _analyzer_jvm(self): """ Returns the datatype of the column(s) :return self """ return self._deequAnalyzers.DataType( self.column, self._jvm.scala.Option.apply(self.where) ) class Distinctness(_AnalyzerObject): """ Count the distinctness of elements in column(s). Distinctness is the...
<filename>machlearn/linear_regression/_linear_regression.py # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause import pandas as pd import statsmodels.api as sm from sklearn import linear_model import torch.nn as nn import numpy as np class linear_regression_torch(nn.Module): def __init__(s...