Skip to content

Instantly share code, notes, and snippets.

View christophengelmayer's full-sized avatar

Christoph Engelmayer christophengelmayer

View GitHub Profile
# Clone the repo
git clone https://github.com/imartinez/privateGPT
cd privateGPT
# Install Python 3.11
pyenv install 3.11
pyenv local 3.11
# Install dependencies
poetry install --with ui,local
@T1T4N
T1T4N / run_whisper.sh
Created October 10, 2022 14:47
Run OpenAI Whisper on M1 MacBook Pro
# Original author: https://twitter.com/esizkur/status/1579207536812904448
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
make
./download-ggml-model.sh large
ffmpeg -i recording.m4a -acodec pcm_s16le -ar 16000 recording.wav
./main -m models/ggml-large.bin -l de -f recording.wav | tee transcript.log
@bwaidelich
bwaidelich / Component_Atom_DefaultElement.fusion
Last active July 17, 2019 13:09
Atomic Fusion based Form Definition
prototype(My.Package:Form.DefaultElement) < prototype(Neos.Fusion:Component) {
# API
id = ''
name = ''
label = ''
value = null
isRequired = false
properties = Neos.Fusion:RawArray
validationErrors = Neos.Fusion:RawArray
@veuncent
veuncent / create_wagtail_pages_through_migration
Last active June 26, 2024 03:14
Set wagtail (home)pages programmatically during Django Migrations
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from wagtail.wagtailcore.models import Page, Site
def forwards_func(apps, schema_editor):
HomePage = apps.get_model('website', 'HomePage')
@dimaip
dimaip / Recursion.fusion
Last active January 18, 2018 10:30
Recursive rendering of menus with Fusion
prototype(Flowpack.FusionBP:RecursiveMenu) < prototype(Neos.Fusion:Array) {
@process.tmpl = ${'<li>' + value + '</li>'}
title = ${node.properties.title || '<em>' + node.name + '</em>'}
nextLevel = Neos.Fusion:Collection {
@process.tmpl = ${'<ul>' + value + '</ul>'}
@[email protected] = ${q(node).children().count() > 0}
collection = ${q(node).children().get()}
itemName = 'node'
itemRenderer = Flowpack.FusionBP:RecursiveMenu
}
@gtallen1187
gtallen1187 / scar_tissue.md
Created November 1, 2015 23:53
talk given by John Ousterhout about sustaining relationships

"Scar Tissues Make Relationships Wear Out"

04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.

This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.

[Laughter]

> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation

@iwyg
iwyg / neos.dev.conf
Created September 25, 2014 13:11
nginx config for typo3 neos
server {
listen *:80;
server_name neos.dev;
root /var/www/neos/Web;
autoindex off;
access_log /var/log/nginx/neos.dev.access.log;
error_log /var/log/nginx/neos.dev.error.log;
index index.php index.html;
@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@somatonic
somatonic / inputfieldfile-form.php
Last active March 31, 2023 01:14
ProcessWire front-end upload form example using ProcessWire Inputfields and form processing.
<?php
/**
* ProcessWire (2.5) InputfieldFile front-end upload form example
* Various workarounds to get it working with Errors for WireUpload
* and removing files upload after error
*/
$sent = false;
$upload_path = $config->uploadTmpDir;
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }