Skip to content

Instantly share code, notes, and snippets.

View datadius's full-sized avatar
🕶️

Data Dius datadius

🕶️
View GitHub Profile
#thanks to msramalho in this issue for the idea https://github.com/LonamiWebs/Telethon/issues/3788
client = ''
original_post = await client.get_messages('test', ids=1)
async def get_media_posts_in_group(chat, original_post, max_amp=10):
"""
Searches for Telegram posts that are part of the same group of uploads
The search is conducted around the id of the original post with an amplitude
of `max_amp` both ways
@datadius
datadius / list.md
Created June 4, 2022 14:14 — forked from ih2502mk/list.md
Quantopian Lectures Saved
import numpy
import scipy.stats as stats
# a source https://www.researchgate.net/publication/44850235_Inference_about_the_Tail_of_a_Distribution_Improvementon_the_Hill_Estimator
def hillEstimator(data,k=1):
""" Compute hillEstimator """
#get length of data
n = len(data)
#order in descending order
x = np.log(np.sort(data)[::-1])
#obtain order statistics(range)
//This script runs in the Chrome console. From a lack of knowledge, this script has to be run in 3 separate instances.
//First, things first.Select a fb profile and scroll down to how many posts you would like to react to.
//For the first part run the following
//Part 1
//prepare reacts
var Links = document.getElementsByClassName('_6a-y _3l2t _18vj');
//mouseover events enable the react toolbar
var event1 = new MouseEvent('mouseover', {
'view': window,
'bubbles': true,
$("#fish1Id").ready(function () {
animateDiv("#fish1Id");
});
$("#fish2Id").ready(function () {
animateDiv("#fish2Id");
});
$("#fish1Id").dblclick(function(){
grow("#fish1Id");
$("#fish1Id").ready(function () {
animateDiv("#fish1Id");
});
$("#fish2Id").ready(function () {
animateDiv("#fish2Id");
});
$("#fish1Id").mouseover(function () {
import java.util.Scanner;
public class TheCalendar
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int d = scan.nextInt();
int m = scan.nextInt();
int y = scan.nextInt();