Skip to content

Instantly share code, notes, and snippets.

View cmey's full-sized avatar
🤯

Christophe Meyer cmey

🤯
View GitHub Profile
@cmey
cmey / list.md
Created January 29, 2023 20:22 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@cmey
cmey / install-nvidia-opencl-drivers-for-linux.sh
Created May 11, 2018 13:04
Nvidia OpenCL drivers for Linux
sudo apt-get install nvidia-opencl-dev
@cmey
cmey / ubuntu-on-MBP15
Created May 10, 2018 20:56
Installing Ubuntu on MBP15
# wifi
sudo apt-get install bcmwl-kernel-source
@cmey
cmey / install-mpv-on-ubuntu1604.txt
Last active May 9, 2018 14:16
workaround to install mpv on Ubuntu 16.04
# If you get the error:
# The following packages have unmet dependencies:
# mpv : Depends: libva-x11-1 (>= 1.0.3) but it is not going to be installed
# E: Unable to correct problems, you have held broken packages.
# Workaround:
sudo aptitude install mpv
# Accept this solution?
Intel® Core™ i7-7567U CPU @ 3.50GHz × 4
Intel® Iris Plus Graphics 650 (Kaby Lake GT3e)
Number of platforms 2
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 2.0
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_spir
@cmey
cmey / README.txt
Created March 21, 2018 21:47
Ubuntu on Mac TouchBar
MacBookPro14,2: MacBookPro 13 Retina with Touchbar
Model A1706 EMC 3163
Serial C02v8055HV2V
no keyboard
no touch pad
no touch bar
no wifi (bad signal)
cb22/macbook12-spi-drivers ("applespi")
@cmey
cmey / install-intel-opencl-drivers-for-linux.sh
Last active September 29, 2023 14:36
Intel OpenCL drivers for Linux
# get OpenCL driver automated installer (installs kernel 4.7)
curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
chmod +x install_OCL_driver.sh
# install OpenCL driver
sudo ./install_OCL_driver.sh install
# check
ls /boot/vmlinuz-*intel*
@cmey
cmey / update_user_params.py
Last active September 21, 2016 19:45
Generalized params update function
def update_params(params):
# update params if user said 'auto', otherwise take user specified value
# a first try at reusing for all params the same code for that logic
for param_key, param_value in params.items():
actual_key = 'actual_' + param_key
# Is this a param that has a user mode?
has_user_mode = actual_key in params
if has_user_mode:
if param_value is 'user-forced':
# we could even do more checks here, maybe param-specific
@cmey
cmey / reikna_bug_fortran_order.py
Last active May 4, 2016 18:43
Reikna FFT produces unexpected transposed result when either input or output is Fortran-ordered
import itertools
import numpy as np
from numpy.fft import fftn as npfftn
from numpy.testing import assert_array_almost_equal
import pyopencl as cl
import pyopencl.array
from reikna import cluda
from reikna.fft import FFT as reikna_FFT
# Select device
@cmey
cmey / butterflycount.jl
Last active August 29, 2015 14:15
Implementation of count (in Julia v0.3)
# Implementation of count (in Julia v0.3)
# Christophe MEYER 2015
# count the number of times v appears in the sorted vector A
function count(A, v)
assert(issorted(A))
lower = findbound(A, v, :lower)
upper = findbound(A, v, :upper)
found = lower > 0 && upper > 0
if found