Skip to content

Instantly share code, notes, and snippets.

View .gitignore
__pycache__
.idea
input
library
logs
images.db
@aNNiMON
aNNiMON / .gitignore
Last active Feb 15, 2021
Telefeed RSS
View .gitignore
*.pyc
config.yml
feed.db
View Rule5_Fixed.java
@Override
public void processUpdates(List<Update> updates) {
for (Update update : updates) {
processUpdate(update);
}
}
private void processUpdate(Update update) {
if (update == null) {
return;
View Rule5.java
@Override
public void processUpdates(List<Update> updates) {
for (Update update : updates) {
if (update != null) {
Message message = update.getMessage();
// don't process old messages
long current = System.currentTimeMillis() / 1000;
if (message.getDate() + 60 >= current) {
long chatId = message.getChatId();
if (chatId == config.tournamentChat()) {
@aNNiMON
aNNiMON / .covid-tool.md
Last active Nov 12, 2020
Daily statistics per region in Ukraine
View .covid-tool.md

covid-tool

Daily statistics per region in Ukraine

View .AudioDL.md

AudioDL

Downloads music from Telegram to specified directory

View TelegramBot.own
class TelegramBot {
def TelegramBot(token) {
this.token = token
}
def getUpdatesSync() = this.invokeJsonSync("getUpdates").result
def getFileSync(fileId) = this.invokeJsonSync("getFile", {"file_id": fileId}).result
def sendPhoto(chatId, photo, callback = 0) {
return this.invokeJson("sendPhoto", {
@aNNiMON
aNNiMON / .gitignore
Last active Oct 29, 2020
Reddit Images to Telegram
View .gitignore
own-modules
main_*.own
redditimages.db
@aNNiMON
aNNiMON / monika_decode.py
Created Jan 18, 2018
monika.chr code decoder and encoder | Doki Doki Literature Club
View monika_decode.py
#!/usr/bin/python
import getopt
import sys
from PIL import Image
def usage():
print('Usage: monika_decode.py [-v] [FILE]')
sys.exit(2)
def main(argv):
View SpliteratorWrapper.java
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Spliterator;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Consumer;
import java.util.stream.Collectors;