text
stringlengths
2
999k
class Mammal: __kingdom = "animals" def __init__(self, name, type, sound): self.name = name self.type = type self.sound = sound def make_sound(self): return f"{self.name} makes {self.sound}" def get_kingdom(self): return Mammal.__kingdom def info(self): ...
import numpy as np import pandas as pd import src.utils.crime_classification_utils as utils import src.config.column_names as col_names def preprocess_and_save(original_file_name: str, preprocessed_file_name: str, zip_codes_dataset_file_path: str): census_df = uti...
from rubik.optimize import optimize_moves from rubik.optimize import apply_do_undo_optimization from rubik.optimize import apply_repeat_three_optimization from rubik.optimize import apply_2_optimization class RobotMoves: """ Robot only has two grippers underneath the cube. Unable to grab top of middle ...
# 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 app...
from __future__ import print_function import warnings import evaluation from keras.callbacks import Callback as KerasCallback from keras_wrapper.utils import decode_predictions_one_hot, decode_predictions_beam_search, decode_predictions, \ decode_multilabel from read_write import * def checkDefaultParamsBeamSea...
a, b, c = int(input()), int(input()), int(input()) # a, b, c = 3, 2, 1 list = [a, b, c] print(list) list2 = sorted(list) if list2[3] < list2[2] + list2[1]: print("YES") else: print("NO")
#!/usr/bin/python # -*- coding: utf-8 -*- # © 2020 Nokia # Licensed under the GNU General Public License v3.0 only # SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r""" --- module: netbox_rear_port short_description: Create,...
"""Functions for getting database engines and connections""" import asyncio from enum import Enum from functools import wraps import logging from typing import Any, Callable, Dict, NamedTuple, Optional, Tuple, Union from aiopg import Connection as AIOPGConnection from aiopg.sa import create_engine, Engine from pynocu...
from __future__ import absolute_import from __future__ import unicode_literals import logging import os import re import sys from collections import namedtuple from collections import OrderedDict from operator import attrgetter import enum import six from docker.errors import APIError from docker.errors import ImageN...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2018, Intermodalics # 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 ...
# -*- coding: utf-8 -*- ''' Management zpool :maintainer: Jorge Schrauwen <sjorge@blackdot.be> :maturity: new :depends: zpool :platform: smartos, illumos, solaris, freebsd, linux .. versionadded:: Boron .. code-block:: yaml oldpool: zpool.absent: - export: true newpool: ...
#! /usr/bin/env python """ Full-frame PCA algorithm for ADI, ADI+RDI and ADI+mSDI (IFS data) cubes. """ __author__ = 'Carlos Alberto Gomez Gonzalez' __all__ = ['pca'] import numpy as np from multiprocessing import cpu_count from .svd import svd_wrapper, SVDecomposer from .utils_pca import pca_incremental, pca_grid f...
#!/usr/bin/env python3 import re import requests def get_account_info(domain, access_token): headers = {'Authorization': 'Bearer {}'.format(access_token)} res = requests.get('https://' + domain + '/api/v1/accounts/verify_credentials', headers=headers).json() return res def post_toot(domain, access_token...
import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backend as K # Model configuration img_width, img_height = 28, 28 batch_size = 250 no_epochs = 25 no_classes = 10 validation...
# Copyright 2019 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...
""" pygluu.kubernetes.kubeapi ~~~~~~~~~~~~~~~~~~~~~~~~~ License terms and conditions for Gluu Cloud Native Edition: https://www.apache.org/licenses/LICENSE-2.0 """ import sys import time import os from kubernetes import client, utils, config from kubernetes.stream import stream from kubernetes.client.rest import A...
import warnings from datetime import datetime as dt import numpy as np import copy import multiprocessing as mp import pandas as pd import os from .sqlite import head_to_sql, start_sql from .plotting import plot_trace from collections import OrderedDict try: from tqdm import tqdm import six if not six.PY3...
# 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. #---------------------------------------------------------------------...
### Model data class catboost_model(object): float_features_index = [ 0, 2, 3, 14, 15, 20, 32, 37, 46, 47, 48, ] float_feature_count = 50 cat_feature_count = 0 binary_feature_count = 11 tree_count = 2 float_feature_borders = [ [0.322089016], [0.0031594648, 0.52136999...
#%% RESULTS = dict() #%% if 'CV SCORE' in CONTROL_PARAMS: logging.info("Calculating CV score for the classifier".format()) scorer = sk.metrics.make_scorer(kappa, greater_is_better=True, needs_proba=False, needs_threshold=False) start = time.time() r = sk.model_selection.cross_val_score(clf, X_tr, y_...
import bpy import mathutils from .qobject import * class QSphere(Qobject): basetype = 4 isSmooth = True isCentered = True def copyData(self, _op): newQ = QSphere(_op) return newQ def UpdateMesh(self): bmeshNew = bmesh.new() transformS = GetTransf...
import molten from molten.testing import TestClient from ddtrace import Pin from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY from ddtrace.ext import errors, http from ddtrace.propagation.datadog import HTTP_HEADER_TRACE_ID, HTTP_HEADER_PARENT_ID from ddtrace.contrib.molten import patch, unpatch from ddtrace.con...
import logging import tensorflow as tf from sentence_use.data import read_data from sentence_use.models import SiameseUSE from sentence_use.parser import train_args def train(args): """Runs training script for given CLI arguments. :param args: Arguments :type args: argparse.Namespace """ tf.ran...
from .pystocktwits_data_utils import PyStockTwitData from .utils import *
import os import yaml import configparser from spotinst_sdk2.client import SpotinstClientException VAR_SPOTINST_SHARED_CREDENTIALS_FILE = 'SPOTINST_SHARED_CREDENTIALS_FILE' VAR_SPOTINST_PROFILE = 'SPOTINST_PROFILE' VAR_SPOTINST_TOKEN = 'SPOTINST_TOKEN' VAR_SPOTINST_ACCOUNT = 'SPOTINST_ACCOUNT' DEFAULT_PROFILE = 'defa...
"""utility functions for kitti dataset""" from scipy.spatial import Delaunay import scipy import numpy as np import torch def in_hull(p, hull): """ :param p: (N, K) test points :param hull: (M, K) M corners of a box :return (N) bool """ try: if not isinstance(hull, Delaunay): ...
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
import numpy as np from gym.spaces import Box from metaworld.envs import reward_utils from metaworld.envs.asset_path_utils import full_v2_path_for from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set class SawyerBinPickingEnvV2(SawyerXYZEnv): """ Motivation for V2: ...
#************************************************************** # # 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 y...
""" This file offers the methods to automatically retrieve the graph Proteobacteria bacterium SG_bin9. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protei...
from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for,jsonify,session ) from werkzeug.exceptions import abort from sqlalchemy.sql import func from CTF.models import team,user from CTF import db new_team_id = 1 bp = Blueprint('/teams', __name__) @bp.route('/teams', met...
import pytest import os from airflow import DAG from datetime import datetime, timedelta from airflow.utils.dates import days_ago from gusty import create_dag # This module is intended to test the default behavior of gusty # Given a directory of tasks without any metadata located in those directories # A sort of base...
from typing import Any, Type, Tuple, NamedTuple, IO, Iterable, get_type_hints from torchglyph.formats.primitive import loads_type, dumps_type __all__ = [ 'loads_token', 'iter_sentence', 'dumps_token', 'dump_sentence', ] Token = Tuple[Any, ...] Sentence = Tuple[Tuple[Any, ...], ...] def loads_token(s: str, ...
"""Isogram from Exercism""" def is_isogram(string): """ Determine if the input string is an isogram. param: str to test if it is an isogram return: True or False if the input is an isogram """ # An empty string is an isogram if string == "": return True # Lowercase the string...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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,...
""" ##### Copyright 2021 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
import time import unittest import hiro from holmium.core import Page, Element, Locators, ElementMap from holmium.core.conditions import ( ALL, MATCHES_TEXT, VISIBLE, INVISIBLE, ANY ) from tests.utils import make_temp_page, get_driver class WaitConditionTests(unittest.TestCase): def setUp(self): sel...
import re from model.contact import Contact def test_data_on_home_page(app, db): contact_from_home_page = sorted(app.contact.get_contacts_list(), key=Contact.id_or_max) contact_from_db = sorted(db.get_contacts_list(), key=Contact.id_or_max) for i in range(len(contact_from_home_page)): contact_from...
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for setting nMinimumChainWork on command line. Nodes don't consider themselves out of "init...
import os import time import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset from torch.utils.data import DataLoader from torchvision import datasets from torchvision import transforms import matplotlib.pyplot as plt from PIL i...
import numpy as np from rlcard.games.base import Card def set_seed(seed): if seed is not None: import subprocess import sys reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze']) installed_packages = [r.decode().split('==')[0] for r in reqs.split()] if 't...
import time import nltk import os import re from selenium import webdriver from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer # The url of the researcher's homepage on Google Scholar url = 'https://scholar.google.com/citations?user=37jEMC0AAAAJ&hl=en' # The most frequent one token or two used i...
# -*- coding: utf-8 -*- """ DataObject is an "ObjectManager object" [sic] with a Numpy array. """ from collections import OrderedDict import numpy as np import wx from classes.om import OMBaseObject from classes.om import ObjectManager VALID_INDEXES = { 'I_LINE': { 'units': [None], 'nam...
from pyramid.config import Configurator from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy def main(global_config, **settings): """This function returns a Pyramid WSGI application.""" with Configurator(settings=settings) as config: ...
""" conftest.py - PyTest configuration and shared resources Reusable test fixtures 'n stuff Copyright (c) 2018 The Fuel Rats Mischief, All rights reserved. Licensed under the BSD 3-Clause License. See LICENSE """ import logging import random import string import sys from typing import Dict from uuid import uuid4, ...
#### Network Model of Rotation #### place in folder with network_model_rnn.py #### 7/22/2019 - AL ### 3/2/2020 - Al ### numpy version - '1.16.2' import numpy as np import functools import operator import sys import pickle ### torch version - '1.0.1' import torch import torch.nn as nn import random # sklearn.__versi...
from django.apps import AppConfig class CarConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'car'
#!/usr/bin/env python3 # 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. __version__ = "0.1.0" import copy import warnings import crypten.common import crypten.communicator as comm import c...
# # Incremental Saves # Save your blend files with an incrementing version number. # # Shortcut key: Shift-Ctrl-S # * This overrides the "Save As" hotkey. If you want to keep Shift-Ctrl-S # for "Save As", edit the hotkey below to your desired shortcut before # you load the add-on into Blender. # * When you disable ...
# -*- coding: utf-8 -*- import logging import hashlib import os try: import feedparser except: feedparser = None __virtualname__ = 'rss' log = logging.getLogger(__name__) BASE = os.path.dirname(os.path.abspath(__file__)) def __virtual__(): # Check required modules (aka feedparser in this case) if fe...
from datetime import datetime, timezone import logging import os import pandas as pd from ..models.order import Order from ..models.price import Price from ..models.dealer import Dealer from pandas import DataFrame from binance.client import Client from binance.enums import * from binance.websockets import BinanceSock...
# Generated by Django 3.1.14 on 2021-12-13 08:55 from django.db import migrations, models def add_tax_percentages(apps, schema_editor): # Add tax percentages for 0%, 10%, 14% and 24% tax_percentages = [0, 10, 14, 24] TaxPercentage = apps.get_model('reservation_units', 'TaxPercentage') for value in ta...
#!/usr/bin/python3 # coding=utf-8 # This file is part of the uberserver (GPL v2 or later), see LICENSE # xmlrpc class for auth of replays.springrts.com # # TODO: # - move SQLAlchemy calls to SQLUsers.py from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler from base64 import b64encode import os.pat...
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-11-19 06:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wildlifecompliance', '0552_callemail_number_of_animals'), ] operations = [ ...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING from .base import AsyncCredentialBase from .._internal import AadClient from ..._internal import CertificateCredentialBase if TYPE_CHE...
#? Datasets-specific Parameters # MNIST = 784 mnist_dim = 784 mnist_clusters = 10 toy_clusters = 4 no_samples = 750 #? Visualization-specific Parameters representation_dim = 2 #? DEC-specific Parameters embedding_dim = 10 dec_train_epochs = 20 mu_learning_rate = 1 z_learning_rate = 1 cluster_num = mnist_clusters de...
"""Contains data generator for orgnaizing various audio data preprocessing pipeline and offering data reader interface of PaddlePaddle requirements. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import random import tarfile import multiprocessing impor...
from flask import render_template, redirect, request, url_for from jumpscale import j from blueprints.base import blueprint # from blueprints import login_manager login_manager = j.servers.web.latest.loader.login_manager # from blueprints import db # from blueprints.base.models import User # from flask_login import...
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
""" Description: Provides a pyGtk vtkRenderWindowInteractor widget. This embeds a vtkRenderWindow inside a GTK widget and uses the vtkGenericRenderWindowInteractor for the event handling. This is based on vtkTkRenderWindow.py. The class uses the gtkgl.GtkGLArea widget (gtkglarea). This avoids a lot of ...
from pathlib import Path import re from setuptools import setup # type: ignore root = Path(__file__).parent init = (root / "iters" / "__init__.py").read_text("utf-8") result = re.search(r"^__version__\s*=\s*[\"']([^\"']*)[\"']", init, re.MULTILINE) if result is None: raise RuntimeError("Failed to find version...
def infinite_fib(n): # if n == 1 or n == 0: # return 1 return infinite_fib(n-1) + infinite_fib(n-2) print(infinite_fib(100))
from ast import Num import os def getIDFromHTML(htmlFile): f = open(htmlFile, 'r+', encoding='utf-8') #f.write(getAllIDPinterest("https://www.pinterest.com:443/pin/730357264559116463/")) html= f.read() content = str(html) contentSplited = content.split() #print(contentSplited) Num...
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from gazebo_msgs/BodyRequestRequest.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class BodyRequestRequest(genpy.Message): _md5sum = "5eade9afe7f232d780...
# Copyright 2018, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # L...
def calc_sum(x, y): return x + y return x * y for i in range(10): print(i) continue print(i + i)
"""Docsting to fulfil linting.""" from functools import lru_cache from numpy import sqrt from simple_functions.functions1 import factorial __all__ = ['pi'] def pi(terms=1): """ Calculating pi """ return 1./(2.*sqrt(2.)/9801.*rsum(terms)) @lru_cache(maxsize=None) # Note: -> @cache in python >= 3.9 def rs...
import json from lib import node from lib.generator import predicate_function from lib.generator import predicate_function_declaration with open("json/yi.json", "r") as stream: data = json.load(stream) nd = node.RootNode() for dat in data: nd.extend(dat, True) with open("dist/is_yi_unicos.h", "w") as stream: ...
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest from lxml import etree from os import path from parse_xml_torah import XmlTorahParser from torah_model import Perek, TextFragment from torah_model import Sefer, PasukStart class XmlTorahParserTest(unittest.TestCase): def _xml_to_string(self, xml_elt): ""...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class ServiceTestCase(Integratio...
from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, SubmitField, SelectField from wtforms.validators import Required class UpdateProfile(FlaskForm): bio = TextAreaField('Tell us about you.', validators=[Required()]) submit = SubmitField('Submit') class PitchForm(FlaskForm): t...
import unittest from gbakeboy import Cpu from gbakeboy import Memory from gbakeboy import hex2int as h2i from gbakeboy import print_bin_8 class test_cpu_flags(unittest.TestCase): def setUp(self): mem = Memory() self.cpu = Cpu(mem) self.cpu.set_register_16('AF', 0) def test_flags(sel...
""" Lints ^^^^^ Checks specific to the Ethereum specification source code. """ import ast import importlib import inspect import pkgutil from abc import ABCMeta, abstractmethod from dataclasses import dataclass from typing import Generator, List, Optional, Sequence, Tuple from ..forks import Hardfork def walk_sour...
import types import pytest from plenum.common.constants import PROPAGATE from plenum.test.helper import sdk_json_to_request_object, sdk_send_random_requests from plenum.test.spy_helpers import get_count from stp_core.loop.eventually import eventually from plenum.common.messages.node_messages import Propagate from plen...
#!/usr/bin/env python3 # Copyright (c) 2016-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. """Test compact blocks (BIP 152). Version 1 compact blocks are pre-segwit (txids) Version 2 compact block...
# Print out the second element from the areas list (it has the value 11.25). # Subset and print out the last element of areas, being 9.50. Using a negative index makes sense here! # Select the number representing the area of the living room (20.0) and print it out. # Create the areas list areas = ["hallway", 11.25, "ki...
from pyneuroml import pynml from neuroml import * import math import random max_per_layer = 100 layers = ['L23', 'L4', 'L5', 'L6'] t1=-0 t2=-100 t3=-100 t4=-190.0 t5=-300.0 t6=-300.0 ys = {} ys['L1']=[0,t1] ys['L23']=[t1,t1+t2+t3] ys['L4']=[t1+t2+t3,t1+t2+t3+t4] ys['L5']=[t1+t2+t3+t4,t1+t2+t3+t4+t5] ys['L6']=[t1...
from __future__ import annotations from typing import Callable, Dict, TYPE_CHECKING if TYPE_CHECKING: # pylint: disable=cyclic-import from tarkov.trader.models import TraderType from tarkov.trader.trader import Trader class TraderManager: def __init__(self, trader_factory: Callable[..., Trader]) -> ...
# Generated by Django 2.0.7 on 2019-09-15 15:57 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('bills', '0001_initial'), ] operations = [ migrations.RenameModel( old_name='bills', new_name='bill', ), ]
#!/usr/bin/env python import rospy from nav_msgs.msg import Path, Odometry from geometry_msgs.msg import Pose, PoseStamped from visualization_msgs.msg import Marker class TrajectoryDrawer(): def __init__(self): rospy.init_node('trajectory_drawer') frequency = rospy.get_param( '/traje...
""" DEF Parser Author: Tri Minh Cao Email: tricao@utdallas.edu Date: August 2016 """ from def_util import * from util import * import re import drawSvg as draw import matplotlib.pyplot as plt class DefParser: """ DefParser will parse a DEF file and store related information of the design. """ def __in...
################################################################################ ## ## BY: WANDERSON M.PIMENTA ## PROJECT MADE WITH: Qt Designer and PySide2 ## V: 1.0.0 ## ################################################################################ ## ==> GUI FILE from main import * ## ==> GLOBALS GLOBAL_STATE =...
#usr/bin/python3 #### # TODO: # 1) Make sure this works on parallel as well! ### from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import json import logging import os import io import random import numpy as np import torch from torch.u...
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Steffen Hoffmann <hoff.st@web.de> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # from trac.core import Component, implements from trac.resource import Resource, ResourceNotFound, resource_ex...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
from django.conf.urls import url from oscar import app class BBShop(app.Shop): # Override get_urls method def get_urls(self): """ Replace catalogue URL (first one in original func) """ urls = [url(r'^ecni/catalogue/', self.catalogue_app.urls), url(r'^ecni/catalo...
import numpy as np from skimage._shared.testing import assert_allclose from skimage.feature.register_translation import (register_translation, _upsampled_dft) from skimage.data import camera, binary_blobs from scipy.ndimage import fourier_shift from skimage import img_...
# -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-27 17:52 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
from django.contrib import admin from django.urls import path from website.views import * from django.conf import settings from django.conf.urls.static import static app_name = 'website' urlpatterns = [ path('admin/', admin.site.urls), path('',index_view,name='index'), path('about',about_view,name ='about'), path('c...
# 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 ...
""" Preprocess a raw json dataset into hdf5/json files for use in data_loader.lua Input: json file that has the form [{ file_path: 'path/img.jpg', captions: ['a caption', ...] }, ...] example element in this list would look like {'captions': [u'A man with a red helmet on a small moped on a dirt road. ', u'Man riding a...
import retangulo def quantidadeDePisos(piso, area): piso = piso*0.0001 total = area/piso margem = total*0.1 total +=margem return int(total) altura = float(input("Valor da altura do terreno: ")) comprimento = float(input("Valor do comprumento do terreno: ")) piso = float(input("Medida do piso em cm²: ")) terr...
# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu). All Rights Reserved. # # Please cite "4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural # Networks", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part of # the code. import random import logging import numpy as np import torch import scipy ...
from content.app import create_app import pytest @pytest.fixture def app(): return create_app()
# # Copyright (c) 2018 Bobby Noelte # # SPDX-License-Identifier: Apache-2.0 # from extract.globals import * from extract.directive import DTDirective ## # @brief Manage pinctrl-x directive. # class DTPinCtrl(DTDirective): def __init__(self): pass ## # @brief Extract pinctrl information. # ...
from datetime import date import numpy as np import pytest from pandas import ( DatetimeIndex, Index, MultiIndex, NaT, Series, Timestamp, date_range, period_range, ) import pandas._testing as tm from pandas.core.indexing import IndexingError from pandas.tseries.offsets import BDay c...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 2011-04-11 10:58:17 ############################################################################### # Copyright (c) 2010, Vadim Shlyakhov # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentatio...
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs ): super(DtickrangeValidator, self).__init__...