content
stringlengths
5
1.05M
from django.shortcuts import reverse from django.utils.translation import ugettext_lazy as _ from cms.cms_toolbars import ADMIN_MENU_IDENTIFIER, PlaceholderToolbar from cms.toolbar_pool import toolbar_pool from .models import MenuContent class NavigationToolbar(PlaceholderToolbar): menu_content_model = MenuCont...
"""TiTiler COG demo endpoints.""" from rio_cogeo.cogeo import cog_info as rio_cogeo_info from rio_cogeo.models import Info from rio_tiler.io import COGReader from titiler.application.custom import ColorMapParams, TMSParams, templates from titiler.core.dependencies import DatasetPathParams from titiler.core.factory im...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2014, University of Hawaii Smart Energy Project' __license__ = 'https://raw.github' \ '.com/Hawaii-Smart-Energy-Project/Maui-Smart-Grid/master/BSD' \ '-LICENSE.txt' from sek.logge...
from __future__ import print_function import sys import re import os import importlib import inspect import pyximport pyximport.install() USE_CYTHON = True COMPILE = True DEBUG = True def extract_cython(path_in, force=False, debug=True): """Extract cython code from the .py file. The script is ca...
"""A module to get data from NSW Transport""" import json from REST import REST class Transport(): """Framework for NSW Transport API""" def __init__(self, debug=False): self.debug = debug def get_stops(self): """Get the PT stops in the area""" with open('api_key.json') as json_fil...
# -*- coding: utf-8 -*- from base64 import b64encode from collections import OrderedDict from urllib import parse from rest_framework.pagination import CursorPagination from rest_framework.response import Response class CursorSetPagination(CursorPagination): page_size = 100 page_size_query_param = 'page_size...
from guided_model import GuidedModel import torch.utils.data from utils import * import multiprocessing from pathlib import Path import torch from networks import CoDetectionCNN from utils import gather_path import argparse def parse_args(): """ Parse input arguments """ parser = argparse.ArgumentParser(...
import setuptools from telesto import __version__ with open("requirements.txt", "r") as req_f: install_requires = req_f.read().splitlines() setuptools.setup( name="telesto-base", version=__version__, author="telesto.ai", author_email="contact@telesto.ai", description="Base tools for telesto.a...
#%% import numpy as np import pandas as pd import matplotlib.pyplot as plt import phd.viz import phd.thermo colors, palette = phd.viz.phd_style() # %% # Define the number of repressors rep_range = np.logspace(0, 3, 200) # Define the DNA binding energies. ep_range = np.array([-16, -14, -12, -10]) # Mesh and compute...
from pathlib import Path import numpy from acoustic_feature_extractor.utility.numpy_utility import load_numpy_object from extractor.extract_f0_statistics import extract_f0_statistics def test_extract_f0_statistics( data_dir: Path, with_vuv: bool, ): output_dir = data_dir / "output_extract_f0_statistics" ...
# The number of points to use in smooth curve fits. n_pts_smooth = 2000 default_fourier_n_harm = 10
""" Module: unicon.plugins.linux.statemachine Authors: pyATS TEAM (pyats-support@cisco.com, pyats-support-ext@cisco.com) Description: This subpackage implements state machine for linux Linux """ from unicon.statemachine import State, Path, StateMachine from unicon.plugins.linux.patterns import LinuxPatte...
# Task 05. Patterns num = int(input()) for i in range(1, num+1): print('*' * i) for i in range(num-1, 0, -1): print('*' * i)
from ctypes import Structure, POINTER, byref from ctypes import c_uint, c_void_p, c_bool, c_uint16 from typing import NamedTuple, Union from enum import IntEnum, auto from . import Ft4222Status, Ft4222Exception, GpioTrigger, FtHandle from .dll_loader import ftlib from .i2c import I2cHandle from .spi.common import SpiH...
import os import mock import json import pika import Queue import logging import greenlet import unittest import threading from rackattack.tcp import publish from rackattack.tcp import subscribe from rackattack.tests import mock_pika from rackattack.tests import one_threaded_publish handler = logging.StreamHandler() ...
# -*- coding:utf-8 -*- def scaleAndCurve(score): if 90 <= score <= 100: return "A" elif 80 <= score <= 89: return "B" elif 70 <= score <= 79: return "C" elif 60 <= score <= 69: return "D" elif score < 60: return "F" if __name__ == '__main__': score = in...
import turtle import math log=print class Point: x: int y: int def __init__(self, x, y): self.x = x self.y = y def __add__(self, other): x = self.x + other.x y = self.y + other.y return Point(x, y) def __mul__(self, other): x = self.x * other ...
#!/usr/bin/env python # # This is a Python implementation of Clebsch-Gordan coefficients. We use it # to verify the results and also to compare with Sympy as well as our Haskell # implementation. from fractions import Fraction try: long except NameError: _int = int else: _int = long def factorial(n): ...
import os import asyncio from gear import Database async def main(): scope = os.environ['HAIL_SCOPE'] if scope == 'deploy': return else: max_instances = 4 pool_size = 3 db = Database() await db.async_init() await db.execute_update( ''' UPDATE globals SET max_...
import os import sys import xml.etree.ElementTree as ET from os import getcwd year, image_set = ('2007', 'train_data') # sets = [('2007', 'train'), ('2007', 'val'), ('2007', 'test')] classes = ["paper", "cup"] if len(sys.argv) > 1: classes = sys.argv[1:] with open('model_data/voc_classes.txt', 'w')...
from enum import Enum from typing import List import logging class HostType(Enum): VIRTUAL_MACHINE = "vm" DEVICE = "device" IP_ADDRESS = "ip_address" class Host: """ Represents a virtual machine or device in netbox """ # hostname: str # ip_address: str # id: int # host_type: str ...
from collections import Counter class Solution: # using most_common() # time O(nlogn), space O(n) def frequencySort(self, s: str) -> str: return "".join([v * k for k, v in Counter(s).most_common()]) # using sort # time O(nlogn), space O(n) def frequencySort(self, s: str) -> str: ...
# -*- coding:utf-8 -*- """ @file name : L2_regularization.py @author : Jianhua Ma @date : 20210402 @brief : L2 regularization """ import torch import torch.nn as nn import matplotlib.pyplot as plt import sys import os from tools.common_tools import set_seed from torch.utils.tensorboard import SummaryWr...
import random import csv variance = 0 # variance of the generated random numbers data = [] average_number = 0 # the average value of random numbers y = 0 for k in range(0, 20): # k is an index data.append([round(y, 2)]) # creating subint...
#!/usr/bin/env python3 import argparse import json import os import io import sys from collections import namedtuple from tqdm import tqdm input_stream = io.TextIOWrapper(sys.stdin.buffer, encoding='ascii', errors='backslashreplace') output_stream = io.TextIOWrapper(sys.stdout.buffer, encoding='ascii', errors='backsla...
a = [1,2,3,4] del a[2] print len(a) print a
import base64 import http.client import json import random import re import string import xml.etree.ElementTree as ET import Crypto import Crypto.Cipher.AES import pymysql class Client: """A class to interact with Plesk Installations""" def __init__(self, host, port=8443, protocol='https', ssl_unverified=Fa...
# # 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 torch from salina import Agent class RewardToGoAgent(Agent): """ Compute the reward to go based on a workspace where com...
import tensorflow as tf def pca_data(input): m, n = 10, 1000 # assert not tf.assert_less(128, n) mean = tf.reduce_mean(input, axis=1) x_new = input - tf.reshape(mean, (-1, 1)) # 协方差矩阵 cov = tf.matmul(x_new, x_new, transpose_a=True) / m e, v = tf.linalg.eigh(cov, name="eigh") e_index_s...
from typing import TypeVar I = TypeVar('I', bound=int)
from django import forms from .models import Article class ArticleForm(forms.ModelForm): class Meta: model = Article fields = ["title", "summary", "content", "tags"] widgets = {"summary": forms.TextInput()}
#-*- coding: UTF-8 -*- import os import numpy as np import cv2 from array import * import re from PIL import Image,ImageEnhance import subprocess import json import util import errors import crop import time import preprocess from bottle import template tesseract_exe_name = 'tesseract' # Name of executable to be called...
# Date parsing, extracted from feedparser # # Copyright (c) 2002-2006, Mark Pilgrim, 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 copy...
from tests.base_test import BaseTestCase class GetUserInfoTestCase(BaseTestCase): def setUp(self): super().setUp() self.url = '/auth/user' def test_get_user_info(self): """ Test getting a users info """ user = self.create_user(self.user) user_token = s...
import os import datetime from decimal import Decimal from django.test import TestCase from kudago_mapper.mappers import Mapper from .models import Action, Event, Hall, Artist, ActionThrough, ArtistThrough, EventThrough from .mappers import (HallRSSMapper, EventRSSMapper, ArtistRSSMapper, ArtistThroughRSSMapper, ...
# Author: Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: Simplified BSD import os.path as op import numpy as np from nose.tools import assert_true from numpy.testing import assert_array_almost_equal import mne from mne.datasets import sample from mne import fiff, read_cov, read_forward_solution from mne.inv...
"""Utilities for converting gates and circuits to and from Cirq objects.""" from functools import singledispatch from typing import Union, Type, Callable import cirq import numpy as np import sympy from ...circuit.gates import ( Gate, X, Y, Z, RX, RY, RZ, PHASE, T, I, H, ...
from discord.ext import commands from sign.effect_factory import EffectFactory from sign.sign import Sign class SignControl(commands.Cog): def __init__(self, bot): self.bot = bot self.sign: Sign = bot.get_cog("Sign") @commands.command() async def all(self, ctx, *args): effect = Ef...
# -*- coding:utf-8 -*- from selenium import webdriver import time import requests from bs4 import BeautifulSoup ''' @driver Firefox ''' firefox_profile = webdriver.FirefoxProfile() firefox_profile.set_preference("permissions.default.stylesheet",2) #禁用样式表文件 firefox_profile.set_preference("permissions.default.image",2...
# # Copyright 2009 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 or agreed to in writin...
from django.contrib import admin from gram.models import Post, Comment admin.site.register(Post) admin.site.register(Comment)
import torch import numpy as np import matplotlib.pyplot as plt from matplotlib.image import AxesImage from torch.nn.modules.utils import _pair from mpl_toolkits.axes_grid1 import make_axes_locatable from typing import Tuple, List, Optional, Union plt.ion() import math import torch import numpy as np from typing im...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lfs_bulk_prices', '0004_auto_20151116_1008'), ] operations = [ migrations.RenameField( model_name='bulkprice', ...
from .base import Tokenizer, TokenizerFactory
from django import template from .. import env register = template.Library() @register.simple_tag(name="getenv") def getenv(envvar, default=''): """ Return an environment variable for use in a template. """ """ If environment variable doesn't exist return a default value """ return env(envvar) or defaul...
from protorpc import messages from sqlalchemy import Column, event, String, UniqueConstraint, BigInteger, SmallInteger from rdr_service.model.base import Base, model_insert_listener, model_update_listener from rdr_service.model.utils import UTCDateTime6 class ResourceTypeEnum(messages.Enum): """ IDs for Res...
from .addnoderequest import AddNodeRequest __all__ = ['AddNodeRequest']
## # @file graphExtractor.py # @author Keren Zhu # @date 11/16/2019 # @brief The functions and classes for processing the graph # import abc_py as abcPy import numpy as np from numpy import linalg as LA import numpy as np import dgl import torch def symmetricLaplacian(abc): numNodes = abc.numNodes() L = np.ze...
""" Example for remote control from host via Serial link. This is the code to run on the Pico. It sets up the onboard LED and allows you to turn it on or off. """ from machine import Pin #use onboard LED which is controlled by Pin 25 led = Pin(25, Pin.OUT) # Turn the LED on def on(): led.value(1) # Turn the LE...
# 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...
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING from ...utils.api_object import APIObject if TYPE_CHECKING: from .emoji import Emoji @dataclass(repr=False) cl...
""" Copyright 2018 (c) Jinxin Xie 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...
from pipelines import pipeline nlp = pipeline("multitask-qa-qg") qg = pipeline("e2e-qg") print("preload finished.")
import socket import sys import select s = socket.socket() s.connect(('192.168.1.148', 12346)) while True: input_stream = [sys.stdin, s] read_soc, write_soc, error_sock = select.select(input_stream, [], []) for soc in read_soc: if soc == s: msg = s.recv(1024).decode('...
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- author: Floyda -*- import re def luatots(content): # comment content = re.sub(r"--\[\[((.*\n)*?.*?)\]\]", "/*\\1*/", content) content = re.sub(r"--", "// ", content) # and / or / not / .. / ~= / # content = re.sub(r"\n\t*\band\b", "&&", content)...
from .build import PROPOSAL_GENERATOR_REGISTRY, build_proposal_generator from .rpn import RPN_HEAD_REGISTRY, build_rpn_head
# -*- coding: utf-8 -*- import os import re import scrapy from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule from Ygdy8Crawl.items import Ygdy8CrawlItem class Ygdy8NetSpider(CrawlSpider): name = 'ygdy8.net' allowed_domains = ['ygdy8.net','dytt8.net'] start_urls ...
from django.conf.urls import url from .views import PostDetailView, PostListView urlpatterns = ( url(r'^$', PostListView.as_view(), name='post-list'), url(r'^(?P<pk>\d+)/$', PostDetailView.as_view(), name='post-detail'), )
import cv2 import os import shutil from os.path import join if __name__ == '__main__': # in_dir = "D:/Data/ShapeNetRendering_test_res/03001627/raw" out_dir = "D:/Data/ShapeNetRendering_test_res/03001627/processed" ref_dir = "D:/Data/shapenetrendering_compressed/ShapeNetRendering/ShapeNetRendering/03001627" f_re...
import json import pytest from fastapi.testclient import TestClient from tests.app_routes import AppRoutes @pytest.fixture def backup_data(): return { "name": "dev_sample_data_2021-Feb-13.zip", "force": False, "recipes": True, "settings": False, # ! Broken "themes": True,...
""" Main module to perform topic analysis on QA data. """ import os import sys import pandas as pd sys.path.append('../') from textsim import text_analysis as ts def load_amazon_qa_data(data_location): product_database = os.path.join(data_location, "product_data.csv") qa_database = os.path.join(data_location, ...
import typing as t from functools import partial from fractions import Fraction from base import basedigit, Location, LispError from scanner import Lexeme, Symbol, Token, ScannerYield def enumerate_lexeme_with_locations(lexeme): for i, c in enumerate(lexeme.content): yield Location( lexeme.loca...
import keras from keras import backend as K from keras.callbacks import Callback from keras.engine.topology import Layer import tensorflow as tf # ### Callbacks ### class BetaWarmup(Callback): def __init__(self, beta, max_beta, warmup_period): self.beta = beta self.max_beta = max_beta sel...
import asyncio import json import gzip import re import socket def verify_ok(code): """Verify if the http code is 200 OK""" return re.sub('[^0-9]', '', code)[2:] < '400' def make_http_header(dcn, error, http_code='HTTP/1.1 200 OK'): """It makes a http header with a dictionary, each item work as one header...
"""Show parameters.""" import os import sys import re os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf tgt = sys.argv[1] reader = tf.train.load_checkpoint(tgt) for k, v in reader.get_variable_to_shape_map().items(): if ( re.match("network/.*/.ATTRIBUTES/VARIABLE_VALUE", k) ...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lic...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This example show how to apply gains to an ms in a chunked up way. The gains should be stored in a .npy file and have the shape expected by the corrupt_vis function. It is assumed that the direction axis is ordered in the same way as model_cols where model_cols is a com...
import argparse import os import sys import matplotlib.pyplot as plt import numpy as np sys.path.append("../..") from tools import * from selfoptcontrol.optcontrol_energy import optcontrol_energy parser = argparse.ArgumentParser() # name of example parser.add_argument('--name', help='example name', type=str, default=...
from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver import random import string from eszone_openvpn.settings import VPN_DEFAULT_VARS, SECRET_KEY from Crypto.Cipher import AES import base64 from api_openv...
from setuptools import setup args = dict( name="pycache", version="0.1.0", description="A set of tools for cache.", author="Sengolda", license="MIT", long_description=open("README.md", "r", encoding="utf-8").read(), long_description_content_type="text/markdown", url="https://github.com/...
import tkinter # importamos a biblioteca tkinter class App: """ Aplicativo para somar e diminuir utilizando uma interface gráfica. """ def __init__(self): self.janela = tkinter.Tk() # Criamos a variável "janela" e nela iniciamos o Tkinter. self.valor = 6 # Informamos um valor inic...
import cv2 import utils img = cv2.imread('../output/images/003 - Example Image Left.jpg') img = cv2.cvtColor(img, cv2.COLOR_BGR2YUV) cv2.imwrite('../output/images/031 - Augmented Example All Contrast.jpg', cv2.cvtColor(utils.augment(img, 0, 2), cv2.COLOR_YUV2BGR)) cv2.imwrite('../output/images/032 - Augmented E...
# -*- coding: utf-8 -*- """ Created on Thu Mar 19 11:56:08 2020 @author: Dror """ from timeit import timeit def test_timeit(): setup = ''' import numpy as np a = np.ones((2,1000), dtype=np.float64) ''' print(timeit(setup=setup, stmt="b=5*a", number=1000)) def test_convolution(): #setup = "import nu...
from typing import Iterable, Any, Union, List from itertools import zip_longest import shutil def _linepairs(image: Iterable[Iterable[Any]]): i = iter(image) return zip_longest(i, i) class TerminalColor(): """Abstract class for terminal pixel """ def __init__(self, color): self.color = ...
class Callback(): def __init__(self, learner): self.learner = learner def fit_start(self): return True def fit_end(self): return True def epoch_start(self, epoch): return True def batch_start(self, batch): return True def after_loss(self, loss): re...
import pandas as pd import tensorflow as tf from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler number_of_inputs = 63 number_of_outputs = 1 learning_rate=0.001 training_epochs=100 display_step=5 layer_1_nodes=50 layer_2_nodes=100 layer_3_nodes=50 def readData(): ...
import pandas as pd import tensorflow as tf from glob import glob import os import numpy as np import re import h5py import pdb from keras.models import model_from_json physical_devices = tf.config.experimental.list_physical_devices('GPU') use_gpu_idx = np.array([4]) # set dynamic memory growth always [tf.config.exper...
# -*- coding: utf-8 -*- import unittest import base64 import zlib from unittest.mock import * from libgenapi.libgenapi import Libgenapi class LibgenApiTest(unittest.TestCase): @patch('libgenapi.libgenapi.grab.Grab.go') def test_libgenapi_search_method_returns_correct_result(self,mock_go): lg=Libgenap...
import sys import warnings import argparse from segmentation import SemanticSegmentation if not sys.warnoptions: warnings.simplefilter("ignore") if __name__ == '__main__': parser = argparse.ArgumentParser() # Training settings parser.add_argument('--optimizer', type=str, default='sgd') parse...
pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat'] print(pets) while 'cat' in pets: pets.remove('cat') print(pets) while pets: pet = pets.pop() print(f"{pet.title()} was found in list of pets.")
# coding: utf-8 """ Digitick REST API The Digitick REST API is a set of methods giving access to catalog, user and cart management. OpenAPI spec version: v1.0 Contact: contact@digitick.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six i...
""" Socket server based on socket multiplexing. Doesn't use threads. Pyro - Python Remote Objects. Copyright by Irmen de Jong (irmen@razorvine.net). """ from __future__ import with_statement, print_function import socket import select import sys import logging import os from Pyro4 import socketutil, erro...
def funcaox(lista): tam = len(lista) novaLista = [] for i in range(0,tam): if lista[i]%2==0: novaLista.append(lista[i]) return novaLista L = [-10,11,4,33,15,22,1,145] L = funcaox(L) print(L)
import typing import pytest @pytest.fixture() def exemplary_command() -> typing.Type: class Example: def __init__(self, data: str) -> None: self.data = data def __repr__(self) -> str: return '<{} data={}>'.format(self.__class__.__name__, self.data) return Example
#! /usr/bin/env python # -*- coding:utf-8 -*- import unittest import sys import os from datetime import date from pyExpenses.Projects import * from pyExpenses.Expense import Expense from TestRecManip import TEST_SAMPS from TestExpense import addSampleRecords class TestConsumingProject(unittest.TestCase): def t...
import pytest import os from tempfile import TemporaryDirectory from operatorcourier.nest import nest_bundles @pytest.mark.parametrize('folder_to_nest,expected_output_dir', [ ("tests/test_files/bundles/nest/flat_bundle1", "tests/test_files/bundles/nest/flat_bundle1_result"), ("tests/test_files/bundles/n...
#!/usr/bin/env python3 '''Gathers data pertaining to a run and outputs the data in format for upload to ELIMS''' import os, sys, re, argparse import pandas as pd import numpy as np np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning) __author__ = 'Jessica Rowell' __version__ = '1.2' __maintain...
############################################################################## # # Copyright (c) 2003-2018 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
import argparse import os import sys import pyfmt DEFAULT_PATH = os.getenv("BASE_CODE_DIR", ".") DEFAULT_LINE_LENGTH = int(os.getenv("MAX_LINE_LENGTH", "100")) def main(): parser = argparse.ArgumentParser(prog="pyfmt") parser.add_argument( "path", nargs="?", default=DEFAULT_PATH, ...
""" A helper for populating the excel sheets with test results. """ def add_worker_data_to_sheet(worker_data: dict, sheet: object): """Add all the worker reports in worker_data to the workbook. We create a tab for every level of concurrency from 1 - N. Each tab contains 6 datsets (3 tests with 2 phases e...
#!/bin/python3 import os # # Complete the storyOfATree function below. # def storyOfATree(n, edges, k, guesses): # # Write your code here. # import fractions # Compute neighbors of nodes. neighbors = [[] for _ in range(n)] for [u, v] in edges: neighbors[u - 1].append(v - 1) ...
#!/usr/bin/python3 import sys import os from common import message, get_linenumber, version from common import V0, V1, V2, V3, V4, V5, D0, D1, D2, D3, D4, D5 import common as c import time timers = [] ''' recovery.py provides functions to recover various kinds of failure conditions with optional guidance ''' scrip...
import logging import os import pandas as pd from mlblocks import MLPipeline from orion import MLBLOCKS_PIPELINES LOGGER = logging.getLogger(__name__) def get_available_templates(category=None): if isinstance(category, str): category = [category] category = category or ['verified', 'sandbox'] ...
import os import sys import time from fabric.api import env, local, sudo from fabric.colors import blue, cyan, green, magenta, red, white, yellow # noqa from fabric.context_managers import settings as fabric_settings from fabric.contrib.files import exists from fabric.decorators import task from fabric.utils import a...
import pyoo desktop = pyoo.Desktop('localhost', 2002)
from adminsortable2.admin import SortableAdminMixin from django.contrib import admin from coach.admin import CoachInline from core.admin.filters.event import EventFilter from core.admin.forms.event_page_content import EventPageContentForm from core.models import Event from sponsor.admin import SponsorInline class Ev...
# add the value "codewars" to the already defined websites array websites.append("codewars")
from django import forms from django.forms.formsets import formset_factory from formsetfield.fields import FormSetField class AdultForm(forms.Form): fullname = forms.CharField() passport = forms.CharField() class ChildForm(forms.Form): fullname = forms.CharField() birth_certificate = forms.CharFi...
import sqlite3 #ToDo: Database für Databases class DATABASE: def __init__(self, name, verbose=False): self.__name_db = name self.__verbose = verbose def create_new_db(self): connection = sqlite3.connect(self.__name_db) crsr = connection.cursor() #Lege T...
# coding=utf-8 """ Some util functions """ import pandas as pd from copy import deepcopy import ee from .tools import string def getReducerName(reducer): """ Get the name of the parsed reducer. WARNING: This function makes a request to EE Servers (getInfo). Do not use in server side functions (examp...