text
stringlengths
2
999k
#!/usr/bin/env python3 import asyncio import argparse import logging import socket import binascii import time import json import aioconsole import codecs import sys import struct import os from binascii import hexlify from construct import * from ctypes import sizeof, c_int FLAG = os.getenv("FLAG", "flag{this_is_ve...
def test(): assert len(pattern1) == 2, "pattern1 should describe two tokens." assert len(pattern2) == 2, "pattern2 should describe two tokens." assert ( len(pattern1[0]) == 1 ), "The first token of pattern1 only needs one attribute." assert any( pattern1[0].get(l) == "iphone" for l i...
from Bio import SeqIO # import the Bio.SeqIO to provide a sample unique interface for the input and output assorted the sequence file from Bio.SeqRecord import SeqRecord import os # import the os modules # print the header print('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') print('**************** ') print('...
from __future__ import division, absolute_import, print_function import os import re import sys import imp import copy import glob import atexit import tempfile import subprocess import shutil import distutils from distutils.errors import DistutilsError try: from threading import local as tlocal except ImportErro...
""" virt execution module unit tests """ # pylint: disable=3rd-party-module-not-gated import datetime import os import shutil import tempfile import salt.config import salt.modules.config as config import salt.modules.virt as virt import salt.syspaths import salt.utils.yaml from salt._compat import ElementTree as E...
class script(object): START_MSG = """ <b>Hi {} I'm a Image Editor Bot which Supports various modes For more click help....</b>""" HELP_MSG = """Hai, Follow these Steps.. <code>🌀 Send me any Image to Edit..</code> <code>🌀 Select the Corresponding mode that you need</code> <code>🌀 Your Edited Image will ...
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the directory tha...
""" dlish generic generator """ class Iterator: """Generic iterator for generators.""" def __init__(self, gen, times): self.max = times self.gen = gen self.current = 0 def __iter__(self): return self def __next__(self): if self.max > 0: ...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # color # ----- @property def color(self): """ Sets themarker.linecolor. It accepts either a specific color or an array of numbers that ...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
#!/workspace/coronaAPIserver/restapiserver/venv/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
# -*- coding: utf-8 -*- """ Version code adopted from Django development version. https://github.com/django/django """ VERSION = (0, 12, 2, 'final', 0) default_app_config = 'modeltranslation.apps.ModeltranslationConfig' def get_version(version=None): """ Returns a PEP 386-compliant version number from VERSION...
# Maior e menor valor e suas poisções em uma lista numeros = list() for c in range(0, 5): numeros.append(int(input(f'Digite um valor para a posição {c}: '))) print('=-' * 25) print(f'Você digitou os valores {numeros}') nmax = max(numeros) nmin = min(numeros) if numeros.count(nmax) == 1: print(f'O maior valor f...
import asyncio import functools import os import sys from io import BytesIO from typing import Optional, Union, cast import aiohttp import discord from discord.ext import commands from PIL import Image, ImageDraw, ImageFont, ImageSequence from ..lib import BASE_DIR, Badge, Badges, ImageWriter, SimplePages, generate ...
#!/usr/bin/env python import os import shlex import subprocess from datetime import datetime import wrapper wrapper_command = "java -jar /Users/ccampbell/Veracode/Source/vosp-api-wrappers-java-19.2.5.6.jar -action uploadandscan -appname verademo-swift -createprofile false -version '{}' -filepath '{}'" def build_bc...
# 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 pandas as pd from pymongo import MongoClient from datanator_query_python.util import mongo_util from datanator_query_python.config import config class insert_neg_wo_outer_membrane(mongo_util.MongoUtil): def __init__(self, MongoDB=None, db=None, col...
import argparse import time import datetime import logging import csv from selenium import webdriver from pathlib import Path DOWNLOAD_DIR = 'C:/Users/wmilbot/GitHub/wikiscraper/media/' LOAD_MORE_PICTURES_GROUP = 15 SOURCE_URL = 'http://gpophotoeng.gov.il/' SOURCE_NAME = 'אתר לשכת העיתונות הממשלתית' DEFAULT_MAX_IM...
# -*- coding: UTF-8 -*- # !/usr/bin/python # @time :2019/6/22 7:35 # @author :Mo # @function :self Attention() from keras.regularizers import L1L2, Regularizer from keras.engine.topology import Layer from keras import backend as K class AttentionSelf(Layer): """ self attention, ...
import setuptools # Required packages dependencies = [ "numpy", "visdom" ] documentation_packages = [ "sphinx", "sphinxcontrib-napoleon", "sphinxcontrib-programoutput" ] testing_packages = [ "pytest" ] setuptools.setup( name='numpynet', version='0.0.1', author='Brad Beechler', ...
# Copyright 2011 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,...
import os import sys import logging import getpass import atexit import tempfile import threading import datetime import time import queue import pymongo import requests import ftrack_api import ftrack_api.session import ftrack_api.cache import ftrack_api.operation import ftrack_api._centralized_storage_scenario impor...
# ------------------------------------------------------------------ # Copyright (c) 2021 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE.GPL.txt, distributed with # this software. # # SPD...
pro=0 passw=input("Ingrese su Frase______") num=len(passw) passwor=passw; for i in range(0,len(passw)): if passw[i]==" ": passw=passw.replace(" ","_") print("3. Joel quiere hacer un programa que reciba una frase, cambie los espacios por un guión bajo " " y al final imprima la frase original y la alterad...
from kivymd.app import MDApp from kivymd.uix.screen import Screen from kivy.lang import Builder import helpers class DemoAPP(MDApp): def build(self): scrn = Screen() entr1 = Builder.load_string(helpers.HelpX) scrn.add_widget(entr1) return scrn DemoAPP().run(...
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import logging import os from abc import ABCMeta, abstractmethod, abstractproperty import warnings import pandas as pd from .utils import pandas_concat logger = logging.getLogger(__name__) class ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import urllib.request import os, stat import subprocess print("Downloading atom...") urllib.request.urlretrieve("https://atom.io/download/deb", "/tmp/atom-amd64.deb") os.chmod("/tmp/atom-amd64.deb", 755) subprocess.call(["sudo", "-S", "dpkg", "-i", "/tmp/atom-amd64.deb"]...
from pandac.PandaModules import OdeFixedJoint, Texture, TextureStage, Vec3 from box import Box from gameObject import GameObject from vecUtils import entrywiseMult, vecFromList, vecBasic, vecInvert, getNeutralDir class Tile(Box): def __init__(self, brick, color, tileDir, thickness, density, unglueThreshold=None, sha...
#!/usr/bin/env python2 """Main script that generates g4blgrid fields from command line inputs. Can be run as executable after using $chmod +x make_g4bl_map.py. Takes command line arguments. Example: $./make_g4bl_grid.py SSU -M1 185.0 -CC 205.7 This would output the field from SSU with M1 set at 185.0...
# Generated by Django 3.1.4 on 2021-01-02 02:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('url_shortener_app', '0004_auto_20210101_1549'), ] operations = [ migrations.AddField( model_name='longtoshort', name...
""" First-Class Functions can be passed to a function as an argument can be returned from a function can be assigned to a variable can be stored in a data structure (such as list, tuple, dictionary, etc.) Types such as INT, FLOAT, STRING, TUPLE, LIST and many more are first-class objects. Functions...
#!/usr/bin/python # # Convert instances from png files to a dictionary # This files is created according to https://github.com/facebookresearch/Detectron/issues/111 from __future__ import print_function, absolute_import, division import os, sys sys.path.append( os.path.normpath( os.path.join( os.path.dirname( __file_...
import torch from torch.utils.data import Dataset, DataLoader from torch.utils.data import random_split import torchvision import numpy as np import pandas as pd from sklearn.decomposition import NMF from deepNetworkArchitechture import * from projectUtilities import * import matplotlib matplotlib.use('Ag...
# /usr/bin/env python ''' Written by Kong Xiaolu and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md ''' import os import scipy.io as sio import numpy as np import time import torch import CBIG_pMFM_basic_functions as fc def get_init(gradient_data, highest_order, init_para): '...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Autogen with # import json # # with open("/datasets/lvis/lvis_v1_val_headv1.json", "r") as f: # a = json.load(f) # c = a["categories"] # for x in c: # del x["image_count"] # del x["instance_count"] # LVIS_CATEGORIES = repr(c) + " # noqa"...
def quart(raw): # 4 zu 2 Umwandlung if raw == [0, 1, 0, 1]: return 0 elif raw == [0, 1, 1, 0]: return 1 elif raw == [1, 0, 0, 1]: return 2 elif raw == [1, 0, 1, 0]: return 3 else: print('Error in Quart conversion', raw) return -1
import sys MEM_SIZE = 0xffff BYTE_SIZE = 0xff class SAP2Emulator: def __init__(self): self._pc = 0x0000 self._a = 0x00 self._b = 0x00 self._c = 0x00 self._s = False self._z = False self._mem = bytearray(MEM_SIZE + 1) self._halt = False self....
# maps from items to names class SymbolTable: def __init__(self, base_name): self.counter = 0 self.base_name = base_name self.entries = {} def contains(self, var): return id(var) in self.entries def insert(self, item, name=None): if name is None: name = self.base_name + str(self.counter) self.cou...
'''Implementation of Binary Search that you should know well.''' def binarySearch(arr, T): low = 0 high = len(arr) - 1 while low <= high: mid = low + (high - low) // 2 if arr[mid] < T: low = mid + 1 elif arr[mid] > T: high = mid - 1 el...
import logging import sys import time import random import command.command from core.verification import Verifier, VerificationError class KillError(Exception): pass class BaseSmokeTest: """ BaseSmokeTest is the generic implementation of the smoketest functionality This implementation is based on ...
from rest_framework import serializers from .models import Establishment class EstablishmentSerializer(serializers.ModelSerializer): class Meta: model = Establishment fields = ('name_establishment','cep','endereco', 'numero','cnpj','email')
import os, glob import numpy as np import torch from tqdm import tqdm from timeit import default_timer as timer from datetime import timedelta from utils.hyperparameters import Config from utils.plot import plot_all_data from envs.AtariEnv import PrepareAtariEnv from agents.RainbowAgent import RainbowAgent if __...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import pyaudio import wave import sys CHUNK = 1024 # Lire un son en fonction de son nom def play(name): wf = wave.open("sounds/" + name + ".wav", "rb") p = pyaudio.PyAudio() stream = p.open( format = p.get_format_from_width(wf.getsampwidth()), ...
# -*- coding: utf-8 -*- """Unit tests for Superset Celery worker""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import os import subprocess import time import unittest import pandas as pd from past.bui...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import asyncio import os import os.path import aiohttp from progress.bar import ChargingBar import simplejson as json import slugify import uvloop THUMBNAIL_NOT_FOUND = 'http://i.annihil.us/u/prod/marvel/i/mg/b/40/image_not_available' async def main(): """ Collect characters images from Marvel Do not s...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # dateutil documentation build configuration file, created by # sphinx-quickstart on Thu Nov 20 23:18:41 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
"""Auto-generated file, do not edit by hand. ST metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ST = PhoneMetadata(id='ST', country_code=239, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[29]\\d{6}', possible_number_pattern='\\...
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
import lab.torch as B import numpy as np import torch import stheno from neuralprocesses.data import GPGenerator from neuralprocesses.gnp import GNP if torch.cuda.is_available(): device = "cuda" else: device = "cpu" gen = GPGenerator(kernel=stheno.EQ().stretch(0.25) + 0.05 ** 2 * stheno.Delta()) model = GNP...
import zmq # import pmt import _thread as thread import os import json import logging import socket import time OK = "\u001b[32m" WARN = "\u001b[33m" ERR = "\u001b[31m" NORM = "\u001b[0m" """ IMPORTANT VERSION NOTE: Due to trouble importing pmt on flight computer, as well as radio inoperability at the ...
from django.shortcuts import render, redirect from .models import activeGame from .forms import GameCreatorForm from .models import locations from .forms import LocationForm from django.contrib import messages import random #Home page view def home(request): context = {} return render(request, 'game/home.html'...
import re import os def convert_text(text): #return text text = ' '.join(re.split('(\W)', text)) text = ' '.join(text.split()) return text def eval_bleu_sents(ref_file, pred_file): dir_path = os.path.dirname(os.path.realpath(__file__)) folder_data_before = dir_path + "/../utils" cmd_stri...
import _init_paths import os import argparse from copy import deepcopy from vgp.function.config import config, update_config from vgp.function.test import test_net def parse_args(): parser = argparse.ArgumentParser('Get Jointly Test Result of Cognition Network') parser.add_argument('--cfg', type=str, help='p...
from __future__ import absolute_import import logging from requests.exceptions import RequestException from sentry import options from sentry.net.http import Session from sentry.lang.native.utils import sdk_info_to_sdk_id MAX_ATTEMPTS = 3 logger = logging.getLogger(__name__) def lookup_system_symbols(symbols, sd...
# -*- coding: utf-8 -*- #import time # #from apps.oclib.client import Redis #from random import random #from functools import wraps # #NUMBER_OF_MEMBERS = 1000000 # #names = [] #scores = [] # # #def timed(f): # @wraps(f) # def wrapper(*args, **kwds): # start = time.time() # result =...
#!/usr/bin/env python3 import os import pymzml def main(): """ Testscript to highlight the function name changes in the Spectrum class. Note: Please adjust any old scripts to the new syntax. usage: ./deprecation_check.py """ example_file = os.path.join( os.path.d...
from arm.logicnode.arm_nodes import * class OnVirtualButtonNode(ArmLogicTreeNode): """Deprecated. Is recommended to use 'Virtual Button' node instead.""" bl_idname = 'LNOnVirtualButtonNode' bl_label = 'On Virtual Button' bl_description = "Please use the \"Virtual Button\" node instead" bl_icon = 'E...
# Copyright (c) OpenMMLab. All rights reserved. from .cls_head import ClsHead from .linear_head import LinearClsHead from .multi_label_head import MultiLabelClsHead from .multi_label_linear_head import MultiLabelLinearClsHead from .stacked_head import StackedLinearClsHead from .vision_transformer_head import VisionTran...
import threading import ConfigParser import fcntl import os import random import socket import string import struct import subprocess import sys import time class Utils(): @staticmethod def port_open(ip, port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex(...
import os from ..constants import IS_WINDOWS_PLATFORM from .fnmatch import fnmatch from .utils import create_archive def tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False): root = os.path.abspath(path) exclude = exclude or [] return create_archive( files=sorted(exclude_paths(root...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from pipeline.conf import settings from pipeline.core.flow.activity import Service, StaticIntervalGenerator from pipeline.component_framework.component import Component __group_name__ = _(u"自定义插件(CUS)") class Pause1Service(Service): ...
import random import logging from itertools import chain from Fill import ShuffleError from collections import OrderedDict from Search import Search from Region import TimeOfDay from Rules import set_entrances_based_rules from Entrance import Entrance from State import State from Item import ItemFactory from Hints impo...
# -*- coding:utf-8 -*- import unittest import logging import time from ..common.utils import ( next_minute, pre_day, next_day, next_trading_day, weekday, second2time, TList, ...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Biobambam2(AutotoolsPackage): """Tools for early stage alignment file processing""" h...
#!/usr/bin/env python from __future__ import print_function # This import is for python2.* import atexit import requests from pyVim import connect from pyVmomi import vim from pyVmomi import vmodl from tools import cli def get_args(): parser = cli.build_arg_parser() parser.add_argument('-d', '--datastore'...
# Copyright (c) Facebook, Inc. and its affiliates. import torch import numpy as np from collections import deque from typing import List from tridetr.utils.dist import is_distributed, barrier, all_reduce_sum def my_worker_init_fn(worker_id): np.random.seed(np.random.get_state()[1][0] + worker_id) @torch.jit.ign...
from typing import Callable from typing import Dict from typing import List from typing import Tuple import numpy as np import torch as th from syft.generic.frameworks.types import FrameworkTensorType from syft.workers.abstract import AbstractWorker from syft import exceptions hook_method_args_functions = {} hook_...
# Borrowed from https://github.com/patil-suraj/question_generation but Modified from typing import Optional, Dict, Union import itertools import logging import spacy # create spacy pipeline nlp = spacy.load("en_core_web_md") nlp.add_pipe(nlp.create_pipe('sentencizer')) import torch from transformers import( AutoM...
"""Git-related utilities.""" from __future__ import absolute_import import re import logging import csv import os from builtins import bytes, str # pylint: disable=redefined-builtin from readthedocs.projects.exceptions import ProjectImportError from readthedocs.vcs_support.base import BaseVCS, VCSVersion from futu...
# Copyright 2014 Rackspace US, 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...
from django.core.management.base import BaseCommand from django.apps import apps ''' commands - create django command that prints all models and object counts. ''' class Command(BaseCommand): help = 'Return info about all models and count its objects' def handle(self, *args, **options): models = app...
from inaugurator.server import config import threading import logging import pika import simplejson import json import os import signal import pikapatchwakeupfromanotherthread _logger = logging.getLogger('inaugurator.server') class Server(threading.Thread): def __init__(self, checkInCallback, doneCallback, progr...
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
from keras.models import Model from keras.layers import Input,Conv2D,Dense,Activation,MaxPooling2D,Flatten import keras.objectives import numpy as np import tensorflow as tf import keras.backend as K import data.wider_data as wider_data from keras.utils.np_utils import to_categorical def cls_loss(y_true,y_pred): p...
# Copyright 2017 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from hy.importer import (import_file_to_module, import_buffer_to_ast, MetaLoader, get_bytecode_path) from hy.errors import HyTypeError import os import ast impor...
import json import http import typing import uuid from requests_toolbelt import MultipartDecoder, MultipartEncoder from requests.exceptions import HTTPError from hyper import HTTP20Connection class ConnectionManager: host = 'avs-alexa-na.amazon.com' connection = None def create_connection(self): ...
from mitmproxy import utils from . import tutils utils.CERT_SLEEP_TIME = 0 def test_pkg_data(): assert utils.pkg_data.path("console") tutils.raises("does not exist", utils.pkg_data.path, "nonexistent") def test_LRUCache(): cache = utils.LRUCache(2) class Foo: ran = False def gen(s...
from flask import Flask import os app = Flask(__name__) @app.route("/") def pagina_inicial(): return "Hello World - GabyDias" if __name__ == '__main__': port = os.getenv('PORT') app.run('0.0.0.0', port=port)
# This file is part of Androguard. # # Copyright (C) 2013, Anthony Desnos <desnos at t0t0.fr> # 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...
######## # Copyright (c) 2014-2020 GigaSpaces Technologies Ltd. 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 otp.otpbase import OTPGlobals from otp.ai.AIBase import * from toontown.toonbase import ToontownGlobals from direct.distributed.ClockDelta import * from .ElevatorConstants import * from direct.distributed import DistributedObjectAI from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.t...
#! /usr/bin/env python import sys import argparse import re from pprint import pprint from datetime import date from pathlib import Path from shutil import copytree, copy2 from typing import TypeVar, List import pandas as pd import numpy as np import time import json from hubmap_commons.globus_groups import get_globu...
#------------------------------------------------------------------------------ # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ class OperatorContext(dict): """ The Enaml operator context which provides the binding operat...
from flask import Flask, jsonify, request from flask.views import MethodView from jsonschema import validate app = Flask(__name__) app.config['JSON_AS_ASCII'] = False User = [] User_Schema = { "title": "User", "description": "用户", "type": "object", "properties": { "name": { "descri...
""" Django settings for platzigram project. Generated by 'django-admin startproject' using Django 2.0.7. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os...
import numpy as np import math as m def transpose(Q): for i in range(0,4): for j in range(0,i): copy = Q[i][j] Q[i][j] = Q[j][i] Q[j][i] = copy return Q A = np.array([[1, 0], [1, 1], [1, 2], [1,3]]) b = np.array([[3],...
# 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 swig_derive_test as sdt t = sdt.Test() assert t.get_field() == 0 t = sdt.Test(12) assert t.get_field() == 12 assert sdt.different_test().get_field() == 42 assert sdt.manual_extern() == 13 print("It works!")
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import wagtail.images.models class Migration(migrations.Migration): dependencies = [ ('core', '0020_data_migration_to_fill_filter_spec_to_prepare_for_wagtail_1_8'), ] operations = [ ...
import typing # noqa: F401 import datetime as _datetime # noqa: F401 from kubernetes import client # noqa: F401 from kuber import kube_api as _kube_api # noqa: F401 from kuber import definitions as _kuber_definitions # noqa: F401 from kuber import _types # noqa: F401 from kuber.v1_19.meta_v1 import LabelSelecto...
from typing import Dict # noqa from urllib.parse import parse_qs from urllib.parse import urlencode from urllib.parse import urlparse import pytest import responses from oic import rndstr from oic.exception import AuthzError from oic.oauth2.consumer import Consumer from oic.oauth2.consumer import factory from oic.oa...
import ctypes from objc_util import c, ObjCClass, ObjCInstance import ui from .renderer import Renderer #from .gameScene import GameScene from .landscapeScene import LandscapeScene wenderlichGreen = (0.0, 0.4, 0.21, 1.0) skyBlue = (0.66, 0.9, 0.96, 1.0) class MetalView: def __init__(self, bounds): self.devic...
import contextlib import datetime import io import os import marshal import pathlib import shutil import signal import subprocess import sys import tempfile import textwrap import time import typing import components from components._impl.workers import base from components._impl.workers import subprocess_rpc class ...
file = open('./input') def buildPermutations(nums): if len(nums) == 1: return [nums] total = [] for i in range(len(nums)): total.extend([subperm + [nums[i]] for subperm in buildPermutations(nums[:i] + nums[i + 1:])]) return total def runProgram(nums, phases): ...
# 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...
from django.db import models from mongoengine import Document, fields # Create your models here. class Profile(Document): name = fields.StringField(max_length=200, null=True) age = fields.IntField(null=True) def __str__(self): return self.name
from sqlalchemy import Boolean, Column, Integer, String from sqlalchemy.orm import relationship from abing.db.base_class import Base class User(Base): id = Column(Integer, primary_key=True, index=True) name = Column(String) email = Column(String, unique=True, index=True, nullable=False) password = Co...
#!/usr/bin/env python from pauxy.analysis import blocking import glob import sys import pandas as pd start_time = float(sys.argv[1]) files = glob.glob(sys.argv[2:][0]) data = blocking.analyse_simple(files, start_time) pd.options.display.float_format = '{:,.8e}'.format print (data) # print (data[['E', 'EKin', 'EKin_e...