text
stringlengths
3.07k
12.6k
""" N-body integration of N particles with a Salpeter initial mass function between Mmin and Mmax and with stellar evolution with metallicity z. """ from amuse.lab import * from amuse.io import store from amuse.community.seba.interface import SeBa ###BOOKLISTSTART1### def merge_two_stars(bodies, particles_in_...
import numpy as np import tensorflow as tf import elbow.util as util from elbow.structure import unpackRV from elbow.conditional_dist import ConditionalDistribution from elbow.transforms import DeterministicTransform from elbow.elementary import Gaussian,BernoulliMatrix def layer(inp, w, b): if len(inp.get_shap...
from . import FixtureTest class NormalizeBoundariesKind(FixtureTest): def test_aboriginal_lands_protected_area(self): # Relation: Hoopa Valley Tribe # # Note: this is tagged as a "protected_area" rather than a political # boundary, but it seems that some "protect_class" values indi...
import os import json import warnings from typing import Tuple from firecloud import api as fapi warnings.filterwarnings('ignore', 'Your application has authenticated', UserWarning, 'google') def parse_firecloud_workflow(workflow_string: str) -> Tuple[str, str, int]: """Split a Firecloud workflow string. ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2016 <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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
import unittest from distutils.version import StrictVersion import torch from parameterized import param import torchaudio.functional as F from torchaudio._internal.module_utils import is_module_available LIBROSA_AVAILABLE = is_module_available('librosa') if LIBROSA_AVAILABLE: import numpy as np import libr...
import os import sys import json import time import random import argparse import torch import numpy as np from tensorboardX import SummaryWriter from env.rxr_env import RxREnv from env.env_utils import Statistic from agent.agent_seq2seq import AgentSeq2Seq from agent.agent_sacd import AgentSACD from agent.agent_reinfo...
import itertools import numpy as np from GPyOpt.optimization.optimizer import OptLbfgs from GPyOpt.core.task.space import Design_space import torch from torch.autograd import Variable def indicator_boundaries(bounds, d): """ Checks if the provided design 'd' is within the specified 'bounds'. Parameters...
from waflib import TaskGen# import feature, taskgen_method, before_method, task_gen from waflib import Node, Task, Utils, Build import subprocess from waflib import Options import shellcmd #shellcmd.subprocess = pproc # the WAF version of the subprocess module is supposedly less buggy from waflib.Logs import debug, e...
# -*- coding: utf-8 -*- # @Author: gunjianpan # @Date: 2018-11-18 20:31:37 # @Last Modified by: gunjianpan # @Last Modified time: 2018-11-24 13:54:54 import gzip import numpy as np import pickle import theano import theano.tensor as T from utils.constant import floatX from utils.utils import shared_common, shared...
"""Functions used to generate source files during build time All such functions are invoked in a subprocess on Windows to prevent build flakiness. """ from platform_methods import subprocess_main excluded_cond = ["__METAL_VERSION__"] class LegacyMetalHeaderStruct: def __init__(self): self.attributes = ...
import torch from torch import nn import torch.nn.functional as F from subspectral_norm import SubSpectralNorm DROPOUT = 0.1 class NormalBlock(nn.Module): def __init__(self, n_chan: int, *, dilation: int = 1, dropout: float = DROPOUT, use_subspectral: bool = True): super().__init__() norm_layer ...
from collections import defaultdict from caseworker.users.services import get_gov_user from core import client from core.helpers import convert_value_to_query_param from caseworker.cases.constants import CaseType, CaseStatusEnum from lite_forms.components import Option def get_denial_reasons(request, convert_to_opti...
import graphene from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.db import transaction from main.core.permissions import ProductPermissions from main.graphql.core.mutations import ModelMutation, ModelDeleteMutation, ModelBulkDeleteMutation, BaseMutation from main.graphql.core.scalars ...
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: <NAME> <<EMAIL>>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ****************************************...
#!/usr/bin/env python #-*- coding:utf-8 _*- """ @author:liruihui @file: ops.py @time: 2019/09/17 @contact: <EMAIL> @github: https://liruihui.github.io/ @description: """ import torch.nn as nn from torch.nn import Sequential as Seq, Linear as Lin, ReLU, BatchNorm1d as BN # custom weights initialization called on ...
"""Moduł zawierający podstawowe klasy.""" import pygame from window import * class Player(): """Klasa opisująca działanie gracza.""" def __init__(self): """Inicjacja gracza.""" self.rect = pygame.Rect(MID - SHIP.get_width()/2, BOTTOM, SHIP.get_width(...
import bs4 import cfscrape from Brain.Utils.strings import * def branch_as_baseurl(branch, course): branch_coded = "" # for courses which doesn't have a branch ['BCOM', 'BAF', 'BBI', 'BFM', 'BMS', 'MCA'] if course == 'BE': if branch == 'Automobile': branch_coded = 'Automobile' el...
#! /usr/bin/env python3 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This script must be executed at the root of the repository. import os import xml.etree.Elemen...
import os import sys base = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../') sys.path.append(base) import re import click import uuid import glob from collections import OrderedDict from external.dada.flag_holder import FlagHolder from external.dada.logger import Logger from scripts.test import te...
from os import path from tempfile import gettempdir from babel import Locale from environs import Env from flask_babelex import gettext as _ from opwen_email_client.util.os import subdirectories env = Env() settings_path = env('OPWEN_SETTINGS', None) env.read_env(settings_path, recurse=False) app_basedir = path.abs...
from PIL import Image from sklearn.cluster import MeanShift, estimate_bandwidth from keras.models import load_model from keras import backend as K from ipyupload import FileUpload from multiprocessing import Process, Queue import matplotlib.pyplot as plt import matplotlib.patches as patches import ipywidgets as widgets...
""" APIs for creating user-defined element-wise, reduction and analytic functions. """ import collections import functools import itertools import pyspark.sql.functions as f import pyspark.sql.types as pt import ibis.common.exceptions as com import ibis.expr.datatypes as dt import ibis.expr.signature as sig import i...
import os import tarfile import urllib import zipfile import jiant.utils.python.io as py_io from jiant.utils.python.datastructures import replace_key from datasets_extra.processing import build_cv_splits from datasets_extra import load_metric, load_dataset # from datasets_extra import load_dataset as load_hf_dataset, ...
import argparse import datetime import json import sys import boto3 import dateutil from boto3.dynamodb.conditions import Attr DB_KEY = "COMPUTE_FLEET" DB_DATA = "Data" COMPUTE_FLEET_STATUS_ATTRIBUTE = "status" COMPUTE_FLEET_LAST_UPDATED_TIME_ATTRIBUTE = "lastStatusUpdatedTime" def to_utc_datetime(time_in, default...
from datetime import datetime, timedelta import os import time import requests from apmserver import integration_test from apmserver import ElasticTest from test_auth import APIKeyBaseTest from helper import wait_until from es_helper import index_profile, index_transaction # Set ELASTIC_APM_API_REQUEST_TIME to a shor...
"""Access to the imageio library The following main classes of imageio expose an interface for advanced users. A brief overview: * imageio.FormatManager - for keeping track of registered formats. * imageio.Format - representation of a file format reader/writer * imageio.Format.Reader - object used during the re...
import getopt import logging import os import sys import tensorflow as tf from keras.preprocessing.sequence import pad_sequences from tinydb import TinyDB, where from model.lstm import buildModel from preprocessing.InputHelper import InputHelper from preprocessing.InputHelper import transformLabels # set logging LOG...
import argparse import os from typing import Iterable, Tuple, List, Optional from .module_definition import Module, Method, ParameterDocumentation from .module_definition.exceptions import MockGeneratorError from .util import CodeBuilder, TemplateFormatter, read_lines def line_starts_with_documentation(line: str) ->...
# Copyright 2016 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 required by applica...
# Copyright 2016 The Eyra 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 applicable la...
import random def common_prefix(x,y): if (len(y) < len(x)): return False for i in range(0,len(x)): if x[i] != y[i]: return False return True def would_match_on_prefix(keys,x): assert(common_prefix((3,),(3,4,))) assert(common_prefix((3,),(3,))) assert(common_pref...
# Copyright 2020 Alibaba Group Holding Limited. # # 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...
#!/usr/bin/env python3 import random import copy import math SPECIALITIES = [ 'software', 'ui/ux', 'backend' ] TEAM_SIZE = 4 repr_team = lambda team: (sorted([x['username'] for x in team])) user_requests = [ { 'username': 'aaron', 'specialities': [ 'software' ], 'team_requests': [ 'vivi...
#!/usr/bin/env python3 import os import re import socket import requests from bs4 import BeautifulSoup from argparse import ArgumentParser def get_arguments(): parser = ArgumentParser() parser.add_argument('-i', '--input', type=str, help='File with target hosts for scanning') parser.add_argument('-c', '-...
""" Python module for scripting helper functions """ from glob import glob import configparser import os import re import json import pandas as pd def set_parameter(parameters_filepath, section_name, parameter_name, parameter_value): """ set the specified parameter to the specified value and write back to the...
""" Fuel Station Refueling example per SimPy documentation: https://simpy.readthedocs.io/en/latest/examples/gas_station_refuel.html This example covers various differences in changing the refilling threshold percentage as well as differences in customer behavior. 1. Customers arrive at a fuel station with n number of...
''' File name: app.py Authors: <NAME> (1954203) <NAME> (1959434) <NAME> (1961302) <NAME> (2179192) <NAME> (1855923) Course: INF8808 Python Version: 3.8 ''' from cv2 import DFT_REAL_OUTPUT from dash import Dash, dcc, html, Input, Output, callback_context import d...
import shutil import filecmp from pathlib import Path from ec2mc import consts from ec2mc.utils import os2 from ec2mc.utils import halt def main(): """validate contents of user's config's aws_setup directory""" # Directory path for distribution's packaged aws_setup src_aws_setup_dir = consts.DIST_DIR / "a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import pwd import sys # import curses import random import signal from loguru import logger from functools import wraps from scapy.all import * import pyric.pyw as pyw from boop.lib import * from boop.lib.types import * from boop.lib.channels import * from bo...
#!/usr/bin/env python3 """Module containing the Pdb4amber class and the command line interface.""" import argparse import shutil, re from pathlib import Path, PurePath from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as...
import os from typing import Iterator, List import git def align_columns(pattern_prefix, pattern, columns): '''Align columns with given pattern if possible >>> align_columns('# ', 'ab cd ef', ['ab', 'c', 'ef']) 'ab c ef' >>> align_columns('# ', 'ab cd ef', ['ab', 'cdcdcd', 'ef']) 'ab cdcdcd...
#!/usr/bin/python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2018 <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 with...
# coding=utf-8 # Copyright 2021 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...
from Phase1.instructionClass import * from Phase1.lookup1 import * from Phase1.memory import * from Phase1.data_lookup import Data_table import os def main1(fileName): d = os.getcwd() + "/Files/" inputFile = open(d+fileName, 'r') allInstructions = inputFile.readlines() lineNo = 0 address = hex(int(...
#!/usr/bin/env python import os import sys import adsputils import argparse import warnings import json import time from ybload import tasks from adsputils import setup_logging, get_date, load_config from ybload.models import KeyValue, Records,BigTable from sqlalchemy.orm import load_only from sqlalchemy.orm.attribute...
import os.path import textwrap from typing import Set desc_id = 0 def _next_desc_id(): global desc_id desc_id += 1 return f"desc{desc_id}" class DocWriter(object): def __init__(self, base_path, name): self.base_path = base_path self.name = name self.path = os.path.join(base...
"""Fix style of uncommited po files, or all if --all is given.""" import argparse import sys import os from typing import Iterable import difflib from pathlib import Path from subprocess import check_output, run, CalledProcessError from tempfile import NamedTemporaryFile from tqdm import tqdm from powrap import __ve...
#! /usr/bin/python3 """ File: ScapyTelnetHijack.py Version: 1.0 Date: 27 Apr 2021 Author: Pseudoer Description: This python script utilises Scapy to hijack a Telnet session for monitoring or command injection Information on Scapy and installation can be found: https://scapy.net/ """ import argparse from scapy.all...
"""Tests for SIR model in this repo * Compares conserved quantities * Compares model against Penn CHIME w/wo social policies * Checks logistic policies in extreme limit """ from typing import Tuple from datetime import date from pytest import fixture from numpy import zeros from pandas import DataFrame, Series from p...
import Tkinter import tkFileDialog def open_it(): filename = tkFileDialog.askopenfilename() return filename def save_it(): filename = tkFileDialog.askopenfilename() return filename def save_as(): filename = tkFileDialog.asksaveasfilename() return filename def _raiseDataTableKeyError(): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @File : download.py @Time : 2019-04-16 21:30 @Author : <NAME> @Contact : <EMAIL> @Description: @License : (C) Copyright 2016-2017, iFuture Corporation Limited. """ import logme import random import asyncio import json import cchardet as char...
from corehq.apps.change_feed import topics from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed, KafkaCheckpointEventHandler from corehq.apps.change_feed.document_types import get_doc_meta_object_from_document, \ change_meta_from_doc_meta_and_document from corehq.apps.change_feed.data_sources import FO...
import numpy as np import pandas as pd import os import sys import shutil import math import random import gc import pathlib import datetime import pytz import joblib from typing import List, NoReturn, Union, Tuple, Optional, Text, Generic, Callable, Dict from sklearn import preprocessing, metrics # import tensorflow ...
import enum import io import json import os import dotenv import psycopg2 import requests dotenv.load_dotenv() DATABASE_URL = os.environ.get("DATABASE_URL") SHISETSU_APPS_SCRIPT_ENDPOINT = os.environ.get("SHISETSU_APPS_SCRIPT_ENDPOINT") class FeeDivision(enum.Enum): INVALID = ("FEE_DIVISION_INVALID", None) ...
# IMPORTS from operator import xor from functools import reduce # DATA numbers = list(range(256)) data = [189, 1, 111, 246, 254, 2, 0, 120, 215, 93, 255, 50, 84, 15, 94, 62] # GOAL 1 """ To achieve this, begin with a list of numbers from 0 to 255, a current position which begins at 0 (the first element in the list),...
import jwt from jwt.exceptions import InvalidTokenError from google.oauth2 import id_token from google.auth.transport import requests from ..data_access.account import account_base_create from ..data_access.account import account_base_list from ..data_access.account import account_base_get_by_id from ..data_access.acc...
"""Support for Google Calendar Search binary sensors.""" import copy from datetime import timedelta import logging from httplib2 import ServerNotFoundError # pylint: disable=import-error from homeassistant.components.calendar import ( PLATFORM_SCHEMA, ENTITY_ID_FORMAT, CalendarEventDevice, calculate_...
""" manage federated servers """ import json from django.contrib.auth.decorators import login_required, permission_required from django.core.paginator import Paginator from django.db import transaction from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from dj...
# Copyright 2020 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 applicable law...
import phenom import matplotlib # matplotlib.use('MacOSX') matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from phenom.utils.utils import Constants, HztoMf, pad_to_pow_2 import lal import lalsimulation as lalsim from ifft import * m1=52.384655 m2=16.384655 chi1x=0.5 chi1y=0. chi1z=0. chi2x...
from brightics.common.report import ReportBuilder, strip_margin, plt2MD, \ pandasDF2MD, keyValues2MD import pandas as pd import scipy.stats import math from brightics.common.groupby import _function_by_group from brightics.common.utils import check_required_parameters def ftest_for_stacked_data(table, group_by=No...
""" Component that will handle the storing of details in xmpp for configuration. """ import logging from sleekxmpp.plugins.base import base_plugin from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin logger = logging.getLogger(__name__) class ConfigurationStanza(ElementBase): """ Stanza respo...
import os from IPython import display import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf import tensorflow_hub as hub import tensorflow_io as tfio yamnet_model_handle = 'https://tfhub.dev/google/yamnet/1' yamnet_model = hub.load(yamnet_model_handle) testing_wav_file_name ...
#Import necessary package import requests import re from bs4 import BeautifulSoup import pandas as pd import numpy as np import datetime as dt import configparser import os import json import ast #Configure parameter config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(__file__), 'config.ini')...
import numpy as np import matplotlib.pyplot as plt import random as rand from cycler import cycler from mpl_toolkits import mplot3d import glob as glob import matplotlib.patches as mpatches def density_delta(radius, r_star): p0 = 100 frac_radius = radius/r_star p = p0*(1-frac_radius**2) return p G = 6...
import cherrypy import hashlib import mock import mongomock import os import pytest import shutil from .utils import uploadFile, MockSmtpReceiver, request as restRequest def _uid(node): """ Generate a unique name from a pytest request node object. """ return '_'.join((node.module.__name__, node.cls._...
import discord from discord.ext import commands from datetime import datetime, timedelta import asyncio import pytz import json import re class Time(commands.Cog): """ Commands dealing with the passage of time. """ def __init__(self, bot): self.chiaki = bot # load relevant...
from error import Error class Token(): def __init__(self, type, value): self.type = type self.value = value class Lexer(): def __init__(self, code): """Initializes an instance of Lexer Arguments: code {str} -- The raw text written by the user """ se...
#!/usr/bin/python # -*- coding: utf-8 -*- import discord from discord.ext import commands from discord_slash import SlashCommand from discord_slash.utils.manage_components import create_button, create_actionrow from discord_slash.model import ButtonStyle from enum import Enum ticket_manager_role_name = "›› Developer ...
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2009 <NAME> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Utility code for managing design documents.""" from copy import deepcopy from inspect import getsource fro...
from __future__ import annotations import re import sys from typing import Callable import numpy as np from numpy.linalg import matrix_power from enigma_simulator.utils import char_to_int from enigma_simulator.utils import encoding_to_transform if sys.version_info >= (3, 8): # pragma: no cover from typing impo...
"""Take a fastq/fasta and make a transcriptome quantification **Requires salmon** Pre: Requires 1. A FASTQ/FASTA input file (can be gzipped) 2. A transcriptome genepred 3. A genome fasta See -h for detailed input description Post: Returns Writes an output table that has header and the foll...
import smbus import math import time class MPU: def __init__(self, gyro, acc, tau): # Class / object / constructor setup self.gx = None; self.gy = None; self.gz = None; self.ax = None; self.ay = None; self.az = None; self.gyroXcal = 0 self.gyroYcal = 0 self.gyroZcal...
# The MIT License # # Copyright (c) 2018 VD44 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pub...
"""Feature extractor module.""" import copy import itertools import sys import time import numpy as np from laserchicken import utils from laserchicken.keys import point, provenance from laserchicken.feature_extractor.base_feature_extractor import FeatureExtractor from laserchicken.feature_extractor.feature_map impor...
from models import PSNet as PSNet import argparse import time import csv import cv2 import numpy as np import torch from torch.autograd import Variable import torch.backends.cudnn as cudnn import torch.optim import torch.nn as nn import torch.nn.functional as F import torch.utils.data import custom_transforms from uti...
#!/usr/bin/env python from __future__ import print_function from rosbridge_pyclient import Executor, ExecutorManager, ROSApi ,ActionClient, Goal import rospy import logging import atexit import signal import time import actionlib from rosconversions import dict_to_ros_msg, get_message_class , ros_msg_to_dict ,fill_r...
import codecs def getFileName(name): name = name.replace(" ", "") name = name.replace("'", "") name = name.lower() name = "img/team/team"+year+"/"+name+".png" return name year = "2016" teams = ["Management", "Marketing", "Mechanical", "Electronics", "Control a...
from preprocessing import create_preprocessor from indexing import create_index_simple, create_index_spimi, create_index_map_reduce import os import glob import nltk import click @click.group() @click.option('--document_folder', required=True, type=click.Path(exists=True), help='Path to the folder whic...
import numpy as np from numpy.core.numeric import Inf import timeit from scipy.optimize import linprog # for keeping track of the computatoin time of each step, I record times in a series of arrays enteringArray = [] exitingArray = [] basisArray = [] # this is a random seed, so as we would produce similar r...
import re import json import subprocess from hashlib import sha256 from pathlib import Path from urllib.parse import quote from base64 import b64encode as b64e from docutils import nodes from docutils.core import publish_parts from docutils.parsers.rst import Directive, directives, roles from pelican import signa...
# coding=utf-8 ''' @Author: Kyle @Date: 2020-03-05 08:34:04 LastEditors: Kyle LastEditTime: 2021-04-01 21:27:55 @Description: FilePath: /MarkdownToWordPress/md2wp.py ''' import sys import argparse import markdown import frontmatter import datetime from wordpress_xmlrpc import Client, WordPressPost from wordpress_xmlr...
#!/usr/bin/env python # coding: utf-8 import torch import os import time import h5py import numpy as np from timeit import default_timer as timer from sklearn.utils import shuffle import logging import torchvision from torchvision import models from torch import nn from torch import autograd from torch import optim fr...
import os import csv import sys from utils import * school_lat_min = 42.728205 school_lat_max = 42.732396 school_long_min = -73.684845 school_long_max = -73.671747 crows_lat_min = 42.723935 crows_lat_max = 42.724788 crows_long_min = -73.672665 crows_long_max = -73.672150 robhome_lat_min = 42.732189 robhome_lat_max ...
import click from prog.cli import delete from prog.cli import set from prog.cli import show from prog import client from prog import output from prog import utils import time def _list_profile_display_format(rule): rule["type"] = client.CfgTypeDisplay[rule["cfg_type"]] rule["modified"] = time.strftime("%Y-%m...
import streamlit as st import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sb import os path = os.path.join("assets","img1.png") from sklearn.model_selection import train_test_split #import machine learning models from sklearn.tree import DecisionTreeClassifier from sklearn.linear...
# 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 ...
__all__ = [ "DWARFExprBuilder" ] from .expression import ( Expression, DWARF_BINATY_OPS, Abs, Neg, Div, Minus, Mod, Mul, Plus, # arithmetic Shr, Not, And, Or, Shl, Shra, Xor, # bitwise logic Le, Ge, Eq, Lt, Gt, Ne, # comparison Dup, Register, FrameBase, AddressSize, Deref,...
import gc import logging import os import time import warnings import numpy as np import psutil import torch from sklearn import svm def classify(train_data, train_labels, test_data): # LinearSVC parameters # dual : bool, (default=True) # Select the algorithm to either solve the dual or primal optimizatio...
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import json import logging import os import tempfile import boto3 import click from hikaru.model.rel_1_18.v1.v1 import Job from pipeline_control.adapters.job_repository.job_repository import JobRepository from ...
import os import shutil from zipfile import ZipFile from flask import flash import webapp.auth.user_data as user_data from webapp.home.load_data_table import get_md5_hash from webapp.home.metapype_client import list_files_in_dir, load_eml from metapype.eml import names def check_ezeml_manifest(zipfile_name): ...
import abc import atexit from dataclasses import dataclass import functools from typing import Callable, Dict, Mapping, NamedTuple, Tuple import typing import logging from melee import console import numpy as np import tensorflow as tf import melee from slippi_ai import embed, policies, data, saving expected_player...
""" Module for datasets loading and fetchers. """ from __future__ import division, print_function, absolute_import import os from functools import partial import shutil import tarfile try: # Python 2 from urllib2 import HTTPError from urllib2 import quote from urllib2 import urlopen except ImportE...
#from platform import processor import numpy as np import torchaudio import os from datasets import load_dataset # from model import Wav2Vec2ForSpeechClassification from src.data_collator import DataCollatorCTCWithInputPadding # from src.trainer import CTCTrainer from dataclasses import dataclass, field from transform...
import socket import logging from threading import Thread from select import select from packets_dump import * from enum import Enum import packets from clientlist import ClientList from dataprovider import DataProvider from vcdj import Vcdj from nfsclient import NfsClient from ip import guess_own_iface class OwnIpSt...
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: ec2_vpc_igw_info version_added: 1.0.0 short_description: G...
from pylightnix import (StorageSettings, Matcher, Build, Context, Path, RefPath, Config, Registry, RRef, DRef, Path, build_path, build_outpath, build_cattrs, mkdrv, rref2path, mkconfig, tryread, fetchurl, instantiate, realize1, match_only, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017 <NAME> (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) import argparse import logging import multiprocessing as mp import os import sys from distutils.util import strtobool import numpy as np import pysptk from scipy.io ...
import sys import smtplib import time #from PyQt5 import QtGui,QtCore ------ Pyqt4 code from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton,QLineEdit,QTextEdit,QAction,QCheckBox,QWidget,QComboBox,QMessageBox from PyQt5.QtCore import pyqtSlot from PyQt5 import QtGui from email.mime.text import MIMEText ...