This file contains 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/env python3 | |
import dateutil.parser | |
import textwrap | |
import argparse | |
import telegram_scraper | |
def main(): | |
parser = argparse.ArgumentParser() |
This file contains 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
FROM python:3.8 | |
ADD a.c . | |
ADD a.py . | |
ADD buf.asm . | |
RUN apt-get update && apt-get install nasm && nasm buf.asm && make a | |
CMD /bin/bash -c 'python3 a.py & sleep 1; ./a ; echo "exit code=$?"' |
This file contains 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
FROM python:3.8 | |
ADD ./requirements.txt . | |
RUN python3 -m pip install -r requirements.txt | |
ADD ./main.py . | |
ENTRYPOINT ["./main.py"] |
This file contains 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
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get install -y curl git gnupg2 python docker.io && \ | |
curl https://bazel.build/bazel-release.pub.gpg | apt-key add - && \ | |
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \ | |
apt-get update && apt-get install -y bazel | |
RUN /bin/echo -e '#!/bin/bash\n\ | |
set -euo pipefail\n\ | |
git clone http://code.hackerspace.pl/hscloud\n\ |
This file contains 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] | |
name = "publicsuffixtest" | |
version = "0.1.0" | |
authors = ["Jacek Wielemborek <[email protected]>"] | |
[[bin]] | |
name = "publicsuffixtest" | |
path = "main.rs" | |
[dependencies] |
This file contains 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
//My improved version of code from this blog post: | |
//http://voices.canonical.com/jussi.pakkanen/2013/09/14/serialising-any-c-data-structure-to-disk-with-20-lines-of-code/ | |
#include <map> | |
#include <string> | |
#include <sys/mman.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains 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/env python | |
import requests | |
import lxml.html | |
import subprocess | |
import os | |
import random | |
def digit_to_nondigit(x): | |
h = lxml.html.fromstring(requests.get('https://en.wiktionary.org/wiki/' + x).text) |
This file contains 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/env python | |
import csv | |
import sys | |
r = csv.reader(sys.stdin) | |
max_file = 0 | |
l = [] | |
for line in r: | |
for i in range(max_file, len(line) + 1): |
This file contains 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 std::error::Error; | |
use std::process; | |
use std::fs::File; | |
use std::io; | |
use std::io::Write; | |
use std::io::BufWriter; | |
extern crate csv; | |
fn run() -> Result<(), Box<Error>> { |
This file contains 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/env python | |
import bencode | |
from io import BytesIO | |
from struct import unpack | |
from socket import AF_INET, inet_ntop, error as socket_error | |
from socket import gethostbyname, socket, SOCK_DGRAM | |
from unittest import TestCase, main as unittest_main | |