content
stringlengths
5
1.05M
from django.db.models import Count, CharField from django.db.models import Value, IntegerField from project_manager_web.models import Project class SearchHelperResult: def __init__(self, project): self.project = project class SearchHelper: SEARCH_IN_CHOICES = ( ('name', 'Name'), ('d...
# Note: We don't need to call run() since our application is embedded within # the App Engine WSGI application server. import sys sys.path.insert(0, 'lib') import json import urllib2 import httplib import time from bs4 import BeautifulSoup import requests from datetime import datetime from email.mime.text import MIME...
# -*- coding: latin-1 -*- import unicodeparser import array errorReport = False depends = False def allowErrors(): errorReport = True if not depends: import romerror def ToCode(text,sErrors=False,compressed=False): if sErrors: errorReport = True if not depends: import r...
from greenws import __version__ project = "greenws" copyright = "2021, Auri" author = "Auri" release = __version__ html_theme = "alabaster" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", ] autodoc_member_order = "bysource" intersphinx_mapping = { "python": ("https://docs.python.org/3/",...
from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from sklearn.pipeline import make_pipeline from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier, AdaBoostClassif...
""" @author: Gabriele Girelli @contact: gigi.ga90@gmail.com """ from fastx_barber import qual from fastx_barber.const import DEFAULT_PHRED_OFFSET DEFAULT_FILTER_QUAL_FLAGS = ["flag,30,.2", "test,15,.1"] def test_QualityIO(): qio = qual.QualityIO() assert 32 == qio.phred_to_qscore("A")[0] assert 14 == qi...
import message print(message.health_room_msg) print(message.developer_question_msg) print(message.bus_to_sin_error_msg) print(message.first_room_msg) print(message.wifi_msg) print(message.student_food_info_msg) print('■ 신창역 지하철 출발 시간 ■\n\n• 이번 지하철은 ' )
from flask import Blueprint, jsonify from app.models import Bar, Review, Image, favorites, User, Reservation, db from flask import request import itertools import math import json from datetime import datetime from datetime import timedelta search_routes = Blueprint('search', __name__) # body: JSON.stringify({ # ...
import autoarray.plot as aplt import pytest from os import path directory = path.dirname(path.realpath(__file__)) @pytest.fixture(name="plot_path") def make_plot_path_setup(): return path.join( "{}".format(path.dirname(path.realpath(__file__))), "files", "plots", "f...
""" This class is the model for the Minesweeper program. """ import os import random import math from controller import Controller from utility import Option class Model: """ Stores data and logic for Minesweeper. """ # Game save information. SAVE_PATH = "./saves/" SAVE_FILE = SAVE_PATH + "min...
#!coding:utf-8 import os path_can_have = ['/app/', '/fixtures/', '/src/', '/web/'] path_cant_have = ['/vendor/', '/JMS/', '/cache/'] extension_message_php = """ // This file is part of the ProEthos Software. // // Copyright 2013, PAHO. All rights reserved. You can redistribute it and/or modify // ProEthos under th...
from __future__ import division from __future__ import print_function from pathlib import Path import sys project_path = Path(__file__).resolve().parents[1] sys.path.append(str(project_path)) import tensorflow as tf import os import scipy.sparse as sp import numpy as np from core.GeometricAffinityPropagat...
from django.db import models from django.db.models.deletion import CASCADE from accounts.models import User class Leave(models.Model): title = models.CharField(max_length=255, default='', blank=False) user = models.ForeignKey(User, on_delete=CASCADE, blank=False, related_name='leaves') creationDate = mode...
# like greedy_algos/fractional_knapsack_problem.py, but no item breakage allowed # naive brute-force recursive approach # modified power set, again class Item: # this seems unnecessary def __init__(self, value, weight): self.value = value self.weight = weight def zero_one_knapsack(items, capacit...
import socket s = socket.socket() server_host = "127.0.0.1" server_port = 50000 s.connect((server_host, server_port)) print("Connection has been established") fp = open("receiveddata.txt", "wb") file_data = s.recv(2048) fp.write(file_data) fp.close() print("File successfully received") s.close()
from typing import Dict from pytube import YouTube from settings import Config class YoutubeDownloader: def __init__(self, url: str) -> None: self.url = url def download(self) -> Dict[str, str]: try: yt = YouTube(self.url) yt_name = yt.title output_path = C...
"""The kafka plugin of the Minos Framework.""" __author__ = "Minos Framework Devs" __email__ = "hey@minos.run" __version__ = "0.7.0" from .common import ( KafkaBrokerBuilderMixin, KafkaCircuitBreakerMixin, ) from .publisher import ( KafkaBrokerPublisher, KafkaBrokerPublisherBuilder, ) from .subscriber...
# Author: Frank Cwitkowitz <fcwitkow@ur.rochester.edu> # My imports from .lvqt_real import LVQT as _LVQT from .utils import * # Regular imports import torch class LVQT(_LVQT): """ Implements an extension of the real-only LVQT variant. In this version, the imaginary weights of the transform are inferred ...
from random import shuffle continue = 'S' while continue.upper() words = input("insira a frase: ").split(" ") for word in words: shuffle(words) print(" ".join(words)) continue = input('Digite S para continuar')
import arcade import random ALL_QUADRANTS = [(-1, 1), (1, 1), (1, -1), (-1, -1)] def count_pressed(tests): result = {} for test in tests: result[(test.x, test.y)] class TestTemplate: def __init__(self, x, y): self.x = x self.y = y self.count_total = 0 self.count_...
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2020 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3 # Terce...
# # Root of the pints module. # Provides access to all shared functionality (optimisation, mcmc, etc.). # # This file is part of PINTS. # Copyright (c) 2017-2019, University of Oxford. # For licensing information, see the LICENSE file distributed with the PINTS # software package. # """ Pints: Probabilistic Inferenc...
# %% import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np # %% train = pd.read_csv('../data/input/train.csv') test = pd.read_csv('../data/input/test.csv') # %% print(train.isnull().sum()) print(train.shape) print(train.info()) # %% print(test.isnull().sum()) print(test.shape) p...
from tools.database.connection import Connection, Cursor import pymapd class MapdConnection(Connection): def __init__(self, host, name, user, password): self.connection = pymapd.connect(user=user, password=password, host=host, dbname=name) def _make_cursor(self): return MapdCursor(se...
#!/usr/bin/python3 # Copyright 2021. FastyBird s.r.o. # # 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 re...
import unittest from unittest import mock import authenticator as au class TestAuthenticator(unittest.TestCase): def test_gen_16(self): """gen_auth_string must return an expecteds formatted string""" name = 'foo' secret = 'random_string' res = au.gen_auth_string(name,...
__version__="1.5.7"
# -*- coding: utf-8 -*- # Copyright 2017 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...
# importing libraries import tkinter as tk from tkinter import Message, Text import cv2 import os import shutil import csv import numpy as np from PIL import Image, ImageTk import pandas as pd import datetime import time import tkinter.ttk as ttk import tkinter.font as font from pathlib impo...
from datetime import datetime import os import time import boto3 import pg8000 import requests S3_BUCKET_NAME = os.environ.get('S3_BUCKET_NAME', 'busshaming-timetable-dumps') GTFS_API_KEY = os.environ.get('TRANSPORT_NSW_API_KEY') FEED_SLUG = 'nsw-buses' DB_NAME = os.environ.get('DATABASE_NAME') DB_HOST = os.envir...
import re from typing import Any from meiga import Result, Error, Failure, Success from petisco.domain.errors.given_input_is_not_valid_error import ( GivenInputIsNotValidError, ) from petisco.domain.errors.input_exceed_lenght_limit_error import ( InputExceedLengthLimitError, ) class Name(str): def __new...
# coding: utf-8 def sizeof_fmt(num, suffix='B'): """ Supports: all currently known binary prefixes, https://en.wikipedia.org/wiki/Binary_prefix#Specific_units_of_IEC_60027-2_A.2_and_ISO.2FIEC_80000 negative and positive numbers numbers larger than 1000 Yobibytes arbitrary units ...
import os import sys import numpy as np from ..mbase import BaseModel from ..pakbase import Package from ..utils import mfreadnam from .mtbtn import Mt3dBtn from .mtadv import Mt3dAdv from .mtdsp import Mt3dDsp from .mtssm import Mt3dSsm from .mtrct import Mt3dRct from .mtgcg import Mt3dGcg from .mttob import Mt3dTob f...
from copy import deepcopy from math import floor import re from pprint import PrettyPrinter from patterns import PatternBehavior from monsters import get_monster, alias_monster from sidebar import get_sidebar from bibliography import get_citation from magicitems import get_magicitem from spells import get_spell from n...
import cv2, dlib img = cv2.imread("fotos/grupo.0.jpg") detector = dlib.cnn_face_detection_model_v1("recursos/mmod_human_face_detector.dat") faces = detector(img, 1) print("Faces detectadas:", len(faces)) for face in faces: e, t, d, b, co = (int(face.rect.left()), int(face.rect.top()), int(face.rect.right()), int(...
"""Add sessions Revision ID: a01d1258d7a7 Revises: 9ca629ddd362 Create Date: 2020-09-10 13:16:28.154448 """ import sqlalchemy as sa # type: ignore from alembic import op # type: ignore # revision identifiers, used by Alembic. revision = "a01d1258d7a7" down_revision = "9ca629ddd362" branch_labels = None depends_on ...
# Parse weather data from weatherbit.io try: import ujson as ujson except ImportError: import json as ujson import weather_obs as wo _weather_obs_fields = [ ( 'time_ts', ('ts', ), None, ), ( 'summary', ('weather', 'description', ), None, ), ( 'code', ('weather', 'code', ), None, ), ( 'icon...
from mdns_client import MdnsListener from printing import qprint, eprint def do_connect(self, line): """ connect TYPE TYPE_PARAMS Connect boards to shell49. connect serial [port [baud]] Wired connection. Uses defaults from config file. connect telnet [url [user [pwd]]] Wireless conne...
''' def allow_tags(func): def _decorate(_func): _func.allow_tags = True return _func return _decorate(func) '''
from datetime import datetime,timezone,timedelta import time try: import sys import socket import fcntl import struct def get_ip_address(ifname): try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), 0x8915, # SIOCGIFADDR struct.pack('256s'...
if __name__ == '__main__': n = int(input()) i = 1 numbers = [] while i <= n: numbers.append(str(i)) i+=1 start = 0 count = len(numbers) total = "" total =str(total) for number in numbers: total+=numbers[start] if start <= count: start+=1...
from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras import optimizers import numpy as np import csv from typing import List def open_csv() -> List: """This opens the data from a csv and returns a list of it as data""" with open('./point-weighting-comb...
r""" Examples of semigroups """ #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net> # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #****************...
""" Paths for different VTR flow executables and resources """ import pathlib # Path to the root repository directory root_path = pathlib.Path(__file__).absolute().parent.parent.parent.parent.parent # VTR Paths vtr_flow_path = root_path / "vtr_flow" # ODIN paths odin_path = root_path / "ODIN_II" odin_exe_path = odi...
#!/usr/local/bin/python2.7 __author__ = 'Nick Driver - https://github.com/TheDr1ver' ''' #### Overview #### ioc2splunk.py takes a CSV result from ioc-parser and appends de-duped results to a CSV file that can be processed by Splunk as a lookup table. ioc-parser results must be saved in the following format for it to ...
# -*- coding: utf-8 -*- """ Created on Sat Jul 28 23:04:58 2018 @author: SilverDoe """ for i in range(input('enter the limit')): k = [0, 1, 121, 12321]; print(k[i]) for i in range(1,int(input('enter the limit'))): #More than 2 lines will result in 0 score. Do not leave a blank print((10**(i)//9)*i) ...
from __future__ import print_function import os from importlib import import_module from pyqtgraph import reload ## Extend pyqtgraph.flowchart by adding several specialized nodes from pyqtgraph.flowchart import * from pyqtgraph.flowchart.library import isNodeClass from acq4.util.debug import printExc def loadLibrar...
#!/usr/bin/env python # -*- coding: utf-8 -*- import glob, re, json, random, shutil from PIL import Image import numpy as np #画像サイズ IMAGE_SIZE = 224 #チャネル数 CHANNEL_SIZE = 3 #ラベルを作成する関数 def make_label_list(): #ディレクトリのパスを取得 dir_path_list = glob.glob('image/*') #辞書を準備 label_dic = {} for i, dir_path ...
import warnings import numpy as np import pytest from numpy.testing import assert_allclose from einsteinpy.geodesic import Geodesic, Nulllike, Timelike @pytest.fixture() def dummy_timegeod(): """ Equatorial Capture """ return Timelike( metric="Kerr", metric_params=(0.9,), po...
from protocolbuffers.Math_pb2 import Quaternion from interactions.constraints import Anywhere, SmallAreaConstraint from routing import FootprintType from routing.waypoints.waypoint_generator import _WaypointGeneratorBase from sims4.geometry import build_rectangle_from_two_points_and_radius, PolygonFootprint from sims4....
__all__=("Console", "FileHelper")
import os import traceback import infosec.utils as utils from infosec.utils import smoke @smoke.smoke_check def check_q1(): try: result = utils.execute(['python3', 'q1.py', 'q1.pcapng']) if result.exit_code: smoke.error('ERROR: `python3 q1.py q1.pcapng` exitted with non-zero code {}' ...
from __future__ import division import codecs import json import re import nltk from nltk import sent_tokenize from nltk import word_tokenize def avg_wc(sentence): letter_size = 0 no_of_words = 0 word = word_tokenize(sentence) no_of_words = len(word) for w in word: letter_size += len(...
import unittest import comb class MaskKCombForAllKTestCase(unittest.TestCase): def test_mask_k_comb_for_all_k(self): self.assertEqual( comb.mask_k_comb_for_all_k(('a', 'b', 'c')), { ('*', '*', '*'), ('*', '*', 'c'), ('*', 'b', '*'), ...
# Created by Thomas Jones on 27/02/16 - thomas@tomtecsolutions.com # ratinglimiter.py, a plugin for minqlx to limit a server to players within certain ratings. # This plugin is released to everyone, for any purpose. It comes with no warranty, no guarantee it works, it's released AS IS. # You can modify everything, exce...
from elasticsearch import Elasticsearch from filehash import FileHash PUNCTUATION = r"""!"#$%&'()*+,-./'’“”—:;<=>–?«»@[\]^_`©‘…{|}~""" DOCUMENTS_DIR = '/documents' DOCUMENTS_INDEX = 'library' ES = Elasticsearch(['192.168.2.145:9200']) SHA256 = FileHash('sha256')
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'errordialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
import pytest #import lscf def test_get_env_settings(): # lscf.main() assert True
""" This module contains the API service for working with booking.moh.gov.ge's API. This file is part of the vaccination.py. (c) 2021 Temuri Takalandze <me@abgeo.dev> For the full copyright and license information, please view the LICENSE file that was distributed with this source code. """ import json from datetim...
import csv import os import sys import collections import math import cPickle as pickle import sexpdata import numpy as np import matplotlib import matplotlib.pyplot as plt import py_common from inlining_tree import parse_time, geometric_mean PLUGIN_SUBDIR = os.environ.get("PLUGINS_SUBDIR", "plugins") def read(alg...
################################### # File Name : process_queue.py ################################### #!/usr/bin/python3 import time import multiprocessing def set_data(q): p = multiprocessing.current_process() msg = "Hello World" q.put(msg) print ("[%s] set queue data : %s" % (p.name, msg)) def ge...
""" multivariative simplicial weighted interpolation and extrapolation. This is an implementation of four different interpolation and extrapolation technics. F_w - is for average weighted interpolation, also called baricentric. It is a global scheme. F_b - is a baricentric weighted simplicial interpolation. It is lo...
# -*- coding: utf-8 -*- from openprocurement.api.validation import ( validate_json_data, validate_data, _validate_accreditation_level, _validate_accreditation_level_mode, ) from openprocurement.api.constants import RELEASE_SIMPLE_DEFENSE_FROM from openprocurement.api.utils import ( update_logging_co...
import torch.nn as nn from util.function import GaussianSampleLayer import torch from torch.autograd import Variable class D(nn.Module): def __init__(self): super(D, self).__init__() self.main = nn.Sequential( nn.Conv2d(1,16,(7,1),padding = (3,0),stride = (3,1)...
/usr/local/lib/python3.6/hmac.py
__version__ = '1.2.29'
import os import asyncio import discord # To add a command, simply create a function 'async def on_COMMAND(bot, message, arguments)' # 'bot' is the original bot object # 'message' is the original message object # 'arguments' is an array containing all the command arguments PATH_SONGS = "resources/songs" JSON_MEMORY_K...
# Generated by Django 2.0.6 on 2019-02-20 17:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cwApp', '0002_auto_20190220_1724'), ] operations = [ migrations.AlterField( model_name='dog', name='gender', ...
import dash from dash.dependencies import Input, Output import plotly.express as px from modules.util import Util from modules.layout import Layout from modules.callbacks import register_callbacks import dash_bootstrap_components as dbc util = Util() layout = Layout() default_elements = util.process_df(util.read_samp...
# https://www.binarytides.com/python-socket-server-code-example/ # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/pilight.py # https://github.com/DavidLP/pilight/blob/master/pilight/pilight.py pilight_client = pilight.Client(host=host, port=port) pilight_client.start() ...
# -*- coding: utf-8 -*- from pydummy.core.dummydata import DummyData class DummyDomain(DummyData): def __init__(self): self.data = [ 'sweetmail.com', 'fastsnail.net', 'paperlessmail.org', 'email.info', 'academiamail.edu', 'secretmail...
import os, json, logging logger = logging.getLogger() logger.setLevel(logging.getLevelName(os.getenv('lambda_logging_level', 'INFO'))) def lambda_handler(event, context): logger.info(event)
"""Utilities.""" from collections import defaultdict def by_key(results, keys, defaults=None): """Group rows by specified key.""" if not isinstance(keys, tuple): keys = (keys,) output = defaultdict(list) if defaults: for key in defaults: output[key] = [] for row in resu...
class Interpreter: def __init__(self, instructions): self.instructions = instructions def run(self): pass
import pathlib # 標準ライブラリ import openpyxl # 外部ライブラリ pip install openpyxl import csv # 標準ライブラリ lwb = openpyxl.Workbook() #売上一覧表ワークブック lsh = lwb.active #売上一覧表ワークシート list_row = 1 path = pathlib.Path("..\data\sales") #相対パス指定 for pass_obj in path.iterdir(): if pass_obj.match("*.xls...
from django import forms class EditVoteForm(forms.Form): name = forms.CharField(max_length=64) machine_name = forms.SlugField(max_length=64) description = forms.CharField() class EditVoteFilterForm(forms.Form): filter_id = forms.IntegerField() class AdminSelectForm(forms.Form): username = form...
#!/usr/bin/env python3 import cv2 class alternativeStrategy(object): ''' A template strategy ''' def __init__(self): pass def execute(self): print("Please implement an execution method." ) # Define each image process strategy class diffStrategy(alternativeStrategy): ''' C...
from __future__ import print_function import edward as ed import tensorflow as tf import numpy as np from edward.models import Multinomial from scipy.special import gammaln sess = tf.Session() ed.set_seed(98765) def multinomial_logpmf(x, n, p): """ Arguments ---------- x: np.array vector of l...
# -*- coding: utf-8 -*- """ Created on Fri Mar 5 23:44:40 2021 @author: Muzaffer """ from pymongo import MongoClient client = MongoClient() ConnectDB = client.AirQuality # Connect to database ConnectCol = ConnectDB.AirQuality # Connect to collection PM10 = ConnectCol.find({},{"_id":0,"PM10":1}) ...
import json import requests from django.dispatch.dispatcher import receiver from django.db.models.signals import post_save, post_delete from med_social.utils import get_current_tenant from notifications.models import Notification from post_office import mail from vendors.rfp_models import RFP, Bid, Message @receiver...
import numpy as np from fluiddyn.clusters.legi import Calcul2 as Cluster from critical_Ra_sidewall import Ra_c_SW as Ra_c_SW_tests prandtl = 0.71 dim = 2 dt_max = 0.05 end_time = 30 nb_procs = 10 nx = 8 order = 10 stretch_factor = 0.0 z_periodicity = False cluster = Cluster() cluster.commands_setting_env = [ ...
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import ABCMeta, abstractmethod from pathlib import Path from typing import Iterable, List, Optional, Type, cast from pants.base.specs import SingleAddress from pants.core.goals.f...
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'ui_dialogmMtSDl.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##########...
import pytest from unittest.mock import create_autospec, Mock, call from photorec.repository.photo import RepoPhoto from photorec.services.storage import ServiceStorageS3 from photorec.validators.nickname import ValidatorNickname, NicknameError from photorec.validators.photo import ValidatorPhoto, PhotoNotFoundError f...
# Copyright (c) 2018 StackHPC Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
"""Check string suffix. Set boolean _b to _true if string _s ends with string _suffix, _false otherwise. Source: programming-idioms.org """ # Implementation author: nickname # Created on 2016-02-18T16:58:02.566137Z # Last modified on 2016-02-18T16:58:02.566137Z # Version 1 b = s.endswith(suffix)
import cv2 import os import numpy as np test_28 = [ '01d32d72-bacd-11e8-b2b8-ac1f6b6435d0', '04e82088-bad4-11e8-b2b8-ac1f6b6435d0', '1bcde1d2-bac7-11e8-b2b7-ac1f6b6435d0', '1ebb230a-bad1-11e8-b2b8-ac1f6b6435d0', '3539e7f8-bad4-11e8-b2b8-ac1f6b6435d0', '3fe1a9f8-bad8-11e8-b2b9-ac1f6b6435d0', '4104fc8e-bad5-11e8-b2b9-a...
# ***************************************************************************** # # Copyright (c) 2019, the Perspective Authors. # # This file is part of the Perspective library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # from .core import * # noqa: F...
from manimlib.imports import * import mpmath mpmath.mp.dps = 7 def zeta(z): max_norm = FRAME_X_RADIUS try: return np.complex(mpmath.zeta(z)) except: return np.complex(max_norm, 0) def d_zeta(z): epsilon = 0.01 return (zeta(z + epsilon) - zeta(z))/epsilon class ZetaTransformat...
#!/usr/bin/env python # Copyright 2018 Jetperch 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...
# Copyright 2021 cstsunfu. 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 agr...
from os.path import dirname, join, abspath from setuptools import setup, find_packages try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.req import parse_requirements with open(join(dirname(__file__), 'clinica/VERSION'), 'rb') as f: versio...
import logging import math import urllib.parse from djagger.decorators import schema from django.conf import settings from django.core.paginator import Paginator from django.http import ( Http404, HttpResponse, JsonResponse ) from django.urls import reverse from spid_cie_oidc.authority.models import ( ...
# coding: utf-8 import pprint import six from enum import Enum class WebAppConfirmationResponse: swagger_types = { 'access_token': 'str', 'scope': 'str', 'space': 'Space', 'state': 'str', 'token_type': 'str', } attribute_map = { 'access_token': 'acce...
import urllib import urllib.request import os import time def mkdir(path): path=path.strip() path=path.rstrip("\\") isExists=os.path.exists(path) if not isExists: os.makedirs(path) return True else: return False def cbk(a,b,c): per=100.0*a*b/c i...
import logging import pytest from ocs_ci.framework.testlib import tier4 from ocs_ci.ocs import constants from ocs_ci.utility import prometheus log = logging.getLogger(__name__) @tier4 @pytest.mark.polarion_id("OCS-1052") def test_ceph_manager_stopped(measure_stop_ceph_mgr): """ Test that there is appropria...
import json from aliyunsdkecs.request.v20140526 import DescribeInstancesRequest def test_ali_instances(ali_client): region_id = ali_client.get_region_id() assert region_id == 'eu-central-1' request = DescribeInstancesRequest.DescribeInstancesRequest() request.set_PageSize(10) response = ali_clien...
from al_services.alsvc_nsrl.nsrl import NSRL
import os import re from importlib import import_module from django.conf import settings as django_settings from etcd_config.manager import EtcdConfigManager from etcd_config.utils import attrs_to_dir from .utils import copy_if_mutable, dict_rec_update, find_project_root class EtcdSettingsProxy(object): def __...
import unittest from tools.transcripts import Transcript, GenePredTranscript class PositiveStrandTranscriptTests(unittest.TestCase): """ Tests the Transcript functionality part of sequence_lib. Tests the example positive strand BED record drawn out below: chrom 0 1 2 3 4 5 6 7 8 9 10 11 1...