content
stringlengths
5
1.05M
#!/usr/bin/env python3 # Test whether a client subscribed to a topic receives its own message sent to that topic, for long topics. from mosq_test_helper import * def do_test(topic, succeeds): rc = 1 mid = 53 keepalive = 60 connect_packet = mosq_test.gen_connect("subpub-qos0-test", keepalive=keepalive...
import numpy as np from pydeeprecsys.rl.agents.agent import ReinforcementLearning from typing import Any, List, Optional from pydeeprecsys.rl.experience_replay.experience_buffer import ExperienceReplayBuffer from pydeeprecsys.rl.experience_replay.buffer_parameters import ( ExperienceReplayBufferParameters, ) from p...
# -*- 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...
from source.exceptions.not_found import NotFoundException from source.repositories.player_tournament import PlayerTournamentRepository import source.commons.message as message class PlayerTournamentBusiness: def __init__(self): self.player_tournament_repository = PlayerTournamentRepository() def fin...
from datetime import datetime from pathlib import Path from typing import Optional, Tuple, Union, Sequence, List from pydantic import BaseModel, validator class MdocSectionData(BaseModel): """Data model for section data in a SerialEM mdoc file. https://bio3d.colorado.edu/SerialEM/hlp/html/about_formats.htm ...
from logging import getLogger from typing import List from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.orm import backref, relationship from app.models import orm from app.settings import env_settings logger = getLogger(__name__) class Acto...
import numpy as np import pandas as pd import os import sklearn from sklearn.decomposition import PCA import matplotlib.pyplot as plt # normalize numerical columns # one-hot categorical columns def get_data(classification=True, regression=False, download=False): url = 'https://raw.githubusercontent.com/Shane-Nee...
import logging, sys, os, json, uuid from datapackage_pipelines.wrapper import ingest, spew from datapackage_pipelines.utilities.resources import PROP_STREAMING CLI_MODE = len(sys.argv) > 1 and sys.argv[1] == '--cli' if CLI_MODE: logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logg...
#!/usr/bin/python import logging import os import json import io import uuid # -------------------------------------------------------------------------------------- # Save this code in file "process_wrapper.py" and adapt as indicated in inline comments. # # Notes: # - This is a Python 3 script. # - The inputs will...
from spec2wav.modules import Generator, Audio2Mel, Audio2Cqt from pathlib import Path import yaml import torch import os def get_default_device(): if torch.cuda.is_available(): return "cuda" else: return "cpu" def load_model(spec2wav_path, device=get_default_device()): """ Args: ...
from app import app app.run('0.0.0.0')
import concurrent.futures as cf import numpy as np from multiprocessing import cpu_count from tqdm import tqdm from worms.util import jit, InProcessExecutor from worms.search.result import ResultJIT from worms.clashgrid import ClashGrid def prune_clashes( ssdag, crit, rslt, max_clash_check=-1,...
import os # os.environ["CUDA_VISIBLE_DEVICES"] = "0" from ResNet import ResNet import argparse from utils import * import time from common.utils import allocate_gpu def find_next_time(path_list, default=-1): if default > -1: return default run_times = [int(path.split('_')[0]) for path in path_list] ...
#!/usr/bin/env python # Copyright (C) 2015 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this li...
import os,sys model = sys.argv[1] stamp = int(sys.argv[2]) lr = float(sys.argv[3]) dropout = float(sys.argv[4]) bsize = int(sys.argv[5]) filein = 'test_result/' + model + '_' + str(dropout) + '_' + str(lr) + '_x_test.npy' fileout = 'test_result/' + model + '_' + str(dropout) + '_' + str(lr) + '_x_test_' + str(stamp) ...
from tkinter import * from tkinter.ttk import Combobox from qiskit import IBMQ import qiskit import math # THIS PART IS THE QUANTUM SHIT SO PUCKER YOUR BUTTHOLES _backend = qiskit.BasicAer.get_backend('qasm_simulator') _circuit = None _bitCache = '' def setqbits(n): global _circuit qr = qiskit.QuantumRegiste...
from selenium import webdriver from bs4 import BeautifulSoup import time driver = webdriver.PhantomJS() client_info_search_url = "https://xclient.info/search/s/" app_list = ["cleanmymac", "alfred", "betterzip", "beyond compare", "iina", "Navicat Premium", "charles", "DaisyDisk", "paw", "Typora"] class u...
__author__='Pablo Leal' import argparse from keras.callbacks import LambdaCallback import trainer.board as board import trainer.loader as loader import trainer.modeller as modeller import trainer.saver as saver from trainer.constans import BATCH_SIZE, CHECKPOINT_PERIOD from trainer.constans import EPOCHS from train...
# -*- coding: utf-8 -*- """ awsecommerceservice This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class ItemSearchRequest(object): """Implementation of the 'ItemSearchRequest' model. TODO: type model description here. Attributes: actor (string): TODO:...
a, b, c = map(int, input().split()) print((a+b)%c) print((a%c+b%c)%c) print((a*b)%c) print((a%c*b%c)%c)
#!/usr/bin/env python # -*- coding: utf-8 -*- #=============================================================================== from __future__ import unicode_literals #=============================================================================== def read_input(strip=True): return raw_input().strip() if strip el...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import re from typing import Any import pytest from _pytest.python_api import RaisesContext from omegaconf import DictConfig, OmegaConf from hydra._internal import utils from hydra._internal.utils import _locate from hydra.types import ObjectConf ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'QuestionnaireText' db.create_table('cmsplugin_questionnairetext', ( ('cmsplugin_...
def fibonacci(n): for i in range(n+1): fibo = [0, 1] if i == 0: print ("fibo( 0 ) = ", 0) elif i == 1: print ("fibo( 1 ) = ", 1) else: flag = True for j in range(2, i): if flag: # Replace first element fibonacci(n) + fib...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Contains function to identify bad channels based on time and freq domain methods. authors: Niko Kampel, n.kampel@gmail.com Praveen Sripad, pravsripad@gmail.com ''' import numpy as np import mne from sklearn.cluster import DBSCAN from sklearn.metrics.pairwis...
#!/usr/bin/python # coding=utf-8 ################################################################################ from __future__ import with_statement from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collecto...
"""Testing phantombuild.""" import tempfile from pathlib import Path import pytest import phantombuild as pb from phantombuild.phantombuild import ( CompileError, HDF5LibraryNotFound, PatchError, RepoError, ) VERSION = '3252f52501cac9565f9bc40527346c0e224757b9' def test_get_phantom(): """Test ...
import os import time from github import Github from django.db import models from calaccess_raw import get_model_list from django.template.loader import render_to_string from calaccess_raw.management.commands import CalAccessCommand class Command(CalAccessCommand): help = 'Create GitHub issues for fields missing ...
""" just run this script with python converter.py . It will convert pytorch.ipynb to html page docs/pytorch-examples.html """ import nbformat import markdown from pygments import highlight from pygments.lexers import PythonLexer from pygments.formatters import HtmlFormatter notebook = nbformat.read('Pytorch.ipynb', ...
#!/usr/bin/env python3 """This is an example to train a task with CMA-ES. Here it runs CartPole-v1 environment with 100 epoches. Results: AverageReturn: 100 RiseTime: epoch 38 (itr 760), but regression is observed in the course of training. """ from metarl import wrap_experiment from metarl.envs...
import uvicorn from .main import app uvicorn.run(app)
import collections from torch.optim.lr_scheduler import LambdaLR def chunk(seq, num): avg = len(seq) / float(num) out = [] last = 0.0 while last < len(seq): out.append(seq[int(last):int(last + avg)]) last += avg return out def flatten(d, parent_key='', sep='__'): items = [...
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np import scipy import random # Titan modules import create_model ## Generate initial data set N = 400 sig3 = 1 # 3-sigma error (controls the statistical fluctuation) a = 10 # radius of the helix b = 33/(2*np.pi) # 2*pi*b ...
from ast.Expresion import Expresion from ast.Symbol import Symbol from ast.Expresion import Expresion from ast.Symbol import TIPOVAR as Tipo from ast.Sentencia import Sentencia import Reportes.ReporteD as Sentencias class Select(Sentencia): #SELECT selectclausules FROM selectbody wherecondicion #Selecttable :...
"""Function wrapping logic.""" import importlib import os import sys import logging import tempfile import atexit import functools import typing import traceback from flask import request import dploy_kickstart.errors as pe import dploy_kickstart.transformers as pt import dploy_kickstart.annotations as pa log = lo...
#!/usr/bin/python # minimal imports for faster startup import os from logger import logger def run(): import time import sys import signal import json os.environ["QT_QPA_PLATFORM"] = "xcb" # window oddly resizes when regaining focus from PyQt5.QtWidgets import QApplication, QWidget, QLabel, ...
from __future__ import print_function, absolute_import import abc import six from lazy import lazy from pyreference.utils.genomics_utils import iv_from_pos_range, \ iv_from_pos_directional_before_after, dict_to_iv class GenomicRegion(object): """ Base class for both Gene and Transcript """ def __init__(...
import os import dill import unittest import collections from swamp.utils import remove from swamp.mr.mrresults import MrResults RESULTS = collections.namedtuple('results', ['results']) WORKDIR = os.path.join(os.environ['CCP4_SCR'], 'test_workdir') MR_DIR = os.path.join(WORKDIR, 'swamp_mr') class MrResultsTestCase(u...
import functools import itertools import math from evm.constants import ( UINT_255_MAX, UINT_256_CEILING, ) def int_to_big_endian(value): byte_length = math.ceil(value.bit_length() / 8) return (value).to_bytes(byte_length, byteorder='big') def big_endian_to_int(value): return int.from_bytes(val...
""" Copyright 2014-2016 University of Illinois 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 writ...
""" A complex number is a number in the form a + b * i where a and b are real and i satisfies i^2 = -1. `a` is called the real part and `b` is called the imaginary part of `z`. The conjugate of the number `a + b * i` is the number `a - b * i`. The absolute value of a complex number `z = a + b * i` is a...
""" Module: 'sys' on pyboard 1.13.0-95 """ # MCU: (sysname='pyboard', nodename='pyboard', release='1.13.0', version='v1.13-95-g0fff2e03f on 2020-10-03', machine='PYBv1.1 with STM32F405RG') # Stubber: 1.3.4 argv = None byteorder = 'little' def exit(): pass implementation = None maxsize = 2147483647 modules = None p...
# Copyright 2009-2010 10gen, 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,...
#!/usr/bin/python #:deploy:OHsentinel:/usr/local/bin #standard imports import sys import ConfigParser import logging import os #custom imports if os.path.isdir("/usr/local/share/OHsentinel"): sys.path.append("/usr/local/share/OHsentinel") elif os.path.isdir("/usr/share/OHsentinel"): sys.path.append("/usr/share/OHs...
import unittest from policosm.utils.levels import get_level class LevelsTestCase(unittest.TestCase): def test_known(self): for highway in ['construction', 'demolished', 'raceway', 'abandoned', 'disused', 'foo', 'no','projected', 'planned','proposed','razed','dismantled','historic']: self.asse...
import torch import torch.nn as nn from torchsummary import summary from lib.medzoo.BaseModelClass import BaseModel """ Code was borrowed and modified from this repo: https://github.com/josedolz/HyperDenseNet_pytorch """ def conv(nin, nout, kernel_size=3, stride=1, padding=1, bias=False, layer=nn.Conv2d, B...
from sht3x_raspberry_exporter.sht3x import _crc8 def test_crc8(): assert _crc8(0xBE, 0xEF, 0x92)
import choraconfig, os.path tool = choraconfig.clone_tool("chora") tool["displayname"] = "CHORA:sds" tool["shortname"] = "chora:sds" tool["cmd"] = [choraconfig.parent(2,choraconfig.testroot) + "/duet.native","-chora-debug-recs","-chora-summaries","-chora-debug-squeeze","-chora","{filename}"]
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import numpy as np from ...core.loop.candidate_point_calculators import RandomSampling from ...core.loop.loop_state import create_loop_state from ...core.loop.model_updaters import NoopModelUpdater from ......
ar = [float(i) for i in input().split()] ar_sq = [] for i in range(len(ar)): ar_sq.append(ar[i]**2) ar_sq = sorted(ar_sq) print(ar_sq[0], end = ' ') for i in range(1, len(ar_sq)): if ar_sq[i] != ar_sq[i-1]: print(ar_sq[i], end = ' ')
from chroniclr import window if __name__ == '__main__': window = window.AppWindow()
import atexit import sys import inspect import json import time from .Autocomplete import Autocomplete from .Connection import Connection, ConnectionError from .Controller import Controller, ControllerError, parse_key from .Device import (Device, DeviceError, parse_hex, parse_hsv, parse_hsv_normal...
# pylint: disable=redefined-outer-name """ py.test dynamic configuration. For details needed to understand these tests, refer to: https://pytest.org/ http://pythontesting.net/start-here/ """ # Copyright © {{ cookiecutter.year }} {{ cookiecutter.full_name }} <{{ cookiecutter.email }}> # # ## LICENS...
import subprocess import codecs goal_goals = [] #txt_dirs = ['ted_originals/', 'ted_transcripts/'] #txt_dirs = ['orig_lower/'] txt_dirs = ['trans_preprocessed/', 'orig_preprocessed/'] for txt_dir in txt_dirs: with codecs.open('goal_goals.txt') as goal_goals_in: for line in goal_goals_in: if li...
import unittest import os NOT_FATAL = 0 iverilog = "iverilog -y./tb -y./main_unit/ -o ./tb/main_unit__adc_capture__tb.vvp ./tb/main_unit__adc_capture__tb.v" vvp = "vvp ./tb/main_unit__adc_capture__tb.vvp" class adc_capture(unittest.TestCase): def test_adc_capture(self): self.assertEqual(os.system(iverilog), NOT...
import random import math import sys import copy # import os class Bracket: def __init__(self, teams): self.numTeams = 1 # self.numTeams = len(teams) self.teams = list(teams) self.maxScore = len(max(["Round "]+teams, key=len)) self.numRounds = int(math.ceil(math.log(self.nu...
import re import numpy import os import pdb ### INPUT FILES rd_folder = "../raw_data/" traits_file = rd_folder+"data_dental_master.csv" bio_file_all = rd_folder+"data_sites_IUCN_narrowA.csv" occurence_file = rd_folder+"occurence_IUCN_%s.csv" bio_legend_file = rd_folder+"bio_legend.txt" ### OUTPUT FILES pr_folder = "....
# -*- coding: utf-8 -*- # # Copyright 2017-2020 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
# -*- coding: utf-8 -*- import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch from torchvision.models import resnet class BasicBlock1d(nn.Module): def __init__(self, inplanes, planes, stride, size,downsample): super(BasicBlock1d, self).__init__() self...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from sqlalchemy import MetaData from py_privatekonomi.utilities import common class ModelContext(object): def __init__(self, context = {}): self.__context = common.as_obj(context) self.__context._metadata = MetaData...
from setuptools import setup setup( name = 'json2html', packages = ['json2html'], version = '1.3.0', description = 'JSON to HTML Table Representation', long_description=open('README.rst').read(), author = 'Varun Malhotra', author_email = 'varun2902@gmail.com', url = 'https://github.com...
class Solution: # @param {integer} A # @param {integer} B # @param {integer} C # @param {integer} D # @param {integer} E # @param {integer} F # @param {integer} G # @param {integer} H # @return {integer} def computeArea(self, A, B, C, D, E, F, G, H): def area(x, y): ...
def roll_new(name, gender): pass def describe(character): pass
"""Integrate with NamecheapDNS.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_ACCESS_TOKEN, CONF_DOMAIN import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_track_time_interval from...
celsius = float(input('Insira a temperatura em °C:')) fahrenheit = celsius * 1.8 + 32 kelvin = celsius + 273.15 print(f'{celsius}°C vale {fahrenheit}°F e {kelvin}K.')
""" A Python package module for simulating falling objects with simple aerodynamic drag. Developed by FIRST Robotics Competition Team 6343 - Steel Ridge Robotics Strong Trustworthy Empowering Effective Leadership """ __VERSION__ = "1.0.0b1"
""" pluginName = dashcam Senario Continuous Video Series like a Dashcam ---------------------------------------------- You want to take a series of videos like a dash cam. You can manage disk space and delete oldest videos when disk is close to full or run video session for a set number of minutes. Edit the settings ...
load_dotenv('.env.txt')
import discord from discord.ext import commands from cogs.utils import checks from .utils.dataIO import dataIO, fileIO from __main__ import send_cmd_help import os import io import requests import json import asyncio import PIL from PIL import ImageFont from PIL import Image from PIL import ImageDraw creditIcon = "htt...
""" Module to implement a plugin that looks for hard tabs in the files. """ from pymarkdown.plugin_manager import Plugin, PluginDetails class RuleMd040(Plugin): """ Class to implement a plugin that looks for hard tabs in the files. """ def get_details(self): """ Get the details for th...
from django.dispatch import Signal # providing_args: "orderId", "recipientAmount" result_received = Signal()
""" Generic module for managing manual data transfer jobs using Galaxy's built-in file browser. This module can be used by various external services that are configured to transfer data manually. """ import logging, urllib2, re, shutil from data_transfer import * log = logging.getLogger( __name__ ) __all__ = [ 'Manua...
# coding: utf-8 # In[36]: # In[39]: import numpy as np import powerlaw edges= np.array([[1,2],[0,2],[0,3],[2,3],[3,4],[4,1]]) class karpatiGraphSolution: def __init__(self,edges): assert type(edges)==np.ndarray, "input is not an edge list" self.edgeList=edges self.numNodes=np.amax(edg...
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class GuildManagerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('GuildManagerAI')
from xviz.builder.base_builder import XVIZBaseBuilder, CATEGORY from xviz.v2.core_pb2 import Pose, MapOrigin class XVIZPoseBuilder(XVIZBaseBuilder): """ # Reference [@xviz/builder/xviz-pose-builder]/(https://github.com/uber/xviz/blob/master/modules/builder/src/builders/xviz-pose-builder.js) """ def...
# SPDX-FileCopyrightText: 2022 Cedar Grove Maker Studios # SPDX-License-Identifier: MIT """ touch_calibrator_built_in.py 2022-01-21 v2.1 Author(s): JG for Cedar Grove Maker Studios On-screen touchscreen calibrator for built-in displays. When the test screen appears, use a stylus to swipe to the four edges of the v...
from spaceone.inventory.libs.schema.dynamic_field import TextDyField, ListDyField, \ DateTimeDyField, EnumDyField, SearchField from spaceone.inventory.libs.schema.resource import CloudServiceTypeResource, CloudServiceTypeResponse, \ CloudServiceTypeMeta cst_elb = CloudServiceTypeResource() cst_elb.name = 'Load...
import csv import matplotlib.pyplot as plt import numpy as np CTEs = list() error = list() labels = list() with open('results.csv', 'r') as file: reader = csv.DictReader(file) for line in reader: labels.append(line['permutation'].replace(",","\n")) CTEs.append(float(line['accuracy'])) ...
import numpy as np import uncertainties.unumpy as unp def center(): return None # or the arg-number of the center. def getCenter(args): # return the average return (args[1] + args[4])/2 def args(): return ('Amp1', 'Center1', 'Sigma1', 'Amp2', 'Center2', 'Sigma2', 'Offset') def f(x, A1, x01, sig1...
# check file encoding format # import chardet # f = open('test-1000.txt', 'rb') # result = chardet.detect(f.read()) # print(result) import codecs f = codecs.open("dev-1000.txt", 'r', 'GB18030') ff = f.read() file_object = codecs.open('dev-1000-new.txt', 'w', 'utf-8') file_object.write(ff) # with open("test-1000.txt",...
from newGui import Ui_MainWindow import sys from pyqtgraph import PlotWidget ,PlotItem import os import pathlib import pyqtgraph as pg import pandas as pd import numpy as np from PyQt5 import QtCore, QtGui, QtWidgets ,QtPrintSupport #--------- to save as pdf ------------# def print_widget(widget, filename): pr...
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
# Generated by Django 2.1 on 2019-06-19 12:32 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('articles', '0004_merge_20190618_0923'), ('articles', '0004_merge_20190618_1311'), ] operations = [ ]
from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from django.urls import path, include from django.conf.urls.static import static urlpatterns = [ path('', include('frontend.urls')), path('api/', include('backend.urls')), path('api/auth/', include(...
import logging import matplotlib.pyplot as plt import mrcfile import numpy as np from scipy.linalg import lstsq import aspire.volume from aspire.nufft import anufft from aspire.numeric import fft, xp from aspire.utils import crop_pad_2d, grid_2d from aspire.utils.matrix import anorm logger = logging.getLogger(__name...
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
#!/usr/bin/env python import argparse import astropy.io.fits as pyfits if __name__=="__main__": parser = argparse.ArgumentParser( prog='show_gti.py', usage='show_gti.py input.fits', description='Show GTI information', epilog='', add_help=True, ) parser.add_argument( 'input_fits',metavar='input_fits'...
#!/usr/bin/env python3 import os.path import json dir_path = os.path.normpath(os.path.join(__file__, '..' , '..' , 'data')) file_path = os.path.join(dir_path, 'config_file.json') ## get user input----------------------------------------- ssid = input("Enter wifi ssid: ") pswd = input("Enter wifi password: ") name = i...
from abc import ABCMeta from discord.ext.commands import CogMeta from bot.utils.redis_cache import RedisCache __all__ = ['RedisCache', 'CogABCMeta'] class CogABCMeta(CogMeta, ABCMeta): """Metaclass for ABCs meant to be implemented as Cogs.""" pass def pad_base64(data: str) -> str: """Return base64 `...
# First # Hello World import developer skill import resilience skill import persistence skill pythonapprentice = str('Johnny') print(f'welcome to the python world {pythonapprentice}') print('Learning...')
from tweets.models import Comment from django.db import router # from posts.views import my_view from rest_framework import routers from django.urls.conf import include from django.urls import path from tweets.views import TweetViewSet, LikeViewSet, RetweetviewSet, CommentviewSet, index router = routers.DefaultRouter...
from Repository.eventTriggerOutputGroupingSetupValueRepo import eventTriggerOutputGroupingSetupValueRepo from sqlalchemy import Table from sqlalchemy.engine.base import Connection from sqlalchemy.sql.expression import BinaryExpression class eventTriggerOutputGroupingSetupValueServices(): __eventTriggerOutputGroupi...
''' Version and license information. ''' __all__ = ['__version__', '__versiondate__', '__license__'] __version__ = '1.3.3' __versiondate__ = '2022-01-16' __license__ = f'Sciris {__version__} ({__versiondate__}) – © 2014-2022 by the Sciris Development Team'
# Copyright 2017 The Bazel 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 applicable la...
from __future__ import absolute_import import os import sys import traceback from webob.exc import HTTPNotFound, HTTPInternalServerError from .config import Config from .config import get_config from .request import Request from .response import Response from .exceptions import PageNotFound from .tools import import_mo...
""" Clean up & organize outputs from processing workflow batch. """ import logging import os import re import zipfile import shutil logger = logging.getLogger(__name__) class OutputCleaner(object): """ Moves, renames, and deletes individual output files from a workflow processing batch for a selected pro...
# Copyright 2018 Comcast Cable Communications Management, 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 applica...
import sftoolbox class Variable(object): """variable """ def __init__(self, project): """construct""" project.add(self) self.project = project self.idname = None def _apply_json(self, data): """apply the json data """ self.label = data.get('lab...
# Generated by Django 3.2.7 on 2021-12-07 12:54 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('insta', '0002_auto_20211...
# Copyright 2021 Sony Corporation. # Copyright 2021 Sony Group 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 requi...