title: A Rainforest in Machine Learning author: Arjoonn Sharma @ CLAP Research patat: incrementalLists: true ...
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
import numpy as np | |
from tqdm import tqdm | |
from multiprocessing import Pool | |
file_name = "test.gro" #Should be changed | |
frame_count = 14 #Should be changed | |
line_count = 4014 #Should be changed | |
Lz = 2.84 #Should be changed | |
Lx = 6.95 |
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 tqdm import tqdm | |
from multiprocessing import Pool | |
def myfn(x): | |
return x ** 2 | |
with Pool() as pool: | |
args = list(range(1_000_000)) | |
work = pool.imap_unordered(myfn, args, chunksize=100) |
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
import requests | |
name = 'tfidf_benchmark' | |
contest = 'marco-search' | |
fpath = 'output' | |
files = {"upload": open(fpath, 'rb')} | |
url = 'https://models.clapresearch.com/api/submit' | |
requests.post(url, data={"user": name, "contest": contest}, |
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
sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev \ | |
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \ | |
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \ | |
python3-dev ruby-dev lua5.1 liblua5.1-dev libperl-dev git | |
sudo apt remove vim vim-runtime gvim | |
git clone https://github.com/vim/vim.git | |
cd vim/src |
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
import aiohttp | |
import asyncio | |
import async_timeout | |
from tqdm import tqdm | |
TIMEOUT_LIMIT = 50 | |
async def _get(url, json, pbar): | |
async with aiohttp.ClientSession() as session: | |
for _ in range(100): |
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
'''Trains a simple convnet on the MNIST dataset. | |
Gets to 99.25% test accuracy after 12 epochs | |
(there is still a lot of margin for parameter tuning). | |
16 seconds per epoch on a GRID K520 GPU. | |
''' | |
import os | |
from __future__ import print_function | |
import keras |
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
import asyncio | |
import aiohttp | |
import async_timeout | |
headers = {} | |
links = [] # TODO: Populate this somehow with urls | |
done = asyncio.Queue() |
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
dashboard "Food": | |
- h1 text: Food | |
- h2 text: By caloric content | |
- 2 columns: | |
- attr:query: '[to_entries | .[] | {"component": "rows", "data": [ | |
{"component": "text", "args": {"tagName": "h3"}, "data": .key}, | |
{"component": "chart", "args": {"type": "line"}, "data": {"columns": .value}} | |
]}]' | |
- data: https://gist.githubusercontent.com/theSage21/9ca3a5b55ec324599d1baea229c19e27/raw/e81c3109a2c72ad5d718f18e846d6044022e91d7/data.json |
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
{ | |
"Bananas": [1,2,3, 4, 5], | |
"Tofu" : [1, 1.5, 3], | |
} |