-
Github doesn't allow javascript in a markdown file. Try to compile equations using readme2tex presents an elegant solution for rendering latex equations.
-
grip runs a simple http server to visualize a readme file on a browser. It also tracks changes in a readme file and refresh the page whenever there is a change. However, you need to embed the following script so that the Mathjax renders eqs.
<script async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML"></script> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" onload="javascript:MathJax.Hub.Queue(['Typeset', MathJax.Hub]);">
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
# OpenAI call | |
export OPENAI_API_TOKEN=<YOUR_API_KEY from https://platform.openai.com/account/api-keys> | |
function openai-completion() { | |
# echo "\nCompleting $LBUFFER ..." | |
# echo '{ "model": "text-davinci-003", "prompt": "'$LBUFFER'", "max_tokens": 15, "temperature": 0.7 }\n\n' | |
local response=$(curl --progress-bar https://api.openai.com/v1/completions \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $OPENAI_API_TOKEN" \ | |
-d '{ "model": "text-davinci-003", "prompt": "'$LBUFFER'", "max_tokens": 100, "temperature": 0.7 }') |
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 os | |
import time | |
import argparse | |
import numpy as np | |
from urllib.request import urlretrieve | |
try: | |
import open3d as o3d | |
except ImportError: | |
raise ImportError("Please install open3d with `pip install open3d`.") |
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
# Copyright (c) Chris Choy ([email protected]). | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
# of the Software, and to permit persons to whom the Software is furnished to do | |
# so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all |
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
#include <cmath> | |
#include <functional> | |
#include <future> | |
#include <iostream> | |
#include <thread> | |
// unique function to avoid disambiguating the std::pow overload set | |
int f(int x, int y) { return std::pow(x, y); } | |
class Functor { |
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
#!/bin/sh | |
ENVNAME=$1 | |
# Directory that contains the venvs | |
PYV_ROOT=${HOME} | |
ENV_ROOT="${PYV_ROOT}/.pyv/${ENVNAME}/bin" | |
# Check the number of arguments | |
if [ "$#" -eq 1 ] && [ -d "${ENV_ROOT}" ]; then |
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
#!/bin/bash | |
tmux start-server | |
tmux new-session -d -s napoli -n monitor | |
SERVERS=(napoli101 napoli102 napoli103 napoli104 napoli105 napoli106 napoli107 napoli108 napoli109 napoli110 napoli111 napoli112 visionlab-dgx1) | |
# ${#array[@]} is the number of elements in the array | |
for ((i = 0; i < ${#SERVERS[@]}; ++i)); do | |
tabnum=$(( $i + 1 )) | |
tmux new-window -t napoli:$tabnum |
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
# Copyright (C) 2012 Daniel Maturana | |
# This file is part of binvox-rw-py. | |
# | |
# binvox-rw-py is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# binvox-rw-py is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 torch | |
from torch.autograd import Variable, Function | |
class MultiplyAdd(Function): | |
@staticmethod | |
def forward(ctx, input1, scalar, input2): | |
ctx.scalar = scalar | |
ctx.test = {'test': 3} | |
return input1 + scalar * input2 | |
The template run.ch
provides a wrapper for running and managing experiments.
The file will
- Log all stdout/stderr into a log file in a respective folder
- Maintail the log of all experiments with the details in
manifest.md
file. - Update the experiments if you kill the job prematurely
NewerOlder