text
stringlengths
2
999k
import geocoder def geocoding(address): g = geocoder.osm(address) latitude = g.osm['y'] longitude = g.osm['x'] return latitude, longitude
""" In this module, we do some of the preparatory work that is needed to get CoolProp ready to build. This includes setting the correct versions in the headers, generating the fluid files, etc. """ from __future__ import division, print_function, unicode_literals from datetime import datetime import subprocess import...
import argparse import numpy as np import random from overrides import overrides from typing import List, Union from sacrerouge.commands import MetricSetupSubcommand from sacrerouge.data import MetricsDict from sacrerouge.data.types import DocumentType, SummaryType from sacrerouge.metrics import DocumentBasedMetric, M...
from setuptools import setup setup( name='cldfbench_glottolog', py_modules=['cldfbench_glottolog'], include_package_data=True, zip_safe=False, entry_points={ 'cldfbench.dataset': [ 'glottolog=cldfbench_glottolog:GlottologDataset', ], }, install_requires=[ ...
#importing custom built packages import cv2 as cv import tkinter as tk import distance_calculator as dc import detector as d import distraction_system as ds import snapper as sp import sys from tkinter import messagebox import time print("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\tGODs EYE >>>WELCOME\n\n\n\n\n\n") vardis=...
#seq2seq train import tensorflow as tf import numpy as np import data_processing import config import data_utils import seq2seq_wrapper from os import path #load data and split into train and test sets idx_headings, idx_descriptions = data_processing.process_data() article_metadata = data_processing.unpickle_articles(...
from subprocess import run tree_id = '10862615' cmd = f'perl .\\write_trees.pl {tree_id}' out = tree_id + '.nex' err = tree_id + '.log' with open(out, 'w') as o, open(err, 'w') as e: a = run(cmd, shell=True, stdout=o, stderr=e)
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Spherepack(Package): """SPHEREPACK - A Package for Modeling Geophysical Processes""" ...
from contracts_lib_py.account import Account from nevermined_sdk_py.secret_store import SecretStoreProvider class SSMock: def __init__(self, ss_url, keeper_url, account): self.ss_url = ss_url self.keeper_url = keeper_url self.account = account def test_secret_store_provider(): accou...
import argparse import os import pandas as pd import multiprocessing as mp import math DESCRIP = ''' Create a metabed (bed) file that describes the amount of signal in a given percentage of a gene body. Created for data processsing for metaplots. Should supply an intersected bed file containing genes (or other featur...
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import numpy as np import os import argparse parser = argparse.ArgumentParser() parser.add_argument('-d', '--openpose_dir', type=str, required=True) parser.add_argument('-i', '--input_root', type=str, required=True) parser.add_argument('-o_j', '...
# Copyright The PyTorch Lightning team. # # 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...
# Copyright (c) 2005 The Regents of The University of Michigan # Copyright (c) 2010 Advanced Micro Devices, Inc. # 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 mu...
# GPIO Zero: a library for controlling the Raspberry Pi's GPIO pins # Copyright (c) 2016-2019 Dave Jones <dave@waveform.org.uk> # Copyright (c) 2018 Martchus <martchus@gmx.net> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
# ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI 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 # # htt...
# # Solution to Project Euler problem 89 # Copyright (c) Project Nayuki. All rights reserved. # # https://www.nayuki.io/page/project-euler-solutions # https://github.com/nayuki/Project-Euler-solutions # def compute(): ans = sum(len(s) - roman_numeral_len(parse_roman_numeral(s)) for s in TO_SIMPLIFY) return str(a...
# 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...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import base64 import hashlib class bl3p (Exchange): def describe(self): return self....
import sys import datetime as dt sys.path.append("..") import matplotlib.pyplot as plt import numpy as np import pandas as pd from plotly.graph_objs import Scatter, Table from src.stock import stock def trace(x, y, name, mode, line_color, fill = None, fillcolor = None): trace = \ Scatter( ...
import cProfile import pstats from pstats import SortKey import timeit import os CRED = '\033[91m' CEND = '\033[0m' class method(): def __add__(self, other): ## + t_test(other) def __sub__(self,other): ## - p_test(other) def __mul__(self,other): ## * t_test(other) ...
# coding=utf-8 import numpy as np import cv2 import pytest import sksurgeryimage.acquire.stereo_video as sv from sksurgeryimage.utilities.utilities import are_similar def test_create_video_from_png(): original = cv2.imread('tests/data/processing/test-16x8-rgb.png') output_name = 'tests/output/test-16x8-rgb.a...
# Generated by Django 2.0.1 on 2018-03-24 15:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses_database', '0005_auto_20180324_1514'), ] operations = [ migrations.AlterField( model_name='section', name='s...
from collections import namedtuple from datetime import datetime from flask import Flask, request, redirect, abort, make_response, Response import json import logging from logging.handlers import RotatingFileHandler from mediawiki import MediaWiki import os import random import requests from threading import Thread fro...
from django import template from django.conf import settings register = template.Library() @register.inclusion_tag("analytics/tracker.html") def show_tracker(secure=False): """ Output the analytics tracker code. """ google = getattr(settings, 'ANALYTICS', {}) if google: analytics_code = g...
# coding: utf-8 """ Voyager No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v7.1.1 Contact: hello@appscode.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import ...
# coding=utf-8 # Copyright 2020 TF.Text Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
"""Hold events.""" import logging from camacq.const import BASE_EVENT _LOGGER = logging.getLogger(__name__) # pylint: disable=too-few-public-methods class Event: """A base event. Parameters ---------- data : dict The data of the event. Attributes ---------- data : dict ...
import joblib from Logging.setup_logger import setup_logger_ logger = setup_logger_("vectorization logs","logs/vectorization.log") def vectorization(sms): try: vectorizor = joblib.load("models/Vectorizer.pkl") logger.info("Vectorizer loaded") sms_vector = vectorizor.transf...
a = [ 111, <caret>222 ]
# Copyright (c) MONAI Consortium # 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, so...
import unittest from tests.availability import lxml_available, requests_available import contextlib import filecmp import pathlib import socketserver import sys import tempfile from concurrent import futures if requests_available: from garage.http import clients from garage.http import utils from tests.h...
""" A unit test class for the curation/data_steward/validation/app_errors module. """ from unittest import TestCase, mock from googleapiclient.errors import HttpError import httplib2 from validation import app_errors, main from constants.validation import main as main_consts class AppErrorHandlersTest(TestCase): ...
import json def load(ctx): with open(ctx.obj["data_location"], "r") as f: return json.load(f) def save(ctx, map_obj): with open(ctx.obj["data_location"], "w") as f: json.dump(map_obj, f, indent=4) def get_submodules(classes=[]): import viewer viewer = viewer.Viewer.instance insta...
# # 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...
from dashboard.app import app from environment import config if __name__ == '__main__': app.run(debug=True, port=config['DASHBOARD_SERVER_PORT'], load_dotenv=True)
import os from datetime import datetime, timedelta from django.conf import settings from django.contrib.staticfiles.storage import ManifestStaticFilesStorage from django.core.files import storage from django.utils import timezone class DummyStorage(storage.Storage): """ A storage class that implements get_mo...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-10-18 06:25 from __future__ import unicode_literals from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
# -*- coding: utf-8 -*- # $Id: wuilogviewer.py $ """ Test Manager WUI - Log viewer """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or mo...
from collections import OrderedDict import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from tests.base.datasets import TrialMNIST, AverageDataset, MNIST try: from test_tube import HyperOptArgumentParser except ImportError as exp: # TO...
from .proxy import RequestsProxy class CloudStorageRequestsProxy(RequestsProxy): """A GCS-specific RequestsProxy. This proxy handles retries according to [1]. [1]: https://cloud.google.com/storage/docs/json_api/v1/status-codes """ SCOPE = ( "https://www.googleapis.com/auth/devstorage.fu...
# Copyright 2020, Dimitra S. Kaitalidou, All rights reserved from time import time import numpy as np import matplotlib.pyplot as plt import create_gif as gif from xlrd import open_workbook from mpl_toolkits.mplot3d import Axes3D from sklearn import manifold plt.rcParams["font.family"] = "Times New Roman" # Initiali...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import random, RouteFinder, Board,moveLogic,bestReply from typing import Dict def getMove(head: Dict[str, int], coOrd: Dict[str, int]): if head["x"] == (coOrd["x"] + 1): return "left" if head["x"] == (coOrd["x"] - 1): return "right" if head["y"] == (coOrd["y"] + 1): return "down" ...
# 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, ...
#!/usr/bin/python # # Copyright (C) 2007 Google 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 pandas as pd fifa2019 = pd.read_csv('fifa2019.csv') df = pd.DataFrame.copy(fifa2019.sort_values(by = 'Overall', ascending = False ).head(200)) test_features=['Name','Stamina','Dribbling','ShortPassing','Penalties'] test_df= pd.DataFrame(df , columns = test_features) # 학습 데이터 준비하기 import...
# -*- coding: utf-8 -*- from .context import bot if __name__ == '__main__': bot.check()
""" Nestedcompleter for completion of hierarchical data structures. """ from typing import Any, Dict, Iterable, Mapping, Optional, Set, Union from prompt_toolkit.completion import CompleteEvent, Completer, Completion from prompt_toolkit.completion.word_completer import WordCompleter from prompt_toolkit.document import...
from typing import Any, Dict import requests from requests.models import Response class RestRequest: ''' A class representing a rest request Attributes: uri (str) method (str) headers (dict) body (dict) delay (float) Methods: with_header(key (str), val...
#!/usr/bin/env python """ Read registers from a node connected to the vscp daemon. This module can be used to test the speed of the register update. // 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 Foun...
from audiomentations import Compose,Shift,PitchShift,TimeStretch,AddImpulseResponse,FrequencyMask,TimeMask,ClippingDistortion,AddBackgroundNoise,Gain import numpy as np import os import random import librosa class TransformNeuralfp: def __init__(self, ir_dir, noise_dir, sample_rate): self.sample_rate ...
import path import pandas as pd import os import pytest from trumania.core.random_generators import SequencialGenerator from trumania.core.population import Population dummy_population = Population(circus=None, size=10, ids_gen=SequencialGenerator(max_length...
#!/usr/bin/env python3 import rospy import time from geometry_msgs.msg import Pose, Vector3 from std_msgs.msg import ColorRGBA from visualization_msgs.msg import MarkerArray, Marker from humanoid_league_msgs.msg import BallRelative, GoalRelative, ObstaclesRelative class ShowRobocupObjects: """This class provide...
# Copyright (C) 2013 Google Inc. 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 retain the above copyright # notice, this list of conditions and the ...
import random p = random.randint(0, 5) n = int(input('ola usuario, eu pensei em um numero ente 0 e 5, vc conseque descobrir qual e ? digite a sua hipotese: ')) if p == n: print ('meus parabens, voce acertou! o numero que pensei foi {}'.format(p)) else: print ('ah que pena, voce errou, o numero que pensei foi {}...
import json import itertools from dash import Dash, html, dcc def test_dada001_assets(dash_duo): app = Dash(__name__, assets_ignore=".*ignored.*") app.index_string = """<!DOCTYPE html> <html> <head> {%metas%} <title>{%title%}</title> {%css%} </head> ...
import pickle as pk import numpy as np import tensorflow as tf import argparse from keras.layers import Input, Dense from keras.models import Model from gensim.corpora import Dictionary if __name__ == '__main__': # Read command-line arguments parser = argparse.ArgumentParser(description='Generic NN model.')...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys import os from datetime import datetime from asn1crypto import x509, core, pem, util from .unittest_data import data_decorator, data from ._unittest_compat import patch patch() if sys.versi...
#!/usr/bin/env python3 import re import sys import time from scapy.all import * """ This script must be run with root privileges $ sudo ./scan.py <IP address of host> <Port Range> E.g. $ sudo ./scan.py 193.136.39.125 1-1024 Scans ports sequentially Could be improved by taking advantage of multithreading """ de...
import requests from bs4 import BeautifulSoup oyo_url = "https://www.tripadvisor.in/Hotels-g297689-Mussoorie_Dehradun_District_Uttarakhand-Hotels.html" req = requests.get(oyo_url) content = req.content soup = BeautifulSoup(content, "html.parser") all_hotels=soup.find_all("div",{"class":"meta_listing ui_columns larg...
""" Collection of environment classes that are based on rai-python """ import sys import os import time import tqdm import numpy as np import matplotlib.pyplot as plt sys.path.append(os.getenv("HOME") + '/git/rai-python/rai/rai/ry') if os.getenv("HOME") + '/git/rai-python/rai/rai/ry' in sys.path: import libry as r...
# -*- coding: utf-8 -*- from timeit import timeit from model.group import Group def test_group_list(app, db): print(timeit(lambda: app.group.get_group_list(), number=1)) # ui_list = app.group.get_group_list() def clean(group): return Group(id=group.id, name=group.name.strip()) print(timeit(l...
""" This script benchmarks the tfds / accumulator-batched implementation and tf2-gnn. In addition to graph-tfds, this requires the following packages: * [accumulator-batching](https://github.com/jackd/accumulator-batching) * [tf2-gnn](https://github.com/microsoft/tf2-gnn) * [absl-py](https://github.com/abseil/abseil-...
''' utils for processing image-tar as created by kaniko see: https://github.com/GoogleContainerTools/kaniko ''' import contextlib import dataclasses import io import json import tarfile import threading import typing import dacite import oci.model @dataclasses.dataclass class KanikoManifest: Config: str # <...
# *************************************************************** # Copyright (c) 2022 Jittor. All Rights Reserved. # Maintainers: Dun Liang <randonlang@gmail.com>. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # ************************...
"""Test ``runway tfenv`` command.""" # pylint: disable=unused-argument from __future__ import annotations import logging from pathlib import Path from typing import TYPE_CHECKING from click.testing import CliRunner from runway._cli import cli if TYPE_CHECKING: from pytest import CaptureFixture, LogCaptureFixtur...
class Conta172: """ Control object for element conta172. CONTA172 is used to represent contact and sliding between 2-D target surfaces (TARGE169) and a deformable surface, defined by this element. The element is applicable to 2-D structural and coupled-field contact analyses. It can be used...
"""Test map files generation.""" import os from django.conf import settings from django.core.management import call_command from django.test import TestCase from modoboa.core.utils import parse_map_file from modoboa.lib.test_utils import MapFilesTestCaseMixin class MapFilesTestCase(MapFilesTestCaseMixin, TestCase)...
import numpy from AbstractFunction import AbstractFunction from SimpleConstraints import SimpleConstraints class HimmelblauFunction(AbstractFunction): def __init__(self, start_point=[0, 0]): self.start_point = start_point self.constraints = SimpleConstraints([-6, -6], [6, 6]) def get_start_point(self): ...
""" The Plaid API The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from plaid.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal...
# -*- coding: utf_8 -*- outputfile = 'output paraphrase.txt' output = open(outputfile,"w+") cyrillic_encoding = "utf-8" russian_word_list = [] abkhazian_word_list = [] #read the russian word into the list with open('../draft/dictionary_prescript.ru', 'r+',encoding=cyrillic_encoding) as f: russian_word_list = f....
from lark import Lark, Transformer from pomegranate import GeneralMixtureModel from pomegranate.distributions import * class MathematicaTransformer(Transformer): def posfloat(self, args): return float(args[0].value) def negfloat(self, args): return -float(args[0].value) def listel...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
""" Testing the functionality of our data objects """ import pytest import sys import json import shutil from pathlib import Path from unittest.mock import Mock sys.path.append(str(Path(__file__).parent.parent / "ceruleanserver")) sys.path.append(str(Path(__file__).parent.parent / "ceruleanserver" / "ml")) sys.path.ap...
# pylint: disable=import-error,no-member import debug_toolbar from .prod import * # NOQA urlpatterns = [ path('__debug__/', include(debug_toolbar.urls)), ] + urlpatterns
""" Utils functions. """ import numpy as np from glob import glob import re import pandas as pd import seaborn as sns from pylab import plt from pyriemann.utils.covariance import _lwf from numpy import ones, kron, mean, eye, hstack, dot, tile from scipy.linalg import pinv from sklearn.metrics import confusion_matrix...
from hikari import Member,Embed, GatewayGuild, GuildReactionAddEvent, GuildMessageCreateEvent from lightbulb import Plugin, Context, SlashCommand, command, option, implements, guild_only from core.cd import Cooldown cd = Cooldown(1, 60) plugin = Plugin("Niveaux") plugin.add_checks(guild_only) def get_progress_bar(l...
""" MCMC for the Cauchy distribution -------------------------------- This example shows how to use pyMC to sample the likelihood for the parameters of a Cauchy distribution """ # Author: Jake VanderPlas # License: BSD # The figure produced by this code is published in the textbook # "Statistics, Data Mining, and ...
""" Options This script is largely based on junyanz/pytorch-CycleGAN-and-pix2pix. Returns: [argparse]: Class containing argparse """ import argparse import os import torch # pylint: disable=C0103,C0301,R0903,W0622 class Options(): """Options class Returns: [argparse]: argparse containing trai...
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from ...
# 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 __future__ import absolute_import, print_function import os import sys import unittest import configparser from functools import partial try: # python 3 import unittest.mock as mock def iterable_mock_open(data): m = mock.mock_open(read_data=data) m.return_value.__iter__ = lambda sel...
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta from enum import unique from typing import Any, Mapping import requests from flask import render_template from flask_babel import gettext as _ from oic.oic import ClaimsRequest from eduid_common.api.helpers import number_match_proofing, ve...
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
# Generated by Django 3.2.5 on 2021-08-12 20:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lemmatized_text', '0015_alter_lemmatizedtext_cloned_for'), ('lemmatized_text', '0015_auto_20210729_2109'), ] operations = [ ]
"""Audio module provides all the audio features (playing of sounds) for the media controller.""" import logging from kivy.clock import Clock from mpf.core.case_insensitive_dict import CaseInsensitiveDict from mpf.core.utility_functions import Util from mpfmc.core.audio.audio_interface import AudioInterface from mpfmc....
# -*- coding: utf-8 -*- """`bottle_cache.bases` module. Provides the main package interfaces for caching. """ __author__ = 'Papavassiliou Vassilis' __date__ = '23-1-2016' import abc import six from . import __version__ as version class CacheError(Exception): """Raises when a caching error occurs (i.e connectio...
import numpy as np import numba as nb @nb.jit(nopython=False, forceobj=True, parallel=False, fastmath=True) def relu(x): return np.maximum(x, 0) # Deep learning convolutional operator (stride = 1) @nb.jit(nopython=False, forceobj=True, parallel=True, fastmath=True) def conv2d(input, weights): K = weights.sh...
import json import pytest from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from openslides.core.config import config from openslides.core.models import Tag from openslides.motions.models import ( Category, ...
all_timezones = [ "Africa/Abidjan", "Africa/Accra", "Africa/Addis_Ababa", "Africa/Algiers", "Africa/Asmara", "Africa/Asmera", "Africa/Bamako", "Africa/Bangui", "Africa/Banjul", "Africa/Bissau", "Africa/Blantyre", "Africa/Brazzaville", "Africa/Bujumbura", "Africa/C...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Prints structures in a manner similar to Windbg's "dt" command. """ from __future__ import print_function from __future__ import unicode_literals import glob import os import re import subprocess import tempfile import gdb import pwndbg.memory import pwndbg.typeinfo ...
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import torch import torch.optim as optim import torch.utils.data from model import LSTMClassifier def model_fn(model_dir): print("Loading model...") # First, load the parameters used to create the m...
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='Project-Archiver', version='2.0.1', description='A Project Archiving Utility for Fusion 360', long_description=long_description, packages=['Project-Archiver', 'Project-Archiver.apper.apper...
# 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 agreed to in writing, ...
# -*- coding: utf-8 -*- import KRIS from KRIS.lib.curve.ttypes import * from datetime import datetime import time, random, sys, ast, re, os, io, json, subprocess, threading, string, codecs, requests, ctypes, urllib, urllib2, urllib3, wikipedia, tempfile from bs4 import BeautifulSoup from urllib import urlopen import r...
from metrics.Accuracy import Accuracy # from metrics.BCR import BCR from metrics.CalibrationNeg import CalibrationNeg from metrics.CalibrationPos import CalibrationPos from metrics.CV import CV from metrics.DIAvgAll import DIAvgAll from metrics.DIBinary import DIBinary from metrics.FNR import FNR from metrics.FPR impor...
import pytest from blockbuster_clone.users.models import User from blockbuster_clone.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> User: return UserFactory()
""" Eval Execution Execute output programs and then check execution accuracy and syntax accuracy. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import collections import h5py import os import numpy as np from tqdm import tqdm import ...