Skip to content

Instantly share code, notes, and snippets.

View charlie-collard's full-sized avatar

Charlie Collard charlie-collard

  • Marshmallow
  • London
View GitHub Profile
import pandas
import numpy
arr = numpy.triu(numpy.random.randint(-10000, 10000, (175, 175)))
arr = arr.transpose() + arr
# Add mistake
arr[152, 8] = 10
rows, cols = numpy.nonzero(arr - arr.transpose())
AutoModerator moderates 67 subreddits: ['mildlyinfuriating', 'AmItheAsshole', 'PublicFreakout', 'WhitePeopleTwitter', 'antiwork', 'interestingasfuck', 'funny', 'gaming', 'LivestreamFail', 'politics', 'worldnews', 'nba', 'pathofexile', 'leagueoflegends', 'nextfuckinglevel', 'todayilearned', 'NoStupidQuestions', 'MurderedByWords', 'Piracy', 'shitposting', 'OnePiece', 'buildapc', 'pcmasterrace', 'MadeMeSmile', 'Genshin_Impact', 'ukraine', 'DigitalCodeSELL', 'GlobalOffensive', 'soccer', 'wow', 'tifu', 'personalfinance', 'LoveIsBlindOnNetflix', 'Tinder', 'anime', 'europe', 'ffxiv', 'sysadmin', '2007scape', 'UkraineWarVideoReport', 'Eldenring', 'pcgaming', 'technology', 'CombatFootage', 'TwoXChromosomes', 'DnD', 'DestinyTheGame', 'aww', 'wallstreetbets', 'manga', 'Games', 'jobs', 'feedthebeast', 'dataisbeautiful', 'DotA2', 'unpopularopinion', 'FashionReps', 'maybemaybemaybe', 'LifeProTips', 'nfl', 'Fauxmoi', 'SteamDeck', 'CasualUK', 'television', 'Overwatch', 'Steam', 'canada']
BotDefense moderates 32 subreddits:
from collections import defaultdict
import praw
reddit = praw.Reddit(client_id='client_id',
client_secret='client_secret',
user_agent='user_agent',
password='password',
username='username')
mods_to_subs = defaultdict(list)
if set -q argv[1]
set offset $argv[1]
else
set offset 0
end
if test $offset -ge 0
set offset +$offset
end
vim (date --date="$offset days" +"$HOME/Dropbox/docs/diaries/%Y/%Y-%m-%d-%a.md")
import requests
import re
import bs4
import base64
import time
# mkfifo mypipe
# ffmpeg -f image2pipe -c:v mjpeg -i mypipe output.mp4
with open("mypipe", "wb") as f:
while True:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCwBr6SeRHEqoU41BnwAi8Rcm/bs6mLuL7TO2B3vNnCZrN07I7AfQDp4CWbPQmAcrqAkFmuW2SThzhfJlJJCUjzbyyz98ilKzTH/iuVh5ew1fyuvnafye0a2Mxfo/DS3s2lhumYFDot/lA7/ZL0+hPw9RuHW9Ls7qJLJuZ4ffGH73kVH0eSfCVAW490/5t/UPtkPxWVnUIb9/RAXupgOvSwjxyriatvWx+5UzBDtTGA6XSIdbLx/USiTI+u2i0VIqh8jLEbGl1kAkQ0gUM51PVLhdAY2owkH1UUcyqaD9g3G7AjGinIRoTRpXd+DxkH8OIjLIEN5MtrZlmEnf9OozfktpnHhMaVGIyBaEy+4IAeX3l7T9KD2lEw06owFA1db4TrFp39hYd1dvjvdlCgJsvZjEdrGBq82IkRLgKH83l5fhP0f/aE8XSknex4Z3g53QeXvg/bJ2B4hwvsZv2mEbkLWSfFROETEWgLKtxhW3PkT/dRoiY693hvdm5RKUmKWDP5VJ0ntyNAzntqEYw0l7nxauZIwAVNSwmm7CdtjcdB43hwpj2EDGJiXh+5NBl/CTrkwL+QCZAs3lwakoMkojmPvNI/VM7YAmMqDcjYLUFsRUKc7hBCLSC0wSPxC7sPlJL4D2nr6kw19cPpMkQ7qAjTf6t+ZRZ7a4sYvyORypozqw== macbook
import requests
import praw
import logging
import time
import random
import schedule
import pickle
import sys
from datetime import datetime, timedelta