#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
FILE *fp; | |
void filecopy(FILE *, FILE *); | |
if (argc == 1) { | |
// no input, so copy stdin | |
filecopy(stdin, stdout); |
""" | |
Author: Ravishankar Chavare | |
Version: 1.0 | |
File: pwbar.py | |
Description: This module provides a progress bar utility for tracking the | |
progress of iterative tasks. | |
1.1 | |
=== |
Crossing reviews becomes a very common activity today in engineering behavior. To help us review changes for pull/merge requests easier, sorting imports can help us a much. The codebase becomes more professional and more consistent, reviewers will be happier, and the review process will be faster, focusing on the implementation changes ONLY.
Have you ever thought about how to sort imports in TypeScript projects automatically?
Let me show you how to archive sorting imports automatically in TypeScript projects with ESLint!
Run this script directly
curl -Lks bit.ly/pipclear | python
# MIT License | |
# Aahnik 2021 | |
# a script to organize the files in loconotion output | |
# also updates html and css files | |
# unix (linux / mac) style file paths are used in the program, | |
# will fail inevitably if run on windows | |
# ditch windows | |
import logging | |
import os |
First of all you make a bot whose multiple instances are to be run from the same server.
Suppose the bot is run by invoking main.py
with the bot_name
and token
as command line arguments.
Syntax:
[PYTHON] [ENTRY_POINT] [bot_name] [token]
Example:
python main.py mysamplebot "173453434:42jhs894_13234jsjgasjs"
import asyncio | |
from settings import API_ID, API_HASH | |
from telethon import TelegramClient | |
from utils import _ | |
async def get_chat_id(ref=None): | |
async with TelegramClient('tg_session', API_ID, API_HASH) as client: | |
if not ref: | |
ref = input('Enter link/phone/username/id to get chat info: ') |