Skip to content

Instantly share code, notes, and snippets.

View giannisdaras's full-sized avatar
:octocat:

Giannis Daras giannisdaras

:octocat:
View GitHub Profile
import openreview
from ml_collections import config_flags
from absl import app
from absl import flags
import requests
import os
import PyPDF2
import re
from tqdm import tqdm
@giannisdaras
giannisdaras / create_bert_pretraining_data.py
Created August 17, 2019 23:33
Parallel data creation for BERT in tensorflow 2. Code heavily borrowed from google-research/bert
"""Create masked LM/next sentence masked_lm TF examples for BERT."""
import collections
import random
import tokenization
import tensorflow as tf
import argparse
import functools
import os
from utils import create_int_feature
from multiprocessing import Pool
@giannisdaras
giannisdaras / gist:fb0898c19b77ebc6fd2e1d7f2cba63b8
Created January 6, 2019 18:53 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@giannisdaras
giannisdaras / gist:58a716fe5b085795104372a828a40e17
Created January 6, 2019 18:53 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@giannisdaras
giannisdaras / vectors.txt
Last active May 7, 2024 14:50
word2vec Models
-1.4154402 -0.628343 -0.7978957 2.362592 -1.1560478 0.6013522 -0.9744471 2.1646297 1.52649 -0.38204974 3.2922828 1.9287713 1.0685153 1.3325747 -1.0398774 -2.4718585 2.4395761 -0.88431966 -1.8601253 1.0596064 -1.5296564 0.087430425 -3.0394454 -0.17474684 1.3948991 -0.40016744 1.5857391 0.31042352 -2.2662382 1.2034817 3.087434 1.2197591 1.4953339 1.4253228 -4.0647473 1.8430144 1.2770125 -1.4924703 -3.086545 0.8916561 -3.138152 0.72978544 -1.4939166 -1.3817734 2.5453236 1.0594375 -2.371525 -2.3807771 5.2511263 1.8487595 -1.2616996 0.3021988 -0.018719476 -0.19962394 -0.5808869 3.3517942 -0.2578113 1.2716608 -2.489517 1.0074499 0.4926074 -0.94229513 -1.3577781 1.4556054 0.96473503 0.49059626 1.573428 1.5691458 -0.18167049 1.2369821 0.18881923 -2.3199532 0.6865298 0.9596044 0.8138485 -0.44732666 -1.2625444 2.980877 -0.065492384 0.3604092 -2.211556 3.2240503 -1.9011495 -1.1578902 1.4248172 -0.67323583 -2.6866767 1.9921541 1.228641 2.7546093 6.0871296 -4.2843294 2.813379 -1.5341375 0.1873928 1.1347342 -2.3236697 1.12
@giannisdaras
giannisdaras / primes.c
Created July 1, 2018 20:11
Parallel computation of primes
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <sys/types.h>
#define number_of_procs 4
int main() {
long i, j, prime, low, high,count_left=0,count_right=0;
pid_t p;
low = 3;
high = 11;
@giannisdaras
giannisdaras / Device.java
Created April 14, 2018 11:17
The ultimate hack
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0