content
stringlengths
5
1.05M
import re if __name__ == '__main__': vowels = "aeiou" consonants = "qwrtypsdfghjklzxcvbnm" matcher = re.findall(r"(?<=[%s])([%s]{2,})[%s]" % (consonants, vowels, consonants), input(), flags = re.I) print('\n'.join(matcher or ['-1']))
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify import datetime as dt # Database / ORM setup engine = create_engine("sqlite:///Resources/hawaii.sqlite") # reflect an ...
# Copyright (c) 2021 War-Keeper import discord from discord.ext import commands import os import csv # ----------------------------------------------------------- # This File contains commands for joining a group, leaving a group, # and displaying which groups are available # -----------------------------------------...
import scrapeLinks import pandas as pd #base_path = 'https://www.tabletennisdaily.com/forum/forumdisplay.php?102-Rubbers' #base_path='https://www.tabletennisdaily.com/forum/forumdisplay.php?164-Butterfly' base_path = 'https://www.tabletennisdaily.com/forum/forumdisplay.php?177-Tibhar' for i in range(1,3): page_pa...
# Generated by Django 2.0.1 on 2018-02-02 13:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0004_auto_20180202_1048'), ] operations = [ migrations.RenameField( model_name='user', old_name='is_active', ...
import json import uuid from django.utils import timezone from pathvalidate import sanitize_filename from ..aws import sign_upload, sign_download, s3_copy, s3_delete, s3_update_and_return_size from ..models import File, GroupUser # ํด๋”/ํŒŒ์ผ ๋ชฉ๋ก def list_item(request): # Check Login if request.user_id is None: ...
from peri import states, runner from peri.comp import ilms, objs, comp, exactpsf def makestate(im, pos, rad, slab=None, mem_level='hi'): """ Workhorse for creating & optimizing states with an initial centroid guess. This is an example function that works for a particular microscope. For your own ...
#!/usr/bin/env python import rospy from std_msgs.msg import String from rfid_node.msg import TagReading def tagCallback(lastTag): global tag_pub timest = lastTag.timestamp.secs * 1000 + lastTag.timestamp.nsecs / 1000000 higher = (timest) >> 32 lower = timest - ((higher >> 32) << 32) fields = ['0...
# ----------------- # settings pw = ph = 500 amount = 36 threshold = .98 # a value between 0 and 1 st_w = 3 ele_s = pw / (amount + 2) # ----------------- # drawing newPage(pw, ph) translate(ele_s*1.5, ele_s*1.5) fill(None) stroke(0) strokeWidth(st_w) lineCap('round') for x in range(amount): for y in rang...
import os import numpy as np import json from PIL import Image import preprocessing import utilities import postprocessing import time import matplotlib.pyplot as plt import ip_algorithms as ipa def compute_convolution(I, T, stride=(None, None), pixel_group=None, img_name=''): ''' This function takes an image...
import jsonschema from base64 import urlsafe_b64encode from datetime import timedelta from marshmallow import Schema, fields, post_load from marshmallow.exceptions import ValidationError from zeus.models import Hook from zeus.utils import timezone from zeus.providers import InvalidProvider, get_provider, VALID_PROVI...
from typing import Dict, Union, TYPE_CHECKING if TYPE_CHECKING: import numpy import pandas import pyarrow DataBatchType = Union[ "numpy.ndarray", "pandas.DataFrame", "pyarrow.Table", Dict[str, "numpy.ndarray"] ]
#!/usr/bin/env python # coding=utf-8 # # File: StickyNotes/src/python/setup.py # Author: Hankso # Webpage: https://github.com/hankso # Time: Sat 29 Feb 2020 04:21:01 PM CST from setuptools import setup setup( name = 'stickynotes', version = '1.0.0', url = 'https://github.com/hankso/S...
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def home(request): return HttpResponse('Alรด, mundo')
#!/usr/bin/env python import sys from test_support import verbose import string_tests # UserString is a wrapper around the native builtin string type. # UserString instances should behave similar to builtin string objects. # The test cases were in part derived from 'test_string.py'. from UserString import UserString i...
""" Authorize actions. """ import falcon from talons.auth import middleware from dgi_repo.auth.drupal import SiteBasicIdentifier as Identifier from dgi_repo.auth.drupal import authenticate as drupal_auth from dgi_repo.auth.system import (authenticate as system_authenticator, Authorize...
""" Dechat - Distributed, Encrypted CHAT client """ from . import errors, messaging, user
from __future__ import absolute_import from .htchirp import HTChirp, condor_chirp
# -*- encoding: utf-8 -*- from openerp import http from openerp.http import request import json try: import httplib except ImportError: import http.client as httplib import logging _logger = logging.getLogger(__name__) class tmalljd_callback(http.Controller): @http.route(['/tmalljd_callback/jd'], type='ht...
import pytest from starlette.testclient import TestClient from .fastapi_app import app, deps, Inner, ContextLoaded def test_request_singletons_are_the_same_within_a_request_context(): client = TestClient(app) response = client.get("/") data = response.json() assert data["outer_one"] == data["outer_tw...
#!/usr/bin/env python3 """ Pre-processing pipeline for Beehive Dataset Train/Val Set - Hive 3 Test Set - Hive 1 https://zenodo.org/record/2667806 """ import copy import logging from typing import Any, Dict import hearpreprocess.pipeline as pipeline from . import beehive_states_fold0 logger = logging.getLogger("luig...
""" Counting Organizations This application will read the mailbox data (mbox.txt) and count the number of email messages per organization (i.e. domain name of the email address) using a database with the following schema to maintain the counts. +-----------------------------------------------+ | CREATE TABLE ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-28 13:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0003_auto_20170221_1632'), ] operations = [ migrations.AlterFiel...
""" ========================================================== Generalized Canonical Correlation Analysis (GCCA) Tutorial ========================================================== In this tutorial we demonstrate the use of GCCA to uncover latent correlated information across views when we have more than 2 views. In t...
import os import fnmatch import sqlite3 import json import csv from utils import dataset_params_to_search import logging from twarc import json2csv import zipfile from flask import current_app from flask_mail import Mail, Message logger = logging.getLogger(__name__) def generate_tasks(self, task_defs, dataset_params...
import os def ensure_directory_exists(path): try: os.mkdir(path) except OSError: pass #print ("Creation of the directory %s failed" % path) #probably it already exists
#!/usr/bin/env python3 # Module Docstring """ REST API EXCEPTION CLASS This module would account for all possible exceptions for REST API testing. """ # Create a custom exception class class StringSpaceException(Exception): """Custom exception to handle spaces in string""" pass
"""delete link field Revision ID: f3a6881426d7 Revises: 20abd4a1b35f Create Date: 2020-08-27 22:50:48.709969 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'f3a6881426d7' down_revision = '20abd4a1b35f' branch_labels = None ...
# -*- coding: utf-8 -*- """ Settings for running app tests when not part of another project. """ from __future__ import unicode_literals # Requred by Django, though we don't actually use the database. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }...
# -*- coding: utf-8 -*- """ Created on Tue Aug 10 15:40:38 2021 @author: E440 """ import sklearn print(sklearn.__version__) import numpy print(numpy.__version__) import scipy print(scipy.__version__) import matplotlib print(matplotlib.__version__) import pandas print(pandas.__version__) import torch print(torch...
from model.net.constrastive.text_encoder_finetune import TextEncoder from model.net.constrastive.vision_encoder_finetune import VisionEncoder from model.net.constrastive.audio_encoder_fintune import AudioEncoder import torch import config as default_config from torch import nn from model.decoder.classifier import...
from setuptools import find_packages, setup requirements = [ "numpy>=1.16", "backends", "varz>=0.5.3", "stheno", "wbml", "jax", "jaxlib", ] setup( packages=find_packages(exclude=["docs"]), python_requires=">=3.6", install_requires=requirements, include_package_data=True, )
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from core.alert import write from core.alert import warn from core.alert import info from core.alert import messages from core.compatible import check from core.compatible import version from core.compatible import os_name from core.load_modules import load_all_...
from enum import Enum class TupleEnum(tuple,Enum): pass class IntEnum(int,Enum): pass class Player(IntEnum): """ BLACK: Player that starts first. WHITE: Player that starts second. """ BLACK = 0 WHITE = 1 class RewardMethod(Enum): """ REAL: 0 = game is ongoing, +15 = Black won, -15 = White won" ...
import os import sys #! <------------------------------------------------> #* Logging script #* #* Version: 1.0 #* #! <------------------------------------------------> filepath = "" sysargvs = sys.argv def logFolderCreate(name="", filepath="F:/PythonProjectLogs"): if len(sysargvs) == ...
import torch from torch import distributed, optim import torch.nn as nn from torch.optim import Adam, lr_scheduler from utils import * from datetime import datetime import os import json import numpy as np import cv2 import torch.nn.functional as F from skimage.measure import compare_psnr, compare_ssim fr...
from collections import defaultdict def frequency_table(A): freq = defaultdict(int) for a in A: freq[a] += 1 return freq def reverse_frequency_table(A): return [(value, key) for key, value in frequency_table(A).iteritems()] def majority_element(A): l = len(A) elements = f...
# Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def averageOfLevels(self,root): result = [] q = [root] while q: total, count = 0, 0 ...
""" CCT ๅปบๆจกไผ˜ๅŒ–ไปฃ็  ็ป˜ๅ›พไปฃ็  ไฝœ่€…๏ผš่ตตๆถฆๆ™“ ๆ—ฅๆœŸ๏ผš2021ๅนด5ๆœˆ1ๆ—ฅ """ import multiprocessing # since v0.1.1 ๅคš็บฟ็จ‹่ฎก็ฎ— import time # since v0.1.1 ็ปŸ่ฎก่ฎก็ฎ—ๆ—ถ้•ฟ from typing import Callable, Dict, Generic, Iterable, List, NoReturn, Optional, Tuple, TypeVar, Union import matplotlib.pyplot as plt import math import random # since v0.1.1 ้šๆœบๆ•ฐ import sys imp...
import sys n, *h = map(int, sys.stdin.read().split()) def main(): ans = 'Yes' for i in range(n - 1, 0, -1): if h[i-1] > h[i]: h[i-1] -= 1 if h[i-1] > h[i]: ans = 'No'; break print(ans) if __name__ == '__main__': main()
# -*- coding: utf-8 -*- from flask import escape import requests import re def get_orders(installation): return [OrderListItem(order, installation.hostname) for order in requests.get(installation.api_url + "/orders", headers={"AUTHORIZATION": "Bearer %s" % installation.access_token})....
from cipher_ljt2138 import cipher_ljt2138
# Arquivo de mapeamento objeto-relacional para matรฉrias. from sqlalchemy.orm import relationship from sqlalchemy import Column, Integer, String from db import Base class Subject(Base): __tablename__ = 'subjects' id = Column(Integer, primary_key=True, autoincrement=True) code = Column(String, unique=True...
import os import sys import json from collections import OrderedDict # Updates header and binary files to local conan cache def getjson(fn): try: with open(fn) as f: return json.load(f, object_pairs_hook=OrderedDict) except FileNotFoundError as ex: print("<<== "+fn+" not found. " +...
# ยฉ2018 The Arizona Board of Regents for and on behalf of Arizona State University and the Laboratory for Energy And Power Solutions, All Rights Reserved. # # Universal Power System Controller # USAID Middle East Water Security Initiative # # Developed by: Nathan Webster # Primary Investigator: Nathan Johnson # # Versi...
"""OpenTimelineIO MLT XML adapter for use with melt.""" import opentimelineio as otio from copy import deepcopy from fractions import Fraction from xml.dom import minidom from xml.etree import ElementTree as et SUPPORTED_TIME_EFFECTS = ( otio.schema.TimeEffect, otio.schema.LinearTimeWarp, otio.schema.Fre...
from qunetsim.backends import EQSNBackend from qunetsim.components import Host from qunetsim.components import Network from qunetsim.objects import Logger from qunetsim.objects import Qubit import random import numpy as np Logger.DISABLED = True def expected_value(result_string_alice, result_string_bob, bases_string...
from asap3 import * from ase.lattice.cubic import FaceCenteredCubic from asap3.testtools import ReportTest from asap3.EMT2013Parameters import PtY_parameters from asap3.mpi import world from asap3.Internal.ParallelListOfAtoms import ParallelAtoms import numpy as np #DebugOutput("migration%d.log", nomaster=True) def p...
from __future__ import annotations import asyncio import dataclasses import datetime import logging from typing import AsyncGenerator, Optional, Union from urllib.parse import urljoin import discord from discord_slash import SlashContext from discord_slash.context import InteractionContext from ElevatorBot.database....
import os import psycopg2 from sqlalchemy import create_engine from scraper import * from heroku_credentials import * def push_to_heroku(df: pd.DataFrame) -> None: """ Functions takes a dataframe as an argument, then connects to a Heroku Postgres database. In the database it creates two tables pushes the ...
import torch as th import torch.nn as nn import torch.nn.functional as F class VFun(nn.Module): def __init__(self, args): super(VFun, self).__init__() self.args = args self.fc1 = nn.Linear(args.state_dim, args.hidden_dim) self.fc2 = nn.Linear(args.hidden_dim, args.hidden_dim) ...
def parse_api_version_header(req): if "API-VERSION" in req.headers: return req.headers["API-VERSION"] return None
import datetime import csv from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponse # Create your views here. from .models import ObjectViewed @login_required def analytics_page(request): if not request.user.is_superuser: ...
from host import host class host_hm(host): pass
#################################################################### # Copyright (c) 2019 Nobuyuki Umetani # # # # This source code is licensed under the MIT license found in the # # LICENSE file in the root directory of this...
from .utils import Config as _Config, get_logger as _get_logger # creates a global config config = _Config() # creates a global logger logger = _get_logger()
from crawlster.helpers.extract import Content class HttpResponse(object): """Class representing a http response""" def __init__(self, request, status_code, headers, body): """Initializes the http response object Args: request (HttpRequest): The request that produc...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import sy...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
import os,json,datetime,xlsxwriter,feedparser from cart.cart import Cart from phantomapp import forms from phantomapp.models import * from django.contrib import messages from django.core.mail import EmailMessage from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.shortcu...
#! /usr/bin/env python # -*- coding: UTF-8 -*- #------------------------------------------------------------------------------ import sys, os, subprocess #------------------------------------------------------------------------------ #--- Get script absolute path scriptDir = os.path.dirname (os.path.abspath (sys.ar...
#-*-coding:utf-8-*- """ @FileName: wire_net.py @Description: wire net class for behavior-driven simulation @Authors: Hanbo Sun(sun-hb17@mails.tsinghua.edu.cn) @CreateTime: 2022/05/07 17:20 """ from mnsim_noc.utils.component import Component from mnsim_noc.Wire.base_wire import BaseWire class WireNet(Co...
import numpy as np import tfgraph import os def test_ranking(): np.testing.assert_array_equal( tfgraph.Utils.ranked(np.array([[1, 3, 2, 4]])), np.array([[0, 2, 1, 3]])) def test_save(): file_name = 'proof.csv' init = np.array([[0, 0.5], [1, 0.5]]) tfgraph.Utils.save_ranks(file_name, init) end = n...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
from operator import add from app.models import Address def test_address(test_client, database): """ GIVEN a Address model WHEN a new Address is created THEN check the city, addressLine, zipcode """ addr = Address(city = "Delhi",addrLine = "C-28,Model Town-3",zipCode = "110009") ...
def readfile(filename): f = open(filename, 'r') message = f.read() f.close() return message def writefile(filename, message): f = open(filename, 'w') f.write(message) f.close()
""" This City Energy Analyst plugin is used to automate a number of parallelized simulations of the same scenario for a single building, based on variable input stochastic distributions. An output file is produced, which saves main inputs and outputs from each iteration. """ import numpy as np import pandas as pd impo...
from django.shortcuts import render from accounts.serializers import ProfileSerializer from rest_framework import generics, permissions from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.renderers import JSONRenderer from .models import Profile from django.http imp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os from glob import glob import numpy as np import random from scipy.ndimage import distance_transform_edt as distance import torch from monai.data import CacheDataset, DataLoader from monai.transforms import ( AddChannelD, Compose, LoadImageD, Resi...
import attr @attr.s class ResolvedDependencies(object): all_resolved_dependencies = attr.ib() resolved_dependencies = attr.ib() resolved_dependencies_by_group = attr.ib()
"""JointVAE Learning Disentangled Joint Continuous and Discrete Representations http://arxiv.org/abs/1804.00104 """ from typing import Dict import torch from torch import nn, Tensor from torch.nn import functional as F import pixyz.distributions as pxd import pixyz.losses as pxl from .base import BaseVAE from ..l...
# -*- coding: utf-8 -*- """ Created on Sat Nov 20 10:58:17 2021 @author: JohnZhong """ import random def generate_ramdon_list(n): L = [] i = 1 while i<=n: L.append(random.randint(1,n)) i += 1 return L def bubble_sort(L): n = len(L) if n == 1 or n==0: return L else: ...
from anki.hooks import addHook from PyQt5.QtWidgets import * from .mindmap_creator_dialog import show as show_dialog def main(): addHook('browser.setupMenus', lambda self: setup_menu(self)) def setup_menu(self): # self is an aqt.browser.Browser instance self.menuTags = QMenu("Mindmap") self.menuBa...
import os import logging import configparser import shutil import subprocess import re import time def config_logger(workspace): logger = logging.getLogger('root') logger.setLevel(logging.INFO) fmt = logging.Formatter('[%(asctime)s]%(filename)s:%(lineno)d:[%(levelname)s]: %(message)s') file_handler = ...
# -*- coding: utf-8 -*- # for localized messages from __future__ import print_function from __future__ import absolute_import from .__init__ import _ import Components.Task from enigma import eTimer from Components.config import config from Plugins.Plugin import PluginDescriptor from .NetworkBrowser import NetworkBrow...
import numpy as np import pandas as pd from shapely.geometry import Point from soli.utilities.geometry.geometry import rotateAroundOrigin from soli.utilities.geometry.polygon import Polygon from soli.utilities.geometry.rectangle import Rectangle from soli.utilities.math.general import getGoldenestFactor, getDivisorsAn...
from __future__ import unicode_literals import re from decimal import Decimal import ply.yacc as yacc from .ast import Comparison, Const, Expression, List, Logical, Name from .compat import binary_type, text_type from .exceptions import DjangoQLParserError from .lexer import DjangoQLLexer unescape_pattern = re.com...
from JumpScale import j from .WatchdogClient import * j.base.loader.makeAvailable(j, 'tools.watchdog') j.tools.watchdog.client=WatchdogClient()
class Student: def __init__(self): self.id = 124 self.name = "Krishal" # To mark the variables as private, include the two underscores __ at the beginning. self.__Id = 134 self.__Name = "LOL" # To display the private variables: def display(self): print(self._...
from logging import getLogger from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.postgres import search as s from django.contrib.postgres.indexes import GinIndex from django.db import models as m from django.dispatch import re...
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PR...
""" 737. Sentence Similarity II Medium We can represent a sentence as an array of words, for example, the sentence "I am happy with leetcode" can be represented as arr = ["I","am",happy","with","leetcode"]. Given two sentences sentence1 and sentence2 each represented as a string array and given an array of string pa...
# -*- coding: utf-8 -*- import re from modules import constants from modules.part3_commands import tpm2_part3_handle_process_templates from modules.file_handling import FileHandling from modules import utils import settings class HandleProcess: """ """ def __init__(self): self.file = None ...
from cx_Freeze import setup, Executable import os os.environ['TCL_LIBRARY'] = r'C:\Users\berjan\AppData\Local\Programs\Python\Python36-32\tcl\tcl8.6' os.environ['TK_LIBRARY'] = r'C:\Users\berjan\AppData\Local\Programs\Python\Python36-32\tcl\tk8.6' setup(name = 'KiCAD_PLE', version = '18.0.2', description = 'Parts...
# -*- coding: utf-8 -*- __version__ = '0.1' from flask import Flask from app.ext import database, login app = Flask('app') app.config['UPLOAD_FOLDER'] = 'app/static/uploads' app.config.from_pyfile('../config.cfg') database.configure(app) login.configure(app) from app.controllers import *
import torch, torchvision print(torch.__version__,torch.cuda.is_available()) device = torch.device("cuda") torch.cuda.empty_cache() import warnings warnings.filterwarnings("ignore") import numpy as np import random import pandas as pd import os import sys from matplotlib import pyplot as plt import cv2 from PIL impo...
# I am currently testing annotations ### Let's start with some HAL code... """ 2013-01-04 This was made way after SR1 and SR2 Idea: Self-parsing AST Currently it is just a lexer, parser and generator """ #import os #import copy #import datetime #@const mypi float 3.2 #@fun put #@arg t String def...
"""implementations of simple readline edit operations just the ones that fit the model of transforming the current line and the cursor location based on http://www.bigsmoke.us/readline/shortcuts""" from bpython.lazyre import LazyReCompile import inspect INDENT = 4 # TODO Allow user config of keybindings for these ...
''' Problem statement: Create a function that receives a non-negative integer and returns the factorial of that number. Problem Link: https://edabit.com/challenge/PNbsQzmDR3CJ9JHkB ''' def factorial(n): #function that returns the factorial of the number if n==0: return (1) else: f=1 ...
import pandas as pd import numpy as np from redcap import Project, RedcapError import json #Using the URL and API to connect to Project 1 using the RedCAP API url_p1 = 'https://redcap.duke.edu/redcap/api/' api_p1 = '' project1 = Project(url_p1, api_p1) #Using the URL and API to connect to Project 2 using ...
arr=[7,10,8,11,9,12] for num in range(0,len(arr),2): print(arr(num))
from cobra.model.fv import RsProv, RsCons from cobra.model.l3ext import Out, InstP from createRoutedOutside import input_key_args as input_routed_outside from createExternalNetwork import input_key_args as input_external_network_epg_name from createMo import * DEFAULT_QOS = 'unspecified' DEFAULT_MTACH_TYPE = 'Atleas...
import gdsfactory as gf from gdsfactory.components.bend_euler import bend_euler from gdsfactory.components.contact import contact_heater_m3 from gdsfactory.components.coupler_ring import coupler_ring as _coupler_ring from gdsfactory.components.straight import straight as _straight from gdsfactory.types import Component...
import cv2 import os from PIL import Image import imageUtils def getFPS(video): return video.get(cv2.CAP_PROP_FPS) def processVideo(videoPath, fileName, path, bold): video = cv2.VideoCapture(videoPath) hasSeenTheLight = False success,image = video.read() FPS = getFPS(video) frames = int(video...
# -*- coding: UTF-8 -*- #!/usr/bin/env python # ----------------------------------------------------------------------------- # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens & Font Bureau # www.pagebot.io # # P A G E B O T # # Free to use. Licensed under MIT conditions # # Supporting usa...
#!/usr/bin/python # -*- coding: utf-8 -*- #===================================# # File name: # # Author: Vitor dos Santos Batista # # Date created: # # Date last modified: # # Python Version: 2.7 # #===================================# import evolgen as egg """ pop_size = 100 ind_size = 100 ind_rang...
from typing import Optional, Tuple import jwt from pydantic import BaseModel, validator from .misc import now_epoch class JWTBaseModel(BaseModel): """Base class to manage JWT The pydantic model fields are the data content of the JWT. The default expiration (exp) is set to 900 seconds. Overwrite the Cla...
# Copyright 2018 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 applicab...
num = int(input('Digite o 1ยฐ termo: ')) razao = int(input('razรฃo: ')) decimo = num + (10 - 1) * razao for c in range(num, decimo + razao, razao): print('{}'.format(c), end='--') print('ACABOU')
import logging import docker # http://docker-py.readthedocs.io/en/1.10.0/api/ def _connect( connection_paramaters ): try: host = connection_paramaters[ 'host' ] except KeyError: raise ValueError( '\'host\' is required' ) logging.debug( 'docker: connecting to docker at "{0}"'.format( host ) ) return ...