Skip to content

Instantly share code, notes, and snippets.

View neonb88's full-sized avatar

Nathan Bendich neonb88

View GitHub Profile
@neonb88
neonb88 / OpenGL_compile_error.txt
Created March 26, 2019 15:08
stacktrace: `#include <OpenGL/OpenGL.h>` and `#include <OpenGL/CGLTypes.h>`
make all
python3.6 setup.py build_ext --inplace
entering mesa_ext
running build_ext
building 'opendr.contexts.ctx_mesa' extension
gcc -pthread -B /home/n/anaconda3/envs/cat11/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D__OSMESA__=1 -Iopendr/contexts -I. -I/home/n/anaconda3/envs/cat11/lib/python3.6/site-packages/numpy/core/include -Iopendr/contexts/OSMesa/include -I/home/n/anaconda3/envs/cat11/include/python3.6m -c opendr/contexts/ctx_mesa.c -o build/temp.linux-x86_64-3.6/opendr/contexts/ctx_mesa.o -lstdc++
opendr/contexts/ctx_mesa.c: In function ‘release_context’:
opendr/contexts/ctx_mesa.c:36:5: warning: implicit declaration of function ‘CGLDestroyContext’ [-Wimplicit-function-declaration]
CGLDestroyContext((CGLContextObj)ctx);
^
@neonb88
neonb88 / crontab
Created March 18, 2019 14:12
my internet-regulation crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
#===============================================================================
# Documentation:
# https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job
# https://askubuntu.com/questions/1031552/re-create-default-crontab
sudo g++ -lCGAL -lgmp -frounding-math ch_from_cin_to_cout.cpp
/tmp/ccSP3wMo.o: In function `main':
ch_from_cin_to_cout.cpp:(.text+0x20): undefined reference to `CGAL::set_ascii_mode(std::basic_ios<char, std::char_traits<char> >&)'
ch_from_cin_to_cout.cpp:(.text+0x2a): undefined reference to `CGAL::set_ascii_mode(std::basic_ios<char, std::char_traits<char> >&)'
/tmp/ccSP3wMo.o: In function `CGAL::Handle::Handle(CGAL::Handle const&)':
ch_from_cin_to_cout.cpp:(.text._ZN4CGAL6HandleC2ERKS0_[_ZN4CGAL6HandleC5ERKS0_]+0x40): undefined reference to `CGAL::precondition_fail(char const*, char const*, int, char const*)'
/tmp/ccSP3wMo.o: In function `CGAL::Gmpq_rep::Gmpq_rep()':
ch_from_cin_to_cout.cpp:(.text._ZN4CGAL8Gmpq_repC2Ev[_ZN4CGAL8Gmpq_repC5Ev]+0x14): undefined reference to `__gmpq_init'
/tmp/ccSP3wMo.o: In function `CGAL::Gmpq_rep::~Gmpq_rep()':
ch_from_cin_to_cout.cpp:(.text._ZN4CGAL8Gmpq_repD2Ev[_ZN4CGAL8Gmpq_repD5Ev]+0x14): undefined reference to `__g
@neonb88
neonb88 / minimal.py
Created December 19, 2018 21:42
demonstrates bugs with scipy.ndimage.rotate()
import matplotlib.pyplot as plt
import numpy as np
from scipy.ndimage import rotate
from mpl_toolkits.mplot3d import Axes3D
def print_loc_discrete(arr):
'''
for bools (ie. if the val of the arr is either on or off, not a number)
'''
@neonb88
neonb88 / render.py
Created August 11, 2018 16:19
render `numpy` voxels in Blender
import bpy
import numpy as np
objs = bpy.data.objects
scn = bpy.context.scene
scene_objs = [
objs['Cube_transparent'],
objs['Cube_body']
# objs['sand'],
@neonb88
neonb88 / error_msg2.txt
Last active July 18, 2018 21:52
error: could not open file /mnt/var/cache/pacman/pkg/lz4-1:1.8.2-2-x86_64.pkg.tar.xz.part: Invalid argument
pacstrap /mnt base
==> Creating install root at /mnt
==> Installing packages to /mnt
warning: option --root is deprecated; use --sysroot instead
:: Synchronizing package databases...
core is up to date
@neonb88
neonb88 / error message
Last active June 17, 2023 03:43
error: could not determine cachedir mount point /var/cache/pacman/pkg
[root@n-ThinkPad-T420 /]# pacman -S base
:: There are 49 members in group base:
:: Repository core
1) bash 2) bzip2 3) coreutils 4) cryptsetup 5) device-mapper 6) dhcpcd 7) diffutils 8) e2fsprogs 9) file 10) filesystem 11) findutils
12) gawk 13) gcc-libs 14) gettext 15) glibc 16) grep 17) gzip 18) inetutils 19) iproute2 20) iputils 21) jfsutils 22) less 23) licenses
24) linux 25) logrotate 26) lvm2 27) man-db 28) man-pages 29) mdadm 30) nano 31) netctl 32) pacman 33) pciutils 34) perl 35) procps-ng
36) psmisc 37) reiserfsprogs 38) s-nail 39) sed 40) shadow 41) sysfsutils 42) systemd-sysvcompat 43) tar 44) texinfo 45) usbutils
46) util-linux 47) vi 48) which 49) xfsprogs