content
stringlengths
5
1.05M
#!/usr/bin/env python3 from __future__ import division, absolute_import, print_function, unicode_literals import subprocess import re import time import sys import argparse import yaml from timeparse import timeparse def call(args): return '\n'.join(subprocess.check_output(args).decode().splitlines()) def get_a...
from durabledict.base import DurableDict from durabledict.encoding import NoOpEncoding class MemoryDict(DurableDict): ''' Does not actually persist any data to a persistant storage. Instead, keeps everything in memory. This is really only useful for use in tests ''' def __init__(self, autosync...
# Copyright (c) The InferLO authors. All rights reserved. # Licensed under the Apache License, Version 2.0 - see LICENSE. import random from copy import copy from functools import reduce from typing import List, Optional import numpy as np from .factor import Factor, product_over_ from .graphical_model impo...
import itertools from collections import defaultdict, OrderedDict, Counter, namedtuple, deque # defaultdict can define default_factory where # accessing a key which does not exist, creates it with a default value # and the default value is returned # commonly used to append to lists in dictionaries dd1 = defaultdict...
#!/usr/bin/python3 from evdev import InputDevice, categorize, ecodes import configparser, os config = configparser.ConfigParser() config.read(os.path.dirname(os.path.realpath(__file__))+'/config.ini') def sysrun(command): os.system(command+ " &") dev = InputDevice(config["DEVICE"]["path"]) dev.grab() for event in d...
from .colored import ( info, error, fatal ) from .get_env_var import get_env_var from .sync_to_async import sync_to_async __ALL__ = ( 'info', 'error', 'fatal', 'get_env_var', 'sync_to_async' )
from .doc import AssemblyDocCommand from .helpers import instruction_set from .helpers import support_set from .completion import completionListener from .context import ContextManager __all__ = ["AssemblyDocCommand", "instruction_set","support_set", "completionListener", "ContextManager"]
#!/usr/bin/python # Filename: ex_for.py for i in range(0, 5): print("{0}: hello".format(i)) print('The for loop is over')
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ============================================================================ # Erfr - One-time pad encryption tool # Extractor script # Copyright (C) 2018 by Ralf Kilian # Distributed under the MIT License (https://opensource.org/licenses/MIT) # # Website: http://www.ur...
import logging g_logger = None def get_logger(): return g_logger def configure_logging(name: str, level: int = logging.DEBUG): logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=level) global g_logger g_logger = logging.getLogger(name=name) g_logger.debug(...
import numpy as np import torch import torch.nn.functional as F from PIL import Image from scipy import linalg import torchvision from torchvision import datasets, transforms from Tools import FLAGS def get_dataset(train, subset): transf = transforms.Compose( [transforms.ToTensor(), transforms.Normaliz...
from collections.abc import Container class MyContainer(Container): def __init__(self, value): self.data = value def __contains__(self, value): return value in self.data
# names, grades, attributes, sentences names = ['Tom', 'Fred', 'Harry', 'Hermione', 'Ron', 'Sarah', 'Ele', 'Mike', 'Peter'] subjects = ['Maths','Science','English', 'Arts', 'Music', 'German', 'French', 'PE'] grade_adjective = { 1: ['terrible', 'horrible'], 2: ['below average', 'mediocre'], 3: ['Average', 'A...
from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from oauth2_provider.decorators import protected_resource import json from datetime import datetime from django.utils import timezone from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Dataset, User, Qu...
# Copyright 2020 Google LLC. 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 or a...
#!/usr/bin/env python # -*- coding: utf-8 -*- from sys import argv import bottle from bottle import default_app, request, route, response, get from pymongo import MongoClient import json import api bottle.debug(True) def enable_cors(fn): def _enable_cors(*args, **kwargs): # set CORS headers resp...
class Pelicula: # Constructor de clase def __init__(self, titulo, duracion, lanzamiento): self.titulo = titulo self.duracion = duracion self.lanzamiento = lanzamiento print("Se ha creado la pelicula", self.titulo) # Redefinimos el metodo String def __str__(self): ...
#!/usr/bin/python # -*- coding: utf-8 -*- from random import randint import time,sys braille = ['⣽','⢿','⣻','⡿','⣾','⣟','⣯','⣷'] z = len(braille) for x in range(10): r = (randint(0,z-1)) sys.stdout.write("Working " + braille[r] + " " + str(x*10) + "% done" ) sys.stdout.flush() time.sleep(1) sys.stdout.write("...
# Generated by Django 3.0.4 on 2020-03-30 20:18 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0002_auto_20200330_1310'), ] operations = [ migrations.RenameField( model_name='product', old_name='descrtiption', ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @Title : 字符串工具类 @File : string_utils.py @Author : vincent @Time : 2020/9/15 11:14 上午 @Version : 1.0 ''' import os def is_null(obj): if obj is None: return True if len(obj) == 0: return True def list_2_str(str_list): r_str = '...
# Generated by Django 2.2.10 on 2020-02-27 14:37 from django.db import migrations, models def nullify_courserun_expiration_dates(apps, schema_editor): """ Unset all of the expiration dates set automatically by the previous code. We are moving to empty expiration dates by default and only explicitly setti...
# Generated by Django 3.0.4 on 2020-03-11 21:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kegs', '0001_initial'), ] operations = [ migrations.AddField( model_name='beer', name='description', fie...
# Generated by Django 3.1.14 on 2022-03-24 11:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('feedback', '0030_auto_20220324_0947'), ] operations = [ migrations.AddField( model_name='report', name='eid', ...
from http import HTTPStatus from django.urls import resolve, reverse from mock import patch from barriers.views.public_barriers import PublicBarrierDetail from core.tests import MarketAccessTestCase class PublicBarrierViewTestCase(MarketAccessTestCase): def test_public_barrier_url_resolves_to_correct_view(self)...
from __future__ import absolute_import from __future__ import unicode_literals import multiprocessing import os import sys import mock import pytest import pre_commit.constants as C from pre_commit.languages import helpers from pre_commit.prefix import Prefix from pre_commit.util import CalledProcessError from testi...
import requests import os import shutil from constants import chromedriverPath # Constants chromedriverUrl = 'https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_win32.zip' chromedriverFile = 'chromedriver.zip' def downloadFile(url, name): r = requests.get(url, allow_redirects=True) ...
import turtle ################################################### # range = antal gange # rigth or left = grader til højre eller venstre # forward or backward = længde på streg + retning fremad/tilbage # kan man tegne flere samtidig? hvordan ################################################### <<<<<<< HEAD for n in ran...
# __init__.py from cogs.add import add from cogs.add import add_all from cogs.apply import apply from cogs.clear import clear from cogs.connect import connect from cogs.delete import delete from cogs.diff import diff from cogs.fetch import fetch from cogs.ignore import ignore from cogs.init import init from cogs.ls imp...
class ActivationFrame(): def __init__(self, owner): self.owner = owner self.static_link = None self.dynamic_link = None self.params = [] self.local_vars = [] self.static_vars = [] self.external_vars = [] self.temp_vars = [] self.previous_PC = ...
#4. Crie um código em Python que receba uma lista de nomes informados pelo usuário com tamanho indefinido (a lista deve ser encerrada quando o usuário digitar 0) e, na sequência, receba um nome para que seja verificado se este consta na lista ou não. Observação: ignorar diferenças entre maiúsculas e minúsculas. nomes =...
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("BSC Indicator"), "items": [ { "type": "doctype", "name": "BSC Initiative Log", "description":_("BSC Initiative Log"), "onboard": 1, "dependencies": ["BSC Initiative"], }, { ...
# -*- coding: utf-8 -*- """ 空白模板 """ ###### 欢迎使用脚本任务,首先让我们熟悉脚本任务的一些使用规则 ###### # 详细教程请在AI Studio文档(https://ai.baidu.com/ai-doc/AISTUDIO/Ik3e3g4lt)中进行查看. # 脚本任务使用流程: # 1.编写代码/上传本地代码文件 # 2.调整数据集路径以及输出文件路径 # 3.填写启动命令和备注 # 4.提交任务选择运行方式(单机单卡/单机四卡/双机四卡) # 5.项目详情页查看任务进度及日志 # 注意事项: # 1.输出结果的体积上限为20GB,超过上限可能导致下载输出失败. # 2.脚本任务...
# Generated by Django 2.1.7 on 2019-06-03 05:56 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('blog', '0015_auto_20190601_2202'), ] operations = [ migrations.AlterField( ...
from flask_babel import lazy_gettext as _ from .model import ( Session, CirculationEvent, ExternalIntegration, get_one, create ) class LocalAnalyticsProvider(object): NAME = _("Local Analytics") DESCRIPTION = _("Store analytics events in the 'circulationevents' database table.") # A g...
import shutil, ssl, json import requests, zipfile, gzip, io import pandas as pd from tbsdq import utilities as dqutils from tbsdq import configuration as dqconfig from topN import configuration as topnconfig """ Non-Spatial dataset analysis on the open data registry """ def fetch_and_parse_catalogue(zip_url, expecte...
from django.contrib.auth.models import Permission class TestPermissionsMixin: def _clean_permissions(self): self.user.user_permissions.clear() self._clean_perm_cache() def _set_permissions(self, perms): self.user.user_permissions.add( *Permission.objects.filter(codename__...
# -*- coding: utf-8 -*- """ github3.repos.commit ==================== This module contains the RepoCommit class alone """ from __future__ import unicode_literals from . import status from .. import git, models, users from .comment import RepoComment class RepoCommit(models.BaseCommit): """The :class:`RepoCommi...
from pymusicterm.util.time import milliseconds_to_minutes, milliseconds_to_seconds from py_cui.widgets import Widget class LoadingBarWidget(Widget): BAR_COMPLETED_CHAR=u'\u2588' def __init__(self,id,title,grid,row,column,row_span,column_span,padx,pady,logger) -> None: """ Initializer for Loading...
import json from typing import List, Dict, Union import bleach allowed_items = { "section", "subsection", "link" } allowed_sub_items = { "title", "url", "metadata", "desc", "commentary" } def clean_submission(upload_post: str) -> List[Union[str, Dict[str, str]]]: output = [] for reso...
import psycopg2 as pg from psycopg2.extras import DictCursor from getpass import getpass ############## # Connecting # ############## cx = pg.connect( host='localhost', database='abq', user=input('Username: '), password=getpass('Password: '), cursor_factory=DictCursor ) cur = cx.cursor() ##################...
def train(model, link_predictor, emb, edge_index, pos_train_edge, batch_size, optimizer): """ Runs offline training for model, link_predictor and node embeddings given the message edges and supervision edges. 1. Updates node embeddings given the edge index (i.e. the message passing edges) 2. Compute...
from .base import TemplateView class Index(TemplateView): template_name = 'feats/index.html'
from github import GitHub username = "github_username" db_path_account = "C:/GitHub.Accounts.sqlite3" db_path_api = "C:/GitHub.Apis.sqlite3" g = GitHub.GitHub(db_path_account, db_path_api, username) g.repo.create('repository_name', description='this is repository description.', homepage='http://homepage.com')
#!/usr/bin/env python2.7 import argparse import sys import rospy import tf from gazebo_msgs.srv import GetLinkState, GetLinkStateRequest parser = argparse.ArgumentParser() parser.add_argument("object_name", help="Name of the object") parser.add_argument("link_name", help="Link of the object") parser.add_argument("wor...
import json from datetime import date from unittest.mock import MagicMock, patch from django.contrib.auth import get_user_model from django.core.management import call_command from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient f...
from flask import Flask, request, Response import json import numpy as np import gpt_gen import gpt_gen_thread import sys import time import logging import torch from Config import config_predict from datetime import datetime ConfigPredict = config_predict() batchGenerating=ConfigPredict.batchGenerating path_configs = ...
import pickle class Carro: def __init__(self, modelo, cor): self.modelo = modelo self.cor = cor def __repr__(self): return f'Carro(modelo="{self.modelo}", cor="{self.cor}")' carro_1 = Carro('Celta', 'Prata') data = { 'a': 'Eduardo', 'b': 'Banans', 'c': [1, 2, 3, 4], ...
""" 1579. Remove Max Number of Edges to Keep Graph Fully Traversable Hard Alice and Bob have an undirected graph of n nodes and 3 types of edges: Type 1: Can be traversed by Alice only. Type 2: Can be traversed by Bob only. Type 3: Can by traversed by both Alice and Bob. Given an array edges where edges[i] = [typei, ...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst')) as f: README = f.read() requires = [ 'cornice', 'gevent', 'pyramid_exclog', 'setuptools', 'couchdb', 'couchapp', 'pycrypto', 'openpro...
from rest_framework import serializers from backend.models import Shortener # Lead Serializer class ShortenerSerializer(serializers.ModelSerializer): class Meta: model = Shortener fields = '__all__' read_only_fields = ['id', 'responseURL', 'date']
"""For entities that have specs.""" from gemd.entity.has_dependencies import HasDependencies from gemd.entity.object.has_template import HasTemplate from gemd.entity.template.base_template import BaseTemplate from gemd.entity.link_by_uid import LinkByUID from abc import abstractmethod from typing import Optional, Unio...
from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import csv class PlayerBot(Bot): def play_round(self): with open('trial_set_FR.csv', newline='', encoding='cp1252') as csvfile: csv_reader = csv...
###########DO NOT DELETE######################### #cat /proc/sys/vm/overcommit_memory #echo 1 | sudo tee /proc/sys/vm/overcommit_memory ################################################# from tifffile import imsave import numpy as np import cv2 import os import datetime from PIL import Image norm = np.zeros((480,848...
from . import executor from . import phone from . import snoopphone
"""Added ml_models table Revision ID: 7e60a33f42bb Revises: 11aa784195ef Create Date: 2021-04-16 02:25:10.719706 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "7e60a33f42bb" down_revision = "11aa784195ef" branch_labels = None depends_on = None def upgrade()...
import os, sys os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) from django.test.simple import run_tests as django_test_runner from django.conf import settings def runtests(): failures = django_test_runner(['localedb'], verbosity=1, interactive=Tr...
# Working with Date And Time. import datetime from datetime import date # Get today's date from the date class. today = date.today() print ("Today's date is ", today) myDate = datetime.date(2018,6,9) print(myDate) print(myDate.year) print(myDate.month) print(myDate.day) #Day-name,Month-name,Day-name,Year pr...
#!/usr/bin/env python """ Merges global.yml and config.yml to create various local.yml for each room assistant peer node. It then sends the configuration file to peer, and restarts the room assistant service. See README.md file for details. """ import math import os import time import yaml def mergeDicts(dict1, dict...
n,t=map(int,input().split()) x=[] mp=10**6 for i in range(n): x.append([*map(int,input().split())]) mp=min(mp,x[i][1]) left,right=-mp,10**7 while abs(left-right)>=0.00000001: mid=(left+right)/2 hour=0 for i in x: hour+=i[0]/(i[1]+mid) if hour>=t: left=mid else: right=mid print(left)
from django.apps import AppConfig class StudentportalConfig(AppConfig): name = 'studentportal'
import os import qrcode from ckeditor.fields import RichTextField from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.db import models from mptt.models import MPTTModel, TreeForeignKey from . import constants User = get_user_m...
import numpy as np from tools.metadata import get_hero_dict import operator import pandas as pd import plotly.graph_objs as go import plotly.plotly as py def winrate_statistics(dataset_df, mmr_info): x_data, y_data = dataset_df wins = np.zeros(114) games = np.zeros(114) winrate = np.zeros(114) ...
# First, lets get a list of all files in the data directory import time import sys from tensorflow import keras import tensorflow as tf import pathlib import json from tensorflow.keras.callbacks import TensorBoard, ModelCheckpoint from tensorflow.keras.layers import Conv3D, MaxPooling3D, BatchNormalization, GlobalAv...
from Gaussiandistribution import Gaussian gaussian_one = Gaussian(22, 2) print(gaussian_one.mean)
from math import floor def find_position(value): position = floor(value / 100) if value % 100 == 0: position = position - 1 return position def center_of_square(coordinate, dimension): return coordinate + dimension / 2
# # Script to do an Oracle restore given an optional date range of the copy # An existing restore job is required, copy version of that job will be updated if applicable # If no date range is provided the latest copy will be used # Backup job name for the copy to use can also be provided # Set the cancel parameter = tr...
# Copyright 2019 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...
def create_app(): from flask import Flask from localtalk.views import init_views app = Flask(__name__) # init views init_views(app) return app def create_server(): from localtalk.server import Server server = Server() return server
import asyncio from datetime import datetime import logging import aiohttp import requests import certifi TIMEOUT_FOR_PAR_REQS = 60*5 TIMEOUT_FOR_SEQ_REQS = 60 Logger = logging.getLogger(__name__) class InvalidClientResponse: def __init__(self): self.status = None async def fetch(uri, session, body=F...
from django.db import models from covid_data.models.base import ModeloBase class Sector(ModeloBase): """Identifica el tipo de institución del Sistema Nacional de Salud que brindó la atención. """ clave = models.IntegerField(unique=True) descripcion = models.CharField(max_length=63) def __repr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayUserStepcounterQueryResponse(AlipayResponse): def __init__(self): super(AlipayUserStepcounterQueryResponse, self).__init__() self._count = None ...
#!/usr/bin/env python import sys, os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import messagebird # ACCESS_KEY = '' # PHONE_NUMBER = '' try: ACCESS_KEY except NameError: print('You need to set an ACCESS_KEY constant in this file') sys.exit(1) try: PHONE_NUMBER except NameError: print...
while 0 < 1: mec = input("Valor da Medardoria: ") icns = float(mec) * 17/100 irpf = float(mec) * 15/100 csll = float(mec) * 7.6/100 cofins = float(mec) * 3/100 pis = float(mec) * 1.65/100 me = float(mec) - (icns + irpf + cofins + pis + csll) print("<<<<<<<<<<<RESLTADO>>>>>>>>>>"...
from ._fastfood import Fastfood __all__ = ['Fastfood']
from django.shortcuts import render,redirect from django.http import HttpResponse from django.conf import * from .models import User import json # Create your views here. def login(request): return render(request,'account/login.html') def dologin(request): username=request.POST['username'] pwd=request....
#! /usr/bin/env python #-****************************************************************************** # # Copyright (c) 2012-2013, # Sony Pictures Imageworks Inc. and # Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd. # # All rights reserved. # # Redistribution and use in source and bina...
# Copyright 2022 The Balsa 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 law or agreed to in wr...
# -*- coding: utf-8 -*- """Main module.""" import sys import urllib.request import re def main(): '''Checks that an argument has been given, otherwise returns and error. Then checks that the file contains something. Then it converts the file to a string, takes the first line as the size of the array for our ...
import os import logging import sys import tempfile from setuptools import setup, find_packages from setuptools.command.install import install VERSION='1.1.4' def readme(): """Use `pandoc` to convert `README.md` into a `README.rst` file.""" if os.path.isfile('README.md') and any('dist' in x for x in sys.argv[1:]...
import argparse class Arguments(): def __init__(self): self.parser = argparse.ArgumentParser( description=''' Quick & easy to use nutritional supplement tracking software https://github.com/ncdulo/suppylement ''' ) # Shoul...
from timeslot import TimeSlot, sort_by_begin_time, sort_by_end_time from random import shuffle import arrow, timeslot ############################################################################# # # Testing Merge # ############################################################################# def test_merge_unable():...
from zoloto.cameras.camera import Camera # noqa from zoloto.cameras.file import ImageFileCamera, VideoFileCamera # noqa
from dagster_graphql.client.query import START_PIPELINE_EXECUTION_MUTATION, SUBSCRIPTION_QUERY from dagster_graphql.implementation.context import DagsterGraphQLContext from dagster_graphql.implementation.pipeline_execution_manager import SubprocessExecutionManager from dagster_graphql.schema import create_schema from d...
from datetime import timedelta import pendulum import pytest import logging from uuid import uuid4 from unittest.mock import MagicMock import prefect from prefect.client.client import FlowRunInfoResult, ProjectInfo from prefect.engine import signals, state from prefect.run_configs import UniversalRun from prefect.bac...
import time import random import logging from datetime import datetime from osgate.connectors.connector import AbstractConnector, ConnectorBase log = logging.getLogger(__name__) class DefaultConnector(AbstractConnector, ConnectorBase): """Used for testing of design pattern; allows non-existing connector and dev...
from os import environ, path from ._settings_default import * from ..exceptions import ImproperlyConfigured PROFILE = environ.get("GOLD_DIGGER_PROFILE", "local") if PROFILE == "master": from ._settings_master import * elif PROFILE == "local": try: from ._settings_local import * except ImportError...
from django.urls import path from . import views urlpatterns = [ path('', views.data_view, name='data_view'), ]
from random import randint class Die(): """表示一个骰子的类""" def __init__(self,number_size = 6): self.number_size = number_size #翻滚骰子 def roll(self): """返回一个位于1和骰子面数之间的随机数""" return randint(1,self.number_size)
"""Voorbeeld met 2 armen.""" from asyncgcodecli import UArm async def move_script(uarms: UArm): """Script that moves the robot arm.""" # set de robot arm mode to 0 (pomp) for uarm in uarms: uarm.set_mode(0) for _ in range(1, 5): for uarm in uarms: await uarm.sleep(0) ...
from django.db import models # Create your models here. class List(models.Model): item = models.CharField(max_length=200) completed = models.BooleanField(default=False) def __str__(self): return self.item + ' | ' + str(self.completed)
import unittest import logging from varfilter import filter class Testfilter(unittest.TestCase): def setUp(self): print('Preparando el contexto') def test_fint_int_ok(self): print('fint con entero correcto') t = filter.fint(10) self.assertEqual(t, 10) def test_fint_str_o...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('spam', '0001_initial'), ] operat...
from messagebird.base import Base from messagebird.formats import Formats from messagebird.hlr import HLR class Lookup(Base): def __init__(self): self.href = None self.countryCode = None self.countryPrefix = None self.phoneNumber = None self.type = None self._format...
# import commands import commands # password helper import json from getpass import getpass # define 'submitnonce' command def parse(cmd, arguments, connection): if len(arguments) != 2: print("error: '"+cmd.name+"' requires one argument.") else: nonce = arguments[1] response, result ...
""" *C♯ - Level 4* """ from ..._pitch import Pitch __all__ = ["Cs4"] class Cs4( Pitch, ): pass
for i in range(1,5): #More than 2 lines will result in 0 score. Do not leave a blank line also print(int(pow(10,i)/9) * i)
import datetime import getpass import os import platform import pwd import socket import sys import time def collect_python_facts(): return { 'version': { 'major': sys.version_info[0], 'minor': sys.version_info[1], 'micro': sys.version_info[2], 'releaselevel...
"""Token module to indicate that a feed plugin for LOFAR can be generated from here. """ # Since the LOFAR project provides an AntPat compatible file of beam-model data, # no initialization steps are necessary.
""" A collection of modules for collecting, analyzing and plotting financial data. User contributions welcome! """ #from __future__ import division import os, time, warnings, md5 from urllib import urlopen try: import datetime except ImportError: raise SystemExit('The finance module requires datetime support...
"""This script uses web.py to control and retreive the state of thermostats in a home. """ import json import random import web # web.py definition that maps /anything to the Index class defined below urls = ('/(.*)', 'Index') # In memory database for existing sensors sensor_devices_in_home = {} def setup_devices(...