text
stringlengths
3.07k
22.1k
#========================================================================= # VBehavioralTranslatorL2.py #========================================================================= # Author : <NAME> # Date : March 18, 2019 """Provide the level 2 SystemVerilog translator implementation.""" from pymtl3.passes.backends.g...
# Copyright 2019 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 agreed to in writing,...
#!/usr/bin/env python # # BSD 3-Clause License # # Copyright (c) 2018, CSIRT-MU, Masaryk University # All rights reserved. # # 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 retai...
import numpy as np import copy import string class m_param_origanizer(): def __init__(self, m_param_raw): self.m_param_raw = m_param_raw def get(self, key, nth_set): items = self[key] for i in items: if i.nth_set == nth_set: return i raise ValueErro...
# -*- coding: utf-8 """ This script calculates the heat transfer at the consumer for a simple tree network. """ import math import os import numpy as np import pandas as pd path_file = os.path.dirname(__file__) path = os.path.abspath(os.path.join(path_file, os.pardir, os.pardir, os.pardir)) input_data = os.path.join...
from tkinter import * from tkinter import ttk import threading import sys import datetime import script import os import requests import webbrowser class MainWindow(): def __init__(self, window, frame): self.window = window self.frame = frame if window == None: self.window = Tk() self.window.minsize(2...
# # 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 us...
# 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...
import numpy as np from tqdm import tqdm from scipy.stats import rankdata from random import choice from collections import defaultdict from tensorflow.keras.callbacks import Callback from tensorflow.keras.losses import binary_crossentropy import tensorflow as tf from random import choices EPSILON = 1e-6 from rdflib...
import random import datetime from django.conf import settings from django.contrib import messages from django import forms from django.contrib.auth.decorators import login_required from django.http import Http404 from django.http import JsonResponse from django.urls import reverse from django.utils.decorators import ...
import torch import torch.nn as nn import math import numpy as np class MultivarMLP(nn.Module): def __init__(self, input_dims, hidden_dims, output_dims, extra_dims, actfn, pre_layers=None): """ Module for stacking N neural networks in parallel for more efficient evaluation. In the context ...
import abc import logging import os import re from galaxy.datatypes.binary import Binary from galaxy.datatypes.data import get_file_peek, Text from galaxy.datatypes.metadata import MetadataElement from galaxy.datatypes.sniff import build_sniff_from_prefix from galaxy.datatypes.util import generic_util from galaxy.util...
import unittest from collections.abc import (Container, Sized, Iterable, Sequence, Set) from .src.sorted_set import SortedSet class TestConstruction(unittest.TestCase): def test_empty(self): s = SortedSet([]) def test_from_sequence(self): s = SortedSet([7, 8, 3, 1]) def test_with_duplica...
import matplotlib.pyplot as plt from matplotlib.ticker import (AutoMinorLocator, MultipleLocator) import numpy as np from ..base.enums import Direction, Clr def plot_boxes(samples, labels, block=False): plt.figure() plt.boxplot(samples, labels=labels) plt.show(block=block) def plot_lines(lines, title="", ...
# 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...
from .enums import * from .flags import * from .structure import Structure Elf64_Addr = 'Q' Elf64_Byte = 'B' Elf64_Half = 'H' Elf64_Off = 'Q' Elf64_SHalf = 'h' Elf64_Sword = 'i' Elf64_Sxword = 'q' Elf64_Word = 'I' Elf64_Xword = 'Q' class Elf64_Ehdr(Structure): """ File header. """ members = ({'name'...
from genome_integration import gene_regions import gzip """ These classes are intended to easily access and query ensembl genes information, But they have other uses as well, so it is possible that these will be joined with the ensembl """ class EnsemblGene(gene_regions.StartEndRegion): """ Contains all the...
import os import time import numpy as np import torch import torch.nn.functional as F from dgl import DGLGraph from dgl.data import load_data from graphnas.gnn import GraphNet from graphnas.utils.model_utils import EarlyStop, TopAverage, process_action def load(args, save_file=".npy"): save_file = args.dataset ...
import time import os import re from datetime import date, datetime import subprocess as sp import traceback import logging from github import Github from reply_generator import AUTO_ASK_FOR_CHECK, begin_reply_generate from utils import update_issue_body, get_readme_and_output_folder, \ get_python_pipelines, get_...
import sys import re import pickle import pandas as pd from nltk import ngrams import argparse import datefinder from tqdm import tqdm """ FEATURES: raw_text: The raw text processed_text: The raw text of the last word in the N-gram text_pattern: The raw text, after replacing uppercas...
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import math import coremltools.converters from coremltools.converters.mil.mil import get_new_symbol...
import io from functools import lru_cache import json import typing import time import re from collections import OrderedDict import cachetools from cloud_blobstore import BlobNotFoundError, BlobStore from dss import Config, Replica from dss.api.search import PerPageBounds from dss.storage.identifiers import (DSS_BUN...
import torch import torch.nn as nn from torch.autograd import Variable import math import time import numpy as np import helpers.functions as mhf import random USE_CUDA = torch.cuda.is_available() def time_forward_pass(model, train_loader): model.eval() start_time = time.time() for idx_minibatch, data in...
from __future__ import division, print_function import numpy as np import pandas as pd from sklearn.externals import joblib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import modelling_functions as mf def mainEvaluateInterpolation(): # 1.Get spark data and transform to pandas df df = ...
import os import numpy as np import torch from skimage import io,color from PIL import Image from torch.utils.data import Dataset from torchvision import transforms as T from torchvision.transforms import functional as F from typing import Callable import os import cv2 import pandas as pd from numbers import Number ...
# =============================================================================== # Copyright 2015 <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/LI...
import onnxruntime.backend import onnx import onnxruntime import torch from collections import OrderedDict from onnx import AttributeProto, TensorProto, GraphProto, helper, shape_inference import torchpruner.register as register from onnx import numpy_helper from onnx import version_converter import numpy as np import ...
"""Config flow for Meross IoT local LAN integration.""" from time import time import voluptuous as vol from typing import OrderedDict import json try: from pytz import common_timezones except Exception: common_timezones = None from homeassistant import config_entries from homeassistant.helpers.typing import Di...
# %%writefile /content/CoordConv/experiments/gan/munit/train_layout.py import argparse import os import numpy as np import math import sys import torchvision.transforms as transforms from torchvision.utils import save_image import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data impor...
from pymediainfo import MediaInfo import sys, os, pymongo, hashlib, configparser, xxhash, locale, argparse, json, logging from guessit import guessit from imdbpie import Imdb imdb = Imdb(anonymize=True) # to proxy requests REBUILD_SIDECAR = False # Setting default hasher - can be changed with command line # Let's c...
""" Utility functions used in osxphotos """ import fnmatch import glob import importlib import inspect import logging import os import os.path import pathlib import platform import re import sqlite3 import subprocess import sys import unicodedata import urllib.parse from plistlib import load as plistload from typing i...
# Copyright (C) 2014 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # This module adds support to testimage.bbclass to deploy images and run # tests using a "master image" - this is a "known good" image that is # installed onto the device as part of initial setup and will be booted into # with ...
from flask import Flask, request, jsonify, Response from sesamutils import VariablesConfig, sesam_logger import json import requests import os import sys app = Flask(__name__) logger = sesam_logger("Steve the logger", app=app) ## Logic for running program in dev try: with open("helpers.json", "r") as stream: ...
"Test colorizer, coverage 93%." from idlelib import colorizer from test.support import requires import unittest from unittest import mock from functools import partial from tkinter import Tk, Text from idlelib import config from idlelib.percolator import Percolator usercfg = colorizer.idleConf.userCfg testcfg = { ...
#!/usr/bin/env python3 # a timing script for FFTs and convolutions using OpenMP import sys, getopt import numpy as np from math import * import subprocess import os import re # regexp package import shutil import tempfile usage = '''A timing script for rocfft Usage: \ttiming.py \t\t-w <string> set working directory...
import copy from os import path, stat import cocos import cocos.actions import cocos.sprite import cocos.layer import pyglet from . import data, settings from ..chart import Line, BaseNote, Drag, Flick, Hold, chart __all__ = ['preview'] combo_label = None score_label = None def update_labels(): global combo_l...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # author : <NAME> # e-mail : kesiraju[AT]fit[DOT]vutbr[DOT]cz # Date created : 03 Jun 2021 # Last modified : 03 Jun 2021 """ Get total duration on utterances. If input is utt2dur, the calculation is straightforward. If the input is wav.scp then will use sox command to ge...
""" Defines the :py:class:`Args <dollar_lambda.args.Args>` dataclass and associated functions. """ from __future__ import annotations import dataclasses import typing from dataclasses import MISSING, Field, dataclass, fields from typing import Any, Callable, Iterator, Optional, Union, get_args from dollar_lambda.data...
import numpy as np import cv2 import csv from itertools import islice import os def readSamples(db_path, image_size): files = [] print(db_path) # r=root, d=directories, f = files for r, d, f in os.walk(db_path): for file in f: if '.png' in file: files.append(os.path...
import csv import os import pickle import sys import tempfile import zipfile import warnings import imageio import numpy as np import requests import torch import subprocess import string import random from autokeras.constant import Constant from scipy.ndimage import zoom class NoImprovementError(Exception): def...
# Copyright 2008-2016 by <NAME>. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Bio.AlignIO support for ...
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """General systems utility used across all scripts. Defines functions for abstracting away command line inte...
# Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT License # # 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...
from collections import namedtuple from datetime import datetime import folium import webbrowser import statistics import random import math import numpy as np import matplotlib.pyplot as plt from geopy import distance import pprint center_coordinates = [63.406514, 10.476741] CSV_TYPE = 0 CSV_TYPE_GPS = "GPS" CSV_TYP...
#!/usr/bin/env python3 from collections import deque from functools import reduce def hash_states(size=256): state = deque(range(size)) skip_size = 0 at = 0 while True: rev_length = yield if rev_length > 1: state.rotate(-at) for v in [state.popleft() for _ i...
import asyncio import json import os import subprocess from collections import namedtuple, OrderedDict from datetime import datetime from json import JSONDecodeError from subprocess import Popen import discord import math from discord import NotFound from Util import GearbotLogging, Translator, Emoji from Util.Matche...
# ROMULUS-M Python Implementation # Copyright 2020: # <NAME> <<EMAIL>> # 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 of the # License, or (at your option) any ...
# Copyright 2019 PerfKitBenchmarker 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 appli...
# Copyright (c) 2020 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 appli...
import importlib import os import datetime from openpyxl import load_workbook, utils from django.db.models import Q from openpyxl.styles import Border, Side, Alignment, Font from openpyxl.utils.cell import get_column_letter from io import BytesIO import numpy as np from datetime import date from django.http import Http...
# -*- encoding: utf-8 -*- """ @FILE : action.py @DSEC : 网易云音乐签到刷歌脚本 @AUTHOR : Secriy @DATE : 2020/08/25 @VERSION : 2.4 """ import os import requests import base64 import sys import binascii import argparse import random import hashlib from Crypto.Cipher import AES import json # Get the arguments ...
# Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe.utils import cstr from unidecode import unidecode def create_charts(company, chart_template=None, existing_company=...
import pytest import mock import os import numpy as np import awkward as awk from zinv.modules.readers import JecVariations class DummyColl(object): pass class DummyEvent(object): def __init__(self): self.iblock = 0 self.nsig = 0 self.source = '' self.cache = {} self.a...
import time import tensorflow as tf import argparse import os, re import numpy as np import h5py import tensorflow.contrib.layers as layers from tensorflow.contrib.framework import arg_scope # model depth can be 50, 101 or 152 MODEL_DEPTH = 50 #DATA_MEAN = [103.939, 116.779, 123.68] DATA_MEAN = np.load('imagenet_mean...
import json import logging import os.path as osp from queue import Empty, Queue from threading import Thread, current_thread import numpy as np import functools from config import SHAPENET_IM from config import SHAPENET_PC from loader import read_camera, read_depth, read_im, read_quat, read_vol, read_view, read_gray,...
import os import tarfile from unittest.mock import patch import torch from parameterized import parameterized from torchaudio._internal import module_utils as _mod_utils from torchaudio.backend import soundfile_backend from torchaudio_unittest.common_utils import ( get_wav_data, load_wav, normalize_wav, ...
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 <NAME>; #_______________________________________________________________________________ # (C) 2010-2014 <NAME> from quex.engine.operations.operation_list import Op from quex.engine.analyzer.mega_state.core ...
#!/usr/bin/python ''' Pipeline for parsing all the access log files (S3 and CloudFront) for dataset downloads and calculating totals. ''' import glob import gzip import json import os import re from os.path import join, dirname import arrow import luigi import pandas as pd from openfda import common, config, index_...
#!/usr/bin/env python import rospy from std_msgs.msg import String from usv_perception.msg import obj_detected from usv_perception.msg import obj_detected_list from std_msgs.msg import Float32MultiArray from std_msgs.msg import Int32 from geometry_msgs.msg import Pose2D from sensor_msgs.msg import PointCloud2 import s...
from traceback import print_tb import win32api import win32gui import win32con # 导入win32api相关模块 import time import cv2 import numpy as np from PIL import Image import collections from gui_controls import Controls def get_hwnd(): hWndList = [] win32gui.EnumWindows(lambda hWnd, param: param.appen...
#!/usr/bin/env python3 # 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 ...
# -*- coding: utf-8 -*- import sys import matplotlib matplotlib.use('Qt5Agg') import itertools from PyQt5.QtWidgets import (QApplication, QWidget, QLabel, QTextEdit, QLineEdit, QPushButton, QCheckBox, QGridLayout, QVBoxLayout, ...
# Copyright Notice: # Copyright 2016-2020 DMTF. All rights reserved. # License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-Service-Validator/blob/master/LICENSE.md from collections import namedtuple from bs4 import BeautifulSoup from functools import lru_cache import os.path from co...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
import os import re import pyreaper import numpy as np import matplotlib.pyplot as plt from python_speech_features import delta as delta_mfcc from speech_feature_extraction import Extractor from speech_feature_extraction.util import WavLoader from scipy.io import wavfile try: from tqdm import tqdm except...
"""Api hub and integration data.""" import logging from pymultimatic.api import ApiError from pymultimatic.model import ( Circulation, HolidayMode, HotWater, OperatingModes, QuickMode, QuickModes, QuickVeto, Room, System, Zone, ZoneCooling, ZoneHeating, ) import pymultim...
# -------------------------------------------------------- # Flow-Guided Feature Aggregation # Copyright (c) 2017 Microsoft # Licensed under The MIT License [see LICENSE for details] # Modified by<NAME>, <NAME> # -------------------------------------------------------- # Based on: # MX-RCNN # Copyright (c) 2016 by Cont...
import re from ..exceptions import AnymailRequestsAPIError from ..message import AnymailRecipientStatus from ..utils import get_anymail_setting, parse_address_list from .base_requests import AnymailRequestsBackend, RequestsPayload class EmailBackend(AnymailRequestsBackend): """ Postmark API Email Backend ...
#!/usr/bin/env python3 """ narnia """ import curses import curses.textpad import os import sys import time from narnia.colorstr import add_cstr, init_colors from narnia.common import Config as c, Globals as g, refresh_windows from narnia.common import Header, Status from narnia.download import Download from narnia.pr...
# Author: <NAME> # Email: <EMAIL>is at gmail.com # Created: 2019/10/30 # ~ ############################################################################### # Docker Registry Documentation: https://docs.docker.com/registry/ # ############################################################################### # TO...
import os.path import shutil import statistics from collections import defaultdict from datetime import datetime, timedelta import networkx as nx import torch import torch_geometric from torch_geometric.data import Dataset import cargonet.preprocessing.datalake.retrieval as retrieval import cargonet.preprocessing.gra...
#!/usr/bin/env python """Run signal-to-reference alignments """ import pandas as pd import glob from .signalAlignLib import * from .variantCallingLib import get_alignments_labels_and_mask from .alignmentAnalysisLib import CallMethylation from multiprocessing import Process, Queue, current_process, Manager from signala...
# coding=utf-8 import pygame import pygame.locals class Board(object): """ Plansza do gry. Odpowiada za rysowanie okna gry. """ def __init__(self, width, height): """ Konstruktor planszy do gry. Przygotowuje okienko gry. :param width: :param height: """ ...
""" Some utility functions. Miscellaneous utilities * list2set * first * uniq * more_than Term characterisation and generation * to_term * from_n3 Date/time utilities * date_time * parse_date_time Statement and component type checkers * check_context * check_subject * check_predicate * check_object * check_stat...
#!/usr/bin/python3 # run server (dont forget to set the pins 3 and 2 to GPIO mode and enable PWM) import logging import signal import time from argparse import ArgumentParser from typing import NamedTuple, Optional from configparser import ConfigParser, NoOptionError from contextlib import ExitStack from enum import E...
# -*- coding: utf-8 -*- """An event hub that supports sockets and timers, based on Python 2.6's select & epoll support.""" import select try: import pyev except: have_libev = False else: have_libev = True import errno import fcntl import os import signal import threading from collections import deque, ...
"""Async utility functions Attributes: mlog (logging.Logger): module logger """ import asyncio import collections import concurrent.futures import contextlib import inspect import itertools import logging import signal import sys mlog = logging.getLogger(__name__) async def first(xs, fn=lambda _: True, defau...
# -*- coding: utf-8 -*- # # Copyright (C) 2019 <NAME> <<EMAIL>> # All rights reserved. # # This code is licensed under the MIT License. # # 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 withou...
# Copyright (C) 2014 <NAME> <iv at altlinux dot org> # # 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 ...
"""A convenient API to access the GPIO pins of the Raspberry Pi. """ import os import subprocess from contextlib import contextmanager from quick2wire.board_revision import revision from quick2wire.selector import EDGE def gpio_admin(subcommand, pin, pull=None): if pull: subprocess.check_call(["gpio-adm...
"""STAR & RSEM based RNA-Seq pipeline. """ from __future__ import absolute_import, print_function from argparse import ArgumentParser import datetime import getpass import itertools import logging import os from pathlib import Path from pkg_resources import resource_filename import stat from jinja2 import Environment,...
"""Support for Tasmota sensors.""" from __future__ import annotations from datetime import datetime from typing import Any from hatasmota import const as hc, sensor as tasmota_sensor, status_sensor from hatasmota.entity import TasmotaEntity as HATasmotaEntity from hatasmota.models import DiscoveryHashType from homea...
#!/usr/bin/env python """This module has new tests for the pvl decoder functions.""" # Copyright 2019, <NAME> (<EMAIL>) # # 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...
# Copyright 2022 by Autodesk, Inc. # Permission to use, copy, modify, and distribute this software in object code form # for any purpose and without fee is hereby granted, provided that the above copyright # notice appears in all copies and that both that copyright notice and the limited # warranty and restricted ...
#!/usr/bin/python # -*- coding: UTF-8 -*- import os from collections import * from numpy import * import re import json from pyspark.sql import SparkSession from functools import reduce class Test: def test1(self): """ 不可见字符 的 打印 和 写入文本 :return: """ SOH=chr(0x01)...
# completely ridiculous hack to import stuff properly. somebody save me from myself import importlib from allennlp.common.util import import_submodules importlib.invalidate_caches() import sys sys.path.append(".") import_submodules("qasrl") from typing import List, Iterator, Optional, Set import torch, os, json, tar...
""" 12.5. Returning a value from a function """ # Not only can you pass a parameter value into a function, a function can also # produce a value. You have already seen this in some previous functions that # you have used. For example, len takes a list or string as a parameter value # and returns a number, the length o...
#!/usr/bin/env python3 from io import StringIO import pandas as pd import traceback import psycopg2 import boto3 import sys import os import re S3_ACCEPTED_KWARGS = [ 'ACL', 'Body', 'CacheControl ', 'ContentDisposition', 'ContentEncoding', 'ContentLanguage', 'ContentLength', 'ContentMD5', 'ContentType', 'Expi...
#!/home/daniel/anaconda3/bin/python # -*- coding: utf-8 -*- """ ================================================ Pyrad: The MeteoSwiss Radar Processing framework ================================================ Welcome to Pyrad! This program processes bird data """ # Author: fvj # License: BSD 3 clause import dat...
import argparse parser = argparse.ArgumentParser() parser.add_argument('--datafile', type=str, default='heteroaryl_suzuki.csv') parser.add_argument('--mol2vec_model', default='model_300dim.pkl') args= parser.parse_args() import numpy as np from mol2vec.features import mol2alt_sentence, sentences2vec from gensim.models...
import numpy as np import random import pickle import os.path # Parameters Config SUB = 0 SUB_ADD = 1 MULTIPLY = 2 DIGITS = 4 TRAINING_SIZE = 18000 VALIDATION_SIZE = 2000 TESTING_SIZE = 60000 ITERATION = 100 TOTAL_SIZE = TRAINING_SIZE + VALIDATION_SIZE + TESTING_SIZE GEN_TYPE = ...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ A set of utilities for writing output to the console. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import io import codecs import contextlib import locale im...
#!/usr/bin/env python """Instant output plugins used by the API for on-the-fly conversion.""" import itertools import re from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils from grr.server import aff4 from grr.server import export class InstantOutputPlugin(object): """The base clas...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging from typing import Any, Dict, Optional, Sequence, Tuple, Union import matplotlib.pyplot as plt import numpy as np import pandas ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jul 18 12:03:37 2019 @author: cassandra """ import pandas as pd import numpy as np import gc import linear_wave_convert g = 9.81 rho = 1025 def get_k(omega, h): """ Linear wave dispersion relation solver Given to me in matlab by <NAME>, ...
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### imp...
import sys import weakref import pydoc from jfx_bridge import bridge from .server.ghidra_bridge_port import DEFAULT_SERVER_PORT from .server.ghidra_bridge_host import DEFAULT_SERVER_HOST """ Use this list to exclude modules and names loaded by the remote ghidra_bridge side from being loaded into namespaces (they'll ...
# -*- 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...
# # 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 # di...