content
stringlengths
7
1.05M
fixed_cases
stringlengths
1
1.28M
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Subileau (@ksubileau) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r''' --- module: win_rds_rap short_description: Manage Resource Authorization Policies (RAP) on a Remote Desktop Gat...
documentation = '\n---\nmodule: win_rds_rap\nshort_description: Manage Resource Authorization Policies (RAP) on a Remote Desktop Gateway server\ndescription:\n - Creates, removes and configures a Remote Desktop resource authorization policy (RD RAP).\n - A RD RAP allows you to specify the network resources (computers...
name = 'causalml' __version__ = '0.11.1' __all__ = ['dataset', 'features', 'feature_selection', 'inference', 'match', 'metrics', 'optimize', 'propensity']
name = 'causalml' __version__ = '0.11.1' __all__ = ['dataset', 'features', 'feature_selection', 'inference', 'match', 'metrics', 'optimize', 'propensity']
# ************************************************************************* # # Author: Pawel Rosikiewicz # # Copyrith: IT IS NOT ALLOWED TO COPY OR TO DISTRIBUTE # # these file without written # #...
"""THIS FILE CONTAINS ONLY ONE VARIABLE, A BASEDIRECTORY, THAT ALLOWS MANAGING FILE DIRECTORIESS TO ALL FILES USED BY PROJECT SOFTWARE AND SCRIPTS""" basedir = '/Users/pawel/Desktop/Activities/005__COURSES/000__EPFLext_ADSML/Module 5 __ CAPSTONE PROJECT/skin_cancer_detection'
"""Encoding PDUs for use in testing.""" ############################# A-ASSOCIATE-RQ PDU ############################# # Called AET: ANY-SCP # Calling AET: ECHOSCU # Application Context Name: 1.2.840.10008.3.1.1.1 # Presentation Context Items: # Presentation Context ID: 1 # Abstract Syntax: 1.2.840.10008.1.1 Verifi...
"""Encoding PDUs for use in testing.""" a_associate_rq = b'\x01\x00\x00\x00\x00\xd1\x00\x01\x00\x00ANY-SCP ECHOSCU \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x151.2.840.10008.3.1.1.1 \x00\x00.\x01\x00\x00\x...
def reverse_list(ll): """Reverses a linked list Args: ll: linked list Returns: linked list in reversed form """ # put your function implementation here return ll
def reverse_list(ll): """Reverses a linked list Args: ll: linked list Returns: linked list in reversed form """ return ll
# # PySNMP MIB module ASANTE-SWITCH-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASANTE-SWITCH-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:09:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint, constraints_union) ...
# Okta codility challenge def solution(A, Y): # write your code in Python 3.6 clientTimestamps = {} clients = [] resultMap = {} result = [] for cur in A: client = cur.split(' ')[0] timestamp = cur.split(' ')[1] if client not in clientTimestamps: clients.ap...
def solution(A, Y): client_timestamps = {} clients = [] result_map = {} result = [] for cur in A: client = cur.split(' ')[0] timestamp = cur.split(' ')[1] if client not in clientTimestamps: clients.append(client) clientTimestamps[client] = list([timest...
class Circle: __pi = 3.14 def __init__(self, diameter): self.radius = diameter / 2 self.diameter = diameter def calculate_circumference(self): return self.diameter * self.__pi def calculate_area(self): radius = self.diameter / 2 return radius * radius * self.__...
class Circle: __pi = 3.14 def __init__(self, diameter): self.radius = diameter / 2 self.diameter = diameter def calculate_circumference(self): return self.diameter * self.__pi def calculate_area(self): radius = self.diameter / 2 return radius * radius * self.__...
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 """Packaging of Linux, macOS and Windows binaries into tarballs""" load("@os_info//:os_info.bzl", "is_windows") def _package_app_impl(ctx): files = depset(ctx.attr.binary.files)...
"""Packaging of Linux, macOS and Windows binaries into tarballs""" load('@os_info//:os_info.bzl', 'is_windows') def _package_app_impl(ctx): files = depset(ctx.attr.binary.files) runfiles = ctx.attr.binary.default_runfiles.files datafiles = ctx.attr.binary[DefaultInfo].data_runfiles.files args = ctx.act...
permissions = [ 'accessapproval.requests.approve', 'accessapproval.requests.dismiss', 'accessapproval.requests.get', 'accessapproval.requests.list', 'accessapproval.settings.get', 'accessapproval.settings.update', 'androidmanagement.enterprises.manage', 'appengine.applications.create', 'appengine.applications....
permissions = ['accessapproval.requests.approve', 'accessapproval.requests.dismiss', 'accessapproval.requests.get', 'accessapproval.requests.list', 'accessapproval.settings.get', 'accessapproval.settings.update', 'androidmanagement.enterprises.manage', 'appengine.applications.create', 'appengine.applications.get', 'app...
ALL_BLUE_MOUNTAINS_SERVICES = range(9833, 9848) INBOUND_BLUE_MOUNTAINS_SERVICES = (9833, 9835, 9838, 9840, 9841, 9843, 9844, 9847) YELLOW_LINE_SERVICES = [9901, 9903, 9904, 9906, 9908, 9909, 9911, 9964, 9965, 9966, 9967, 9968, 9969, 9972, 9973, 9974] # 9847 has...
all_blue_mountains_services = range(9833, 9848) inbound_blue_mountains_services = (9833, 9835, 9838, 9840, 9841, 9843, 9844, 9847) yellow_line_services = [9901, 9903, 9904, 9906, 9908, 9909, 9911, 9964, 9965, 9966, 9967, 9968, 9969, 9972, 9973, 9974] test_services = (9843,) lithgow_to_central_origins = ('Lithgow Statio...
study_name = 'mperf' # Sampling frequency SAMPLING_FREQ_RIP = 21.33 SAMPLING_FREQ_MOTIONSENSE_ACCEL = 25 SAMPLING_FREQ_MOTIONSENSE_GYRO = 25 # MACD (moving average convergence divergence) related threshold FAST_MOVING_AVG_SIZE = 13 SLOW_MOVING_AVG_SIZE = 131 # FAST_MOVING_AVG_SIZE = 20 # SLOW_MOVING_AVG_SIZE = 205 #...
study_name = 'mperf' sampling_freq_rip = 21.33 sampling_freq_motionsense_accel = 25 sampling_freq_motionsense_gyro = 25 fast_moving_avg_size = 13 slow_moving_avg_size = 131 min_roll = -20 max_roll = 65 min_pitch = -125 max_pitch = -40 min_mshrv_accel = -2.5 max_mshrv_accel = 2.5 min_mshrv_gyro = -250 max_mshrv_gyro = 2...
class Printer: """ Class for printing string with specific color Color list: blue, green, cyan, red, white """ def __init__(self): self.__BLUE = '\033[1;34;48m' self.__GREEN = '\033[1;32;48m' self.__CYAN = '\033[1;36;48m' self.__RED = '\033[1;31;48m' self.__TE...
class Printer: """ Class for printing string with specific color Color list: blue, green, cyan, red, white """ def __init__(self): self.__BLUE = '\x1b[1;34;48m' self.__GREEN = '\x1b[1;32;48m' self.__CYAN = '\x1b[1;36;48m' self.__RED = '\x1b[1;31;48m' self.__T...
x = y = 1 print(x,y) x = y = z = 1 print(x,y,z)
x = y = 1 print(x, y) x = y = z = 1 print(x, y, z)
"""Custom exceptions for the application""" class InvalidConfigException(Exception): """Exception that is thrown if the configuration file is not valid""" def __init__(self): super().__init__('Configuration file is not valid. \ Please review the docs and check your config file.')
"""Custom exceptions for the application""" class Invalidconfigexception(Exception): """Exception that is thrown if the configuration file is not valid""" def __init__(self): super().__init__('Configuration file is not valid. Please review the docs and check your config file.')
#-*- coding: utf-8 -*- # Let's start with lists spam = ["eggs", 7.12345] # This is a list, a comma-separated sequence of values between square brackets print(spam) print(type(spam)) eggs = [spam, 1.2345, "fooo"] # No problem with multi-line declaration print(eggs) #========...
spam = ['eggs', 7.12345] print(spam) print(type(spam)) eggs = [spam, 1.2345, 'fooo'] print(eggs) spam = ['eggs'] print(spam) spam = [] print(spam) spam = ('eggs', 7.12345) print(spam) print(type(spam)) eggs = (spam, 1.2345, 'fooo') print(eggs) spam = ['1st', '2nd', '3rd', '4th', '5th'] eggs = (spam, 1.2345, 'fooo') pri...
""" some constants """ # pylint: disable=invalid-name version_info = (0, 2, 0, "dev") __version__ = ".".join(map(str, version_info)) module_name = "@deathbeds/wxyz-yaml" module_version = "^0.2.0"
""" some constants """ version_info = (0, 2, 0, 'dev') __version__ = '.'.join(map(str, version_info)) module_name = '@deathbeds/wxyz-yaml' module_version = '^0.2.0'
#define a dictionary data structure #dictionaries have key:valyue pairs for the elements example_dict = { "class" : "ASTR 119", "prof" : "Brant", "awesomeness" : 10 } print ("The type of example_dict is ", type(example_dict)) #get value via key course = example_dict["class"] print(course) example_dict["awesomene...
example_dict = {'class': 'ASTR 119', 'prof': 'Brant', 'awesomeness': 10} print('The type of example_dict is ', type(example_dict)) course = example_dict['class'] print(course) example_dict['awesomeness'] += 1 print(example_dict) for x in example_dict.key(): print(x, example_dict[x])
class BaseLoadOn(Enum,IComparable,IFormattable,IConvertible): """ An enumerated type listing all the possible power load use types for a space object. enum BaseLoadOn,values: kNoOfBaseLoadOnMethods (3),kUseActualLoad (2),kUseCalculatedLoad (1),kUseDefaultLoad (-1),kUseEnteredLoad (0) """ def __eq__(self,...
class Baseloadon(Enum, IComparable, IFormattable, IConvertible): """ An enumerated type listing all the possible power load use types for a space object. enum BaseLoadOn,values: kNoOfBaseLoadOnMethods (3),kUseActualLoad (2),kUseCalculatedLoad (1),kUseDefaultLoad (-1),kUseEnteredLoad (0) """ def __eq__(s...
## @ GpioDataConfig.py # This is a Gpio config script for Slim Bootloader # # Copyright (c) 2020, Intel Corporation. All rights reserved. <BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # # The index for a group has to match implementation # in a platform specific Gpio library. # grp_info_lp = { # Grp ...
grp_info_lp = {'GPP_B': [0], 'GPP_T': [1], 'GPP_A': [2], 'GPP_R': [3], 'GPP_S': [5], 'GPP_H': [6], 'GPP_D': [7], 'GPP_U': [8], 'GPP_C': [10], 'GPP_F': [11], 'GPP_E': [12]} grp_info_h = {'GPP_A': [1], 'GPP_R': [2], 'GPP_B': [3], 'GPP_D': [4], 'GPP_C': [5], 'GPP_S': [6], 'GPP_G': [7], 'GPP_E': [9], 'GPP_F': [10], 'GPP_H'...
class Solution: def flipAndInvertImage(self, A: [[int]]) -> [[int]]: for row in A : left, right = 0 , len(row) -1 while left < right : if row[left] == row[right] : row[left] ^= 1 row[right] ^= 1 left += 1 ...
class Solution: def flip_and_invert_image(self, A: [[int]]) -> [[int]]: for row in A: (left, right) = (0, len(row) - 1) while left < right: if row[left] == row[right]: row[left] ^= 1 row[right] ^= 1 left += 1 ...
def read_input(): with open("input.txt", "r") as file: d = [c[2:].split("..") for c in file.read()[13:].split(", ")] return [int(i) for s in d for i in s] def bruteforce(y_v, x_v, b): x,y = 0,0 while True: x+=x_v y+=y_v if b[0] <= x <= b[1] and b[2] <= y <= b[3]: ...
def read_input(): with open('input.txt', 'r') as file: d = [c[2:].split('..') for c in file.read()[13:].split(', ')] return [int(i) for s in d for i in s] def bruteforce(y_v, x_v, b): (x, y) = (0, 0) while True: x += x_v y += y_v if b[0] <= x <= b[1] and b[2] <= y <=...
#!/usr/bin/python # Filename: ex_global.py x = 50 def func(): global x print('x is ', x) x = 2 print('Changed local x to ', x) func() print('Value of x is ', x)
x = 50 def func(): global x print('x is ', x) x = 2 print('Changed local x to ', x) func() print('Value of x is ', x)
USAGE_MSG = """ Usage: golem golem run <project> <test|suite|dir> [-b -t -e] golem gui [-p] golem createproject <project> golem createtest <project> <test> golem createsuite <project> <suite> golem createuser <username> <password> [-a -p -r] Usage: golem run Run tests or suites positional arguments...
usage_msg = '\nUsage: golem\n\n golem run <project> <test|suite|dir> [-b -t -e]\n golem gui [-p]\n golem createproject <project>\n golem createtest <project> <test>\n golem createsuite <project> <suite>\n golem createuser <username> <password> [-a -p -r]\n\nUsage: golem run\n\n Run tests or suites\n\n positiona...
class RUNLOG: class STATUS: SUCCESS = "SUCCESS" PENDING = "PENDING" RUNNING = "RUNNING" FAILURE = "FAILURE" WARNING = "WARNING" ERROR = "ERROR" APPROVAL = "APPROVAL" APPROVAL_FAILED = "APPROVAL_FAILED" ABORTED = "ABORTED" ABORTING = "AB...
class Runlog: class Status: success = 'SUCCESS' pending = 'PENDING' running = 'RUNNING' failure = 'FAILURE' warning = 'WARNING' error = 'ERROR' approval = 'APPROVAL' approval_failed = 'APPROVAL_FAILED' aborted = 'ABORTED' aborting = 'A...
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
"""MySQL Connector/Python version information The file version.py gets installed and is available after installation as mysql.connector.version. """ version = (8, 0, 5, 'b', 1) if VERSION[3] and VERSION[4]: version_text = '{0}.{1}.{2}{3}{4}'.format(*VERSION) else: version_text = '{0}.{1}.{2}'.format(*VERSION[0...
l=int(input("enter length: ")) b=int(input("enter breath: ")) area=l*b perimeter=2*(l+b) print(area) print(perimeter)
l = int(input('enter length: ')) b = int(input('enter breath: ')) area = l * b perimeter = 2 * (l + b) print(area) print(perimeter)
# Simple Math Libraries def add(*nums): number = 0 for num in nums: number += num return number def sub(*nums): number = 0 for num in nums: number -= num return number def multiply(*nums): number = 1 for num in nums: number *= num retu...
def add(*nums): number = 0 for num in nums: number += num return number def sub(*nums): number = 0 for num in nums: number -= num return number def multiply(*nums): number = 1 for num in nums: number *= num return number def square(num): return num ** 2...
""" Faca um programa que receba 6 numeros inteiros e mostre: - Os numeros pares digitados; -A soma dos numeros pares digitados; -Os numeros impares digitados; -A quantidade de numeros impares digitados; """ x = [] soma = 0 quant = 0 for z in range(6): x.append(int(input('Digite um numero: '))) print('Numeros pa...
""" Faca um programa que receba 6 numeros inteiros e mostre: - Os numeros pares digitados; -A soma dos numeros pares digitados; -Os numeros impares digitados; -A quantidade de numeros impares digitados; """ x = [] soma = 0 quant = 0 for z in range(6): x.append(int(input('Digite um numero: '))) print('Numeros pare...
#!/usr/bin/env python # coding: utf-8 def countAnswers(__values): batchComplete = False answerCount = 0 answerDict = {} for answers in __values: for answer in answers: answerDict[answer] = 1 if answers == '': batchComplete = True if batchComplete: ...
def count_answers(__values): batch_complete = False answer_count = 0 answer_dict = {} for answers in __values: for answer in answers: answerDict[answer] = 1 if answers == '': batch_complete = True if batchComplete: answer_count += len(answerDic...
# -*- coding: utf-8 -*- # Copyright 2020 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Templates for generating event classes for structured metrics.""" HEADER_FILE_TEMPLATE = """\ // Generated from gen_events.py...
"""Templates for generating event classes for structured metrics.""" header_file_template = '// Generated from gen_events.py. DO NOT EDIT!\n// source: structured.xml\n\n#ifndef {file.guard_path}\n#define {file.guard_path}\n\n#include <cstdint>\n#include <string>\n\n#include <brillo/brillo_export.h>\n\n#include "metrics...
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from matplotlib import style\n", "style.use('fivethirtyeight')\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "code", "execution_count":...
{'cells': [{'cell_type': 'code', 'execution_count': 1, 'metadata': {}, 'outputs': [], 'source': ['%matplotlib inline\n', 'from matplotlib import style\n', "style.use('fivethirtyeight')\n", 'import matplotlib.pyplot as plt']}, {'cell_type': 'code', 'execution_count': 2, 'metadata': {}, 'outputs': [], 'source': ['import ...
#!/usr/bin/env python3 class ObjInfo(dict): def __init__(self): #, pre_id, name, letter, expire_state, id): self.side_id_name = ['front', 'back', 'left_side', 'right_side', 'bottom', 'side_id5', 'side_id6', 'side_id7', 'side_id8', 'side_id9'] self.obj = { # predefined merchandise infor...
class Objinfo(dict): def __init__(self): self.side_id_name = ['front', 'back', 'left_side', 'right_side', 'bottom', 'side_id5', 'side_id6', 'side_id7', 'side_id8', 'side_id9'] self.obj = {'pre_id': None, 'name': '', 'letter': '', 'expired': '', 'id': None, 'side_id': '', 'pos': None, 'vector': None...
# Version number as Major.Minor.Patch # The version modification must respect the following rules: # Major should be incremented in case there is a breaking change. (eg: 2.5.8 -> 3.0.0) # Minor should be incremented in case there is an enhancement. (eg: 2.5.8 -> 2.6.0) # Patch should be incremented in case there is a b...
__version__ = '3.3.1'
# https://codeforces.com/problemset/problem/427/A n = int(input()) events = [int(x) for x in input().split()] counter = 0 free_officer = 0 for event in events: free_officer += event if free_officer < 0: counter += 1 free_officer = 0 print(counter)
n = int(input()) events = [int(x) for x in input().split()] counter = 0 free_officer = 0 for event in events: free_officer += event if free_officer < 0: counter += 1 free_officer = 0 print(counter)
class Menu: def __init__(self, options: list): self.options = options def printMenu(self): print(' [ Main Menu ] ') for i in range(len(self.options)): print((i + 1), '::', self.options[i]) def getMenuInput(self, waitValidated: bool): returnValue = -2 ...
class Menu: def __init__(self, options: list): self.options = options def print_menu(self): print(' [ Main Menu ] ') for i in range(len(self.options)): print(i + 1, '::', self.options[i]) def get_menu_input(self, waitValidated: bool): return_value = -2 ...
# TASK """Given names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each queried, print the associated entry from your phone book on a new line in the form name=phoneNumber; if...
"""Given names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each queried, print the associated entry from your phone book on a new line in the form name=phoneNumber; if an ent...
# python DDP_moco_ccrop.py path/to/this/config # model dim = 128 model = dict(type='ResNet', depth=18, num_classes=dim, maxpool=False) moco = dict(dim=dim, K=65536, m=0.999, T=0.20, mlp=True) loss = dict(type='CrossEntropyLoss') # data root = '/path/to/your/dataset' mean = (0.4914, 0.4822, 0.4465) std = (0.2023, 0.19...
dim = 128 model = dict(type='ResNet', depth=18, num_classes=dim, maxpool=False) moco = dict(dim=dim, K=65536, m=0.999, T=0.2, mlp=True) loss = dict(type='CrossEntropyLoss') root = '/path/to/your/dataset' mean = (0.4914, 0.4822, 0.4465) std = (0.2023, 0.1994, 0.201) batch_size = 512 num_workers = 4 data = dict(train=dic...
#@liveupdate("globalClassMethod", "svc.debug::debugSvc", "OnRemoteExec") def OnRemoteExec(self, signedCode): eve.Message("CustomNotify", {"notify": "OnRemoteExec called"}) # No need to check if we're a client! code = marshal.loads(signedCode) self._Exec(code, {})
def on_remote_exec(self, signedCode): eve.Message('CustomNotify', {'notify': 'OnRemoteExec called'}) code = marshal.loads(signedCode) self._Exec(code, {})
#frase = 'Curso em video python' #print(frase[:13]) #frase = ' Curso em video python ' #print(len(frase.strip())) #frase = 'Curso em Video Python' #print(frase.replace('Python', 'Android')) #frase ='Curso em Video Python' #print('Curso' in frase) frase = 'Curso em Vidio Python' dividido = frase.split() print(di...
frase = 'Curso em Vidio Python' dividido = frase.split() print(dividido[0])
# # PySNMP MIB module CISCO-GPRS-L2RLY-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-GPRS-L2RLY-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:42:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (defau...
(integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_range_constraint, constraints_union, single_value_constraint, constraints_intersection, value_size_constraint) ...
""" This is the Scratchpad! This file is not graded, but you can use it to test your code. You can write and test your function in the Scratchpad, but make sure to copy and paste it into the Unit Test file before checking your answer. Remember to only copy and paste the function you want to submit, not all of your tes...
""" This is the Scratchpad! This file is not graded, but you can use it to test your code. You can write and test your function in the Scratchpad, but make sure to copy and paste it into the Unit Test file before checking your answer. Remember to only copy and paste the function you want to submit, not all of your tes...
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = () MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/tmp/locality.db' } } TIME_ZONE = "UTC" LANGUAGE_CODE = "en-us" SITE_ID = 1 USE_I18N = True USE_L10N = True MEDIA_ROOT = '' MEDIA_URL = '' STATIC_ROOT = '' STATIC_URL = '...
debug = True template_debug = DEBUG admins = () managers = ADMINS databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/tmp/locality.db'}} time_zone = 'UTC' language_code = 'en-us' site_id = 1 use_i18_n = True use_l10_n = True media_root = '' media_url = '' static_root = '' static_url = '/static/' ...
"""pynter - Minimal utility for generating images with textual caption""" __version__ = '0.1.0' __author__ = 'Gabriele Picco <piccogabriele@gmail.com>' __all__ = []
"""pynter - Minimal utility for generating images with textual caption""" __version__ = '0.1.0' __author__ = 'Gabriele Picco <piccogabriele@gmail.com>' __all__ = []
#program to convert a list of tuples into a dictionary. #create a list l = [("x", 1), ("x", 2), ("x", 3), ("y", 1), ("y", 2), ("z", 1)] d = {} for a, b in l: d.setdefault(a, []).append(b) print (d)
l = [('x', 1), ('x', 2), ('x', 3), ('y', 1), ('y', 2), ('z', 1)] d = {} for (a, b) in l: d.setdefault(a, []).append(b) print(d)
floor_number = int(input()) room_number = int(input()) for floor in range(floor_number, 0, -1): if floor == floor_number: result = [f'L{floor}{room}' for room in range(room_number)] print(' '.join(result)) continue if floor % 2 == 0: result = [f'O{floor}{room}' for ...
floor_number = int(input()) room_number = int(input()) for floor in range(floor_number, 0, -1): if floor == floor_number: result = [f'L{floor}{room}' for room in range(room_number)] print(' '.join(result)) continue if floor % 2 == 0: result = [f'O{floor}{room}' for room in range(...
class User: last_name = '' first_name = '' email = '' def authenticate(self): # some logic to authenticate should be added here, currently it does nothing # e.g. we can access the attributes of the object to authenticate via email # address. Here, we just print it out instead ...
class User: last_name = '' first_name = '' email = '' def authenticate(self): print('logging in user ' + self.first_name + ' ' + self.last_name + ' with email address ' + self.email) def set_name(self, fn, ln): self.last_name = ln self.first_name = fn def set_email(sel...
def esPrimo(numero, a=2): #Caso base if numero <= 2: return True if (numero == 2) else False if numero%a==0: return False if a*a> numero: return True #Para al siguiente divisor return esPrimo(numero,a+1) def verificarLista(lista: list, contador=0, listaaux=None): ...
def es_primo(numero, a=2): if numero <= 2: return True if numero == 2 else False if numero % a == 0: return False if a * a > numero: return True return es_primo(numero, a + 1) def verificar_lista(lista: list, contador=0, listaaux=None): """Esta funcion verifica si la lista c...
grid = [ [ 8, 2,22,97,38,15, 0,40, 0,75, 4, 5, 7,78,52,12,50,77,91, 8], [49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48, 4,56,62, 0], [81,49,31,73,55,79,14,29,93,71,40,67,53,88,30, 3,49,13,36,65], [52,70,95,23, 4,60,11,42,69,24,68,56, 1,32,56,71,37, 2,36,91], [22,31,16,71,51,67,63,89,41,92,36,54,22,40,40,28,66,33...
grid = [[8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8], [49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 4, 56, 62, 0], [81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 3, 49, 13, 36, 65], [52, 70, 95, 23, 4, 60, 11, 42, 69, 24, 68, 56, 1, 32, 56, 71, 37, 2, 36, 91]...
# The MIT License (MIT) # # Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without ...
class Beautifieroptions: def __init__(self): self.indent_size = 4 self.indent_char = ' ' self.indent_with_tabs = False self.eol = 'auto' self.preserve_newlines = True self.max_preserve_newlines = 10 self.space_in_paren = False self.space_in_empty_pare...
class Aluno(): def __init__(self): self.nome = "Pinguim" self.rg = 1234567891011 self.curso = "missanga" def printa(self): print("nome = ",self.nome) print("rg = ",self.rg) print("curso = ",self.curso) Aluno = Aluno() Aluno.printa()
class Aluno: def __init__(self): self.nome = 'Pinguim' self.rg = 1234567891011 self.curso = 'missanga' def printa(self): print('nome = ', self.nome) print('rg = ', self.rg) print('curso = ', self.curso) aluno = aluno() Aluno.printa()
class RedisList: def __init__(self, redis, key, converter, content=None): self.key_ = key self.redis_ = redis self.converter_ = converter if content: self.reset(content) def __len__(self): return self.redis_.llen(self.key_) def __getitem__(self, index):...
class Redislist: def __init__(self, redis, key, converter, content=None): self.key_ = key self.redis_ = redis self.converter_ = converter if content: self.reset(content) def __len__(self): return self.redis_.llen(self.key_) def __getitem__(self, index):...
# # PySNMP MIB module NTPv4-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NTPv4-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:15:56 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23...
(octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (value_size_constraint, constraints_union, constraints_intersection, value_range_constraint, single_value_constraint) ...
def average_discount(list_of_changes): total = 0 count = 0 for change in list_of_changes: if change < 0: total += (- change) count += 1 return round((total / count), 2) def calculate_discount_averages(x): result=[] for i in x: try: ...
def average_discount(list_of_changes): total = 0 count = 0 for change in list_of_changes: if change < 0: total += -change count += 1 return round(total / count, 2) def calculate_discount_averages(x): result = [] for i in x: try: y = average_di...
n = int(input()) even_ones = set() odd_ones = set() index = 0 sum_of_chars = 0 for _ in range(n): name = input() index += 1 for char in name: sum_of_chars += int(ord(char)) sum_of_chars //= index if sum_of_chars % 2 == 0: even_ones.add(sum_of_chars) else: odd_ones.add(s...
n = int(input()) even_ones = set() odd_ones = set() index = 0 sum_of_chars = 0 for _ in range(n): name = input() index += 1 for char in name: sum_of_chars += int(ord(char)) sum_of_chars //= index if sum_of_chars % 2 == 0: even_ones.add(sum_of_chars) else: odd_ones.add(sum...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0. class Action(object): """ A build step """ def is_main(self): """ Returns True if this action needs no external tasks run to set it up """ return False def run(self, env): ...
class Action(object): """ A build step """ def is_main(self): """ Returns True if this action needs no external tasks run to set it up """ return False def run(self, env): pass def __str__(self): return self.__class__.__name__
# configs config_path = './config/config.yaml' # urls base_url = 'https://www.finanzen.net/index/' ext_urls = { 'DAX' : 'dax/30-werte', 'TECDAX' : 'tecdax/werte', 'DOW JONES' : 'dow_jones/werte', 'MDAX' : 'mdax/werte', 'SDAX' : 'sdax/werte', 'S&P...
config_path = './config/config.yaml' base_url = 'https://www.finanzen.net/index/' ext_urls = {'DAX': 'dax/30-werte', 'TECDAX': 'tecdax/werte', 'DOW JONES': 'dow_jones/werte', 'MDAX': 'mdax/werte', 'SDAX': 'sdax/werte', 'S&P500': 's&p_500/werte', 'NASDAQ100': 'nasdaq_100/werte', 'EUROSTOXX': 'euro_stoxx_50/werte', 'SMI'...
n = int(input("Enter Number:")) sum = 0 while(n != 0): sum += n % 10 n //= 10 #floor division print(sum)
n = int(input('Enter Number:')) sum = 0 while n != 0: sum += n % 10 n //= 10 print(sum)
# Interactive Coding Exercise 2 # Solution - Wrapped the input on line 4 in an int(). year = int(input("Which year do you want to check?")) if year % 4 == 0: if year % 100 == 0: if year % 400 == 0: print("Leap year.") else: print("Not leap year.") else: print("Leap year.") else: print("N...
year = int(input('Which year do you want to check?')) if year % 4 == 0: if year % 100 == 0: if year % 400 == 0: print('Leap year.') else: print('Not leap year.') else: print('Leap year.') else: print('Not leap year.')
def find_empty_space(board): """ find an empty space in the board param board: partially complete board return: (int, int) the row and the column """ for i in range(9): for j in range(9): if board[i][j] == 0: return (i,j) return None def valid_number(boar...
def find_empty_space(board): """ find an empty space in the board param board: partially complete board return: (int, int) the row and the column """ for i in range(9): for j in range(9): if board[i][j] == 0: return (i, j) return None def valid_number(boa...
class CPP: @staticmethod def __protection_exception(prop): raise Exception(f'Can not modify constant property: {prop}') @staticmethod def protect(obj, prop): setattr(obj.__class__, prop, property( lambda self: getattr(self, '_'+prop), lambda self, value: CPP.__pr...
class Cpp: @staticmethod def __protection_exception(prop): raise exception(f'Can not modify constant property: {prop}') @staticmethod def protect(obj, prop): setattr(obj.__class__, prop, property(lambda self: getattr(self, '_' + prop), lambda self, value: CPP.__protection_exception(pro...
class User: def __init__(self, username, password): self.name = username self.password = password def login(self): return def logout(self): return
class User: def __init__(self, username, password): self.name = username self.password = password def login(self): return def logout(self): return
def is_valid(s): stack = [] for i in range(len(s)): if s[i] == "(" or s[i] == "[" or s[i] == "{": stack.append(s[i]) else: if len(stack) == 0: return False if s[i] == ")" and stack[-1] != "(": return False if s[i] =...
def is_valid(s): stack = [] for i in range(len(s)): if s[i] == '(' or s[i] == '[' or s[i] == '{': stack.append(s[i]) else: if len(stack) == 0: return False if s[i] == ')' and stack[-1] != '(': return False if s[i] ==...
#W.A.P TO TAKE INPUT FROM USER (empid,name,salary) AND PRINT EMPLOYEE DETAILS emp=int(input('Enter employee ID:')) name=input('Enter your name:') sal=int(input('Enter your annual salary:')) print('Employee Details --> \n Employee ID:',emp,'\n Name:',name,'\n Annual Salary:',sal)
emp = int(input('Enter employee ID:')) name = input('Enter your name:') sal = int(input('Enter your annual salary:')) print('Employee Details --> \n Employee ID:', emp, '\n Name:', name, '\n Annual Salary:', sal)
def main(): def findMin(x): minNum = x[0] for i in x: if minNum > i: minNum = i return minNum print(findMin([0,1,2,3,4,5,-3,24,-56])) # = -56 if __name__ == '__main__': main()
def main(): def find_min(x): min_num = x[0] for i in x: if minNum > i: min_num = i return minNum print(find_min([0, 1, 2, 3, 4, 5, -3, 24, -56])) if __name__ == '__main__': main()
a = 'some_string' b = 'some' + '_' + 'string' c = 'somestring' print(id(a)) print(id(b)) print(id(c))
a = 'some_string' b = 'some' + '_' + 'string' c = 'somestring' print(id(a)) print(id(b)) print(id(c))
__all__ = ['split_and_load'] def split_and_load(data, ctx_list, batch_axis=0, even_split=True): """Splits an NDArray into `len(ctx_list)` slices along `batch_axis` and loads each slice to one context in `ctx_list`. Parameters ---------- data : NDArray A batch of data. ctx_list : list ...
__all__ = ['split_and_load'] def split_and_load(data, ctx_list, batch_axis=0, even_split=True): """Splits an NDArray into `len(ctx_list)` slices along `batch_axis` and loads each slice to one context in `ctx_list`. Parameters ---------- data : NDArray A batch of data. ctx_list : list o...
# Copyright 2019, A10 Networks # # 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...
loadbalancers_list = 'loadbalancers_list' vrid_list = 'vrid_list' set_thunder_update_at = 'set-thunder-update-at' set_thunder_backup_update_at = 'set-thunder-backup-update-at' member_count_ip = 'member_count_ip' member_count_ip_port_protocol = 'member_count_ip_port_protocol' pool_count_ip = 'pool_count_ip' write_mem_sh...
lots_of_numbers = range(-1000, 1000) the_same_numbers = range(-1000, 1000) same_numbers = ( i for i, j in zip(lots_of_numbers, the_same_numbers) if i is j ) print(*same_numbers, sep=", ")
lots_of_numbers = range(-1000, 1000) the_same_numbers = range(-1000, 1000) same_numbers = (i for (i, j) in zip(lots_of_numbers, the_same_numbers) if i is j) print(*same_numbers, sep=', ')
def rotate(string, n): """Rotate characters in a string. Expects string and n (int) for number of characters to move. """ return string[n:] + string[:n] print (rotate('pybites loves julian and bob!',-15))
def rotate(string, n): """Rotate characters in a string. Expects string and n (int) for number of characters to move. """ return string[n:] + string[:n] print(rotate('pybites loves julian and bob!', -15))
class Config: BOT_TOKEN = '' # from @botfather APP_ID = '' # from https://my.telegram.org/apps API_HASH = '' # from https://my.telegram.org/apps API_KEY = '' # from https://mixdrop.co API_EMA...
class Config: bot_token = '' app_id = '' api_hash = '' api_key = '' api_email = '' auth_users = [694380168]
debug = True run = { "echo": True }
debug = True run = {'echo': True}
age = float(input()) gender = input() if gender =="m": if age >= 16: print("Mr.") else: print("Master") if gender == "f": if age >= 16: print("Ms.") else: print("Miss")
age = float(input()) gender = input() if gender == 'm': if age >= 16: print('Mr.') else: print('Master') if gender == 'f': if age >= 16: print('Ms.') else: print('Miss')
""" Asked by: Snapchat [Easy]. Given an array of time intervals (start, end) for classroom lectures (possibly overlapping), find the minimum number of rooms required. For example, given [(30, 75), (0, 50), (60, 150)], you should return 2. """
""" Asked by: Snapchat [Easy]. Given an array of time intervals (start, end) for classroom lectures (possibly overlapping), find the minimum number of rooms required. For example, given [(30, 75), (0, 50), (60, 150)], you should return 2. """
T = int(input()) if 1 <= T <= 100: for i in range(T): N = int(input()) a = [] for j in range(N - 1): l = int(input()) if l <= N: a.append(l) for k in range(1, N + 1): if k not in a: print(k)
t = int(input()) if 1 <= T <= 100: for i in range(T): n = int(input()) a = [] for j in range(N - 1): l = int(input()) if l <= N: a.append(l) for k in range(1, N + 1): if k not in a: print(k)
# # PySNMP MIB module ALCATEL-IND1-IGMP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALCATEL-IND1-IGMP-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:17:51 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
(softent_ind1_igmp,) = mibBuilder.importSymbols('ALCATEL-IND1-BASE', 'softentIND1Igmp') (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString') (named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues') (single_value_constraint, valu...
def vector_bits2int(arr): n = arr.shape[0] # number of columns a = arr[0] << n - 1 for j in range(1, n): # "overlay" with the shifted bits of the next column a |= arr[j] << n - 1 - j return a
def vector_bits2int(arr): n = arr.shape[0] a = arr[0] << n - 1 for j in range(1, n): a |= arr[j] << n - 1 - j return a
#! /usr/bin/env python3 def func1(): x = set([1,2,3,4]) y = set([3,4,5,6,7]) z = frozenset([4,5]) print(x) print(y) x.add(5) x.remove(3) print(x) print("x|y=", x | y) # x U y print("x.union(y)=", x.union(y)) print("x&y=", x & y) # x ~U y print("x.intersection(y)=", x.intersection(y)) prin...
def func1(): x = set([1, 2, 3, 4]) y = set([3, 4, 5, 6, 7]) z = frozenset([4, 5]) print(x) print(y) x.add(5) x.remove(3) print(x) print('x|y=', x | y) print('x.union(y)=', x.union(y)) print('x&y=', x & y) print('x.intersection(y)=', x.intersection(y)) print('x-y=', x ...
size = 21 array = [[0 for i in range(size)] for j in range(size)] for i in range(size): array[0][i] = 1 array[i][0] = 1 for i in range(1,size): for j in range(1,size): array[i][j] = array[i-1][j] + array[i][j-1] print(array[size-1][size-1])
size = 21 array = [[0 for i in range(size)] for j in range(size)] for i in range(size): array[0][i] = 1 array[i][0] = 1 for i in range(1, size): for j in range(1, size): array[i][j] = array[i - 1][j] + array[i][j - 1] print(array[size - 1][size - 1])
""" File that contains configurations used by the model """ GRID_WIDTH = 10 GRID_HEIGHT = 40 SPAWN_LINE = 19
""" File that contains configurations used by the model """ grid_width = 10 grid_height = 40 spawn_line = 19
def peak(arr, low, high): n = len(arr) while low <= high: mid = low + (high - low) / 2 mid = int(mid) if (mid == 0 or arr[mid-1] <= arr[mid]) and (mid == n-1 or arr[mid+1] <= arr[mid]): return(arr[mid]) elif mid > 0 and arr[mid-1] > arr[mid]: ...
def peak(arr, low, high): n = len(arr) while low <= high: mid = low + (high - low) / 2 mid = int(mid) if (mid == 0 or arr[mid - 1] <= arr[mid]) and (mid == n - 1 or arr[mid + 1] <= arr[mid]): return arr[mid] elif mid > 0 and arr[mid - 1] > arr[mid]: high =...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
def main(client, routine_id): routine = client.get_routine(routine_id) routine.body = 'x * 4' routine = client.update_routine(routine, ['body', 'arguments', 'language', 'type_', 'return_type']) return routine
def vsota(mat1, mat2): vsota = [] for i in range(len(mat1)): nova_vrsta = [] for j in range(len(mat1[0])): nova_vrsta.append((mat1[i][j] + mat2[i][j])) vsota.append(nova_vrsta) return vsota def razlika(mat1, mat2): razlika = [] for i in range(len(mat1)): ...
def vsota(mat1, mat2): vsota = [] for i in range(len(mat1)): nova_vrsta = [] for j in range(len(mat1[0])): nova_vrsta.append(mat1[i][j] + mat2[i][j]) vsota.append(nova_vrsta) return vsota def razlika(mat1, mat2): razlika = [] for i in range(len(mat1)): no...
class CaseInsensitiveDict(dict): """ A dictionary in which the keys are case-insensitive. It is initialized the same way as a typical dict, but the values can be accessed without regard to key case. The value associated with key "Key" can also be accessed with "key" or "KEY" or "kEy". Paramete...
class Caseinsensitivedict(dict): """ A dictionary in which the keys are case-insensitive. It is initialized the same way as a typical dict, but the values can be accessed without regard to key case. The value associated with key "Key" can also be accessed with "key" or "KEY" or "kEy". Paramete...
# Testing configurations config = {} training_opt = {} training_opt['dataset'] = 'iNaturalist18' training_opt['log_dir'] = './logs/iNaturalist18' training_opt['num_classes'] = 8142 training_opt['batch_size'] = 64 training_opt['num_workers'] = 8 training_opt['num_epochs'] = 90 training_opt['display_step'] = 10 training...
config = {} training_opt = {} training_opt['dataset'] = 'iNaturalist18' training_opt['log_dir'] = './logs/iNaturalist18' training_opt['num_classes'] = 8142 training_opt['batch_size'] = 64 training_opt['num_workers'] = 8 training_opt['num_epochs'] = 90 training_opt['display_step'] = 10 training_opt['feature_dim'] = 2048...
#!/usr/bin/env python3 # This file is part of the kambpf project (https://github.com/zdule/part_ii_project). # It is file is offered under two licenses GPLv2 and Apache License Version 2. # For more information see the LICENSE file at the root of the project. # # Copyright 2020 Dusan Zivanovic first_dummy = "...
first_dummy = '\nnoinline int kambpf_test_dummy_0(int a) {\n return a;\n}\n' dummy_template = '\nnoinline int kambpf_test_dummy_$0(int a) {\n return kambpf_test_dummy_$1(a+1);\n}\n' print(first_dummy) for i in range(1, 5000): print(dummy_template.replace('$0', str(i)).replace('$1', str(i - 1)))
# -*- coding: utf-8 -*- # # Copyright 2019-2021 BigML # # 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 ...
"""Options for BigMLer PCA """ def get_pca_options(defaults=None): """Adding arguments for the pca subcommand """ if defaults is None: defaults = {} options = {'--pca-fields': {'action': 'store', 'dest': 'pca_fields', 'default': defaults.get('pca_fields', None), 'help': 'Comma-separated list ...
TESTING = True POSTGRESQL_DATABASE_URI = "" URLS = 'app.urls'
testing = True postgresql_database_uri = '' urls = 'app.urls'
text = input() cipher = [] for char in text: new_char = chr(ord(char) + 3) cipher.append(new_char) print(''.join(cipher))
text = input() cipher = [] for char in text: new_char = chr(ord(char) + 3) cipher.append(new_char) print(''.join(cipher))
a, b, c = map(int, input().split()) if c - b <= 0: result = -1 else: result = a // (c - b) result += 1 print(result)
(a, b, c) = map(int, input().split()) if c - b <= 0: result = -1 else: result = a // (c - b) result += 1 print(result)
class ListControls: def com(self, comment="", **kwargs): """Places a comment in the output. APDL Command: /COM Parameters ---------- comment Comment string, up to 75 characters. Notes ----- The output from this command consists of the co...
class Listcontrols: def com(self, comment='', **kwargs): """Places a comment in the output. APDL Command: /COM Parameters ---------- comment Comment string, up to 75 characters. Notes ----- The output from this command consists of the c...
def checkPassword(data): return (data["password"][data["pos1"] - 1] == data["char"]) != (data["password"][data["pos2"] -1 ] == data["char"]) passwords = [] with open("./2/input.txt") as inputFile: for line in inputFile: tokens = line.split(" ") minMax = tokens[0].split("-") data = { "pos1": int(minMax[0]), ...
def check_password(data): return (data['password'][data['pos1'] - 1] == data['char']) != (data['password'][data['pos2'] - 1] == data['char']) passwords = [] with open('./2/input.txt') as input_file: for line in inputFile: tokens = line.split(' ') min_max = tokens[0].split('-') data = {'p...
# Difficulty: Easy # Problem Statement: https://leetcode.com/problems/add-binary/ class Solution: def addBinary(self, a: str, b: str) -> str: return bin(int(a, 2) + int(b, 2))[2:]
class Solution: def add_binary(self, a: str, b: str) -> str: return bin(int(a, 2) + int(b, 2))[2:]
# -*- coding: utf-8 -*- """ Top-level package for Variational GCN """ __author__ = """anonymous due to blind submission to ICML 2020""" __email__ = '' __version__ = '0.1.0'
""" Top-level package for Variational GCN """ __author__ = 'anonymous due to blind submission to ICML 2020' __email__ = '' __version__ = '0.1.0'
# Het is so simpel als het toevoegen van een save commando aan het stuk # code die de chart daadwerkelijk genereert. In bovenstand voorbeeld dus: alt.vconcat(points, bars, data=data.seattle_weather.url, title="Seattle Weather: 2012-2015" ).save('Seattle.html') # De interactiviteit zit in je html file besloten...
alt.vconcat(points, bars, data=data.seattle_weather.url, title='Seattle Weather: 2012-2015').save('Seattle.html')
class Logedit: """ This object handles writing text outputs into a log file and to the screen as well. Class methods: -------------- init(logname, read=None): Creates a log instance into file logname. If read specified copies it's content into log. writelog(message): ...
class Logedit: """ This object handles writing text outputs into a log file and to the screen as well. Class methods: -------------- init(logname, read=None): Creates a log instance into file logname. If read specified copies it's content into log. writelog(message): ...
test = { 'name': 'q5_3', 'points': 1, 'suites': [ { 'cases': [ { 'code': '>>> # The statistic should be between 0 and 13 face cards for a sample size of 13;\n' '>>> num_face = deck_simulation_and_statistic(13, deck_model_probabilities);\n' ...
test = {'name': 'q5_3', 'points': 1, 'suites': [{'cases': [{'code': '>>> # The statistic should be between 0 and 13 face cards for a sample size of 13;\n>>> num_face = deck_simulation_and_statistic(13, deck_model_probabilities);\n>>> 0 <= num_face <= 13\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup...
pkg_dnf = { 'collectd': {}, } svc_systemd = { 'collectd': { 'needs': ['pkg_dnf:collectd'], }, } files = { '/etc/collectd.conf': { 'mode': '0600', 'content_type': 'mako', 'context': { 'collectd': node.metadata.get('collectd', {}), }, 'needs': ...
pkg_dnf = {'collectd': {}} svc_systemd = {'collectd': {'needs': ['pkg_dnf:collectd']}} files = {'/etc/collectd.conf': {'mode': '0600', 'content_type': 'mako', 'context': {'collectd': node.metadata.get('collectd', {})}, 'needs': ['pkg_dnf:collectd'], 'triggers': ['svc_systemd:collectd:restart']}, '/etc/collectd.d/nut.co...
class Aggrhapolicy(basestring): """ sfo|cfo Possible values: <ul> <li> "cfo" , <li> "sfo" </ul> """ @staticmethod def get_api_name(): return "aggrhapolicy"
class Aggrhapolicy(basestring): """ sfo|cfo Possible values: <ul> <li> "cfo" , <li> "sfo" </ul> """ @staticmethod def get_api_name(): return 'aggrhapolicy'
"""3. Extracting video features from pre-trained models ======================================================= Feature extraction is a very useful tool when you don't have large annotated dataset or don't have the computing resources to train a model from scratch for your use case. It's also useful to visualize what ...
"""3. Extracting video features from pre-trained models ======================================================= Feature extraction is a very useful tool when you don't have large annotated dataset or don't have the computing resources to train a model from scratch for your use case. It's also useful to visualize what ...