text
stringlengths
2
999k
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
#!"D:\Coding Files\Pycharm\Tello Drone\venv\Scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install' __requires__ = 'setuptools==40.8.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.e...
# -*- coding: utf-8 -*- from __future__ import print_function """ Created on Mon Sep 25 09:51:13 2017 @author: xingshuli """ ''' The default_size of input image is 299 and min_size = 71 Should note that the input preprocessing function is also different from VGG16 and ResNet but same as Xception: the pixel value betw...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import requests, json, socket from django.shortcuts import render def index(request): return render(request, 'web/index.html', {}) def details(request, ip_str): url = "http://freegeoip.net/json/" + str(ip_str) req = requests.get(url=url[:-1]...
#!/usr/bin/env python # coding: utf-8 # In[21]: import os import time from colorama import init, Fore import paramiko import json import time # In[22]: green = Fore.GREEN red = Fore.RED yellow = Fore.YELLOW blue = Fore.BLUE purple = Fore.MAGENTA reset = Fore.RESET # In[23]: def error(mode, string): if mo...
bad_words = ['fuck', 'ass', 'penis', 'shit'] ## @story{8} In order to respond to profanity, the bot needs a way to # determine whether a message contains profanity. def check_for_profanity(message): return any([bad_word in message.lower().split() for bad_word in bad_words])
import dataclasses from typing import List, Optional @dataclasses.dataclass(init=True, repr=True) class Repo: """Dataclass object of Cydia/Slieo repository. Attributes: label (str): Label of the repository. suite (str): Status of the repository. version (str): Version of the repositor...
from typing import List import urllib.request as http import json, os, requests from guet.steps.action import Action class SetGithub(Action): token = os.getenv('GITHUB_TOKEN', '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') owner = "AbhishekMashetty" repo = "assign-git" query_url = f"https://api.github.co...
#!/usr/bin/env python """Direct2BadgerfishNexson class""" from peyotl.nexson_syntax.helper import (NexsonConverter, get_nexml_el, _add_redundant_about, _convert_hbf_meta_val_for_xml, ...
# TvNorm.py import torch import torch.nn as nn class TvNorm(nn.Module): """ normalization using the total variation; idea is to normalize pixel-wise by the length of the feature vector, i.e., MATLAB notation: z = diag( 1/ sqrt( sum(x.^2,3)+eps)) x Attributes: eps: small float s...
from django.conf import settings ALLAUTH_JANUS_PROFILE_VIEW = getattr(settings, 'ALLAUTH_JANUS_PROFILE_VIEW', 'janus.views.ProfileView') ALLAUTH_JANUS_ADMIN_CLASS = getattr(settings, 'ALLAUTH_JANUS_ADMIN_CLASS', 'janus.admin.JanusUserAdmin')
# Copyright (C) 2020-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import json from addict import Dict import pytest from openvino.tools.pot.graph import load_model from openvino.tools.pot.data_loaders.creator import create_data_loader from openvino.tools.pot.engines.creator import create_engine from ...
from Modules_Ex import Ex110 from Modules import my_inputs preco = my_inputs.inputfloat('Escreve o preço de um produto, em euros: ') print(Ex110.price_manipulation(preco, 20, 10))
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
import requests import tkinter as tk from tkinter import ttk, filedialog, messagebox from PIL import Image, ImageTk from ECG_analysis import read_data, manipulate_data, filter_data from api.shared_methods import str_to_int import image_toolbox as it import os # Server path path = "http://vcm-23156.vm.duke.edu:5000" #...
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
# -*- coding: utf-8 -*- """ pyrseas.dbobject.column ~~~~~~~~~~~~~~~~~~~~~~~ This module defines two classes: Column derived from DbSchemaObject and ColumnDict derived from DbObjectDict. """ from . import DbObjectDict, DbSchemaObject, quote_id from .privileges import privileges_from_map, add_grant, diff...
import json class BlackUser: def __init__(self): self.BattleTag = "" self.Tier = "" self.Discord = "" self.Old = "" self.Gender = "" self.OtherPersonalInformation = "" self.Reason = "" self.Source = "" self.Explanation = "" self.SubBa...
# Strings print("hello world") print('hello World') print('''hello world''') print("""hello world""") print(type("hello world")) # concadenacion print("Bye" + "world") # integer print(30) # float print(30.5) # Boolean True False # List [10, 20, 30, 55] ['Helllo world', 'Bye', 'Adios'] [1...
# 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 may ...
import commands import sys use_locale = True if use_locale: currency = commands.getoutput('./reader 0') decimal = commands.getoutput('./reader 1') cmd = ('java checker ' + currency + sys.argv[1] + decimal + sys.argv[2]) print commands.getoutput(cmd)
import json import sys w, h = 18, 16; rooms = [[None for x in range(w)] for y in range(h)] def encode(room_json): out = "DB " collectible_count = 0 if len(room_json["collectibles"]) > 7: print("error: too many collectibles assigned to room {},{}".format(room_json["x"], room_json["y"])) ...
import matplotlib.pyplot as plt from plotnine import * import pandas as pd df_penduduk = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/datakependudukandki-dqlab.csv') (ggplot(data=df_penduduk) + aes(x='NAMA KABUPATEN/KOTA', y='JUMLAH') + geom_col() + coord_flip() ).draw() plt.tight_layout() plt.show()
from django.apps import AppConfig class WebsiteConfig(AppConfig): name = 'website' verbose_name = 'yafish'
# Thai Thien 1351040 import cv2 import copyright import numpy as np from os import listdir from os.path import isfile, join, splitext import os.path class PreProcessor: def __init__(self, face_xml, eye_xml, mouth_xml, nose_xml): """ :param face_xml: pretrain cascade classifier for face detection ...
# Lint as: 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 agr...
import functools import tornado.ioloop import tornado.options import tornado.web from tornado_swagger.setup import setup_swagger class ExampleHandler(tornado.web.RequestHandler): @functools.lru_cache() def get(self, organization): """ Description end-point --- tags: ...
import os from urllib.request import urlopen from datetime import datetime import math from astropy.coordinates import SkyCoord from astropy import units as u from astroquery.mast import Tesscut from astropy.io import fits import numpy as np from lightkurve import TessLightCurveFile, search_targetpixelfile import sys i...
import os import pickle import json import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set() def scatterplot(attribute_idx, table, epsilons, label, ax): ys = [] xs = [] for eps in epsilons: row = table[eps] y = row[attribute_idx] ys.append(y) xs.ap...
# Generated by Django 3.1.3 on 2021-06-16 11:49 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('auctions', '0006_auto_20210614_2224'), ] operations = [ migrations.AlterField( model_name='auct...
''' Contains PidFd() class Reads the /proc/<pid>/fd directory and resolves symbolic links NB requires sudo ''' from contextlib import suppress from logging import getLogger from os import listdir, readlink, path as ospath from .readfile import ReadFile LOGGER = getLogger(__name__) class PidFd(ReadFile): '...
import tkinter as info import tkinter as tk class Application(info.Frame): def __init__(self, master=None): super().__init__(master) self.master = master self.pack() self.create_widgets() def create_widgets(self): self.hi_there = info.Button(self) self.hi_there[...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.12 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. """Codes for various seismological computations""" from sys import version_info as _swig_python_version_info if _s...
# ---- neuron ---- import sys import inspect print('The `neuron` library has been renamed to `neurite` to avoid pypi conflicts.\n' 'neuron imports will be depricated. Please switch to importing neurite.', file=sys.stderr) # print file that imports neuron frame = [s for s in inspect.stack(0) if s.function ...
# Author: Guilherme Aldeia # Contact: guilherme.aldeia@ufabc.edu.br # Version: 1.0.1 # Last modified: 21-11-2021 by Guilherme Aldeia """ Explain by Local Approximation explainer. """ from iirsBenchmark.explainers._base_explainer import Base_explainer from sklearn.utils.validation import check_array fro...
import collections from directory_api_client.client import api_client from directory_constants import choices import directory_components import directory_components.helpers from django.shortcuts import Http404 from django.utils import translation from django.utils.html import escape, mark_safe NotifySettings = col...
# coding: utf-8 """ Kimai 2 - API Docs JSON API for the Kimai 2 time-tracking software. Read more about its usage in the [API documentation](https://www.kimai.org/documentation/rest-api.html) and then download a [Swagger file](doc.json) for import e.g. in Postman. Be aware: it is not yet considered stable and...
import enum import time from typing import Any, Dict, List, Optional, TypeVar, Union from determined.common import schemas class DeviceV0(schemas.SchemaBase): _id = "http://determined.ai/schemas/expconf/v0/device.json" container_path: str host_path: str mode: Optional[bool] = None @schemas.auto_...
# -*- coding: utf-8 -*- from django.db import models # Create your models here. from company.models import Company from student.models import Student class Oferta(models.Model): """nom = models.CharField(max_length=50,blank=False,null=False) requirements = models.CharField(max_length=1000, blank=False) EXPERIEN...
# -*- coding: utf-8 -*- from cms.management.commands.subcommands.base import SubcommandsCommand from cms.models import Page from cms.models.pluginmodel import CMSPlugin from django.core.management.base import LabelCommand from cms.utils.compat.input import raw_input class UninstallApphooksCommand(LabelCommand): a...
"""Config flow to configure deCONZ component.""" import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PORT from homeassistant.helpers import aiohttp_client from .const import ( CONF_ALLOW_DECONZ_GRO...
#!/usr/bin/env python # # Copyright 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 o...
import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.yaxis", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name,...
from pytest import fixture, raises from py61850.types import VisibleString @fixture def extreme(): return VisibleString('a' * 0xFF) @fixture def none(): return VisibleString(None) @fixture def string(): return VisibleString('string') @fixture def empty(): return VisibleString('') # === DECODE...
caminho = open(r'C:\Users\dreis\Desktop\Estudos\Projetos\words.txt', 'r') def line20(): for line in caminho: if len(line.strip()) > 20: print(line.strip()) line20()
# coding: utf-8 ######################################################################### # 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> # # author yeeku.H.lee kongyeeku@163.com # # # # version...
import numpy as np import cv2 from matplotlib import pyplot as plt from PIL import Image from scipy import ndimage import time import os def get_decisionMap(img): img_gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) img = img_gray[34:434, 8:-8] [h, w] = img.shape # lap kernel k = np.array([[-1, -1...
_base_ = [ '../_base_/models/fcn_hr18.py', '../_base_/datasets/loveda.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_80k.py' ]
# Copyright 2018 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 -*- """OpenAPI core operations models module""" from openapi_core.schema.responses.exceptions import InvalidResponse class Operation(object): """Represents an OpenAPI Operation.""" def __init__( self, http_method, path_name, responses, parameters, summary=None, des...
import os import websocket import threading import json import requests from datetime import datetime, timedelta import dateutil.parser from time import sleep import auditing.datacollectors.utils.PhyParser as phy_parser from auditing.datacollectors.BaseCollector import BaseCollector from auditing.datacollectors.utils.P...
# Copyright 2016 Google Inc. 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 law or ...
# A string is called a k-string if it can be represented as k concatenated copies of some string. For example, the # string "aabaabaabaab" is at the same time a 1-string, a 2-string and a 4-string, but it is not a 3-string, a 5-string, # or a 6-string and so on. Obviously any string is a 1-string. # You are given a st...
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import textwrap import unittest from unittest.mock import MagicMock, Mock, patch from ... import commands from ...commands.infer import ( Field...
from abc import ABC, abstractmethod, abstractclassmethod class Onefun(ABC): # -------------------------- # alternative constructors # -------------------------- @abstractclassmethod def initconst(cls): raise NotImplementedError @abstractclassmethod def initempty(cls): rai...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import unittest from dashboard.common import b...
import csv import logging from abc import ABC, abstractmethod from pathlib import Path from typing import Dict, List, Set from hed_utils.support import google_spreadsheet __all__ = [ "AStorage", "CsvJobsStorage", "GoogleSheetsJobsStorage" ] _log = logging.getLogger(__name__) _log.addHandler(logging.NullH...
''' LunarLander-v2 solution by Michel Aka https://github.com/FitMachineLearning/FitML/ https://www.youtube.com/channel/UCi7_WxajoowBl4_9P0DhzzA/featured Using Modified Q Learning, Bellman, Reinforcement Learning, RL memory ''' import numpy as np import keras import gym import os import h5py from keras.models import S...
from mindsdb.libs.data_types.object_dict import ObjectDict import mindsdb.config as CONFIG from mindsdb.libs.constants.mindsdb import MODEL_GROUP_BY_DEAFAULT_LIMIT class TransactionMetadata(ObjectDict): def __init__(self): self._ignore_keys = ['test_from_data', 'from_data'] self.model_name = Non...
import time import queue from typing import List, Optional, Union from wsproto.frame_protocol import CloseReason from wsproto.frame_protocol import Opcode from mitmproxy import flow from mitmproxy.net import websocket from mitmproxy.coretypes import serializable from mitmproxy.utils import strutils, human class Web...
import time from pathlib import Path from sqlalchemy import inspect, exc from setup import create_local_db from mapper import create_app from mapper.api.models import db, Indicator from mapper.common.get_ejscreen_data import run_etl test_data = Path.cwd() / "tests" / "data" / "sample.geojson" def create_local_app(...
# Hide deprecation warnings from Theano import warnings warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.filterwarnings("ignore", category=FutureWarning) # Hide Theano compilelock warnings import logging logger = logging.getLogger("theano.gof.compilelock") logger.setLevel(logging.ERROR)
from clickhouse_cli.clickhouse.sqlparse_patch import KEYWORDS as sqlparse_keywords FUNCTIONS = ( # arithmetic / logic 'plus', 'minus', 'multiply', 'divide', 'intDiv', 'intDivOrZero', 'modulo', 'negate', 'abs', 'bitAnd', 'bitOr', 'bitXor', 'bitNot', 'bitShiftL...
""" Script used to generate Figure 2.3, which provides a comparison between the protocell composition with maximal protocell-level replication rate and the modal composition achieved at steady state for the baseline protocell model (on the fast-slow edge of the simplex) in the limit of strong between-group competition...
# Copyright (c) 2019 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 sys from nameko.rpc import Rpc as NamekoRpc from nameko.rpc import RpcConsumer as NamekoRpcConsumer from nameko_amqp_retry import Backoff, BackoffPublisher, expect_backoff_exception from nameko_amqp_retry.constants import ( CALL_ID_STACK_HEADER_KEY, RPC_METHOD_ID_HEADER_KEY ) class RpcConsumer(NamekoRpcCo...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
import pymysql.cursors import conf class DbClient(object): def __init__(self): self.connection = None self.connection = pymysql.connect(host=conf.DB_HOST, user=conf.DB_USER, password=conf.DB_PASSWORD, ...
from .base import BaseParentNotionObject class PageParent(BaseParentNotionObject): page_id: str class DatabaseParent(BaseParentNotionObject): database_id: str class WorkspaceParent(BaseParentNotionObject): workspace: bool
from efficient_rl.oo_mdp_operations.OperationsClass import Operations
#!/usr/bin/env python from python.decorators import euler_timer def special_perms(num_2, num_3): if num_3 == 0: return [[2] * num_2] elif num_2 == 0: return [[3] * num_3] result = ([[2] + perm for perm in special_perms(num_2 - 1, num_3)] + [[3] + perm for perm in special_pe...
import re import inspect from functools import wraps, partial from pydantic import ValidationError, BaseModel import falcon from falibrary.config import Config from falibrary.route import OpenAPI, DocPage from falibrary.utils import find_routes, parse_path, get_summary_desc class Falibrary: """ :param app: F...
# Copyright 2018 Thomas Mensink, University of Amsterdam, thomas.mensink@uva.nl # # Beloning to the DeepNCM repository # DeepNCM is proposed in # Samantha Guerriero, Barbara Caputo, and Thomas Mensink # DeepNCM: Deep Nearest Class Mean Classifiers # ICLR Workshop 2018 # https://openreview.net/forum?id=rkPLZ...
import crypto import sys sys.modules['Crypto'] = crypto from Crypto.PublicKey import RSA secret_code = "Unguessable" encoded_key = open("rsa_key.bin", "rb").read() key = RSA.import_key(encoded_key, passphrase=secret_code) print (key.publickey().exportKey())
#!/Volumes/Disk_2/PanthraxClients/05. Anzee/01_Anzee_WS/Anzee_BE_WS/anzee_be/PD_Anzee_BE/anzee_be/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
import time from typing import Union from slack_sdk.web import SlackResponse from slack_bolt.request import BoltRequest # ------------------------------- # Error # ------------------------------- def error_client_invalid_type() -> str: return "`client` must be a slack_sdk.web.WebClient" def error_client_inv...
""" Django settings for profile_project project. Generated by 'django-admin startproject' using Django 2.2.3. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impo...
from django.contrib import admin from .models import * class SaleInvHrdModelAdmin(admin.ModelAdmin): list_display = ["id", "doc_no", "doc_dt", "party_id_name", "doctor_id_name", "mode", "net_amount", "session_id"] list_display_links = ["doc_no"] list_filter = ["doc_dt"] search_fields = ["doc...
def fatorial(numero): if numero == 0: numero = 1 fat = 1 while numero != 1: fat *= numero numero -= 1 return fat def numero_binomial(n,k): print(fatorial(6))
# Generated by Django 3.1.7 on 2021-04-25 22:30 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('DjangoEcommerceApp', '0002_merchantuser_is_added_by_admin'), ] operations = [ migrations.CreateModel( ...
# Generated by Django 3.2.9 on 2022-02-02 09:34 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_US...
import dash # Code from: https://github.com/plotly/dash-labs/tree/main/docs/demos/multi_page_example1 dash.register_page(__name__) from dash import Dash, dcc, html, Input, Output, callback import plotly.express as px df = px.data.tips() days = df.day.unique() layout = html.Div( [ dcc.Dropdown( ...
def fibonacci_numbers_recursion(n): result = 0 if n == 0: return result elif n == 1: result = 1 return result else: result = fibonacci_numbers_recursion(n-1) + fibonacci_numbers_recursion(n-2) return result def fibonacci_numbers_iteration(n): f0, f1 = 0, 1 ...
# Get georeferencing information from a GIS datasource (called directly from the GUI program) # ############################################################################### # Copyright (c) 2018, Patrick Broxton # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this softwa...
class Sort: def __init__(self, field: str, ascending: bool) -> None: self.field = field self.ascending = ascending
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2004-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
import click import os import toml from sys import exit from .logging import Log def config_error(message): click.echo("") Log(message, Color="red", Bold=True) click.echo("") exit(1) def check_config(): ''' missing additions: - port - validator-primary - validator-address ...
from optitrack_receiver import OptiTrackReceiver from device import Device from libavg import avg import configs.config_app as config_app from tornado_server.helper.ip_mapper import IpMapper class DeviceManager(avg.Publisher): DEVICE_ADDED = avg.Publisher.genMessageID() DEVICE_UPDATED = avg.Publisher.genMess...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.googlepb.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions...
#!/usr/bin/env python # Learn more: https://github.com/kennethreitz/setup.py import os import re import sys from codecs import open from shutil import rmtree from setuptools import setup, Command from setuptools.command.test import test as TestCommand here = os.path.abspath(os.path.dirname(__file__)) class PyTest(...
""" Utility functions for Jupyter notebooks """ import os import json import subprocess import time import numpy as np import pandas as pd import matplotlib.pyplot as plt import chainer import chainer.links as L from chainerlp.links import models from chainerlp.training.load_only_updator import LoadOnlyUpdator def ...
# This file is part of the Open Data Cube, see https://opendatacube.org for more information # # Copyright (c) 2015-2020 ODC Contributors # SPDX-License-Identifier: Apache-2.0 """ Test utility functions from :module:`datacube.utils` """ import os import pathlib import string from pathlib import Path import numpy as ...
""" Support for Xiaomi Mi Air Quality Monitor (PM2.5). For more details about this platform, please refer to the documentation https://home-assistant.io/components/sensor.xiaomi_miio/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity im...
#! /usr/bin/env python import argparse import logging import omero.cli import omero.gateway import omero.model import re import sys log = logging.getLogger() GENE_URL_KEY = 'Gene Identifier URL' YEASTGENOME_URL = 'www.yeastgenome.org' PATTERN = re.compile( fr'^https?://{YEASTGENOME_URL}/locus/(?P<gene>[\w-]+)(?:...
# Copyright 2018 The Bazel 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...
""" CLI integration. """ import datetime import os import re import sys import click from playhouse.db_url import connect from peewee_migrate.compat import string_types VERBOSE = ['WARNING', 'INFO', 'DEBUG', 'NOTSET'] CLEAN_RE = re.compile(r'\s+$', re.M) def get_router(directory, database, schema=None, verbose=0)...
"""Test InterpIdw_py.cpp.""" import unittest import numpy as np from xms.core.misc import Observer from xms.interp.interpolate import InterpIdw class MockObserver(Observer): """Mock Observer class for testing.""" def __init__(self, obs_id="X"): """Constructor. Args: obs_id (str...
from pathlib import Path from typing import Any, Dict, List, Union, Optional # noinspection PyProtectedMember from pyspark import keyword_only from pyspark.ml.param.shared import Param from pyspark.sql.types import StructType from spark_pipeline_framework.progress_logger.progress_logger import ProgressLogger from spa...
''' cours en france de machine learning Github: @rafaelmm82 ''' # Importer les librairies import numpy as np import matplotlib.pyplot as plt import pandas as pd # La gestion des données # ---------------------- # Importer le dataset filename = 'mlfrancais/Partie 1 - Data Preprocessing/Data.csv' dataset = pd.read_csv...
# Copyright 2018 The TensorFlow Probability 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 o...