text
stringlengths
6.04k
39.5k
import re import pdb import requests from lxml import html as etree import pdfcutter # Import relative Parent Directory for Helper Classes import os, sys sys.path.insert(0, os.path.abspath('..')) #Used when call is ` python3 file.py` sys.path.insert(0, os.path.abspath('.')) #Used when call is ` python3 $COUNTY/file....
#!/usr/bin/env python3 import sys import re import string import json from statistics import variance import time from FileGenerator import Regenerate header_path = '../include/LaTeXInput.h' data_path = '../win32/LaTeXInputData.h' # strip out unused bytes (sequence[0] and the separator ' ') from input sequences, # s...
# Copyright 2020 Google 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, ...
""" This module pre-processes the CE-CT acquisitions and associated segmentations and generates a DataFrame tracking the file paths of the pre-processed items, stored as NumPy ndarrays. This module is to be run from the top-level data-processing directory using the -m flag as follows: Usage: $ python3 -m luna.pr...
from examples.authentication import client from intersight.model.server_profile import ServerProfile from intersight.api import server_api from intersight.model.policy_abstract_policy_relationship import PolicyAbstractPolicyRelationship from intersight.model.storage_disk_group_policy import StorageDiskGroupPolicy from ...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.form import assign_to from frappe.utils.jinja import validate_template from dateutil...
# Copyright 2017 Google 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, ...
# Copyright 2021, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
from os.path import dirname, exists, join, relpath from unittest.mock import Mock import pytest import torch from rflib.runner import build_optimizer from rfvision.core import BitmapMasks, PolygonMasks from rfvision.datasets.builder import DATASETS from rfvision.datasets.utils import NumClassCheckHook def _get_conf...
#!/usr/bin/env python3 import datetime import json import os import os.path import sys from functools import reduce from math import pi import matplotlib.pyplot as plt from fit_scipy_new import ( get_amplitude, get_decay_chains, load_params, prepare_data, ) from scipy import interpolate import tf_pwa ...
from symengine import ( Symbol, sin, cos, sqrt, Add, Mul, function_symbol, Integer, log, E, symbols, I, Rational, EulerGamma, Function, Subs, Derivative, LambertW, zeta, dirichlet_eta, zoo, pi, KroneckerDelta, LeviCivita, erf, erfc, oo, lowergamma, uppergamma, exp, loggamma, beta, polygamma, digamma, tr...
"""Utilities shared by tests.""" import asyncio import contextlib import functools import gc import inspect import os import socket import sys import unittest from abc import ABC, abstractmethod from types import TracebackType from typing import ( # noqa TYPE_CHECKING, Any, Callable, Iterator, Lis...
# ########################################################## # FlatCAM: 2D Post-processing for Manufacturing # # File Author: <NAME> (c) # # Date: 1/13/2020 # # MIT Licence # # ############################...
"""Support for Rflink devices.""" import asyncio from collections import defaultdict import logging import async_timeout from rflink.protocol import create_rflink_connection from serial import SerialException import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_STATE, CONF_COMMA...
# -*- coding: utf-8 -*- """ This script reads a XML-formatted word list and produces a dictionary file used by the FirefoxOS virtual keyboard for word suggestions and auto corrections. The word lists come from the Android source: https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictio...
''' Models for representing top-level plot objects. ''' from __future__ import absolute_import import warnings from six import string_types from ..core.enums import Location, OutputBackend from ..core.properties import Bool, Dict, Enum, Include, Instance, Int, List, Override, String, Float from ..core.property_mixi...
#!/usr/bin/env python3 import sympy import sys import argparse import re import json import numpy as np def compose_final_file(output_f, prefix_content, module_defs, top_kernel): with open(output_f, 'w') as f: f.writelines(prefix_content) for module_name in module_defs: module_def = m...
# This file is part of the Python aiocoap library project. # # Copyright (c) 2012-2014 <NAME> <http://sixpinetrees.blogspot.com/>, # 2013-2014 <NAME> <<EMAIL>> # # aiocoap is free software, this file is published under the MIT license as # described in the accompanying LICENSE file. import asyncio import...
''' This is the utils module that collects convenience functions and code that are useful for charts ecosystem. ''' from __future__ import absolute_import, division, print_function from collections import OrderedDict, defaultdict from copy import copy import itertools import json from math import cos, sin from color...
# Copyright (C) 2021 DB Systel GmbH. # # 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 w...
# Copyright (C) 2013 Google Inc. # 2016 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of th...
from __future__ import division import os, csv import time, pickle import math from glob import glob import tensorflow as tf import numpy as np from six.moves import xrange from ops import * from utils import * from math import log, ceil def conv_out_size_same(size, stride): return int(math.ceil(float(size) / fl...
"""Contains compressive learning algorithms.""" # Main imports import numpy as np import matplotlib.pyplot as plt import scipy from scipy.optimize import nnls, minimize # We rely on the sketching functions from .sketching import SimpleFeatureMap ########################## ### 1: CL-OMPR for GMM ### #############...
# Copyright 2019 TerraPower, 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 writi...
# -*- coding: utf-8 -*- """ Overall Architecture used for the LCP shared Task Note - Slight deviations are possible if everything is run from scratch due to certain non-determinism in PyTorch computations """ import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import num...
#!/usr/bin/env python # Copyright 2014-2019 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...
#!/bin/sh - # Copyright 2011-2012 <NAME> # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # POX...
# --- # jupyter: # accelerator: GPU # colab: # name: Rigid Object 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 # ...
import argparse import cv2 import numpy as np import os import sys import time import torch.backends.cudnn import torch.nn as nn import torch.nn.parallel from plyfile import PlyData, PlyElement from typing import Tuple from torch.utils.data import DataLoader from datasets.data_io import read_cam_file, read_image, read...
# MB-Lab # # Сайт ветки MB-Lab: https://github.com/animate1978/MB-Lab # Сайт ветки перевода на русский язык MB-Lab: https://github.com/SergeyRom-23/MB-Lab-master-RU # # ##### НАЧАЛО ЛИЦЕНЗИОННОГО БЛОКА GPL ##### # # Эта программа является свободным программным обеспечением; Вы можете распространять его и / или # измени...
#!/usr/bin/env python # coding: utf-8 import os import warnings import numpy as np from numpy import random from pandas.util._decorators import cache_readonly import pandas.util._test_decorators as td from pandas.core.dtypes.api import is_list_like import pandas as pd from pandas import DataFrame, Series import pa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # xchacha.py # ---------- # Simple model of the XChaCha stream cipher. Used as a reference for # the HW implementation. Also used as part of the TRNG Python model. # The code follows the structure o...
# -*- coding: utf-8 -*- # Copyright 2020 The TensorFlowTTS Team and <NAME> (@kan-bayashi) # # 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 # ...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File game_pong.py created on 12:56 2018/1/6 @author: <NAME> @version: 1.0 """ from math import sqrt from interfaces import * import pygame class PongState(State): def __init__(self, s, flag=0): super(PongState, self).__init__(s) self.flag = flag...
import argparse, random, sys, requests from datetime import datetime from math import floor from multiprocessing.dummy import Pool as ThreadPool from time import sleep _url = None _payload = None # Dictionary whose keys are the parameters of the GET/POST request. _method = None # Method for the reques...
# Test MonthDelta() class and monthmod() function. # # See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases import pickle import unittest import types from operator import lt, le, gt, ge, eq, ne try: reversed sorted except NameError: def reversed(seq): return seq[::-1] def sorted(it)...
#!/usr/bin/env python3 # Author: Armit # Create Time: 2021/09/23 import os import logging from re import compile as Regex from json import loads from shutil import copy from time import time from threading import Timer, RLock from datetime import datetime from base64 import b64decode from random import s...
import logging from collections import defaultdict from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import permission_required from django.contrib.gis.db.models.functions import Transform from django.core.cache import caches from django.db.models import Sum from ...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals import atexit import os import sys import debugpy from debugpy import adapter, co...
#!/usr/bin/env python '''waypoint command handling''' import time, os, fnmatch, copy, platform from pymavlink import mavutil, mavwp from MAVProxy.modules.lib import mp_module from MAVProxy.modules.lib import mp_util if mp_util.has_wxpython: from MAVProxy.modules.lib.mp_menu import * class WPModule(mp_module.MPMod...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import pytest import typing from datetime import datetime from unittest import mock from simple_model import Model from simple_model.exceptions import EmptyField, ValidationError from simple_model.fields import ModelField from .conftest import MyModel class FooBarModel(Model): foo: str bar: str def val...
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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...
import os import torch import numpy as np import pandas as pd import traci from .env import SumoEnvironment from .module import Agent # 学習させる関数 def test_agent( net_file='/home/kato/traffic_light_control/sumo-rl/nets/2x2grid/2x2.net.xml', route_file='/home/kato/traffic_light_control/sumo-rl/nets/2x...
# -*- coding: utf-8 -*- """ @author: fornax """ import numpy as np import pandas as pd def get_npwd2881_features(df): """ Extracts AOOO commands from pandas file which are correlated with NPWD2881 line. Those commands are then used as a train features for final predictions. :param df: a data ...
import torch import numpy as np import random import argparse from utils import plot_utils, eval_utils from collections import defaultdict import matplotlib.pyplot as plt import matplotlib.patheffects as pe from sklearn.neighbors import KernelDensity from scipy.stats import gaussian_kde import pandas as pd hyperpa...
"""ResNet v1, v2, and segmentation models for Keras. # Reference - [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) - [Identity Mappings in Deep Residual Networks](https://arxiv.org/abs/1603.05027) Reference material for extended functionality: - [ResNeXt](https://arxiv.org/abs/1611....
''' Author:<NAME> data: 2021-1-25 ''' from ..registry import PIPELINES import torch import numpy as np import cv2 import numbers import random import torch.nn.functional as F @PIPELINES.register_module class img_pad(object): def __init__(self,pad_ratio = 0.1): self.pad_ratio = pad_ratio def __call_...
""" Code related to working with textures. """ import os import math import PIL.Image import PIL.ImageOps import PIL.ImageDraw from typing import Optional from typing import List from arcade import lerp from arcade import RectList from arcade import Color from arcade import calculate_points def _lerp_color(start_c...
# IMPORTS # import math, os, random import matplotlib.pyplot as plt from matplotlib import gridspec from itertools import product, chain from skimage import draw, transform import numpy as np import tensorflow as tf # SETUP # # Ensure reproducibility # def set_seed(seed=31415): np.random.seed(seed) tf.rand...
from __future__ import absolute_import import json from datetime import datetime import numpy import xarray from affine import Affine from rasterio.io import MemoryFile from rasterio.warp import Resampling from skimage.draw import polygon as skimg_polygon from itertools import chain import re import datacube from da...
from __future__ import absolute_import, print_function, division import threading import time import traceback import h2.exceptions import hyperframe import six from h2 import connection from h2 import events from six.moves import queue import netlib.exceptions from mitmproxy import exceptions from mitmproxy import ...
#!/usr/bin/python # TODO: DELETE THIS IMPORT? from __future__ import print_function import stl_path import configparser from trex.stl.api import * from trex.common.services.trex_service_pppoe import ServicePPPOE from time import perf_counter from functools import partial from scapy.layers.l2 import Ether from scapy.l...
import matplotlib from matplotlib import pyplot as plt import subprocess import tempfile import os, sys from joblib import Parallel, delayed import numpy as np from sklearn import manifold from collections import Counter import plotly.graph_objs as go import plotly.offline as offline from plotly import tools from .isv...
#!/usr/bin/env python # Lint as: python3 """HTTP API logic that ties API call handlers with HTTP routes.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import http.client import itertools import logging import time import traceback from typing import T...
# # 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...
import os import tempfile from typing import List import pytest from bs4 import BeautifulSoup from json_schema_for_humans.generate import generate_from_file_object, generate_from_schema from tests.test_utils import _get_test_case_path def _generate_case( case_name: str, find_deprecated: bool = False, find_defau...
import random import math from mesa import Agent import numpy as np import pandas as pd from numpy import random as rnd import random import math from functools import reduce import inspect import statistics import itertools seed = 7 np.random.seed(seed) random.seed(seed) class firmAgent(Agent): def __init__(self,...
#!/usr/bin/env python """ GeoClaw tidetools Module `$CLAW/geoclaw/src/python/geoclaw/tidetools.py` Module provides provides tide prediction functions. :Functions: - fetch_harcon - make_pytides_model - predict_tide - fetch_noaa_tide_data - fetch_datums - datetimes - detide - surge """ from __future__ impor...
"""Writing CXI files from AGIPD/LPD data""" import h5py import logging import numpy as np log = logging.getLogger(__name__) class VirtualCXIWriterBase: """ Base class for machinery to write a CXI file containing virtual datasets. You don't normally need to use this class directly. Instead, use t...
# Was made using Python 3.6.2 import sys import os import random try: import pyglet from pyglet.gl import * from pyglet.window import key from pyglet.window import mouse except ImportError as e: print("ERROR: Make sure the packages in requirements.txt are installed.") print("You can do so with \"pip in...
# coding=utf-8 # Copyright 2018 The Dopamine 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...
import os import socket import ssl import sys import threading import typing from contextlib import contextmanager from importlib import import_module from pathlib import Path from ssl import SSLContext from typing import TypeVar, Callable, Union, Optional, Awaitable, Coroutine, Any, Dict import sniffio from .abc imp...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # # Copyright 2014 Google Inc. All rights reserved. # Copyright 2015 <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/LICE...
# # from __future__ import print_function; import sys; import re; import os; import logging; from fileOps import * from mageckCount import * class VisualRValue: ''' Class for R visualization ''' outprefix='sample1'; genesummaryfile=''; cpindex=[]; targetgene=[]; cplabel='' # internal variable, ...
import unittest import contextlib import math import sys import distutils.version from typing import Union import sympy import numpy as np from sympy.abc import a, b, c, d, e, f, k, l, m, n, i, j from sympy import sin, Sum, IndexedBase, Rational a_ = IndexedBase(a) b_ = IndexedBase(b) dummy_a = sympy.Dummy('a') fr...
"""Python classes for reading chunks from a save file. Copyright (c) 2022 <NAME> <<EMAIL>> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUD...
#!/usr/bin/env python3 """Command line utility for creating and creating WAD files from BSP files Supported Tilemaps: - Tiled Supported Games: - QUAKE Note: The dependant tmx Python module has been modified: tmx.__init__.py:373 -> 376 The casts to int need to be casts to float """ import arg...
import copy import random HIGH_CARD, ONE_PAIR, TWO_PAIR, THREE_OF_A_KIND, STRAIGHT, FLUSH, FULL_HOUSE, FOUR_OF_A_KIND, STRAIGHT_FLUSH = range(9) class Deck(object): def __init__(self, num_decks=1): """ Generate a list of cards for num_decks decks, 52 cards per deck. codes: ...
import itertools from functools import partial from multiprocessing.pool import Pool import pandas as pd from cellphonedb.src.core.core_logger import core_logger from cellphonedb.src.core.models.complex import complex_helper def get_significant_means(real_mean_analysis: pd.DataFrame, resul...
import numpy as np from scipy.stats import multivariate_normal from scipy.special import logsumexp from sklearn import cluster from sklearn.utils import check_array, check_random_state from . import hsmm_core_x as core, hsmm_utils from .hsmm_utils import log_mask_zero, iter_from_X_lengths # Base Class for Explicit Du...
import math from functools import partial import tensorflow as tf from tensorflow import keras # def crop(pred, boxes): # # num_pos, 136, 136 # pred_shape = tf.shape(pred) # # [1, ……, 136] # w = tf.cast(tf.range(pred_shape[1]), tf.float32) # # [[1], ……, [136]] # h = tf.expand_dims(tf.cast(tf.r...
""" To ensure compatibility from Python ``2.7`` - ``3.x``, a module has been created. Clearly there is huge need to use conforming syntax. """ import errno import sys import os import re import pkgutil import warnings import inspect import subprocess try: import importlib except ImportError: pass is_py3 = sys....
# Copyright (C) 2010 <NAME> (<EMAIL>) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following discla...
""" # Pyqtree Pyqtree is a pure Python spatial index for GIS or rendering usage. It stores and quickly retrieves items from a 2x2 rectangular grid area, and grows in depth and detail as more items are added. The actual quad tree implementation is adapted from [Matt Rasmussen's compbio library](https://github.com/mdras...
# # Copyright 2015 Quantopian, 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 wr...
import numpy as np import pickle import os, time from copy import deepcopy import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.keras.models import load_model from tensorflow.keras.optimizers import Adam import tensorflow_addons as tfa from functions.tf_loss_custom import compute_loss_mae, eval_lo...
#!/usr/bin/env python3 import colorsys import os import sys import xml.sax import xml.sax.handler from collections import OrderedDict from functools import cmp_to_key from optparse import OptionParser from pegaflow import yaml COLORS = [ "#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", ...
import torch from pyinn.utils import Stream, load_kernel from torch.autograd import Function from torch.nn.modules.module import Module class EMD(Module): def __init__(self): super().__init__() self.emd_function = EMDFunction.apply def forward(self, input1, input2): return self.emd_fu...
""" The main module of analyzer. """ import glob import json import os import re from logging import Logger from typing import Any, Dict, List, Optional, Tuple, Union from ..logger import get_eval_logger from ..result import BitgenResult, HLSResult, HierPathNode, Job, MerlinResult, Result class Analyzer(): """Ba...
# encoding: utf8 import sys import numpy as np try: from IPython.lib.pretty import pprint except ImportError: pprint = None import pytest from angela2 import volt, mV, second, ms, Hz, farad, metre from angela2 import Unit, Equations, Expression from angela2.units.fundamentalunits import (DIMENSIONLESS, get_d...
"""Functions that help you work with QMK keymaps. """ import json import subprocess import sys from pathlib import Path import argcomplete from milc import cli from pygments.lexers.c_cpp import CLexer from pygments.token import Token from pygments import lex import qmk.path import qmk.commands from qmk.keyboard impor...
import hashlib import json import threading from typing import Any, Optional # TODO: all these trezorlib imports should be moved into the lower level # trezorclient, perhaps except for the module trezor_exceptions. So that this # module only communicates with the trezor plugin, no lower level functions # would be dire...
""" Get the normalized best template to do flux calibration. """ #- TODO: refactor algorithmic code into a separate module/function import argparse import sys import numpy as np from astropy.io import fits from astropy import units from astropy.table import Table from desispec import io from desispec.fluxcalibrat...
import csv import io import json import os from logging import getLogger from typing import (IO, Any, Dict, List, Literal, Mapping, Optional, Sequence, Tuple) import requests from pyroutelib3 import Router, distHaversine from ..const import DIR_SHAPE_ERR, HEADERS from ..util import CsvWriter, ensu...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: __init__.py """create and manipulate C data types in Python""" import os as _os import sys as _sys __version__ = '1.1.0' from _ctypes import Union, S...
#! /usr/bin/env python # -*- coding: utf-8 -*- from common_utils import * from crypto_utils import * from random import * import os MODE_TYPE = { 'MODE_UNSPECIFIED' : 0x0000, 'MODE_KEYINIT' : 0x0001, 'MODE_AESINIT_ENC' : 0x0002, 'MODE_AESINIT_DEC' : 0x00...
from flask_restx import Resource from flask import request, send_from_directory from bson.objectid import ObjectId import inflect import math from googletrans import Translator import time import asyncio import threading import uuid import os # from app import db_connection from encoder.params_model import model_emb...
import os import shutil import subprocess from google.cloud import bigquery from google.auth.credentials import AnonymousCredentials from astropy.table import Table from astropy import units as u from astropy.coordinates import SkyCoord, match_coordinates_sky from .images import fits as fits_utils from .logging impo...
############################################################################## ## # This file is part of Sardana ## # http://www.tango-controls.org/static/sardana/latest/doc/html/axisex.html ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or mod...
""" .. module:: CPGen :platform: Unix, Windows :synopsis: A simple control points generator to use with the B-Spline and NURBS surfaces .. moduleauthor:: <NAME> <<EMAIL>> """ import sys import math import random import warnings class Grid(object): """ Simple grid generator to use with B-Spline surfaces...
import yaml import subprocess import base64 import traceback import datetime import json from ckan_cloud_operator import yaml_config def check_call(cmd, namespace='ckan-cloud', use_first_pod=False): cmd = _parse_call_cmd(cmd, namespace, use_first_pod) subprocess.check_call(f'kubectl -n {namespace} {cmd}', she...
""" Utility functions similar to what is defined in common/utils.py There are slight modifications to each function because of different data readers which is why these are defined again. All these functions would eventually be merged with common/utils.py but requires considerable refactoring of the current...
#!/usr/bin/env python3 # Copyright 2012-2016 The Meson development team # 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...
__author__ = "<NAME>" '''Add a timer so it does this automatically everyday at a set time''' from os import path, mkdir, listdir, rename, environ from getpass import getuser import time import sys import json import os if sys.version_info >= (3,): from tkinter import * from tkinter import messageb...
# Copyright 2018 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, ...
#<NAME>, 18 Enero 2020 #TKINTER CON POO, MULTIPLES FRAMES CON AYUDA DE CONTAINER #----------------------------------------------------------------------------- ''' El objetivo de este codigo, es maximizar la capacidad y uso de nuestra APP, con ayuda de la alternativa de un MENU, que a su vez nos lleve a diferentes...
from expression.abstract_expression import ExpressionType from expression.comparison_expression import ComparisonExpression from expression.constant_value_expression import ConstantValueExpression from query_planner.logical_projection_plan import LogicalProjectionPlan from query_planner.logical_inner_join_plan import L...