text
stringlengths
3.07k
12.6k
from ctypes import windll, c_void_p, POINTER, c_size_t, Structure, c_uint64, c_uint32, sizeof, c_wchar, c_wchar_p, byref from ctypes.wintypes import DWORD from pprint import pprint from inc.errors import GWErrors from inc.system_info import GWSystemInfo class MEMORY_BASIC_INFORMATION(Structure): """https://msdn...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry import logging import configparser import time import json import concurrent.futures logger = logging.getLogger(__name__) config = configparser.ConfigParser() config.read('config.ini') crxcavator_api = c...
# ================================================================= # Copyright (C) 2021-2021 52°North Spatial Information Research GmbH # # 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 # h...
import os from torch import nn from torch import optim from robustcode.models.modules.neural_model_base import NeuralModelBase from robustcode.models.robust.adversary.adversary import AdversarialMode from robustcode.models.robust.adversary.adversary import AdversaryAccuracyStats from robustcode.models.robust.adversar...
import numpy as np from netCDF4 import Dataset from datetime import datetime from datetime import timedelta import os import sys TOP = "/data_ballantine02/miyoshi-t/honda/SCALE-LETKF/BAIU2018_5.3.6" stime = datetime( 2018, 6, 30, 0, 0, 0 ) vtime = datetime( 2018, 7, 6, 0, 0, 0 ) adt = timedelta( hours=24 ) m = 1 ...
''' TShock, a server mod for Terraria Copyright (C) 2011-2016 <NAME> (fka. The TShock Team) 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 la...
# -*- coding: utf-8 -*- """ Created on Tue Jan 8 14:45:56 2019 @author: Xuan-Laptop """ import pandas as pd import numpy as np from utils import np_macro_f1, encoding from sklearn.linear_model import LinearRegression, LogisticRegression import warnings warnings.filterwarnings("ignore") def calibration...
"""Provides utilities for creating and working with Databases in ESPEI """ import logging from typing import Dict, Union import sympy from pycalphad import Database, variables as v import espei.refdata from espei.utils import extract_aliases _log = logging.getLogger(__name__) def _get_ser_data(element, ref_state, fa...
"""Generate constants files from the Unicorn headers. This is heavily borrowed from the script in the Unicorn source repo, except modified to work with an installed library rather than from the source code. The headers must be present, but that's all that's required. """ import ast import collections import datetime ...
import re import sys class BColors: def __init__(self): pass # FOREGROUND BLACK = '\033[30m' RED = '\033[31m' GREEN = '\033[32m' YELLOW = '\033[33m' BLUE = '\033[34m' MAGENTA = '\033[35m' CYAN = '\033[36m' WHITE = '\033[37m' RESET = '\033[39m' # SPECIAL HEADER = '\0...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
"""Main application class and user interface helper routines for 'git-cvs'.""" import os.path import re from cvsgit.cmd import Cmd from cvsgit.error import Error from cvsgit.git import Git from cvsgit.cvs import CVS from cvsgit.meta import MetaDb from cvsgit.i18n import _ from cvsgit.term import Progress class Comma...
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2014 California Institute of Technology. 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 th...
import logging from typing import Dict, List, Optional from src.consensus.blockchain import Blockchain from src.consensus.sub_block_record import SubBlockRecord from src.full_node.block_store import BlockStore from src.types.full_block import FullBlock from src.types.header_block import HeaderBlock from src.types.size...
# Copyright 2021 Sony Group 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 ...
from unittest.mock import Mock, PropertyMock, MagicMock, patch import numpy as np import gym_connect4 from test_fixtures import Connect4Task import regym from regym.environments import EnvType from regym.rl_algorithms import build_MCTS_Agent from regym.rl_algorithms.agents import Agent, build_Deterministic_Agent, De...
#!/usr/bin/python import RPi.GPIO as GPIO class MAX31855(object): '''Python driver for [MAX38155 Cold-Junction Compensated Thermocouple-to-Digital Converter](http://www.maximintegrated.com/datasheet/index.mvp/id/7273) Requires: - The [GPIO Library](https://code.google.com/p/raspberry-gpio-python/) (Alrea...
# Copyright 2016-2017 Open Source Robotics Foundation, 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 applicabl...
# coding=UTF-8 # python version=3.5 import socket import sys import time import threading class ServerSocket(object): conn = None addr = None mesStr = [] recv = '' name = 'a' threadLock1 = threading.Lock() """docstring for ServerSocket""" def __init__(self): super(ServerSocke...
# Copyright (c) 2016 PaddlePaddle 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 required by applic...
import torch import unittest import numpy as np from torch.autograd import Variable from losses.svm import SmoothTop1SVM, SmoothTopkSVM, MaxTop1SVM, MaxTopkSVM from losses.functional import Topk_Smooth_SVM from tests.utils import assert_all_close, V from tests.py_ref import svm_topk_smooth_py_1, svm_topk_smooth_py_2,\...
from itertools import zip_longest from typing import List, Union from bytepatches.ops import Opcode, sync_ops, LOAD_FAST, STORE_FAST, JumpOp, LOAD_NAME, STORE_NAME from bytepatches.parser import Parser from bytepatches.utils import patch_function, make_bytecode class OpNotFound(Exception): pass def change_ops(...
import numpy as np from scipy.sparse import csc_matrix, save_npz, hstack import time import argparse import gzip from pysam import VariantFile, TabixFile import json import os import itertools parser = argparse.ArgumentParser(description='Pull genotypes.') parser.add_argument('vcf_file', type=str, help='VCF file to p...
"""Support for Xiaomi Mi Flora BLE plant sensor.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv from homeassistant.const import ( ...
''' Defines the preferences dialog. @author: <NAME> @organization: Mozilla Foundation @copyright: Copyright (c) 2006, 2007 Mozilla Foundation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, and is avail...
import pickle import time class Cache(object): def __init__(self, j): self._cache = {} self._j = j # def serialize(self, val): # tt = self._j.data.types.type_detect(val) def get(self, id="main", reset=False, expiration=3600): """ @param id is a unique id for the c...
import os import pymel.core as pm import crab # ------------------------------------------------------------------------------ def get_icon(name): return os.path.join( os.path.dirname(__file__), 'icons', '%s.png' % name, ) # ---------------------------------------------------------...
# Copyright 2019 IBM 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, ...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-12-03 14:35 import logging from typing import Union, List, Dict, Any, Iterable, Callable, Set import torch from hanlp_trie import DictInterface from torch.utils.data import DataLoader from elit.common.dataset import SamplerBuilder, PadSequenceDataLoader from elit.c...
#!/usr/bin/env python # coding: utf-8 # In[1]: #Libraries import cv2 import numpy as np import pyautogui import keyboard # In[2]: #Color to detect BGR l = [17, 15, 100] #lower u = [80, 76, 220] #upper # In[3]: #region coordinates k_left, k_top, k_right, k_bottom = 640, 30, 440, 130 h_left, h_top, h_right, h...
# Copyright 2019 StreamSets 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 writi...
# Copyright (c) 2013 <NAME> <<EMAIL>> # Copyright (c) 2013, 2014 <NAME> <<EMAIL>> # # 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 rig...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
from tools.profilers.net_flops import net_flops import matplotlib.pyplot as plt import tensorflow as tf # define nodeType Leaf node, distinguish node, definition of arrow type decisionNode = dict(boxstyle="sawtooth", fc="0.8") leafNode = dict(boxstyle="round4", fc="0.8") arrow_args = dict(arrowstyle="<-") def get_l...
from abc import abstractmethod from sqlalchemy.orm import Session, aliased, selectinload from sqlalchemy.orm.exc import NoResultFound from domainmodel.movie import Movie from domainmodel.director import Director from domainmodel.actor import Actor from domainmodel.genre import Genre from domainmodel.orm import movie_...
import socket from flask import Flask, Response from PIL import Image, ImageDraw import threading from collections import deque import struct import io HOST = '0.0.0.0' PORT = 54321 image_bytes_length = 640*480*3 bbox_bytes_length = 5*8 # The socket client sends one bounding box and score. data_bytes_length = image_...
import numpy as np import scipy.stats as stats import scipy.special as spec import util class HMCParams: def __init__(self, tau, tau_g, L, eta, mass, r_clip, grad_clip): self.tau = tau self.tau_g = tau_g self.L = L self.eta = eta self.mass = mass self.r_clip = r_...
# Copyright 2015 Ufora 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 i...
import time from .minesweeper import * # utility / debugging code def parse_api_payload(payload): if 'board' in payload: rules, mine_p = read_board(payload['board'], payload['total_mines'], everything_mode=True) else: rules = [Rule(r['num_mines'], r['cells']) for r in payload['rules']] try: mine_p = paylo...
import requests import json import csv import time import os import scrape from datetime import datetime # A dict of numerical location codes used by the bandcamp API. LOCATION_CODES = {'novascotia': 6091530, 'ottawa': 6094817, 'pei': 6113358, 'newbrunswick': 6087430, 'saskatchewan': 6141242, 'newfoundland': 63549...
#!/usr/bin/env python3.7 # # Please note that the following code is a demo. Edge cases and error # checking are intentionally omitted where they might otherwise distract # us from the core ideas. # "Before we can understand how something can go wrong, we must # learn how it can go right." print('Example from...
""" Description taken from official website: https://datasets.kensho.com/datasets/spgispeech SPGISpeech consists of 5,000 hours of recorded company earnings calls and their respective transcriptions. The original calls were split into slices ranging from 5 to 15 seconds in length to allow easy training for speech rec...
#!/usr/bin/python # export PYTHONPATH=/home/lukas/anaconda3/envs/detectron/bin/python # import some common libraries from genericpath import isdir import numpy as np import os import json import cv2 import time import csv import detectron2 from detectron2 import model_zoo from detectron2.engine import DefaultPredicto...
''' # something wrong with the logging/the way to write as a ''' import os import re import time import numpy as np import matplotlib.pyplot as plt import argparse # original settings ... parser = argparse.ArgumentParser() parser.add_argument('--file_name', type = str, default = 0, help = 'The name of txt log fil...
""" A :class:`~glue.core.subset_group.SubsetGroup` unites a group of :class:`~glue.core.subset.Subset` instances together with a consistent state, label, and style. While subsets are internally associated with particular datasets, it's confusing for the user to juggle multiple similar or identical subsets, applied to ...
from argparse import ArgumentParser import pytorch_lightning as pl import torch from torch.nn import functional as F from pl_bolts.models.gans.basic.components import Discriminator, Generator class GAN(pl.LightningModule): """ Vanilla GAN implementation. Example:: from pl_bolts.models.gan impo...
import sys import numpy as np from matplotlib import pyplot from matplotlib.animation import FuncAnimation import matplotlib as mpl sys.path.append('..') from submission import SubmissionBase def displayData(X, example_width=None, figsize=(10, 10)): """ Displays 2D data in a nice grid. Parameters --...
import random from peewee import * db = SqliteDatabase('pd_test.db') class Current(Model): season = IntegerField(default=1) week = IntegerField(default=1) packlimit = IntegerField(default=8) class Meta: database = db class Rarity(Model): value = IntegerField() name...
import logging import math import gym from gym import spaces from gym.utils import seeding import numpy as np import sys import math class ClassifyEnv(gym.Env): def __init__(self, trainSet, target): """ Data set is a tuple of [0] input data: [nSamples x nInputs] [1] labels: [nSamples x 1] ...
# TODO: Move this module as a shared functionality to badger utils lib import logging import requests import traceback from decimal import Decimal from hexbytes import HexBytes from typing import Dict from web3 import contract from web3 import exceptions from web3 import Web3 from config.constants import GAS_LIMITS f...
# Copyright 2022 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...
# Copyright (c) Microsoft 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 wri...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Standard lib imports import os import sys from glob import glob import subprocess import hashlib from collections import OrderedDict import argparse import sys # Generic third party imports import yaml __version__ = "0.0.1" __name__ = "build_all_singularity" __descrip...
import praw, time, pandas as pd, json, threading from nltk.sentiment.vader import SentimentIntensityAnalyzer from praw.models import Submission from typing import Dict, List, Tuple from timeit import default_timer as timer from dotenv import load_dotenv, dotenv_values from config.symbols import us, blacklist from conf...
# generate_javascript_layers.py # Script that generates a javascript file named layers.js # This is done via a list of hardcoded layers to translate into the correct format # The file thus generated is then served to clients to be used by the javascript interface, # allowing easier maintenance of the software # Built-...
from helpers import * from shutil import copyfile import json def register_in_lz4_and_copy_xpi(addon_info, dir_of_xpi): PATH_TO_XPI = join(dir_of_xpi, construct_xpi_filename( addon_info["name"], addon_info["version"])) # Initialize dictionary: object_out = {} out_json_filename = os.path.splite...
""" Copyright 2009 <NAME> and Point2 Technologies Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ...
""" Evaluate a musical composition represented as a `Piece` instance. Author: <NAME> """ from collections import Counter from typing import Any, Callable, Dict, Optional import numpy as np from scipy.stats import entropy from rlmusician.environment.piece import Piece from rlmusician.utils import rolling_aggregate ...
# flake8: noqa # Test cases taken from: # - Thomas Ho Company LTD: financial models, # http://www.thomasho.com/mainpages/analysoln.asp # - Analysis of Derivatives for the Chartered Financial Analyst® Program, # <NAME>, PhD, CFA, ©2003 CFA Institute import types import numpy as np import pandas as pd from pyfina...
import numpy as np from numpy.linalg import lstsq from numpy.testing import (assert_allclose, assert_equal, assert_, run_module_suite, assert_raises) from scipy.sparse import rand from scipy.sparse.linalg import aslinearoperator from scipy.optimize import lsq_linear A = np.array([ [0.17...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import abc import os import random import pandas as pd import pytest from pandas.util.testing import assert_frame_equal from pytest import fixture import targets import targets.errors import targets.pipes from dbnd.testing.helpers_pyte...
# 1. The format_address function separates out parts of the address string # into new strings: house_number and street_name, and returns: "house # number X on street named Y". The format of the input string is: numeric # house number, followed by the street name which may contain numbers, # but never by the...
#! usr/bin/python3 # -*- coding: utf-8 -*- # # Flicket - copyright <NAME>: <EMAIL> from datetime import datetime from flask import redirect from flask import request from flask import make_response from flask import render_template from flask import Response from flask import url_for from flask_babel import gettext f...
import codecs import itertools import pytest import time import uuid from eth_utils import ( is_integer, to_tuple, ) from client_sdk_python import Web3 from client_sdk_python.middleware import ( # noqa: F401 construct_error_generator_middleware, construct_latest_block_based_cache_middleware, cons...
# Copyright 2017 Mycroft AI 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 writin...
""" MODEL DRIVEN REGISTRATION for iBEAt study: quantitative renal MRI @<NAME> 2021 Test script for T1 sequence using Model driven registration Library """ import sys import glob import os import numpy as np import itk import SimpleITK as sitk import pydicom from pathlib import Path import time from PIL import Image im...
from help_modules import * from motor_control import * import pyaudio import wave import numpy as np import time import matplotlib.pyplot as plt import speech_recognition as sr from scipy import signal import math import threading import multiprocessing as ms import os import cv2 from nanpy import (ArduinoApi, SerialMa...
from argparse import Namespace from typing import List, Union from yawast.external.spinner import Spinner from yawast.reporting import reporter from yawast.reporting.enums import Vulnerabilities from yawast.reporting.issue import Issue from yawast.scanner.plugins.evidence import Evidence from yawast.scanner.plugins.ht...
"""ATBDs endpoint.""" import datetime from typing import List from sqlalchemy import exc from app.crud.atbds import crud_atbds from app.db.db_session import DbSession, get_db_session from app.permissions import check_atbd_permissions, filter_atbd_versions from app.schemas import atbds, users from app.search.elasticse...
# -*- coding: utf-8 -*- """ A pure implementation of the Monte Carlo Tree Search (MCTS) @author: <NAME> """ import numpy as np import copy from operator import itemgetter def rollout_policy_fn(board): """rollout_policy_fn -- a coarse, fast version of policy_fn used in the rollout phase.""" # rollout randomly...
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # <NAME> <<EMAIL>> # # Copyright (C) 2012-2014 Idiap Research Institute, Martigny, Switzerland # # 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 Foundat...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import numpy import sys import subprocess import platform import shutil import distutils.spawn from setuptools import setup, Extension from setuptools.command.sdist import sdist from distutils.command.build_ext import build_ext # some paranoia to start with # ...
# -*- coding: utf-8; -*- # # @file base.py # @brief coll-gate permission REST API # @author <NAME> (INRA UMR1095) # @date 2016-09-01 # @copyright Copyright (c) 2016 INRA/CIRAD # @license MIT (see LICENSE file) # @details import operator from django.contrib.auth.models import Permission, User, Group from django.contr...
#!/usr/bin/env python """Generate JA3 fingerprints from PCAPs using Python.""" import argparse import dpkt import json import socket import struct import os from hashlib import md5 __author__ = "<NAME>" __copyright__ = "Copyright (c) 2017, salesforce.com, inc." __credits__ = ["<NAME>", "<NAME>", "<NAME>"] __license__...
import itertools import math import random from functools import partial from strong_graphs.output import output from strong_graphs.data_structure import Network from strong_graphs.negative import ( nb_neg_arcs, nb_neg_loop_arcs, nb_neg_tree_arcs, ) from strong_graphs.arc_generators import ( gen_tree_ar...
import pandas as pd import seaborn as sns import numpy as np from skforecast.ForecasterAutoreg import ForecasterAutoreg from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom from skforecast.ForecasterAutoregMultiOutput import ForecasterAutoregMultiOutput from skforecast.model_selection import gri...
import arrow import timeblocks def get_all_busy(service,calendars,begin_date,end_date,begin_time,end_time): """ @brief creates a list of busy times using events from a set of given calendars @param service: Google 'service' object @param calendars (dict): a list of calendars @param ...
import pathlib import shutil import tokenize import sys import sysconfig from typing import Optional, Tuple from pegen.c_generator import CParserGenerator from pegen.grammar import Grammar from pegen.grammar_parser import GeneratedParser as GrammarParser from pegen.parser import Parser from pegen.parser_generator imp...
#! /usr/bin/python import serial, time import subprocess from subprocess import call, Popen from argparse import ArgumentParser import re import unittest import os def do_test(port, baudrate, test_name): databits = serial.EIGHTBITS stopbits = serial.STOPBITS_ONE parity = serial.PARITY_NONE ser = seria...
import pymysql import sys import zlib import json from time import sleep from kafka import KafkaConsumer, KafkaProducer, TopicPartition import ast from threading import Thread import threading import wget import subprocess import csv import os import shutil import pandas as pd import time from bson import json_util ...
############################################################################### # PyDial: Multi-domain Statistical Spoken Dialogue System Software ############################################################################### # # Copyright 2015 - 2019 # Cambridge University Engineering Department Dialogue Systems Grou...
# Debian and Ubuntu system administration tools. # # Author: <NAME> <<EMAIL>> # Last Change: May 20, 2020 # URL: https://debuntu-tools.readthedocs.io """ Usage: upgrade-remote-system [OPTIONS] [SSH_ALIAS] Upgrade the system packages on a remote Debian or Ubuntu system, reboot the system when this is required due to s...
import numpy import six from chainer.backends import cuda from chainer.backends import intel64 from chainer import function_node from chainer.utils import type_check def _cu_conv_sum(y, x, n): # Convolutional sum # TODO(beam2d): Use scan computation rdim = x.size // (x.shape[0] * x.shape[1]) cuda.ele...
import pytest from triple_agent.organization.replay_file_iterator import iterate_over_replays from triple_agent.classes.missions import Missions from triple_agent.classes.venues import Venue from triple_agent.classes.outcomes import WinType from triple_agent.parsing.replay.parse_single_replay import parse_single_repla...
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: gen_encode_proto_op_py.cc """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _co...
"""Code to embed a set of sequences in an embedding space using a trained protvec model and an embedding set of sequences. Creates a .csv file of the embedded sequences. Also returns file of sequences which could not be successfully embedded""" import pickle import numpy as np from Bio import SeqIO import pandas as ...
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets 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 appl...
# 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 python3 #-*- coding: utf-8 -*- # Compare substitution pairs from kaldi ops file. # Check the BÍN database if the words possibly belong to the same lemma, indicating that the error # is not as severe as when the substituted word is a representation of another lemma # # Important remark: # - Before runnin...
import abc import numpy as np import copy import csv import os from beluga.liepack import * # The following math import statements appear to be unused, but they are required on import of the specific # methods since an eval() is called from math import sqrt class Method(object): """ Class containing informati...
from pgvbotLib import * from params import * import pywikibot from copy import deepcopy import re, os RECENT_LOG_FILE = "recent_log.txt" ADMIN_LIST = ["Ideophagous","<NAME>","<NAME>","<NAME>"] BOT_COMMENT_TAG = "{{تعليق بوتي}}" TALK_PAGE_TITLE_PART = "نقاش:" NOTIF_SECTION_TITLE = "== دمج ؤلا توضيح ==" NOTIF_TEMPL...
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/rl_config.py __version__=''' $Id: rl_config.py,v 1.1 2006/05/26 19:19:36 thomas Exp $ ''' allowTableBoundsErrors = 1 # set to 0 to die on too lar...
import pandas as pd import numpy as np import streamlit as st import pandas as pd #import matplotlib.pyplot as plt #import seaborn as sns from collections import Counter from hydralit import HydraApp from hydralit import HydraHeadApp import apps import altair as alt #when we import hydralit, we automatically...
from .. import engines from ..errors import SimError # 8<----------------- Compatibility layer ----------------- class ExplorationTechniqueMeta(type): def __new__(mcs, name, bases, attrs): import inspect if name != 'ExplorationTechniqueCompat': if 'step' in attrs and not inspect.getar...
import tensorflow as tf import numpy as np from PIL import Image import os import glob import platform import argparse from scipy.io import loadmat,savemat from preprocess_img import align_img from utils import * from face_decoder import Face3D from options import Option is_windows = True def parse_args(): des...
import networkx as nx import scipy.optimize def BPR(x, m, fcoeffs, exo): return sum([fcoeffs[i]*((x+exo)/m)**i for i in range(len(fcoeffs))]) def BPR_social(x, m, fcoeffs, exo): return sum([fcoeffs[i]*((x+exo)/m)**i for i in range(len(fcoeffs))]) + sum([fcoeffs[i+1]*(i+1) *((x+exo)/m)**(i) for i in range(len(fcoe...
# -*- coding: utf-8 -*- # -------------------------- # Copyright © 2014 - Qentinel Group. # # 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/LIC...