content stringlengths 7 1.05M |
|---|
class NumArray(object):
def __init__(self, nums):
"""
:type nums: List[int]
"""
self.dp = [0]
for n in nums:
self.dp.append(self.dp[-1] + n)
def sumRange(self, i, j):
"""
:type i: int
:type j: int
:rtype: int
"""
... |
#!/usr/bin/python3
"""Create class"""
class Rectangle():
"""Empty class"""
pass
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 8 14:21:02 2020
@author: eriksson
"""
def kprimes(comeco_intervalo: int, fim_intervalo: int, /, *, next_prime: bool = False):
primo: bool = True
if comeco_intervalo <= 2:
primos_no_intervalo: dict = {1: 2}
yield 2
... |
"Template file"
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "nuget_package") # @unused
def project_dotnet_repositories_nuget():
""" Declares used nugets """
### Generated by the tool
nuget_package(
name = "microsoft.bcl.hashcode",
package = "microsoft.bcl.hashcode",
version =... |
'''
Given a string return true if it's a palindrome, false otherwise.
'''
def isPalindrome(string):
left = 0
right = len(string)-1
while left < right:
if string[left] != string[right]:
return False
left += 1
right -= 1
return True
if __name__ == '__main__':
print(isPalindrome('abcba'))
... |
PANEL_GROUP = 'astute'
PANEL_DASHBOARD = 'admin'
PANEL = 'billing_invoices'
# Python panel class of the PANEL to be added.
ADD_PANEL = 'astutedashboard.dashboards.admin.invoices.panel.BillingInvoices'
|
pi = 3.1456
def funcao1(a,b):
return a+b
if __name__ == '__main__':
print(funcao1(1,4)) |
map = 100000000
portal = 17
sm.warp(map, portal)
sm.dispose()
|
src = ['board.c']
component = aos_board_component('board_mk3060', 'moc108', src)
aos_global_config.add_ld_files('memory.ld.S')
supported_targets="helloworld linuxapp meshapp uDataapp networkapp linkkitapp"
linux_only_targets="mqttapp linkkit_gateway coapapp"
build_types="release"
|
class Solution(object):
def permute(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
全排列
"""
if len(nums) <= 1: # 如果当前lst长度为1,停止递归,返回
return [nums]
result = []
for i in range(len(nums)):
s = nums[:i]+nums[i+1:] #... |
#
# PySNMP MIB module CISCO-ALPS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ALPS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:32:43 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... |
load("@bazel_skylib//lib:types.bzl", "types")
load("//rules:library.bzl", "write_file")
load("//rules/library:xcconfig.bzl", "build_setting_name")
def write_info_plists_if_needed(name, plists):
"""
Writes info plists for a bundle if needed.
Given a list of infoplists, will write out any plists that are pa... |
PROTEOMIC_RESSOURCE_HEADER = ['Accession']#, 'Corrected_Abundance_Ratio','LOG2(Corrected_Abundance_Ratio)', 'LOG10(Adj.P-val)']
UNIPROT_STRING_MAPPER_RESSOURCE_HEADER = [ 'String_id', 'Uniprot_id' ]
STRING_RESSOURCE_HEADER = ['protein1', 'protein2', 'experimental']
def defineProteomicRessourcHeader(columnLabel):
... |
"""
entrada
valor_prestamo-->float-->a
valor_intereses-->float-->b
tiempo-->float-->t
salida
intereses-->str-->inte
"""
a=float(input ("Escriba el valor del prestamo: " ))
b=float(input ("Escriba el valor de los intereses: "))
t=4
inte=(a*t*b)/100
print("el interes en cuatro años es del " +str (inte))
|
class Singleton(object):
def __new__(cls, *args, **kargs):
if not hasattr(cls, "_instance"):
cls._instance = super(Singleton, cls).__new__(cls)
return cls._instance
class SeedMng(Singleton):
_root_seed = 0
_system_seed = 0
_tf_graph_seed = 0
_tf_system_seed = 0
_np_s... |
dictionary = {"name": "Zara", "age": 7, "class": "First"}
phone_numbers = {"Alice": "2341", "Beth": "9102", "Cecil": "3258"}
empty_dict = {}
print(dictionary)
print(phone_numbers)
print(empty_dict)
|
# Copyright (C) 2015-2019 by Vd.
# This file is part of RocketGram, the modern Telegram bot framework.
# RocketGram is released under the MIT License (see LICENSE).
class ReplyKeyboardRemove:
def __init__(self, *, selective=False):
self.set_selective(selective)
def set_selective(self, selective=False... |
number = input().split()
order = input()
output_number = []
stringed_number = ''
for num in number:
output_number.append(int(num))
sorted_number = sorted(output_number)
if order == 'ABC':
print("{} {} {}".format(sorted_number[0],sorted_number[1],sorted_number[2]))
elif order == 'ACB':
print(... |
# Let's write our own function!
def cheer(player):
return ('Go ' + player + '!')
yell = cheer('Thelma')
print(yell)
yell = cheer('Twi')
print(yell)
# Now combine the steps
print(cheer('Dottie'))
|
class TrieNode:
# Initialize your data structure here.
def __init__(self):
self.edges = dict()
self.word_end = False
class Trie:
def __init__(self):
self.root = TrieNode()
# @param {string} word
# @return {void}
# Inserts a word into the trie.
def ins... |
lookup = {'squeezenet1_1': 224, 'vgg16_bn': 224, 'inception_v3': 224, 'resnet18': 224, 'resnet34': 224, 'resnet50': 224, 'resnet101': 224, 'resnet152': 224, 'inceptionresnetv2': 235, 'inceptionresnetv2_avgpool': 235, 'densenet121': 224, 'densenet169': 224, 'nasnetalarge': 224, 'nasnetasmall': 224, 'inceptionv4': 299, '... |
def addMe2Me(x):
return x + x
def self(f, y):
print(f(y))
self(addMe2Me, 2.2) |
class Solution(object):
def get_manhattan(self, a, b):
return abs(a[0] - b[0]) + abs(a[1] - b[1])
def assignBikes(self, workers, bikes):
"""
:type workers: List[List[int]]
:type bikes: List[List[int]]
:rtype: List[int]
"""
d = dict()
ans = [None... |
num = int(input())
l = [str(i*num) for i in range(1,11)]
print (l)
sentence = '\n'.join(l)
print (sentence)
|
pwd = "C:/Users/HP 8460p/Documents/Biology master/En tibi internship/Data/"
in_file = "Structure/structure_table_bases_remapped.str"
out_file = "heterozygosity_table.tsv"
individuals = 115
f_out = open(pwd + out_file, 'w')
f_in = open(pwd + in_file)
# Reading in both sequences from the structure file. The two strands... |
'''
Descripttion:
version:
Author: HuSharp
Date: 2021-02-09 12:01:25
LastEditors: HuSharp
LastEditTime: 2021-02-09 12:08:55
@Email: 8211180515@csu.edu.cn
'''
def list_create(n):
'''
>>> list_create(3)
[0, 1]
>>> list_create(4)
[0, 1, 2]
>>> list_create(8)
[0, 1, 2, 4]
>>> list_create(1... |
# Palindrome Partitioning: Given a string s, partition s, such that every substring of the parition is a palindrome. The goal is to find all possible partitioning of s.
class Solution:
def isPalindrome(self, s, start, end):
while start < end:
if s[start] != s[end]:
return False
... |
#! /usr/bin/env python3
class ConnectionException(Exception):
pass
class HomingException(Exception):
pass
class PathException(Exception):
pass |
#!/usr/bin/env python3
# Write a program that computes the running sum from 1..n
# Also, have it compute the factorial of n while you're at it
# No, you may not use math.factorial()
# Use the same loop for both calculations
n = 5
n_sum = 0
n_fac = 1
for i in range(1, n+1):
n_sum = n_sum + i
n_fac = n_fac * i
print ... |
___used___ = []
___depth___ = 0
def monit(level):
def decorator(function):
def wrapper(*args):
global ___used___, ___depth___
t = (level, ___depth___, wrapper, function.__name__)
___used___.append((t, (0, args)))
___depth___ += 1
value = function(... |
class ExportToS3Error(Exception):
"""S3へのエスクポートが失敗した場合の例外"""
class GetExportTaskError(Exception):
"""S3へのエクスポートタスクの取得失敗時の例外"""
class ExportToS3Failure(Exception):
"""S3へのエクスポート失敗"""
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
class CA:
def __init__(self):
self.n = 0
def fca(self):
self.n += 1
class CB(CA):
def fca(self):
super().fca()
self.n += 2
b = CB()
b.fca()
assert b.n == 3
super(CB, b).fca()
assert b.n == 4
|
# Copyright 2012 10gen, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... |
class Solution:
def findRepeatedDnaSequences(self, s: str) -> List[str]:
sequences = dict()
n = 0
for x in range(len(s) - 9):
sequence = s[n:n+10]
if sequence in sequences:
sequences[sequence] += 1
else:
se... |
#!/usr/bin/python
'''
--- Day 2: Corruption Checksum ---
As you walk through the door, a glowing humanoid shape yells in your direction. "You there! Your state appears to be idle. Come help us repair the corruption in this spreadsheet - if we take another millisecond, we'll have to display an hourglass cursor!"
The ... |
class Account(object):
CREDIT = 0
PAYPAL = 1
TYPE = [ CREDIT, PAYPAL ]
def __init__(self, username, account_num, atype):
self.username = username
self.account_num = account_num
self.type = atype |
class PluginServerException(Exception):
pass
class PDKException(Exception):
pass |
#Escribir un programa que reciba un número entero positivo, devolver la sumatoria de dicho número.
i = int(input("Ingrese un número:"))
acumulador = ""
suma = 0
for j in range(i+1):
if j > 1:
acumulador += " + " + str(j)
elif j == 1:
acumulador += str(j)
suma += j
print("la sumatori... |
# example class
class intSet(object):
def __init__(self):
self.vals = []
def insert(self, e):
if not e in self.vals:
self.vals.append(e)
def member(self, e):
return e in self.vals
def remove(self, e):
try:
self.vals.remove(e)
except:
... |
class Error(Exception):
"""Base class for exceptions in this module."""
pass
class ParserError(Error):
"""Exception raised for errors in the input.
Attributes:
command -- input command in which the error occurred
message -- explanation of the error
"""
def __init__(self, com... |
# 搜索历史
USER_BROWSING_HISTORY_COUNTS_LIMIT = 5
|
class NumMatrix:
def __init__(self, matrix):
self.rowSums = [[0] * len(matrix[0]) for _ in range(len(matrix))]
for i in range(len(matrix)):
for j in range(len(matrix[i])):
self.rowSums[i][j] = matrix[i][j] if j == 0 else self.rowSums[i][j-1] + matrix[i][j]
def sumRe... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
def get_tag_by_key(tags, key):
tags = list(filter(lambda t: t['Key'] == key, tags))
if len(tags):
return tags[0]['Value']
return None
|
class Solution:
def twoSum(self, nums: list[int], target: int) -> list[int]:
hashmap = {}
for idx, num in enumerate(nums):
if num not in hashmap:
hashmap[target - num] = idx
else:
return [hashmap[num], idx]
|
#!/usr/bin/env python
# coding=utf-8
# Python Script
#
# Copyleft © Manoel Vilela
#
#
# Answer: 73682 @ 0.6s
# Hardware:Intel E7400 @ 3.5Ghz
# black magic recursive
def different_ways(money, coins, summation=0):
ways = 0
max_coins_head = money // coins[0]
for n in range(max_coins_head + 1):
... |
'''
This program returns an integer representing the maximum possible sum of the contiguous subarray using Kadane's Algorithm
- Creating a function maxSubArray() which will take one argument as a List A
- Initializing two variables max_so_far and curr_max which will store the first element in the List A
- Traversing t... |
print('----- isalnum() -----')
s = 'abcdef123'
print(s.isalnum(), s)
s = 'abc 123'
print(s.isalnum(), s)
s = 'abc def_g123'
print(s.isalnum(), s)
s = '①'; print(s.isalnum(), s)
s = '⑴'; print(s.isalnum(), s)
s = '⒈'; print(s.isalnum(), s)
s = '⓵'; print(s.isalnum(), s)
s = '⓿'; print(s.isalnum(), s)
s = '➀'; print(s.is... |
"""
One string is an anagram of another if the second is simply a rearrangement of the first.
For example, 'heart' and 'earth' are anagrams. The strings 'python' and 'typhon' are anagrams as
well.
"""
def is_anagram(str1, str2):
d = {}
for char in str1:
if char not in d.keys():
... |
"""
Problem Statement
Dr. Primo is a famous mathematician in Codeland. He is known to have numbers as his friends. He is especially in love with Prime Numbers. He goes to the city festival ArrayCon. Every time he is given an array, he tells how many prime numbers are present in the array in few seconds. You will be giv... |
#!/usr/bin/python3
sonar_input_file = open("input_day1.txt", "r")
sonar_input_data = sonar_input_file.readlines()
sonar_data_clean = []
print(sonar_input_data[0])
for item in sonar_input_data:
sonar_data_clean.append(item.strip())
for item in sonar_data_clean:
int(item)
def method1():
increase_count=0... |
class Dictionary(dict):
newentry = dict.__setitem__
def look(self, key):
return self.get(key, f"Can't find entry for {key}") |
# Faça um Programa que peça o raio de um círculo, calcule e mostre sua área.
raio = int(input('informe o raio do circulo: '))
pi = 3.14159
area = (pi * raio ** 2)
print(f'A area do circulo e {area:.3f}')
|
"""Kata for basic string functions"""
mystring = 'Hello Strings!'
print(mystring) # Prints complete string
print(mystring[0]) # Prints first character of the string
print(mystring[2:5]) # Prints characters starting from 3rd to 5th
print(mystring[2:]) # Prints string starting from 3rd character
... |
#author SANKALP SAXENA
def is_leap(year):
leap = False
if(year % 4 == 0) and (year %400 == 0 or year %100 !=0):
return True;
return False;
|
data ={'12.04.2021, 00:00 Uhr': {'AdmUnitId': 3351,
'BEZ': 'Landkreis',
'GEN': 'Celle',
'OBJECTID': 34,
'cases': 3813,
'cases7_bl': 8217,
'cases7_bl_per_100k'... |
def solution(data, n):
b = data[:]
lenb = len(b)
for i in range(lenb):
count = b.count(b[i])
if count > n:
lena = len(data)
j = 0
while j < lena:
if data[j] == b[i]:
data.pop(j)
lena -= 1
... |
class Solution:
def lemonadeChange(self, bills: List[int]) -> bool:
change = [0, 0, 0]
for bill in bills:
if bill == 5: change[0] += 5
elif bill == 10:
change[1] += 10; change[0] -= 5
else:
change[2] += 20;
if chan... |
n = str(input('Digite um número de 0 a 9999: ')).zfill(4)
print("""O número tem:
{} unidades;
{} dezenas;
{} centenas;
{} milhares.
""". format(n[3], n[2], n[1], n[0]))
|
"""
Simultaneous Tracker: "Historian"
Date: July 11, 2020
Author: Karen Urate
File: model.py
Description: This file contains the class object representation for Knowledge.
------------------------------------------------------------------
PROJECT DESCRIPTION
------------------------------... |
with open('input') as input:
lines = input.readlines()
def getMostFrequentBit(index, lines):
zero_bits = 0
one_bits = 0
for line in lines:
if line[index] == '0':
zero_bits += 1
else:
one_bits += 1
if zero_bits > one_bits:
greater = 0
else:
... |
test = {
'name': 'make-adder',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
scm> (add-two 2)
4
""",
'hidden': False,
'locked': False
},
{
'code': r"""
scm> (add-two 3)
5
""... |
success = False # в будущем, если победим, примет значение True
mas = list(range(100000)) # создаём массив и наполняем его значениями от 0 до 99999
key = int(input('Введите число для поиска: ')) # вводим число с клавиатуры и преобразуем его в тип int
l = 0 # индекс левой границы массива mas. 0, потому что исчесление э... |
#C2
items_list = []
cost_list = []
for x in range(3):
item = input("Enter item: ")
items_list.append(item)
cost = float(input("Enter cost: "))
cost_list.append(cost)
total = sum(cost_list)
sale = input("Sale item (y/n): ").lower()
if sale == "y":
total = total - (total * 0.1)
... |
salarioI = float(input("Qual o salário do funcionário? R$"))
aumento = int(input("Qual o aumento que o funcionário receberá? "))
salarioF = salarioI + (salarioI * aumento / 100)
print(f"Um funcionário que ganhava R${salarioI:.2f}, com {aumento}% de aumento, passa a receber R${salarioF:.2f} ")
|
def profile_to_json(profile):
data = {
'username': profile.username,
'first_name': profile.first_name,
'last_name': profile.last_name,
'email_id': profile.email_id,
'profile_img': profile.profile_img,
'about_me': profile.about_me,
... |
"""
Exceptions -
"""
# basic try/except clause
try:
file = open('test.txt', 'rb')
except IOError as e:
print('An IOError occurred. {}'.format(e.args[-1]))
# handling multiple exceptions
try:
file = open('test.txt', 'rb')
except (IOError, EOFError) as e:
print('An IOError occurred. {}'.format(e.args[-1]))
try:... |
COOL_COLORS = [
"#66CDAA",
"#fe4a49",
"#fed766",
"#ee4035",
"#f37736",
"#7bc043",
"#0392cf",
"#d11141",
"#00b159",
"#7D3C98",
"#9B59B6",
"#34495E",
"#00aedb",
"#f37735",
"#95A5A6",
"#CD5C5C",
"#D4AC0D",
"#3E8FCD",
"#ffc425",
"#cc2a36",
... |
# Longest Substring Without Repeating Characters
class Solution:
def lengthOfLongestSubstring2(self, s: str) -> int:
mx = l = r = 0
while r < len(s):
if len(set(s[l:r+1])) == r-l+1:
mx = max(mx, r-l+1)
r += 1
else:
l += 1
... |
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dracidoupe_cz',
'USER': 'root',
'HOST': 'db',
'PASSWORD': 'docker',
'OPTIONS': {
'charset': 'latin2'
},
'TEST': {
'NAME': 'test_dracidoupe... |
def multi_bracket_validation(strings):
open = tuple('({[')
close = tuple(')}]')
map = dict(zip(open, close))
# print(map)
arr_multi = []
for i in strings:
if i in open:
arr_multi.append(map[i])
elif i in close:
if not arr_multi or i != arr_multi.... |
# Leo colorizer control file for pyrex mode.
# This file is in the public domain.
# Properties for pyrex mode.
properties = {
"indentNextLines": "\\s*[^#]{3,}:\\s*(#.*)?",
"lineComment": "#",
}
# Attributes dict for pyrex_main ruleset.
pyrex_main_attributes_dict = {
"default": "null",
"dig... |
# Databricks notebook source
# MAGIC %md-sandbox
# MAGIC
# MAGIC <div style="text-align: center; line-height: 0; padding-top: 9px;">
# MAGIC <img src="https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png" alt="Databricks Learning" style="width: 600px">
# MAGIC </div>
# COMMAND ----------
# M... |
def join(base, path):
return ensure_trailing_separator(base) + _ensure_no_leading_separator(path)
def ensure_trailing_separator(url: str) -> str:
if not url.endswith('/'):
return url + '/'
return url
def ensure_leading_separator(url: str) -> str:
if not url.startswith('/'):
return '/... |
def displayEfficiencies(toShow):
table = 'Konverter Type ; Effizienz [%] ;\n'
for name , converter in toShow.items():
table += name+'; %3.2f ; \n'%converter.efficiency_percent
print(table)
def displayResults(toShow):
table = 'Konverter Type ; Effizienz [%] ;dIout [mA] ;dUout [mV];Iout [A] ;Uou... |
"""
@author Huaze Shen
@date 2019-07-24
"""
def jump(nums):
if nums is None or len(nums) < 2:
return 0
level = 0
i = 0
current_max = 0
while i <= current_max:
furthest = current_max
for j in range(i, current_max + 1):
furthest = max(furthest, j + nums[j])
... |
status=False
batas=4
pengguna =["Rosnia La Bania"]
kata_sandi =["12345678"]
while batas > 0:
pwd1=input("masukkan nama pengguna: ")
pwd2=input("masukkan kata sandi anda: ")
for pengguna in pengguna:
for kata_sandi in kata_sandi:
if pwd1 == pengguna and kata_sandi == kata_sandi:
print("selamat... |
# Copyright 2014 Midokura SARL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
# These are all from IS-GPS-200G unless otherwise noted
SPEED_OF_LIGHT = 2.99792458e8 # m/s
# Physical parameters of the Earth
EARTH_GM = 3.986005e14 # m^3/s^2 (gravitational constant * mass of earth)
EARTH_RADIUS = 6.3781e6 # m
EARTH_ROTATION_RATE = 7.2921151467e-005 # rad/s (WGS84 earth rotation rate)
# GPS sy... |
"""Text-related stuff I meant to put in site-packages
"""
class FoundItem(Exception):
pass
class DataError(Exception):
pass
def splitjoin(orig, zoek, vervang):
"""
dit is een routine waarin de binnenkomende string eerst gesplitst wordt
in woorden (gescheiden door 1 of meer spaties en/of tabs e... |
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
#方法1,一种两次遍历,依次求长度,第二次定位删除节点
# 方法2,一次遍历,两个节点操作,两个节点相隔n个节点,当后一个节点为空时
# 则第二个节点定位到删除的节点
class Solution:
def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode:
h=ListNode(None)
... |
#!/usr/bin/python3
WTF_CSRF_ENABLED = False
SECRET_KEY = '438qwYcOwwi0QwTNBbPQPc73x'
CIPHER_GLOBAL_SEED = 42
CIPHER_KEY_LEN = 1024
|
"""
This file sets parameters used in real-time OpenEEW algorithm
"""
# TRAVEL TIME GRID AND CALCULATION
lat_min = 13 # minimum latitude
lat_max = 23 # maximum latitude
lon_min = -106 # minimum longitude
lon_max = -90 # maximum longitude
step = 0.01 # step in degrees
eq_depth = 20 # earthquake depth
vel_model = ... |
r"""
Enumerated sets of partitions, tableaux, ...
============================================
Quickref
--------
Catalog
-------
- :ref:`sage.combinat.partition`
- :ref:`sage.combinat.tableau`
- :ref:`sage.combinat.partition_tuple`
- :ref:`sage.combinat.tableau_tuple`
- :ref:`sage.combinat.skew_partition`
- :ref:`sa... |
class Faxes:
""" 2600hz Kazoo Menus API.
:param rest_request: The request client to use.
(optional, default: pykazoo.RestRequest())
:type rest_request: pykazoo.restrequest.RestRequest
"""
def __init__(self, rest_request):
self.rest_request = rest_request
def get_f... |
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
'''=================================
@Author :tix_hjq
@Date :2020/5/29 下午4:01
@File :__init__.py.py
=================================''' |
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Various package dependency constants used in de/serialization."""
# Node-specific constants
CLASSES = 'classes' # Internal classes of a package.
# Edge-... |
#!/usr/bin/python
# A comment, this is so you can read your program later
print("Blablabla ....");
print ("Not exactly done what is mentioned in the book")
|
#
# PySNMP MIB module HH3C-VOICE-VLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-VOICE-VLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:30:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... |
# 6из45 + Выигрышные номера тиража + предыдущий тираж к примеру 9000
def test_6x45_winning_draw_numbers_for_previous_draw(app):
app.ResultAndPrizes.open_page_results_and_prizes()
app.ResultAndPrizes.click_game_6x45()
app.ResultAndPrizes.click_winning_draw_numbers()
app.ResultAndPrizes.select_draw_900... |
{
'target_defaults': {
'libraries': [
'-lrootdev',
],
'variables': {
'deps': [
'blkid',
'dbus-c++-1',
'glib-2.0',
'gthread-2.0',
'libbrillo-<(libbase_ver)',
'libchrome-<(libbase_ver)',
'libmetrics-<(libbase_ver)',
'libminijail',
... |
#coding=utf-8
APIKEY = "RGAPI-6d7c4811-9073-4899-ab14-3a798d3d6f13"
class ApiUrl:
MASTER_LEAGUE_API = "/lol/league/v4/masterleagues/by-queue/"
GRANDMASTER_LEAGUE_API = "/lol/league/v4/grandmasterleagues/by-queue/"
CHALLENGER_LEAGUE_API = "/lol/league/v4/challengerleagues/by-queue/"
MATCH_API = "/lol/m... |
grade = int(input('My grade is: '))
if grade == 2:
print('Аз съм двойкаджия!')
elif grade == 3:
print(f'Аз имам оценка {grade},което означава,че имам тройка!')
elif grade == 4:
print('аз имам четворка')
elif grade == 5:
print(f'Аз имам оценка {grade}')
elif grade == 6:
print('аз имам шестица')... |
class PathReinforcement(Element,IDisposable):
""" An object that represents an Path Reinforcement within the Autodesk Revit project. """
@staticmethod
def Create(document,hostElement,curveArray,flip,pathReinforcementTypeId,rebarBarTypeId,startRebarHookTypeId,endRebarHookTypeId,rebarShapeId=None):
"""
Create... |
class Solution:
def compress(self, chars: List[str]) -> int:
"""String.
Running time: O(n) where n == len(chars).
"""
c = 1
l, r = 0, 1
while r <= len(chars):
if r == len(chars) or chars[r] != chars[r-1]:
chars[l] = chars[r-1]
... |
# Crie um programa que gerencie o aproveitamento de um jogador de futebol.
# O programa vai ler o nome do jogador e quantas partidas ele jogou.
# Depois vai ler a quantidade de gols feitos em cada partida.
# No final, tudo isso será guardado em um dicionário, incluindo o total de gols
# feitos durante o campeonato.
dad... |
class InvalidEnumArgumentException(ArgumentException, ISerializable, _Exception):
"""
The exception thrown when using invalid arguments that are enumerators.
InvalidEnumArgumentException()
InvalidEnumArgumentException(message: str)
InvalidEnumArgumentException(message: str,innerException: Except... |
# maximum of two values
def main():
print("This program compares two numbers that you entered.")
number1 = int(input("Please enter the number 1: "))
number2 = int(input("Please enter the number 2: "))
calculate_greater(number1, number2)
def calculate_greater(a, b):
if a > b:
print("The nu... |
#file config
file_fits_flux_column = "Flux column"
file_fits_time_column = "Time column"
file_fits_hdulist_column = "Data column for hdulist"
file_ascii_skiprows = "Skipped rows in ascii file"
file_ascii_use_cols = "Used columns in ascii file"
#plot conf
plot_show = "Show plots"
plot_save = "Save plots"
#general conf
g... |
BAD_REQUEST = 400
CREATED = 201
FORBIDDEN = 403
LAST_ID = -1
|
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.CinemaGlobals
Cinemas = {0: ('cinemas/steamboat_willie.mp4', 'cinemas/steamboat_willie.mp3'), 1: ('cinemas/mr_mouse... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.