- Install dependancies.
pip3 install python-dotenv python-telegram-bot
- Then put the files of this gist inside a folder.
var = {} | |
count = 1 | |
limit = 10 | |
while True: | |
data = input('enter data ') | |
var.update({count:data}) |
# search a query in a list of strings | |
import re | |
my_list = ['Horrible donkey', 'irritable monkey', 'international idiot'] | |
search_for = 'd' | |
# list comprehension |
import aiohttp | |
import asyncio | |
from timer import timer | |
async def fetch(): | |
base = 'https://httpbin.org/get' | |
async with aiohttp.ClientSession() as session: | |
async with session.get(url=base) as response: |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
session_path = 'path/of/folder/' | |
chrome_driver_path = 'path/of/chrome-driver-executable' | |
url = 'url' | |
chrome_options = Options() | |
chrome_options.add_argument(f'--user-data-dir={session_path}') |
Ubuntu records 30s .webm screencasts in Videos Folder via Ctrl+Shift+Alt+R, automatically convert them to GIF in Pictures Folder, and delete video file
Make sure to have ffmpeg
installed
toGIF.sh
in your Videos folder, linkchmod +x ~/Videos/toGIF.sh
Unscripted Impulse is a podcast of conversations between two friends Aahnik and Navoneel | |
on various topics ranging from Science to History to fiction to Literature | |
to JEE to Coding to Consciousness to Evolution to Indology to Everything about Existence and Reality ... | |
I am Aahnik: ;FreeThinkerSeekerYogi, I ❤️ CODING ; PHYSICS ; MATH, astikaAtheist, FollowingDharma, NoReligion | |
Visit my Website: https://aahnik.github.io | |
Read my articles on Medium: https://medium.com/@aahnik | |
Twitter: https://twitter.com/AahnikD | |
Facebook: https://www.facebook.com/aahnik.daw |
def power(a,b): | |
if b == 0: | |
return 1 | |
else: | |
return power(a,b-1) * a |
def sum(n): | |
if n == 1: | |
return 1 | |
else: | |
return n + sum(n+1) |
def sum(n): | |
s = 0 | |
for i in range(1,n+1): | |
s += n | |
print(s) | |
sum(10)# would print 55 |