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
FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04 | |
RUN apt-get update -y \ | |
&& apt-get install -y htop jq gh vim git-lfs tmux tree \ | |
&& git lfs install \ | |
&& curl -L 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output /tmp/vscode_cli.tar.gz \ | |
&& tar -xf /tmp/vscode_cli.tar.gz -C /usr/bin --no-same-owner \ | |
&& rm /tmp/vscode_cli.tar.gz \ | |
&& curl -L 'https://gist.github.com/wayhoww/8ebbcf31d95ae66c9828e3fba6866dfd/raw' --output /usr/bin/sendmail \ | |
&& chmod +x /usr/bin/sendmail \ |
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
#!/usr/bin/env python3 | |
import smtplib | |
import argparse | |
import os | |
import sys | |
def send_email( | |
host: str, | |
username: str, |
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 | |
apt-get update -y && apt-get install htop jq -y | |
name=$(curl --request POST \ | |
--header 'content-type: application/json' \ | |
--url 'https://api.runpod.io/graphql?api_key='$RUNPOD_API_KEY \ | |
--data '{"query": "query Pod { pod(input: {podId: \"'$RUNPOD_POD_ID'\"}) { name } }"}') | |
name=$(echo $name | jq -r '.data.pod.name') |
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 | |
# Usage: | |
# source ./select-cuda.sh [-c <cnt>] [-f] | |
# -c cnt: count of GPUs that you want to use | |
# -f : select a GPU even it's being used | |
# | |
# Source this file everytime before running your ML scripts. | |
count=1 | |
force=0 |
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
""" | |
pip install watchdog | |
watchmedo tricks tricks.yaml | |
tricks.yaml | |
----------- | |
tricks: | |
- autocompile.AutoCompileTrick: | |
patterns: ["*"] |
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
/** | |
* For Boost.Python | |
* | |
* Automatically convert between Python list, dict, tuple and C++ STL std::vector, std::map, std::tuple, respectively. | |
* -------------------------------------- | |
* 自动转换 Python 和 STL 的几个常用数据类型。 | |
* | |
* I am familiar with neither metaprogramming nor Boost.Python. This header works but I believe | |
* there are better ways (or even existing libraries) to do these conversions. Please comment at | |
* this page to help me improve it. |
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
/* | |
How to use it: | |
let stdin = std::io::stdin(); | |
let (a, b): (i32, f64) = stdin.tuple_2(); | |
let v: Vec<i32> = stdin.line(); | |
let v: std::collections::BTreeSet<i32> = stdin.line(); | |
let s: i32 = stdin.scalar(); | |
let s: f64 = stdin.scalar(); |
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
diff --git a/CMakeMain.txt b/CMakeMain.txt | |
index 1c75719..c403f1e 100644 | |
--- a/CMakeMain.txt | |
+++ b/CMakeMain.txt | |
@@ -6,7 +6,7 @@ | |
project(${ELEMENTS_APP_PROJECT} LANGUAGES CXX) | |
-if (UNIX AND NOT APPLE) | |
+if (UNIX AND NOT APPLE OR MINGW) |