input
stringlengths
2.65k
237k
output
stringclasses
1 value
""" Module file for handling of downscaling input regridded (possibly bias-corrected) forcing fields. Each input forcing product will loop through and determine if downscaling is needed, based off options specified by the user. """ import math import os import time import numpy as np from netCDF4 import Dataset from ...
from manim_imports_ext import * from _2018.lost_lecture import ShowWord from _2019.clacks.solution2.mirror_scenes import ReflectWorldThroughMirrorNew from _2019.clacks.question import Thumbnail class WrapperScene(Scene): CONFIG = { "title": "Title", "shade_of_grey": "#333333" } def construct(self): title = Tex...
<reponame>tub-elastest/epm-client-python<gh_stars>1-10 # coding: utf-8 """ EPM REST API REST API description of the ElasTest Platform Manager Module. # noqa: E501 OpenAPI spec version: 0.1.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six ...
<filename>tick/linear_model/tests/logistic_regression_test.py<gh_stars>0 # License: BSD 3 clause import itertools import unittest import numpy as np from sklearn.metrics.ranking import roc_auc_score from tick.base.inference import InferenceTest from tick.linear_model import SimuLogReg, LogisticRegression from tick.s...
0 r,g,b = rgb msg.extend(bytearray([lead_byte, r,g,b])) # pad out empty slots if len(rgb_list) != 16: for i in range(16-len(rgb_list)): msg.extend(bytearray([0, 1, 2, 3])) msg.append(0x00) msg.append(utils.speedToDelay(speed)) if transition_type =="gradual": msg.append(0x3a) elif transition_type =="jump":...
<reponame>jiportilla/ontology<filename>python/datadict/core/os/base/parents.py #!/usr/bin/env python # -*- coding: UTF-8 -*- # pylint:disable=bad-whitespace # pylint:disable=line-too-long # pylint:disable=too-many-lines # pylint:disable=invalid-name # ######################################################### # # ***...
<gh_stars>0 import sys import MySQLdb import MySQLdb.cursors import config as c CURRENT_VERSION = '1.80' db = MySQLdb.connect(host=c.DBHOST, user=c.DBUSER, passwd=c.DBPASS, db=c.DBNAME, cursorclass=MySQLdb.cursors.DictCursor) cur = db.cursor() def main(): version = get_db_version() if version == CURRENT_VERSION: ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import shutil import sqlite3 import tempfile from squint._compatibility.builtins import * from squint._compatibility.collections import namedtuple from .common import ( StringIO, unittest, ) from squint.select import Select from squint.select i...
fields that don't store column values. This is very inefficient. Instead of relying on this categorizer you should plan for which fields you'll want to sort on and set ``sortable=True`` in their field type. This object builds an array caching the order of all documents according to the field, then uses the ...
<filename>subtitles.py import json import gzip import os import base64 from socket import gaierror from http.client import ResponseNotReady from xmlrpc.client import ServerProxy, ProtocolError, Fault, expat class SubtitlePreference(object): """ Saves the users preferences for subtitle downloading, be it a selected ...
""" TensorFlow policy class used for SAC. """ import copy import gym from gym.spaces import Box, Discrete from functools import partial import logging from typing import Dict, List, Optional, Tuple, Type, Union import ray import ray.experimental.tf_utils from ray.rllib.algorithms.ddpg.ddpg_tf_policy import ( Compute...
<gh_stars>0 from typing import List import os import json from os.path import join as _join from os.path import exists as _exists import math from osgeo import gdal, osr import numpy as np from scipy.ndimage import label from subprocess import Popen, PIPE from pprint import pprint from wepppy.all_your_base.geo imp...
}, { "name": 'Happiny', "value": "happiny", "image": "img/happiny.png" }, { "name": 'Chatot', "value": "chatot", "image": "img/chatot.png", "exclude": ['swsh'] }, { "name": 'Spiritomb', "value": "spiritomb", "image": "img/spiritomb.png" }, { "name": 'Gible', "value": "gible", "image": "img/gible.png...
is Equality: lhs, rhs = [_recursive_walk(i) for i in expr.args] f = lambda i: isinstance(i, C.Number) or i in Cs if lhs.func is Symbol and lhs in Cs: rhs, lhs = lhs, rhs if lhs.func in (Add, Symbol) and rhs.func in (Add, Symbol): dlhs = sift([lhs] if isinstance(lhs, C.AtomicExpr) else lhs.args, f) drhs = sift([r...
initialize=0) m.b2542 = Var(within=Binary, bounds=(0,1), initialize=0) m.b2543 = Var(within=Binary, bounds=(0,1), initialize=0) m.b2544 = Var(within=Binary, bounds=(0,1), initialize=0) m.b2545 = Var(within=Binary, bounds=(0,1), initialize=0) m.b2546 = Var(within=Binary, bounds=(0,1), initialize=0) m.b2547 = Var(within=...
<filename>data/oshpd-ca/parse.py #!/usr/bin/env python import os from glob import glob import json import pandas import datetime # This is a challenging dataset because it's so big! # We will do our best to break the data into pieces here = os.path.dirname(os.path.abspath(__file__)) folder = os.path.basename(here) l...
self.assert_( n.isLog10() == False ) n.addChild(libsbml.ASTNode()) self.assert_( n.isLog10() == True ) c.setValue(2) self.assert_( n.isLog10() == False ) _dummyList = [ n ]; _dummyList[:] = []; del _dummyList pass def test_ASTNode_isSqrt(self): n = libsbml.ASTNode() n.setType(libsbml.AST_FUNCTION) self.asse...
("Segmentation Result", [7010, 9509, 9510]), }, "SegmentedConstrained": { "113269": ("Segmented-Constrained", [7274]), }, "SegmentedUnconstrained": { "113268": ("Segmented-Unconstrained", [7274]), }, "SelectedImplantComponent": { "112346": ("Selected Implant Component", []), }, "SelectedRegion": { "111099":...
# Copyright 2018 The Exoplanet ML 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...
<reponame>ArtellaPipe/artellapipe #! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains manager for Artella assets """ from __future__ import print_function, division, absolute_import __author__ = "<NAME>" __license__ = "MIT" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" import os import logging...
made").ljust(800, " ")) statusLabel.setForeground(Color.BLUE) myPopupInformationBox(toolbox_frame_,"User did not select end date - NO CHANGES MADE!",theMessageType=JOptionPane.WARNING_MESSAGE) return endDate = dateField.getDateInt() txnSet = moneydance_data.getTransactionSet() txns = txnSet.iterableTxns() iTxn...
self.dg_del * d_inputs['elevationGS'] else: if 'azimuthGS' in d_inputs: d_inputs['azimuthGS'] += self.dg_daz * dgain if 'elevationGS' in d_inputs: d_inputs['elevationGS'] += self.dg_del * dgain class Comm_GSposEarth(ExplicitComponent): """ Returns position of the ground station in Earth frame. """ # Constan...
<reponame>LuisLinan/helicity_fluxes import numpy as np from scipy import ndimage from scipy import linalg def convol(image, kernel): convol = ndimage.filters.correlate(image, kernel) s = kernel.shape indexi = [int(np.ceil((s[0] - 1) / 2.)), int(np.floor((s[0] - 1) / 2.))] indexj = [int(np.ceil((s[1] - 1) / 2.)), ...
itrf2008 =\ """ IGS_0194 -3766965.4504 3211877.1442 4008334.3092 -0.01092 -0.00334 -0.00407 2005.001413 IGS_1181 3800621.0195 882005.5846 5028859.6697 -0.01620 0.01588 0.00911 2005.001413 IGS_1311 -5543846.1330 -2054563.1366 2387814.3730 -0.00936 0.06292 0.03241 2005.001413 IGS_1404 1769693.2905 -5044504.5803 -346843...
<gh_stars>0 """ Support for dynamically modifying output attributes. """ import logging, os.path, string, re from galaxy import util log = logging.getLogger( __name__ ) class ToolOutputActionGroup( object ): """ Manages a set of tool output dataset actions directives """ tag = "group" def __init__( self, parent...
read access token's secret version. webhookSecretVersionName: Required. Immutable. The resource name for the webhook secret's secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig. """ adminAccessTokenVersionName = _messages.Str...
<reponame>LucaPetrucci/test_image<filename>master-controller.py # This program 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. # This ...
if with_guiding_shift: gt_tl_guiding_shift = gt_bboxes[-1].new_zeros( [batch_size, 2, height, width]) gt_br_guiding_shift = gt_bboxes[-1].new_zeros( [batch_size, 2, height, width]) # Centripetal shift is also a kind of offset, from center to corner # and normalized by log. if with_centripetal_shift: gt_tl_centr...
<reponame>ztomsy/ztom from . import TradeOrder from . import ccxtExchangeWrapper from . import ActionOrder from . import core from . import utils from datetime import datetime from .errors import * import copy import time from typing import List class ActionOrderManager(object): LOG_DEBUG = "DEBUG" LOG_INFO = "INF...
PG': None, 'CJK STROKE PZ': None, 'CJK STROKE Q': None, 'CJK STROKE S': None, 'CJK STROKE SG': None, 'CJK STROKE SP': None, 'CJK STROKE ST': None, 'CJK STROKE SW': None, 'CJK STROKE SWG': None, 'CJK STROKE SWZ': None, 'CJK STROKE SZ': None, 'CJK STROKE SZWG': None, 'CJK STROKE SZZ': None, 'CJK STROKE T': None, 'CJK STR...
<reponame>chrhenning/posterior_replay_cl<filename>probabilistic/prob_cifar/train_utils.py #!/usr/bin/env python3 # Copyright 2020 <NAME> # # 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 # # ht...
ast.Mod, ast.Pow, ast.LShift, ast.RShift, ast.BitOr, ast.BitXor, ast.BitAnd, ast.FloorDiv]: return None # can't negate this elif top in [ast.Num, ast.Name]: # this is a normal value, so put a - in front of it newOp = ast.UnaryOp(ast.USub(addedNeg=True), op) else: log("astTools\tnum_negate\tUnusual type:...
<filename>src/devices/cpu/m68000/m68kmake.py #!/usr/bin/python # license:BSD-3-Clause # copyright-holders:<NAME>, <NAME> # To regerenerate m68kops.* run m68kmake.py m68k_in.lst m68kops.h m68kops.cpp from __future__ import print_function import sys import copy CPU_000 = 0 CPU_070 = 1 CPU_010 = 2 CPU_020 = 3 CPU_030 =...
#!/usr/bin/env python3 #****************************************************************************** # (C) 2018, <NAME>, Austria * # * # The Space Python Library is free software; you can redistribute it and/or * # modify it under under the terms of the MIT License as published by the * # Massachusetts Institute of T...
group sizes can't be exactly equal, they should # differ by no more than one for n in (13, 19, 59, 109, 211, 571, 1019, 1907, 5261, 9769): group_sizes = {total // n, total // n + 1} pos = [bisect.bisect(data, q) for q in quantiles(data, n=n)] sizes = {q - p for p, q in zip(pos, pos[1:])} self.assertTrue(sizes <= ...
to Cartesians.""" self.log_int_grad_msg(int_gradient) K = self.get_K_matrix(int_gradient) return self.B.T.dot(redund_hessian).dot(self.B) + K def project_hessian(self, H, shift=1000): """Expects a hessian in internal coordinates. See Eq. (11) in [1].""" P = self.P return P.dot(H).dot(P) + shift * (np.eye(P.shap...
issue; otherwise, the result waits on the first response not automated; the credential exchange record retains state regardless. Args: request: aiohttp request object Returns: The credential exchange record """ r_time = get_timer() context: AdminRequestContext = request["context"] outbound_handler = reques...
<reponame>monte-language/typhon<filename>typhon/nano/interp.py """ A simple AST interpreter. """ from rpython.rlib import rvmprof from rpython.rlib.jit import promote, unroll_safe, we_are_jitted from typhon.atoms import getAtom from typhon.errors import Ejecting, Refused, UserException, userError from typhon.nano.mai...
* lossPure_ema.shape[0])], ...]] pureLab = targets[lossIdx[:int(remRate * lossPure.shape[0])]].long() #pureLab_ema = targets[lossIdx_ema[:int(remRate * lossPure_ema.shape[0])]].long() # loss for cnn C lossCNNC, precCNNC = self._forward(pureInput, pureLab, epoch, self.modelC) lossCNNC_ema, precCNNC_ema = self._forw...
<reponame>Kiiwi/Syssel """This is a PostgreSQL client library for humans. Installation ------------ :py:mod:`postgres` is available on `GitHub`_ and on `PyPI`_:: $ pip install postgres :py:mod:`postgres` requires `psycopg2`_ version 2.5 or higher. We `test <https://travis-ci.org/gittip/postgres.py>`_ against Pyt...
= False else: check_flag = True cmds.snapMode(grid=check_flag, curve=check_flag, point=check_flag, meshCenter=check_flag, viewPlane=check_flag) [but.setChecked(check_flag) for but in self.snap_section_but[:-1]] #ダグノードの選択フィルタリングを変更する def select_filter_mode(self, mode=0): #shiftかどうかを判定 #print shift_mod #self.a...
= 0 frames.append(frame) amplify = np.randint(5, 10) / 10.0 xratio = np.randint(1, 4) yratio = np.randint(1, 4) duration = np.randint(5, 10) / 10 labelA.append('NailWashLeft') for i in range(1, size): i = i / float(size) column, row = generate_sinDuration(duration, i, amplify=amplify) frame = np.zeros((size,...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import atexit import hashlib import logging import os import os.path import random import re import subprocess import sys import tempfile import threading im...
<filename>quasar/algebra.py import numpy as np from .measurement import ProbabilityHistogram class Algebra(object): @staticmethod def apply_operator_1( statevector1, statevector2, operator, A, ): """ Apply a 1-body operator to statevector1 at qubit A, yielding statevector2. The formal operation performed ...
---------- start processing pipeline -------------------- # loop = asyncio.get_event_loop() # -------- process replays ------------ for replay in replays: await self.process_replay(message, all_urls, replay, server_options) # loop.create_task(self.process_replay(message, all_urls, replay, server_options)) # -----...
<gh_stars>1-10 # This script is used to help me create the world generation algorithm. # It's included for anyone curious as to how it works, feel free to use any # parts of the algorithm! # Uses https://imgur.com/a/EoXWh as a reference, credit to the tModLoader team! from PIL import Image import matplotlib.pyplot as ...
'parse_label': 'diameter', "control": None, "axes": { # 'TIME', 'datetime', "DIAMETER": "aps_diameter_um", }, } aps_sd_y_data.append("aps_diameter_um") primary_meas["aps_integral_concentration"] = { "dimensions": { "axes": ["TIME"], "unlimited": "TIME", "units": ["dateTime"], }, "units": "cm-3", # should...
<gh_stars>0 #!/usr/bin/env python # # # # Copyright 2012-2014 Ghent University # # This file is part of the tools originally by the HPC team of # Ghent University (http://ugent.be/hpc). # # All rights reserved. # """ Script to check for quota transgressions and notify the offending users. - relies on mmrepquota to get...
&& ./b2 -d 0 toolset=clang cxxflags=\"-std=c++17\" -j {num_cores} install && rm clang && rm clang++""" elif "g++" in self.args.CXX: if "-" in self.args.CXX: gccVer = self.args.CXX[(self.args.CXX.find("-") + 1):] if Utils.isMac(): buildCmd = "cp " + gccJamLoc + " " + gccJamOutLoc + """ && ./bootstrap.sh --with-tool...
<filename>survey/questions/likert_question.py from collections import OrderedDict from itertools import product from typing import Dict, List, Union, Callable, Optional, Tuple from matplotlib.axes import Axes from matplotlib.patches import Patch from mpl_format.axes.axis_utils import new_axes from mpl_format.text.text...
<reponame>wwongkamjan/dipnet_press # ============================================================================== # Copyright 2019 - <NAME> # # NOTICE: 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 ...
'H', 'HN1'], ['HA', 'HA', 'HA', 'HA', 'HA', 'HA', 'HA'], ['HB2', '1HB', '2HB', 'HB1', 'HB2', 'HB2', 'HB2'], ['HB3', '2HB', 'HB2', 'HB2', 'HB1', 'HB1', 'HB3'], ['HD1', 'HD1', 'HND1', 'HD1', 'HD1', 'HD1', 'HD1'], ['HD2', 'HD2', 'HD2', 'HD2', 'HD2', 'HD2', 'HD2'], ['HE1', 'HE1', 'HE1', 'HE1', 'HE1', 'HE1', 'HE1'], ['C'...
for enemy in areaList: (targetPos, speed, impactT) = av.getProjectileInfo(skillId, enemy) daggerTossIval.append(Func(self.throwDagger, av, speed, targetPos, motion_color, startOffset = Vec3(-3, 0, 0), roll = 90)) if av.isLocal(): placeHolder.setPos(camera, 0, 0, 0) else: placeHolder.setPos(av, 0, 0, 0) for i i...
<reponame>aronfothi/mask_cluster_rcnn import numpy as np import torch import torch.nn as nn from mmcv import imresize from mmcv.cnn import kaiming_init, normal_init from mmdet.core import force_fp32, auto_fp16 from ..builder import build_loss from ..registry import HEADS from ..utils import ConvModule from mmdet.core...
' '+ str(t[3]) + ' ' def p_expresion_not_true(t): ' expresion_whereb : expresion_dato IS NOT TRUE' t[0] = ' ' + str(t[1]) + ' '+ str(t[2]) + ' '+ str(t[3]) + ' '+ str(t[4]) + ' ' def p_expresion_false(t): 'expresion_whereb : expresion_dato IS FALSE' t[0] = ' ' + str(t[1]) + ' '+ str(t[2]) + ' '+ str(t[3]) + ' ' ...
# -*- coding: utf-8 -*- from nose.tools import assert_raises_regexp from nose.tools import assert_raises from requests.exceptions import HTTPError from requests.models import Response import random from json import dumps #from django.test.utils import override_settings # from networkapi.equipamento.models import Eq...
1) + 1)/T d2a_alpha_dT2 = a*c0*(c0/Tc - sqrt(T/Tc)*(c0*(sqrt(T/Tc) - 1) - 1)/T)/(2*T) return a_alpha, da_alpha_dT, d2a_alpha_dT2 def a_alpha_pure(self, T): c0 = self.alpha_coeffs[0] Tc, a = self.Tc, self.a return a*Soave_1972_alpha_pure(T, Tc, c0) class Heyen_a_alpha(a_alpha_base): def a_alpha_and_derivatives...
<filename>Django_app/playground/views.py<gh_stars>0 from django.shortcuts import render from django.http import HttpResponse import pandas as pd import altair as alt # Create your views here. # request handler # request -> response def index(request): #htotal_df = pd.read_csv('playground/htotal_df.csv') htotal_df1...
<reponame>gautamkmr/caffe2 # Copyright 2014 Nervana Systems Inc. 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...
to be kept")') self.assertEqual(len(kept_div), 2) self.assertEqual(len(kept_div('span.badge:contains("Removed")')), 0) self.assertEqual(len(kept_div('span.badge:contains("New")')), 0) class ApprovalsTestCase(BaseSubmitTestCase): def test_approvals(self): RoleFactory(name_id='chair', group__acronym='mars', pers...
<gh_stars>1-10 # Copyright 2016 <NAME> # # 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...
'wavelengths', 'ch2']} SET_UVDETECTOR_WAVELENGTHS_CH3 = {'name': 'SET_UVDETECTOR_WAVELENGTHS_CH3', 'method': 'PUT', 'endpoint': '/api/v1/Process', 'type': int, 'check': None, 'path': ['uvDetector', 'wavelengths', 'ch3']} SET_UVDETECTOR_WAVELENGTHS_CH4 = {'name': 'SET_UVDETECTOR_WAVELENGTHS_CH4', 'method': 'PUT', 'end...
""" Copyright (c) 2019 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 or agreed to in writing, soft...
<reponame>luci/recipes-py # Copyright 2016 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import contextlib import inspect from functools import reduce from collections import namedtuple, defaultdict from fut...
import chart_studio.plotly as py import plotly.figure_factory as ff import plotly.graph_objects as go from plotly.subplots import make_subplots import pandas as pd import ast import numpy as np import sys, os, csv sys.path.insert(1, '../data_processing') from load_CA_data import * from county_utilities import * import ...
shit down this does # mx = ahead # mxpos = x_axis[np.where(y_axis[index:index+lookahead]==mx)] # look for min if y > mn+delta and mn != -np.Inf: # Minima peak candidate found # look ahead in signal to ensure that this is a peak and not jitter if y_axis[index:index+lookahead].min() > mn: min_peaks.append([mnpos...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
#cryptobot # requires python 3.8.7 #------------ import csv import config import time from datetime import date from enum import Enum import os import sys from decimal import * import math #Binance from binance.client import Client from binance import exceptions #Discord import requests from discord import Webhook,...
names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _vi...
<reponame>anthony-walker/me499 #!/usr/bin/env python3 # Get the windowing packages from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QGroupBox, QSlider, QLabel, QVBoxLayout, QHBoxLayout, \ QPushButton from PyQt5.QtCore import Qt, QSize from PyQt5.QtGui import QPainter, QBrush, QPen, QFont, QColor from...
for t in range(len(spike_index_new)): # idx = np.in1d(sic[:,0], spike_index_new[t][:,0]) # temp[t] = np.mean(wf[idx],axis=0) # # recompute sim_mat_floats # sim_mat, sim_mat_floats, templates_aligned = calc_local_merge(channel, temp, temp, CONFIG) # # plot final merge table # if plotting: # plot_merge_matrix(...
<reponame>RiccardoGrigoletto/SSM-Pytorch<filename>tools/trainval_net.py # -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by <NAME>, <NAME>, based on code from <NAME> # -----------------------------------------------...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2018, 8minutenergy / Kisensum. # # 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.apa...
<gh_stars>1-10 import os import gc import random import torch import networkx as nx import numpy as np from tqdm import tqdm from models import graph_probe from embed import graph_embeddings, bert_embeddings, get_embeddings from utils import load_data, construct_graph, load_glove, load_elmo, load_elmos ## sub-functio...
self.cursor # substring, line 81 among_var = self.find_among_b(EnglishStemmer.a_3) if among_var == 0: return False self.cursor = self.limit - v_2 if among_var == 1: # (, line 83 # <+, line 83 c = self.cursor self.insert(self.cursor, self.cursor, u"e") self.cursor = c elif among_var == 2: # (, line 86 # [,...
F.lit(c)) data_columns = self._metadata.data_columns metadata = self._metadata.copy( data_columns=(data_columns + [name for name, _ in pairs if name not in data_columns])) return DataFrame(sdf, metadata) def to_excel(self, excel_writer, sheet_name="Sheet1", na_rep="", float_format=None, columns=None, header=Tr...
import numpy as np import torch import sys from utils import * import rbo FLOAT_MIN = -sys.float_info.max class PointWiseFeedForward(torch.nn.Module): def __init__(self, hidden_units, dropout_rate): # wried, why fusion X 2? super(PointWiseFeedForward, self).__init__() self.conv1 = torch.nn.Conv1d(hidden_units, h...
240 and mouseCoord.y <= 290: # open win3 with print functions win3 = GraphWin("Print Functions - QMS", 600, 300) win3.setBackground('purple') # run print menu event handler print_menu() # if click add func button if mouseCoord.x >= 10 and mouseCoord.x <= 160 and mouseCoord.y >= 240 and mouseCoord.y <= 290: #...
3, 2, 2), 188), Sample(False, (2, 1, 2, 3, 3, 1), 189), Sample(False, (2, 1, 2, 3, 3, 2), 190), Sample(False, (2, 1, 2, 3, 4, 1), 191), Sample(False, (2, 1, 2, 3, 4, 2), 192), Sample(True, (2, 2, 1, 1, 1, 1), 193), Sample(True, (2, 2, 1, 1, 1, 2), 194), Sample(True, (2, 2, 1, 1, 2, 1), 195), Sample(True, (2, 2,...
data from server' self.setWindowTitle(title) grid = QGridLayout() self.parent = parent self.exists_folders_label = QLabel('Exists data in server') grid.addWidget(self.exists_folders_label) self.data_folders = data_folders # self.fileListWidget = QGridLayout() self.scrollArea = QScrollArea(self) self.scrollAr...
from __future__ import print_function import collections import functools import os import random import types # for bound new forward function for RoIHeads import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torchvision import torch...
# This module is part of Hypatia and is released under the # MIT license: http://opensource.org/licenses/MIT """Sprites! Tools for animation. Animation sources are GIFs from disk, which have been made into an AnimatedSprite object. Stateful animations which represent objects, e.g., :class:`Walkabout` represent...
'none': roles = None else: _roles = roles.split(' ') roles = [] converter = commands.RoleConverter() for role in _roles: role = await converter.convert(ctx, role) roles.append(role) await ctx.send("How many days should the user have been in the server " "to enter this giveaway?\nIf you don't want to set thi...
when the definition changes lDs = None for i in range(0, len(dProto['base_urls'])): sBaseUrl = dProto['base_urls'][i] if sBaseUrl in self.lBadBase: continue sJoin = '' if sBaseUrl.find('?') == -1: sJoin = "?" else: sJoin = '&' lParams = [] for k in dQuery: if type(dQuery[k]) == s...
<reponame>jake100/Mathics # -*- coding: utf8 -*- from mathics.builtin.base import Builtin from mathics.core.expression import Expression, Integer from mathics.core.convert import from_sympy import sympy import sympy.mpmath as mpmath def sympy_factor(expr_sympy): try: result = sympy.together(expr_sympy) numer, de...
import matplotlib.pyplot as plt from matplotlib.lines import Line2D import scipy.stats as ss import numpy as np import seaborn as sns import pandas as pd import numpy as np import math import argparse import glob from figure_gen_utils import convert_bxd_name from typing import Dict def mutation_comparison( sub_0_cou...
for survey_id:"+str(survey_id)+" and user has no bot_reference!!!") #log that we sent the message surveyQuestionLog = SurveyQuestionLog( user_id=self.id, survey_log_id=survey_log_id, survey_id=survey_id, schedule_id=schedule_id, question_id=None, question_...
tree produced by InputFormParser#OpEquals. def exitOpEquals(self, ctx:InputFormParser.OpEqualsContext): pass # Enter a parse tree produced by InputFormParser#Message. def enterMessage(self, ctx:InputFormParser.MessageContext): pass # Exit a parse tree produced by InputFormParser#Message. def exitMessage(self,...
import os import numpy as np import gzip import pickle from pathlib import Path from proseco.core import StarsTable import pytest from proseco import get_aca_catalog from proseco.characteristics import aca_t_ccd_penalty_limit, MonFunc, MonCoord import agasc from Quaternion import Quat import Ska.Sun from proseco.test...
length is %d. Added %d new variables" % (self.max_xor, self.new_variables)) def add_permutation_constraints(self, m, f): """ Add m parity constraints, begin with rectangular permutation matrix with a single 1 per row and 0 or 1 1's per column, then add 1's with probability f """ self.hash_functions = [] self.ne...
<reponame>joskoanicic/carelle ''' Created on Jan 9, 2011 @author: Mark V Systems Limited (c) Copyright 2011 Mark V Systems Limited, All rights reserved. ''' from arelle import (XPathContext, XbrlConst, XmlUtil, XbrlUtil, XmlValidate) from arelle.FunctionXs import xsString from arelle.ModelObject import ModelObject fro...
<reponame>CaptainE/lcnn # Copyright (C) 2019 <NAME> # # This file is a part of BTS. # This program 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 lat...
<reponame>bunkahle/PILasOPENCV #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np import cv2 try: import gif2numpy gif2numpy_installed = True except: gif2numpy_installed = False try: import numpy2gif numpy2gif_installed = True except: numpy2gif_i...
# -*- coding: utf-8 -*- """ Provides the Client class """ from __future__ import (unicode_literals, print_function, division) import re from os import getpid import uuid import functools import logging import pkgutil from pprint import pformat import qalib.corelibs.system from qalib.client.multipath import Multipath ...
<filename>trees/binary_tree.py from typing import List # These constants are later used to validate a binary search tree NEGATIVE_INFINITY = float('-inf') POSITIVE_INFINITY = float('inf') class _Node: __value: int _left_child = None _right_child = None def __init__(self, value: int): self.__value = value @pr...
<gh_stars>1-10 # coding: utf-8 # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import unicode_literals from six import string_types, text_type from six.moves import xrange as range import copy import nbformat import nbdime.log from ..diff_format ...
<reponame>erkuo521/spidev-3.4<filename>OpenIMU_SPI_seperate_cek.py ''' OpenIMU SPI package version 0.2.0. -pip install spidev3.4, -read package through SPI interface, OpenIMU330BI test on Pi3 board(Raspbian OS,Raspberry 3B+). -Spi slave: OpenIMU 330 EVK -Pins connection: Pi3 330/300 evk miso <==> miso mosi <==> mos...
lines = lines.replace("samples_per_gpu=", "samples_per_gpu=" + str(self.system_dict["params"]["batch_size"])); lines = lines.replace("workers_per_gpu=", "workers_per_gpu=" + str(self.system_dict["params"]["num_workers"])); lines = lines.replace("ann_file=,", "ann_file='" + str(self.system_dict["params"]["train_a...
= "" self.fillcolor = "" self.linewidth = 1 # Detect graph type if maingraph.graph_type == 'digraph': self.directedgraph = True else: self.directedgraph = False except: log.error(helpmsg) sys.exit(1) raise if self.dopreproc: return self.doPreviewPreproc() # Romove annoying square # Todo: Remove squares...
visitColumn_clauses(self, ctx:PlSqlParser.Column_clausesContext): return self.visitChildren(ctx) # Visit a parse tree produced by PlSqlParser#modify_collection_retrieval. def visitModify_collection_retrieval(self, ctx:PlSqlParser.Modify_collection_retrievalContext): return self.visitChildren(ctx) # Visit a par...