content
stringlengths
7
1.05M
def data_provider(fn_data_provider): """Data provider decorator, allows another callable to provide the data for the test""" def test_decorator(fn): def repl(self, *args): for i in fn_data_provider(): try: fn(self, *i) except AssertionError...
# Write It # Demonstrates writing to a text file # Запишем # Демонстрирует запись в текстовый файл # print("Creating a text file with the write() method.") print("Создаю текстовый файл методом write().") text_file = open("write_it_1.txt", "w") text_file.write("Line 1\n") text_file.write("This is line 2\n") text_file.w...
model_filename = "cifar10.model" data_filename = "cifar10.npz" model_url = "#" data_url = "https://github.com/danielwilczak101/EasyNN/raw/datasets/cifar/cifar10.npz" labels = { 0: "airplane", 1: "automobile", 2: "bird", 3: "cat", 4: "deer", 5: "d...
class Produto: # Classes começam com letra maiúscula #Construtor def __init__(self,nome,preco): self.nome = nome self.preco = preco #Getters @property def nome(self): return self.__nome @property def preco(self): return self.__preco #Setters @...
#Normalmenet se declara asi #numero = 9 #La variable que se relaciona con la instancia de una clase class Persona: edad=18#Clase Persona con variable de clase que es edad def __init__(self,nombre,nacionalidad): self.nombre=nombre#variables de instancia self.nacionalidad=nacionalidad persona1= Persona("Jose","Me...
# # PySNMP MIB module SIAE-IFEXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file://./sm_ifext.mib # Produced by pysmi-0.3.2 at Fri Jul 19 08:18:02 2019 # On host 0e190c6811ee platform Linux version 4.9.125-linuxkit by user root # Using Python version 3.7.3 (default, Apr 3 2019, 05:39:12) # Integer, OctetString, O...
"""Custom dataloaders for testing""" class CustomInfDataloader: def __init__(self, dataloader): self.dataloader = dataloader self.iter = iter(dataloader) self.count = 0 def __iter__(self): self.count = 0 return self def __next__(self): if self.count >= 50...
a = float(input("a = ")) b = float(input("b = ")) c = float(input("c = ")) if a==b==c: print('nothing') elif a==c: print(2) elif b==a: print(3) elif b==c: print(1) else: print('nothing')
""" Example Backup Plugin """ __import__("pkg_resources").declare_namespace(__name__)
# Copyright (c) 2020-2021 Matematyka dla Ciekawych Świata (http://ciekawi.icm.edu.pl/) # Copyright (c) 2020-2021 Robert Ryszard Paciorek <rrp@opcode.eu.org> # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Soft...
""" Management of OpenStack Neutron Security Group Rules ==================================================== .. versionadded:: 2018.3.0 :depends: shade :configuration: see :py:mod:`salt.modules.neutronng` for setup instructions Example States .. code-block:: yaml create security group rule: neutron_secg...
#!/usr/bin/env python3 """ This is the exceptions file foi the CalculationsWithDots project """ class InvalidName(Exception): """ Description of InvalidName This Exception class is raised, if the given name is invalid. """ pass class InvalidCoordinate(Exception): """ Description of InvalidCoordi...
# -*- coding: utf-8 -*- """@package Methods.Geometry.Segment.get_end Return the end point of an Segment method @date Created on Thu Jul 27 13:51:43 2018 @copyright (C) 2015-2016 EOMYS ENGINEERING. @author pierre_b @todo unittest it """ def get_end(self): """Return the end point of the segment Parameters ...
# 456. 132 Pattern """ Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k and nums[i] < nums[k] < nums[j]. Return true if there is a 132 pattern in nums, otherwise, return false. Follow up: The O(n^2) is trivial, could ...
#!/usr/bin/python """ This is a collections of functions common to the other, individual pieces of this project """ __author__ = "AJ Wilson" __copyright__ = " " __license__ = " " __version__ = "0.0.0.0" __maintainer__ = "AJ Wilson" __email__ = "aj.wilson08[at]gmail.com" __status__ = "WIP" def function1(): return...
def fib(n): ''' uses generater to return fibonacci sequence up to given # n dynamically ''' a,b = 1,1 for _ in range(0,n): yield a a,b = b,a+b return a
def negate_literal(L): return L[1:] if L[0] == '!' else '!' + L def unit_subsumption(P, u): return [ C for C in P if u not in C ] def unit_resolution(P, u): n = negate_literal(u) return [ ([l for l in C if l != n]) for C in P ] def simplify(F, L): return unit_resolution(unit_subsumption(F, L), L...
config = { "qqGroup": "", "pro_ids": ['11111', '22222'], "daily": { "pro_ids": ['11111'] }, # "pk": { # "me": "22222", # "vs": ['33333'] # } "dailyInterval": 25, "pkInterval": 30 }
class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def swapPairs(self, head): if not head: return None if not head.next: return head curr = head after = head.next pre = None head = after while after: curr.next = after.next after.next = cur...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ # CODE NAME HERE # CODE DESCRIPTION HERE Created on 2019-01-17 at 14:31 @author: cook """ __all__ = [] # ============================================================================= # Define functions # =============================================================...
{ 'targets': [ { 'target_name': 'brotli', 'type': 'static_library', 'include_dirs': ['c/include'], 'conditions': [ ['OS=="linux"', { 'defines': [ 'OS_LINUX' ] }], ['OS=="freebsd"', { 'defines': [ 'OS_FREEBSD' ...
'''Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$7,00 por cada Km acima do limite.''' print('-=-' *20) velocidade = float(input('\033[1mQual é a velocidade atual do carro?\033[m ')) print('-=-' *20) if velocidade >...
{ 'variables': { 'base_cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-std=c++11', ], 'debug_cflags': ['-g', '-O0'], 'release_cflags': ['-O3'], }, 'targets': [ { 'target_name': 'tonclient', 'sources': ['binding.cc'], 'conditions': [ [...
int1 = input("Enter first integer: ") int2 = input("Enter second integer: ") sum = int(int1) + int(int2) if sum in range(105, 201): print(200)
nome = input('Qual o seu nome, meu chapa? ') # print('Seja bem vindo meu camarada, ' + nome + '!') # print('Seja bem vindo meu camarada, {:20}!'.format(nome)) //Em 20 espaços # print('Seja bem vindo meu camarada, {:>20}!'.format(nome)) //Em 20 espaços e alinhado esquerda # print('Seja bem vindo meu camarada, {:^...
class Documents: def __init__(self, session): self.session = session def index_documents(self, content_source_key, documents, **kwargs): """Index a batch of documents in a content source. Raises :class:`~elastic_workplace_search.NonExistentRecord` if the content_source_key is m...
movie_name = ['加勒比海盗', '骇客帝国', '第一滴血', '指环王', '霍比特人', '速度与激情'] print('------删除之前--------') for temp in movie_name: print(temp) del movie_name[2] print('--------删除之后---------') for temp in movie_name: print(temp)
# Create Plotter acc_plotter = skdiscovery.data_structure.series.accumulators.Plotter('Plotter') # Create stage containter for Plotter sc_plotter = StageContainer(acc_plotter)
# https://leetcode.com/problems/binary-watch/ # # algorithms # Easy (45.81%) # Total Accepted: 69,493 # Total Submissions: 151,697 class Solution(object): def readBinaryWatch(self, num): """ :type num: int :rtype: List[str] """ hour = [1, 2, 4, 8] minute = [1, 2...
""" An *example* .bzl file. You will find here a rule, a macro and the implementation function for the rule. """ def custom_macro(name, format, srcs=[]): '''Custom macro documentation example. Args: :param format: The format to write check report in. :param srcs: Source files to run the checks again...
# ---------------------------------------------------------------------- # ctokens.py # # Token specifications for symbols in ANSI C and C++. This file is # meant to be used as a library in other tokenizers. # ---------------------------------------------------------------------- # Reserved words tokens = [...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # ...
twitch_icon = "<:twitch:404633403603025921> " cmd_fail = "<:tickNo:342738745092734976> " cmd_success = "<:tickYes:342738345673228290> " loading = "<a:loading:515632705262583819> " bullet = "<:bullet:516382013779869726> " right_arrow_alt = "<:arrow:343407434746036224>" left_arrow = "<a:a_left_arrow:527634992415899650>" ...
list_a = [10, 20, 30] list_b = ["Jan", "Peter", "Max"] list_c = [True, False, True] for val_a, val_b, val_c in zip(list_a, list_b, list_c): print(val_a, val_b, val_c) print("\n") for i in range(len(list_a)): print(i, list_a[i]) print("\n") for i, val in enumerate(list_a): print(i, val)
class ViewDisplaySketchyLines(object,IDisposable): """ Represents the settings for sketchy lines. """ def Dispose(self): """ Dispose(self: ViewDisplaySketchyLines) """ pass def ReleaseUnmanagedResources(self,*args): """ ReleaseUnmanagedResources(self: ViewDisplaySketchyLines,disposing: bool) """ pass ...
# # @lc app=leetcode id=977 lang=python3 # # [977] Squares of a Sorted Array # # https://leetcode.com/problems/squares-of-a-sorted-array/description/ # # algorithms # Easy (72.86%) # Total Accepted: 56.2K # Total Submissions: 77.7K # Testcase Example: '[-4,-1,0,3,10]' # # Given an array of integers A s...
PATH_DATA = "../train_data/pan20-author-profiling-training-2020-02-23" PATH_DATA_EN = "../train_data/pan20-author-profiling-training-2020-02-23/en" PATH_DATA_ES = "../train_data/pan20-author-profiling-training-2020-02-23/es" PATH_DATA_EN_TRUTH = "../train_data/pan20-author-profiling-training-2020-02-23/en/truth.txt" PA...
__all__ = ['Meta'] class Meta: pass
# Copyright (c) 2019 zfit # TODO: improve errors of models. Generate more general error, inherit and use more specific? class PDFCompatibilityError(Exception): pass class LogicalUndefinedOperationError(Exception): pass class ExtendedPDFError(Exception): pass class AlreadyExtendedPDFError(ExtendedP...
# Analisando Triângulo v1.0 #a soma de dois lados é sempre menor que o terceiro lado. print('-=-' * 10) print('Analisador de triangulos') print('-=-' * 10) r1 = float(input('Primeiro segmento: ')) r2 = float(input('Segundo segmento: ')) r3 = float(input('Terceiro segmento: ')) soma12 = r1 + r2 soma13 = r1 + r3 soma23 =...
def good(): return ['Harry', 'Ron', 'Hermione'] # expected output: ''' ['Harry', 'Ron', 'Hermione'] ''' print( good() )
glosario = {'listas' : "Se pueden identificar con []", 'tuplas' : "Se identifican con *()", 'glosario' : "Se identifican con {}", 'if' : "Condicional", 'for' : "Ciclo", '#' : "Para crear un comentario", 'str' : "Abreviacion de String", '==' : "usado para comparar elementos", "=!" : "Usado para verificar que dos eleme...
n = 8 fib0 = 0 fib1 = 1 if n > 0: temp = fib0 fib0 = fib1 fib1 = fib1 + temp n = n - 1 else: print(f'Resultado {fib0}')
class Solution(object): def maxSlidingWindow(self, nums, k): """ :type nums: List[int] :type k: int :rtype: List[int] """ que, len1, len2 = [], 0, len(nums) ans = [] for i in range(k): while len1 > 0 and nums[i] >= que[-1][0]: ...
class ShellGame(object): def __init__(self, start, swaps): self.start = start self.swaps = swaps def find_the_ball(self): if len(self.swaps) == 0: return self.start else: for pos in self.swaps: for x in pos: self.start ...
""" from: http://adventofcode.com/2017/day/5 --- Part Two --- Now, the jumps are even stranger: after each jump, if the offset was three or more, instead decrease it by 1. Otherwise, increase it by 1 as before. Using this rule with the above example, the process now takes 10 steps, and the offset values after finding ...
ROP_POPJUMPLR_STACK12 = 0x0101CD24; ROP_POPJUMPLR_STACK20 = 0x01024D88; ROP_CALLFUNC = 0x01080274; ROP_CALLR28_POP_R28_TO_R31 = 0x0107DD70; ROP_POP_R28R29R30R31 = 0x0101D8D4; ROP_POP_R27 = 0x0101CB00; ROP_POP_R24_TO_R31 = 0x010204C8; ROP_CALLFUNCPTR_WITHARGS_FROM_R3MEM = 0x010253C0; ROP_SETR3TOR31_POP_R31 = 0x0101CC10;...
nome = input("qual é o seu nome?").strip() print("nome em letras maiusculas", nome.upper()) print("nome com letras minusculas", nome.lower()) print("numero de letras no nome {}".format(len(nome)-nome.count(" "))) print("primeiro nome tem {} letras".format())
class NoPrivateKey(Exception): """ No private key was provided so unable to perform any operations requiring message signing. """ pass class DigitalTwinMapError(Exception): """ No Digital Twin was created with this index or there is no such topic in Digital Twin map. """ pass
# # PySNMP MIB module CISCO-VPN-LIC-USAGE-MONITOR-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VPN-LIC-USAGE-MONITOR-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:03:26 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Pytho...
# Copyright(c) 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the followin...
{ "targets": [ { "target_name": "lmdb-queue", "include_dirs" : [ "<!(node -e \"require('nan')\")", "<!(node -e \"require('nnu')\")", "deps" ], "dependencies": [ "<(module_root_dir)/deps/lmdb.gyp:lmdb" ], "sources": [ "src/module.cc", ...
# coding: utf-8 """ railgun-cli ```````````` railgun command line tool :License: MIT :Copyright: @neo1218 @oaoouo """ __version__ = '0.1.3'
# the key is the name of the class of the workload and the value is the program argument string def get_workloads(checkpoint, analytics_data_paths: list, lda_data_paths: list, gbt_data_path: str, pagerank_data_path: str, k: int, iterations: int, checkpoint_interval: int, sampling_fra...
__author__ = 'Cib' class interface(): pass
def foo(a): """ :param a: """ pass foo("a")
class MyStack: def __init__(self): self.q = deque() def push(self, x: int) -> None: self.q.append(x) def pop(self) -> int: for i in range(len(self.q)-1): self.q.append(self.q.popleft()) return self.q.popleft() def top(self) -> int: temp = self.pop() ...
N = int(input()) A = list(map(int, input().split())) ans = 0 max_tall = 0 for i in range(0, N): if max_tall > A[i]: ans += max_tall - A[i] if A[i] > max_tall: max_tall = A[i] print(ans)
# # PySNMP MIB module A3COM0027-RMON-EXTENSIONS (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM0027-RMON-EXTENSIONS # Produced by pysmi-0.3.4 at Wed May 1 11:08:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3....
class ps_data: @property def train_data(self): return self._train_data @property def indexs(self): return self._indexs @train_data.setter def train_data(self, val): self._train_data=val @indexs.setter def indexs(self, val): self._indexs=val
class Advice: def __init__(self): self.clothes = [] self.weather = None def add_cloth(self, cloth): self.clothes.append(cloth) def add_message(self, message): self.clothes.append(message) def add_weather(self, weather): self.weather = weather
# Ayiin - Userbot # Credits (C) 2022-2023 @AyiinXd # # FROM Ayiin-Userbot <https://github.com/AyiinXd/Ayiin-Userbot> # t.me/AyiinXdSupport & t.me/AyiinSupport # ========================×======================== # Link For Collaborator # ========================×======================== # =============...
dia = input("Digite seu dia de nascimento ") mes = input("Digite seu mês de nascimento ") ano = input("Digite seu ano de nascimento ") print("Sua data de nascimento é {}/{}/{}".format(dia, mes, ano))
def _cantidad_caracter(cadena, caracter, indice, cantidad): if indice == len(cadena): return cantidad if caracter == cadena[indice]: cantidad += 1 return _cantidad_caracter(cadena, caracter, indice + 1, cantidad) def cantidad_caracter(cadena, caracter): """Cuenta la cantidad de aparicio...
script_part1 =r""" <!DOCTYPE html> <html lang="en"> <head> <title>Cog Graph</title> <style type="text/css"> body { padding: 0; margin: 0; width: 100%;!important; height: 100%;!important; } #cog-graph-view { width: 700px; height: 700px; ...
__all__= [ 'table', 'projects', 'annotations', 'converters', 'metrics' ] __version__ = '0.0.3'
""" Faster R-CNN with Normalized Wasserstein Assigner Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=1500 ] = 0.053 Average Precision (AP) @[ IoU=0.25 | area= all | maxDets=1500 ] = -1.000 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=1500 ] = 0.130 Average Precision (AP) ...
''' lab2 ''' #3.1 my_name = "Tom" print(my_name.upper()) #3.2 my_id = 123 print(my_id) #3.3 # 123=my_id my_id=your_id=123 print(my_id) print(your_id) #3.4 my_id_str= "123" print(my_id_str) #3.5 #print(my_name+my_id) #3.6 print(my_name+my_id_str) #3.7 print(my_name*3) #3.8 print('hello, world. This is my fi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 14 14:14:47 2017 @author: bmjl """ class Point: """This is Point class""" def __init__(self): """This is the Point constructur""" print("Point created") def hello(self): """Hello method""" p...
#/usr/bin/env python def my_func1(callback): def func_wrapper(x): print("my_func1: {0} ".format(callback(x))) return func_wrapper @my_func1 def my_func2(x): return x # Actuall call sequence is similar to: # deco = my_func1(my_func2) # deco("test") => func_wrapper("test") my_func2("test") #-------...
class RNNConfig(object): embedding_dim = 64 num_classes = 101 num_layers= 2 # num hidden layers hidden_dim = 256 # num hidden rnn = 'gru' # lstm 或 gru dropout_keep_prob = 0.8 # dropout keep prob learning_rate = 1e-3 # batch_size = 128 # print_p...
# 2 битовое разреженное число print("{0:b}".format(18432)) N-битовое разреженное число — это число, в бинарной записи # которого присутствует ровно N единиц - все остальные нули. Например число 137 — 3-битовое разреженное, потому что в # двоичной системе записи выглядит как 10001001. # # Рассмотрим все 2-битовые разреж...
# HARD # Rolling Hash Method # abc ==> a *26^2, b * 26^1, c * 26^0. # ex: 123 ==> 1*10^2, 2 * 10^1, 3 * 10^0 # we find every possible substring to find if exist a duplicated one # start with mid, if possible ==> find longer one else find shorter one # Time O(NlogN) Space: O(N) class Solution: def longestD...
def squareme(x): return(x**2) myvar = input("Give me a number to square: ") myvar = float(myvar) print("The square of %f is %f." % (myvar, squareme(myvar)) )
class Solution: def rotate(self, N, D): D = D%16 val1 = ((N << D) % (2 ** 16)) ^ int(N // (2 ** (16 - D))) #val1 = (N << D) | (N >> (16 - D)) val2 = (N >> D) ^ int((2 ** (16 - D)) * (N % (2 ** D))) return [val1, val2] if __name__ == '__main__': t = int(input...
def test_expect_error(testdir): string = """ Lorem ipsum <!--pytest-codeblocks:expect-exception--> ```python raise RuntimeError() ``` """ testdir.makefile(".md", string) result = testdir.runpytest("--codeblocks") result.assert_outcomes(passed=1) def test_expect_error_fail(testd...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : Max_Pengjb @ date : 2018/9/22 21:23 @ IDE : PyCharm @ Site : ------------------------------------------------- Description : ------------...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 01.py # 2016/10/05(Wed) # walkingmask mojiretsu="パタトクカシーー" print(mojiretsu[1]+mojiretsu[3]+mojiretsu[5]+mojiretsu[7])
# These are words that will appear in most intros, and should be ignored when calculating # the similarity score. # TODO: improve the set of words that we should ignore. IGNORED_WORDS = set(["I", "I'm", "and", "a", "to"]) class Student: name = "" email = "" year = 1 gender = "Female" should_match_w...
# # PySNMP MIB module HUAWEI-PPP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-PPP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:36:10 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
n = int(input('Digite um número: ')) print('''Escolha uma das bases para conversão: [ 1 ] BINÁRIO [ 2 ] OCTAL [ 3 ] HEXADECIMAL''') o = int(input('Qual a base de conversão: ')) while o < 1 or o > 3: o = int(input('Qual a base de conversão: ')) if n == 1: print(f'{n} convertido para BINÁRIO é {bin(n)[2:]}') eli...
class ColorLanguageTranslator: START = "CRYCYMCRW" END = "CMW" @staticmethod def base7(num): if num == 0: return '0' new_num_string = '' current = num while current != 0: remainder = current % 7 remainder_string = str(remainder) ...
class RhinoObjectSelectionEventArgs(EventArgs): # no doc Document=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Document(self: RhinoObjectSelectionEventArgs) -> RhinoDoc """ RhinoObjects=property(lambda self: object(),lambda self,v: None,lambda self: None) """Get: Rhin...
#https://codeforces.com/problemset/problem/734/A input() string = input() a = string.count('A') d = string.count('D') if(a>d): print('Anton') elif d>a: print('Danik') else: print('Friendship')
class ConnectionValidationInfo(object,IDisposable): """ This object contains information about fabrication connection validations. ConnectionValidationInfo() """ def Dispose(self): """ Dispose(self: ConnectionValidationInfo) """ pass def GetWarning(self,index): """ GetWarning(self: Connec...
# Round the number from input to the required number of # decimals. # The input format: # Two lines: the first with a floating-point number, the second # with an integer representing the decimal count. # The output format: # A formatted string containing the rounded number. # Do NOT forget to convert the input num...
# # Copyright (c) 2022 Samuel J. McKelvie # # MIT License - See LICENSE file accompanying this package. # """Exception classes for cloud_init_gen package""" class CloudInitGenError(Exception): """Generic exception raised by package cloud_init_gen""" pass
''' This is the position of all the pieces, in a dictionary. This data is essential for the gameplay to work ''' position_dic = { 'a1': "Left White Rook", 'b1': "Left White Knight", 'c1': "Left White Bishop", 'd1': "White Queen", 'e1': "White King", 'f1': "Right White Bishop", 'g1': "Right White Knight", 'h1': "Righ...
count = 0 def max_ind_set(nodes, edges): global count if len(nodes) <= 1: return len(nodes) node = nodes[0] # pick a node # case 1: node lies in independent set => remove neighbours as well nodes1 = [ n for n in nodes if n != node and (node, n) not in edges ] size1 = 1 + max_ind_set(nodes1, ed...
# encoding: utf-8 # module Grasshopper.Kernel.Undo calls itself Undo # from Grasshopper,Version=1.0.0.20,Culture=neutral,PublicKeyToken=dda4f5ec2cd80803 # by generator 1.145 """ NamespaceTracker represent a CLS namespace. """ # no imports # no functions # classes class GH_UndoAction(object, IGH_UndoAction...
"""j2cl_test build macro Works similarly to junit_test; see j2cl_test_common.bzl for details """ load(":j2cl_test_common.bzl", "j2cl_test_common") # buildifier: disable=function-docstring-args def j2cl_test( name, tags = [], **kwargs): """Macro for running a JUnit test cross compiled as a ...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. load("//antlir/bzl:shape.bzl", "shape") load("//antlir/bzl:target_tagger.bzl", "new_target_tagger", "target_tagger_to_feature") load(":requi...
ENCRYPTED_MESSAGE = 'IQ PQTVJ CV PQQP' DECRYPTED_MESSAGE = 'GO NORTH AT NOON' CIPHER_OPTIONS = ['null','caesar','atbash'] cipher_used_in_this_example = CIPHER_OPTIONS[1] # replace with the index of the cipher used in this encryption
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"img_resize": "00_clipmodel.ipynb", "imgs_resize": "00_clipmodel.ipynb", "dict_to_device": "00_clipmodel.ipynb", "norm": "00_clipmodel.ipynb", "detach_norm": "00_clipmodel....
#!/usr/bin/env python # -*- coding: utf-8 -*- def calculate(n, d): s = str(n) m = -1 for i in range(0, len(s) - d + 1): p = 1 for j in range(0, d): p *= int(s[i+j]) if p > m: m = p return m # https://stackoverflow.com/questions/12385040/python-defining-a...
# -*- coding: utf-8 -*- __author__ = 'Russell Davies' __copyright__ = 'Copyright (c) 2019-present - Russell Davies' __description__ = 'The blakemere package provides a collection of python libraries created by Russell Davies.' __email__ = 'russell@blakemere.ca' __license__ = 'MIT' __title__ = 'blakemere' __version__ =...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ICM-20948: Low power 9-axis MotionTracking device that is ideally suited for Smartphones, Tablets, Wearable Sensors, and IoT applications.""" __author__ = "ChISL" __copyright__ = "TBD" __credits__ = ["TDK Invensense"] __license__ = "TBD" __version__ = "Ve...
# -*- coding: utf-8 -*- def main(): n = int(input()) a = [int(input()) for _ in range(n)] before = list() after = list() # 操作1を行う必要があるのは, # 操作をする前と条件を満たすよう操作した後で # 各要素の位置の偶奇が不一致のときではないか? for index, ai in enumerate(a, 1): before.append((ai, index % 2)) for i...
def mergeList(lis1, list2): print("list1 =", list1) print("list2 =", list2) list3 = [] for i in list1: if(i % 2 == 1): list3.append(i) for i in list2: if(i % 2 == 0): list3.append(i) return list3 list1 = [10, 20, 23, 11, 17] list2 = [13, 43, 24, 36, 12] print("Result List ...
# -*- coding: utf-8 -*- # by Juan Carlos Montoya <odooerpcloud@gmail.com> { 'name': "Library Management", 'summary': """ Library Management Module for Odoo 11 """, 'description': """ Library Management Module for Odoo 11 """, 'author': "Odoo ERP Cloud", 'website': "http...