text stringlengths 8.04k 46.5k |
|---|
__author__ = 'jameskreft'
import requests
import feedparser
from bs4 import BeautifulSoup
import re
from operator import itemgetter
from pubs_ui import app
import json
from urlparse import urljoin
from copy import deepcopy
from itsdangerous import URLSafeTimedSerializer
import arrow
# should requests ... |
# -*- coding: utf-8 -*-
from __future__ import division
import difflib
import inspect
from math import isnan
from numbers import Number
from ._compatibility.builtins import *
from ._compatibility import abc
from ._compatibility.collections import defaultdict
from ._compatibility.collections.abc import Mapping
from ._co... |
from bench import app, db
from bench.models import User, Listing, Case, Memory, CPUCooler, Motherboard, CPU, GPU, PowerSupply, Images
from flask import render_template, request, flash, redirect
from forms import LoginForm, RegisterForm, newListingForm
from flask_login import current_user, login_user, logout_user
from w... |
"""The command-line module of the library.
See ptg --help for more information.
"""
from __future__ import annotations
import builtins
import importlib
import os
import random
import sys
from argparse import ArgumentParser, Namespace
from itertools import zip_longest
from platform import platform
from typing import ... |
"""
Django settings for laxy project.
Generated by 'django-admin startproject' using Django 1.11.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import loggin... |
import math
# from numba import jit
import numpy as np
from scipy.ndimage import maximum_filter
from scipy.spatial.distance import cdist
import torch
import cv2
import colorsys
import matplotlib.pyplot as plt
# from nms import nms
# In numpy >= 1.17, np.clip is slow, use core.umath.clip instead
# https://github.com... |
import re
import json
import copy
import logging
import geopy
import dpath.util
from collections import MutableMapping
from decimal import Decimal
from Levenshtein import ratio
from polyglot.text import Text
from django.conf import settings
from django.utils import timezone
from dataman.elastic import search, tokeniz... |
"""
Code Signal Interview Path
"""
"""
Arrays
"""
"""
*** First Duplicate ***
-----------------------
Given an array a that contains only numbers in the range from 1 to a.length, find the first duplicate number for which the second occurrence has the minimal index. In other words, if there are more than 1 duplicated ... |
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from termcolor import cprint,colored
from danpy.sb import dsb,get_terminal_width
from pendulum_eqns.init_FF_sinusoid_model import *
N_seconds = 10
N = N_seconds*10000 + 1
Time = np.linspace(0,N_seconds,N)
dt = Time[1]-Time[0]
... |
import numpy as np
import networkx as nx
import torch
from ase import Atoms
from tqdm import tqdm
from nff.utils.misc import tqdm_enum
DISTANCETHRESHOLDICT_SYMBOL = {
("H", "H"): 1.00,
("H", "Li"): 1.30,
("H", "C"): 1.30,
("H", "N"): 1.30,
("H", "O"): 1.30,
("H", "F"): 1.30,
("H", "Na"): 1... |
"""
This module implements the functionality of reading the input from the user. The following formats are supported:
* DFG
* XES
"""
import pandas as pd
import time
import numpy as np
from amun.trie import PrefixTree
from pm4py.objects.log.importer.xes import factory as xes_import_factory
from pm4py.statistics... |
import random
import numpy as np
from config import config
from utils.codifications import Chromosome
from utils.codification_cnn import ChromosomeCNN
from utils.codifications import Layer
from keras.layers import PReLU, LeakyReLU
from keras import Input, Model
from keras.optimizers import Adam
from keras.layers impo... |
from Scripts import DataStructures
from src.Miscellaneous import bcolors
import os
import pandas as pd
import numpy as np
import matlab.engine
import matplotlib; matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from glob import glob
from shutil import copyfile
from scipy.signal import savgol_filter
matlab_smo... |
"""
Format and compress XML documents
"""
import re
import sys
import getopt
import xml.parsers.expat
__version__ = "0.1.1"
DEFAULT_COMPRESS = False
DEFAULT_CORRECT = True
DEFAULT_INDENT = 2
DEFAULT_INDENT_CHAR = " "
DEFAULT_INLINE = True
DEFAULT_ENCODING_INPUT = None
DEFAULT_ENCODING_OUTPUT = None
class Formatte... |
from graphcnn.helper import *
from graphcnn.network import *
from graphcnn.layers import *
from sklearn.model_selection import KFold
import numpy as np
import tensorflow as tf
import glob
import time
from tensorflow.python.training import queue_runner
# This function is used to create tf.cond compatible tf.train.batch... |
# -*- coding: utf-8 -*-
import os
from django import forms
from django.conf import settings
from django.db.models import Q
from django.forms.models import BaseModelFormSet, modelformset_factory
from django.forms.widgets import RadioSelect
from django.utils.safestring import mark_safe
from django.utils.translation impo... |
#!/usr/bin/env python
import sys
import os
import datetime
import glob
import shutil
from pmagpy import pmag
from pmagpy import ipmag
from pmagpy import version
from pmagpy import contribution_builder as cb
from programs import thumbnails
VERBOSE = True
def error_log(msg, loc="", program="", con_id=""):
con_id = ... |
import numpy as np
from scipy.interpolate import lagrange
import matplotlib.pyplot as plt
import random as rd
import tqdm.auto as tqn
from numba import njit
##pylint
@njit
def solve_hydro(K, n, h, dH, len_t_mesure, t_mesure, dz, nb_cel, alpha=0.7):
Ss = n / h
H_array = np.zeros((len_t_mesure, nb_cel), dtype... |
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import contextlib
import glob
import json
import logging
import os
import socket
import stat
import subprocess
import threading
from goo... |
# Copyright (C) 2019 Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
import os
import getopt
import common
import board_cfg_lib
import scenario_cfg_lib
import lxml
import lxml.etree
ERR_LIST = {}
BOOT_TYPE = ['no', 'vsbl', 'ovmf']
RTOS_TYPE = ['no', 'Soft RT', 'Hard RT']
DM_VUART0 ... |
import logging
from collections import defaultdict
import ailment
from ...engines.light import SpOffset, ArithmeticExpression, SimEngineLight, SimEngineLightVEXMixin, SimEngineLightAILMixin
from ...errors import SimEngineError, AngrVariableRecoveryError
from ...knowledge_plugins import Function
from ...sim_variable ... |
import yaml
import numpy as np
from tqdm import tqdm
from pathlib import Path
from copy import deepcopy
from datetime import datetime
import torch
import torch.nn as nn
from torch_sparse import transpose
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch_geometric.utils import subgraph, is_undirected
fr... |
'''
(c) 2014 <NAME> and <NAME>
This module deals with getting all the data needed for LD Score regression from files
into memory and checking that the input makes sense. There is no math here. LD Score
regression is implemented in the regressions module.
'''
import numpy as np
import pandas as pd
from scipy import s... |
# -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... |
"""Various VR utilities."""
import queue
import threading
import time
from asyncio.streams import StreamReader
from typing import Sequence, Dict
import struct
import numpy as np
import serial.threaded
from pykalman import KalmanFilter
from copy import copy
try:
import cv2
from displayarray import read_update... |
import json
import copy
def match_two_paths(jcpath,datapath_list):
res = False
#if len(jcpath) == len(datapath_list):
matches = 0
tup = list(zip(jcpath,datapath_list))
#print(" tup tomatch: ",tup)
for pair in tup:
#print(' pair:',pair)
if pair[0] == "#" and isinstance(pair[1],in... |
# -*- coding: utf-8 -*-
"""
Storage Design And Operation
This File is called by "Storage_Optimizer_incl_Losses_main.py" (Optimization Routine) and
will operate the storage according to the inputs given by the main file.
The operation data is stored
"""
from __future__ import division
import os
import n... |
'''
Original by dzhu
https://github.com/dzhu/myo-raw
Edited by <NAME>
http://www.fernandocosentino.net/pyoconnect
Edited by <NAME> (Alvipe)
https://github.com/Alvipe/myo-raw
'''
from __future__ import print_function
import enum
import logging
import re
import struct
import sys
im... |
import numpy as np
import scipy.spatial.distance as ssd
from gym import spaces
from gym.utils import seeding
from .._utils import Agent
import cv2
class Archea(Agent):
def __init__(self, idx, radius, n_sensors, sensor_range, speed_features=True):
self._idx = idx
self._radius = radius
self... |
from __future__ import print_function
"""triqler.triqler: provides entry point main()."""
__version__ = "0.6.1"
__copyright__ = '''Copyright (c) 2018-2020 <NAME>. All rights reserved.
Written by <NAME> (<EMAIL>) in the
School of Engineering Sciences in Chemistry, Biotechnology and Health at the
Royal Institute of Te... |
"""
General purpose classes for (generalized) linear regression observation models.
"""
from autograd import elementwise_grad
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd.scipy.linalg import block_diag
from autograd.scipy.special import logsumexp, gammaln
from scipy.special import polyg... |
# ! /usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2019-, NVIDIA CORPORATION. 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/lice... |
# Perform tolerance sweep tolerance by ESM-SSP and well-characterized errors
# for an audience seeking to emulate from the full CMIP6 archive and for the
# scenarioMIP approach, for all ESMs
# For each ESM, loop over various tolerances and generate Ndraws = 500
# GSAT trajectories. Archives with and without each ta... |
# Owlready2
# Copyright (C) 2021 <NAME>
# LIMICS (Laboratoire d'informatique médicale et d'ingénierie des connaissances en santé), UMR_S 1142
# University Paris 13, Sorbonne paris-Cité, Bobigny, France
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General... |
"""
Copyright (c) 2018, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
# general packages
import os
import errno # 捕获程序中的标准错误
import argparse
import numpy as np
import... |
""" External functions accessing the win32 api.
Common types, functions from core win32 libraries, such as kernel32
"""
import os
import errno
from rpython.rlib.rposix_environ import make_env_impls
from rpython.rtyper.tool import rffi_platform
from rpython.tool.udir import udir
from rpython.translator.tool.cbuild imp... |
# GUI Application automation and testing library
# Copyright (C) 2006-2018 <NAME> and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modific... |
#!/usr/bin/env python3
#
# Copyright (c) 2019 <NAME> and contributors.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""The areas module contains the Relations class and associated functionality."""
import os
from typing import Any
from typing import Dict
from t... |
import inspect
from datetime import datetime
from enum import Enum
from functools import update_wrapper
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Type, Union
from uuid import UUID
import click
from .models import (
AnyType,
ArgumentInfo,
CommandFunct... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
import os
import pickle
import logging
from indra.config import get_config
from ..ontology_graph import IndraOntology
from indra.util import read_unicode_csv
from indra.statements import modtype_conditions
from indra.resources import get_resource_path
from indra.statements.validate import assert_valid_db_refs
logger ... |
#!/usr/bin/env python3
import json
import locale
import os
import urllib.parse
import click
import keyring
import tabulate
from onedrive_client import __version__
from onedrive_client import mkdir, get_resource, od_i18n, od_auth
from onedrive_client.od_models import pretty_api, drive_config, account_profile
from one... |
#This file contains the code to build a Deep Factorization Machine model
#
import tensorflow as tf
import numpy as np
from keras.layers import Embedding, Reshape, Activation, Lambda, Input, Dropout, Dense,SpatialDropout1D
from keras.regularizers import l2
from keras.initializers import RandomNormal
from keras.models im... |
import sys
from pypy.interpreter.error import oefmt
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.typedef import TypeDef, GetSetProperty, ClassAttr
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
from rpython.rlib import jit, rgc
from rpython.rtyper.lltypesystem imp... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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... |
# coding=UTF-8
import sys
import traceback
import threading
from operators.op import op
import json
import fileinput
from datetime import datetime, timezone
from globalConfig import globalConfig
import uuid
from camera.BaseCameraManager import BaseCameraManager
class CameraManager(BaseCameraManager):
'''
... |
"""
The table of all LL operations.
"""
from rpython.rtyper.extregistry import ExtRegistryEntry
class LLOp(object):
def __init__(self, sideeffects=True, canfold=False, canraise=(),
canmallocgc=False, canrun=False, tryfold=False):
# self.opname = ... (set afterwards)
if canfold:... |
from websockets import typing
from io import BufferedReader
from typing import List, Optional
from peewee import DateTimeField, IntegerField, SqliteDatabase,Model, TextField
import argparse
import asyncio
import copy
import dataclasses
import datetime
import html
import json
import logging
import math
import os
import ... |
from piffle import iiif
from mock import patch
import six
import pytest
import requests
api_endpoint = 'http://imgserver.co'
image_id = 'img1'
# test iiif image urls
VALID_URLS = {
'info': '%s/%s/info.json' % (api_endpoint, image_id),
# longer api endpoint path
'info-loris': '%s/loris/%s/info.json' % (ap... |
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import inspect
import itertools
import os
import re
import sys
import unittest
if sys.version_info[0] == 2:
import ... |
# -*- coding: utf-8 -*-
"""
Contains the crawling models. We use namedtuple for most models (easier to
pickle, lower footprint, indicates that it is immutable) and we use classes for
objects with mutable states and helper methods.
Classes with crawling logic are declared in the crawler module.
"""
from __future__ impo... |
"""Get epochs from mne.Raw
"""
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# Lice... |
"""
This is just code for the introduction to Python.
It also won't be used anywhere else in the book.
<NAME>. Data Science do Zero: Primeiras Regras com o Python. - Capítulo 02
"""
# type: ignore
# The pound sign marks the start of a comment. Python itself
# ignores the comments, but they're helpful for anyone readin... |
import asyncio
import difflib
import io
import math
import random
import re
from typing import Any
import aiohttp
import discord
from PIL import Image
from discord.ext import commands
from .data.command_data import CmdData
from .menu import Menu
from .milkcoffee import MilkCoffee
from .utils.item_parser import *
from... |
# Copyright (c) 2018 Anki, 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 in the file LICENSE.txt or at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
"""Functions related to computation of the log-likelihood."""
#***************************************************************************************************
# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Go... |
# -*- coding: utf-8 -*-
"""
File name: quad_mdl.py
Author: <NAME>
Created: June 2019
Description: A fault model of a multi-rotor drone.
"""
import sys
sys.path.append('../../')
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import fmdtools.faultsim as fs
import fmdtools.resultdisp as rd
import... |
import os
import glob
import shutil
# from scipy.ndimage import binary_fill_holes
import itertools
import numpy as np
import dippykit as dip
import matplotlib.pyplot as plt
from tqdm import tqdm
import cv2
from cv2 import INTER_AREA
from skimage import filters
from scipy.spatial import ConvexHull
from scipy.ndimage.m... |
#!/usr/bin/python
# Copyright: (c) 2019, DellEMC
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils import dellemc_ansible_utils as utils
import logging
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'suppo... |
"""displaydev.py: Interact with IRAF-compatible image display
Modeled after the NOAO Client Display Library (CDL)
Public functions:
readCursor(sample=0)
Read image cursor position
open(imtdev=None)
Open a connection to the display server. This is called
automatically by readCursor if the di... |
#################################################################################
# The Institute for the Design of Advanced Energy Systems Integrated Platform
# Framework (IDAES IP) was produced under the DOE Institute for the
# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021
# by the softwar... |
import html
import time
from flask import Response
from common.dictionary import cedict_word_set
from common.frequency import subtlex_word_set, word_frequency_ordered, char_frequency_ordered
from common.hsk import hsk_words, hsk_chars
from common.dictionary_parse import parse_block, parse_comma_sep, parse_list, most... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Copyright (C) 2011 cmikula
Trash can gui for Advanced Movie Selection
In case of reuse of this source code please do not remove this copyright.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as p... |
# Copyright © 2019. <NAME>. All rights reserved.
import numpy as np
import pandas as pd
from collections import OrderedDict
import math
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.neighbors import NearestNeighbors
from sklearn.metrics import silhouette_score
from scipy.s... |
from __future__ import absolute_import, division, print_function
import libtbx.phil
from six.moves import cStringIO as StringIO
master_params = """
set_partial_occupancy = None
.type = float
rmsd_min = 1.0
.type = float
rigid_body_refine = False
.type = bool
translation = 0.5
.type = float
.help = Specifies... |
# Copyright 2019-2020 Xanadu Quantum Technologies 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... |
# Usage as a simple differentiable segmenter base class
import os
import torch
import numpy
import json
import glob
import skimage.morphology
from collections import OrderedDict
from . import upsegmodel
from . import segmodel as segmodel_module
from .easydict import EasyDict
from urllib.request import urlretrieve
cl... |
import json
import os
import time
import warnings
from abc import ABC
import numpy as np
import tensorflow.keras as tfk
from astroNN.config import MULTIPROCESS_FLAG
from astroNN.config import _astroNN_MODEL_NAME
from astroNN.datasets import H5Loader
from astroNN.models.base_master_nn import NeuralNetMaster
from astroN... |
"""
An auto-scaling service specific to Assemblyline services.
"""
import threading
from collections import defaultdict
from string import Template
from typing import Dict, List
import os
import math
import platform
import time
import sched
from assemblyline.remote.datatypes.queues.named import NamedQueue
from assem... |
import hashlib, struct, base64
from .cipher import BaseCipher, AEADCipher
# Pure Python Ciphers
class Table_Cipher(BaseCipher):
PYTHON = True
KEY_LENGTH = 0
IV_LENGTH = 0
def setup(self):
if self.key in self.CACHE:
self.encrypt_table, self.decrypt_table = self.CACHE[self.key]
... |
import collections
import itertools
import tempfile
import shutil
import subprocess
import logging
import os
import sys
import re
import string
import yaml
import pkg_resources
from flask import Flask, request, redirect, send_file, send_from_directory, render_template, jsonify
import os.path
import requests
logging.ba... |
from maya import cmds
commandDict = {}
# ################################ #
# ###### Maya Default Nodes ###### #
# ################################ #
# Surface
def ShaderfxShader():
cmds.shadingNode('ShaderfxShader', asShader=True)
commandDict['blinn'] = "render_blinn.png"
def blinn():
cmds.shadingNo... |
import traceback
import lark
TAB = " "
TYPE_MAP = {
"String": "str",
"Boolean": "bool",
"Byte": "int",
"Integer": "int",
"Long": "int",
"LongLong": "int",
"Single": "float",
"Double": "float",
# Currency, Date, Variant
}
TYPE_SUFFIX_MAP = {
"$": "str",
"%": "int", # Integer
"&": "int", # Long
"#":... |
import humanoid_soccer_dataset # Register `my_dataset`
import tensorflow_datasets as tfds
import tensorflow as tf
import numpy as np
from IPython.display import clear_output
import matplotlib.pyplot as plt
import glob
import cv2
import sys
import random
from keras import backend as K
from model import build_unet
impor... |
"""Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing ver... |
# standard libraries
import argparse
import contextlib
import os
import itertools
import json
import logging
import math
from pathlib import Path
import random
import time
# third-party libraries
import matplotlib.pyplot as plt
import numpy as np
from tensorboardX import SummaryWriter
import torch
from torch.cuda.amp i... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2020, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Molcas Output Parser
#####################
Multiple frames are not currently supported
"""
from __future__ import absolute_import
from __future__ import print_function
from __fut... |
# -*- coding: utf-8 -*-
# Author: <NAME> <<EMAIL>>
# License: BSD 3 clause
"""
Utility functions for bigfish.stack subpackage.
"""
import os
import re
import copy
import inspect
import hashlib
import numpy as np
import pandas as pd
from urllib.request import urlretrieve
# ### Sanity checks dataframe ###
def chec... |
# Copyright 2017 Google Inc.
#
# 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 queue
import sublime
import sublime_plugin
import threading
import traceback
import time
from . import neo
from . import settings
from .edit import Edit
def copy_sel(sel):
if isinstance(sel, sublime.View):
sel = sel.sel()
return [(r.a, r.b) for r in sel]
# called by neo.py once neovim is load... |
# -*- coding: utf-8 -*-
from typing import Optional, Callable, Final, List
from enum import IntEnum, unique
import os
import time
import random
import aiofiles
from cmyui.utils import rstring
from urllib.parse import unquote
import packets
from constants.mods import Mods
from constants.clientflags import ClientFlags
... |
# ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
"""Contains functionality to manage data context of datastores and datasets. Internal use only."""
import logging
import os
import re
... |
# @Author: <NAME> <Toujour>
# @Date: 20-Nov-2017
# @Email: <EMAIL>
# @Filename: convex_hull_cluster.py
# @Last modified by: Toujour
# @Last modified time: 24-Jan-2018
"""Obtain clusters and calculate meta-features.
Args:
dataset_filename (string): path to the dataset
Predefined types:
Point (dict): {'coo... |
# 새로운 참고링크: https://github.com/eriklindernoren/PyTorch-GAN/tree/master/implementations/context_encoder
# 우리랑 같은 3채널에 하고자하는 바도 비슷함. shape 참고하기 좋을듯하여 첨부함
# 나(소현)는 사진 11개 -> batch_size=11, num_classes=11이니 주의바람!
import argparse
import os
import numpy as np
from dataloader import OAGandataset
import math
import torchvisi... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.3
# kernelspec:
# display_name: Python 3
# name: python3
# ---
# + [markdown] id="view-in-github" colab_type="text"
... |
# -*- coding: utf-8 -*-
# copyright (c) 2019, <NAME>
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
# pylint: disable=super-with-arguments
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
import os
import traceback
from ti... |
#!/usr/bin/env python
#
# RWtests.py
#
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# Tests for the read-write functions in textgrid.py (they don't make much
# sense as doctests). not particularly useful for users...
from __future__ import unicode_literals
import textgrid
import unittest
from io import... |
import os
import re
from code.utils.common import log, log2, logn, xml_encode, xml_decode
def escape_quoted_whitespace(s):
in_quote = False
new_string = ""
for i in range(0, len(s)):
if (s[i] == "'"):
in_quote = (not in_quote)
if (s[i] == " "):
if (in_quote):
... |
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*-
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning) # noqa
import logging
import AFQ.data as afd
from AFQ.api.participant import ParticipantAFQ
from AFQ.api.utils import wf_sections, add_method_descriptions
import AFQ.viz.utils as vut
from AFQ... |
'''
Functions for use
'''
import torch
from torch.autograd import Variable
import numpy as np
import itertools
import os
import random
import pickle
import torch as t
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from sklearn.model_selection import StratifiedShuffleSplit
from sklearn.model_... |
'''
this file contains most if not all of the program logic
'''
##############################################################################
# IMPORTS
from abc import abstractmethod
import numpy as np
import requests
import sqlite3
from urllib.request import urlopen
from io import StringIO, BytesIO
import csv
import... |
import openpyxl
import pprint
import random
import math
import copy
from systems import judge_manual
import try_1003
import send_recieve
# from systems import testtry
"""よくやるミス
self忘れ
=と==
関数の()
"""
"""
やること
runにまとめる
通常戦:(単発のhitblowで終わらない場合)→とき終わったら、再度答えを生成
ボス戦(単発のhitblowで終わらない場合)→どちらかが終わったら、アルゴリズム再起動
"""
"""
やりたいこと... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 18 14:03:35 2022
@author: USER
"""
#3rd party Modules
import numpy as np
#import sys
import warnings
from scipy.stats import qmc
import scipy.stats as sct
import mpi4py.MPI as MPI
class GsaOptions:
def __init__(self, run = True, run_sobol=True, run_morris=True, n_s... |
# Copyright 2019 Xilinx 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 os
import tkinter as tk
import tkinter.ttk as ttk
import traceback
from tkinter import *
from tkinter import filedialog, font
from tkinter.scrolledtext import ScrolledText
import threading
import numpy as np
import PIL
from PIL import Image, ImageTk
from deploy_model import DeployedModel
from interpretation_ut... |
import sublime
import sublime_plugin
import os
import socket
import sys
import threading
# Load modules
try:
from .xdebug import *
except:
from xdebug import *
# Set Python libraries from system installation
python_path = S.get_project_value('python_path') or S.get_package_value('python_path')
if python_path... |
# Copyright 2018 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... |
# Copyright 2019 The TensorNetwork 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 applicable law or agreed ... |
# Copyright 2015 OpenStack Foundation
# 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 requ... |
#!/usr/bin/env python
'''
The MIT License (MIT)
Copyright (c) 2016-2018 <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 the rights to use,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.