content
stringlengths
5
1.05M
from apps.senator.models import (Parliamentarian, Mandate, Alternate, Exercise) __author__ = "Gilson Paulino" __date__ = "Created by 24/03/18" __copyright__ = "Copyright 2018" __email__ = "gilsonbp@gmail.com" class ImportSenatorJSON(object): """ Importing parliamentarians through the endpoint (http://legis.s...
import sys import subprocess import telnetlib import logging import distutils from os.path import abspath if sys.version_info < (3, 0): import Queue as queue else: import queue END_OF_MSG = b'\r\n\r>' class OpenOCDProtocol(object): """ This class implements the openocd protocol. Although OpenOCD...
#!/usr/bin/python #filename: using_dict.py #'ab' is short for 'a'ddress 'b'ook ab={'Swaroop':'swaroopch@byteofpython.info','Larry':'larry@wall.org',\ 'Matsumoto':'matz@rub-lang.org','Spammer':'spammer@hotmail.com'} print("Swaroop's address is %s"%ab['Swaroop']) #Adding a key/value pair ab['Guido']='guido@python....
import matplotlib matplotlib.use('Agg') import sys import os.path import slack import warnings import h5py import numpy as np from matplotlib import pyplot as plt import matplotlib.lines as mlines from matplotlib.collections import EllipseCollection # exec(open(os.path.abspath(os.path.join( # os.path.dirname(__file_...
# Copyright (c) 2011 Tencent Inc. # All rights reserved. # # Author: Michaelpeng <michaelpeng@tencent.com> # Date: October 20, 2011 """ This is the test module for java_jar target. """ import blade_test class TestJavaJar(blade_test.TargetTest): """Test java_jar """ def setUp(self): """setup me...
import asyncio from collections import namedtuple from functools import partial from logging import getLogger from typing import Optional, Callable, Any import aiormq from aiormq.types import DeliveredMessage from .exceptions import QueueEmpty from .exchange import Exchange, ExchangeType_ from .message import Incomin...
from django.conf import settings CLIENT_ID = getattr(settings, 'OAUTH2_APP_ID', None) CLIENT_SECRET = getattr(settings, 'OAUTH2_API_SECRET', None) SCOPE = getattr(settings, 'OAUTH2_SCOPE', 'user:email') API_DOMAIN = getattr(settings, 'OAUTH2_API_DOMAIN','oauth2.com/api') BASE_DOMAIN = getattr(settings, 'OAUTH2_BAS...
import os from django.conf import settings, global_settings from oscar import OSCAR_CORE_APPS, OSCAR_MAIN_TEMPLATE_DIR def configure(nose_args=None): if not settings.configured: from oscar.defaults import OSCAR_SETTINGS # Helper function to extract absolute path location = lambda x: os.p...
# import skimage.external.tifffile as tifffile import tifffile import multiprocessing import numpy as np def imread(path): """ Reads Tiff file into a numpy array in memory. :param path: path to tif image to open :return: numpy ndarray with image data """ return tifffile.imread(files=path) def i...
import matplotlib.pyplot as plt import torch import numpy as np import time from tqdm.notebook import tqdm import cv2 print('Imports complete')
import shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload def restart_celery(*args, **kwargs): kill_worker_cmd = 'pkill -9 celery' subprocess.call(shlex.split(kill_worker_cmd)) start_worker_cmd = 'celery -A screendoor_app worker -l info' sub...
import justpy as jp from typing import Any, Awaitable, Callable, Dict, List, Optional, Union from .value_element import ValueElement class ChoiceElement(ValueElement): def __init__(self, view: jp.HTMLBaseComponent, options: Union[List, Dict], *, ...
# # PySNMP MIB module CYAN-TENGPORT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CYAN-TENGPORT-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:34:09 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
from models.produto import Produto ps4 = Produto('Playstation 4', 1789.44) xbox = Produto('Xbox 360', 1699.99) print(ps4,'\n') print(xbox)from models.produto import Produto ps4 = Produto('Playstation 4', 1789.44) xbox = Produto('Xbox 360', 1699.99) print(ps4,'\n') print(xbox)from models.produto import Produto p...
import json from collections import defaultdict from pkg_resources import resource_filename import discord from discord.ext import commands, tasks class Voting(commands.Cog): def __init__(self, bot, mafia, players, voting_options, message, losing_team, winning_team, villagers): self.bot...
from .wrappers import _linear from .wrappers import _trees all = ('_linear', '_trees')
# Can be used for BFS from collections import deque def possible_bipartition(dislikes): """ Will return True or False if the given graph can be bipartitioned without neighboring nodes put into the same partition. Time Complexity: O(n2) Space Complexity: O(n) """ if not disl...
charset = range(10) for c1 in charset: for c2 in charset: for c3 in charset: print(c1, c2, c3)
import argparse import json import random import sys if __name__ == '__main__': parser = argparse.ArgumentParser(description='Harvests Watchtower SDK call execution time information from GAE backups.') parser.add_argument('--file', '-f', dest='file', default=None) parser.add_argument('--mock_total', '-m', ...
import math import torch from torch import nn import torch.utils.model_zoo as model_zoo model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', 'resnet50': 'https://download.pytorch.org/models/resnet5...
# Copyright 2020 The ElasticDL 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 law...
__author__ = 'eddie'
#! /usr/bin/env python3 import argparse from argparse import RawTextHelpFormatter from collections import Counter from Bio.Seq import Seq from Bio.Alphabet import generic_dna import pysam def calculate_variant_position(read, flank_length): start = read.pos perf_counter = 0 # This counter will count the numbe...
import logging import torch.nn as nn from typing import List, Optional, Union from c_unet.architectures.decoder import DecoderBlock from c_unet.architectures.encoder import EncoderBlock class Unet(nn.Module): """ U-net architecture, that can be used either with normal convolutions, or with group convolutions. ...
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. PYTHON_VERSION_COMPATIBILITY = 'PY2+3' DEPS = [ 'buildbucket', 'cq', 'step', ] from PB.go.chromium.org.luci.buildbucket.proto.build import Build d...
# -*- coding: utf-8 -*- """Generate text corpus from random walks on graph.""" import numpy as np from joblib import Parallel, delayed from joblib.pool import has_shareable_memory from jwalk import walks __all__ = ['walk_graph', 'build_corpus'] def walk_random(normalized_csr, labels, walk_length): """Generate r...
from unittest import TestCase import markdown from mdx_picture import PictureExtension class MdxPictureBlockVadiationTest(TestCase): def testMinimalBlockConfiguration(self): """Test minimal block configuration with image""" no_sources_mdx = """ Hello World my Babald [picture] ![This picture ...
# 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 setuptools import setup, find_packages from setuptools.extension import Extension from Cython.Build import cythonize import numpy extensi...
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import logging from typing import Any, Iterable, List, Tuple, Type, Optional, Callable from volatility3.framework import interfaces...
import requests from time import sleep from pprint import pprint from cyberpy import Transaction from config import ACCOUNT_API, LCD_API, WALLET def get_account_data(address: str, account_api: str = ACCOUNT_API, print_message: bool = False): _res = requests.get(f'{account_api}{address}') try: _accoun...
from django import template from django.utils.timezone import now register = template.Library() MOMENT = 120 # duration in seconds within which the time difference # will be rendered as 'a moment ago' @register.filter def fmt_float(value): """ Finds the difference between the datetime value given and now(...
from __future__ import absolute_import from updater.changelog.gerrit import GerritServer, GerritJSONEncoder from updater.changelog import get_changes, get_timestamp from updater.database import Rom, ApiKey, Device from flask import Flask, jsonify, request, abort, render_template from flask_mongoengine import MongoEng...
from keras.models import Sequential from tensorflow.keras import Model from keras.layers import Dense, Dropout, Activation, Flatten, Lambda from keras.layers import Conv2D, MaxPooling2D from keras.utils import np_utils from keras import backend as K def get_conv(input_shape=(64, 64, 3), filename=None): model = Se...
from django.contrib import admin from .models import Airline, Airport, Route, FlightNumber from rest_framework.authtoken.admin import TokenAdmin TokenAdmin.raw_id_fields = ('user',) admin.site.register(Airline) admin.site.register(Airport) admin.site.register(Route) admin.site.register(FlightNumber)
"""The yr component."""
#!/usr/bin/env python names = ['raymond', 'rachel', 'matthew', 'roger', 'betty', 'melissa', 'judith', 'charlie'] print ', '.join(names) names.pop(0) print ', '.join(names) names.insert(0, 'mark') print ', '.join(names) from collections import deque nicks = deque(['raymond', 'rachel', 'matthew', 'roger', 'betty', '...
# -*- coding: utf-8 -*- from bert import modeling import os import tensorflow as tf from scipy.special import softmax import time import numpy as np import collections from utils import load_run from config import config_dict from functions import model_fn_builder, input_fn_builder flags = tf.flags FLAGS = flags.FLAGS...
''' TACO: Multi-sample transcriptome assembly from RNA-Seq ''' import numpy as np from scipy.stats import distributions from taco.lib.scipy.norm_sf import norm_sf from scipy.stats import mannwhitneyu as scipy_mwu from taco.lib.stats import mannwhitneyu as mwu def test_mannwhitneyu(): x = [1, 2, 3, 4, 5] y =...
import re from pymocky.models.config import Config from pymocky.utils.log import Log class CherryPyUpdateScenario(object): def __init__(self, mapping_handler): self.mapping_handler = mapping_handler def response(self): string = '{"success": true, "message": "updated"}' return string ...
"""Convert straight quotation marks to typographic ones """ from __future__ import annotations import re from typing import Any from .state_core import StateCore from ..common.utils import charCodeAt from ..common.utils import isWhiteSpace, isPunctChar, isMdAsciiPunct from ..token import Token QUOTE_TEST_RE = re.co...
from . import stage_groups as sz_stage from . import groups import stages class Summary: def header_for(self, experiment_class): return [ 'id', 'num_stages', 'start_time', 'duration', 'is_complete', 'size_in_bytes' ] def data_for(self, experiment): return [ ...
# -*- coding: utf-8 -*- """ 617. Merge Two Binary Trees Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge them into a new binary tree. The merge rule is that if two nodes overlap, then sum node va...
import numpy as np import matplotlib.pyplot as plt from parameters import * from models import * def simulate_stochastic_clb(params, Y0, Omega, T_end, dt = 1): state = np.array(Y0) Y_total = np.zeros([1+T_end//dt, len(state)]) T = np.zeros(1+T_end//dt) t = 0 ...
from django.contrib import admin from myapp.models import Person, Image class PersonAdmin(admin.ModelAdmin): list_display=[f.name for f in Person._meta.fields] admin.site.register(Person,PersonAdmin) class ImageAdmin(admin.ModelAdmin): list_display=[f.name for f in Image._meta.fields] admin.site.register(Image,Im...
# Generated by Django 2.1.7 on 2019-03-23 00:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0009_auto_20190322_1755'), ] operations = [ migrations.DeleteModel( name='ExternalUser'...
from ..tmx_tile_layer import load_tmx_tile_layer from defusedxml import ElementTree from io import StringIO import unittest class TestTmxTileLayer(unittest.TestCase): """Test loading TMX tile layer entries.""" def test_flips_y_coordinate(self): """Y coordinates are flipped to place origin at bottom l...
""" Given a 32-bit signed integer, reverse digits of an integer. Assume we are dealing with an environment that could only store integers within the 32-bit signed integer range: [−2^31, 2^31 − 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows. Example 1: I...
""" notebook imports """ import warnings try: import ipywidgets import IPython from notebooktools import * from ontologysearch import OntologySearch from parameterslider import ParameterSlider from speciessearch import SearchBySpeciesForm except ImportError: warnings.warn("Notebook tools ...
from typing import Optional, Sequence import dataclasses import tensorflow as tf import vcm class ThermoBasis: """A thermodynamic basis with specific humidity as the prognostic variable""" u: tf.Tensor v: tf.Tensor T: tf.Tensor q: tf.Tensor dp: tf.Tensor dz: tf.Tensor rh: tf.Tensor ...
# Copyright 2021 Cortex Labs, 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 wri...
class Solution: def characterReplacement(self, s, k): """ :type s: str :type k: int :rtype: int """ max_len, res, counter = 0, 0, collections.Counter() for i, ch in enumerate(s): counter[ch] += 1 max_len = max(max_len, counter[ch]) ...
import os,sys,re,subprocess from glob import glob; dir = sys.argv[1]; for result_dir in glob(dir + '/skip_*'): extractRunNum = lambda f: re.sub('.*homog_(.+)\.(txt|msh)$','\\1', f) # Get the mesh stats from the deg1 mesh (mesh_convert doesn't currently support deg 2 meshes). meshStats = {} for m in glo...
from markdown.util import etree from markdown.extensions import Extension from markdown.blockprocessors import BlockProcessor from markdown.inlinepatterns import Pattern from markdown.preprocessors import Preprocessor import subprocess import re BLOCK_RE = re.compile(r'''(?:^|\n)<\ ?(?P<class>[\w\-]+) ...
from django.conf.urls import url from .views import SearchView urlpatterns = [ url(r'^$', SearchView.as_view(), name='default'), ]
import os from unittest.mock import patch from flexlate import branch_update from flexlate.add_mode import AddMode from flexlate.config import FlexlateConfig from flexlate.exc import ( CannotRemoveTemplateSourceException, CannotRemoveAppliedTemplateException, ) from flexlate.ext_git import repo_has_merge_confl...
import subprocess import tempfile from graphviz import Digraph from suls.mealymachine import MealyMachine import re from util.dotloader import load_mealy_dot distsetpath = "/home/tom/projects/lstar/util/distset" def _render(fsm: MealyMachine, filename): g = Digraph('G', filename=filename) g.attr(rankdir='L...
# Convex hull of a random set of points: import numpy as np import matplotlib.pyplot as plt # from scipy.spatial import ConvexHull FILE_NAME = "layer1" def get_degree_all(x_arr, y_arr): return np.arctan2(y_arr, x_arr) * 180 / np.pi def ccw(p1, p2, p3): x = [p1[0], p2[0], p3[0]] y = [p1[1], p2[1], p3[...
from django.contrib import admin from django.urls import path,include from game import views urlpatterns = [ path('admin/', admin.site.urls), path('', views.homepage, name='homepage'), path('loginRegisterPage/', views.loginRegisterPage, name='loginRegisterPage'), path('mytodos/', views.my...
from temboo.Library._23andMe.Ancestry import Ancestry, AncestryInputSet, AncestryResultSet, AncestryChoreographyExecution from temboo.Library._23andMe.Genomes import Genomes, GenomesInputSet, GenomesResultSet, GenomesChoreographyExecution from temboo.Library._23andMe.Genotype import Genotype, GenotypeInputSet, Genotype...
# -*- coding: utf-8 -*- from sys import argv, exit from src import raflib def help(): print "Usage: -u or --unpack: Unpacks the content of RAF (Riot Archive File).\n" \ "Example: python rafpy.py -u Archive.raf Archive.raf.dat" if __name__ == "__main__": print "RAFPy 1" if len(argv) == 4: ...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Oleksandr Moskalenko <om@rc.ufl.edu> # # Distributed under terms of the MIT license. """ Main module for the TranD package. Define a CLI and drive execution of all analyses. """ import argparse import logging import re import os imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-04-02 18:10:31 # @Author : guanglinzhou (xdzgl812@163.com) # @Link : https://github.com/GuanglinZhou # @Version : $Id$ import numpy as np import pandas as pd # inputfile = open('/Users/guanglinzhou/Documents/gpsDataProject/processDataFromJin/export....
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wagtail.images.blocks import wagtail.core.fields import wagtail.core.blocks import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0001_squas...
from __future__ import annotations from typing import Any from wolfbot import const from wolfbot.enums import Role, SwitchPriority, lru_cache from wolfbot.game_utils import get_player, swap_characters from wolfbot.log import logger from wolfbot.roles.player import Player from wolfbot.statements import Statement cla...
# Copy this file to setting_local.py # Set this to False if on a production server. DEBUG = True TEMPLATE_DEBUG = DEBUG # Replace this with the real key. SECRET_KEY = '..................................................'
#!/usr/bin/env python # -*- python -*- from __future__ import print_function import os, sys, re, MySQLdb, time dirNm, execName = os.path.split(os.path.realpath(sys.argv[0])) sys.path.append(os.path.realpath(dirNm)) from LMODdb import LMODdb import argparse def dbConfigFn(dbname): """ Build config file name ...
from magicbot import AutonomousStateMachine, tunable, timed_state, state from components.Input.ballCounter import BallCounter from components.Actuators.LowLevel.driveTrain import DriveTrain from components.Actuators.LowLevel.intakeMotor import IntakeMotor from components.Actuators.LowLevel.limelight import Limelight fr...
import tkinter # inserindo uma imagem no app root = tkinter.Tk() root.title("Aplicação") img = tkinter.PhotoImage(file='imagens/smol.png') label_imagem = tkinter.Label(root, image=img).grid() root.mainloop()
from random import randint print('===================================') print('======= JOGO DA ADIVINHAÇÃO =======') print('===================================') aleat = randint(0, 5) n = int(input('Digite um número: ')) if n == aleat: print('Você acertou!! Miseravi') else: print('Errou!! Teste mais tarde....
import unittest import person class PersonTest(unittest.TestCase): # run before tests def setUp(self) -> None: self.obj = person.person("Mahan", "Bi") self.obj2 = person.person("Ali", "Delbande") self.obj3 = person.person("John", "Doe") # run after tests def tearDown(self) -> ...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
import textract import re import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.pipeline import Pipeline from sklearn.linear_model import SGDClassifier from sklearn.preprocessing import LabelEncoder import sklearn.datasets import nltk nltk.data.path.append('/home/husein/nltk_data/...
# Generated by Django 2.0.5 on 2018-06-20 15:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [("core", "0001_initial")] operations = [ migrations.AlterModelOptions(name="system", options={"ordering": ["name"]}) ]
'''RALEIGH algebra implementations on CPU and GPU. CPU implementations are based on numpy.ndarray. '''
from .tcmr import TCMR from .motion_discriminator import MotionDiscriminator
from spyd.registry_manager import register @register('room_client_event_handler') class StopDemoRecordingHandler(object): event_type = 'stop_demo_recording' @staticmethod def handle(room, client): pass
#The basic ADA interface, such as executing end effector motions, getting the state of the robot, etc. from AdaAssistancePolicy import * from UserBot import * import AssistancePolicyVisualizationTools as vistools #from GoalPredictor import * from DataRecordingUtils import TrajectoryData import numpy as np import math...
"""Tests src/common/io.py""" import os import pytest from common.io import input_file_path def test_input_file_path_success(temporary_dir): """Tests input_file_path function with a unique file""" test1_dir = os.path.join(temporary_dir, "test1") os.makedirs(test1_dir, exist_ok=False) with open(os.path...
# Copyright (c) 2014 Rackspace Hosting # 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 req...
import datetime import math from bson.objectid import ObjectId from mongoschema.bson_utils import get_dtype, _get_int class TestMapper(object): def test_for_null_one(self): assert get_dtype(None) == "null" def test_for_null_two(self): assert get_dtype("") != "null" def test_for_null_th...
from chpass.dal.db_connection import DBConnection from chpass.dal.models.download import Download class DownloadsTableAdapter(object): def __init__(self, db_connection: DBConnection) -> None: self._db_connection = db_connection def get_chrome_downloads(self, serializable: bool = False) -> list: ...
from tensorflow.keras.preprocessing.text import Tokenizer from tensorflow.keras.preprocessing.sequence import pad_sequences from tensorflow.keras.preprocessing.text import one_hot from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Activation, Dropout, Dense from tensorflow.keras.layers i...
from algorithms.treap import Treap from algorithms.queue import Queue
from abc import ABC, abstractmethod class BaseSamlParser(ABC): """ Generalized SAML response parser """ def __init__(self): """ Parses SAML response from base64 input. Args: response (basestring): SAML response as a base64-encoded string Raises: ...
import json from dataclasses import dataclass, field from typing import Callable from pathlib import Path from bitarray import bitarray, frozenbitarray from bitarray.util import int2ba, ba2int from frozendict import frozendict from .circuit_parser import GateShape, GateReference, SPECIAL_RED, NORMAL, CircuitPin, BigS...
import pygit2 import tempfile import shutil from os import path def git_clone(repo_url, branch='master'): ''' clones repo to a /tmp/ dir ''' if repo_url == '': return False _tmp_dir = tempfile.mkdtemp(prefix='armada', dir='/tmp') pygit2.clone_repository(repo_url, _tmp_dir, checkout_br...
from django.conf import settings from django.db.models import signals from django.apps import apps from django.db import DEFAULT_DB_ALIAS from .models import Heartbeat def post_migrate_receiver(app_config, verbosity=2, interactive=False, using=DEFAULT_DB_ALIAS, **kwargs): """ Finalize the website loading. ...
# coding=utf-8 """ invite.py - Invite all the things Copyright 2016 Max Gurela Licensed under the Eiffel Forum License 2. """ from __future__ import unicode_literals, absolute_import, print_function, division from sopel.config.types import StaticSection, ValidatedAttribute from sopel.logger import get_logger from sop...
from pyfiglet import figlet_format def print_art(): input_data = input() result = figlet_format(input_data) print(result) print_art()
# This file is run by the RasPi of the IoT to allow it to communicate with the # main server through MQTT and with the actual device through an Arduino # #Communicating with the TV: # topic - "TV" # # There are 2 possible actions with the TV # To turn on the TV: # payload - "on_tv" # To turn off the TV: #...
# Each array includes alternate names for each system. # You can add your own systems and/or alternate names. # If the first value is "Advanced", then it will only show up when "Show Advanced Systems" is enabled. # Capitalization doesn't matter, and each names is already checked with and without " - " where applicable ...
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import pandas as pd from joblib import load #import matplotlib #matplotlib.use('Agg') #import matplotlib.pyplot...
from structure import SofaType from readers import date_reader, datetime_reader from writers import boolean_writer, date_writer, datetime_writer from validators import ( NumericIdValidator, StringIdValidator, BooleanValidator, IntegerValidator, FloatValidator, StringValidator, DateValidator, DatetimeValidator, ...
# Copyright (c) 2017 Ansible by Red Hat # All Rights Reserved. import pkg_resources from .core import AMQPChannelLayer # noqa __version__ = pkg_resources.require('asgi_amqp')[0].version
# Generated by Django 3.1 on 2020-10-07 00:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resources', '0016_job_auth_token'), ] operations = [ migrations.AlterField( model_name='report', name='logs', ...
from scsr.models.elements import ElementAO, ElementReferenceAO def create_element(enName,ptName, refs): el=ElementAO() el.add_name('en',enName) el.add_name('pt',ptName) el.save()# TODO: Create the ElementReference representation and code the reference adding here. er=ElementReferenceAO.get_referen...
import redis import boto3 import hashlib import os import base64 from pymongo import MongoClient connection = MongoClient("localhost:32769") id = base64.urlsafe_b64encode(os.urandom(9)).decode('utf-8') ids = id[:-3] re = redis.Redis(host='localhost', port=32770, db=0) re.set('name' + '_' + ids, id) print(re.get('na...
# 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 # distribu...
SECRET_KEY = 'development key' DEBUG = True SQLALCHEMY_DATABASE_URI = 'postgres://postgres@localhost/monkeybook' SQLALCHEMY_ECHO = False
# Copyright 2016 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from _hardware import HardwareException, Expectation from _hardware_android import HardwareAndroid CPU_CLOCK_RATE = 1326000 # If you run adb cat /sys/devices/57000000.gpu/pstate it show...