Downloads music from Telegram to specified directory
This file contains hidden or 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
SELECT classname, COUNT(*) c | |
FROM ( | |
SELECT REGEXP_EXTRACT(content, r'class ([A-Z_$][A-Za-z\d_$]*)') as classname | |
FROM [fh-bigquery:github_extracts.contents_java] | |
HAVING classname IS NOT NULL | |
) | |
GROUP BY 1 | |
ORDER BY 2 DESC | |
LIMIT 500 |
This file contains hidden or 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 java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.OutputStreamWriter; | |
import java.util.EnumSet; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.ParserConfigurationException; | |
import org.json.JSONArray; |
This file contains hidden or 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
package com.example.stream; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; |
This file contains hidden or 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 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; |
This file contains hidden or 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
#!/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): |
This file contains hidden or 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
own-modules | |
main_*.own | |
redditimages.db |
This file contains hidden or 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 okhttp, http, json | |
class TelegramBot { | |
def TelegramBot(token) { | |
this.token = token | |
this.client = okhttp.newClient() | |
.callTimeout(6, "minutes") | |
.connectTimeout(5, "minutes") | |
.readTimeout(5, "minutes") | |
.build() |
This file contains hidden or 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
@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()) { |