Skip to content

Instantly share code, notes, and snippets.

View aurelienpierre's full-sized avatar
🚣‍♂️
I may be slow to respond.

Aurélien PIERRE aurelienpierre

🚣‍♂️
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env python3
# © Aurélien PIERRE - 2022
# Licensed under the terms of the Do What the Fuck You Want to Public License (WTFPL)
import os
import re
"""
Step 1: gather GUI labels and module names from source code,
@aurelienpierre
aurelienpierre / pandas-checks.py
Last active March 16, 2022 10:50
Perform usual types and values checks on columns of a pandas.DataFrame
# Create Dataframe with fake data
df = pd.util.testing.makeMissingDataframe()
df['index1'] = df.index # create a text column by replicating index
df['A'] = 0 # create a zero column
# Helper function
def check_df_sanity(df, verbose=False):
"""Perform usual types and values checks on columns of a pandas.DataFrame"""
for col in df:
@aurelienpierre
aurelienpierre / start Da Vinci Resolve on 4K HiDPI screen with Nvidia Prime Xorg on Linux (Fedora 32)
Last active July 9, 2020 14:54
Solve the DPI scaling issue and start the application on discrete GPU altogether. Works the same with any Qt app needing GPU acceleration without having internal DPI scaling.
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia QT_DEVICE_PIXEL_RATIO=2 QT_AUTO_SCREEN_SCALE_FACTOR=true /opt/resolve/bin/resolve
This file has been truncated, but you can view the full file.
____________________________________________
Start of NVIDIA bug report log file. Please include this file, along
with a detailed description of your problem, when reporting a graphics
driver bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to 'linux-bugs@nvidia.com'.
nvidia-bug-report.sh Version: 23400452
Date: mardi 10 +avril 2018, +14:03:26 +(UTC-0400)
@aurelienpierre
aurelienpierre / lagrange.py
Last active December 8, 2022 10:44
[Python] Computes the symbolic expression of the Lagrange interpolation polynomial and evaluates the function if needed
from sympy import *
from sympy.matrices import *
import numpy
import pylab
import warnings
def Lagrange_interpolation(points, variable=None):
"""
Compute the Lagrange interpolation polynomial.
@aurelienpierre
aurelienpierre / darktable.css
Created December 1, 2016 18:33
Darktable 50% grey stylesheet
@define-color bg_color #7C7C7C;
@define-color plugin_bg_color #333;
@define-color fg_color #eee;
@define-color base_color #444;
@define-color text_color #eee;
@define-color selected_bg_color #666;
@define-color selected_fg_color #eee;
@define-color tooltip_bg_color #BEBEBE;
@define-color tooltip_fg_color #111;
@define-color really_dark_bg_color #595959;
@aurelienpierre
aurelienpierre / powertop
Last active December 29, 2015 18:07
Powertop Daemon
#! /bin/sh -e
DAEMON="/usr/sbin/powertop" #ligne de commande du programme
DEAMON_OPT="--auto-tune" #argument à utiliser par le programme
DAEMONUSER="root" #utilisateur du programme
DEAMON_NAME="powertop" #Nom du programme (doit être identique à l'exécutable)
PATH="/sbin:/bin:/usr/sbin:/usr/bin" #Ne pas toucher
test -x $DAEMON || exit 0
@aurelienpierre
aurelienpierre / Wine NVIDIA config
Created February 2, 2014 23:00
Regedit keys to configure NVIDIA graphics with Wine
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"DirectDrawRenderer"="opengl"
"Nonpower2Mode"="repack"
"OffscreenRenderingMode"="fbo"
"RenderTargetLockMode"="auto"
"UseGLSL"="readtex"
"VertexShaderMode"="hardware"
"VideoDescription"="NVIDIA GeForce 635M GT"
@aurelienpierre
aurelienpierre / Winetricks
Last active May 30, 2017 23:02
Creates a complete fake Windows 7 installation within a Wine Prefix in one command
#!/bin/bash
winetricks ie8 wmp10 allcodecs d3dx11_43 dotnet40 vc2005 vc2008 dsound ogg allfonts hosts ddr=opengl fontsmooth=rgb videomemorysize=2048 win7 glsl=enabled ao=enabled rtlm=auto psm=enabled mwo=force fontsmooth=rgb vsm=hardware
@aurelienpierre
aurelienpierre / Wacom Intuos Tablet udev configuration
Created January 26, 2014 23:24
Run the configuration script '/usr/bin/tablette.sh' when a Wacom Intuos is plugged. You have to save this command into /etc/udev/rules.d/90-wacom.rules
ACTION=="add", ATTRS{idVendor}=="056a", ATTRS{idProduct}=="0303", RUN+="/usr/bin/tablette.sh"