This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <curl/curl.h> | |
int main(int argc, char **argv) | |
{ | |
CURL *curl; | |
FILE *fp; | |
int result; | |
// Output file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import logging | |
import time | |
from collections import defaultdict | |
from telethon import TelegramClient | |
from telethon import events | |
logging.basicConfig(level=logging.INFO) |