Skip to content

Instantly share code, notes, and snippets.

View leonardotoledo's full-sized avatar

Leonardo Tolêdo leonardotoledo

View GitHub Profile
@ivanstepanovftw
ivanstepanovftw / vtune-amplifier-install.md
Last active March 1, 2023 12:11
Patch if Intel's shitty installer cant find libraries, but they are presents

If you cannot install Intel VTune Amplifier on Manjaro/Arch Linux (or other non-supported OS), because this shit cannot find installed libraries via ldconfig -p, you can use this script.
Unpack vtune_amplifier_2019_update3.tar.gz, then go to vtune_amplifier_2019_update3, then copy and paste following:

shopt -s globstar

for i in **/sysreq.cab; do
    echo "processing ${i}"
    perl -pi -e 's/(\W*)RESULT=255(.*)/\1RESULT=1  \2/' "${i}"  # COMPARE_VERSIONS() never returns 255
    perl -pi -e 's/(\W*)LI_(.+)=unsupp(.*)/\1LI_\2=ok    \3/' "${i}"
@chiral
chiral / jupyter_client_sample.py
Created April 11, 2016 18:33
sample code for jupyter_client
from subprocess import PIPE
from jupyter_client import KernelManager
import time
try:
from queue import Empty # Py 3
except ImportError:
from Queue import Empty # Py 2
km = KernelManager(kernel_name='ir')
km.start_kernel()
@rjzak
rjzak / PyUtils.cpp
Last active May 15, 2024 21:06
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====