text
stringlengths
2
999k
# 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...
# Developed by Vinicius José Fritzen # Last Modified 27/04/19 08:14. # Copyright (c) 2019 Vinicius José Fritzen and Albert Angel Lanzarini from django.contrib.auth.decorators import permission_required from django.contrib.auth.views import redirect_to_login from django.http import HttpResponseRedirect from django....
""" Ensemble the predictions from different model outputs. """ import argparse import json import pickle import numpy as np from collections import Counter from data.loader import DataLoader from utils import scorer, constant def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('pred_file...
from nose.tools import * from nlpre import separated_parenthesis from nlpre.separated_parenthesis import remove_trailing_space class Separated_Parenthesis_Tests: @classmethod def setup_class(cls): cls.parser = separated_parenthesis(min_keep_length=0) def single_parenthesis_pair_test(self): ...
from __future__ import unicode_literals from django.apps import AppConfig class TarangConfig(AppConfig): name = 'tarang'
""" NetHSM All endpoints expect exactly the specified JSON. Additional properties will cause a Bad Request Error (400). All HTTP errors contain a JSON structure with an explanation of type string. All <a href=\"https://tools.ietf.org/html/rfc4648#section-4\">base64</a> encoded values are Big Endian. # noqa: E...
# Copyright (C) 2010-2011 Richard Lincoln # # 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, publish...
""" Enables multiple commonly used features. Method resolution order: - `tqdm.autonotebook` without import warnings - `tqdm.asyncio` on Python3.5+ - `tqdm.std` base class Usage: >>> from tqdm.auto import trange, tqdm >>> for i in trange(10): ... ... """ import sys import warnings from .std import...
import bson import re import logging from datetime import datetime from functools import reduce from mongoengine import EmbeddedDocumentField, EmbeddedDocument, Document, QuerySet, register_connection from pymongo import ReadPreference from mongoengine.errors import * from spaceone.core import config from spaceone.core...
# # Copyright 2015 Quantopian, 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 wr...
from NXController import Controller import time, datetime def over_3days(ctr, current_date, isFirst): # 如果不是第一次執行程式 if not isFirst: Restart_game(ctr) for i in range(3): tommorrow = current_date + datetime.timedelta(days=1) # 極巨戰主頁 ctr.A() time.sleep(2) ctr...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2017 Juan Cabral # 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 withou...
# try: # total = 1/0 # # this will not execute # except Exception: # total = 0 # print(total) # 0 # try: # total = 1/0 # print("This will not show up.") # except Exception: # print("Exception was caught") # Exception was caught # total = 0 # print(total) # 0 # num = input("What is a...
#!/usr/bin/env python script_name = 'you-get' __version__ = '0.4.1545'
# coding: utf-8 """ maiot Core Engine API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 i...
# -*- coding: utf-8 -*- """The Microsoft Internet Explorer (MSIE) Cache Files (CF) event formatters.""" from __future__ import unicode_literals from plaso.formatters import interface from plaso.formatters import manager from plaso.lib import errors class MsiecfItemFormatter(interface.ConditionalEventFormatter): "...
# port.py from . import reader def read_portfolio(filename, *, errors='warn'): ''' Read a CSV file with name, date, shares, price data into a list. ''' return reader.read_csv(filename, [str, str, int, float], errors=errors) if __name__ == '__main__': portfolio = read_portfolio('Data/portfolio.c...
# Copyright 2020 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...
import math from typing import Dict, Optional, Union, Tuple, List, cast from collections import defaultdict from .backends import Ops, NumpyOps, CupyOps, get_current_ops from .types import Generator, FloatsXd from .config import registry KeyT = Tuple[int, str] FloatOrSeq = Union[float, List[float], Generator] IntOr...
""" Just another Python API for Travis CI (API). A module which provides the communicator of the "Repositories" resource type. Author: Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom Project link: https://github.com/funilrys/PyTravisCI Project documentation: https://pytravisci.readthedocs.io/en/...
import core import telegram import logging PLUGINVERSION = 2 LOGGER = logging.getLogger("AntiSpamBot") # Always name this variable as `plugin` # If you dont, module loader will fail to load the plugin! SPAMBOTS_RAW = """ @pollsc @acing @GroupManagerDomina @GroupManagerDomina @akeredbot @pedoannihilation @...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ***************************************************************************** # $Id$ # # Project: GDAL # Purpose: Validate Cloud Optimized GeoTIFF file structure # Author: Even Rouault, <even dot rouault at spatialys dot com> # # *********************************...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
# -*- coding: utf-8 -*- """Tests of dataset utility functions.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import logging from pathlib import Path from itertools import product import num...
# 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 # # Authors: # - Alexey Anisenkov, anisyonk@cern.ch, 2018 # - Paul Nilsson, paul.nilsson@cern.ch, 20...
"""Simple test script for 2.13" 212x104 monochrome display. Supported products: * Adafruit Flexible 2.13" Monochrome * https://www.adafruit.com/product/4243 """ import time import board import displayio import adafruit_il0373 displayio.release_displays() # This pinout works on a Feather M4 and may need to b...
# -*- coding: utf-8 -*- ############################################################################# # @package ad_hmi # @brief CAN proxy of python package ad_hmi. ############################################################################# # @author WANG Vincent # @copyright (c) All rights reserved. ################...
import shutil import sys import hashlib import pathlib import json import base64 as encoder import os import time from pathlib import Path def zip_code(output: pathlib.Path, to_zip: pathlib.Path): shutil.make_archive(output, 'zip', to_zip) with open(output + '.zip',"rb") as f: bytes = f.read() ...
# connect to the API from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt from datetime import date #read scihub credentials from scihub file f = open("scihub", "r") cred=f.read().splitlines() f.close() api = SentinelAPI(cred[0], cred[1], 'https://scihub.copernicus.eu/dhus') # search by polygon, time, a...
import re import timeit from collections import defaultdict DO_TEST = 0 def read_file(filename): with open(filename, 'r') as file: data_string = file.read() return data_string.split("\n") def do_part1(file): data = read_file(file) randoms = data[0].split(',') decks = get_decks(data[2:]...
# @before-stub-for-debug-begin # @before-stub-for-debug-end # # @lc app=leetcode.cn id=109 lang=python3 # # [109] 有序链表转换二叉搜索树 # # https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree/description/ # # algorithms # Medium (73.02%) # Likes: 268 # Dislikes: 0 # Total Accepted: 35.4K # Total Su...
# -*- encoding: utf-8 -*- """Handle portfolio-orders endpoints.""" from ..decorators import dyndoc_insert, endpoint from .base import Portfolio from .responses.orders import responses @endpoint("openapi/port/v1/orders/{ClientKey}/{OrderId}") class GetOpenOrder(Portfolio): """get a specific open order of a clien...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('base', '0003_auto_20150122_2130'), ('home', '0005_remove_homepage_feature...
# (C) Datadog, Inc. 2019 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from copy import deepcopy import pymysql import pytest from datadog_checks.cacti import CactiCheck from datadog_checks.dev import TempDir, WaitFor, docker_run, run_command from . import common from ....
# Generated by Django 3.2.7 on 2021-09-21 09:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("episodes", "0018_update_search_vector_trigger"), ] operations = [ migrations.AddField( model_name="audiolog", name="...
default_app_config = "pagetools.menus.apps.MenusConfig"
from dataclasses import dataclass from typing import Dict, List, Optional, Tuple import aiosqlite from beer.consensus.block_record import BlockRecord from beer.types.blockchain_format.sized_bytes import bytes32 from beer.types.blockchain_format.sub_epoch_summary import SubEpochSummary from beer.types.coin_spend impor...
# Lint as: python3 # Copyright 2018, The TensorFlow Federated 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 ...
import os import tensorflow as tf tf.random.set_seed(10) import numpy as np from cl_csen_regressor.utils import * class model: def __init__(self): self.imageSizeM = 80 self.imageSizeN = 15 self.model = None self.history = None self.x_train = None self.x_val = None ...
from __future__ import annotations import pathlib import sys from typing import TYPE_CHECKING from installer.destinations import SchemeDictionaryDestination from installer.exceptions import InvalidWheelSource from installer.sources import WheelFile as _WheelFile from pip._vendor.pkg_resources import EggInfoDistributi...
import numpy as np num = [3,5,6,9] split_param = [] split_param.append(len(num[0])) for layer_num in num[1:-2]: split_param.append(layer_num + split_param[-1]) print(split_param) to_split = np.range(23) split = np.split(to_split, split_param) print(split)
""" Django settings for ClientMapper project. Generated by 'django-admin startproject' using Django 2.0.13. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import...
from ..authoring import reload reload("src", ["common", "events", "linter_base", "linter_support"]) reload("src.commands") reload("src.linter") from .events import * from .commands import * __all__ = [ # common "common", # commands "HyperhelpAuthorCreateHelpCommand", "HyperhelpAuthorEditHelpComm...
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else [] PROJECT_CATKIN_DEPENDS = "message_runtime;std_msgs;geometry_msgs;actionlib_msgs;nav_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_...
import torch import numpy as np class EntityEmbedding(torch.nn.Module): def __init__(self, vocab_size, hidden_size, input_size): super(EntityEmbedding, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.vocab_size = vocab_size self.softmax = torch.nn.Softmax(dim=1) weights ...
#!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=invalid-name """Let viewers pay currency to boost currency payouts for everyone in chat for x seconds""" import json import os, os.path import codecs from time import time # --------------------------------------- # [Required] Script information # -----------...
""" ======================== configuration.py ======================== In computational biology and bioinformatives, it's common practice to prefer configuration files to command line arguments. This module is responsible for parsing the application's configuration file. Still working on the configuration step. """ ...
__version__ = '3.8.19'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # RenderDoc documentation build configuration file, created by # sphinx-quickstart on Thu May 12 16:59:09 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
import unittest import numpy import nlcpy from nlcpy import testing import nlcpy as vp nan_dtypes = ( numpy.float32, numpy.float64, numpy.complex64, numpy.complex128, ) shapes = ( (4,), (3, 4), (2, 3, 4), ) @testing.parameterize(*( testing.product({ 'shape': shapes, }) ))...
import telebot import pymysql main_phrase = "Хочешь начать больше ценить свою жизнь, свои действия и успехи? Тогда очень здорово, что мы встретились.\n\nЯ помогаю людям делать практику благодарности. Это тот самый работающий способ стать немного счастливее. Его используют в когнитивно-поведенческой терапии, чтобы при...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """GLM and RF analysis for 5 burned area datasets in turn.""" from wildfires.analysis.analysis import ( CHELSA, GLM, HYDE, LOGGING, MCD64CMQ_C6, RF, VODCA, AvitabileThurnerAGB, CCI_BurnedArea_MERIS_4_1, CCI_BurnedArea_MODIS_5_1, ...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
import os import datetime import pytest from smart_getenv import getenv from kirby.api.queue import Queue def test_it_can_create_a_queue(): q = Queue("my-queue", testing=True) q.append("hello") assert q.last() == "hello" @pytest.mark.integration @pytest.mark.skipif( not os.getenv("KAFKA_BOOTSTRAP_S...
# coding=utf-8 from nwpc_hpc_model.base import query_category, query_item, query_property, value_saver, record_parser from nwpc_hpc_model.base.query_property import QueryProperty from nwpc_hpc_model.base.query_item import QueryItem from .query_model import AixDiskUsageQueryModel from .query_category import AixDiskUsage...
from functools import lru_cache from inspect import Parameter, Signature, iscoroutinefunction, signature from typing import ( Any, Awaitable, Callable, Dict, List, Optional, Sequence, Set, Tuple, Type, TypeVar, Union, ) from attr import Factory, define, field, frozen fr...
##################################################################### # # # /__init__.py # # # # Copyright 2013, Monash University ...
import unittest import torch from models import VanillaVAE from torchsummary import summary class TestVAE(unittest.TestCase): def setUp(self) -> None: # self.model2 = VAE(3, 10) self.model = VanillaVAE(3, 10) def test_summary(self): print(summary(self.model, (3, 64, 64), device="cpu"...
# 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...
""" test the scalar Timedelta """ from datetime import timedelta import numpy as np import pytest from pandas._libs.tslib import NaT, iNaT import pandas.compat as compat import pandas as pd from pandas import ( Series, Timedelta, TimedeltaIndex, timedelta_range, to_timedelta) from pandas.core.tools.timedeltas im...
#!/usr/bin/env python # Copyright 2021 The Matrix.org Foundation C.I.C. # # 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 ...
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) s = input() print(s[:len(s) - 8])
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
########################################################################## # Copyright (c) 2009, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstrasse 6, CH...
""" Views for analyses """ from flask import Blueprint # from .api import bla blueprint = Blueprint('analysis', __name__)
import time import random # Core functionality class # class RainbowEyesCORE: # Constructor sets up the attributes d^-^b # def __init__(self, set_robot, set_hue=None, set_sat=None): #vars self.hue = 0 if set_hue == None else set_hue self.sat = 1 if set_sat == None else set_sat ...
from django.conf.urls import url from .api_views import ( APIDocumentIndexInstanceNodeListView, APIIndexInstanceDetailView, APIIndexInstanceListView, APIIndexInstanceNodeDetailView, APIIndexInstanceNodeDocumentListView, APIIndexInstanceNodeListView, APIIndexTemplateDetailView, APIIndexTemplateDocumentT...
def main(): pass main()
import requests import six.moves.urllib.parse as urlparse import json import os import logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) import coloredlogs coloredlogs.install(level='INFO', logger=logger) class Client(object): """ Gym client to interface with gym_http_server """ ...
""" Django settings for djangoblog project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # # Some useful functions for angle manipulation. # # Rob Siverd # Created: 2011-04-25 # Last modified: 2018-07-19 #-------------------------------------------------------------------------- #*****************************************************************...
""" Stackoverflow related things. """ import os import sys def download_stack_json(): """ Downloads some question and answer info. """ import pygameweb.config stack_key = pygameweb.config.Config.STACK_KEY url = (f"'https://api.stackexchange.com/2.2/search?key={stack_key}" "((&site=stacko...
from django import forms from django.contrib.auth import password_validation from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm from django.utils.translation import gettext_lazy as _ from announcement.models import Announcement, Comment from pet.models import Pet, Picture from users.models ...
from django.apps import AppConfig class FinanceConfig(AppConfig): name = 'finance' verbose_name = '简单记账系统'
#! /usr/bin/env python # # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. # Contact: khmer-project@idyll.org # """ Eliminate reads with median k-mer abundance higher than DESIRE...
# module some_module from .item import Item, BaseItem
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/corellia/shared_corl_stair_large_s01.iff" result.attribute_te...
import cv2 from datetime import datetime def detectImage(name): imagePath = name cascPath = "haarcascade_frontalface_default.xml" # Create the haar cascade faceCascade = cv2.CascadeClassifier(cascPath) # Read the image image = cv2.imread(imagePath) gray = cv2.cvtColor(image, cv2.COLOR_BGR...
""" /prettify_exceptions/__init__.py Copyright (c) 2020 ShineyDev 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 req...
""" A tool used to fork repositories and configure members for RISC-V """ import argparse import requests import sys import yaml def load_yaml(file_path): """ Load yaml file :param file_path: path of the yaml file ready to load :return: content of the file """ try: with open(file_path,...
import h2o # pylint: disable=import-error import bentoml from bentoml.adapters import DataframeInput from bentoml.h2o import H2oModelArtifact @bentoml.env(infer_pip_packages=True) @bentoml.artifacts([H2oModelArtifact("model")]) class H2oExampleBentoService(bentoml.BentoService): @bentoml.api(input=DataframeInpu...
# -*- coding: utf-8 -*- ''' Copyright (c) 2019 Colin Curtain 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, mer...
from typing import Union import numpy as np from copulae.copula.abstract import AbstractCopula as Copula from copulae.core import create_cov_matrix, near_psd, tri_indices from copulae.stats import kendall_tau, spearman_rho InitialParam = Union[float, np.ndarray] def is_elliptical(copula: Copula): return copula...
from django.db import models from subjects.models import StudentClass from students.models import Student from django.urls import reverse from django.contrib.postgres.fields import JSONField # Create your models here. class DeclareResult(models.Model): select_class = models.ForeignKey(StudentClass, on_delete=mode...
import torch import torch.nn as nn from torch3d.nn import functional as F from torch3d.nn.utils import _single class FeaturePropagation(nn.Sequential): """ The feature propagation from the `"PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space" <https://arxiv.org/abs/1706.02413>`_ pa...
import json import logging from abc import ABC import slack_actions from ws_sdk.web import WS import slack_format class Report(ABC): def __init__(self, ws_conn_details: dict, config: dict, ws_connector: WS): self.ws_conn_details = ws_conn_details ...
# coding: utf-8 ######################################################################### # 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> # # author yeeku.H.lee kongyeeku@163.com # # # # version...
from __future__ import absolute_import from sklearn.linear_model import LogisticRegression from sklearn.externals import joblib from sklearn.model_selection import train_test_split from .utils.parameters import * from .data_processing import load_data from .init_es import init_es from .fuzzy_matching.candidate_graph ...
# Copyright 2018 The Cirq Developers # # 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 ...
import math from GeometricObject import GeometricObject class Triangle(GeometricObject): def __init__(self, side1 = 1.0, side2 = 1.0, side3 = 1.0, *args): super().__init__(*args) self.__side1 = side1 self.__side2 = side2 self.__side3 = side3 def get_side1(self): return ...
""" Copyright (c) 2017 Dependable Systems Laboratory, EPFL 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,...
# -*- coding: utf-8 -*- # Test data taken from http://www.timeanddate.com/sun/uk/london import datetime import freezegun import pytest import pytz from almost_equal import datetime_almost_equal from astral import sun from astral.sun import SunDirection class TestGoldenHour: """Tests for the golden_hour functio...
from copy import deepcopy with open("day-04/input.txt", "r") as file: numbers = [int(i) for i in file.readline().split(",")] boards = [ [[int(i) for i in row.split()] for row in board.strip().split("\n")] for board in file.read().strip().split("\n\n") ] def find_first(numbers, boards, mar...
# # Copyright (c) 2018 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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...
#Equipo 3 #Lider/Supervisor: Emilio Gallegos A01066813 #Participante: Josemaria Robledo Lara A01612376 #Se importan las bibliotecas necesarias. import os from scipy import signal, misc import matplotlib.pyplot as plt import numpy as np from skimage.color import rgb2gray from skimage import io #Se crea matriz de 4x4...
import pandas as pd import uuid import itertools import datetime from . import utils def escape_objects(df, columns=None): df = df.copy() if columns is None: columns = [ ('questionaire', 'uuid'), ('wm', 'id',), ] # Add flattened columns too, so we catch JSON and C...
# 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 unittest import torch from fairseq_mod.data import LanguagePairDataset, TokenBlockDataset from fairseq_mod.data.concat_dataset import ...
"""Unit tests for Superset Celery worker""" import json import subprocess import time import unittest import pandas as pd from past.builtins import basestring from superset import app, db from superset.models.helpers import QueryStatus from superset.models.sql_lab import Query from superset.sql_parse import SupersetQ...
import json import collections import numpy as np import matplotlib as mpl from matplotlib import cm as mpl_cm from .._utils.niimg_conversions import check_niimg_3d from .. import datasets, surface from . import cm from .js_plotting_utils import ( HTMLDocument, colorscale, mesh_to_plotly, get_html_template, add_j...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # 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 ma...