text
stringlengths
6.04k
39.5k
# -*- coding: utf-8 -*- from typing import List, Optional, Tuple import collections import logging import math import numba import vpython import numpy as np from orbitx import common from orbitx.data_structures import Entity, Navmode, PhysicsState log = logging.getLogger() Point = collections.namedtuple('Point', [...
import os from datetime import date, timedelta import time # For use with Selenium. @todo: Replace with explicit waits from io import StringIO from django.conf import settings from django.http import HttpResponse from django.shortcuts import render import pandas as pd from selenium import webdriver from selenium.web...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Cooling fan manager and MQTT client. Script provides following functionalities: - Script manages a fan attached to a GPIO pin for cooling the system on the basis of the system temperature provided by the SoC. - Script acts as a MQTT client utilizing local MQTT broker...
# 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 ccxt,schedule,warnings,time,ast,config warnings.filterwarnings('ignore') from dateutil.tz import tzlocal from datetime import datetime from random import randint from random import seed import pandas as pd import numpy as np from rich import print, pretty pretty.install() # login ccxt.binanceus({ 'options':{ 'a...
# -*- coding: utf-8 -*- # Copyright (c) 2018, ESO Electronic Service Ottenbreit GmbH # For license information, please see license.txt import requests import frappe import json from frappe import _ from newmatik.newmatik.doctype.parcel_service_type.parcel_service_type import match_parcel_service_type_alias from ship...
#coding:utf-8 from __future__ import division import torch import torch.optim as optim from adjacency import sparse_mx_to_torch_sparse_tensor from net.gat import GCN_V #from net.gcn_v import GCN_V #from net.softmaxloss import GCN_V import yaml from easydict import EasyDict from tensorboardX import SummaryWriter import ...
""" Event detection routines related to whole-cell action potentials. The sequence is generally: 1. detect() - analyzeAP is called automatically 2. check_sweep() - optionally Assigns the following to the ABF class: abf.APs[sweep]=[{},{},{},{}] # each sweep has a list of dicts (1 per AP) abf.SAP[sweep]...
# Leo colorizer control file for ssharp mode. # This file is in the public domain. # Properties for ssharp mode. properties = { "commentEnd": "\"", "commentStart": "\"", "indentCloseBrackets": "]", "indentOpenBrackets": "[", "lineComment": "#", "lineUpClosingBracket": "true", } # ...
import argparse from collections import Counter import json import numpy as np import os import random import sys import torch from torch import nn from typing import List, NamedTuple from dpu_utils.mlutils import Vocabulary from constants import * from data_utils import read_full_examples_from_file, read_examples_fr...
import sys import os import torch import importlib import numpy as np import cv2 from collections import OrderedDict from ruamel import yaml import SimpleITK as sitk import time COCO_CLASSES = ( "person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", ...
"""The Lua lexer.""" import re from .. import util __all__ = [ 'LexerError', 'Token', 'TokSpace', 'TokNewline', 'TokComment', 'TokString', 'TokNumber', 'TokName', 'TokLabel', 'TokKeyword', 'TokSymbol', 'Lexer', 'LUA_KEYWORDS' ] LUA_KEYWORDS = { b'and', b'brea...
#!/usr/bin/env python # coding: utf-8 # Edited May, 27th 2020 ## This is vHULK: viral Host Unveiling Kit # Developed by <NAME> and <NAME> # Creative commons # Import required Python modules import numpy as np import pandas as pd from Bio import SeqIO import re import sys import os os.environ["TF_CPP_MIN_LOG_LEVEL"] =...
import flask import werkzeug.exceptions from ..authenticated_blueprint_preparator import AuthenticatedBlueprintPreparator from .decorators import rest_endpoint from .user_action import add_user_action from ..document_fragment import inner_text, extract_fragment name = 'annotation' app = AuthenticatedBlueprintPreparat...
import pygame import os from sys import platform import matplotlib.pyplot as plt import time from networks import * import threading # # PRE-INITIALIZATION: # Pygame initialization pygame.mixer.pre_init(44100, -16, 1, 512) pygame.mixer.init() pygame.init() # If the platform is windows, ensure that the system is not ...
#!/usr/bin/python # -*- coding: UTF-8 -*- # ------------------------------------------------------------ import ctypes, os, sys, io # os.path.islink 在 windows 下有问题 def is_symlink(path): FILE_ATTRIBUTE_REPARSE_POINT = 0x0400 return os.path.isdir(path) and (ctypes.windll.kernel32.GetFileAttributesW(str(path)) & ...
# -*- coding: utf-8 -*- """ Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from copy import deepcopy from flexmock import flexmock from textwrap import dedent import six import time import json...
""" Module for computing action representations. Actions are associated in several categories. We distinguish the following. Stop / Continue: global decision associated with the molecule. Delete: action associated with a leaf (i.e. a set of atoms) of the molecule. Insert Atom Fusion: action associated with an atom of...
from urllib.parse import urlsplit import urllib import time import json import re from typing import Union import pandas as pd import rdflib from heritageconnector.utils.sparql import get_sparql_results from heritageconnector.utils.generic import extract_json_values, get_redirected_url from heritageconnector.config imp...
#coding:utf-8 # Figure 1: Show Spectrogram and Select Area for 2D FFT by mouse # Figure 2: Show selected Area and Show its 2D FFT. Select Area to inverse 2D FFT by mouse # Figure 3: Show selected Area, Show 2D inverse FFT of selected area in 2D FFT, Show same 2D FFT of Figure 2 # # BPF bank analysis Spe...
import logging from typing import TYPE_CHECKING, Any, Callable, Dict, Literal, Tuple, TypeVar, Union, overload from eth_utils import to_checksum_address from rotkehlchen.accounting.structures.base import HistoryEventType from rotkehlchen.assets.asset import Asset, EthereumToken from rotkehlchen.assets.utils import ge...
#!/usr/bin/env python # # Copyright (c) 2018-2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # """ Rosbridge class: Class that handle communication between CARLA and ROS """ try: import queue except ImportError: impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- #from googletrans import Translator from google_trans_new import google_translator, constant from gtts import gTTS from playsound import playsound import os from datetime import datetime import threading import queue import time import shutil import re import requests im...
#!/usr/bin/env python """JIP module that handles job profiles. A job profile contains all compute-cluster and execution related meta-data of a job, such as the number of threads reserved for the job or the time limit. Profiles can be named and stored in the user configuration. In addition, hierarchical updates of pro...
from pdfminer.utils import PDFDocEncoding from pdfminer.psparser import PSLiteral from pdfminer.pdftypes import PDFObjRef from decimal import Decimal, ROUND_HALF_UP import numbers from operator import itemgetter import itertools from functools import lru_cache as cache DEFAULT_X_TOLERANCE = 3 DEFAULT_Y_TOLERANCE = 3 ...
import os, re, sys, glob import argparse, shlex, inspect, atexit import traceback, subprocess # could potentially put them inside functions to hide them from collections import UserDict from . import config, exceptions, utils if config.system != 'windows': # windows does not have readline module, so importing ...
import numpy as np import pandas as pd import sys import scipy.stats import sklearn.cluster import os import multiprocessing as mp def _spearman(data_matrix, i, j, min_overlap, absolute): ''' Internal function, called by calculate_spearman. Get the two rows of the data matrix that correspond to the two us...
from __future__ import print_function if __name__ == '__main__': import matplotlib matplotlib.use('Agg') from optparse import OptionParser from math import sqrt, floor, ceil, pi from glob import glob import numpy as np import pylab as plt from scipy import linalg from astrom_common import * from astrom_intra...
import io import csv import requests import datetime import time from bs4 import BeautifulSoup TRAIN_FILE = "train.csv" DEFAULT_INTERVAL = 1800 TRAIN_FILE_HEAD = ["Insult", "Date", "Comment"] def writeCsv(fname, text, delimiter = ","): prev_data = list() try: fil...
import pickle import csv import os import argparse from copy import deepcopy class UtteranceAnnotation(): def __init__(self, args): # options for the type of csv to generate self.include_task = args.include_task self.root_annotator = args.root_annotator self.variable = args.variabl...
import esprit from esprit import mappings from octopus.core import app import json as jsonlib from datetime import datetime import dateutil.relativedelta as relativedelta import os, threading from octopus.lib import plugin from octopus.modules.es.initialise import put_mappings, put_example class ESInstanceDAO(esprit.d...
#!/usr/bin/env python3 from argparse import Namespace from glob import glob import json import random import os import shutil from tkinter import Scale, Checkbutton, OptionMenu, Toplevel, LabelFrame, Radiobutton, PhotoImage, Tk, BOTH, LEFT, RIGHT, BOTTOM, TOP, StringVar, IntVar, Frame, Label, W, E, X, N, S, NW, Entry, ...
# -*- coding: utf-8 -*- import abc import logging import datetime import functools import httplib as http import time import urlparse import uuid from flask import request from oauthlib.oauth2.rfc6749.errors import MissingTokenError from requests.exceptions import HTTPError as RequestsHTTPError from modularodm impor...
""" Functions to create S104 files and populate with data from other sources """ import logging import sys import datetime import numpy from ..s1xx import s1xx_sequence from .api import S104File, FILLVALUE_HEIGHT, FILLVALUE_TREND, S104Exception def _get_S104File(output_file): """ Small helper fun...
#!/usr/bin/env python # Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. import sys sys.dont_write_bytecode = True sys.excepthook = sys.__excepthook__ import os impor...
# Copyright 2015 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. """ Defines model components to describe generation projects build-outs for the SWITCH-Pyomo model. SYNOPSIS >>> from switch_mod.utilities import define_AbstractModel >>> model = de...
""" File name: renderer Author: <NAME> Date created: 03.03.2019 Date last modified: 18:25 03.03.2019 Python Version: "3.6" Copyright = "Copyright (C) 2018-2019 of Packt" Credits = ["<NAME>, <NAME>"] # people who reported bug fixes, made suggestions, etc. but did not actually write the code License = "MIT" Version = "1...
#import from src.project_parameters import ProjectParameters from DeepLearningTemplate.model import BaseModel, load_from_checkpoint import torch.nn as nn import torch from os.path import isfile from torchsummary import summary #def def create_model(project_parameters): model = UnsupervisedModel( optimizer...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME> """ import os import numpy as np import nibabel as nib from scipy import signal from numba import jit, float64, int64 def calculate_blood_t1(hct): # hct as a float between 0 and 1 #%s - Jordan et al. blood_t1 = 1./(0.52*hct+0.38) ...
""" The Django patching works as follows: Django internals are instrumented via normal `patch()`. `django.apps.registry.Apps.populate` is patched to add instrumentation for any specific Django apps like Django Rest Framework (DRF). """ from inspect import getmro from inspect import isclass from inspect import isfunct...
import numpy as np import matplotlib import platform if platform.system() == 'Darwin': matplotlib.use('TkAgg') import matplotlib.pyplot as plt from matplotlib import rcParams import torch from datetime import datetime import time import pickle import os import seaborn as sns import matplotlib.pylab as plt from sc...
"""Tests for module `screening_measures.py`.""" import numpy as np from numpy.testing import assert_allclose, assert_array_equal from hypermodern_screening.sampling_schemes import radial_sample, trajectory_sample from hypermodern_screening.screening_measures import ( compute_measures, screening_measures, ) ...
# **************************************************************************** # @evaluation_measurement.py # # Evaluate and compare the hole method with ground truth dGPS data # # # @copyright (c) 2021 Elektronische Fahrwerksysteme GmbH. All rights reserved. # Dr.-Ludwig-Kraus-Straße 6, 85080 Gaimersheim, DE, htt...
""" Inspired by: 1. RLKit: https://github.com/rail-berkeley/rlkit 2. StabelBaselines: https://github.com/hill-a/stable-baselines 3. SpinningUp OpenAI: https://github.com/openai/spinningup 4. CleanRL: https://github.com/vwxyzjn/cleanrl """ import os, subprocess, sys import argparse import importlib im...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Python-Pyraf module for GRANDMA detection of Optical candidates # Authors: <NAME>, <NAME>, <EMAIL> # <NAME>, Orsay, France, <EMAIL> # v1.1, last modified 2019 June # Good luck everyone with pyraf installation # Input arguments are filename without fits suffix, ...
""" This module focuses on the transformation from AST to static structure. There's not really too much magic here, but it's good to have the separation. It's also completely unusable at the moment; just a parking lot for excised code. But things will get better... """ import collections from typing import List, Union...
#!/usr/bin/env python3 # Utilility functions and classes required for DensePassageRetriever # # Building upon the code (https://github.com/facebookresearch/DPR) published by Facebook research under Creative Commons License (https://github.com/facebookresearch/DPR/blob/master/LICENSE) # It is based on the following rese...
from collections import OrderedDict, namedtuple, defaultdict from multicorn import ColumnDefinition, ForeignDataWrapper, TableDefinition from multicorn.utils import log_to_postgres, ERROR, WARNING, INFO, DEBUG from .bqclient import BqClient DEFAULT_MAPPINGS = { "STRING": "TEXT", "INT64": "BIGINT", "INTEG...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ FreeFrom Products Python module Version 1.1.1 """ # Import dependencies from flask import ( Blueprint, flash, render_template, redirect, request, session, url_for) from bson.objectid import ObjectId from forms import ProductForm, ProductEditForm, ProductViewForm...
#!/usr/bin/env python # author: <NAME> # email: <EMAIL> # license: MIT # Please feel free to use and modify this, but keep the above information. """ Implements an Animation with matplotlib (for Systems in 1D or 2D). """ import sys from os import sep from typing import Tuple, List import numpy as np from matplotlib...
# Copyright (c) 2018-2020, <NAME> # License: MIT License import pytest from math import radians from ezdxf.math import Vec3, BoundingBox from ezdxf.render.forms import cube from ezdxf.render.mesh import MeshVertexMerger, MeshBuilder, MeshTransformer, MeshAverageVertexMerger from ezdxf.addons import SierpinskyPyramid fr...
"""This module contains functions for parsing the datetime formats used by the CDBS HTML tables and HST FITS data sets. It contains a formatting function which will render a date and time in a sortable string representation (isoformat). """ from __future__ import print_function from __future__ import division from __...
import random import math import numpy as np import pygeos import pandas as pd # Smallest enclosing circle - Library (Python) # Copyright (c) 2017 Project Nayuki # https://www.nayuki.io/page/smallest-enclosing-circle # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
import json import os import xml.etree.ElementTree as ET import numpy as np import pybullet as p import trimesh from IPython import embed from PIL import Image import igibson from igibson.external.pybullet_tools.utils import get_center_extent, stable_z_on_aabb from igibson.objects.articulated_object import Articulate...
#!/usr/bin/python3 # final_project.py import logging import os import sys from itertools import product from functools import reduce from imutils.video import VideoStream from imutils.video import FPS import imutils import colorlog from PIL import Image import numpy as np from scipy import signal import cv2 as cv l...
# Logic in computer science # Homework: Implementing a SAT Solver # CDCL with: # - 2WL # - UIP # - heap # - resets import sys from myheap import heapify, decreaseKey # CONSTANTS SAT = "SATISFIED" # Satisfied UNSAT = "UNSATISFIED" # Unsatisfied UNIT = "UNITCLAUSE" # Unit clause UNRES = "UNRESOLVED" # Unresolve...
#!/usr/bin/env python # Copyright 2014-2020 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...
from __future__ import print_function import argparse import sys import os from tqdm import tqdm import numpy as np import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data import torchvision.datasets as dsets import torchvision.transforms as transforms import torchvision....
#!/usr/bin/env python """ ROS interface objects for sending actuation commands to the SVEA car's low-level controller. The low-level controller expects unit-less steering and velocity values from [-127, 127] that correspond to the minimum and maximum steering angles and velocities. We implement the interfaces for two ...
### Copyright (C) 2017 NVIDIA Corporation. All rights reserved. ### Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). import random import numpy as np import torch import torch.utils.data as data import torchvision.transforms as transforms from PIL import Image ...
# Copyright (c) 2020, NVIDIA CORPORATION. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# -*- coding: utf-8 -*- import ROOT import order from array import array from collections import OrderedDict tcolors = { "data": ROOT.kBlack, "tt": ROOT.TColor.GetColor(220, 220, 220), # light gray "dy_lep": ROOT.TColor.GetColor(40, 160, 120), "dy_lep_10To50": ROOT.kGreen, "dy_lep_50ToInf": ROOT....
import logging import argparse import ast from collections import OrderedDict import torch import os import scipy from datetime import datetime import time import math import random import numpy as np import sys import cv2 irange = range def mylogger(logpath='./param.log'): logger = logging.getLogger('mylogger') ...
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016-2018 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
# Copyright 2020 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2021 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, ...
from __future__ import print_function from collections import defaultdict, deque import datetime import time import torch import torch.distributed as dist import errno import os import sys def info(type, value, tb): if hasattr(sys, 'ps1') or not sys.stderr.isatty(): # we are in interactive mode or we don't h...
# -*- coding: utf-8 -*- """ Small Theano LSTM recurrent network module. @author: <NAME> @date: December 10th 2014 Implements most of the great things that came out in 2014 concerning recurrent neural networks, and some good optimizers for these types of networks. Note (from 5 January 2015): Dropout api is a bit soph...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 28 12:53:31 2019 @author: asabater """ import os #os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"; #os.environ["CUDA_VISIBLE_DEVICES"] = "0"; import sys sys.path.append('keras_yolo3/') sys.path.append('keras_yolo3/yolo3/') import json import os im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # import xlrd import sys,csv # import codecs from datetime import date,datetime from pyh import * page = PyH('JIRA看板') #默认只打印3列 PRT_COL = 3 NEW_LINE = '' SPRINT_DATE = '0901' class Utils(): def __init__(self): self.p = 0; def add(self,param): sel...
""" The base classes for inverse problem solving. See :mod:`geoist.inversion` for examples, regularization, and more. This module defines base classes that are used by the rest of the ``inversion`` package: * :class:`~geoist.inversion.base.MultiObjective`: A "container" class that emulates a sum of different obje...
import random, math, os import numpy as np from enum import Enum import sys sys.path.append('../') sys.path.append('../../') from reward_machines.sparse_reward_machine import SparseRewardMachine """ Enum with the actions that the agent can execute """ class Actions(Enum): up = 0 # move up right = 1 # move ...
import botogram import requests import time from datetime import datetime from urllib.request import urlopen from wakeonlan import wol import sport import apiKey import altriCom keyBot = apiKey.apiBot() bot = botogram.create(keyBot) bot.about ="Questo è il bot di Infopz\nUtilizza l'opzione /help per ottenere un elen...
""" Discover D and J genes The most frequent D/J sequences are considered candidates. For J genes, candidate sequences are merged if they overlap each other. The result table is written to standard output. Use --fasta to also generate FASTA output. """ import logging import pandas as pd from collections import defau...
""" Demo if adaptive adversary works against feature squeezing. Embed the diffrentiable filter layers in a model. Pass in the (average) gradient (part of loss) to an attack algorithm. Implement the gaussian-noise-iterative method for non-diffrentiable filter layers (bit depth reduction.) Introduce ...
import datetime import json import os from abc import abstractmethod, ABC from typing import Optional import requests from botocore.exceptions import ClientError from keycloak import KeycloakGetError from keycloak.exceptions import KeycloakError from keycloak.keycloak_admin import KeycloakAdmin from requests import HT...
""" Data Types for QSA. """ import codecs import os import os.path import collections from typing import Any, Optional, Dict, Union, Generator, List from os.path import expanduser from PyQt5 import QtCore # type: ignore from PyQt5.Qt import QIODevice # type: ignore from pineboolib.core import decorators from pineb...
# -*- coding: utf-8 -*- """ Created on Wed Aug 19 20:47:00 2020 Copyright 2020 <NAME> https://github.com/JA-Cuartas-Micieces 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 res...
from __future__ import annotations import datetime import os import shutil import typing from typing import Union, Any, IO, Type, Optional, List, Tuple import dill class FileCheck: @staticmethod def exists(full_path: str) -> bool: return os.path.exists(full_path) @staticmethod def has_quar...
from registry.extensions import db from registry.list.models import DonationCenter, Medals from registry.utils import capitalize, format_postal_code class Batch(db.Model): __tablename__ = "batches" id = db.Column(db.Integer, primary_key=True) donation_center_id = db.Column(db.ForeignKey(DonationCenter.id)...
import pandas as pd import numpy as np from sklearn.preprocessing import MinMaxScaler import argparse from tqdm import tqdm DATASET_DATA_FILE = { 'ids17': { 'data': 'ids2017_data.csv', 'normal_class': 'BENIGN', 'label_col': ' Label', 'features': [' Flow Duration', ...
""" :mod:`io` -- I/O utilities ========================== Utility functions for writing and reading data. """ # Copyright 2018-2020 The emg3d Developers. # # This file is part of emg3d. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the Licen...
import logging from collections import OrderedDict from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core import signing from django.db import models from django.db.models import F, Max, M...
# -*- coding:utf-8 -*- import numpy as np import copy import os class PsoAtoms(object): """PsoAtoms object. The PsoAtoms object can represent some atoms or molecules absorbing in a substrate. It has a supercell which describes the substrate's structure. Information about the atoms (cell and posit...
import streamlit as st from alphapept.gui.utils import files_in_folder, read_log, escape_markdown from alphapept.paths import PROCESSED_PATH from alphapept.settings import load_settings import os import yaml import alphapept.io import pandas as pd import base64 import plotly.express as px from plotly.subplots import ma...
from django.test import TestCase from mock import MagicMock, patch # Support for Python 2 and Python 3. try: from urllib2 import URLError except ImportError: from urllib.error import URLError from hud_api_replace.management.commands import load_hud_data from hud_api_replace.models import Service, Language, Co...
""" A combinatorial specification is a set rules of the form a -> b1, ..., bk where each of the bi appear exactly once on the left hand side of some rule. """ from copy import copy from functools import reduce from operator import mul from typing import Dict, Generic, Iterable, Iterator, List, Sequence, Set, Tuple, Uni...
#!/usr/bin/env python3 # # Copyright 2016 Red Hat, Inc. # # Authors: # <NAME> <<EMAIL>> # # This work is licensed under the MIT License. Please see the LICENSE file or # http://opensource.org/licenses/MIT. from django.conf.urls import url from django.http import HttpResponseForbidden, Http404, HttpResponseRedirec...
# Copyright 2014 Altera Corporation. All Rights Reserved. # Copyright 2015-2017 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# -*- coding: utf-8 -*- """ LoggedFS-python Filesystem monitoring with Fuse and Python https://github.com/pleiszenburg/loggedfs-python src/loggedfs/_core/fs.py: File system core Copyright (C) 2017-2020 <NAME> <<EMAIL>> <LICENSE_BLOCK> The contents of this file are subject to the Apache License Version 2 ("Licens...
""" Aurora's version of the environmentalism example July 3, 2018 """ import dworp import igraph import logging import numpy as np import sys import os import subprocess import pdb # try: # import pygame # except ImportError: # # vis will be turned off # print("error importing pygame: vis will be turned of...
# -*- coding: utf-8 -*- # # Copyright (C) 2018 CERN. # # Asclepias Broker is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Relationshps ingestion functions.""" import uuid from typing import Tuple from invenio_db import db from sql...
# the system UART, optimized specifically for our use case. # includes: CRC generator, receive timeout timer, receive FIFO, fixed divisor from nmigen import * from nmigen.asserts import Past, Rose, Fell from nmigen.lib.cdc import FFSynchronizer from nmigen.lib.fifo import SyncFIFOBuffered from boneless.arch.opcode imp...
from lxml import etree import subprocess from pathlib import Path import argparse from io import StringIO import difflib SEQUENCE_ID_BY_NAME = {"none":-1, "idle01":1000, "idle02":1001, "idle03":1002, "idle04":1003, "idle05":1003, "death01":1005, "talk01":1010, "talk02":1011, "greet01":1020, \ "bow01":1021, "chee...
#use the nonlocal topological method to detect tips. # also records topologcially preserved values. #<NAME> #9.13.2021 from skimage import measure from numba import jit, njit from numba.typed import List import numpy as np, os from . import * # from .intersection import * from scipy.interpolate import interp2d from .i...
# 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...
# # The script to run maze navigation experiment with Novelty Search optimization # using the MultiNEAT library # # The Python standard library import import os import shutil import math import random import time import copy import argparse import pickle # The MultiNEAT specific import MultiNEAT as NEAT # The helper...
"""Asynchronous client for the Open-Meteo API.""" from __future__ import annotations from datetime import date, datetime from enum import auto from typing import List, Optional from pydantic import BaseModel, Field from .util import StrEnum class TemperatureUnit(StrEnum): """Enum to represent the temperature u...
from monte.test import unittest from monte.lexer import MonteLexer, StringFeeder, ParseError from terml.nodes import Tag, Term def lex(s): toks = list(MonteLexer(StringFeeder(s, '<test data>'))) if toks[-1].tag.name == 'EOL': del toks[-1] return toks class LexerTests(unittest.TestCase): def ...
from ._main import DIRS,LinkDB,ConvertFields,StrBuff,StrCondition,Embed,Rarity,TACScale,GitLabLink import re #To do: #title url ELEMENT_COLOR = { 'Fire': 0xFF0000, 'Wind': 0x007F00, 'Water': 0x2828FF, 'Thunder': 0xFFCC00, 'Light': 0xFFFFFF, 'Dark': 0x140014, } def Un...