text
stringlengths
6.04k
39.5k
import os import sys import argparse import requests import flask import json import re import yaml import shutil import mmh3 from munch import Munch, munchify from flask import render_template, redirect, url_for, send_from_directory from markupsafe import escape def log(*args, **kwargs): print(*args, **kwargs, ...
#!/usr/bin/env python3 import os import math import sys from abc import abstractmethod import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim from nets import nets_factory, resnet_utils import aardvark import cv2 from tf_utils import * import cpp flags = tf.app.flags FLAGS = flags.FLAGS fl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: spywhere # @Date: 2015-10-02 09:54:10 # @Last Modified by: <NAME> # @Last Modified time: 2015-10-21 17:05:03 import base64 import json import os import re import sys import time import urllib.request import yaml FLAGS = { "verbose": False, "yaml": F...
#! python """ Generates a table showing consensus stats and a report showing variants plots for the top 25 contigs of the supplied reference. """ import logging import hashlib import os import sys import numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from pbcommand.models.report...
"""A utility class that handles database operations related to covidcast. See src/ddl/covidcast.sql for an explanation of each field. """ # third party import json import mysql.connector import numpy as np from math import ceil # first party import delphi.operations.secrets as secrets class CovidcastRow(): """A...
import pandas as pd import numpy as np from shapely.geometry import Polygon from shapely import affinity from descartes import PolygonPatch import matplotlib.pyplot as plt def split(word): word_split = [] for char in word: word_split.append(char) return word_split # def convert_to_game_coordinates(AV_pos,AV_yaw...
import pygame from pygame.locals import * import random import button pygame.init() clock = pygame.time.Clock() fps = 60 #окно-игра bottom_panel = 150 screen_width = 800 screen_height = 400 + bottom_panel screen = pygame.display.set_mode((screen_width, screen_height)) pygame.display.set_caption('RPG...
# # Copyright 2012-2016 PressLabs SRL # # 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 o...
""" Utils This includes quantitative measures to compare how the high-dimensional data and its low embedding result are similar. Provides 0. Root Mean Squared Error (RMSE) 1. Kruskal stress measure 2. Sammon's stress 3. Spearman's Rho 4. Trustworthiness & Continuity 5. Mean Relative Rank Error (MRRE) 6....
########################################### ########################################### #### Function to generate reports in Reportlab ########################################### ########################################### # libraries import matplotlib.pyplot as plt import numpy as np import pandas as pd ## repor...
# ---------------------------------------------------------------------- # | # | AcquireBinaries.py # | # | <NAME> <<EMAIL>> # | 2018-09-11 07:38:33 # | # ---------------------------------------------------------------------- # | # | Copyright <NAME> 2018-22. # | Distributed under the Boost Software ...
# This routine computes the first-order # transit timing variations in Agol & Deck (2015). Please # cite the paper if you make use of this code in your research. import numpy as np import matplotlib.pyplot as plt class Planet(object): def __init__(self, mass_ratio=None, trans0=None, period=None, ecos=None, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ wz_compat/import_pupils.py - last updated 2019-12-03 Convert the pupil data from the form supplied by the school database. Retain only the relevant fields, add additional fields needed by this application. ============================== Copyright 2019 <NAME> Li...
import os import numpy as np import tensorflow as tf from keras import backend as K from keras.models import load_model from model.network import AdaptiveInstanceNormalization from keras.layers import Input, Dense, Flatten from keras.layers import Lambda, Conv2D from keras.models import Model from keras.optimizers i...
import argparse import collections import fnmatch import json import chainer import chainer.functions as F import chainer.links as L import numpy as np import chainer_trt generators = list() # Use this type to describe acceptable error for each test case error = collections.namedtuple('error', ['fp32', 'fp16', 'in...
from stenway.reliabletxt import * from stenway.wsv import * class SmlNode: def __init__(self): self.whitespaces = None self.comment = None def _setWhitespacesAndComment(self, whitespaces, comment): self.whitespaces = whitespaces self.comment = comment def getWhitespaces(self): return self.whitespaces ...
############################################################################################################################################################## ############################################################################################################################################################## ""...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
""" The MIT License (MIT) Copyright (c) 2014 <NAME> <<EMAIL>> 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, modify, me...
""" package to voxelize an embedded graph """ import numpy as np def Bresenham3D(p1, p2): #from https://www.geeksforgeeks.org/bresenhams-algorithm-for-3-d-line-drawing/ x1, y1, z1 = p1 x2, y2, z2 = p2 ListOfPoints = [] ListOfPoints.append((x1, y1, z1)) dx = abs(x2 - x1) dy = abs(y2 - y1) ...
import os from typing import List import seaborn as sns from puffmarker.input.import_NU_video_gt import * from puffmarker.plots.plot_signal import * from puffmarker.wrist_features import * from puffmarker.input.import_stream_processor_inputs import get_respiration pids = ['202_update', '205', '208', '209', '211', '21...
# -*- coding: utf-8 -*- """ Created on Sun Dec 5 00:37:02 2021 @author: Ryan """ from tkinter import Frame, Canvas, Tk, messagebox from os import path import random from sqlite3 import connect from PIL import Image, ImageTk from widget_creation import windowconfiguration, labelcreation, labelframecreati...
import os from subprocess import call from copy import deepcopy from random import choice import cv2 import numpy as np from numpy import matrix, concatenate from numpy.linalg import inv, pinv, svd from sklearn.cluster import KMeans from util import * #################################################################...
import re from typing import NamedTuple from functools import partial #TODO: move tests to separate folder #TODO: implement AI opponent W_PIECES = ('\u2659', '\u2658', '\u2657', '\u2656', '\u2655', '\u2654') B_PIECES = ('\u265F', '\u265E', '\u265D', '\u265C', '\u265B', '\u265A') class MoveError(Exception): pass cla...
# -*- coding: utf-8 -*- import collections import inspect import time import random import selenium from selenium.webdriver import Ie, Opera, Chrome, Firefox, PhantomJS from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support....
# Importation of librairies import math import torch import numpy as np from Models.model_utils import * import pdb ####################### ####################### class PointNetSetAbstraction(torch.nn.Module): def __init__(self, batch_size, nb_subsampled_points, nb_neighbours, sampling_method, patch_radius, in_c...
# -*- coding: utf-8 -*- import json from functools import wraps from flask import Blueprint, abort, redirect, render_template, request, url_for from flask_babel import gettext as _ from marshmallow import ValidationError from eduid_common.api.exceptions import MailTaskFailed, MsgTaskFailed from eduid_common.api.hel...
from tkinter import filedialog, Tk from typing import List import matplotlib.pyplot as plt import numpy as np from lmfit import Model from lmfit.models import GaussianModel, LinearModel from pandas import read_csv, read_hdf, DataFrame, set_option from scipy import fftpack, interpolate from scipy.optimize import curve_...
import numpy import itertools import warnings class BaseSpace: """Base space from which other spaces inherit. :param seed: seed used by the rng, defaults to None :type seed: int, optional :param dtype: dtype to which the space will be coerced, defaults to None. If None, the dtype is inferred from the...
""" AWS API-Gateway Authorizer ========================== This authorizer is designed to be attached to an AWS API-Gateway, as a Lambda authorizer. It assumes that AWS Cognito is used to authenticate a client (UI) and then API requests will pass a JSON Web Token to be validated for authorization of API method calls. ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """First set of tests.""" from __future__ import (absolute_import, unicode_literals, division, print_function) import maltpynt as mp import numpy as np import logging import os import unittest import pytest MP_FILE_EXTENSION = mp...
import time, os from . import DLProcessor from .packer import Packer import gc import traceback from . import DLCommon as cv class TimeStatus(Packer, object): def __init__(self): self.go_startTime = None self.go_endtime = None self.go_lastTime = 0 self.go_end = False se...
from typing import Union, Any, Dict, Callable, List, Optional, Tuple from .grammar import * import logging from datetime import datetime, timezone import math from os import environ from dateutil.parser import parse logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(environ.get("JTOOLS_LOGGING_...
from migen import * from migen.fhdl.specials import Tristate from migen.fhdl import verilog from migen.fhdl.decorators import ClockDomainsRenamer from migen.genlib.fifo import AsyncFIFO, SyncFIFO import subprocess class USB_ULPI(Module): clk = Signal() # USB 60MHz clock data = Signal(8) # Bidirectional ...
import random import cv2 import numpy as np import math class DualCompose: def __init__(self, transforms): self.transforms = transforms def __call__(self, x, mask=None): for t in self.transforms: x, mask = t(x, mask) return x, mask class OneOf: def __init__(self, tra...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
""" Concat routines. """ from typing import Hashable, Iterable, List, Mapping, Optional, Union, overload import numpy as np from pandas._typing import FrameOrSeriesUnion from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries from pandas import DataFrame, Index, MultiIndex, Series from pandas.core.arrays.ca...
import numpy as np import tensorflow as tf from tensorflow.keras import layers import matplotlib.pyplot as plt import math import random #Dimension of State Space for single agent dim_agent_state = 5 #Time Difference Between 2 Steps dt = 0.4 #Number of Episodes num_episodes = 3000 #Number of Steps...
import os import time import pytest from threading import Thread from pympler.tracker import SummaryTracker from swsscommon import swsscommon from swsscommon.swsscommon import ConfigDBPipeConnector, DBInterface, SonicV2Connector, SonicDBConfig, ConfigDBConnector, SonicDBConfig, transpose_pops import json existing_file...
# Copyright 2015 The TensorFlow 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 applica...
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
"""An INI parser or a Config parser""" import re import io __version__ = "3.0.0" __all__ = ["ParsingError", "INI", "PropertyError", "DuplicateError", "SectionError"] class ParsingError(Exception): """base exception for parsing error""" def __init__(self, message: str, line: int, text: str = ""): se...
"""Spectral Embedding.""" # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # License: BSD 3 clause import warnings import numpy as np from scipy import sparse from scipy.linalg import eigh from scipy.sparse.linalg import eigsh from scipy.sparse.csgraph import connected_components from scipy.sparse.csgraph impo...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. """Extension to python-markdown to support LaTeX (rather than html) output. Authored by <NAME>: <http://w...
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. 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 r...
# -*- coding: utf-8 -*- import pandas as pd import numpy as np import math import sys, getopt from datetime import datetime, timedelta from sklearn.preprocessing import StandardScaler import src.utils.func_utils as func_utils # Import classes from src.classes.myCerebro import MyCerebro from src.classes.myAnalyzer i...
# -*- coding: utf-8 -*- import biosppy import matplotlib.pyplot as plt import numpy as np import pytest import neurokit2 as nk def test_ecg_simulate(): ecg1 = nk.ecg_simulate(duration=20, length=5000, method="simple", noise=0) assert len(ecg1) == 5000 ecg2 = nk.ecg_simulate(duration=20, length=5000, he...
""" Copyright <NAME> Licensed under the BSD 3-Clause "New" or "Revised" license; you may not use this file except in compliance with the License. You may obtain a copy of the License at : https://opensource.org/licenses/BSD-3-Clause """ import logging from flask import Flask, render_template, request, redirect, url_f...
''' BreezySchedule An activity scheduling assistant built for YMCA Camp Thunderbird to substantially lower time necessary to make optimal schedules. Originally created to make possible rapid adaptation to volatile CDC guidelines for summer camps during the COVID-19 outbreak. External package...
""" WRITEME """ from __future__ import absolute_import, print_function, division import logging import warnings import theano from theano import gof import theano.gof.vm from theano.configparser import config from six import string_types from theano.compile.function_module import Supervisor _logger = logging.getLog...
import asyncio import logging from types import ( TracebackType, ) from typing import ( AsyncIterator, Iterable, Optional, Sequence, Tuple, Type, TypeVar, Union, ) from eth2.beacon.chains.base import ( BaseBeaconChain, ) from eth2.beacon.constants import ( ZERO_ROOT, ) from ...
"""Lapis script""" __author__ = 'Vardë' import os import sys import shlex import subprocess from typing import NamedTuple, Optional, Dict, Any from pathlib import Path from functools import partial from adptvgrnMod import adptvgrnMod import vardefunc as vdf import muvsfunc as muvf import mvsfunc as mvf import G41Fun ...
""" /* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: MIT-0 * * 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,...
import os import warnings import pytorch_lightning as pl import toml import torch import torchmetrics from pytorch_lightning.callbacks import ModelCheckpoint from torch import nn from torch import optim from torchvision import models from data.data_ukb import get_imaging_card_data, COVAR_NAMES os.environ["CUDA_VISIB...
""" Copyright (c) 2018-2022 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
import os import csv import re import glob import json from luigi import Parameter, IntParameter, WrapperTask from collections import OrderedDict from lib.timespan import get_timespan from tasks.base_tasks import ColumnsTask, RepoFileUnzipTask, TableTask, CSV2TempTableTask, MetaWrapper from tasks.meta import current_...
import vim, os, platform, subprocess, webbrowser, json, re, time import sys PY2 = int(sys.version[0]) == 2 if PY2: import urllib2 as request from urllib2 import HTTPError else: # Py3 from urllib import request from urllib.error import HTTPError def cmp(a, b): if a < b: return -...
import logging import os import shutil from pathlib import Path from typing import Union from config.settings.base import MEDIA_ROOT from miseq_portal.analysis.tasks import assemble_sample_instance from miseq_portal.miseq_uploader.parse_miseq_analysis_folder import parse_miseq_folder from miseq_portal.miseq_uploader.p...
import json from datetime import datetime from packages.menu import DefaultMenu from typing import Optional import discord from discord.ext import commands from discord.ext.commands.converter import TextChannelConverter from matplotlib import pyplot as plt from io import BytesIO import packages.database as db clas...
#! /usr/bin/env python ############################################################################## ## DendroPy Phylogenetic Computing Library. ## ## Copyright 2010-2015 <NAME> and <NAME>. ## All rights reserved. ## ## See "LICENSE.rst" for terms and conditions of usage. ## ## If you use this work or any portio...
""" File: my_drawing.py Name: <NAME> ---------------------- stanCode SC101 May2020 Assignment 1- Problem 1 """ from campy.graphics.gobjects import GOval, GRect, GPolygon, GLabel, GLine from campy.graphics.gwindow import GWindow # Global variable window = GWindow(width=1200, height=750, title="Tiffany's Masterpiece") ...
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """ Graph HyperNetworks. """ import torch import torch.nn as nn import os from .mlp import MLP from .gatedgnn import Gat...
import json from datetime import datetime from discord import Game, Message, Guild, Embed, AuditLogAction, Member, User, TextChannel from discord.ext import commands from discord.ext.commands import Context, Cog from discordbot.core.discord_bot import DiscordBot from discordbot.core.db_tools import update_db from dis...
#------------------------------------- # Project: Transductive Propagation Network for Few-shot Learning # Date: 2019.1.11 # Author: <NAME> # All Rights Reserved #------------------------------------- import torch import torch.nn as nn from torch.nn import functional as F from torch.autograd import Variable impor...
# coding=utf-8 # Copyright 2019 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...
# This script is runs S2S-LHSPA1-{2,3,4,5}{+Type} models. from typing import * from seutil import IOUtils from shared import * import argparse import os import yaml parser=argparse.ArgumentParser() parser.add_argument('-mode', '--mode', required=True, default='train', type=st...
#!/usr/bin/env python3 # export_to_anki.py # # Exports the entire database to an Anki deck. See xml2json.py for input file format. import genanki import getopt import json import os import re import subprocess import sys CSS = """.card { font-family: arial; font-size: 20px; text-align: center; color: black; bac...
#!/usr/bin/env python # -*- coding: utf-8 -*- # NOTE: You need pyphysim to run this file. # https://github.com/darcamo/pyphysim """ Simulator for the SINRs of a dense indoor scenario. The scenario is a very simplified version of the Test Case 2 from the METIS project. Only one floor of one building is simulated and...
import bpy import arm.assets as assets import arm.utils import arm.log as log import arm.make_state as state import arm.api callback = None def add_world_defs(): wrd = bpy.data.worlds['Arm'] rpdat = arm.utils.get_rp() # Screen-space ray-traced shadows if rpdat.arm_ssrs: wrd.world_defs += '_SS...
import itertools import time from collections import defaultdict from datetime import datetime, timedelta from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union from django.conf import settings from django.db import connection from django.http import HttpRequest, HttpResponse from django.shortcuts i...
""" This module gathers all the essential database-creation functions for the game engine's various object types. Only objects created 'stand-alone' are in here, e.g. object Attributes are always created directly through their respective objects. Each creation_* function also has an alias named for the entity being c...
import os import librosa import matplotlib.pyplot as plt import numpy as np import cv2 from easydict import EasyDict import argparse common_config = {'sr': 44100, 'hop_length': 512, 'mono': True, 'fmin': 27.5} split_audio_config = {'top_db': 20, 'frame_length': 1024, 'merge_thrd': 0.2} cqt_config = {'bins_pe...
#!/usr/bin/env python # -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2019 <NAME> # # 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 t...
from typing import Any, Callable, Union from cffi import FFI from refcount.base import NativeHandle # This is a Hack. I cannot use FFI.CData in type hints. # CffiData = Any CffiData = FFI().CData """A dummy type to use in type hints for limited documentation purposes FFI.CData is a type, but it seems it cannot be use...
import logging import typing import time import pathlib import json import sys import hashlib import pydgraph import grpc from prairiedog.edge import Edge from prairiedog.graph import Graph from prairiedog.node import Node, DEFAULT_NODE_TYPE from prairiedog.kmers import possible_kmers log = logging.getLogger("prair...
""" InceptionV3 for TF2.0 Created on 03/18/2019 @author: RH """ import tensorflow as tf from keras.layers.convolutional import Conv2D from keras.layers.pooling import MaxPooling2D, AveragePooling2D, GlobalAveragePooling2D from keras.layers.core import Dense, Dropout, Flatten, Activation from keras.layers.normalizatio...
import re from html import escape from datetime import datetime, timedelta from typing import Callable, Match, Optional, List, Dict from src.dynamodb import client as dynamodb_client from src.github.models import ( Comment, PullRequest, Review, ReviewState, User, Assignee, AssigneeReason, ) ...
# Copyright 2017 Google LLC. # # 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 copyright notice, # this list of conditions and the following disclaimer. # #...
import os import sys import zipfile from collections import defaultdict from typing import Dict, Set import delegator import pandas as pd from pandas.errors import EmptyDataError def read_attrs_to_list_of_dicts(filepath, sep='\t'): df = read_attrs(filepath, sep) data = df.to_dict() out = [] for eleme...
# # 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 us...
from __future__ import absolute_import import logging from galaxy import model, util from markupsafe import escape from galaxy.web.base.controller import BaseUIController, web, UsesFormDefinitionsMixin from galaxy.web.form_builder import TextField, SelectField from galaxy.web.framework.helpers import time_ago, iff, g...
# coding: utf-8 import torch import torch.nn.functional as F from torch import Tensor import numpy as np from joeynmt.decoders import Decoder, TransformerDecoder from joeynmt.embeddings import Embeddings from joeynmt.helpers import tile __all__ = ["greedy", "transformer_greedy", "beam_search"] def greedy(src_mask:...
import PySimpleGUI as sg from scipy.io.wavfile import write import numpy as np import pandas as pd from datetime import datetime,date, timedelta #import warnings from os import path from struct import unpack def MTreadgui(fn,slMode='s',leng=0,start=0, wav_out=None, outpath='Default Folder',header=None): """ ...
#!/usr/bin/env python #/****************************************************************************** # * $Id: ogrinfo.py 23329 2011-11-05 21:09:07Z rouault $ # * # * Project: OpenGIS Simple Features Reference Implementation # * Purpose: Python port of a simple client for viewing OGR driver data. # * Author: <NAME...
# Copyright (c) 2021 - present / Neuralmagic, 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 b...
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
#!/usr/bin/env python from __future__ import print_function, unicode_literals import inspect import os import re import sys scripts_dir = os.path.abspath(os.path.dirname(__file__)) rb_dir = os.path.abspath(os.path.join(scripts_dir, '..', '..')) sys.path.insert(0, rb_dir) sys.path.insert(0, os.path.join(scripts_dir,...
# ================================================================================================= # Copyright (C) 2018-2020 University of Glasgow # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met...
from __future__ import unicode_literals import functools import itertools import re from .common import InfoExtractor from ..compat import ( compat_b64decode, compat_chr, compat_ord, compat_str, compat_urllib_parse_unquote, compat_urlparse, compat_zip ) from ..utils import ( clean_html...
# encoding: utf-8 import pytest import datetime from ...testing import DatabaseTest from ...classifier import Classifier from ...lane import ( Facets, Pagination, Lane, WorkList, ) from ...model.cachedfeed import CachedFeed from ...model.configuration import ConfigurationSetting from ...opds import Acqu...
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) from pymortests.base import runmodule import pytest import numpy as np from pymor.parameters.fun...
# Copyright (c) 2022 CNES # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """This script is the entry point for building, distributing and installing this module using distutils/setuptools.""" from typing import ClassVar, Optional import datet...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import io import itertools import json import os import subprocess import sys import tempfile import unittest import un...
# Copyright: <NAME> <<EMAIL>> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import time import traceback import gc from aqt.qt import * import aqt from anki import Collection from anki.sync import Syncer, RemoteServer, FullSyncer, MediaSyncer, \ RemoteMediaServer from anki.hooks i...
# Copyright (c) 2021, <NAME> # License: MIT License from typing import Any, List, Dict, Optional import textwrap from ezdxf.lldxf.types import ( render_tag, DXFVertex, GROUP_MARKERS, POINTER_CODES, ) from ezdxf.addons.xqt import QModelIndex, QAbstractTableModel, Qt from ezdxf.addons.xqt import QStanda...
from .imports import * from .torch_imports import * from .core import * from .model import * from .dataset import * from .learner import * from .lm_rnn import * from sklearn.feature_extraction.text import CountVectorizer from sklearn.model_selection import train_test_split from torchtext.datasets import language_model...
# -------------------------------------------------------------------------------- # Copyright (c) 2017 <NAME>(<NAME>). All rights reserved. # # 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 Sof...
print('Running pyssrs (Python String Search and Replace Script)') import sys import os PYTHON_MAJORVERSION_REQUIRED = 3 PYTHON_MINORVERSION_REQUIRED = 7 py_maj = sys.version_info[0] py_min = sys.version_info[1] def py_report(): report = str('Python version is ' + str(py_maj) + '.' + str(py_min) + ...
# coding: utf-8 from __future__ import unicode_literals import hashlib import itertools import re import time from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlencode, ) from ..utils import ( clean_html, decode_packed_codes, get_element_by_id, get_elem...
import random import sys import time import cv2 import matplotlib.pyplot as plt import numpy as np import pygame from numpy import genfromtxt from pygame.locals import * # Konfiguracja programu pygame.init() window_w = 1000 window_h = 600 screen = pygame.display.set_mode((window_w, window_h)) pygame.d...