input
stringlengths
2.65k
237k
output
stringclasses
1 value
<gh_stars>1-10 """The bot!""" # Standard library: import logging import os import random import re from typing import Dict, Optional, Sequence, Tuple, Union # Third party: import attr import discord from tabulate import tabulate # Local: from .discover import AudioCollection # Listing of help aliases HELP = ["help"...
= getattr(self, "_calendar_list_1d", None) if calendar_list_1d is None: calendar_list_1d = self._get_1d_calendar_list() setattr(self, "_calendar_list_1d", calendar_list_1d) return calendar_list_1d def generate_1min_from_daily(self, calendars: Iterable) -> pd.Index: return generate_minutes_calendar_from_daily( c...
obtain a commit lock in order to minimize the # interruption of concurrent write operations. start = perf_counter() packed_list = [] counter, lastreport, statecounter = 0, 0, 0 # We'll report on progress in at most .1% step increments reportstep = max(total / 1000, 1) for tid, packed, has_removable in tid_rows:...
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
of verbosity. Set to 0 by default, which means quiet. - ``integrality_tolerance`` -- float; parameter for use with MILP solvers over an inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values`. OUTPUT: Real number or tuple, depending on the given arguments (examples are given below). EXAMPLES: ...
""" Generalized Transport Velocity Formulation ########################################## Some notes on the paper, - In the viscosity term of equation (17) a factor of '2' is missing. - A negative sign is missing from equation (22) i.e, either put a negative sign in equation (22) or at the integrator step equation(2...
TStr Parameters: Mem: TMem const & __init__(TStr self, PSIn const & SIn) -> TStr Parameters: SIn: PSIn const & __init__(TStr self, TSIn SIn, bool const & IsSmall=False) -> TStr Parameters: SIn: TSIn & IsSmall: bool const & __init__(TStr self, TSIn SIn) -> TStr Parameters: SIn: TSIn & """ _snap.TSt...
== i + 1: STRAIGHT_DHDCD.append({D[i], H[j], D[k], C[l], D[m]}) STRAIGHT_DHDCD.append({D[9], H[10], D[11], C[12], D[0]}) STRAIGHT_DHDHS = [] for i in range(13): for j in range(1, 13): for k in range(2, 13): for l in range(3, 13): for m in range(4, 13): if m == l + 1 and l == k + 1 and k == j + 1 and j == i + 1: ...
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notice, this...
{self.args.ckpt_to_load}") assert os.path.exists(self.args.ckpt_to_load), f"ckpt_to_load does not exist! Given {self.args.ckpt_to_load}" ckpt = torch.load(self.args.ckpt_to_load, map_location=self.device) self.model.load_state_dict(ckpt['state_dict'], strict=False) else: # If save_path exists, then resume from it ...
rxn.type) # if we're looking at third bodies, and it's a falloff if rxn_type == reaction_type.thd and __is_fall(rxn): continue # or if we're looking at falloffs, and it doesn't match elif rxn_type != reaction_type.thd and rxn_type not in rxn.type\ and __is_fall(rxn): continue # get the net rate of progress r...
as strings # therefore below we convert to float dia_on_row = self.draw_app.ui.tools_table_exc.item(row, 1).text() self.selected_dia_list.append(float(dia_on_row)) self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x)) # Switch notebook to Properties page self.draw_app.ap...
in images: outputText += 'image footprint for image {}\n'.format(image.pk) outputText += ' ra, dec ; x, y\n' for coord in image.getBestPlateSolution().wcs().calc_footprint(axes=(image.dimX, image.dimY)): ra = numpy.asscalar(coord[0]) dec = numpy.asscalar(coord[1]) # NOTE: The third parameter is the origin. From ...
<gh_stars>10-100 # # Copyright 2017 the original author or 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 appli...
<filename>graphql_compiler/tests/schema_transformation_tests/test_merge_schemas.py # Copyright 2019-present Kensho Technologies, LLC. from collections import OrderedDict from textwrap import dedent import unittest from graphql import build_ast_schema, parse from graphql.language.printer import print_ast import six fr...
``file_id``, ``url`` or ``path``. :param url: Set it if you want to send a file from a remote URL. Note that you'll have to specify either ``file_id``, ``url`` or ``path``. :param path: Set it if you want to send a file from the local filesystem. Note that you'll have to specify either ``file_id``, ``url`` or ``p...
verbose_name=verbose_name, resource_pool=resource_pool_id, count=count ) # попытка создать ВМ inner_retry_count = 0 while inner_retry_count < VEIL_MAX_VM_CREATE_ATTEMPTS: # Send request to create vm if create_thin_clones: create_response = await vm_client.create(vm_configuration) else: create_response = awai...
to avoid making a copy if the user passes # in a service.CreateCertificateAuthorityRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, service.CreateCertificateAuthorityRequest): request = service.CreateCertificateAuthorityRequest(...
204, 1809, 1819, 205, 47, 48, 49, 14, 1612, 2470, 1678, 26, 1622, 3327, 3547, 1688, 2481, 3767, 2602, 1744, 1754, 38, 1631, 3336, 3556, 1697, 3381, 1600, 3601, 3776, 3821, 1763, 2492, 3987, 2613, 3996, 4041, 2723, 1810, 1820, 1829, 50, 170, 2501, 2622, 182, 2502, 4206, 2623, 2732, 2733, 194, 2503, 4207, 2624, 42...
<gh_stars>1-10 import re import math from qrcode import base, exceptions # QR encoding modes. MODE_NUMBER = 1 << 0 MODE_ALPHA_NUM = 1 << 1 MODE_8BIT_BYTE = 1 << 2 MODE_KANJI = 1 << 3 # Encoding mode sizes. MODE_SIZE_SMALL = { MODE_NUMBER: 10, MODE_ALPHA_NUM: 9, MODE_8BIT_BYTE: 8, MODE_KANJI: 8, } MODE_SIZE_MEDIU...
executed in {} seconds\n!'.format(time.time() - start_time)) if error: show_error = False error_split = error.split('\n') for error_str in error_split: if not error_str or error_str.startswith( ('DEPRECATION:', 'WARNING:', 'You should consider upgrading via')): continue else: show_error = True break if show_...
<filename>plugins/modules/ovh.py #!/usr/bin/env python import ast import yaml import time from ansible.module_utils.basic import AnsibleModule from ansible.utils.display import Display from ansible import constants ANSIBLE_METADATA = { 'metadata_version': '4', 'supported_by': 'synthesio', 'status': ['preview'] } ...
<reponame>mewbak/ida-minsc """ Instruction module This module exposes a number of tools for interacting with an instruction defined within the database. There are three types of tools within this module and each can be distinguished by their prefixes which can be used to decode the operands for an instruction. At the ...
field.type in ('one2many', 'many2many'): # The written value is a list of commands that must applied # on the field's current value. Because the field is # protected while being written, the field's current value # will not be computed and default to an empty recordset. So # make sure the field's value is in cache...
The diagnostics table file # (3) The field table file # (4) The FV3 namelist file # (5) The model configuration file # (6) The NEMS configuration file # # If using CCPP, it also needs: # # (7) The CCPP physics suite definition file # # The workflow contains templates for the first six of these files. # Temp...
None """ self.logger.debug("In 'study' setter.") self._study = study def validate(self): """ Validates the current object's data/JSON against the current schema in the OSDF instance for that specific object. All required fields for that specific object must be present. Args: None Returns: A list of stri...
""" Common routines for models in Chainer. """ __all__ = ['round_channels', 'BreakBlock', 'ReLU6', 'HSwish', 'get_activation_layer', 'GlobalAvgPool2D', 'SelectableDense', 'DenseBlock', 'ConvBlock1d', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'conv5x5_block', 'conv7x7_...
<reponame>stonebig/pandas from __future__ import division # pylint: disable-msg=W0402 from datetime import datetime import random import string import sys import tempfile from contextlib import contextmanager # contextlib is available since 2.5 from distutils.version import LooseVersion from numpy.random import ra...
dataframe has one row per sequence and one column per alignment position. Each value is a single character. The dtype is object Rows are indexed by the sequence names if use_names==True, or by a RangeIndex by default Examples -------- >>> ali= Alignment([ ('seq1 first', 'ATTCG-'), ('seq2 this is 2nd' , '--TTGG'),...
<reponame>cwbeitel/clarify<filename>clarify/datasets/utils/eval.py # coding=utf-8 # 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 requi...
<filename>wouso/interface/activity/achievements.py import logging from datetime import datetime, timedelta from django.utils.translation import ugettext_noop from core import scoring from core.scoring.sm import score from wouso.core.common import App from wouso.core.god import God from wouso.core.user.models import Pla...
self.gridLayout_108.addWidget(self.label_752, 5, 0, 1, 1) self.homeIgnoreLimits_5 = QtWidgets.QCheckBox(self.groupBox_62) self.homeIgnoreLimits_5.setObjectName("homeIgnoreLimits_5") self.gridLayout_108.addWidget(self.homeIgnoreLimits_5, 6, 1, 1, 1) self.homeSequence_5 = QtWidgets.QLineEdit(self.groupBox_62) self.h...
# This file was automatically created by FeynRules 2.3.32 # Mathematica version: 11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018) # Date: Sat 21 Apr 2018 20:48:39 from object_library import all_parameters, Parameter from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot # This is a defau...
String), ('fid_column', String), ('geom_column', String), ('feature_type', SF_FeatureType), ('coor_dim', c_int), ('srid', c_int), ('dbdriver', POINTER(dbDriver)), ('fi', POINTER(struct_field_info)), ('inTransaction', c_int), ('conn', POINTER(None)), ('res', POINTER(None)), ('cursor_name', String), ('cursor_...
= Board('k6K/6B1/8/4b3/8/8/8/8 w - - 0 1') moves = board._pinned_move_gen(Sq.G7, Sq.E5, Direction.UR) assert len(moves) == 2 assert sorted(moves) == [Move(Sq.G7, Sq.E5, MoveType.CAPTURE), Move(Sq.G7, Sq.F6, MoveType.QUIET)] # rook pinned by bishop board = Board('k6K/6R1/8/8/8/8/1b6/8 w - - 0 1') moves = board._...
<reponame>katyakats/storey<filename>storey/aggregations.py<gh_stars>0 import asyncio import copy from datetime import datetime import re from typing import Optional, Union, Callable, List, Dict from .aggregation_utils import is_raw_aggregate, get_virtual_aggregation_func, get_implied_aggregates, get_all_raw_aggregates...
opti.lbg,opti.g,opti.ubg represent the vector of flattened constraints opti.debug.show_infeasibilities() may be used to inspect which constraints are violated """ return _casadi.Opti__subject_to(self, *args) def solver(self, *args): """ Set a solver. solver(self, str solver, dict plugin_options, dict s...
'validations': { }, 'allowed_values': { }, 'openapi_types': { 'project_id': (str,), 'location_id': (str,), 'journal_id': (str,), }, 'attribute_map': { 'project_id': 'projectId', 'location_id': 'locationId', 'journal_id': 'journalId', }, 'location_map': { 'project_id': 'path', 'location_id': 'path', ...
of each bin. Add these values to the bin dicts. ''' # go through all the counters for counter in counters: # go through all the bins for bin in counter['bins']: # is the error proprotion too large? bin['is_noisy'] = (bin.get('error_proportion', 0.0) >= 1.0) # could the result be zero (or negative), or is it...
<gh_stars>1-10 from typing import Any, Callable, Dict, Optional, Sequence, Tuple import abc import dataclasses from google_cloud_pipeline_components import aiplatform as gcc_aip import kfp from kfp.v2.dsl import component, importer, Condition, Dataset, Model import training.common.managed_dataset_pipeline as managed_d...
step_coord_render = step_coords if len(step_coords) > 1 else step_coords[0] self.logger.debug("Beginning execution of step %s (%s)", step_coord_render, step) # At this point we know that all inputs are available. if step.is_subpipeline(): self.logger.debug("Step %s (coordinates %s) is a sub-Pipeline. Marking it " ...
Error ID""" MESSAGE = __doc__ class GeoPointInvalid(BadRequest): """Invalid geo point provided""" ID = "GEO_POINT_INVALID" """``str``: RPC Error ID""" MESSAGE = __doc__ class GifContentTypeInvalid(BadRequest): """GIF content-type invalid""" ID = "GIF_CONTENT_TYPE_INVALID" """``str``: RPC Error ID""" MESSAG...
user TEXT, uid INTEGER, version TEXT, changeset INTEGER, timestamp DATE );''') ### Create table tags ways ### c.execute('''CREATE TABLE ways_tags ( id INTEGER NOT NULL, key TEXT NOT NULL, value TEXT NOT NULL, type TEXT, FOREIGN KEY (id) REFERENCES ways(id) );''') ### Create table ways nodes ### c.execu...
#!/usr/bin/python import binascii import csv from random import randint import os import math import zipfile import sys import argparse class DNA(object): """ This class implements four main methods: encode(file): encode an arbitrary file in DNA form as described in Nature's article. encode_split(file): encode a...
from k5test import * # Load the sample KDC authdata module. greet_path = os.path.join(buildtop, 'plugins', 'authdata', 'greet_server', 'greet_server.so') conf = {'plugins': {'kdcauthdata': {'module': 'greet:' + greet_path}}} realm = K5Realm(krb5_conf=conf) # With no requested authdata, we expect to see SIGNTICKET (5...
], }, { 'command': 'snmp-server community {community_name}', 'doc': 'Configure SNMP community names', 'arguments': [ { 'name': 'community_name', 'doc': 'Configured Community names' } ], }, { 'command': 'no snmp-server community', 'doc': 'Unconfigure SNMP community names', 'arguments': [ { 'name': 'comm...
Optional[bool] = MISSING, # file: Optional[FileIO] = None, embeds: Optional[Union["Embed", List["Embed"]]] = MISSING, allowed_mentions: Optional["MessageInteraction"] = MISSING, message_reference: Optional["MessageReference"] = MISSING, components: Optional[ Union[ "ActionRow", # noqa "Button", # noqa "SelectM...
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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...
+ (price_base * price_markup), 2) variant_price_result.fget.short_description = '' @property def variant_sku_result(self): choice_field = 'variant_sku_choice' return getattr(self, getattr(self, choice_field)) variant_sku_result.fget.short_description = '' @property def variant_barcode_result(self): choice_fi...
<gh_stars>100-1000 # Copyright (c) Lexfo # SPDX-License-Identifier: BSD-3-Clause import contextlib import io import os import socket import time import types import weakref import impacket.dcerpc.v5.dcomrt as impkt_dcomrt import impacket.dcerpc.v5.transport as impkt_transport import impacket.dcerpc.v5.srvs as impkt_s...
#!/usr/bin/env python ''' mcu: Modeling and Crystallographic Utilities Copyright (C) 2019 <NAME>. 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/license...
131), Among(u"jasu", -1, 129), Among(u"kasu", -1, 133), Among(u"nasu", -1, 132), Among(u"tasu", -1, 130), Among(u"vasu", -1, 134), Among(u"esu", -1, 57), Among(u"isu", -1, 58), Among(u"osu", -1, 123), Among(u"atu", -1, 120), Among(u"ikatu", 1967, 68), Among(u"latu", 1967, 69), Among(u"etu", -1, 70), Among(...
last_dim = input_shape[-1] self.kernel = self.add_weight( 'kernel', shape=(2, last_dim, self.units), initializer=self.kernel_initializer, constraint=self.kernel_constraint, trainable=True) self.affinity_weight = self.add_weight( 'affinity_weight', shape=self.affinity_matrix.shape, initializer=tf.constant_in...
load_array( ( test_features, torch.tensor(y_test) ), batch_size, False) return train_iter, test_iter, vocab def init_weights(m): """Start weights in model""" if type(m) == nn.Linear: nn.init.xavier_uniform_(m.weight) if type(m) == nn.LSTM: for param in m._flat_weights_names: if "weight" in param: nn.init.xavie...
<reponame>jessenestler/floodplains<filename>archive/scripts/fema_flood_parse.py """ Author: <NAME> Date Created: Thu Nov 09 10:02:36 2017 Purpose: Download data from FEMA's web portal, and consolidate their schema into more usable formats for city needs. Transfer creek names from current city data to FEMA-derived data....
#!/usr/bin/python # -*- coding: utf-8 -*- # <NAME> (@porterhau5) import optparse import os import sys def main(): usage = ("Usage: python [-u] %prog [LOGFILE]" "\n\nA simple script for converting xinput output to legible " "keystokes." "\nCan process a log file directly when passed as an argument, or can" "\nco...
\ + 6*If(_id_18, 1, 0 ) \ + 0*If(_id_19, 1, 0 ) \ + 5*If(_id_20, 1, 0 ) \ + 0*If(_id_21, 1, 0 ) \ + 0*If(_id_22, 1, 0 ) \ + 7*If(_id_23, 1, 0 ) \ + 0*If(_id_25, 1, 0 ) \ + 0*If(_id_26, 1, 0 ) \ + 4*If(_id_27, 1, 0 ) \ + 7*If(_id_28, 1, 0 ) \ + 0*If(_id_29, 1, 0 ) \ + 6*If(preferences, 1, 0 ) \ + 0*If(_id_3...
<filename>tests/test_io.py from mpi4py import MPI import unittest import os import numpy as np import pycorgi import pyrunko import pytools import h5py #from visualize import get_yee #from visualize import getYee2D #from combine_files import combine_tiles #import injector #from read_mesh import TileInfo #from read_m...
#!/usr/bin/env pytest ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test driver metadata # Author: <NAME> <<EMAIL> at <EMAIL> dot <EMAIL>> # ############################################################################### # Copyright (c...
# -*- coding: -utf-8 -*- import random from django.db import migrations PUNTAJE_MINIMO = 85 PUNTAJE_MAXIMO = 100 def insert_data(apps, schema_editor): paises = [ 'Rusia', 'Arabia Saudita', 'Egipto', 'Uruguay', 'Portugal', 'España', 'Marruecos', 'Iran', 'Francia', 'Australia', 'Perú', 'Dinamarca', 'Arg...
<filename>gym_goal/envs/goal_env.py """ Robot Soccer Goal domain by <NAME> et al. [2016], Reinforcement Learning with Parameterized Actions Based on code from https://github.com/WarwickMasson/aaai-goal Author: <NAME> June 2018 """ import numpy as np import math import gym import pygame from gym import spaces, error fr...
61, 41)) self.textEdit_7.setObjectName("textEdit_7") self.textEdit_8 = QtWidgets.QTextEdit(self.groupBox_3) self.textEdit_8.setGeometry(QtCore.QRect(10, 130, 104, 31)) self.textEdit_8.setObjectName("textEdit_8") self.comboBox_analysisDb_server_select = QtWidgets.QComboBox(self.groupBox_3) self.comboBox_analysisDb...
32))) # Alpha#36 (((((2.21 * rank(correlation((close - open), delay(volume, 1), 15))) + (0.7 * rank((open- close)))) + (0.73 * rank(Ts_Rank(delay((-1 * returns), 6), 5)))) + rank(abs(correlation(vwap,adv20, 6)))) + (0.6 * rank((((sum(close, 200) / 200) - open) * (close - open))))) def alpha036(self): adv20 = sma(s...
#!/usr/bin/env python3 #-*- encoding:utf8 -*- # # MIT License # # Copyright (c) 2020 micha # # 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 ...
= channel_params[l] vp,vc = curve_fit(gf_fit,r,v,p0,maxfev=maxfev) gc = get_gf_channel(1,p,vp,Zval) vf = gf_fit(r,*vp) rms_dev = gf.rms_deviation(v,vf) energy_dev = gf.energy_deviation(v,vf,r) cfit = obj( channel = gc, rms_dev = rms_dev, energy_dev = energy_dev ) if verbose: self.log(' rms deviation: {0}'.f...
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2021 plun1331 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, mod...
- zsc_zone_hour_volume.mean(axis=0, keepdims=True) results = { "raw": zone_hour_volume, "mean": avg_zone_hour_volume, "zscore": zsc_zone_hour_volume, "residual": res_zone_hour_volume, } mappings = { "area2idx": area2idx, "hour2idx": hour2idx, "period2idx": week2idx, "idx2area": idx2area, "idx2hour": idx2h...
# def estimate_T(self, delays, XYZT_location): # X,Y,Z,T = XYZT_location # Z = np.abs(Z) # # delta_X_sq = ant_locs[:,0]-X # delta_Y_sq = ant_locs[:,1]-Y # delta_Z_sq = ant_locs[:,2]-Z # # delta_X_sq *= delta_X_sq # delta_Y_sq *= delta_Y_sq # delta_Z_sq *= delta_Z_sq # # # workspace = delta_X_sq+delta_Y_sq # worksp...
""" Tax-Calculator tax-filing-unit Records class. """ # CODING-STYLE CHECKS: # pycodestyle records.py # pylint --disable=locally-disabled records.py import os import numpy as np import pandas as pd from taxcalc.data import Data from taxcalc.growfactors import GrowFactors from taxcalc.utils import read_egg_csv class ...
# TODO # color(a, a) est identique à color(a) # birmanie ajouter étoile + vérif couleur # le cadre n'est pas tjs là, il faut gérer cela autrement avec une fonction? # Liens internet vers la description des drapeaux du monde # https://fr.wikipedia.org/wiki/Galerie_des_drapeaux_des_pays_du_monde # https://fr.wikipedia.o...
1 2 0 504 384 1 1 2 0 501 621 1 1 2 0 501 381 1 1 2 0 498 618 1 1 2 0 498 378 1 1 2 0 495 615 1 1 2 0 495 375 1 1 2 0 492 612 1 1 2 0 492 372 1 1 2 0 489 609 1 1 2 0 489 369 1 1 2 0 486 606 1 1 2 0 486 366 1 1 2 0 483 603 1 1 2 0 483 363 1 1 2 0 480 600 1 1 2 0 480 360 1 1 2 0 477 597 1 1 2 0 477 357 1 1 2 0 474 594 1 ...
required parameter 'start_workday' is set if ('start_workday' not in params) or (params['start_workday'] is None): raise ValueError("Missing the required parameter `start_workday` when calling `get_gamification_scorecards_points_trends`") # verify the required parameter 'end_workday' is set if ('end_workday' not in...
<gh_stars>10-100 import warnings import numpy as np from collections import OrderedDict from pyinterpolate.distance.calculate_distances import calc_point_to_point_distance from pyinterpolate.transform.select_values_in_range import select_values_in_range, check_points_within_ellipse import matplotlib.pyplot as plt de...
<reponame>mortang2410/dotfiles<filename>.config/ranger/commands.py # This is a sample commands.py. You can add your own commands here. # # Please refer to commands_full.py for all the default commands and a complete # documentation. Do NOT add them all here, or you may end up with defunct # commands when upgrading rang...
print (""" PHPGGC is a library of unserialize() payloads along with a tool to generate them, from command line or programmatically. """) choicephpggc = raw_input(" Do You Want To Download PHP Generic Gadget Chains? (Y/N) : ") if choicephpggc in yes: os.system("cd ~/bughunter/expt/ && git clone https://github.com/...
creator_email(self): """ Gets the creator_email. # noqa: E501 Gets or sets the creator's email # noqa: E501 :return: The creator_email. # noqa: E501 :rtype: str """ return self._creator_email @creator_email.setter def creator_email(self, creator_email): """ Sets the creator_email. Gets or sets the creat...
<= 0) m.c1437 = Constraint(expr= - m.b168 + m.b169 - m.b173 <= 0) m.c1438 = Constraint(expr= - m.b168 + m.b170 - m.b174 <= 0) m.c1439 = Constraint(expr= - m.b168 + m.b171 - m.b175 <= 0) m.c1440 = Constraint(expr= - m.b168 + m.b172 - m.b176 <= 0) m.c1441 = Constraint(expr= - m.b169 + m.b170 - m.b177 <= 0) m.c1442 ...
flux_temp, "LN_PRAXIS") jobs.append([i, job_server.submit(optimize.fit_r_mdv_nlopt, parameters, (optimize.calc_MDV_residue_scipy, optimize.calc_MDV_residue_nlopt,optimize.fit_r_mdv_scipy,optimize.fit_r_mdv_nlopt), ("numpy","nlopt","scipy","scipy.integrate"))]) elif method == "GN_CRS2_LM": for i, flux_temp in enume...
#!/usr/bin/env python3 # # Copyright (c) 2022 Project CHIP 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 applic...
the userInvitation token for selected reset items. UserInvitation.delete().where(UserInvitation.email.in_(emails)).execute() for record_id in ids: self.enqueue_record(record_id) except Exception as ex: transaction.rollback() flash(f"Failed to activate the selected records: {ex}") app.logger.exception("Failed t...
# [h] hTools2.modules.fontutils """A collection of useful functions for working with fonts.""" # imports import os from random import randint try: from mojo.roboFont import CurrentGlyph, CurrentFont, NewFont from lib.tools.defaults import getDefault except: from fontParts.world import CurrentGlyph, CurrentFont...
as rows all predicted embeddings """ assert vector is not False, "The given vector is False!" result = np.zeros((len(self.configuration.features),)) - 1 if threshold_function is None: threshold_function = lambda prob, fname, **kws: prob > 0.5 if regressor_wrapper is None: regressor_wrapper = lambda value, fna...
else: s_x_1B = s_x_1 if numpy.isnan(s_x_1B).any(): print("s_x_1B=", s_x_1B) quit() if self.use_sfa: sfa_x = self.sfa_node.execute(s_x_1B) # TODO: Change internal variables of SFANode, so that we do not need to zero some components sfa_x[:, self.num_sfa_features_preserved:] = 0.0 proj_sfa_x = self.sfa_node....
#!/usr/bin/env python # coding=utf-8 """ Evaluation (t-tree comparison functions). """ from __future__ import unicode_literals from __future__ import division from builtins import zip from builtins import range from builtins import object from past.utils import old_div from collections import defaultdict from enum im...
<reponame>Koenkk/popcorn_maker # Copyright 2007 <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of c...
in j['payload']['participants']: if p['type'] == 'page': participants[p['fbid']] = Page(p['fbid'], url=p['href'], photo=p['image_src'], name=p['name']) elif p['type'] == 'user': participants[p['fbid']] = User(p['fbid'], url=p['href'], first_name=p['short_name'], is_friend=p['is_friend'], gender=GENDERS.get(p['gende...
<filename>calysto/graphics.py """ Parts based on <NAME>'s graphics.py http://mcsp.wartburg.edu/zelle/python/ppics2/index.html LICENSE: This is open-source software released under the terms of the GPL (http://www.gnu.org/licenses/gpl.html). """ __all__ = [ # The container: 'Canvas', # Shapes: 'Shape', 'Line', 'Cir...
- t_boris controller.runTimeDict['particle_push'] += time.time() - tmid return species_list def collSetup(self,species_list,fields,controller=None,**kwargs): M = self.M K = self.K dt = controller.dt if self.nodeType == 'lobatto': self.ssi = 1 #Set sweep-start-index 'ssi' self.collocationCla...
# Copyright 2018 The Wallaroo 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 agreed to in wri...
import unittest from xsertion.layers import * from keras.layers import Input, MaxPooling2D, Convolution2D, Activation, merge, Dense, Flatten from keras.models import Model import json def desc(model : Model): base_model_disc = json.loads(model.to_json()) return base_model_disc['config'] def topo_check(layerlist):...
# Standard Library import datetime import random from typing import Dict, List, Optional # Third Party Code from bitstring import BitStream from dateutil.tz import tzlocal # Supercell Code from supercell.weatherlink.exceptions import BadCRC from supercell.weatherlink.utils import crc16, CRC16_TABLE, make_time FORECA...
a command to run and dirname is the directory in which to run it (which will be created if necessary). test is a dictonary for given TEST matched from testlist.yaml bin_dir is the general path to binary directory If use_lsf is true, the commands in command_list begin with something like 'bsub -Is'. It seems th...
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 """ tdc.py - Linux tc (Traffic Control) unit test driver Copyright (C) 2017 <NAME> <<EMAIL>> """ import re import os import sys import argparse import json import subprocess from collections import OrderedDict from string import Template from tdc_config impo...
default=None Optionally (for cross-correlation), positions in the second randoms catalog. See ``randoms_positions1``. randoms_weights1 : array of shape (N,), default=None Optionally, weights in the first randoms catalog. randoms_weights2 : array of shape (N,), default=None Optionally (for cross-correlation), wei...
<reponame>tantioch/aiokubernetes # coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import datetime import json import...
P.h02 ], color = [ '1' ], lorentz = [ L.FFS3, L.FFS4 ], couplings = {(0,0):C.GC_1828,(0,1):C.GC_1790}) V_156 = Vertex(name = 'V_156', particles = [ P.n1, P.n1, P.h01 ], color = [ '1' ], lorentz = [ L.FFS3, L.FFS4 ], couplings = {(0,0):C.GC_1827,(0,1):C.GC_1789}) V_157 = Vertex(name = 'V_157', particles = [ P....
import inspect import numpy as np import scipy.stats as stats import numba from math import gamma, erf dist_names = ['uniform', 'normal', 'lognormal', 'beta', 'generalized_normal',] __all__ = ['sample_{:s}'.format(d) for d in dist_names] __all__ += ['sample_multivar_normal','sample_one_minus_rayleigh'] __all__ += ['e...
"ceDiagEventQueryEntry": {"2": {}, "3": {}, "4": {}, "5": {}, "6": {}}, "ceDiagEventResultEntry": {"2": {}, "3": {}, "4": {}, "5": {}, "6": {}}, "ceDiagEvents": {"1": {}, "2": {}, "3": {}}, "ceDiagHMTestEntry": { "1": {}, "2": {}, "3": {}, "4": {}, "5": {}, "6": {}, "7": {}, "8": {}, }, "ceDiagHealthMonito...
<reponame>hzheng/pybox # -*- coding: utf-8 -*- """ Python API for manipulating files on box.com(a.k.a box.net). """ import ConfigParser import errno import json import os import re import sys from datetime import datetime import shutil import socket import urllib import urllib2 from httplib import BadStatusLine from...
el_result['based_on'] = None else: el_result['based_on'] = based_on.get('%sval' % w_namespace) result[style_id] = el_result return result def get_image_sizes(tree): drawings = [] result = {} w_namespace = get_namespace(tree, 'w') for el in tree.iter(): if el.tag == '%sdrawing' % w_namespace: drawings.append...