Skip to content

Instantly share code, notes, and snippets.

Avatar
🐧
Art, engineering & digital training

Yoan Mollard ymollard

🐧
Art, engineering & digital training
  • Bordeaux INP
  • Bordeaux, France
View GitHub Profile
View json.json
In [6]: with open("/home/yoan/Téléchargements/advice.json") as f:
...: d = json.load(f)
...:
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-6-dcb18e555b16> in <module>
1 with open("/home/yoan/Téléchargements/advice.json") as f:
----> 2 d = json.load(f)
3
View dataset.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View exo2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View exo1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ymollard
ymollard / jitsi_crop_1920x1080.bash
Last active Mar 14, 2021
Crop and blur Jitsi from 1920x1080 screen captures
View jitsi_crop_1920x1080.bash
#!/bin/bash
type convert || exit(1);
for i in Capture*png; do
convert "$i" \
-region 1600x800+300+200 -blur 0x9 \
"tmp-$i";
convert "tmp-$i" \
-crop 1920x930+0+120 \
View gist:f953ca7e797d0ea114c69ce0dd20e9d4
File "/usr/share/system-config-printer/printerproperties.py", line 1425, in load
option.reinit (value, supported=supported)
File "/usr/share/system-config-printer/options.py", line 229, in reinit
self.set_widget_value (self.original_value)
File "/usr/share/system-config-printer/options.py", line 257, in set_widget_value
index = self.combobox_map.index (ipp_value)
ValueError: 0 is not in list
@ymollard
ymollard / android-frontage.bash
Last active Dec 15, 2020
Build frontage-frontend
View android-frontage.bash
sudo apt install openjdk-8-jdk google-android-platform-24-installer
sudo update-alternatives --config java # Select Java 8
sudo update-alternatives --config javac # Select Java 8
export ANDROID_SDK_ROOT=/home/$USER/Android/Sdk
# JAVA_HOME/ANDROID_HOME are not needed
ionic cordova prepare android
ionic cordova run android --device
View count_files_by_extension.bash
find -type f | rev | cut -d. -f 1 | rev | sort | uniq -c | sort -n
@ymollard
ymollard / mount_img.md
Created Oct 31, 2020
Mount an img file with multiple partitions to edit files in them
View mount_img.md
sudo losetup 2020-10-23-poppy-torso.img -Pf
ll /dev/loop*

Then find the partition there eg /dev/loop15p2

mdkir -p mnt
@ymollard
ymollard / multipass.md
Last active Feb 4, 2021
Multipass VMs
View multipass.md

Build a custom image

multipass launch           # will create a 20.04
sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop xrdp
sudo passwd ubuntu         # Change the password