text
stringlengths
2
999k
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # from datetime import datetime from pytz import timezone from telethon.events import ChatAction from userbot import ...
import FWCore.ParameterSet.Config as cms from L1Trigger.L1THGCal.hgcalTriggerGeometryESProducer_cfi import * from L1Trigger.L1THGCal.hgcalVFE_cff import * from L1Trigger.L1THGCal.hgcalConcentrator_cff import * from L1Trigger.L1THGCal.hgcalBackEndLayer1_cff import * from L1Trigger.L1THGCal.hgcalBackEndLayer2_cff import...
# -*- coding: utf-8 -*- from __future__ import print_function from pkg_resources import get_distribution from .help_menu import HelpMenu import sys import configparser import pkg_resources import ast import builtins as bi class DefaultMenus(): plugin_list = {} config = [] emodules = [] nmodules = []...
#!/usr/bin/env python3 """ simpledaq.py Aquisição simples de dados que vêm em forma """ import threading import serial import time class Acquiring(threading.Thread): def __init__(self, s, ttot=1, header=b'IPT'): self.s = s threading.Thread.__init__(self) self.ttot = ttot sel...
# objetivo, ver si el numero ingresado tiene una raiz cuadrada exacta objetivo = int(input('Escoge un entero: ')) respuesta = 0 # Respuesta se multiplicará por sí misma hasta que tenga un valor que no sea menor al objetivo, que será cuando se pare el programa obtenga la respuesta while respuesta**2 < objetivo: prin...
# pylint: disable=missing-function-docstring, missing-module-docstring/ from pyccel.decorators import types @types('bool', 'bool') def right_shift_b_b(a, b): return a >> b @types('int', 'int') def right_shift_i_i(a, b): return a >> b @types('bool', 'int') def right_shift_b_i(a, b): return a >> b @types(...
"""Qtextedit module.""" # -*- coding: utf-8 -*- from PyQt6 import QtWidgets # type: ignore[import] from pineboolib.core import decorators from typing import Optional class QTextEdit(QtWidgets.QTextEdit): """QTextEdit class.""" LogText: int = 0 RichText: int = 1 def __init__(self, parent: Optional[...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
weather_state = { "clear-night": "夜间晴朗", "cloudy": "阴", "exceptional": "特殊", "fog": "雾", "hail": "冰雹", "lightning": "雷电", "lightning-rainy": "雷阵雨", "partlycloudy": "多云", "pouring": "暴雨", "rainy": "雨", "snowy": "雪", "snowy-rainy": "雨夹雪", "sunny": "晴", "windy": "有风...
# encoding: UTF-8 from __future__ import print_function import sys from time import sleep from vncshshlp import * import vncshshlp branch_no = '' #---------------------------------------------------------------------- def print_list(l): """""" for d in l: print(d) #-------------------------------...
import graphene from graphene import relay from graphene_django.filter import DjangoFilterConnectionField from ...product import models from ...product.templatetags.product_images import product_first_image from ...product.utils import products_visible_to_user from ...product.utils.availability import get_availability...
""" This file offers the methods to automatically retrieve the graph Actinomyces israelii. 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: protein--protein a...
################################################################################ import subprocess, os, sys, re, difflib ################################################################################ IGNORE = ( '.svn', 'infinite_loop', ) NORMALIZERS = ( (r"Ran (\d+) tests in (\d+\.\d+)s", ...
"""Default variable filters.""" import random as random_module import re import types from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation from functools import wraps from inspect import unwrap from operator import itemgetter from pprint import pformat from urllib.parse import quote from django.utils ...
# -*- coding: utf-8 -*- ''' Created on Thu May 31 11:38:48 2018 @author: Visa Suomi Turku University Hospital May 2018 @description: This function is used to scale features using different scaling types ''' #%% import necessary packages import numpy as np import pandas as pd #%% ...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_8_2_2 from i...
""" Copyright (c) 2015-present, Philippine-California Advanced Research Institutes- The Village Base Station Project (PCARI-VBTS). All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ from django.conf import settings fro...
# --------------------------------------------------------------------- # GWD.GFA.get_config # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC modules ...
# -*- coding: utf-8 -*- # # superset documentation build configuration file, created by # sphinx-quickstart on Thu Dec 17 15:42:06 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
""" Provides api functions to interact with the SourceRepository database model. """ import json import logging from aiohttp import web import uuid from molior.model.sourcerepository import SourceRepository from molior.model.build import Build from molior.model.buildtask import BuildTask from molior.model.buildvariant...
# Generated by Django 3.2.10 on 2022-03-29 21:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallet', '0002_auto_20220307_1413'), ] operations = [ migrations.CreateModel( name='Bitcoin', fields=[ ...
from django.conf import settings from django.utils.deprecation import MiddlewareMixin from django.utils.translation import get_language class LanguageCookieMiddleware(MiddlewareMixin): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): response = ...
class ExtendedMulticutObjective(object): def __init__(self,cgp)
import FWCore.ParameterSet.Config as cms # # Geometry master configuration # # Ideal geometry, needed for simulation from GeometryReaders.XMLIdealGeometryESSource.cmsGeometryDB_cff import * from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * from Geometry.TrackerNumberingBuilder.trackerNumberingGeomet...
#!/usr/bin/env python3 # coding: utf-8 r""" 范围类型。 :: +-> Container: obj.__contains__(self, item) # item in obj | +-> Sized: obj.__len__(self) # len(obj) | +-> Iterable: obj.__iter__(self) # iter(obj) | +-> Collection | ...
for index in range(10,20): print(index)
class Solution: def containVirus(self, grid: List[List[int]]) -> int: current_set_number = 1 grid_set = [[0 for i in range(len(grid[0]))] for j in range(len(grid))] set_grid = {} threaten = {} def getAdjacentCellsSet(row, col) -> List[int]: answer = [] ...
""" Data types for CPPython that encapsulate the requirements between the plugins and the core library """ from abc import ABC, abstractmethod from dataclasses import dataclass from enum import Enum from logging import Logger, getLogger from pathlib import Path from typing import Optional, Type, TypeVar from packagin...
import time from concurrent.futures import ThreadPoolExecutor from joblib import Parallel import joblib import pytest from sklearn import get_config, set_config, config_context from sklearn.utils.fixes import delayed from sklearn.utils.fixes import parse_version def test_config_context(): assert get_config() ==...
import json config = [] with open('filelist_example.txt','r') as f: for line in f: # Large embeddings don't work yet (disregard > 300) # All embeddings compress to the same size (disregard < 300) if not '300' in line: continue source_path = line.strip() d...
# -*- coding: utf-8 -*- # # 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 you under the Apache License, Version 2.0 (the #...
import subprocess import CmdBuilder # Setup Path and Build def setup_module(): ## Application Specific Variables xmlFiles = ["Comp1Ai.xml", "Comp2Ai.xml"] implFiles = ["Comp1Impl.cpp", "Comp2Impl.cpp"] appPath = "Autocoders/test/app1" target = "Top" ## Configure Command Builder Builde...
# -*- coding: utf-8 -*- ''' Lazily-evaluated data structures, primarily used by Hubble's loader ''' # Import Python Libs import logging import hubblestack.exceptions as exceptions try: from collections.abc import MutableMapping except ImportError: from collections import MutableMapping log = logging.getLogge...
import argparse import socket import time import elasticsearch import elasticsearch.helpers from rich.progress import Progress, TimeElapsedColumn, TextColumn, BarColumn import warnings warnings.filterwarnings('ignore', category=elasticsearch.ElasticsearchDeprecationWarning) MAX_LINE_SIZE = 8192 DOCUMENTS_BUFFER_SIZE...
from setuptools import find_packages, setup with open('README.md', 'r') as readme: long_description = readme.read() setup( name='sg_data', package_dir={"": "src"}, packages=find_packages('src'), version='0.0.0', description='A few utilities I created for working with Safegraph data for downloa...
# -*- coding: UTF-8 -*- from django.contrib.auth.models import Group from django.utils import timezone from sql.utils.resource_group import user_groups, auth_group_users from sql.utils.sql_review import is_auto_review from common.utils.const import WorkflowDict from sql.models import WorkflowAudit, WorkflowAuditDetail...
# -*- coding: utf-8 -*- # Copyright (c) 2020, veena and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestDocuments(unittest.TestCase): pass
__author__ = 'etseng@pacb.com' """ Replicate of key methods from ICE related to alignment evaluation and ECE """ import pdb import numpy as np from cupcake.ice.find_ECE import findECE def get_ece_arr_from_alignment(record): """ A simplified version of eval_sam_alignment that does NOT look at QV Simply tr...
#12/24/2018 #Find the square which has the largest total power, the square can be anywhere from 1x1 to 300x300 #The package numpy has some tools that can help with the multidimensional arrays and creating the summed area table #Note that numpy uses matrix indexing (i,j / row,col) vs cartesian indexing (x,y) --> if the...
import pytest from pycmdlineapp_groundwork.factory.generic_build_artefact import GenericBuildArtifact from pycmdlineapp_groundwork.factory.descriptor import IntDescriptor, auto from pycmdlineapp_groundwork.factory.builder import GenericBuilder class MyClass(GenericBuildArtifact): def __init__(self, some_arg): ...
# import tools for 3D axes from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import numpy as np # create a grid xg = np.linspace(0,1,31) # evenly spaced grid points yg = np.linspace(0,1,31) ymin,ymax = [0.15,0.85] # create a smaller s...
# Copyright (c) 2021 ING Wholesale Banking Advanced Analytics # # 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, mo...
#@+leo-ver=5-thin #@+node:tbrown.20171029210211.1: * @file ../plugins/editpane/clicky_splitter.py #@@language python """ clicky_splitter.py - a QSplitter which allows flipping / rotating of content by clicking on the splitter handle Terry Brown, TerryNBrown@gmail.com, Sun Oct 29 21:02:25 2017 """ from leo.core.leoQt ...
#!/bin/python from .tools import Console from .main import main
""" Django settings for yatube project. Generated by 'django-admin startproject' using Django 2.2.19. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os #...
import torch import torch.nn as nn class Subspace_Projection(nn.Module): def __init__(self, num_dim=5): super().__init__() self.num_dim = num_dim def create_subspace(self, supportset_features, class_size, sample_size): all_hyper_planes = [] means = [] for ii in range(cl...
import json import requests from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry class APIClient: __API_URL = 'https://api.1inch.exchange/v2.0/' def __init__(self, api_url=__API_URL): self.api_url = api_url self.request_timeout = 60 self.s...
from dotenv import load_dotenv import os import time from PIL import Image, ImageDraw from matplotlib import pyplot as plt # Import namespaces # import namespaces from azure.cognitiveservices.vision.computervision import ComputerVisionClient from azure.cognitiveservices.vision.computervision.models import OperationSta...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
from unittest import mock class AsyncMock(mock.MagicMock): async def __call__(self, *args, **kwargs): return super(AsyncMock, self).__call__(*args, **kwargs) def async_mock(method_to_mock, **kwargs): return mock.patch(method_to_mock, new_callable=AsyncMock, **kwargs)
# -*- coding: utf-8 -*- """ 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 you under the Apache License, Version 2.0 (the "Li...
import sys import cProfile import pstats if len(sys.argv) != 2: print 'Performance data file required. You have ' + str(len(sys.argv) - 1) + ' arguments\n' sys.exit() else: stats = pstats.Stats(sys.argv[1]) # This configuration generates somewhat more appropriate user-function focused data # sorted by cu...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import json import os from six import iteritems from six.moves.urllib.parse import urlencode import frappe from frappe import _, scrub from frappe.core.docty...
import json from flask import Flask, render_template , request from flask.wrappers import Response from get_ocr import get_ocr import os import datetime from werkzeug.utils import secure_filename import csv app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route("/uplo...
{ "targets": [ { "target_name": "pmemkv", "sources": ["lib/database.cc", "lib/pmemkv.cc"], "include_dirs": [ "<!@(node -p \"require('node-addon-api').include\")" ], "dependencies": [ "<!(node -p \"require('node-addon-api').gyp\")" ], "libraries...
"""wargame.knight This module contains the Knight class implementation. This module is compatible with Python 3.5.x. It contains supporting code for the book, Learning Python Application Development, Packt Publishing. .. todo:: The code comments and function descriptions in this file are intentionally kept to...
import _plotly_utils.basevalidators class LayersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name='layers', parent_name='layout.mapbox', **kwargs ): super(LayersValidator, self).__init__( plotly_name=plotly_name, parent_nam...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sharinator.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Imp...
__all__= [ 'ListResponse', 'ResponseStatus', 'File', 'GenomeResponse', 'CoverageMetadata', 'SampleResponse', 'FileResponse', 'ProjectResponse', 'CoverageMetaResponse', 'Coverage', 'AppLaunchResponse', 'AppResultResponse', 'UserResponse', 'QueryParameters', 'VariantsHeaderResponse', 'User', 'GenomeV1',...
# # 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 you under the Apache License, Version 2.0 (the # "License"); you may not...
#!/usr/bin/python # Copyright 2019 Northern.tech AS # # 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 a...
# -*- coding: utf-8 -*- from wagtail.models import Page from wagtail.test.testapp.models import ( FormField, FormFieldWithCustomSubmission, FormPage, FormPageWithCustomSubmission, FormPageWithRedirect, RedirectFormField, ) def make_form_page(**kwargs): kwargs.setdefault("title", "Contact u...
from collections import Counter def solve_fast(keys, left, chests, locks): # print keys, left frontier = [(keys.copy(), left.copy(), [])] while frontier: (keys, left, path) = frontier.pop() if not left: return True skip = False for key in list(keys.keys()): ...
import os import json import stat import shutil import argparse os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir('..') review = os.path.join(os.getcwd(), 'review') MASK = stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH HTML = '''<!doctype html> <html lang='en'> <head> <title>%(t...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
#! /usr/bin/python3 import sys, os, time, tempfile import pytest import util_test from util_test import CURR_DIR from fixtures.vectors import UNITTEST_VECTOR from fixtures.params import DEFAULT_PARAMS as DP from lib import (config, util, api, database) import counterpartyd def setup_module(): counterpartyd.set_op...
from turtle import * w = Screen() w.bgcolor("black") t = Turtle() t.color("white") t.begin_poly() for _ in range(4) : t.fd(100) t.rt(90) w.register_shape("A" , t.get_poly() ) t.shape("A") t.color("white") t.fillcolor("black")
#!/usr/bin/env python # Copyright (c) 2011-2017 SEOmoz, Inc. # # 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, mo...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from github.com.metaprov.modelaapi.services.trainerd.v1 import trainerd_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_trainerd_dot_v1_dot_tra...
import json import pytest from plenum.common.config_helper import PNodeConfigHelper from plenum.test.node_catchup.helper import waitNodeDataInequality, \ waitNodeDataEquality from plenum.test.pool_transactions.helper import \ disconnect_node_and_ensure_disconnected, reconnect_node_and_ensure_connected from p...
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os def sort_libs(correct_order, libs, lib_suffix="", reverse_result=False): # Add suffix for correct string matching correct_order[:] = [s.__add__(lib_suffix) for s in correct_order] result = [] for ...
from xosresource import XOSResource from core.models import User, Deployment, Flavor class XOSFlavor(XOSResource): provides = "tosca.nodes.Flavor" xos_model = Flavor copyin_props = ["flavor"] def get_xos_args(self): args = super(XOSFlavor, self).get_xos_args() # Support the default wh...
class Aluno(): def __init__(self,nome,curso,tempSdormir): self.nome = nome self.curso = curso self.tempSdormir = tempSdormir def Estudar(self,estudar): self.tempSdormir = dormir+(self.tempSdormir) return self.tempSdormir
#!/usr/bin/env python """Tests for grr.client.client_actions.grr_rekall.""" import functools import gzip import json import os import logging from grr.client.components.rekall_support import rekall_types as rdf_rekall_types from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import config_lib fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import glob from shutil import copyfile import hashlib import json import sys import subprocess import logging from multiprocessing import Pool import pdb import time import pickle import numpy as np import pandas as pd import pydicom as dicom import png # pydi...
from flask import render_template,url_for,flash,redirect,request from . import auth from flask_login import login_user,login_required,logout_user from .forms import RegistrationForm,LoginForm from ..models import User from .. import db from ..email import mail_message @auth.route('/login',methods=['GET','POST']) def l...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import chr from builtins import range from builtins import object from future.utils import python_2_unicode_compatible import hash...
# Copyright 2021 Collate # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software...
"""sensorIoT2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
def selection_sort(input_list): if not isinstance(input_list, list): raise TypeError('input needs to be a list') def find_lowest_value_index(start_index): lowest_value_index = start_index for i, x in enumerate(input_list[start_index:]): if x < input_list[lowest_value_index]:...
#!/usr/bin/python # -*- coding: utf-8 -*- # This module is proudly sponsored by CGI (www.cgi.com) and # KPN (www.kpn.com). # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADA...
# Copyright 2020 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
from .filter_wiki_meta import filter_wiki_user_titles, filter_wiki_non_text_type, filter_remove_empty_docs from .filter_small_docs_in_datasets import build_small_docs_filter, build_small_docs_bytes_filter from .map_arabic import replace_newline_with_space from .map_strip_substring import en_wiktionary_stripper from .ma...
from GameClassOBJ import GameOBJ class Character(GameOBJ): def __init__(self, ID, TYPE, MainList, x, y, MainPick, AnimCount, Motion, name, hp,LeftANIM, RightANIM): GameOBJ.__init__(self, ID, TYPE, MainList, x, y, MainPick, AnimCount) self.__Name = name self.__HP = hp self.__LeftANIM...
# Generated by Django 3.2.9 on 2021-11-03 18:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0006_sumasysaldos_axi_ejercicio_anterior'), ] operations = [ migrations.AlterField( model_name='sumasysaldos', ...
#!/usr/bin/env python import sys import os print("AV starting...\n") os.system("ls")
#!/usr/bin/python # # Copyright (C) 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
'''Core functionality''' from __future__ import print_function, division import os, sys, glob, numpy as np, matplotlib, scipy, time from scipy import stats, interpolate, optimize from math import pi import numpy.lib.recfunctions as rf from mla.spectral import * from mla.tools import * from mla.timing import ...
import datetime import os import time from flask import (Response, current_app, g, jsonify, render_template, request, url_for) from flask_cors import cross_origin from alerta.app import db from alerta.auth.decorators import permission from alerta.exceptions import ApiError, RejectException from ale...
""" TencentBlueKing is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaSCommunity Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the...
from graph_api.handlers import * class InstagramGraphHandler: """Complete parent handler of instagram API, contains all handlers developed separately and all of is accessible by calling proper attribute of this class object""" end_points = dict( accounts_list=InstagramAccountsList, acc...
import os import sys import cPickle import numpy as np import lmfit import galsim #import matplotlib.pyplot as plt from astropy import wcs from astropy.io import fits filter_number = {'u':'0','g':'1','r':'2','i':'3','z':'4','Y':'5'} def encode_obshistid(atm, telescope, sensor, wavelength, filter_name, seed): mod...
# Pylint doesn't play well with fixtures and dependency injection from pytest # pylint: disable=redefined-outer-name import pytest from buildstream.utils import ( move_atomic, DirectoryExistsError, _get_file_mtimestamp, _set_file_mtime, _parse_timestamp, ) from buildstream.testing._utils.site impo...
import pytest import vaex import numpy as np import numpy.ma df_a = vaex.from_arrays(a=np.array(['A', 'B', 'C']), x=np.array([0., 1., 2.]), y=np.ma.array([0., 9., 2.], mask=[False, True, False]), m=np.ma.array([1, 2, 3], mask=[False, True, False])...
from flask import Blueprint, request, Response from flask_restful import Api, Resource, reqparse from server.app import app from server.api.v1 import api_tickets from server.api.v1 import api_admin from server.api.v1 import api_login from server.api.v1 import api_user import json # NOTE: all the following resources by...
import unittest from vi_cleaner.vi_cleaner import ViCleaner class Test_Intergration(unittest.TestCase): def setUp(self) -> None: self.cleaner = ViCleaner("") self.letter_cases = [ ("đồng - kim lại quý", "đồng - kim lại quý"), ("đồng-kim lại quý", "đồng kim lại quý"), ...
import os import yaml from requests import get from Tests.test_utils import print_error, get_yaml class IntegrationValidator(object): """IntegrationValidator is designed to validate the correctness of the file structure we enter to content repo. And also try to catch possible Backward compatibility breaks du...
""" WSGI config for tars_api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETT...
from django.test import TestCase from rest_framework.test import APIClient from django import urls from character_api.tests.factories.user import UserFactory from character_api.tests.factories.character import RoleFactory from character_api.models import Role class TestRoleApi(TestCase): URL = urls.reverse("api-1...
# running under python 2.7 __author__ = "Bo Pu" import sys import ConfigParser import pandas as pd from pyspark.sql import SparkSession import json import numpy as np import os # for single L; which will be not used # read parameter combinations config and fill into the objects class Sample: def __init__(s...