text
stringlengths
2
999k
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
from pyautomata.core.parser import AutomataParser, WordFileParser from pyautomata.core.automata import Automata from pyautomata.core.minimization import MinimizedAutomata from pyautomata.gui.automata_gui import AutomataGUI
from sqlalchemy import Column, Integer, String, orm import random from Model.util import log_message from Model.ChromeModel.SQLite.base import * NAME = "Name" VALUE = "Wert" KEYWORD = "Schlüsselwort" CREATEDAT = "Erstellt am" LASTMODIFIED = "Zuletzt geändert" LASTVISITED = "Zuletzt besucht" LASTUSED = "Zuletzt benutz...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
from .complete_karmarkar_karp import complete_karmarkar_karp from .greedy import complete_greedy, greedy from .karmarkar_karp import karmarkar_karp __version__ = "0.0.2" __all__ = ["complete_greedy", "greedy", "karmarkar_karp", "complete_karmarkar_karp"]
from typing import List, Tuple def n31(a: int) -> Tuple[List[int], int]: """ Returns the Collatz sequence and its length of any positive integer. >>> n31(4) ([4, 2, 1], 3) """ if not isinstance(a, int): raise TypeError("Must be int, not {}".format(type(a).__name__)) if a < 1: ...
import sympy import catamount from catamount.api import utils from catamount.tests.utils.helpers import * def softmax(name, out_shape, input, axis=1): output = pointwise('{}/exp'.format(name), catamount.ExpOp, out_shape, input) reduce_shape = [out_shape[1 - axis]] reduced = reduce('{}/reduce'.format(nam...
#!/usr/bin/env python # encoding: utf-8 """ palindrome_partition.py Created by Shengwei on 2014-07-02. """ # https://oj.leetcode.com/problems/palindrome-partitioning/ # tags: medium, string, dp, palindrome, dfs """ Given a string s, partition s such that every substring of the partition is a palindrome. Return all ...
def most_frequent(data: list) -> str: """ determines the most frequently occurring string in the sequence. """ # your code here d = dict(zip(list(set(data)), map(data.count, list(set(data))))) return sorted(d, key=lambda x:d[x])[-1] if __name__ == '__main__': #These "asserts" using only...
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
#!/usr/bin/env python3 """ Map tiler PGE wrapper to generate map tiles following the OSGeo Tile Map Service Specification. """ import os, sys, traceback, logging, argparse from subprocess import check_call from get_clims import get_clims log_format = "[%(asctime)s: %(levelname)s/%(funcName)s] %(message)s" logging....
from .model import * from .priors import * from .decoders import * from .posteriors import *
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python # coding=utf-8 """ @author: Jiawei Wu @create time: 2020-04-06 15:36 @edit time: 2020-04-06 15:37 @FilePath: /vvlab/utils/OUProcess.py @desc: """ import numpy as np class OUProcess(object): """Ornstein-Uhlenbeck process""" def __init__(self, x_size, mu=0, theta=0.15, sigma=0.3): ...
#!/usr/bin/env python import unittest import json from app import create_app from app import db from app.api_1_0.mail.models import Mail from app.api_1_0.event.models import Event from app.api_1_0.mail_dispatcher.worker import process_message from app.api_1_0.mail_dispatcher import service_registry, get_mail_service fr...
# 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 # # Unless required by applicab...
import torch import numpy as np import pandas as pd from torch.nn import * from torch.optim import * from help_funcs import * from model import * from sklearn.preprocessing import ( StandardScaler, RobustScaler, MinMaxScaler, MaxAbsScaler, OneHotEncoder, LabelEncoder, Normalizer, ) data = p...
from typing import List import k2 import torch from icefall.lexicon import Lexicon class CtcTrainingGraphCompiler(object): def __init__( self, lexicon: Lexicon, device: torch.device, oov: str = "<UNK>", ): """ Args: lexicon: It is built from `data/lang/lexicon.t...
_base_ = [ '../_base_/models/faster_rcnn_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( rpn_head=dict( anchor_generator=dict( type='AnchorGenerator', scales=[8], ratios...
#!/usr/bin/env python import sys def convert_tour_to_txt(in_tour, in_cntREs, out_txt): print("Loading countREs") cnt_RE_db = {} with open(in_cntREs, 'r') as fin: for line in fin: if line[0] == '#': header = line else: data = line.strip().split() cnt_RE_db[data[0]] = line print("Converting") ...
from sngan_projection.generate import Generator
from unittest.mock import MagicMock from cloudwanderer.aws_interface import CloudWandererAWSInterface def test_get_resources_requires_load(): mock_session = MagicMock( **{ "available_services": ["test_service"], "enabled_regions": ["test-region"], "account_id": "111111...
import numpy as np def get_label_anno(label_path): annotations = {} annotations.update({ 'name': [], 'dimensions': [], 'location': [], 'rotation_y': [] }) with open(label_path, 'r') as f: lines = f.readlines() content = [line.strip().split(' ') for line i...
# 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 ...
# See http://wiki.micasaverde.com/index.php/Luup_Requests import requests, json from hub import BaseDevice, DeviceException class Device(BaseDevice): def configure(self, **config): super().configure(**config) self.address = config.get('address') if self.address is None: ...
"""This example demonstrates how to connect to a Binho host adapter and configure Nova to automatically toggle the CS pin for precise/optimal timing of SPI transactions.""" import sys # import the binho library from binho import binhoHostAdapter # These imports help us handle errors gracefully import errno from seri...
from panda3d.core import * import Playground from direct.task.Task import Task import random from direct.fsm import ClassicFSM, State from direct.actor import Actor from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal from toontown.hood import Place class DDPlayground(Playgr...
import numpy as np import tensorflow as tf def masked_mse_tf(preds, labels, null_val=np.nan): """ Accuracy with masking. :param preds: :param labels: :param null_val: :return: """ if np.isnan(null_val): mask = ~tf.is_nan(labels) else: mask = tf.not_equal(labels, nul...
""" Official evaluation script for v1.1 of the SQuAD dataset. """ from __future__ import print_function from collections import Counter import string import re import argparse import json import sys def normalize_answer(s): """Lower text and remove punctuation, articles and extra whitespace.""" def remove_art...
# Copyright (C) 2013-2014 # Sean Poyser (seanpoyser@gmail.com) # # 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 2, or (at your option) # any later version. # # ...
''' Main - runs methods (operations) for a given task (Flow) ''' import numpy as np import pandas as pd import os import re import json import requests import argparse import datetime from py import * if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--flowname', help='Job n...
""" Type definitions for type checking purposes. """ import ssl from http.cookiejar import CookieJar from typing import ( IO, TYPE_CHECKING, AsyncIterable, AsyncIterator, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Tuple, Union, ) if T...
from threeML.utils.interval import Interval, IntervalSet from threeML.io.rich_display import display import collections import pandas as pd class TimeInterval(Interval): def __add__(self, number): """ Return a new time interval equal to the original time interval shifted to the right by number ...
import mcpi.minecraft as minecraft mc = minecraft.Minecraft.create() mc.postToChat("/weather rain")
""" Project: Jinja2-ExploitMe File: app.py --- Launch w/ Live Reload: export FLASK_ENV=development; flask run """ import os from flask import Flask, render_template, render_template_string, request from jinja2.exceptions import TemplateSyntaxError app = Flask(__name__) @app.route("/") def index(): """ This...
#! /usr/bin/env python ################################################################################ # # Script intended to reweight events generated using aMC@LO and # already reweighted to include the virtual corrections (without an # overall alpha_s/2pi) with the corresponding Resummation # contributions. No sec...
"""Utility functions for two- and three-dimensional vectors.""" __all__ = [ "get_norm", "quaternion_mult", "quaternion_from_angle_axis", "angle_axis_from_quaternion", "quaternion_conjugate", "rotate_vector", "thick_diagonal", "rotation_matrix", "rotation_about_z", "z_to_vector",...
# Generated by Django 3.1.7 on 2021-02-27 01:53 from django.db import migrations, models import recipe.models class Migration(migrations.Migration): dependencies = [ ('recipe', '0004_auto_20210225_0443'), ] operations = [ migrations.AddField( model_name='recipe', ...
""" Module for applying conditional formatting to DataFrames and Series. """ from collections import defaultdict from contextlib import contextmanager import copy from functools import partial from itertools import product from typing import ( Any, Callable, DefaultDict, Dict, List, Optional, ...
"""Modified from the great implementation in https://github.com/3springs/attentive-neural-processes/blob/af431a267bad309b2d5698f25551986e2c4e7815/neural_processes/modules/modules.py """ from torch import nn from torch import Tensor import torch.nn.functional as F class MCDropout(nn.Dropout): def forward(self, ...
from marshmallow import fields from marshmallow.schema import Schema class SwitchStatusSchema(Schema): id = fields.Raw(metadata=dict(description='Device unique ID')) name = fields.String(required=True, metadata=dict(description='Device name')) on = fields.Boolean(required=True, metadata=dict(description='...
#!/Users/sahabt/PycharmProjects/RobotAppiumProject/venv/bin/python # $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing LaTeX. """ try: import ...
from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render from django.urls import reverse from django.views import View from django.views.generic.base import RedirectView from .forms import HuntForm from .models import Hunt f...
"""Test RFlink serial low level and packet parsing protocol.""" from unittest.mock import Mock import pytest from rflink.protocol import EventHandling, PacketHandling COMPLETE_PACKET = b"20;E0;NewKaku;ID=cac142;SWITCH=1;CMD=ALLOFF;\r\n" INCOMPLETE_PART1 = b"20;E0;NewKaku;ID=cac" INCOMPLETE_PART2 = b"142;SWITCH=1;CM...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import GasbitTestFramework from test_framework.util import * class SignRa...
# Copyright (c) OpenMMLab. All rights reserved. import copy import math import warnings from typing import Sequence import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import (Linear, build_activation_layer, build_conv_layer, build_norm_layer) from mmcv.runner.base_m...
#!/usr/bin/env python """GRR authorization manager.""" import collections import logging import yaml from grr.lib.authorization import groups class Error(Exception): """Base class for auth manager exception.""" class InvalidAuthorization(Error): """Used when an invalid authorization is defined.""" class In...
import argparse import glob import json import logging import os import pickle import sys import time import numpy as np import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.utils import torchvision.datasets as dset from torch.autograd import Variable from nasbench_analysis import eval...
import random import numpy as np from audiomentations.core.transforms_interface import BaseSpectrogramTransform class SpecFrequencyMask(BaseSpectrogramTransform): """ Mask a set of frequencies in a spectrogram, à la Google AI SpecAugment. This type of data augmentation has proved to make speech recognit...
#!/usr/bin/python3 # ***************************************************************************** # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ...
# Copyright 2019 The Johns Hopkins University # # 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 agr...
"""Based somewhat on pandas accessor testing. https://github.com/pandas-dev/pandas/blob/master/pandas/tests/strings/test_strings.py https://github.com/pandas-dev/pandas/blob/master/pandas/tests/strings/test_api.py https://github.com/pandas-dev/pandas/blob/master/pandas/tests/series/accessors/test_str_accessor.py https...
import time import sys import re from goodreads import client from goodreads import group from goodreads import session from goodreads import user gc = client.GoodreadsClient('nTRaECtlyOjSmjJnLKRaiw', 'hCXp9GKlAe3sk1QIj0jXLF4UGLt9vfj54hDAfzHY') #gc.authenticate('nrdWjPAm8ZvH33eDncxHcHz2VXhdiXng', 'k_CkrFrrffJZGgFoggmdd...
# coding: utf-8 """Export related test cases.""" from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.utils.encoding import force_text from modoboa.lib.tests import ModoTestCase from .. import factories from .. import models class ExportTestCase(ModoTestCase): """T...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
#!/usr/bin/env python ''' Utilities for site regeneration. ''' import os import re import yaml # Template for metadata. STANDARD_YML = 'standard_config.yml' # Standard name for metadata files. CONFIG_YML = '_config.yml' # Patterns used to extract content and excerpts from compiled blog # entries. Using regular exp...
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. 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 ...
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs): super(TokenValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
''' Copyright (c) 2019 Boshen Zhang Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. 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 t...
''' Dictionary A dictionary is a collection of key value pairs. The values can be changed (mutable) The values have unique keys. Using the constructor method # 29 Built-in dictionary Methods Method Description get() Returns the value o ''' mycar = { "brand": "R...
# Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd 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. # # ycmd is di...
import os import time print('Por favor, digite abaixo os valores da equação.') a = str(input('\nValor de A: ')) b = str(input('Valor de B: ')) c = str(input('Valor de C: ')) print('\nAguarde um instante...') time.sleep(1) os.system('cls || clear') print('='*50 + '\n' + f'{"Resolução":^50}' + '\n' + '='...
# 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, software # distributed under t...
#!/usr/bin/env python import argparse import fileinput import os import os.path import re import subprocess import sys EXCLUDED_PREFIXES = ("./generated/", "./thirdparty/", "./build", "./.git/", "./bazel-", "./bazel/external", "./.cache") SUFFIXES = (".cc", ".h", "BUILD", ".md", ".rst") DOCS_SUFF...
from jd.api.base import RestApi class KeplerXuanpinSearchSkuRequest(RestApi): def __init__(self,domain='gw.api.360buy.com',port=80): RestApi.__init__(self,domain, port) self.queryParam = None self.pageParam = None self.orderField = None def getapiname(self): return 'jd.kepler.xuanpin.search.sku' ...
BASE_URL = 'https://trade.dough.com/api'
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayCommerceEducateFacefeatureReportUploadResponse(AlipayResponse): def __init__(self): super(AlipayCommerceEducateFacefeatureReportUploadResponse, self).__init__() ...
# Authors: Robert Luke <mail@robertluke.net> # # License: BSD (3-clause) import numpy as np from mne import pick_types from mne.io import BaseRaw from mne.utils import _validate_type, verbose from mne.preprocessing.nirs import (_channel_frequencies, _check_channels_ordered) from mn...
from collections import Mapping, Hashable from itertools import chain import six from pyrsistent._pvector import pvector from pyrsistent._transformations import transform class PMap(object): """ Persistent map/dict. Tries to follow the same naming conventions as the built in dict where feasible. Do not i...
import os import json import uuid import copy import pprint import re import logging import testconstants import time import traceback import collections from subprocess import Popen, PIPE from remote.remote_util import RemoteMachineShellConnection from couchbase_helper.tuq_generators import JsonGenerator from basetest...
import os import sys def wrapper(content): return """ platform :ios, '9.0' inhibit_all_warnings! use_frameworks! plugin "cocoapods-binary" target 'Binary' do %s end """ % content def save_to_podfile(text): path = os.path.dirname(os.path.abspath(__file__)) path += "/Podfile" file = open(path, "w+"...
from able import BluetoothDispatcher, GATT_SUCCESS from time import time class BLE(BluetoothDispatcher): device = characteristic = None rssi = 0 def __init__(self, characteristics_uuid=None, device_name="ESP32 LoRa Gateway", queue_timeout=0.5, enable_ble_code=0xab1e): super().__i...
#!/usr/bin/env python import urllib import json import os import re from flask import Flask from flask import request from flask import make_response # Flask app should start in global layout app = Flask(__name__) @app.route('/webhook', methods=['POST']) def webhook(): req = request.get_json(silent=True, force...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('room_feature', '0001_initial'), ('room', '0005_room_position'), ] operations = [ migrations.AddField( mo...
import pymysql class SteadyDBError(Exception): pass class InvalidCursor(SteadyDBError): pass class Connection: def __init__(self, set_session=None, ping=1, *args, **kwargs): self._work_con = None self._closed = True self._transaction = False self._set_session_sql = set...
import os import csv import shutil from annogesiclib.gff3 import Gff3Parser from annogesiclib.helper import Helper def read_gff(gff_file, type_): cdss = [] g_h = open(gff_file) for entry in Gff3Parser().entries(g_h): if (Helper().feature_without_notgene(entry)): if (type_ == "riboswitc...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-12-11 23:57 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial =...
# Python integration test for the AdminAPI: # # General test to cover the AdminAPI commands in "happy path" scenarios # # TODOS: # # - Use raw_sandboxes # - Extend testutils.start_sandbox() to allow passing the myCnf path # dba.check_instance_configuration(): # # 1. Test dba.check_instance_configuration() for an insta...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('donation', '0075_donation_component_view'), ] operations = [ migrations.AddField( model_name='banktransaction', ...
from django import forms from django.db.models import fields from .models import ContactUs, Spaces class ContactUsForm(forms.ModelForm): class Meta: model = ContactUs fields = '__all__' class RegisterSpaceForm(forms.ModelForm): class Meta: model = Spaces fields = ('name', 'description', 'cap...
# module expint import numpy as np import scipy.linalg as la ########################## # Matrix functions using scipy.linalg.funm # Special care is given to small arguments for numerical stability (e.g. # expm1 instead of exp and using leading order Taylor expansion when x # is smaller than some threshold). # Alter...
# from JumpScale import j # from InstallTools import InstallTools # class Empty(): # pass # j.system.installtools=InstallTools()
import os import uvicorn if __name__ == '__main__': port = os.environ.get('PORT', 5000) uvicorn.run('superres_api.main:app', host='0.0.0.0', port=port)
# 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 ...
# (C) Copyright 2014, Google Inc. # (C) Copyright 2018, James R Barlow # 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 applicab...
def do(): print("hi")
import spacy from spacy_wordnet.wordnet_annotator import WordnetAnnotator if __name__ == '__main__': import nltk nltk.download('wordnet') # Load an spacy model (supported models are "es" and "en") nlp = spacy.load('en') nlp.add_pipe("spacy_wordnet", after='tagger') token = nlp('prices')[0] ...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2021 Edgewall Software # Copyright (C) 2004 Francois Harvey <fharvey@securiweb.net> # Copyright (C) 2005 Matthew Good <trac@matt-good.net> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of thi...
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from MorseFlask.user.models import User class LoginForm(Form): """Login form.""" username = StringField('Username', validators=[DataRequired()]) ...
''' Contains the main template of the experiment 1. Get options 2. Load the appropriate dataloader (in the correct mode -> training/testing/validation etc. dpending upon the options) 3. Load the appropriate model (depending upon the options) 4. Run the model in the mode specified This one script takes...
import matplotlib.pyplot as plt import matplotlib.axes as ax class BERT: def __init__(self): self.lines = [] self.tap_weights = [] self.FEC_codes = [] def add_point(self, pre_FEC_BER, post_FEC_BER, tap_weights , FEC_code): added = False ...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import numbers def is_integral(x): """Any integer value""" try: return isinstance(i...
print("Hello Github!")
from vnpy.event import Event, EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtCore, QtGui, QtWidgets from vnpy.trader.ui.widget import ( BaseCell, EnumCell, MsgCell, TimeCell, BaseMonitor ) from ..base import ( APP_NAME, EVENT_CTA_LOG, EVENT_CTA_STOPORD...
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
import logging import requests from django.conf import settings from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.models import User from django.urls import reverse as django_reverse from django.db import transaction from django.utils.translation import ugettex...
""" This file offers the methods to automatically retrieve the graph Desulfurispirillum indicum. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--pro...