text stringlengths 8.04k 46.5k |
|---|
# Hidden Markov Models
#
# Author: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# API changes: <NAME> <<EMAIL>>
# Modifications to create of the HMMLearn module: <NAME>
# More API changes: <NAME> <<EMAIL>>
"""
The :mod:`hmmlearn.hmm` module implements hidden Markov models.
"""
import numpy as np
from sklearn import cl... |
import os
import logging
import requests
import json
from programy.utils.license.keys import LicenseKeys
class NewsApiApi(object):
def get_news(self, url):
return requests.get(url)
class NewsArticle(object):
def __init__(self):
self.title = None
self.description = None
self... |
# This file implements the main functions for running the music modeling task, this includes: model creation; model
# training, model testing and the main function that controls all the flow
import time
from datetime import datetime
import numpy as np
import tensorflow as tf
from hyperopt import hp, tpe, Trials, fmin... |
import os
import pickle
import time
import timeit
from pathlib import Path
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from matplotlib.patches import Rectangle
from multivar_horner.multivar_horner import HornerMultivarPolynomial, MultivarPolynomial
from scipy.special i... |
# 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
from __future__ import division
from __future__ import absolute_import
import collections
import itertools
import logg... |
#!/usr/bin/env python
# coding: utf-8
# Neural Dynamic Occupancy Models for Breeding Bird Survey Data
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from tqdm import tqdm
import itertools
import re
import multiprocessing
import torch
torch.set_default_dtype(torch.float64)
import torch.nn as n... |
from functools import wraps
from itertools import chain
from django.db.models import Prefetch, Q
from django.urls import Resolver404, resolve
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from rest_framework.authentication import SessionAuthentication
from ... |
import numpy as np
import matplotlib.pyplot as plt
import random
try:
import cv2
cv2_available = True
except:
cv2_available = False
try:
from CGAL.CGAL_Kernel import Point_2
from CGAL.CGAL_Triangulation_2 import Delaunay_triangulation_2
cgal_available = False
except:
cgal_av... |
import traceback
import os
import pathlib
from abc import abstractmethod
import bpy
from bpy_extras.io_utils import ImportHelper, ExportHelper
from .sollumz_helper import *
from .sollumz_properties import SollumType, SOLLUMZ_UI_NAMES, BOUND_TYPES, SollumzExportSettings, SollumzImportSettings, TimeFlags
from .resources.... |
from django import forms
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect, Http404
from manager.models import *
from catalog.models import *
from account.models import *
from base_app.user_util import get_users_only
from catalog.accounting import record_sale
from . import temp... |
"""
MIT License
Copyright (c) 2022 Grapphy
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, merge, publish, dist... |
# -*- coding: utf-8 -*-
#
# This file random_graphs.py is referred and derived from project NetworkX,
#
# https://github.com/networkx/networkx/blob/master/networkx/generators/random_graphs.py
#
# which has the following license:
#
# Copyright (C) 2004-2020, NetworkX Developers
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <... |
# -*- coding: utf-8 -*-
"""
babel.numbers
~~~~~~~~~~~~~
Locale dependent formatting and parsing of numeric data.
The default locale for the functions in this module is determined by the
following environment variables, in that order:
* ``LC_NUMERIC``,
* ``LC_ALL``, and
* ``LANG``
... |
"""
This file includes a variety of methods needed to train new
constituency parsers. It also includes a method to load an
already-trained parser.
See the `train` method for the code block which starts from
raw treebank and returns a new parser.
`evaluate` reads a treebank and gives a score for those trees.
`parse_... |
#!/usr/bin/env python
# coding: utf-8
# This code conducts raster generation for DEA Coastlines:
# * Load stack of all available Landsat 5, 7 and 8 satellite imagery
# for a location using ODC Virtual Products
# * Convert each satellite image into a remote sensing water index
# (MNDWI)
# * For... |
from . import constants, entropy
from ..data import utils as data_utils
import numpy as np
from scipy import stats
from sklearn.cluster import MeanShift, estimate_bandwidth
from operator import itemgetter
from collections import Counter, defaultdict
"""
Record and analyse windowed and non-windowed packet flow statist... |
import types
import logging
from peachyprinter.infrastructure.zaxis import SerialDripZAxis
from peachyprinter.infrastructure.communicator import UsbPacketCommunicator
from peachyprinter.infrastructure.layer_generators import CureTestGenerator
from peachyprinter.infrastructure.commander import SerialCommander
logger = ... |
from datetime import datetime
import time
import requests
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from mikeio import Dfs0, eum
class APIAuthenticationFailed(Exception):
pass
class InvalidSatelliteName(Exception):
pass
class AltimetryData:
"""Class returned by DHIAltimetr... |
class Pos: #the rest of the stuff is built on this code
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return '('+str(self.x)+', '+str(self.y)+')'
def __repr__(self):
return self.__str__()
def __eq__(self, othe... |
import warnings
import abc
from copy import deepcopy
import numpy as np
from typing import List, Union, Optional, Tuple
import shapely.geometry
import shapely.affinity
from commonroad.geometry.transform import translate_rotate, rotate_translate
from commonroad.common.validity import is_valid_polyline, is_real_number... |
import json
import logging
import os
from subprocess import SubprocessError, CalledProcessError
from celery.signals import task_failure, task_success, task_prerun, task_postrun, task_revoked
from django.core.exceptions import ObjectDoesNotExist
from django.db.models.signals import post_save, pre_save
from django.dispa... |
# compute_bk_boss_randoms.py (<NAME>, 2021)
### Compute the component g^a maps for the binned bispectrum of uniformly distributed random particles.
### These are then used to compute phi_alpha and C^-1 phi_alpha maps and added to Monte Carlo averages.
### Note that we assume a BOSS geometry always here, such that this ... |
#
# main.py -- reference viewer for the Ginga toolkit.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
"""This module handles the main reference viewer."""
# stdlib imports
import glob
import sys
import os
import logging
import logging.handlers
import thr... |
# coding: utf-8
import json
import os
import re
import tempfile
from re import sub
import requests
import babel.numbers
import dateutil.parser
import shortuuid
import csv
from enum import Enum
from sqlalchemy.sql import text
from psycopg2 import sql
from kids.cache import cache
import package
from app import db, log... |
'''
Defines behavior of the accessible tree view widget.
@author: <NAME>
@author: <NAME>
@organization: IBM Corporation
@copyright: Copyright (c) 2006, 2007 IBM Corporation
@license: BSD
All rights reserved. This program and the accompanying materials are made
available under the terms of the BSD which accompanies t... |
#!/usr/bin/env python3
# @Author: LiuXing <EMAIL>
# @Date: 2020-12-03 11:00:53
# @Last Modified by: LiuXing
# @Last Modified time: 2020-12-03 14:27:11
import os, sys
import pandas as pd
import numpy as np
from pandas.core.reshape.merge import merge
import scipy
from scipy import ndimage
import matplotlib as mpl
i... |
from django.db import models
from django.core.exceptions import ValidationError, ObjectDoesNotExist
from django.conf import settings
from django.utils.text import slugify
from datetime import date
import os, os.path
import json
from .settings import GENDER_VALUES, STATUS_VALUES, ID_PROOF_VALUES,\
... |
"""Handle the public catalog of SXS data
"""
# NOTE: This string is placed into the top of the catalog JSON file as a JSON string. JSON strings
# are enclosed in double quotes, so it would quickly get ugly if we used double quotes within this
# description, even though python makes that easy.
catalog_file_descripti... |
import csv
import itertools
import json
import re
from collections import defaultdict
from dataclasses import dataclass
from typing import List, Optional, Dict
import pandas as pd
import pronto
from django.core.management import BaseCommand
from model_utils.models import now
from pandas import DataFrame, isna
from an... |
""" .. _splatalogue:
**Splatalogue** --- Module for performing splatalogue queries.
--------------------------------------------------------------
Module to search Splatalogue.net via splat, modeled loosely on
ftp://ftp.cv.nrao.edu/NRAO-staff/bkent/slap/idl/
:author: <NAME> <<EMAIL>>
:updated ... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 22 15:00:35 2015
@author: smichel
"""
import json
import csv
from bs4 import BeautifulSoup as Soup
import os
import calendar
import urllib.parse
from unidecode import unidecode
import re
src_doctype = "Strategy" #use lower case: act, cfr, pl, stat, usc
def export_csv(c... |
# Copyright 2017 Mycroft 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 writin... |
# Copyright (C) 2017-2019 <NAME>, Webis Group
#
# 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 agree... |
# -*- coding: utf-8 -*-
# Copyright 2019 the HERA Project
# Licensed under the MIT License
import numpy as np
try:
from uvtools import dspec
HAVE_UVTOOLS = True
except ImportError:
HAVE_UVTOOLS = False
from . import utils
from .datacontainer import DataContainer
from .vis_clean import VisClean
from pyuvd... |
import numpy as np
import pandas as pd
import json
import sys
def read_json_data(filepath):
'''
Loads JSON file and generates a dictionary from it.
Parameters
----------
filepath : str
Path of desired file.
Raises
------
JSONDecodeError
The file exists and is readable... |
""" Base adaptive learning class. """
import abc
from collections import deque
from typing import Callable, Deque, Dict, List, Optional, Set, Tuple, Union
from river.base import Classifier, DriftDetector
from river.base.typing import ClfTarget
from river.utils import pure_inference_mode
from streamselect.adaptive_lea... |
"""
This is a translation of Carl-Johans implementation in Matlab to Python
"""
import os.path
import numpy as np
from numpy import tanh, exp, sqrt, pi, sin, cos, arccos, min, max
import pandas as pd
import scipy.interpolate
from copy import copy
import matplotlib.pyplot as plt
dir_path = os.path.dirname(__file__)
bas... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
try:
import mkl as _mkl
_vml_threads = _mkl.domain_get_max_threads('vml')
except ImportError:
_mkl = None
from .accum import *
from .filters import *
from .funchelper import *
from .poissondisk import *
from .random import *
from . import h5util
import numba as _numba
import numpy as _np
import scipy.ndim... |
"""Integration with Rope library."""
from __future__ import absolute_import, print_function
import os.path
import re
import site
import sys
from rope.base import project, libutils, exceptions, change, worder, pycore
from rope.base.fscommands import FileSystemCommands # noqa
from rope.base.taskhandle import TaskHandl... |
import gzip
import json
import os
import time
import utils
import numpy as np
import tensorflow as tf
import argparse
import worker
from RsNet.setup_mnist import MNIST, MNISTModel, FASHIONModel, CIFAR10Model, SQModels
from RsNet.l0_attack_multi import CarliniL0
from RsNet.l2_attack_multi import CarliniL2
from RsNet.li... |
# adapted from https://machinelearningmastery.com/curve-fitting-with-python/
import copy
import json
import os
import shutil
import warnings
import numpy as np
from scipy.optimize import curve_fit
import skimage.io as io
import matplotlib.pyplot as plt
import natsort as ns
import pandas as pd
from seaborn import algo... |
# Date 2022/02/26
# Ultra Crappy DP83x GUI based on <NAME>'s and kudl4t4's github repository by <NAME>
# <NAME>'s - https://github.com/colinoflynn/dp83X-gui https://www.youtube.com/watch?v=Mwu7hfbYQjk
# kudl4t4 - https://github.com/kudl4t4/RIGOL-DP83X-GUI
#
# Python 3.10.0
# pip install pyside6
# pip install PyQt5
#... |
######################################################################
# Author: Fall 2019 Class
#
# Assignment: T01: Choose Your Own Adventure
#
# Purpose: To create a choose-your-own-adventure style game.
# Each "twist" in the story is from a different group. The resulting story
# will either be incoherently random, ... |
"""Contains a list of custom velocity controllers."""
# TODO(@evinitsky) move to util
# from flow.utils.rllib import create_agent_from_path
from flow.core.params import SumoCarFollowingParams
from flow.controllers.base_controller import BaseController
from bayesian_inference.inference import get_filtered_posteriors
im... |
"""
Implementation of flexx.event in JS via PScript.
In this module we compile the flexx event system to JavaScript. Most
code is generated by transpiling methods from the Python classes. This
module implements a JS variant of some classes to overload certain
behavior in JS. E.g. the JS implementation of the Component... |
try:
# Python 3.3+
from unittest.mock import patch, MagicMock
except ImportError:
# Python 2.7
from mock import patch, MagicMock
from datetime import date
import os
from unittest import TestCase
from groclient import GroClient
from groclient.utils import zip_selections
from groclient.mock_data import m... |
"""
The wntr.network.options module includes simulation options.
.. rubric:: Contents
.. autosummary::
WaterNetworkOptions
TimeOptions
GraphicsOptions
HydraulicOptions
ResultsOptions
QualityOptions
EnergyOptions
SolverOptions
UserOptions
"""
import logging
logger = logging.getLo... |
#!/usr/bin/env python3
###
# KINOVA (R) KORTEX (TM)
#
# Copyright (c) 2019 Kinova inc. All rights reserved.
#
# This software may be modified and distributed
# under the terms of the BSD 3-Clause license.
#
# Refer to the LICENSE file for details.
#
###
import sys
from google.protobuf.compiler import plugin_pb2 as p... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api, _
from odoo.addons import decimal_precision as dp
from odoo.exceptions import UserError, ValidationError
class AccountVoucher(models.Model):
_name = 'account.voucher'
_des... |
"""Defines the Python API for interacting with the StreamDeck Configuration UI"""
import json
import os
import threading
import time
import tkinter
from functools import partial
from tkinter import filedialog
from tkinter import messagebox as mb
from typing import Dict, Tuple, Union, cast
from warnings import warn
fro... |
import numpy as np
import cv2
from skimage import io
import heapq
import os
from matplotlib import pyplot as plt
import matplotlib.ticker as ticker
import scipy.stats
def extract_contours(image_curr,top_contour,bottom_contour,blur_val):
"""
This function thresholds the template image and detects all the contours on... |
# -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
# (C) 2015-2019 MinIO, 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.or... |
from .tables1D import *
from .tt_stations_1D import *
from .func1D import *
import numpy as np
from sqlalchemy.orm import * # session
from sqlalchemy import create_engine
from scipy.optimize import fmin
from obspy.geodetics import gps2dist_azimuth
from datetime import *
from operator import itemgetter
from itertools ... |
# Copyright 2019 Kaloom, Inc. All rights reserved.
# Copyright 2014 Arista Networks, 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.... |
"""
Takes a JSON file and output annotation for only one video.
srun --pty --mem 10000 python tools/face/mod_json.py
=======
1) Takes a JSON file and output annotation for only one video.
2) Make compatible with distillation loss
3) Add dataset name into annotations
4) Add artificial noise to the labels
5) Remove all ... |
# encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: <NAME> (<EMAIL>)
#
from __future__ import absolute_import, division, unicode_literals
... |
from typing import Tuple, List, Set, FrozenSet, Dict, Iterable, Optional, Union
from itertools import chain
from random import Random
from pysmt.environment import Environment as PysmtEnv
from pysmt.fnode import FNode
from pysmt.exceptions import SolverReturnedUnknownResultError
from canonize import Canonizer
from ex... |
import glob
import pandas as pd
import numpy as np
import config
from lcoc import afdc
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
##### Functions #####
###################
### Residential ###
###################
def res_rates_to_utils(scenario = 'baseline',
... |
import tensorflow as tf
import numpy as np
from datetime import datetime
import time
import visualizer
import gc
import os
from model import Classifier, LGVae, LGGMVae, GMVae
from classifier import main as train_classifier
def kl_divergence(z_mean, z_sig):
z_log_var = tf.math.log(tf.square(z_sig))
kl_loss = tf... |
import numpy as np
from matplotlib import pyplot as plt
import os
from matplotlib.lines import Line2D
from exp_variant_class import exp_variant
from sklearn.decomposition import TruncatedSVD
import argparse
file_path=os.path.abspath(os.getcwd())
path_list=file_path.split('/')
while path_list[-1] !="synergyDRL":
pa... |
#!/usr/bin/env python3.4
import os
import sys
import shutil # file system utilities
import re # regular expressions
from argparse import ArgumentParser
import subprocess # for system commands - in this case, only diff
import errno
from stat import S_IRUSR, S_IXUSR, S_IRGRP, S_IXGRP
from datetime import datetime
imp... |
# coding: utf-8
# In[202]:
import numpy as np
import pandas as pd
import urllib
import datetime
import cmocean
import folium
from selenium import webdriver
import os, time
def cmocean_to_leaflet(cmap, pl_entries):
h = 1.0/(pl_entries-1)
pl_colorscale = []
for k in range(pl_entries):
C = ... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2018 Lenovo
#
# 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 ... |
from __future__ import unicode_literals
import io
import logging
import re
from django.utils import six
from django.utils.encoding import force_bytes
from django.utils.translation import ugettext as _
from djblets.util.properties import AliasProperty, TypedProperty
from reviewboard.deprecation import RemovedInReview... |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
# Python infrastrukturelementer
import subprocess
import sys
from typing import Dict, List, Set, Tuple, IO
from enum import IntEnum
# Kommandolinje- og databasehåndtering
import click
import fire.cli
from fire.cli import firedb
from fire.api.model import (
# Typingelementer fra databaseAPIet:
Koordinat,
Pu... |
#!/usr/bin/env python3
import argparse
import json
import numpy
import os
import random
import re
import subprocess
import sys
import time
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from config import golos_curation_func_str
from utils import fixp_max
from utils import _100percent
class Struct(ob... |
# coding: utf-8
import re
import logging
from collections import OrderedDict
from copy import copy
logger = logging.getLogger(__name__)
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
from lxml import etree
def uniq_seq_merge(seq1, seq2):
new_seq = copy(s... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of the PsychoPy library
# Copyright (C) 2002-2018 <NAME> (C) 2019-2021 Open Science Tools Ltd.
# Distributed under the terms of the GNU General Public License (GPL).
import sys
import time
import os
import traceback
from .functions import (setLocalPath, showCommitD... |
from collections import defaultdict
import logging
import dash_html_components as html
from dash.dependencies import Input, Output, State
from ..dash_id import init_ids
from ..utility.plot_builder import *
from ..utility.table_builder import table_tabs_call_ready, cutoff_table_data_merged
from ..utility import df_ma... |
import os
import atexit
import pytest
import sys
import ctypes
import warnings
import numpy as np
from rbc.remotejit import RemoteJIT, Signature, Caller
from rbc.typesystem import Type
from rbc.external import external
from rbc.externals.macros import sizeof, cast
win32 = sys.platform == 'win32'
@pytest.fixture(scop... |
import json
import socket
import os
from twisted.trial import unittest
from twisted.internet import defer, endpoints, reactor
from twisted.web import server, static
from duct.sources.linux import basic, process, sensors
from duct.sources import riak, nginx, network, apache, munin, haproxy
from duct.sources.database i... |
import warnings
from datetime import datetime
import numpy as np
import matplotlib.dates as mpld
import matplotlib
if matplotlib.get_backend() == 'MacOSX':
# With MacOSX backend, draw() does not update the ticks
# See warning at
# https://matplotlib.org/3.3.0/tutorials/advanced/blitting.html#sphx-glr-tuto... |
# Author: <NAME>
# Date: 11/08/2018
# Git-Hub: Data-is-Life
import numpy as np
from ast import literal_eval
from pandas import DataFrame, to_datetime, to_timedelta, to_numeric
'''All functions used to clean up game log from Chess.com'''
def custom_round(x, base=20):
'''Helps to round digits'''
return int(ba... |
# Copyright (c) 2013-2016, <NAME>
# 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 copyright
# notice, this list of conditions and the ... |
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
from asyncio import wait, FIRST_COMPLETED
from datetime import datetime
from discord import Embed
from discord.ext.commands import Cog, group, command
from os import environ
from cogs.errors import get_error_message
from cogs.globals import FIRST_PAGE, LAST_PAGE, PREVIOUS_PAGE, NEXT_PAGE, LEAVE, SCROLL_REACTIONS
from... |
# -*- coding:utf-8 -*-
# This file is part of gcovr <http://gcovr.com/>.
#
# Copyright 2013-2018 the gcovr authors
# Copyright 2013 Sandia Corporation
# This software is distributed under the BSD license.
import os
import re
import shlex
import subprocess
import sys
import io
from .utils import search_file, Logger, ... |
from dataclasses import dataclass
from transformers.models.t5.modeling_t5 import (
T5Stack, T5Block, T5LayerNorm, T5LayerSelfAttention, T5LayerFF, T5LayerCrossAttention,
T5PreTrainedModel, T5ForConditionalGeneration
)
import torch
import torch.nn as nn
from torch.nn import CrossEntropyLoss
from typing import... |
import discord
import json
import requests
import logging
from lxml import html
from random import randint
from difflib import get_close_matches
client = discord.Client()
# logger = logging.getLogger('discord')
# logger.setLevel(logging.DEBUG)
# handler = logging.FileHandler(filename='discord.log', encoding='utf-8', ... |
"""
icehistory.py
Objects and methods for reading, manipulating, and using maps of ice
heights over time.
Author: <NAME>
"""
import numpy as np
import os
from giapy import pickle
from giapy.map_tools import loadXYZGridData
class IceHistory(object):
"""An object for loading and using large ice mod... |
# -*- coding: utf-8 -*-
import json
from calendar import timegm
from datetime import date, datetime
from decimal import Decimal
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
import six
from django.core import mail
from django.core.exceptions import ImproperlyConfigured
from django.test i... |
# -*- coding: utf-8 -*-
from __future__ import print_function, division, unicode_literals
import operator
import pytest
from bs4 import BeautifulSoup
from six import PY3, text_type
from soupy import (Soupy, Node, NullValueError, NullNode,
Collection, NullCollection, Null, Q, Some,
... |
from . import Trail, UI, Propagation, Probability, Utils
from tkinter import Label, StringVar
from .Utils import COLORS
# external modules
import math
import itertools
STATE_ROW = 4
STATE_COL = 4
STATE_SIZE = STATE_ROW * STATE_COL
STATE_BIT_SIZE = 64
SBOX = [12, 10, 13, 3, 14, 11, 15, 7, 8, 9, 1, 5, 0, 2, 4, 6]
P = ... |
from django.shortcuts import render
import json
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import user_passes_test,login_required
from django.http import JsonResponse,HttpResponse, HttpResponseRedirect
from disdata.models import Pincode, Report, Disease,Hospital,Notice,Dist... |
import atexit
import collections
import os
import re
import sys
import threading
import time
from ctypes import *
from . import log
import numpy
from gi.repository import GObject
# _setup module logger with a default do-nothing handler
logger = log.get_module_logger(__name__)
# Define EPICS constants
(DISABLE_PREEMPT... |
import ast
import random
from ast import *
from ast import Compare, Global, ClassDef
from ast import Subscript, Slice, Attribute, GeneratorExp, comprehension
from base64 import b64encode
from utils import random_string
def import_node(name, newname):
"""Import module obfuscation"""
# import sys -> sys = __im... |
import logging
import warnings
from datetime import datetime
from pathlib import Path
from uuid import uuid4
from sqlalchemy import (BigInteger, Boolean, Column, DateTime, ForeignKey,
Index, String, Table, Text, create_engine, func,
inspect)
from sqlalchemy.dialects.post... |
# Copyright (c) 2021 Zenqi
# 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, merge, publish, distribute, su... |
import discord
import discord
import asyncio
import typing
import datetime
import re
import coc
import logging
from discord.ext import commands
from cogs.utils.checks import requires_config, manage_guild
from cogs.utils.formatters import CLYTable
from cogs.utils.converters import PlayerConverter, ClanConverter, DateCo... |
import nipype.interfaces.utility as util # utility
import nipype.pipeline.engine as pe # pypeline engine
import nipype.interfaces.fsl as fsl
import nipype.interfaces.freesurfer as fs
fsl.FSLCommand.set_default_output_type('NIFTI_GZ')
from coma.workflows.dti.basic import damaged_brain_dti_processing
from ... |
from collections import OrderedDict
import logging
import datetime
import six
from gluon import current, URL, redirect
rslogger = logging.getLogger(current.settings.logger)
rslogger.setLevel(current.settings.log_level)
UNGRADED_EVENTS = [
"activecode",
"codelens",
"showeval",
"shortanswer",
"parso... |
from abc import (
ABC,
abstractmethod,
)
from collections import defaultdict
from itertools import chain
from typing import (
Any,
Iterable,
List,
Mapping,
MutableMapping,
Optional,
Set,
Type,
TypeVar,
Union,
)
from uuid import UUID
import warnings
from dataclasses impor... |
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
from math import ceil
import os
from tqdm import tqdm
from core.str2bool import str2bool
from scripts.data import constants as K
from scripts.data.data_utils import (search_previous_matches,
search_future_features,
... |
"""
The OptimizationManager submodule contains all the required function for
optimizing via dolfin-adjoint. To use dolfin-adjoin set::
general:
dolfin_adjoint: True
in the param.yaml file.
Todo:
* Read through an update the docstrings for these functions.
* Create specific optimization classes.
... |
import textwrap
import re
import tempfile
import os
import subprocess
import datetime
import time
import ntpath
import pathlib
from string import Template
from uuid import uuid1
from sys import platform
import rpyc
from rpyc.core.async_ import AsyncResultTimeout
from rpyc.utils.classic import upload_file, download_fil... |
import re
from discord.ext import commands
import discord
import youtube_dl
import asyncio
from async_timeout import timeout
import random
import traceback2
from .data.command_data import CmdData
from .utils.messenger import error_embed, success_embed, warning_embed, normal_embed
cmd_data = CmdData()
ytdl_options = {... |
from collections import defaultdict
import datetime
from unittest import mock
import pytest
import wx
from qcpump.contrib.pumps.dqa3 import dqa3pump
dt1 = datetime.datetime(2021, 3, 31, 1, 23)
dt2 = datetime.datetime(2021, 3, 31, 1, 24)
class TestDQA3:
def setup_class(self):
self.app = wx.App()
d... |
# coding=utf-8
# Copyright 2022 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.