Skip to content

Instantly share code, notes, and snippets.

==================================== test session starts =====================================
platform linux -- Python 3.10.10, pytest-7.3.0, pluggy-1.0.0 -- /mnt/E/Workspaces/cppyy/.venv2/bin/python
cachedir: .pytest_cache
rootdir: /mnt/E/Workspaces/cppyy/src/cppyy
plugins: xdist-3.2.1
[gw0] linux Python 3.10.10 cwd: /mnt/E/Workspaces/cppyy/src/cppyy/test
[gw0] Python 3.10.10 (main, Mar 5 2023, 22:26:53) [GCC 12.2.1 20230201]
gw0 [504]
scheduling tests via LoadScheduling
@sudo-panda
sudo-panda / cpt.py
Last active December 2, 2022 14:09
#! /usr/bin/env python3
# coding:utf-8
###############################################################################
#
# The Cling Interpreter
#
# Cling Packaging Tool (CPT)
#
# tools/packaging/cpt.py: Python script to launch Cling Packaging Tool (CPT)
@sudo-panda
sudo-panda / Pop-OS_secure_boot.md
Created July 23, 2022 09:24
Instructions for enabling secure boot in Pop-OS
  1. Disable Secure Boot.

  2. Assuming that you have a bootable USB stick with PopOS, boot from it and install PopOS. I 've installed PopOS on the external drive.

  3. Install reEFInd.

sudo add-apt-repository ppa:rodsmith/refind
@sudo-panda
sudo-panda / jax_neural_net.py
Created September 22, 2021 10:13
This gist has a small neural net written in python with JAX
#!/usr/bin/env python3
from math import exp
import jax.numpy as jnp
import jax.random as jrn
import jax.profiler as jpr
import random
from jax import grad, vmap
from typing import List
@sudo-panda
sudo-panda / GSOC2021-Utilize-second-order-derivatives-from-Clad-in-ROOT.md
Last active August 23, 2021 15:17
This gist contains an overview of the work that I did in GSoC 2021
@sudo-panda
sudo-panda / GamingRuntimeErrors.md
Last active January 2, 2021 12:25
Common errors encountered when running a game in Linux and how to fix them.

Fixes for errors encountered when running games in linux

This is a rolling gist. If you want to contribute please add your error and fix in the comments.

libfreetype error

Error message

error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
@sudo-panda
sudo-panda / hash_table.cpp
Created August 11, 2020 16:56
C++ tips to get around TLE : hash table with custom hash function
std::unordered_map< std::pair<int,int>, int, HASH > hash_table;
@sudo-panda
sudo-panda / hash_fn.cpp
Created August 11, 2020 16:54
C++ tips to get around TLE : hash function
struct HASH {
size_t operator()(const std::pair<int,int> &p) const {
return ~p.first ^ p.second; // the first is negated to differentiate between mirrored pairs
}
};
@sudo-panda
sudo-panda / erase_if.cpp
Created August 11, 2020 16:46
C++ tips to get around TLE : erase_if() with is_zero() predicate
v.erase(std::remove_if(v.begin(), v.end(), is_zero), v.end());