What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-25 20:05:04
kitty's calculations on a tree hackerrank solution
from collections import Counter, defaultdict MOD = 10**9 + 7 def read_row(): return (int(x) for x in input().split()) def mul(x, y): return (x * y) % MOD def add(*args): return sum(args) % MOD def sub(x, y): return (x - y) % MOD n, q... Add solution -
VBA 2022-02-25 05:20:02
excel vba multiple string search with InStr function
'VBA function to check if ANY of a list of substrings is contained 'within a string: Function AnyIn(s$, ParamArray checks()) As Boolean Dim e For Each e In checks If InStrB(s, e) Then AnyIn = True: Exit Function Next End Function '... Add solution -
Other 2022-02-25 00:05:02
how to make a cooldown in discord.py
from discord.ext.commands import cooldown, BucketType @commands.cooldown(1, 3, commands.BucketType.user) @client.command() async def command_name(ctx): print('Eyy') @command_name.error async def command_name_error(ctx, error): if isinstance(error, ... Add solution -
Python 2022-02-24 21:35:12
python create directory
# This requires Python’s OS module import os # 'mkdir' creates a directory in current directory. os.mkdir('tempDir') # can also be used with a path, if the other folders exist. os.mkdir('tempDir2/temp2/temp') # 'makedirs' creates a directory with... Add solution -
Python 2022-02-24 19:45:12
record and store audio in pythn
import pyaudio import wave chunk = 1024 # Record in chunks of 1024 samples sample_format = pyaudio.paInt16 # 16 bits per sample channels = 2 fs = 44100 # Record at 44100 samples per second seconds = 3 filename = "output.wav" p = pyaudio.PyA... Add solution
Best helpers
Ranking is empty