Skip to content

Instantly share code, notes, and snippets.

View cosimo's full-sized avatar
🇳🇴

Cosimo Streppone cosimo

🇳🇴
View GitHub Profile
@JuneKelly
JuneKelly / BaselineTest.txt
Created December 12, 2017 13:45
Full text of the Baseline Test from Blade Runner 2049
A blood black nothingness began to spin.
Began to spin.
Let's move on to system.
System.
Feel that in your body.
@thomwolf
thomwolf / fast_speech_text_speech.py
Last active April 26, 2024 10:03
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active April 19, 2024 07:36
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {
@cosimo
cosimo / find-unused-css-selectors.pl
Created July 26, 2012 14:09
Find unused CSS selectors across a list of URLs
#!/usr/bin/env perl
#
# Find unused CSS selectors by crawling a list of URLs
# (--url, even more than one) and matching all elements in
# a page to find out which selectors are never used across
# all given URLs
#
# Usage:
# ./find-unused-css-selectors.pl --css file.css --url http://some.url [--url http://some.other.url ...]
#
@ovrnt
ovrnt / install_gpu_ubuntu_2204.sh
Created January 29, 2024 05:00
Yam Peleg's Ubuntu 22.04 “CUDA + GPU Drivers + CuDNN and everything else” installer (https://twitter.com/Yampeleg/status/1751823896800583924)
#!/bin/bash
# Verify if GPU is CUDA-enabled
lspci | grep -i nvidia
# Remove previous NVIDIA driver installation
sudo apt-get purge nvidia* -y
sudo apt remove nvidia-* -y
sudo rm /etc/apt/sources.list.d/cuda* -y
sudo apt-get autoremove && sudo apt-get autoclean -y
@mikoim
mikoim / Sennheiser_MOMENTUM_True_Wireless_2_Linux.md
Last active October 26, 2023 15:18
Sennheiser MOMENTUM True Wireless 2 on Linux with BlueZ 5 and PulseAudio

Sennheiser MOMENTUM True Wireless 2 on Linux with BlueZ 5 and PulseAudio

Unfortunately, it does not work as out of box. After applying following workarounds, finally, it works.

  • Fedora 32 x86_64
  • Linux kernel 5.7.10 vanilla
  • PulseAudio 13.99 + pulseaudio-module-bluetooth-freeworld (for proprietary codecs aptX)
  • BlueZ 5.54

😱🙀😱🙀😱

@cosimo
cosimo / disable_cb_access_scanner.sh
Created June 24, 2021 13:24
Disable the Couchbase Bucket Access Scanner to avoid micro outages
#!/bin/bash
#
# Disables the Couchbase access scanner on a list of buckets
# Access scanner can cause short outages when buckets are very large.
#
set -e -x
USER='Administrator'
@troyane
troyane / SNER_preparer
Last active February 1, 2023 21:53
Script to prepare Stanford NER to work with your Python and NLTK
#!/bin/bash
mkdir my_project
cd my_project
echo " . . . Downloading file stanford-ner-2014-08-27.zip"
# NOTE: need to update link for further versions
wget http://nlp.stanford.edu/software/stanford-ner-2014-08-27.zip
echo " . . . Unpacking stanford-ner-2014-08-27.zip"
=pod
Get the game.png from http://i.imgur.com/FxgMM.png
Get link.png from http://imgur.com/P7JhS
=head1 INSTALL
For windows get strawberry perl
Then do:
@andreaso
andreaso / listen-on-totp-range.network
Created May 22, 2021 06:45
Not-entirely-serious SSH TOTP implementation, inspired by https://twitter.com/kistel/status/1395375108315824130.
# /etc/systemd/network/listen-on-totp-range.network
[Match]
Name = lo
[Route]
Destination = 2001:db8:67c1:22::/64
Type = local