Skip to content

Instantly share code, notes, and snippets.

View duskvirkus's full-sized avatar
🇺🇦
declare variables not war

Dusk duskvirkus

🇺🇦
declare variables not war
View GitHub Profile
#!/bin/bash
# Installs s5cmd
if command -v s5cmd &> /dev/null
then
echo "s5cmd is already installed"
exit 0
fi
START_DIR=$(pwd)
import concurrent.futures
from tqdm import tqdm
import random
import time
def run_on_thread_example(packed_args):
arg_one, arg_two = packed_args
import concurrent.futures
from tqdm import tqdm
def run_multiprocess(func, iterator):
with concurrent.futures.ProcessPoolExecutor() as executor:
results = list(tqdm(executor.map(func, iterator), total=len(iterator)))
return results
Table t;
int rows = 8;
int cols = 11;
float rowSize;
float colSize;
ArrayList<String> toDisplay = new ArrayList<String>();
@duskvirkus
duskvirkus / CMakeLists.txt
Created February 17, 2022 10:35
minimal c++ pytorch
cmake_minimum_required(VERSION 3.0)
project(cxxtorch)
find_package(Torch REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
add_executable(cxxtorch main.cxx)
target_link_libraries(cxxtorch "${TORCH_LIBRARIES}")
set_property(TARGET cxxtorch PROPERTY CXX_STANDARD 14)

Local ML Setup

Minimal ubuntu server install to machine learning development setup mostly thanks to lambda.

Currently using ubuntu server 20.04.

By no means is this a definitive guide more a list for me to remember what I like to do I definitly recommend looking into each thing individually for up to date instructions on installation.

Gnome3

Simple Python Profiler

in code:

call configure_profiling

use @profile_decorator on functions you want to time

don't forget to call

@duskvirkus
duskvirkus / os-getcwd-bug.ipynb
Created June 6, 2021 00:59
os-getcwd-bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
absl-py
alabaster
albumentations
altair
appdirs
argon2-cffi
arviz
astor
astropy
astunparse

Coding Train Website Redesign

Community Contributions

I think there are some tradeoffs for database vs plain text storage of community contributions. If we go with plain text like it is now people get to learn how to make pull requests on github but with a database it would be simple to make a form that makes it more accessible to the community as a whole.

The database model would require a moderation panel that is password protected adding to the scope of the project.

Rating Level of Difficult for Coding Challenges and other videos