Skip to content

Instantly share code, notes, and snippets.

View betolink's full-sized avatar

Luis López betolink

View GitHub Profile
@ajelenak
ajelenak / h5stat-chunks.py
Last active January 11, 2024 01:42
Additional HDF5 dataset chunk statistics
from collections import defaultdict
from typing import Union
from dataclasses import dataclass
import argparse
from functools import partial, reduce
import operator
import math
import h5py
@MarcSkovMadsen
MarcSkovMadsen / hvplot_interactive.py
Last active January 3, 2023 20:12
Example of using hvPlot .interactive with Panel
import pandas as pd
import hvplot.pandas
import panel as pn
pn.extension(sizing_mode="stretch_width")
PALETTE = [
"#ff6f69",
"#ffcc5c",
"#88d8b0",
@the-spyke
the-spyke / pipewire.md
Last active July 14, 2024 13:08
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@aleixmorgadas
aleixmorgadas / 1. Fallacies.md
Last active October 2, 2021 04:53
Distributed Systems Fundamentals Questions

Fallacy #1. The network is reliable

  • Why the pattern Client-Response might cause some troubles?
  • What are distributed objects?
  • How we can solve this problem?

Fallacy #2. Latency isn't a problem

  • How many calls do you do between services before replying a syncronous call to the end user?
  • Which pattern is more common in your application? Remote calls or messages?
@ajelenak
ajelenak / h5-to-zarr.py
Last active March 1, 2023 16:04
Python code to extract HDF5 chunk locations and add them to Zarr metadata.
# Requirements:
# HDF5 library version 1.10.5 or later
# h5py version 3.0 or later
# pip install git+https://github.com/HDFGroup/zarr-python.git@hdf5
import logging
from urllib.parse import urlparse, urlunparse
import numpy as np
import h5py
import zarr
Development Status :: 1 - Planning
Development Status :: 2 - Pre-Alpha
Development Status :: 3 - Alpha
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
Development Status :: 6 - Mature
Development Status :: 7 - Inactive
Environment :: Console
Environment :: Console :: Curses
Environment :: Console :: Framebuffer
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@conspect
conspect / cult_of_ignorance.md
Last active May 29, 2024 19:02
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingeniously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way throughout political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people

@sebsto
sebsto / gist:19b99f1fa1f32cae5d00
Created August 8, 2014 15:53
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@Liryna
Liryna / ARMDebianUbuntu.md
Last active May 20, 2024 15:04
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux