content
stringlengths
5
1.05M
""" usage: python simple_display.py <filename> [-a] [-d=<depth>] [-p=<path>] [-m=<map_path>] - `-h` : print this help message and exit (can be anywhere) - `filename` : hdf5 file to open - `-a` : if flag passed, print attributes as well - `-d` : argument is maximum depth. defaults to 64 - `-p` : argument is speci...
from celery.decorators import task from main.celery import app from django.template.loader import get_template from django.core.mail import EmailMultiAlternatives from datetime import datetime, timedelta from .models import Reservation @app.task(name='send_notification') def send_notification(): present = datetim...
#******************************************************************************# #* @TITRE : Light.py *# #* @VERSION : 1.0 *# #* @CREATION : 05 01, 2017 ...
''' This file serves to be an example on how to use kNN. This file is more complicated due to graphing. For a simpler example with just prediction, check examplesimple.py Change k, noise, and amount of data to see how accuracy is affected. ''' import kNN as knn import modeler #using pyplotlib to plot error wit...
""" Extract text from pdf file. It finds the most used font sizes in the pdf document. The single most used font size will probably be the textual content we are interested in. """ from os import system import os import logging from os.path import expanduser from tempfile import gettempdir from collections import Co...
from typing import Any, List, Literal, TypedDict from .FHIR_canonical import FHIR_canonical from .FHIR_Element import FHIR_Element from .FHIR_markdown import FHIR_markdown from .FHIR_string import FHIR_string # A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular versio...
import logging from typing import List from fastapi import APIRouter, Body, Depends, HTTPException, Path from starlette.status import HTTP_201_CREATED, HTTP_404_NOT_FOUND from app.schema_models.cleaning import CleaningCreate, CleaningPublic, CleaningInDB, CleaningUpdate from app.db.repositories.cleanings import Clea...
# -*- coding: utf-8 -*- ''' PVM posix core package. ''' from __future__ import (absolute_import, division, print_function, unicode_literals) import os import logging import cPickle as pickle from ... import common_utils, pvm, storage, traversal, exception from . import actions, utils def cr...
# Copyright (C) 2021 Xilinx, Inc # SPDX-License-Identifier: BSD-3-Clause from pynq import DefaultIP import time class CMAC(DefaultIP): """Driver for the UltraScale+ Integrated 100 Gigabit Ethernet Subsystem. """ def __init__(self, description): cmac_registers = {'gt_reset_reg': {'address_offset': ...
import hashlib import random import string import time import shared.db as db from shared.util import config, get_logger logger = get_logger(__name__) def share_album(user_name, album_title, share): logger.debug('{Module|Share} share_album(%s, %s, %s)', user_name, album_title, share) if share == 'Hidden': ...
# 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. import datetime from gae_libs.testcase import TestCase from model.flake.detection.flake_occurrence import FlakeOccurrence from model.flake.flake import Flak...
from colorRandom import Funck Funck.color.Color('hello word!')
from tornado.web import StaticFileHandler from . import config, web, websocket raw_file_config = {'path': config.DOC_ROOT} urlpatterns = [ (r'/_raw/(.*)', StaticFileHandler, raw_file_config, 'raw-file'), (r'/lite-preview', web.LitePreview), (r'/ws/preview', websocket.Preview), ]
import pytest import os import shutil import tempfile import sys import logging from textwrap import dedent from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from ...api import Gradebook from ...utils import rmtree from .. import run_nbgrader from . import m...
import matplotlib.pyplot as plt import numpy as np from scipy.stats import norm from matplotlib import cm xmin, xmax = -4, 12 x = 10 alpha = 0.5 m, v = x, 10 xgrid = np.linspace(xmin, xmax, 200) fig, ax = plt.subplots() ax.spines['right'].set_color('none') ax.spines['top'].set_color('none') ax.spines['left'].set_...
from verto.errors.Error import Error class NoVideoIdentifierError(Error): '''Exception raised when no identifier is found for a video Attributes: block: block where tag was not matched url: original url message: explanation of why error was thrown ''' def __init__(self, block...
from pdfannots import process_file, PrettyPrinter from colr import color as term_color from collections import Counter input_path = r"tests\hotos17.pdf" # input_path = r"tests\issue9.pdf" # input_path = r"tests\issue13.pdf" # input_path = r"tests\pr24.pdf" annots, outlines = process_file(open(input_path, 'rb...
from django.http import HttpResponse import json from mova.models import * from visualization.models import * from mdjango.runspider import thread def handle(f_name, f_director, f_actor): ans = [] fid = [] if f_name != '0': op = {} it = Film.objects.get(name=f_name) fid.a...
# -*- coding: utf-8 -*- from yapsy.IPlugin import IPlugin class PluginModelo(IPlugin): name = "PROCEDIMENTOS" def executa(self, objeto): print(''' # # Executando PLUGIN: %s # ''' % self.name) try: procedimentos = objeto.providers['procedime...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
#-*- coding:utf-8 -*- from __future__ import print_function import logging from logging import StreamHandler try: from memory_profiler import profile except: pass import requests logger = logging.getLogger() logger.addHandler(StreamHandler()) logger.setLevel(logging.DEBUG) def jing_fm_api(): fav_url = '...
#-*- coding:utf-8 -*- #!/bin/python3 from selenium import webdriver from time import sleep #from pybloomfilter import BloomFilter #executable_path="D:\\DevTools\\phantomjs-2.1.1-windows\\bin\\phantomjs.exe", driver = webdriver.PhantomJS(service_args=['--load-images=no']) #url = "http://data.eastmoney.com/notices/get...
from functools import partial import numpy as np from tqdm import tqdm from pycocotools import mask as cocomask from .utils import get_segmentations, get_overlayed_mask from .pipeline_config import ORIGINAL_SIZE def iou(gt, pred): gt[gt > 0] = 1. pred[pred > 0] = 1. intersection = gt * pred union = ...
from django.contrib.auth import get_user_model from django.core.management import BaseCommand import requests user = get_user_model() class Command(BaseCommand): def handle(self, *args, **options): response_user = requests.get( 'https://raw.githubusercontent.com/stepik-a-w/drf-project-boxes/m...
#!/usr/bin/env python3 """ Converts M-AILabs datasets """ import argparse import csv import json import sys import typing from pathlib import Path def get_metadata(dataset_dir: Path) -> typing.Iterable[typing.Tuple[str, str, Path]]: """Load speaker, text, audio path from m-ai labs dataset""" by_book_dir = dat...
import threading import pytest from botx import Message @pytest.fixture() def build_exception_catcher(storage): def factory(event: threading.Event): def decorator(exc: Exception, msg: Message): event.set() storage.exception = exc storage.message = msg return ...
from django.contrib import admin # Register your models here. from .models import * admin.site.register(Author) admin.site.register(LocalAuthor) admin.site.register(LocalPost) admin.site.register(InboxPost) admin.site.register(Comment) admin.site.register(PostLike) admin.site.register(CommentLike) admin.site.register...
from codecs import encode from typing import Iterable, Optional from git import Repo from os import urandom, walk from shutil import rmtree from core.graph_database.contracts import Dependency # this wrapper is used for any non-repo source tree as well, we're reusing helpful interface class Repository: _path_root...
import pytest from py42._internal.client_factories import AuthorityClientFactory from py42._internal.client_factories import MicroserviceClientFactory from py42._internal.clients import alerts from py42._internal.clients import archive from py42._internal.clients import key_value_store from py42._internal.clients impo...
# Copyright 2015 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. """Recipe to build windows depot_tools bootstrap zipfile.""" DEPS = [ 'build/file', 'build/zip', 'depot_tools/cipd', 'depot_tools/git', 'depot_too...
#!/usr/bin/env python3 """ Author : Ken Youens-Clark <kyclark@gmail.com> Date : 2020-03-09 Purpose: Scrutinizer to Mongo """ import argparse import os import sys import sqlite3 from scrutinizer import database, Measurement from pymongo import MongoClient, GEO2D from typing import Dict, List, Tuple, NamedTuple, Optio...
# coding: utf-8 # flake8: noqa """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import...
import os import sys import time import warnings from collections import namedtuple from contextlib import contextmanager import click import pendulum from dagster import DagsterInvariantViolationError, check, seven from dagster.cli.workspace.cli_target import ( get_repository_location_from_kwargs, get_reposit...
# coding=utf-8 from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from django.views.generic import ListView from modules.contract_manage.models import * from modules.share_module.formater import * from modules.share_module.permissionMixin import cla...
from flask import Flask, jsonify, request from flask_restful import Api, Resource app = Flask(__name__) api = Api(app) def checkPostedData(postedData, functionName): if ("x" not in postedData or "y" not in postedData): return 301 else: return 200 class Add(Resource): def post(self): postedData = r...
import numpy as np from autoarray import decorator_util from autoarray import exc @decorator_util.jit() def mapping_matrix_from( pixelization_index_for_sub_slim_index: np.ndarray, pixels: int, total_mask_pixels: int, slim_index_for_sub_slim_index: np.ndarray, sub_fraction: float, ) -...
from flask import jsonify from flask import current_app as app from . import recommendation from recommendation_engine import RecommendationEngine from ..requests import get_request_param, get_form_param from ..word_embedding.supervised_models import load_supervised_model, SupervisedModels from ..exceptions.requests ...
import nd.ndGui import nd.ndMongo import subprocess from os import path, system # Grab mongodb and output parameters to text mDb = nd.ndMongo.NdMongo() # Build Gui to make selections then output to log x = nd.ndGui.NdGui() # Grab selections from log and query db logPath = path.join('docs', 'log.txt') selection = mD...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin import ModelAdmin from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ class ImageTileAdminMixin(ModelAdmin): change_list_template = 'tileview/change_list.html' class Media:...
#!/usr/bin/env python import re from pprint import pp, pprint """ Lookaround -> Lookahead and Lookbehind Zero-length assertions just like the beginning and end of line, and beginning and end of word anchors. The difference is that lookaround actually matches characters, but then gives up the match, returning only the r...
from typing import Iterable as IterableT, Sequence as SequenceT from struct import unpack_from from .language import Language from .column import Column from ..file import File from .. import ex class Header(object): LANGUAGE_MAP = {0: Language.none, 1: Language.japanese, ...
from enum import Enum from stories import story # Base classes. class ChildWithNull: @story def x(I): I.one class NextChildWithNull: @story def y(I): I.two class ParentWithNull: @story def a(I): I.before I.x I.after class SequenceParentWithNull:...
# file: complex.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Copyright © 2018 R.F. Smith <rsmith@xs4all.nl> # Created: 2018-12-01T23:11:29+0100 # Last modified: 2020-10-03T12:25:59+0200 import lp as la t300 = la.Fiber(230000, 0.3, -0.41e-6, 1.76, "T300-2") epr04908 = la.Resin(2900, 0.36, 41.4e-6, 1.15, "Epiko...
import abc import algoneer.model from algoneer.project import Project from algoneer.object import Object from algoneer.dataset import Dataset from algoneer.algorithmschema import AlgorithmSchema from typing import Optional, Dict, Any class Algorithm(Object): def __init__(self, project: Project, schema: Algorith...
''' Created on Aug 6, 2014 @author: tmahrt '''
from __future__ import absolute_import from enigma import eServiceReference, iPlayableService from skin import loadSkin from Components.config import config, ConfigSubsection, ConfigText from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.ServiceEventTracker import Servic...
from app import db from models.orders import OrderType, Person from workflows.Factory import OrderFactory from oim_logging import get_oim_logger import api.util_status def retrieve_user(id=None, username=None, email=None, create_if_missing=False): log = get_oim_logger() if not id and not username and not emai...
import sys import pandas as pd import numpy as np import sklearn as sk import torch import os from os import listdir from os.path import isfile, join import torch from torch.utils import data as data_torch from craft_text_detector import image_utils as imgproc import torch from torch.autograd import Variable import cv2...
import itertools import flux from uuid import uuid4 from api_object_schema.special_value import SpecialValue from ..._compat import iteritems class _OmitType(SpecialValue): def __repr__(self): return '<OMIT>' OMIT = _OmitType() class Autogenerate(SpecialValue): """ Designates a value that sho...
# -*- coding: utf-8 -*- """ Created on Wed Aug 1 14:52:43 2018 @author: user """ from sklearn.model_selection import train_test_split from keras import preprocessing import os import pandas as pd from sklearn.svm import SVC from sklearn.metrics import confusion_matrix,classification_report #########...
from ..interfaces.gamess import GamessJob from ..interfaces.gaussian import GaussJob from ..interfaces.orca import OrcaJob from ..interfaces.psi import PsiJob import os import glob from shutil import copyfile __all__ = ["xyz_to_tree"] def get_xyz(): return [file for file in os.listdir(".") if file.endswith(".xy...
a = "test %s" % "x"
import tkinter as tk from PIL import Image, ImageTk from View.Dialogs.ask_dialog import AskDialog from Model.util import resource_path class Toolbar(tk.Frame): def __init__(self, parent): tk.Frame.__init__(self, bd=1, relief=tk.RAISED) self.parent = parent self.body() def bod...
#!/usr/bin/env python3 import numpy as np import sklearn.preprocessing as preprocessing input_data = np.array([[2.1, -1.9, 5.5], [-1.5, 2.4, 3.5], [0.5, -7.9, 5.6], [5.9, 2.3, -5.8]]) #Binarization data_binarized = preprocessing.Binarizer(threshold = 0....
from .. import models def get_t_post_by_uuid(uuid: str) -> models.TPost: return models.TPost.objects.get(uuid=uuid)
from numpy import matrix from matrix import Matrix matrix1 = matrix([ [0,0,0], [1,2,3], [2,1,3] ]) matrix2 = matrix([ [2,0,0], [1,2,3], [2,1,3] ]) print( (matrix1 @ matrix2).tolist()[0]) matrix1 = Matrix([ [0,0,0], [1,2,3], [2,1,3] ]) matrix2 = Matrix([ [2,0,0], [1,2,3], [2,1,3] ]) print( matrix1.mul(...
"""Represent TransXChange concepts, and generate a matrix timetable from TransXChange documents """ import os import re import xml.etree.cElementTree as ET import calendar import datetime import difflib import zipfile from functools import cmp_to_key from django.conf import settings from django.core.cache import cache ...
from django.shortcuts import render, redirect from django.contrib.auth import login, authenticate, logout # from django.contrib.auth.forms import AuthenticationForm from django.db import transaction from django.contrib.auth.decorators import login_required from django.contrib import messages from django.views.generic i...
""" Computes the running median for a set of integers In many cases, doing an exact line-by-line through the whole data in not feasible, so rank i gets the tail of rank (i - 1), computes the running median for the tail to get a better starting sequence for what rank i is supposed to compute. """ from heapq import...
import sys import click from compose_lib import builder_data, profile, common from commands import config import tempfile import yaml import json from compose_lib.common import os_run, os_return, get_resource from compose_lib.command_category import CommandCategory from neoload.neoload_cli_lib import tools import log...
# -*- coding: utf-8 -*- import os import sys import urwid def pixel_process(color): return (urwid.AttrSpec(color, color, 256), ' ') def round_compo(compo): return hex(ord(compo))[2] def read(path, align='left'): def line_process(line): return urwid.AttrMap(urwid.Text(map(pixel_process, line)...
from flask import Flask from flask_socketio import SocketIO app = Flask(__name__) socketio = SocketIO(app) @app.route('/') def default(): return "default" if __name__ == "__main__": # app.run() socketio.run(app)
# last edit: 20.02.2019 (callFEELD) import sqlite3 from src.handler.logger import logger from src.handler.config import config class DB(): DATABASEDIR = config["Paths"]["database"] # create the database if it does not exists def __init__(self): self.conn = sqlite3.connect(self.DATABASEDIR) ...
import streamlit as st import numpy as np from PIL import Image import io import matplotlib.pyplot as plt import seaborn as sns from models.colorization import ColorizationGenerator from models.context_embedding import ContextEmbedding from models.text2palette import T2PGenerator import tensorflow as tf import colorsy...
from copy import deepcopy from lbrynet.schema.proto import source_pb2 as source_pb from lbrynet.schema.schema import SOURCE_TYPES, LBRY_SD_HASH_LENGTH, VERSION_MAP from lbrynet.schema.schema.schema import Schema from lbrynet.schema.error import InvalidSourceHashLength class Source(Schema): @classmethod def lo...
import asyncio import json import logging from aiohttp import web from prometheus_client import Summary from prometheus_client import Histogram from prometheus_async.aio import time REQ_TIME = Summary("cancel_req_time", "time spent with cancel endpoint") REQ_HISTOGRAM_TIME = Histogram("cancel_req_histogram", "Histog...
# Generated by Django 3.2 on 2021-06-03 23:51 import datetime from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('erp', '0004_auto_20210603_1307'), ] operations = [ migrations.CreateModel( name='...
c=1 while True: try: fp,fh=map(int,input().split()) lig=((5*fp+6*fh)//2) ato=2+lig-fp-fh print(f'Molecula #{c}.:.\nPossui {ato} atomos e {lig} ligacoes\n') c+=1 except EOFError:break
#!/usr/bin/env python """Writing up a class diagram This module uses Plantuml as the UML format. The boring_stuff.projects.map_with_inspect methods are used to discover the modules, classes, functions and methods, connections of a given package. Examples -------- >>> import boring_stuff >>> # map the package >>> fro...
# -*- coding: utf-8 -*- """ Created on Wed Apr 21 15:16:18 2021 @author: Administrator """ from base import BaseModel import torch import math import torch.nn as nn import torch.nn.functional as F from torchvision import models import torch.utils.model_zoo as model_zoo from utils.helpers import initiali...
"""Test config.py.""" import unittest from pokemonsdk import __endpoint__ class TestConfig(unittest.TestCase): """Test config.py.""" def test_has_proper_endpoint(self): """Test API endpoint is correct.""" self.assertEqual('https://api.pokemontcg.io/v1', __endpoint__)
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik # Author: Dominik Gresch <greschd@gmx.ch> """Utilities to check whether models are compatible, e.g. for adding.""" def check_dim(*models): """Check that the dimension of all models is the same.""" return len({m.dim for m in models}) == 1 def che...
import copy import torchvision.models as models from ptsemseg.models.pspnet import pspnet def get_model(model_dict, n_classes, version=None): name = model_dict["arch"] model = _get_model_instance(name) param_dict = copy.deepcopy(model_dict) param_dict.pop("arch") if name == "pspnet": mod...
import socket import sys import os from controllable_talknet import * def handle_connection(connection, client_addr): data = connection.recv(4096) data = str(data, "utf-8") lines = data.split("\n") if(len(lines) < 6): print("Received an invalid request") return "No, Invalid request" ...
def first_last6(nums): if nums[0] == 6 or nums[-1] == 6: return True else: return False def same_first_last(nums): if len(nums) >= 1 and nums[0] == nums[-1]: return True else: return False def make_pi(): return [3, 1, 4] def common_end(a, b): if a[-1] == b[-1] or a[0] == b[0]: return ...
#!/usr/bin/python # Get a handle to the API client import ssl import sys import pprint import argparse from cm_api.api_client import ApiResource, ApiException from cm_api.endpoints.services import ApiService, ApiServiceSetupInfo SERVICE_TYPE_MAP = { 'zookeeper': 'ZOOKEEPER', 'hdfs': 'HDFS', 'hbase': 'HBASE', '...
""" Functions for signal transformations __author__: Tati Gabru """ import numpy as np import matplotlib.pyplot as plt import os.path import os import pandas as pd import csv from sklearn.preprocessing import StandardScaler from typing import Iterable, List, Optional, Tuple from scipy import signal from scipy.signal ...
# -*- coding: utf-8 -*- import collections from datetime import datetime from datetime import timedelta import json import requests import re from bs4 import BeautifulSoup class Weather: _from_url = { "coperto.png": 0, "coperto_foschia.png": 1, "coperto_nebbia.png": 2, "coperto_...
n = int(input()) A = set(map(int, input().split())) N = int(input()) for i in range(N): c, m = input().split() b = set(map(int, input().split())) if c in 'update': A.update(b) elif c in 'intersection_update': A.intersection_update(b) elif c in 'difference_update': A.differenc...
import envs.discretegame import envs.connectfour import solvers.mcts import numpy as np #when training for both sides, sometimes a key seems to not be in tree # add try somewhere to check for key in tree and add if not # 6 rows by 7 columns, therefore 7 actions max_time = 5 max_depth = 23 exploration = 5 human_fi...
from .cBugTranslation import cBugTranslation; aoBugTranslations = [ # AVE@NULL -> Assert cBugTranslation( srzOriginalBugTypeId = r"AVE@NULL", azs0rbAppliesOnlyToTopStackFrame = [ rb".*!v8::base::OS::Abort", ], s0zTranslatedBugTypeId = "Assert", s0zTranslatedBugDescription = "The applicati...
import math def binary_search(arr, val): # loop to set min and max by compare val and middle min_i = 0 max_i = len(arr) - 1 middle = math.floor(len(arr) / 2) find_i = -1 if len(arr) == 0: return -1 while True: if val == arr[middle]: find_i = middle b...
from typing import * # pylint: disable=wildcard-import,unused-wildcard-import from abc import abstractmethod import random import functools import os from transformers import AutoTokenizer from transformers import PreTrainedTokenizer from transformers.tokenization_utils import BatchEncoding from .base import Masked...
import glob import os from google.cloud import storage PROJECT_NAME = "sf-dev-conf" MODEL_BUCKET = "sf-dev-conf-assets" MODEL_DIRECTORY = "model" class CloudStorageDao: def __init__(self): self.client = storage.Client(project=PROJECT_NAME) @staticmethod def _copy_local_directory_to_gcs(local_pa...
from django.conf.urls import url, include from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url(r'^$', views.index, name='Index'), url(r'^create/profile$', views.create_profile, name='create-profile'), url(r'^new/project$', views.new_project, na...
import sys from whitenoise.django import DjangoWhiteNoise sys.path.append('/opt/graphite/webapp') from graphite.wsgi import application as graphapp application = DjangoWhiteNoise(graphapp)
""" Tests for the :mod:`regression_tests.tools.decompiler_arguments` module. """ import os import unittest from regression_tests.tools.decompiler_arguments import DecompilerArguments from regression_tests.filesystem.directory import Directory from regression_tests.filesystem.file import File from regression_tests...
#!/usr/bin/env python3 """ Load NRW Landtag protocols Saves them as HTML, PDF and Word files. Written by Marc-Andre Lemburg, Nov 2021 """ import sys import os import urllib.parse import requests import sys import json from settings import ( BASE_URL, PROTOCOL_DIR, PROTOCOL_FILE_TEMPLATE, ...
""" This app is intended to provide the core functionality for tracking user engagement with content and Kolibri in general. As such, it is intended to store details of user interactions with content, a summary of those interactions, interactions with the software in general, as well as user feedback on the content and...
#-*-coding:utf-8-*- # date:2019-05-20 # Author: X.L.Eric # function: data iter import glob import math import os import random import shutil from pathlib import Path from PIL import Image # import matplotlib.pyplot as plt from tqdm import tqdm import cv2 import numpy as np import torch from torch.utils.data import Data...
from streamlink.plugins.dlive import DLive from tests.plugins import PluginCanHandleUrl class TestPluginCanHandleUrlDLive(PluginCanHandleUrl): __plugin__ = DLive should_match = [ "https://dlive.tv/pewdiepie", "https://dlive.tv/p/pdp+K6DqqtYWR", ] should_not_match = [ "https:/...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2021 CERN. # Copyright (C) 2021 Graz University of Technology. # Copyright (C) 2021 TU Wien. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. ""...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
# generated by datamodel-codegen: # filename: self_reference.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from typing import Any, List, Optional from pydantic import BaseModel, Field class Model(BaseModel): __root__: Any class Pet(BaseModel): name: Optional[str] = F...
# ','*',' coding: utf','8 ','* import sys sys.path.append('../') from measure3d import Manager manager = Manager(3e-1, 1e-3, 1) manager.point('A', 9684.28, 43836.82, 0, True) manager.point('B', 10649.55, 31996.50, 0, True) manager.point('C', 19063.66, 37818.86, 0, True) manager.point('D', 17814.63, 49923.19, 0, True)...
import uuid from django.db import models __all__ = ["Item"] class Item(models.Model): id = models.UUIDField(max_length=255,primary_key=True, default=uuid.uuid4) name = models.CharField(max_length=128,null=False,blank=False,unique=True) description = models.CharField(max_length=256,null=True) date_cr...
""" Requires: context -> anatomy context -> anatomyData Provides: instance -> publishDir instance -> resourcesDir """ import os import copy import pyblish.api from avalon import api class CollectResourcesPath(pyblish.api.InstancePlugin): """Generate directory path where the files ...
from flask import Flask from flask_sqlalchemy import SQLAlchemy import os from flask_login import LoginManager from config import config_options db = SQLAlchemy() def create_app(config_name): app = Flask(__name__) # Creating the app configurations app.config.from_object(config_options[config_name])...
from django.db import models from django.db.models import ForeignKey, DateField, IntegerField from employes import Employes class ActivityRateHistory(models.Model): user = ForeignKey(Employes, related_name="actrate") startDate = DateField() endDate = DateField(blank=True) activityRate = IntegerField(d...
""" Copyright 2019 Cognitive Scale, 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 agre...