Skip to content

Instantly share code, notes, and snippets.

@ginochenhj
ginochenhj / Output
Created July 11, 2023 14:43 — forked from Circuitsoft/Output
Capture single image V4L2
Driver Caps:
Driver: "omap3"
Card: "omap3/mt9v032//"
Bus: ""
Version: 0.0
Capabilities: 04000001
Camera Cropping:
Bounds: 752x480+0+0
Default: 752x480+0+0
Aspect: 1/1
@ginochenhj
ginochenhj / multiple-files-remove-prefix.md
Created January 1, 2022 15:48
Remove prefix from multiple files in Linux console

Bash

for file in prefix*; do mv "$file" "${file#prefix}"; done;

The for loop iterates over all files with the prefix. The do removes from all those files iterated over the prefix.

Here is an example to remove "bla_" form the following files:

bla_1.txt
bla_2.txt
@ginochenhj
ginochenhj / DataFrameTreeModel.py
Created August 30, 2020 17:42 — forked from sharpTrick/DataFrameTreeModel.py
Simple script demonstrating a custom Gtk.TreeModel wrapping a Pandas DataFrame for Gtk 3 (known as GenericTreeModel in PyGtk 2).
# I stole most of this from https://gist.github.com/andialbrecht/4463278
import gi
import pandas as pd
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
class DataFrameTreeModel(GObject.GObject, Gtk.TreeModel, Gtk.TreeSortable):