text
stringlengths
2
999k
""" :module StringDBScraperTest: Test module for StringDBScraper.""" # Import class to be tested. from GenDBScraper.StringDBScraper import StringDBScraper, stringdb_query from GenDBScraper.RESTScraper import RESTScraper from GenDBScraper.Utilities import web_utilities # Utilities from TestUtilities.TestUtilities impo...
# # Copyright (c) 2020 it-eXperts IT-Dienstleistungs GmbH. # # This file is part of tagger # (see https://github.com/IT-EXPERTS-AT/tagger). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional informatio...
from cloudaux.aws.sts import sts_conn from cloudaux.aws.decorators import rate_limited, paginated from botocore.exceptions import ClientError S3_REGION_MAPPING = dict( APNortheast='ap-northeast-1', APSoutheast='ap-southeast-1', APSoutheast2='ap-southeast-2', DEFAULT='', EU='eu-west-1', SAEast...
from django_congen.backends.generic import GenericHandler class SupervisordHandler(GenericHandler): template = 'django_congen/supervisord'
import numpy as np from KALFILT import* kfx = KF(0,0,0) kfv = KF(0,0,0)
# encoding: utf-8 """ BN-Inception for ImageNet-1K, implemented in PyTorch. Original paper: 'Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift,' https://arxiv.org/abs/1502.03167. """ __all__ = ['BNInception', 'bninception'] import os import torch.nn as nn import ...
# Copyright 2021 Lucas Oliveira David # # 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 ...
from django.apps import AppConfig class InvestigationsConfig(AppConfig): name = 'investigations'
import numpy as np import pandas as pd from sklearn import preprocessing from sklearn.svm import SVR from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt summary_data = 'resources/wso2apimanagerperformanceresults.csv' x_select_columns = [0, 1, 2, 3] # select columns to x (features) y_s...
import argparse from app import App def get_params(): parser = argparse.ArgumentParser(description="Play the Szemeredi game") parser.add_argument('set_size', metavar='N', type=int, help='Size of the created set.') parser.add_argument('k', metavar='k', type=int, help='Length of the...
#!/usr/bin/env python3 import configparser import time import threading import mastodonTool import os import datetime import markovify import exportModel import re # 環境変数の読み込み config_ini = configparser.ConfigParser() config_ini.read('config.ini', encoding='utf-8') def worker(): # 学習 domain1 = config_ini['re...
# -*- coding: utf-8 -*- """Helpers to deal with marshmallow schemas""" from marshmallow import class_registry from marshmallow.base import SchemaABC from marshmallow_jsonapi.fields import Relationship, List, Nested from flask_rest_jsonapi.exceptions import InvalidInclude def compute_schema(schema_cls, default_kwar...
from django.apps import AppConfig class PaginasConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'paginas'
"""This problem was asked by Microsoft. Compute the running median of a sequence of numbers. That is, given a stream of numbers, print out the median of the list so far on each new element. Recall that the median of an even-numbered list is the average of the two middle numbers. For example, given the sequence [2, 1,...
import math import unittest from datetime import datetime from app import db, data_loader, elastic_index from app.model.category import Category from app.model.chain_step import ChainStep from app.model.event import Event from app.model.location import Location from app.model.participant import Participant from app.mo...
# # 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...
# coding=utf-8 # Copyright 2020 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-2.0 # # Unless requir...
''' This class aggregates all conversions functions used in EMU ''' from ..common.trex_exceptions import * from trex.utils.common import compress_ipv6, mac_str_to_num, int2mac, ip2int, int2ip, ipv62int, int2ipv6 from scapy.utils import mac2str import copy import socket import struct try: basestring except NameError...
""" References ---------- .. [1] Betts, John T. "Practical methods for optimal control and estimation using nonlinear programming." Vol. 19. Siam, 2010. """ import beluga import logging ocp = beluga.OCP() # Define independent variables ocp.independent('t', 's') # Define equations of motion ocp.state('x', 'vx', ...
import os import numpy as np from keras.models import Sequential from keras.optimizers import Adadelta from keras.losses import categorical_crossentropy from keras.layers import Dense from keras.layers import Dropout from keras.layers import Flatten from keras.layers import Conv2D from keras.layers import MaxPooling2D...
#!/usr/bin/env python3 import string import sys import requests from player_lib import * def put(host, _flag_id, flag, vuln): mch = CheckMachine(host) name, password = mch.register_user() sess = mch.login_user(name, password) if vuln == "1": frames = list(map(mch.load_local_letter, flag))...
import csv import json import pprint import requests import time import sys import datetime as PanDateTime import os as PanOS import os.path as PanOSPath import pandas as Pan # from __future__ import print_function import yfinance as YaFin import pandas_datareader as PanDR import quandl as Qndl from yahoofinancials imp...
from django.shortcuts import render, get_object_or_404, redirect from django.http import HttpResponse from django.urls import reverse from .models import Post, Comment from .forms import CommentForm def index(request): posts = Post.objects.all() return render(request, 'weblog/index.html', {'posts': posts}) ...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Aakvatech and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document class ChecklistCheckupAreaTask(Document): pass
""" Copyright 2020 Sergio Espinoza Lopez sergio.espinoza.lopez@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, ...
from typing import ( cast, Type, ) from eth_keys.datatypes import PrivateKey from lahja import Endpoint from p2p.peer import BasePeerPool from trinity.chains.light import ( LightDispatchChain, ) from trinity.config import ( TrinityConfig, ) from trinity.nodes.base import Node from trinity.protocol.l...
# Copyright 2014 - Rackspace Hosting # # 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 ...
from .r_dependencies import * class r_base(): def __init__(self,R_packages=None,bioconductor_packages=None,upgrade_bioconductor=False): self.stats = importr('stats'); self.tools = importr('tools'); try: if R_packages is None: R_packages = [ "...
# RUN: %python %s | llvm-mc -filetype=obj -triple i686-pc-win32 - | llvm-readobj -h - | FileCheck %s from __future__ import print_function # This test checks that the COFF object emitter can produce objects with # more than 65279 sections. # While we only generate 65277 sections, an implicit .text, .data and .bss wi...
""" Supporting functions on Python lists. """ from typing import TypeVar, Callable, List T = TypeVar('T') # pylint: disable=invalid-name R = TypeVar('R') # pylint: disable=invalid-name def scan(a_list: List[T], binary_op: Callable[[R, T], R], neutral: R) -> 'List[R]': """ Return the ful...
# Copyright 2019 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...
# Make our own testrunner that by default only tests our own apps from django.conf import settings from django.test.runner import DiscoverRunner class OurTestRunner(DiscoverRunner): def build_suite(self, test_labels, *args, **kwargs): return super(OurTestRunner, self).build_suite(test_labels or settings....
from datetime import datetime import sys import os import re from pathlib import Path import urllib.request SHUTDOWN_EVENT = "Shutdown initiated" this_file = Path(__file__).resolve() app_path = this_file.parent sys.path.insert(0, str(app_path)) # prep: read in the logfile logfile = app_path / "tmp" / "log.txt" urll...
from tempfile import NamedTemporaryFile import numpy as np import pytest from lhotse.audio import AudioSource, Recording from lhotse.cut import Cut, CutSet, PaddingCut from lhotse.features import Features from lhotse.utils import EPSILON, LOG_EPSILON PADDING_ENERGY = EPSILON PADDING_LOG_ENERGY = LOG_EPSILON @pytes...
from datetime import datetime, timedelta from rethinkdb import make_timezone UNITS = { 'S': lambda value: value, # Seconds 'M': lambda value: value * 60, # Minutes 'H': lambda value: value * 60 * 60, # Hours (strftime format) 'h': lambda value: value...
import logging import time from src.utils.utils import time_delta_now import numpy as np import torch from torch import nn from torch.nn import functional as F logger = logging.getLogger(__name__) class Sum(nn.Module): def __init__(self, in_channels, in_features, out_channels, dropout=0.0): super(Sum, s...
# optimizer optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005) optimizer_config = dict() # learning policy lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False) # runtime settings runner = dict(type='IterBasedRunner', max_iters=10000) checkpoint_config = dict(by_epoch=False, inte...
# NamedType specification for constructed types import sys from pyasn1.type import tagmap from pyasn1 import error class NamedType: isOptional = 0 isDefaulted = 0 def __init__(self, name, t): self.__name = name; self.__type = t def __repr__(self): return '%s(%s, %s)' % ( ...
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="indicator", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
import os import sys import io import pytz import yaml from datetime import datetime import rx from rx import operators as ops from concurrent.futures import ProcessPoolExecutor from urllib.request import urlopen from csv import DictReader from functools import partial from collections import namedtuple from rich ...
import requests import jesse.helpers as jh from jesse import exceptions from .interface import CandleExchange class Binance(CandleExchange): def __init__(self) -> None: super().__init__('Binance', 1000, 0.5) self.endpoint = 'https://www.binance.com/api/v1/klines' def init_backup_exchange(sel...
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import importlib import os import warnings import time from dj...
from typing import Optional, List, Dict from omymodels.pydantic import templates as pt from omymodels.utils import create_model_name, type_not_found from omymodels.pydantic.types import types_mapping class ModelGenerator: def __init__(self): self.imports = set([pt.base_model]) self.t...
from utils import CSVScraper class WellandPersonScraper(CSVScraper): # https://niagaraopendata.ca/dataset/city-of-welland-mayor-and-council-members csv_url = 'https://niagaraopendata.ca/dataset/b38e2f85-bcd4-43fd-95d5-f513919514d9/resource/590c9110-01f3-4256-8ac1-9c5cbeca88c5/download/city-of-welland-mayor-an...
import math import os import shutil from copy import deepcopy from shutil import copyfile import numpy as np import pandas import tifffile import yaml from pathlib import Path from speedrun import BaseExperiment, locate from speedrun.yaml_utils import recursive_update from .cellpose_training.start_training import sta...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: Chinese_aster/protos/label_map.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf impo...
from find_factors import prime_factors from product import product def totient(num): """ Counts the numbers that are relative prime to the number. This means that if a number 'x' has common divisors with another number 'a' lower than itself, it is, 'a' is not relative prime to 'x'. This means that...
import random import hashlib import string from colorama import Fore, Back, Style from pathlib import Path """ Some limitations: The junk code must be added at the beginning of the source file You must write junk code from bottom to top, aka first junk calls, then junk definition, from the bottom up. """ ...
from django.conf.urls import url from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django.contrib.staticfiles import finders from django.contrib.auth import get_permission_codename from django.utils.functional import cached_property from widgy import registry from wi...
"""Tests for the templatetags of the ``project-kairos`` project.""" from mock import Mock, patch from django.contrib.contenttypes.models import ContentType from django.template import Context, Template from django.test import RequestFactory, TestCase from .factories import SiteFactory from ..templatetags import libs_...
import os import cv2 import numpy import numpy as np from skimage import transform import PIL.Image import torch path_to_images = r'./result/inference_inversions/' path_to_inv_params = r'result/npy/integrated_affine.npy' inv_M = np.load(path_to_inv_params) files = os.listdir(path_to_images) files.sort() # idx = 0 for...
import urllib.request from invoke import task import json import os import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) def download_releases(base_dir, repo, target_dir): if not base_dir: ...
import rpyc import threading def connect_and_call(): c = rpyc.connect("172.17.0.2", 18861) print(c.root.get_answer()) t = threading.Thread(target=connect_and_call) t.start() print('client start...') input('any key')
# Generated by Django 3.0.5 on 2020-06-09 14:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('theblog', '0006_auto_20200604_0823'), ] operations = [ migrations.AddField( model_name='post', name='snippet', ...
import FWCore.ParameterSet.Config as cms hltAK8PFJets = cms.EDProducer("FastjetJetProducer", Active_Area_Repeats = cms.int32(1), GhostArea = cms.double(0.01), Ghost_EtaMax = cms.double(5.0), Rho_EtaMax = cms.double(4.4), applyWeight = cms.bool(False), doAreaDiskApprox = cms.bool(False), doA...
import warnings warnings.filterwarnings('ignore', category=FutureWarning) warnings.filterwarnings('ignore', category=FutureWarning) warnings.filterwarnings('ignore', category=DeprecationWarning)
# Copyright (c) 2015-2016 Tigera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
import os from pathlib import Path import pytest import prefect examples_dir = str(Path(__file__).parents[1] / "examples") def test_examples_exist(): assert os.path.exists(examples_dir) assert len(os.listdir(examples_dir)) > 0
# -*- coding: utf8 -*- import boto3 import mock import os import unittest try: from mock import patch except ImportError: from unittest.mock import patch from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, \ ...
# -*- coding: utf-8 -*- # # Please do not manually edit this file. # # It has been generated by MetaTools/generate_glyphdata.py using # upstream data from https://github.com/schriftgestalt/GlyphsInfo/ # taken at commit hash e33ccf3515cc5b8005a3a50b4163663623649d20. # # # The MIT License (MIT) # # Copyright (c) 2016 Geo...
class Animal: def __init__(self,name,qty): self.name = name self.qty = qty a=Animal("cat",4) print(a.name) print(a.qty)
import asyncio import tempfile from io import BytesIO import shutil import os from lbry.blob_exchange.serialization import BlobRequest from lbry.testcase import AsyncioTestCase from lbry.conf import Config from lbry.extras.daemon.storage import SQLiteStorage from lbry.blob.blob_manager import BlobManager from lbry.bl...
# -*- coding: utf-8 -*- """Django settings for kitsune project.""" import logging import os import platform import re from datetime import date import dj_database_url import django_cache_url from decouple import Csv, config from kitsune.lib.sumo_locales import LOCALES from .bundles import PIPELINE_JS DEBUG = confi...
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# Copyright 2014 PerfKitBenchmarker 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 appli...
import os from pickle import TRUE from flask import config class Config: SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://moringa:1234@localhost/blogs' SECRET_KEY = 'SECRET_KEY' SQLALCHEMY_TRACK_MODIFICATIONS = False UPLOADED_PHOTOS_DEST ='app/static/photos' MAIL_SERVER = 'smtp.googlemail.com' ...
import os from model import get_personlab from tf_data_generator import * from config import config from keras.models import load_model from keras.utils import multi_gpu_model from keras.optimizers import Adam from keras.callbacks import LambdaCallback from keras import backend as KB from polyak_callback import Polya...
import sys import logging import argparse import numpy as np from quilted.h5blockstore import H5BlockStore def main(): logger = logging.getLogger('quilted.h5blockstore') logger.setLevel(logging.INFO) logger.addHandler(logging.StreamHandler(sys.stdout)) parser = argparse.ArgumentParser() parser.add...
"""set_defaults_and_nullables Revision ID: a179e5ca0ad2 Revises: 480e6618700d Create Date: 2020-01-13 13:43:44.679965 """ from typing import List from alembic import op import sqlalchemy as sa from sqlalchemy import create_engine, inspect, Table, MetaData from sqlalchemy.dialects.postgresql import TEXT from contess...
# -*- coding: utf-8 -*- # # Erstellt von Martin Gutmair # modified 04.05.2011 from django.db import models from hasi.devices.models import Subdevice from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from datetime import datetime # Jede Klasse bekommt die Werte created...
import telegram from emoji import emojize from .base import MenuMessageBase class PeriodMenuMessage(MenuMessageBase): """ Send "Salary income period" menu. Define set of buttons: "Year", "Month", "Day", "Hour". """ ITEMS = tuple( ("period{0}".format(p.capitalize()), p) for p in (...
# list() constructor thislist = list(("apple", "banana", "cherry")) print(thislist) # ['apple', 'banana', 'cherry'] thislist = list("banana") print(thislist) # ['b', 'a', 'n', 'a', 'n', 'a']
# Example for creating your program by specifying buffers to send, without relaying on pcap file from trex.astf.api import * import argparse # we can send either Python bytes type as below: http_req = b'GET /3384 HTTP/1.1\r\nHost: 22.0.0.3\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; W...
from ._pulse_generator import pulse_generator from kea.test_utils.base_test import ( KeaTestCase, KeaVivadoVHDLTestCase, KeaVivadoVerilogTestCase) import random from myhdl import * def test_args_setup(): ''' Generate the arguments and argument types for the DUT. ''' clock = Signal(False) reset ...
# Copyright 2016-2021, Pulumi 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 t...
import logging from os import path import pandas as pd """ A Class storing information about the specific PointFinder database. """ logger = logging.getLogger('PointfinderDatabaseInfo') class PointfinderDatabaseInfo: def __init__(self, database_info_dataframe, file=None): """ Creates a new Poi...
""" Definition of losses in a neural network. Yujia Li, 09/2014 """ import gnumpy as gnp import math _SMALL_CONSTANT = 1e-20 def convert_to_garray(x): if isinstance(x, gnp.garray): return x else: return gnp.garray(x) def safe_log(x): return gnp.log(x + _SMALL_CONSTANT) class Loss(objec...
import obspy import read_event_obspy_file as reof from getwaveform import * def get_ev_info(ev_info,iex): # =============================================================== # SilwalTape2016 example event (Anchorage) -- python run_getwaveform.py event_input 0 if iex == 0: ev_info.use_catalog = 0 # d...
import mi import wmi # This sample describes the usage of custom operation options # by creating a nic team. conn = wmi.WMI(moniker='root/standardcimv2') def new_lbfo_team(team_members, team_name): obj = conn.MSFT_NetLbfoTeam.new() obj.Name = 'nic_team' custom_options = [ {'name': 'TeamMembers', ...
# -*- coding:utf-8 -*- """ Verion: 1.0 Since : 3.6 Author: zhangjian Site: https://iliangqunru.bitcron.com/ File: cli Time: 2018/12/18 Add New Functional cli """ import argparse import os import io from weibo_base import rt_logger from samples import tweets_persistence def cli(): """weibo-cli""" ...
# # Copyright (C) 2017 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
from daemon import _get_app from daemon.config import jinad_config def test_get_app_flow(monkeypatch, common_endpoints, flow_endpoints): monkeypatch.setattr(jinad_config, 'CONTEXT', 'flow') routes = [(route.name, route.path) for route in _get_app().routes] assert sorted(routes) == sorted(common_endpoints ...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from unittest import mock from unittest.mock import Mock, patch from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage from django.test.utils import override_settings from django.uti...
''' Code to build CONFIG/FIELD from layound files ''' import copy import random import numpy as np from dlpoly.field import Field from dlpoly.config import Config from dlpoly.utility import parse_line, read_line from .cfgLoader import CFG class System: keywords = ('cell', 'include', 'potential') def __init__(...
""" Custom django checks. H001: Field has no verbose name. H002: Verbose name should use gettext. H003: Words in verbose name must be all upper case or all lower case. H004: Help text should use gettext. H005: Model must define class Meta. H006: Model has no verbose name. H007: Model has no ...
from copy import deepcopy from typing import Dict, List from prepnet.executor.converter_array import ConverterArray class ConfigurationContextBase: def __init__(self, columns: List[str]): self.columns: List[str] = columns self.converters = [] def to_converter_array(self)->ConverterArray: ...
import argparse import json import os import subprocess from urllib.parse import urlparse from google.cloud import storage if __name__ == "__main__": parser = argparse.ArgumentParser(description="Fetches all the raw data for this project from Rapid Pro. " "This scr...
#!/usr/bin/env python3 # # Author: # Tamas Jos (@skelsec) # from msldap.ldap_objects.adinfo import MSADInfo, MSADInfo_ATTRS from msldap.ldap_objects.aduser import MSADUser, MSADUser_ATTRS, MSADUser_TSV_ATTRS from msldap.ldap_objects.adcomp import MSADMachine, MSADMachine_ATTRS, MSADMachine_TSV_ATTRS from msldap.ldap_...
import tvm import topi import numpy as np from tvm.contrib.pickle_memoize import memoize from scipy import signal from topi.util import get_const_tuple from topi.nn.util import get_pad_tuple import topi.testing from topi.cuda.depthwise_conv2d import schedule_depthwise_conv2d_backward_input_nhwc def verify_depthwise_c...
from ckanext.ottawa.metadata_schema.interface import MetadataSchema schema_description = MetadataSchema()
"""Contains a collection of tools to save to netcdf. These include: * converting to xarray * adding global attributes * adding variable attributes * adding metadata * saving to netcdf """ import datetime import numpy as np import xarray as xr class EcoFOCI_CFnc(object): """ Designed for: - Cruise ...
#!/usr/bin/env python ''' E3D Demonstrator SST planner ================================ ''' import pathlib import numpy as np import matplotlib.pyplot as plt from tabulate import tabulate from mpl_toolkits.mplot3d import Axes3D from astropy.time import Time, TimeDelta import sorts from sorts.scheduler import Track...
import json from os.path import abspath, dirname, join from datetime import datetime import tomlkit SYNTAX_DIR = abspath(dirname(join("syntaxes", __name__))) SYNTAXES = ["django-html", "django-txt"] def load(path): with open(path) as f: return tomlkit.loads(f.read()) tomlkit.load = load def build_fil...
# Copyright 2010-2015 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistrib...
# LIBTBX_SET_DISPATCHER_NAME mmtbx.screen_conformations from __future__ import absolute_import, division, print_function import iotbx.phil from libtbx.utils import Sorry from libtbx import easy_run import time import sys master_phil = iotbx.phil.parse(""" include scope mmtbx.utils.cmdline_input_phil_str selection = N...
import logging import shlex from glob import glob from pathlib import Path from typing import List, Optional, Tuple from django.db import models, transaction from ..context import c_file_to_context from ..symbol_addrs import parse_symbol_addrs, symbol_name_from_asm_file from .profile import Profile from .scratch im...
# 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...
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.core.utils import camelcase_to_underscores from moto.ec2.utils import instance_ids_from_querystring, filters_from_querystring, \ dict_from_querystring, optional_from_querystring class InstanceResponse(BaseResponse): ...
# lógica para o usuário fazer apostas import sys class UserAccount: def __init__(self, name, balance=0.0): self.name = name self.balance = balance def get_balance(self): return self.balance def insert_credits(self, amount): self.balance += amount def check_credits(...