Skip to content

Instantly share code, notes, and snippets.

View binarybrat's full-sized avatar

Cloei binarybrat

View GitHub Profile
@binarybrat
binarybrat / adding_extrasdatabaseshit.py
Last active December 27, 2018 19:49
Updated version of subreddits watching script
###
Credit to Santi/SnooHelper, PCJohanthan, Artumis, GolenSights, and others I will add once I remember.
TODO: Add math sql for sentiment output on a lot of things, test yaml config, redo traffic so it grabs for each subreddit, debating whether or not to split it up so each sub has their own database, build more alert tools for things like alerts if a user has more than x reports in modqueue for the same post, oh and finish the stupid lexicon for UkrianianConflict
###
import dbstufflogger
from risingWatch import *
from sewTraffic import traffic
from LowComments import *
@binarybrat
binarybrat / main.py
Created April 13, 2018 04:42
WOT Checking and Automated Procesing
from collections import namedtuple
import logmaker
import datetime
import sqlite3
import time
import lnm
import re
START = time.time()
TIMESTAMP = datetime.datetime.fromtimestamp(int(START)).strftime('%m/%d/%Y %H:%M:%S')
@binarybrat
binarybrat / qotw.txt
Created March 16, 2018 05:14
QOTW Recurring
What is something you learned in the last week?
Do you crack your knuckles?
Do you have any pets? You can share pictures of them, if you want.
Do you play Pokemon Go?
What is your favourite punctuation mark?
@binarybrat
binarybrat / sidebarupdateTEST1.py
Last active August 24, 2018 11:41
related subs random list
import praw
import ri0t
import random
import re
from termcolor import colored
from pprint import pprint
import traceback
SUB = 'ri0tTestsThings'
RELATEDSUBS = ['FreePatterns', 'Cottage_Industry', 'WildWhittlers', 'GeeKnitting', 'Quilting', 'Knitting', 'Fabrics', 'DrunkKnitting', 'RandomActsOfCrafts', 'DiyGifts', 'Needlepoint', 'Embroidery', 'Crafts', 'Tailors', 'Stitchy', 'ThriftyThread', 'SewHelp', 'SewCrazy', 'YarnSddicts', 'LoomKnitting', 'Crochet', 'CrossStitch']
@binarybrat
binarybrat / randomfacts.py
Created February 13, 2018 14:23
Old random facts script
#!/usr/bin/python
import praw
import time
import sys
import random
#description of your bot
r = praw.Reddit(user_agent='')
@binarybrat
binarybrat / afternoon discord.css
Created November 2, 2017 14:17 — forked from brussell98/afternoon discord.css
My custom theme for Discord. Made for dark theme
.app a {
color: #5294E2
}
.titlebar {
height: 5px
}
.guilds-wrapper {
background: #2a2f38
}
.guilds-wrapper .guilds .guild+.guild {
@binarybrat
binarybrat / reddit sidebar updater
Created June 8, 2017 19:00
Having issues it keeps giving me an error on line #208 unsure what I'm doing wrong
// spiffy sidebar updater
//el https://github.com/chromakode/reddit-sidebar-updater
//
// Copyright (c) 2014 Max Goodman.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
@binarybrat
binarybrat / removalsLNM.py
Created November 26, 2016 09:23
Scans sub modlog and grabs info when I mod removes a post (other than automoderator) then loads info to database.
import praw
import config #has my reddit oauth info stuff
import string
import json
import traceback
import sqlite3
MODLIST = {'10thTARDIS', 'maximumhel', 'Skangryph', 'girlietrex', 'ri0tnrrd', 'SmileyFace', 'Mumbah_', 'Luminous_Nox'}
MAX = 1000
function calcEffec(input,numbers) {
for (var i = 0; i<input.length; i++)
{
for (var j = 1; j<numbers[i]; j++)
{
input.push(input[i]);
}
}
input.sort();
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();