Skip to content

Instantly share code, notes, and snippets.

View neomatrix369's full-sized avatar
🎯
Focusing

mani neomatrix369

🎯
Focusing
View GitHub Profile
@neomatrix369
neomatrix369 / know-your-gpus.md
Last active December 14, 2023 02:44
Know your GPUs

Commands on Linux to gather information related to GPUs

Below is a list of commands and resources that work on Linux (some need installation of packages), would love to welcome contributions for the same for MacOSX and Windows platforms too. Please share and contribute back.

Please run the below in both vagrant, docker and other container environments and share your experiences with us!

About me: http://neomatrix369.wordpress.com/about, my blogs: http://neomatrix369.wordpress.com/

Get Hardware Details
@neomatrix369
neomatrix369 / PerformanceRelated.md
Last active November 3, 2023 20:27
Interesting links in the areas of HPC, low latency, mechanical harmony/sympathy, garbage collection
@neomatrix369
neomatrix369 / Collection of JVM flags.md
Last active July 18, 2023 22:49
Collection of HotSpot JVM flags for various purposes (mainly performance related)
@neomatrix369
neomatrix369 / dl-resources.md
Last active June 18, 2022 08:32 — forked from upkarlidder/dl-resources.md
Deep Learning Hands-On Series with Eric Schles
Books on Richard Feynman!
=========================
Surely You're Joking, Mr. Feynman! (Adventures of a Curious ... -
http://buffman.net/ebooks/Richard_P_Feynman-Surely_Youre_Joking_Mr_Feynman_v5.pdf
What.Do.You.Care.What.Other.People.Think
http://www.cypherpunk.cz/books/Richard.Feynman.-.What.Do.You.Care.What.Other.People.Think.-.challenger.investigation.pdf
@neomatrix369
neomatrix369 / downgrade-pytorch-model-version-from-4-to-3.sh
Last active June 27, 2020 11:57
Update Pytorch model (weights) version from 4 to 3 (It a shell script you can use inside your Kaggle kernel (using the `%%bash` magic)
%%bash
apt-get install -y xarchiver || true
SAVED_MODEL_PATH=$(realpath "/kaggle/input/[/path/to/model/folder]")
NEW_MODEL_PATH=$(realpath "/kaggle/working")
for model_file in $(ls $SAVED_MODEL_PATH/*.pth)
do
just_filename=$(basename "${model_file%.*}")
version_filename_with_path="$(unzip -t $model_file | grep version | awk '{print $2}')"
if [[ ! -e "$NEW_MODEL_PATH/$just_filename.pth" ]]; then
echo "Copying $model_file to $NEW_MODEL_PATH"
@neomatrix369
neomatrix369 / bagging_folds_cv_training.py
Last active June 18, 2020 15:55
Example of how to improve confidence in CV scores: using bagging, folds and using unique seed per bagging round, same seed per fold
bagging_count = 5
folds = 5
SEEDS = [1234, 4567, 8910, 1112, 1314] # arbitary seeds can be any non-repeating series of integers
for bagging_index in range(0, bagging_count): # 5 rounds
stf = StratifiedKFold(n_splits=folds, shuffle=True, random_state=SEEDS[bagging_index])
for fold, (training_index, validation_index) in skf.split(train_df, train_df.sentiment): # 5 rounds
<rest of the training code>
# seeds used for each bagging round: 1234, 4567, 8910, 1112, 1314
@neomatrix369
neomatrix369 / settings.xml
Last active May 5, 2020 08:39
settings.xml for SonarQube to be placed into the $HOME/.m2 folder (maven's configuration folder)
<settings>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Example for MySQL-->
<sonar.jdbc.url>
Build on Server(pid: 1211, port: 34161)
[server-binary_deploy:1211] classlist: 178,177.80 ms
[server-binary_deploy:1211] (cap): 2,157.93 ms
[server-binary_deploy:1211] setup: 3,426.53 ms
[server-binary_deploy:1211] analysis: 104,524.34 ms
Error: Unsupported features in 6 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.MethodHandle.bindTo(Object)
Trace:
at parsing java.lang.invoke.MethodHandleImpl.makePairwiseConvertByEditor(MethodHandleImpl.java:221)
@neomatrix369
neomatrix369 / gist:fe8aed466f620cb2e7424fc076e50d31
Created January 30, 2020 13:25
Exception when building native-image from a Java 8 jar (stack trace available)
Build on Server(pid: 1211, port: 34161)
[server-binary_deploy:1211] classlist: 183,467.42 ms
[server-binary_deploy:1211] (cap): 4,099.72 ms
[server-binary_deploy:1211] setup: 10,420.03 ms
[server-binary_deploy:1211] analysis: 200,589.41 ms
Error: Unsupported features in 6 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call: java.lang.invoke.MethodHandle.bindTo(Object)
Trace:
at parsing java.lang.invoke.MethodHandleImpl.makePairwiseConvertByEditor(MethodHandleImpl.java:221)