text
stringlengths
6.04k
39.5k
# Collect data into data frames based on the year of the file import glob import os import re import pandas as pd from pathlib import Path import numpy as np def postalcode_and_area(df): """ Split the column "Postal code area" into Postal code (the numerical postal code) and Area (the name of the area) ...
"""Base classes and function for REST, WMS, and WMF services.""" from collections import defaultdict, namedtuple from itertools import product from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union from warnings import warn import pyproj import shapely.ops as ops import yaml from orjson im...
from ogb.lsc import MAG240MDataset from scipy.sparse import csr import torch import quiver import os import os.path as osp from torch._C import device from torch_sparse import SparseTensor import time import numpy as np from quiver.partition import partition_with_replication, partition_without_replication, select_nodes...
#!/usr/bin/env python3 """ Title: Hoomaluo - Power Monitor Project: Power Monitoring system Author: <NAME> Version: 1.0 Date: 09-25-2018 Overview: * Communicate with a server over MQTT: - report temperature and energy * store locally if disconnected * report local data once back online - rece...
import leb128 import constants as consts from constants import Opcode as ops from collections import defaultdict import struct import array class WasmBinaryParser: def __init__(self, data): self.data = data assert isinstance(data, bytes) self.view = data[0:] @property def total_bytes(self): return len(s...
""" Measure how much the representation changes during evaluation Setting: 1: adapt_d -> On the data the adaptation model was adapted 2: eval_d -> On the data the models where evaluated 3: different batch -> On a completely different batch of data """ import os import json import numpy as np import stati...
# -*- coding: utf-8 -*- """ remarks: commonly used functions related to intervals NOTE: `interval` refers to interval of the form [a,b] `generalized_interval` refers to some (finite) union of `interval`s TODO: unify `interval` and `generalized_interval`, by letting `interval` be of the form [[a,b]] ""...
import numpy as np import pandas as pd # from operator import itemgetter pd.options.mode.chained_assignment = None # default='warn' import matplotlib.pyplot as plt import matplotlib.dates as mdates from scipy.integrate import odeint import lmfit # from lmfit.model import save_modelresult, load_modelresult import...
import time import tkinter class DataPoint: def __init__( self, width=720, height=480, autostart=False, title=None, ): self.title = title self.windowtitle = 'DataPoint' self.color_outbound = '#999' self.color_cros...
""" The ``modelchain`` module contains functions and classes that combine many of the PV power modeling steps. These tools make it easy to get started with pvlib and demonstrate standard ways to use the library. With great power comes great responsibility: users should take the time to read the source code for the modu...
from __future__ import annotations import dataclasses from dataclasses import dataclass from itertools import chain from pathlib import Path from typing import List, Tuple, Dict, Set, Optional, Union from basis.configuration.base import load_yaml from basis.configuration.graph import GraphDefinitionCfg, NodeCfg, Port...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # Written by <NAME> (<EMAIL>) from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import fun...
"""Approximating spectral functions with tensor networks. """ import numpy as np import random import quimb as qu from .tensor_core import rand_uuid, Tensor from .tensor_1d import MatrixProductState from .tensor_gen import MPO_rand, MPO_zeros_like, randn def construct_lanczos_tridiag_MPO(A, K, v0=None, initial_bon...
## COMORBITIES INFERENCE ''' (<NAME> al., 2019) Need to model CFR Pm->d(a_i,c_i) for the joint age and comorbid statuses; however existing data sources only specify Pm->d(a_i) and Pm->d(c_i). To infer the joint distribution,it is assumed a linear (logistic) interaction between: - age bracket; - diabetes stat...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bandit Algorithms This script follows Chapter 2 of Sutton and Barto (2nd) and simply reproduces figures 2.2 to 2.5. Author: <NAME> License: MIT Copyright: (c) 2020, <NAME> """ import abc import hashlib import json import math import matplotlib.pyplot as plt import...
import os import sys import numpy as np import numba import argparse # when you run a python file as a script and you do it from some other folder, relative import simply doesn't work # a simple explanations can be found here: https://stackoverflow.com/questions/30669474/beyond-top-level-package-error-in-relative-impo...
# Copyright (c) 2018, deepakn94, codyaustun, robieta. 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 requir...
import calendar import logging import os from datetime import datetime, timedelta import dateutil.parser import dateutil.tz import mechanicalsoup from bs4 import BeautifulSoup MAIN_PATH = os.path.dirname(os.path.abspath(__file__)) def to_utc_timestamp(date_time): return calendar.timegm(date_time.utctimetuple())...
#!/usr/bin/python """ Author: <NAME> (<EMAIL>) Provides classes for evaluating the predictions or rankings provided by a multi-label learner according to different measures. The evaluation results can be written to one or several outputs, e.g. to the console or to a file. """ import logging as log from abc import ABC...
# STDLIB import locale import logging import os import subprocess from typing import List, Optional, Tuple # OWN import lib_detect_encoding import lib_platform # PROJ try: # type: ignore # pragma: no cover # imports for local pytest from .conf_lib_shell import conf_l...
# Copyright (c) 2021-2022, 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/licenses/LICENSE-2.0 # # Unless required by ...
import io import logging from urllib.parse import unquote import sys import base64 import zlib import os import re import typing import yaml import click from urllib.parse import urlparse from datetime import datetime from datetime import timezone import mitmproxy from mitmproxy import connection...
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division import torch import torch.nn as nn from torch.autograd import Variable from functools import reduce import operator from layers import LearnedGroupConv, CondensingLinear,...
# from __future__ import print_function import numpy as np import pickle as pkl import csv import matplotlib.pyplot as plt import numpy as np import networkx as nx from scipy import spatial import os import math from collections import defaultdict def load_station_list(filename): node_list = [] with open(filenam...
from django.db import models from django.dispatch import receiver from django.db.models.signals import pre_delete, post_save, m2m_changed, post_delete from django.core.files import File import os import re from datetime import date, datetime, timedelta from random import choice from image_cropping import ImageRatioFi...
""" ABDG ===== Attribute-based Decision Graph .. note:: <NAME>, <NAME>, <NAME>, "An embedded imputation method via Attribute-based Decision Graphs", Expert Systems with Applications, Volume 57, 2016, Pages 159-177, doi: http://dx.doi.org/10.1016/j.eswa.2016.03.027. .. _a link: http://www.sciencedi...
# lint-amnesty, pylint: disable=missing-module-docstring import base64 from datetime import datetime, timedelta from unittest import mock from unittest.mock import patch import pytest import ddt import requests.exceptions import simplejson as json from django.conf import settings from django.utils.timezone import now...
import numpy as np import os from scipy.interpolate import griddata import sys def two_netcdf_files_surface(filepath, a_1, a_2): import netCDF4 as nc filepath = os.path.splitext(filepath[0])[0] + '_' \ + os.path.basename(os.path.splitext(filepath[1])[0]) \ + '_diff_surface.nc' ...
import numpy as np import tensorflow as tf import os from tensorflow.train import AdamOptimizer from TOOLS.Logger import Logger from .model import AbsControlModel, AbsEvaluateModel from ENVS.AbstractEnv import AbsEnv from TOOLS.noises import OrnsteinUhlenbeckActionNoise class ReplayBuffer(object): def ...
import datetime import glob import logging import os import socket from pgbackup.pg_utils import pg_dump, pg_dumpall_globals, SchemaCriteria, \ matching_schemas try: basestring = basestring except NameError: # In Python 3 basestring = str LOGGER = logging.getLogger(__package__) def hostname_label(h...
import random import math import numpy as np import numbers import collections import cv2 import torch from segmentron.utils.registry import Registry from segmentron.config import cfg import logging from segmentron.data.randaug import Rand_Augment PIPELINES_REGISTRY = Registry("PIPELINES") PIPELINES_REGISTRY.__doc__ = ...
# -*- coding: UTF-8 -*- from __future__ import print_function, division from numpy import * import matplotlib.pyplot as plt import matplotlib.cm as cm import os import glob import pdb __authors__ = '<NAME>' __license__ = 'MIT/X11 License' __contact__ = '<NAME> <<EMAIL>>' __all__ = ['lorentzian_profile', 'read_hit...
# Copyright 2022 Google LLC # 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 law or agreed to in writing, sof...
from django.shortcuts import render, redirect from django.views.decorators.cache import cache_page from django.views.generic.base import TemplateView from django.http import HttpResponse from graphos.renderers import gchart, yui, flot, morris, highcharts, c3js, matplotlib_renderer from graphos.sources.simple import Si...
import tensorflow as tf import numpy as np import time import sys import os from PIL import Image from resizeimage import resizeimage import PIL import re from tensorflow.contrib.layers import fully_connected numSymbols=500 num_steps=10 numberInputs=3 numLayers=4 lstm_size=5 imageWidth=600 imageHeight=768 nnImageWid...
import json import time from functools import lru_cache from multiprocessing import Pool, Process from threading import Thread, Timer from typing import Any, Dict, List from datetime import datetime import requests import waitress from bottle import BaseTemplate, Bottle, request, response, static_file, template impor...
# Copyright 2022 Google LLC # # 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, ...
# --- # jupyter: # accelerator: GPU # colab: # name: Replay Tutorial # provenance: [] # jupytext: # cell_metadata_filter: -all # formats: nb_python//py:percent,colabs//ipynb # notebook_metadata_filter: all # text_representation: # extension: .py # format_name: percent # f...
import shutil import subprocess import sys from datetime import date from pathlib import Path from typing import Optional from urllib.parse import urlencode import toml from cookiecutter import exceptions as cookiecutter_exceptions from requests import exceptions as requests_exceptions from briefcase.config import Ba...
#!/usr/bin/env python # coding=utf-8 # Copyright 2022 The HuggingFace 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-...
# -*- coding: utf-8 -*- from __future__ import division, print_function try: from crowdin.__init__ import __version__ except ImportError: from __init__ import __version__ import six import sys import json import os import traceback import re import logging import requests import fnmatch logger = logging.getLo...
# encoding: utf-8 """Tests for IPython.utils.path.py""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os import shutil import sys import tempfile import unittest from contextlib import contextmanager from importlib import reload from os.path import abspath...
"""This module contains functions to compute the direct (i.e., not layer mediated) particle coupling coefficients.""" import numpy as np import smuthi.fields as flds import smuthi.fields.transformations as trf import smuthi.utility.math as sf import scipy.optimize import scipy.special def direct_coupling_block(vacu...
# Copyright 2016-2020 The <NAME> at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License"); # you ...
import consoleParser import socket import select import curses import os import sys import math import time import tqdm import _thread ######### Global variables so changing numbers is easier: bufferSize = 8192 waitLtime = 1 waitStime = 0.5 typedMessage = "" ######### A class that im using as a str...
#!/usr/bin/env python3 # 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 # "L...
import numpy as np WHITE = -1 BLACK = +1 EMPTY = 0 PASS_MOVE = None class GameState(object): """State of a game of Go and some basic functions to interact with it """ def __init__(self, size=19, komi=7.5): self.board = np.zeros((size, size)) self.board.fill(EMPTY) self.size = size self.turns_played = 0 ...
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import math from abc import ABC, abstractmethod from itertools import chain from typing import Any, Iterable, Mapping, MutableMapping, Optional import pendulum import requests from airbyte_cdk.models import SyncMode from airbyte_cdk.sources.streams.http imp...
# !/usr/bin/python3 # -*-coding utf-8 -*- # @Time : 2021/06/17 11:13 # @Author : <NAME>, <NAME> # @Project : evolution_of_species # @File : plotters.py # @Software : PyCharm from copy import deepcopy from types import FunctionType import matplotlib.pyplot as plt import numpy as np from IPython.display impo...
''' # This is an 80 character line # PURE: Read in simulation, output extrinsic data for each timestep Designations Explained: gas_A : number of A-type particles in gas phase gas_B : number of B-type particles in gas phase ...
#!/usr/bin/env python # $Id$ # -*- coding: utf-8 from __future__ import print_function ''' test libcint ''' __author__ = "<NAME> <<EMAIL>>" import sys import os import ctypes import numpy _cint = numpy.ctypeslib.load_library('libcint', '.') PTR_LIGHT_SPEED = 0 PTR_COMMON_ORIG = 1 PTR_SHIELDING_ORIG = 4 PTR_...
#!/usr/bin/python # -*-coding:utf-8-*- __author__ = '<NAME>' import random import traceback from collections import defaultdict from conf import config, constants from conf.config import LAST_NAME, MIN_SINGLE_NUM, MAX_SINGLE_NUM, SELECTED_SANCAI, SELECTED_XITONGSHEN import utils import time from data import self_wuxing...
# -*- coding: utf-8 -*- # pylint: disable=I0011, C, C0302 import codecs import collections import json import os import re import shutil import urllib import zipfile from collections import OrderedDict from datetime import datetime import demjson from bs4 import BeautifulSoup import datetime_z import PixivHelper fro...
import abc import collections.abc import warnings from typing import ( AbstractSet, Any, Dict, Hashable, MutableMapping, Optional, Mapping, Iterable, Tuple, ) import copy import tlz as toolz from . import config from .utils import ensure_dict, ignoring, stringify from .base import ...
import mysql.connector import discord import clashroyale from json import load from redbot.core import commands, checks, Config from redbot.core.data_manager import bundled_data_path import aiohttp class InvalidTag(Exception): pass class TagAlreadySaved(Exception): """Note on this: This i...
#!/usr/bin/env python """A shuffle-select vector fuzz tester. This is a python program to fuzz test the LLVM shufflevector and select instructions. It generates a function with a random sequnece of shufflevectors while optionally attaching it with a select instruction (regular or zero merge), maintaining the element ...
import curses import time import sys import numpy as np from random import randint import random from enum import Enum, IntEnum from keras.layers.convolutional import Conv2D from keras.layers import Dense, Flatten from keras.optimizers import RMSprop from keras.models import Sequential from skimage.transform import re...
import torch.nn.functional as F import torch.nn as nn from mmcv.cnn import kaiming_init from mmcv.cnn import ConvModule, xavier_init from mmcv.runner import auto_fp16 from mmdet.models.builder import NECKS import torch from mmdet.models.necks.TransNeck import TransEncoder, CBAM from mmdet.models.backbones.swin_transfor...
""" One of the design principles of AllenNLP is the use of a modular, declarative language (JSON) for defining experiments and models. This is implemented by giving each AllenNLP class a method .. code-block @classmethod def from_params(cls, params: Params, **extras) -> 'ClassName': ... that contains...
import copy import waffle import olympia.core.logger from olympia import amo from olympia.amo.indexers import BaseSearchIndexer from olympia.amo.utils import attach_trans_dict from olympia.amo.celery import create_chunked_tasks_signatures from olympia.lib.es.utils import create_index from olympia.versions.compare imp...
"""MetaModel provides basic meta modeling capability.""" from six import iteritems from six.moves import range from copy import deepcopy from itertools import chain, product import numpy as np from openmdao.core.explicitcomponent import ExplicitComponent from openmdao.surrogate_models.surrogate_model import Surrogate...
import urllib import asyncio import aiohttp import json import re import dotenv import os import sqlite3 from urllib.parse import quote_plus from rich.traceback import install from rich.console import Console from rich.progress import track from rich.theme import Theme import asyncpraw import topgg import humor_langs ...
from pathlib import Path import numpy as np import logging import io from math import ceil from datetime import datetime, timedelta import xarray from typing import List, Union, Any, Dict, Tuple, Sequence, Optional from typing.io import TextIO try: from pymap3d import ecef2geodetic except ImportError: ecef2geod...
"""Components used in pandera schemas.""" import warnings from copy import copy, deepcopy from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np import pandas as pd from . import errors from . import strategies as st from .error_handlers import SchemaErrorHandler from .schemas import ( Che...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from astropy.coordinates import Angle, SkyCoord from astropy.table import Table from astropy.utils.data import get_pkg_data_filename from gammapy.cata...
""" 用于stage1、stage4和stage5的关键词生成和相关信息提取 """ import numpy as np import matplotlib.pyplot as plt import math import os import re import Date import time import json import jieba import stage import splitWeibo from scipy.optimize import curve_fit from scipy.stats import chi2_contingency from scipy.stats import kstest fro...
#!/usr/bin/env python # Script to run tests and benchmarks. import argparse import glob import os import re import subprocess import sys import matplotlib import seaborn import pandas from typing import Any, Mapping, Sequence # Experimental setup. experiments = { "matmul" : { "module" : "python.examples.matmu...
# /usr/bin/env python3.6 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
# Copyright 2017 The dm_control 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 to i...
from math import log2, exp, sqrt, log from typing import Dict, Tuple, List, Union, Callable __VERSION__: str = "1.4.0" __TEST_VERSION__: str = "-alpha.01" def __version__(): return __VERSION__ def __test_version__(): return __TEST_VERSION__ def __full_version__(): return f"{__version_...
# flake8: noqa import codecs import io import os import re import sys from weakref import WeakKeyDictionary PY2 = sys.version_info[0] == 2 CYGWIN = sys.platform.startswith("cygwin") MSYS2 = sys.platform.startswith("win") and ("GCC" in sys.version) # Determine local App Engine environment, per Google's own suggestion A...
from base64 import b64decode from io import BytesIO import os import sys import warnings warnings.simplefilter('ignore', UserWarning) from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np from torch import optim sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) import random fr...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Nifty script to convert HTML-tables to MediaWiki's own syntax. These command line parameters can be used to specify which pages to work on: &params; -always The bot won't ask for confirmation when putting a page. -skipwarning Skip proces...
"""Passive BLE monitor binary sensor platform.""" from datetime import timedelta import asyncio import logging from homeassistant.components.binary_sensor import ( BinarySensorEntity ) from homeassistant.const import ( CONF_DEVICES, CONF_NAME, CONF_MAC, CONF_UNIQUE_ID, ATTR_BATTERY_LEVEL, ...
from enum import Enum import cv2 import networkx as nx import numpy as np import json from Parser import transformParameters as tP from Sequence.sequenceType import * from Sequence.PathOptimizer import PathOptimizer, Type class PolygonType(Enum): NONE = 0 RECTANGLE = 1 CIRCLE = 2 POLYGON = 3 class ...
# 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...
#!/usr/bin/env python # # statefbk_test.py - test state feedback functions # RMM, 30 Mar 2011 (based on TestStatefbk from v0.4a) from __future__ import print_function import unittest import numpy as np from control.statefbk import ctrb, obsv, place, place_varga, lqr, lqe, gram, acker from control.matlab import * from ...
import sys import os import daggit import requests import io import time import re import glob import logging import pyvips import cv2 import img2pdf import configparser import Levenshtein import pandas as pd import json from scipy.spatial import distance_matrix import ruptures as rp import pandas as pd import numpy as...
import math import random import struct import time from threading import Timer from typing import List, Set, Tuple from sample.src.udp_socket import UDPsocket header_length: int = 20 data_length: int = 520 # header_format = "!B3IH" header_format: str = "!5L" data_format: str = "UTF-8" SYN_bit: int = (1 << 0) FIN_bit...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
import readcfg as r_d from mpdaInstance import MPDAInstance import os, sys from popDecode.mpdaRobot import RobotState,Robot from popDecode.mpdaTask import Task from popDecode.mpdaDecoderActSeq import ActionSeq,ActionTuple,EventType,MPDADecoderActionSeq import numpy as np from enum import Enum from collections import ...
import json import logging import uuid from datetime import timedelta from typing import Any, Union import pytest import prefect from prefect.core import Edge, Flow, Parameter, Task from prefect.engine.cache_validators import all_inputs, duration_only, never_use from prefect.engine.result_handlers import JSONResultHa...
# -*- coding: utf-8 -*- """A Python implemntation of a kd-tree This package provides a simple implementation of a kd-tree in Python. https://en.wikipedia.org/wiki/K-d_tree """ from __future__ import print_function import heapq import itertools import operator import math from collections import deque from functools...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. 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 copy import gyp.input import optparse import os.path import re import shlex import sys import ...
__author__ = 'Jorge' from enum import Enum import pygame import pygame.locals as c from spacegame.core import resource from spacegame.geometry import Vec __all__ = [ "BitmapFont", "blend_color", "Anchor", "UIElement", "Button", "Switcher", "List" ] # BmpFont constants BMP = 0 # the r...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
#!/usr/bin/env python import numpy as np from scipy import stats try: import pickle as pickle except: import cPickle as pickle import gzip import gibbs import argparse import sys, util import pandas as pd def SDPRX_gibbs(beta_margin1, beta_margin2, N1, N2, rho, idx1_shared, idx2_shared, ld_boundaries1, ld_bou...
import pytest import copy import sys import numpy as np from astropy.coordinates import SkyCoord, ICRS, Angle from astropy.io.votable import parse_single_table import astropy.units as u from astropy.io import fits import cdshealpix from ..interval_set import IntervalSet from ..moc import MOC, World2ScreenMPL def...
# Copyright 2021 The Magenta 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 to in ...
""" Learning Steady-States of Iterative Algorithms over Graphs Paper: http://proceedings.mlr.press/v80/dai18a.html """ import argparse import random import numpy as np import time import math import mxnet as mx from mxnet import gluon import dgl import dgl.function as fn from dgl import DGLGraph from dgl.data import r...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Korean Sentence Splitter # Split Korean text into sentences using heuristic algorithm. # # Copyright (C) 2021 <NAME> <<EMAIL>> and <NAME> <<EMAIL>> # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LIC...
from __future__ import annotations import sys from abc import abstractmethod from pathlib import Path from typing import Any import toml NoneType = type(None) class ParameterValidator: """Base class representing a parameter validator.""" expected_params = { # key: (key_type, value_type, default) ...
#!/usr/bin/env python """Python wrapper for C version of apriltags. This program creates two classes that are used to detect apriltags and extract information from them. Using this module, you can identify all apriltags visible in an image, and get information about the location and orientation of the tags. Original ...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # cds-migrator-kit is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """CDS-ILS ldap API.""" import json import sys import time import uuid imp...
# 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 u...
# 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...
"""Structure learning. Given a set of data samples, estimate a DAG that captures the dependencies between the variables.""" # ------------------------------------ # Name : structure_learning.py # Author : E.Taskesen # Contact : <EMAIL> # Licence : See licences # ------------------------------------ ...
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ---------------------------------------------------------------------...
from django.db import models from django.contrib import admin from workflow.models import Program, Sector, SiteProfile, ProjectAgreement, ProjectComplete, Country, Office, Documentation, TolaUser from datetime import datetime, timedelta from django.utils import timezone import uuid from simple_history.models import His...
"""A module of functional tests for base site functionality.""" import os import string import random import time import pytest from conftest import LOCALHOST from django.core.management import call_command from django.apps import apps # from ḍjango.utils.text import slugify from django.conf import settings # from hom...