text
stringlengths
3.07k
12.6k
import numpy as np import pytest import astropy.units as u from astropy.modeling.fitting import LevMarLSQFitter from ..shapes import P92 def get_axav_cor_vals(): # Milky Way observed extinction as tabulated by Pei (1992) MW_x = [ 0.21, 0.29, 0.45, 0.61, 0.80, ...
""" Copyright <NAME> College MIT License Fall 2019 Lab 4 - IMU: Driving in shapes """ ################################################################################ # Imports ################################################################################ import sys sys.path.insert(0, "../../library...
class FirebaseJson: def __init__(self, data={}): self.data = data def __getitem__(self, key): return FirebaseJson(self.data[key]) @classmethod def to_value_type(cls, value): if value == None: typ = "nullValue" elif isinstance(value, bool): typ = ...
import time from django.contrib import messages from django.db.models import Q from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from order import make_excel from .forms import PaperForm from .models import PaperModel from order.models import FORM_TYPE, PaperFormModel from...
import ujson as json import ugfx from home import styles class RPSCommonView(): default_font = 'NanumSquareRound_Regular16' def __init__(self, width=ugfx.width(), height=ugfx.height()): # Default font ugfx.set_default_font(self.default_font) # Container self.container = ...
""" Testsuite for ProfilePlot and PhasePlot """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #---...
# Copyright 2021 Apex.AI, 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 writing...
import pandas as pd import numpy as np def _signal_features(window_data_df, channels, fs): features = pd.DataFrame() # Compute signal entropy feat_df_signal_entropy = _signal_entropy(window_data_df, channels) # Compute RMS feat_df_signal_rms = _signal_rms(window_data_df, channels) # Compute ...
# 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 # d...
#!/usr/bin/env python """ Copyright 2020, The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyrig...
import pdb import csv import json from os import listdir from os.path import isfile, join import numpy as np # Malisiewicz et al. def non_max_suppression_fast(boxes, overlapThresh): # if there are no boxes, return an empty list if len(boxes) == 0: return [] # if the bounding boxes integers, convert them to floa...
# pylint: disable=locally-disabled, unused-import import credmark.model from credmark.model.errors import ModelDataError from credmark.types import ( Address, Token, Account, Position, Price, Contract, Accounts, Contracts ) from credmark.types.data.token_wei import ( TokenWei ) fro...
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import struct from pytest import raises, xfail from msgpack import packb, unpackb, Unpacker, Packer, pack from collections import OrderedDict from io import BytesIO def check(data, use_list=False...
import random import math # # geometry.py # # This defines three classes that we use to track bodies that # occupy the world of a simulation. Bodies inhabit a 2-D # world at a position, have a velocity (a heading and a speed), # and they are compelled (by their behavior) to change their # heading. They also live withi...
from django.conf import settings from django.contrib import admin from import_export import resources from import_export.admin import ExportMixin from backend.forms import ElectionSessionAdminForm from backend.models import ( ElectionSession, Election, Candidate, Voter, Ballot, Eligibility, ...
import pathlib import tempfile from typing import List, Tuple import torch.cuda import hypothesis.strategies as st import pytest from hypothesis import assume, given, settings from torch.testing import assert_close from hopsparser.parser import BiAffineParser from hopsparser.deptree import DepGraph from hopsparser.l...
import pytest def test_distributed(): import junn.common.distributed def _inner(): from junn.common.distributed import ( barrier, init, is_rank_zero, is_running_distributed, local_rank, rank, size, ) ...
from flask import render_template, request, redirect,url_for,abort from flask_login import LoginManager,login_user,login_required,current_user from . import main from .forms import UpdateProfile,AddMealForm from .. import db from ..models import User,Meals,Menuday,Orders @main.route('/') def index(): ''' Vie...
# Copyright 2019 The FastEstimator 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 appl...
import cognitive_face as CF import global_variables as global_var import os, urllib import sqlite3 from openpyxl import Workbook, load_workbook from openpyxl.utils import get_column_letter, column_index_from_string from openpyxl.cell import Cell import time import requests from requests.packages.urllib3.exceptions impo...
# GPLv3 License # # Copyright (C) 2020 Ubisoft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is dis...
#!/usr/bin/env python # From https://www.pygame.org/docs/tut/ChimpLineByLine.html """ pygame.examples.chimp This simple example is used for the line-by-line tutorial that comes with pygame. It is based on a 'popular' web banner. Note there are comments here, but for the full explanation, follow along in the tutorial. ...
from guillotina import app_settings from guillotina import glogging from guillotina import task_vars from guillotina.interfaces import Allow from guillotina.interfaces import IAbsoluteURL from guillotina.utils import get_authenticated_user from guillotina.utils import get_content_path from guillotina.utils import get_c...
""" Defines components for holding properties of rocks or samples or whatevers. :copyright: 2015 Agile Geoscience :license: Apache 2.0 """ import json from .lexicon import Lexicon from .utils import CustomFormatter class ComponentError(Exception): """ Generic error class. """ pass class Component(...
""" Anserini: A toolkit for reproducible information retrieval research built on Lucene 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 a...
import vtk from vtkmodules.util import numpy_support as nps from vtkmodules.numpy_interface import dataset_adapter as dsa import numpy as np def getPointsAndCellsFromPolydata(polydata): """ Extract points and cells from polydata object Args: polydata (vtk.vtkPolyData): polydata object representin...
import datetime import json import os from natsort import natsorted from natsort import ns from sense import SPLITS from tools import directories MODULE_DIR = os.path.dirname(__file__) PROJECTS_OVERVIEW_CONFIG_FILE = os.path.join(MODULE_DIR, 'projects_config.json') PROJECT_CONFIG_FILE = 'project_config.json' def ...
import numpy from ltron.gym.spaces import SinglePixelSelectionSpace from ltron.gym.components.ltron_gym_component import LtronGymComponent from gym.spaces import ( Discrete, Tuple, Dict, MultiDiscrete ) from ltron.geometry.collision import check_collision import math class RotationAroundSnap(LtronGymCo...
# -*- coding: utf-8 -*- import numpy as np from scipy import interp from matplotlib import pyplot as plt from sklearn.metrics import auc base_fpr = np.linspace(0, 1, 101) def PlotROC(save, *files): for l, f, c0, c, auroc in files: fig = plt.figure(figsize=(4.5, 4), dpi=300) ax = fig...
import os import os.path as osp import networkx as nx import numpy as np import requests import scipy.sparse as sp from spektral.data import Dataset, Graph from spektral.datasets.utils import DATASET_FOLDER from spektral.utils.io import load_binary class Citation(Dataset): """ The citation datasets Cora, Ci...
import copy import itertools import numpy as np from aoc_tools import gcd def run(data): moons = list(parse(data.split('\n'))) run_moons(moons, 1000) part_a = int(sum(m.total_energy for m in moons)) moons = list(parse(data.split('\n'))) part_b = find_cycle_count(moons) return part_a, part_...
import time #line:1 import sys #line:2 import os #line:3 def load_animation ():#line:6 OOO0OOOO0O00O0OOO ="starting your console application..."#line:7 OOO0O0000O0OOO00O =len (OOO0OOOO0O00O0OOO )#line:8 O0OO0OO00O0OOOOO0 ="|/-\\"#line:10 O00OO00000O000O0O =0 #line:11 OOO0O0O00OOO0OOO0 =0 #li...
from typing import Any, Callable, cast, Dict from backend.common.consts.landing_type import LandingType from backend.common.decorators import cached_public from backend.common.helpers.event_helper import EventHelper from backend.common.helpers.season_helper import SeasonHelper from backend.common.sitevars.landing_conf...
import json import os import pathlib import re """ 标记:['title', 'content', '[PIECE]'] """ """ 用于转换原始法律条文(度小法) 若更换爬虫需重写转换函数(重写__trans_main_body函数即可) """ def __dxf_trans_main_body(raw_main_body): """ 转换mainBody部分(若爬虫更改则需重写) :param raw_main_body: 未处理的mainBody部分 :return: 格式转换后的mainBody """ def ...
import requests from bs4 import BeautifulSoup from pprint import pprint import csv from data import coureurs file = 'ranking.csv' class_general = u"https://tourdefrance2021.fr/classement-general/" class_montagne = u"https://tourdefrance2021.fr/classement-du-meilleur-grimpeur/" class_points = u"https://tourd...
import numpy as np import os import random import shutil from statistics import mean from game_models.base_game_model import BaseGameModel from convolutional_neural_network import ConvolutionalNeuralNetwork GAMMA = 0.99 MEMORY_SIZE = 900000 BATCH_SIZE = 32 TRAINING_FREQUENCY = 4 TARGET_NETWORK_UPDATE_FREQUENCY = 40000...
# -*- coding: utf-8 -*- """ celery.local ~~~~~~~~~~~~ This module contains critical utilities that needs to be loaded as soon as possible, and that shall not load any third party modules. :copyright: (c) 2009 - 2012 by <NAME>. :license: BSD, see LICENSE for more details. """ from __future...
import rhinoscriptsyntax as rs import math import System # created on 9th Jan 2015 # this class defines a single floorPanel or Tile as an Object with neccessary functions to control it class floorPanel: h1 = 0 h2 = 0 h3 = 0 p1 = None p2 = None slv = None panelID = None def __init__(self,panel1, panel2, sle...
from django.contrib.admin.views.decorators import staff_member_required from django.core.paginator import Paginator from django.shortcuts import render from .common import * from .constants import * from .models import * def zeta_launcher(request, letter=None, filename=None, components=["controls", "instructions", "c...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # -*- mode: Python -*- ''' LJ Laser Server v0.8.1 Plugins Handler. ''' from OSC3 import OSCServer, OSCClient, OSCMessage from websocket_server import WebsocketServer from libs3 import gstt import os import subprocess import sys def Init(wserver): global WSserver ...
from django.conf import settings from django.core.validators import FileExtensionValidator from django.db import models from django.utils.translation import gettext_lazy as _ from django.db.models.signals import post_save from django.dispatch import receiver from PIL import Image from profiles.validators import FileS...
# -*- coding: utf-8 -*- import logging from cryptography.hazmat.primitives.hashes import SHA256, SHA384, SHA512 from fastapi import HTTPException from jwcrypto import jws from jwcrypto.common import base64url_encode from pydantic import ValidationError from auth_server.config import load_config from auth_server.conte...
from __future__ import absolute_import, unicode_literals import os import tempfile import shutil import unittest from io import open from .testSupport import getDemoFontGlyphSetPath from ufoLib.glifLib import ( GlyphSet, glyphNameToFileName, readGlyphFromString, writeGlyphToString, _XML_DECLARATION, ) GLYPHSETDIR = ...
from logging import debug, info import discord from discord.ext import commands import PixelBotData.supportingFunctions as supportingFunctions import logging logging.basicConfig( level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s", handlers=[ logging.FileHandler(f"debug-{supporting...
import tensorflow as tf from tflearn import global_avg_pool from tensorflow.contrib.layers import variance_scaling_initializer import numpy as np import math he_init = variance_scaling_initializer() # he_init = tf.truncated_normal_initializer(stddev=0.02) """ The weight norm is not implemented at this time. """ def w...
from globais import * import datetime import re import certifi class Servidor: def __init__(self, nome = '', emails_notificacao = [], termos_pesquisa = []): self.nome = nome self.emails_notificacao = emails_notificacao self.termos_pesquisa = termos_pesquisa class Termo: def __init__(se...
import os import numpy as np import pytest import rasterio from scipy.interpolate import griddata, interpn import xarray as xr from mfsetup.grid import MFsetupGrid from mfsetup.interpolate import get_source_dest_model_xys, interp_weights from mfsetup.testing import compare_float_arrays @pytest.fixture def dem_DataA...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
''' Created on Feb 28, 2013 @author: czue ''' from copy import copy from datetime import datetime from casexml.apps.case.mock import CaseBlock from corehq.apps.commtrack.const import RequisitionActions, RequisitionStatus, UserRequisitionRoles, notification_template import uuid from corehq.apps.commtrack.models import ...
import logging import sys import pytest import salt.modules.status as status from tests.support.mock import MagicMock, patch log = logging.getLogger(__name__) @pytest.fixture def configure_loader_modules(): return { status: { "__grains__": { "ip4_interfaces": { ...
""" Handles the data storage and retrieval. """ import sqlite3 import time from functools import wraps from os import path from typing import Tuple from halo.settings import DEFAULT_DB_LOCATION, DEFAULT_WEATHER_API_KEY, \ DEFAULT_BACKGROUND_IMAGE, DEFAULT_SCREEN_HEIGHT, DEFAULT_SCREEN_WIDTH, DEFAULT_UNITS, SUPPOR...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math as m import Rhino.Geometry as rg from compas_rcf.ur import comm from compas_rcf.ur import ur_standard from compas_rcf.ur.visualize_urscript import visualize_urscript from compas_rcf.utils.util_fun...
# -*- coding: utf-8 -*- from django.core.files.storage import FileSystemStorage import os from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.timezone import utc from autofixture.compat import GenericForeignKey from autofixture.compat ...
# -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use import os import sys from fn_log_capture.components.funct_fn_log_capture import filter_log_level, get_log_by_filter """ pytest --resilient_app_config=/<path>/<to>/app.config tests/test_filter_by_log_level.py """ LOG_TEMPLATE = u"2019-10-21...
import os import sys import subprocess import shutil import contextlib import json current_dir = os.path.dirname(__file__) _base_dir = None def which(cmd): try: return shutil.which(cmd) except AttributeError: import distutils.spawn return distutils.spawn.find_executable(cmd) def ...
# -*- encoding: utf-8 -*- from openerp import models, fields, api, _ from openerp.exceptions import UserError, ValidationError import datetime import logging class AccountInvoice(models.Model): _inherit = "account.invoice" tipo_gasto = fields.Selection([('compra', 'Compra/Bien'), ('servicio', 'Servicio'), ('...
import numpy as np from gym_snake.envs.objects import Apples from gym_snake.envs.constants import ObjectColor from gym_snake.envs.objects import Snake def rotate_color(r, g, b, hue_rotation): if hue_rotation == 0: return r, g, b import colorsys, math hue, lightness, saturation = colorsys.rgb_to_...
import numpy as np import matplotlib.pyplot as plt import math class FirstOrderSystem(): """FirstOrderSystem Attributes ----------- state : float system state, this system should have one input - one output a : float parameter of the system b : float parameter of the sy...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2014, <NAME> # # 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...
""" Borrowed from Pyramid #@@ port tests """ import pkg_resources import sys import os import imp class ConfigurationError(Exception): """ Stub error """ class DottedNameResolver(object): """ This class resolves dotted name references to 'global' Python objects (objects which can be imported) to...
import cv2 import numpy as np import math def draw_bbox(img, bbox, thickness=3, color=(255, 0, 0)): canvas = img.copy() cv2.rectangle(canvas, (bbox[0], bbox[1]), (bbox[2], bbox[3]), color, thickness) return canvas def draw_mask(img, mask, thickness=3, color=(255, 0, 0)): def _get_edge(mask, thickness=...
from typing import Dict, List from collections import defaultdict from math import ceil from sc2 import UnitTypeId, Race from sc2.ids.upgrade_id import UpgradeId import bot.injector as injector from bot.services.state_service import StateService from bot.util.priority_queue import PriorityQueue from bot.services.unit...
#!/usr/bin/env python import toolkit.core.graphics from .BasePainterGeneral import ( clear, label ) from toolkit.ensure.QtCore import * from toolkit.ensure.QtGui import * from . import BaseItem from .. import Settings UIGlobals = Settings.UIGlobals class Base (object): def __init__ (self): ...
import sqlite3 DB_FILE = '../db/expenses.db' CREATE_PAYMENT_TYPE = """ CREATE TABLE IF NOT EXISTS PAYMENT_TYPE ( ID INTEGER PRIMARY KEY AUTOINCREMENT, PAYMENT_MODE CHAR( 20 ) NOT NULL, PAYMENT_MODE_DETAIL CHAR( 80 ), ...
import sys import traceback from typing import Any, Optional, TextIO class _Config(object): traceback: bool = False config = _Config() # get_system_exit_code{{{ def get_system_exit_code(exc: BaseException) -> int: """ Return the exit code for linux or windows os, based on the exception. If, on win...
#!/usr/bin/env python import datetime import json import os import pathlib import re import sys from typing import List, Optional from pydantic import ValidationError from vaccine_feed_ingest_schema import location as schema from vaccine_feed_ingest.utils.log import getLogger logger = getLogger(__file__) def _get...
#!/usr/bin/env python from app import lego from app import webhook from flask import Blueprint, request, render_template, \ flash, g, session, redirect, url_for, \ current_app from urllib.request import urlopen import io import logging import os import sqlite3 import tekore as tk im...
import sys import os import os.path as op import tempfile import shutil from subprocess import Popen from datetime import datetime from . import globalvars from .base import CodeTemplate, GeneratedItem, owner, NSApp, const, defaults from .types import Action, NLSTR from .control import ControlSize, TextAlignment from ...
from decimal import Decimal from multiprocessing import Process from os import makedirs from os import remove from os.path import exists, join from subprocess import call, check_output from time import sleep from invoke import task from tasks.util.env import PROJ_ROOT, BENCHMARK_BUILD, RESULT_DIR, set_benchmark_env f...
import json cmp_report = { "resourceType": "DiagnosticReport", "id": "argonaut-lab-report-1", "status": "final", "subject": { "reference": "Patient/1032702" }, "effectiveDateTime": "2005-07-04", "issued": "2005-07-06T11:45:33+11:00", "category": { "coding": [{ "system": "http://hl7.org/fhir/v...
import os.path as op from traitlets.config import Config from nbconvert.exporters import HTMLExporter from nbconvert.writers import FilesWriter from nbconvert.preprocessors import Preprocessor import jupytext as jpt import nbformat as nbf from ruamel.yaml import YAML from .utils import _clean_markdown_cells, _split_y...
""" This script updates a hosted feature service in ArcGIS.com (or a local Portal) from a 3rd party API or web service. An update is performed on the point at a given interval. Required inputs: + URL to a Feature Service + Username / password with administrator rights for the feature service Doc Ref...
from evo_json.constants import ID_STR, CARDS_STR from evo_json.convert_py_json.convert_player_fields import * from evo_json.convert_py_json.convert_species import convert_from_pj_los, \ convert_to_pj_los, convert_from_pj_loc from evolution.data_defs import * from evolution.player.iplayer import IPlayer from evoluti...
import json from urllib.parse import urlparse, parse_qs import requests data = {} headers = { "accept": "application/json", "accept-encoding": "gzip, deflate, br", "accept-language": "zh-CN,zh;q=0.9", "content-length": "63", "content-type": "application/json", "cookie": "pgv_pvi=9657849856; p...
import warnings from math import floor, e import numpy as np import pandas as pd from tqdm import tqdm from scipy.stats import linregress from .definitions import PARAM, SERIES, COL from .sww_utils import year_delta, guess_freq, rain_events, agg_events def annual_series(rolling_sum_values, year_index): """ ...
"""Testing the ShipEngineConfig object.""" import pytest from shipengine import ShipEngine, ShipEngineConfig from shipengine.enums import BaseURL, Constants from shipengine.errors import InvalidFieldValueError, ValidationError from shipengine.util import api_key_validation_error_assertions from shipengine.util.sdk_ass...
import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QDesktopWidget, QMainWindow, QHBoxLayout, QVBoxLayout, QProgressBar, QComboBox, QLabel, QFileDialog, QLineEdit from PyQt5.QtCore import QBasicTimer, QThread import plistlib import os import SafariBookmarkSaver class Example(QMainWindow): def ...
import asyncio from datetime import datetime, timezone from typing import Any, Awaitable, Callable, Dict, List, Tuple, Union import discord from dateparser import parse from redbot.core import commands from redbot.core.utils.chat_formatting import box from redbot.core.utils.predicates import MessagePredicate from .co...
#!/usr/bin/env python # Copyright (c) 2016, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Composition ^^^^^^^^^^^ Combine data from different radar locations on one common set of locations .. autosummary:: :nosignatures: :toctree: generated/ extra...
import numpy as np # Golay Matrix for error correction H_Golay = np.matrix([[1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0...
# -*- coding: utf-8 -*- """ A cell-based model whose architecture is described by a genotype. """ from __future__ import print_function import torch from torch import nn from aw_nas import ops from aw_nas.final.base import FinalModel from aw_nas.final.det_model import HeadModel from aw_nas.ops import MobileNetV3Bloc...
import re import string from difflib import SequenceMatcher, _calculate_ratio def full_split(text, regex): """ Split the text by the regex, keeping all parts. The parts should re-join back into the original text. >>> list(full_split('word', re.compile('&.*?'))) ['word'] """ while text: ...
# noinspection PyUnresolvedReferences import math import os import time from concurrent.futures import ThreadPoolExecutor from multiprocessing.dummy import Queue, Event from queue import Empty from es import es_client from substratum import adapter_logger, db_client, file_utils from substratum.bones import errors from...
import scanpy as sc import tangram as tg import numpy as np import pandas as pd import pytest # to run test_tangram.py on your local machine, please set up as follow: # - create test environment according to environment.yml (conda create env -f environment.yml) to make sure environment matches developing environment #...
"""contains all the forms related to authentication and account functionality.""" from __future__ import annotations from typing import Any, Callable, Optional, Type from flask_wtf import FlaskForm from wtforms import PasswordField, SelectField, StringField, SubmitField from wtforms.fields.html5 import EmailField fro...
#!/usr/bin/env python # vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 et tw=80 : # # This module provides routines to work with targets lists and image # coordinates for parallax pipeline image processing. # # <NAME> # Created: 2021-02-12 # Last modified: 2021-02-25 #-----------------------------------------------...
"""Paging data structures and bookmark handling.""" from __future__ import unicode_literals import csv from .serial import Serial SERIALIZER_SETTINGS = dict( lineterminator=str(""), delimiter=str("~"), doublequote=False, escapechar=str("\\"), quoting=csv.QUOTE_NONE, ) s = Serial(**SERIALIZER_SET...
import sys import os import uuid import json from hashlib import sha256 from itertools import chain from collections import OrderedDict import operator from functools import partial import numpy as np import gbdxtools as gbdx from gbdxtools.rda.util import RDA_TO_DTYPE from gbdxtools.rda.graph import VIRTUAL_RDA_URL,...
import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * class table_5_5(QWidget): """ 중간 디스플레이 위젯 """ qss = """ QWidget { background: rgb(221, 221, 221); border:0px solid; } QPushButton{ ...
from __future__ import absolute_import from datetime import datetime from freezegun import freeze_time import pytest from django.utils.timezone import utc from figures.compat import StudentModule from figures.helpers import as_datetime, as_date from figures.sites import ( get_student_modules_for_site, get_st...
""" h2o_pjt1996.py Water potential energy surface from Ref [1]_ ("PJT2"). This surface was optimized for H2(^16O), containing contributions from B-O breakdown. Some coordinate definitions are required from Ref [2]_. References ---------- .. [1] <NAME>, <NAME>, and <NAME>, J. Chem. Phys. 105, 6490 (1996). http...
import socket import ssl import threading import time import random import base64 import msgpack import OpenSSL def get_public_key(path): with open(path, 'r') as f: public_key = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, f.read()) return public_key def verify_signature(public_key, ...
import collections import re import codecs from os.path import join import emot import spacy from spacy.lang.en.stop_words import STOP_WORDS from . import misc, fs from .twokenize import tokenize as tweet_tokenize from .twitter_nlp_emoticons import Emoticon_RE def _read_emots(): emots = set() with codecs.ge...
import logging from ibmsecurity.utilities import tools logger = logging.getLogger(__name__) # URI for this module uri = "/iam/access/v8/sts/templates" requires_modules = ['federation'] requires_version = "9.0.1.0" def get_all(isamAppliance, check_mode=False, force=False): """ Retrieve a list of STS chain te...
import discord, sqlite3, datetime from discord.ext import commands class Logs(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() @commands.guild_only() async def ticket(self,ctx): arg = f"{ctx.author.name}" argplus=arg.replace(" " , "-") args = s...
import yaml import tempfile import os, re, shutil import logging import numpy as np import subprocess import time, datetime import multiprocessing import socket from pkg_resources import resource_filename from lsst.daf.persistence import Butler from .stage import ( SingleFrameDriverStage, MakeSkyMapStage, ...
# Copyright 2020 Atalaya Tech, 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 writing, ...
#Author: <NAME>. Email: <EMAIL> #Packaged by: <NAME>, Email: <EMAIL> #This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. #To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, #PO Box...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Some simple tests. Some of these are rough without exact expected results. """ from __future__ import division, print_function, unicode_literals import parmapper parmapper.set_start_method() import multiprocessing as mp import time if parmapper.CPU_COUNT < 2: rai...
#!/usr/bin/python3.4 # -*- coding=utf-8 -*- #本脚由亁颐堂现任明教教主编写,用于乾颐盾Python课程! #教主QQ:605658506 #亁颐堂官网www.qytang.com #乾颐盾是由亁颐堂现任明教教主开发的综合性安全课程 #包括传统网络安全(防火墙,IPS...)与Python语言和黑客渗透课程! import sys sys.path.append('/usr/local/lib/python3.4/dist-packages/PyQYT/ExtentionPackages') sys.path.append('/usr/lib/python3.4/site-packages/...