Skip to content

Instantly share code, notes, and snippets.

View muhammedfurkan's full-sized avatar
🙃

M.Furkan muhammedfurkan

🙃
View GitHub Profile
@painor
painor / FastTelethon.py
Last active April 18, 2025 16:50
This will increase the download/upload speed when using telethon
# copied from https://github.com/tulir/mautrix-telegram/blob/master/mautrix_telegram/util/parallel_file_transfer.py
# Copyright (C) 2021 Tulir Asokan
import asyncio
import hashlib
import inspect
import logging
import math
import os
from collections import defaultdict
from typing import Optional, List, AsyncGenerator, Union, Awaitable, DefaultDict, Tuple, BinaryIO
import feedparser
from pandas.io.json import json_normalize
import pandas as pd
import requests
rss_url='https://news.google.com/rss/search?q=apple'
#Read feed xml data
news_feed = feedparser.parse(rss_url)
#Flatten data
@Talento90
Talento90 / thumbnail-generator.js
Created August 7, 2019 16:49
Generate Thumbnail from video using Node.js
"use strict";
const
ffmpegPath = require("@ffmpeg-installer/ffmpeg").path,
ffprobePath = require("@ffprobe-installer/ffprobe").path,
ffmpeg = require("fluent-ffmpeg");
ffmpeg.setFfprobePath(ffprobePath);
ffmpeg.setFfmpegPath(ffmpegPath);
@bbachi
bbachi / ExportCSV.js
Created June 30, 2019 19:14
react excel functionality
import React from 'react'
import Button from 'react-bootstrap/Button';
import * as FileSaver from 'file-saver';
import * as XLSX from 'xlsx';
export const ExportCSV = ({csvData, fileName}) => {
const fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
const fileExtension = '.xlsx';
@johnnylord
johnnylord / downloader.c
Last active December 21, 2020 21:51
Using libcurl to download remote file in C
#include <stdio.h>
#include <curl/curl.h>
int main(int argc, char **argv)
{
CURL *curl;
FILE *fp;
int result;
// Output file
@fictorial
fictorial / encode_decode_hmac.js
Created April 1, 2019 19:03
encode / decode with hmac for node.js
// note: encoded data is NOT encrypted
const crypto = require('crypto');
const secret = '20BBEBB8-DCC1-4544-AD32-7F3973CCED7A';
function createDigest(encodedData, format) {
return crypto
.createHmac('sha256', secret)
.update(encodedData)
.digest(format);
from pytube import YouTube
import requests
import subprocess
import os
workdir = os.path.dirname(os.path.realpath(__file__))
url = input('playlist url : ').rstrip()
if 'watch' in url:
@painor
painor / call.py
Created February 2, 2019 00:55
Make a call using pyrogram
#This is taken from https://github.com/LonamiWebs/Telethon-calls/blob/master/calls.py and modified
import hashlib
import os
import random
from pyrogram import Client
from pyrogram.api.functions.messages import GetDhConfig
from pyrogram.api.functions.phone import RequestCall
from pyrogram.api.types import PhoneCallProtocol
@blrB
blrB / downloader.c
Last active August 24, 2022 16:49
Downloader
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
@udf
udf / telethon_ratelimiter.py
Created November 23, 2018 15:19
Decorator that lets you apply per chat rate limits to telethon handlers
import asyncio
import logging
import time
from collections import defaultdict
from telethon import TelegramClient
from telethon import events
logging.basicConfig(level=logging.INFO)