Skip to content

Instantly share code, notes, and snippets.

View tebeka's full-sized avatar
💭
alive

Miki Tebeka tebeka

💭
alive
View GitHub Profile
@tebeka
tebeka / backin.py
Created December 8, 2020 18:26
"Back in" progress bar
#!/usr/bin/env python
"""Timer with progress bar"""
from tqdm import tqdm
from time import sleep
from argparse import ArgumentParser
import re
from datetime import datetime, timedelta
from subprocess import run, PIPE
from os.path import expanduser
@tebeka
tebeka / taxi_check.py
Created June 13, 2020 13:21
Check sha256 of bzipped files
"""Checking sha25 signatures
Write a function that gets an index file with names of files and sha256
signatures in the following format
0c4ccc63a912bbd6d45174251415c089522e5c0e75286794ab1f86cb8e2561fd taxi-01.csv
f427b5880e9164ec1e6cda53aa4b2d1f1e470da973e5b51748c806ea5c57cbdf taxi-02.csv
4e251e9e98c5cb7be8b34adfcb46cc806a4ef5ec8c95ba9aac5ff81449fc630c taxi-03.csv
...
You should compute concurrently sha256 signatures of these files and see if
@tebeka
tebeka / check_install.py
Created March 16, 2020 16:58
Check install
import importlib
from sys import version_info
if version_info[:2] < (3, 6):
raise SystemExit('error: Python 3.6+ required')
missing = []
pkgs = (
('jupyterlab', 'jupyterlab'),
('matplotlib', 'matplotlib'),
@tebeka
tebeka / mat_test.go
Created March 8, 2020 07:39
Matrix Sum
package main
import (
"testing"
)
var (
nRows, nCols = 10000, 27
mat [][]int
n = nRows * nCols
@tebeka
tebeka / update-go.sh
Created January 15, 2020 05:50
Update go version
#!/bin/bash
case $1 in
-h | --help ) echo "usage: $(basename $0) VERSION"; exit;;
esac
if [ $# -ne 1 ]; then
1>&2 echo "error: wrong number of arguments"
exit 1
fi
@tebeka
tebeka / httpd.py
Created January 9, 2020 10:51
Testing gunicorn + genvent
from time import sleep
from flask import Flask
app = Flask(__name__)
counter = 0
@app.route('/count')
@tebeka
tebeka / col.cc
Created July 14, 2019 14:06
column_get_bool
typedef struct {
std::shared_ptr<arrow::Array> chunk;
int64_t offset;
const char *error;
} chunk_t;
chunk_t find_chunk(void *vp, long long i, int typ) {
chunk_t ct = {nullptr, 0, nullptr};
auto column = (Column *)vp;
@tebeka
tebeka / column.cc
Last active July 14, 2019 12:30
Getting item from column
int column_bool_at(void *vp, long long i) {
auto column = (Column *)vp;
// TODO: errors
if (column == nullptr) {
return -1;
}
if (column->ptr->type()->id() != BOOL_DTYPE) {
return -1;
}
@tebeka
tebeka / allenai.md
Created June 17, 2019 15:27
Allen AI Israel Job

AI2 Israel is looking for an experienced software engineer to join our Tel-Aviv, Sarona office

AI2 Israel is the Israeli branch of the Allen Institute for Artificial Intelligence, a non-profit research institute founded by Paul Allen with the mission to contribute to humanity through high-impact research and engineering in artificial intelligence. https://allenai.org/ai2-israel/ The Israeli branch focuses on language understanding technologies. As a non-profit organization, our goals are not to maximize revenue but rather to do good to the world. All of our work is aimed to be released freely to the public.

As part of our team you will be building software infrastructure to facilitate state of the art research in natural language processing and information extraction. You will design and develop backend services, build UI components and contribute to software that is being used by researchers around the world. You will interact closely with academic researchers working on state-of-the-art language unde

@tebeka
tebeka / nameless.md
Created March 31, 2019 16:03
The Nameless

I have many names, and none of them matter. Names are not important. To speak is to name names, but to speak is not important. A thing happens once that has never happened before. Seeing it, a man looks upon reality. He cannot tell others what he has seen. Others wish to know, however, so the question him saying, 'What is it like, this thing you have seen?' So he tries to tell them. Perhaps he has seen the very first fire in the world. He tells them, 'It is red, like a poppy, but through it dance other colors. It has no form, like water, flowing everywhere. It is warm, like the sun of summer, only warmer. It exists for a time upon a piece of wood, and then the wood is gone, as though it were eaten, leaving behind that which is black and can be sifted like sand.