Skip to content

Instantly share code, notes, and snippets.

View fsiler's full-sized avatar

Frank Siler fsiler

View GitHub Profile
@lucataco
lucataco / ollama_fast_speech_text_speech.py
Last active October 26, 2024 23:28
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@jruts
jruts / neo4j_delete_duplicate_nodes.md
Last active September 28, 2023 14:22
How to delete duplicate nodes and their relationships in neo4j with cypher?

How to delete duplicate nodes and their relationships in neo4j with cypher based on a property of that node?

The problem is easy to understand. We have 'duplicate' nodes in our database based on the 'id' field on the node properties.

Well this sounds easy enough, until you have to actually do it.

First step

My first attempt was to try and figure out which nodes are actualy duplicate (based on a property on the node). This seems to be pretty straightforward.

Cypher:

@danbst
danbst / onsub.py
Created May 24, 2016 13:17
Mercurial 3.8+ compatible onsub extension
# onsub.py - execute commands recursively on subrepositories
#
# Copyright 2010, 2011 aragost Trifork
#
# This software may be used and distributed according to the terms of
# the GNU General Public License version 2 or any later version.
import os
from mercurial.i18n import _
from mercurial import extensions, subrepo, util, cmdutil
@chockenberry
chockenberry / finder_icons.sh
Last active February 10, 2024 19:05
A simple shell script to turn the Finders desktop icons on and off
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder
@rcfox
rcfox / science.dot
Created April 16, 2016 11:12
Production graph of science packs in Factorio
digraph Science {
style=invis; // Remove borders around clusters
edge[dir=back]; // Too lazy to fix the way I input everything...
node[label=""]; // Remove all of the text from nodes.
science1 [image="Science-pack-1.png"]
science2 [image="Science-pack-2.png"];
science3 [image="Science-pack-3.png"];
@danomanion
danomanion / notes.md
Created October 8, 2015 15:41
The Millionaire Fastlane Commandments CENTS.

The Millionaire Fastlane Commandments CENTS.

Source: https://www.youtube.com/watch?v=k_KlQ_Q-7cU

An Entrepreneur is someone who solves problems through scalable solutions.

C (Control)

  • Do you own the land you build your business on? Could someone slip the carpet from right under you?
  • Are you reliant on a single platform like Amazon, YouTube, Google Organic Search alone?
  • If 90% of your sales are based on one single platform like Amazon, they could kick you off and kill your business.
  • If 100% of your business comes from an organic Google algorithm and that algorithm changes, you are in trouble.
@Tblue
Tblue / mozlz4a.py
Last active November 6, 2024 19:26
MozLz4a compression/decompression utility
#!/usr/bin/env python3
# vim: sw=4 ts=4 et tw=100 cc=+1
#
####################################################################################################
# DESCRIPTION #
####################################################################################################
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
@acutesoftware
acutesoftware / tax.py
Created July 14, 2015 05:48
Combine bank statements and map to tax categories to simplify Australian Tax returns
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# tax.py written by Duncan Murray 14/7/2015
#
# Step 1 - download all your bank statements in CSV format
# then update the raw_files dictionary below
#
# Step 2 - create a mappings.csv file which maps the start of a
# a details column to a mapping, e.g.
# Details_string Maps_to Deductible
@cgrand
cgrand / transmogrify.clj
Last active August 29, 2015 14:18
transmogrify->> rewrites last-threaded forms to use transducers.
(defmulti transmogrify
"Rewrites the last form of a thread-last to use transducer (if possible)."
(fn [f xform src & args] f))
(defmacro transmogrify->>
"Like ->> but uses transducers"
([x] x)
([src & xs]
(let [end (last xs)
xforms (butlast xs)
@dylanmcdiarmid
dylanmcdiarmid / sexp-cheat-sheet
Created February 9, 2015 16:18
vim sexp mappings for normal people cheat sheet
.vimrc
" Map leader to comma
let maplocalleader=","
" Toggle this for vim-sexp to not go into insert mode after wrapping something
let g:sexp_insert_after_wrap = 0
" Toggle this to disable automatically creating closing brackets and quotes
let g:sexp_enable_insert_mode_mappings = 1
Vocab