Skip to content

Instantly share code, notes, and snippets.

View gabipurcaru's full-sized avatar

Gabi Purcaru gabipurcaru

View GitHub Profile
import pyaudio
from pydub import AudioSegment
import openai
import requests
import json
import os
from pydub.playback import play
import time
print("Ready")
> Can you create the hypothetical lyrics for a bonus track on Tool's album
Lateralus? The extra track should be in their style, and it should explore
themes around the coming of artificial intelligence, and how that will
exponentially increase the world's consciousness. Thanks!
Title: Sentience Unbound
[Verse 1]

TODO

x search for a train instead of a route
  x show relevant details when searching for a train (e.g. from, to instead of leavesAt, arrivesAt)
x remove "-2", etc. from train IR 1824-2
x serviceWorker
x multiple leg routes (e.g. Targu Jiu -> Bucharest -> Suceava)
x restrictions for multiple leg routes

x animations when changing search results

### Keybase proof
I hereby claim:
* I am gabipurcaru on github.
* I am gabipurcaru (https://keybase.io/gabipurcaru) on keybase.
* I have a public key whose fingerprint is CC23 04A2 2CFE 92BB 61E2 5DF5 5BEC 3310 7CBF 0A59
To claim this, I am signing this object:
set -g mouse-utf8 on
set -g mouse on
set -g set-titles off
set -g default-terminal "xterm-256color"
set -g prefix C-a
set-option -g history-limit 100000
import jester, asyncdispatch, htmlgen
routes:
get "/":
resp h1("Hello world")
runForever()
sieve_size = 100000000
sieve = [0] * sieve_size
for i in range(2, sieve_size / 2):
if sieve[i] == 0:
for j in range(2*i, sieve_size, i):
sieve[j] = 1
print(sieve_size - sum(sieve) - 2)
var sieve:array[0..100_000_000, bool]
for i in 2..(sieve.high div 2):
if not sieve[i]:
for j in countup(2*i, sieve.high, i):
sieve[j] = true
var num = 0
for i in 2..(sieve.high):
if not sieve[i]:
var foo = 2
function bar() {
foo = 10;
return;
function foo() {}
}
bar();
@gabipurcaru
gabipurcaru / markov.py
Created June 15, 2015 17:55
ConnectR MarkovR
# -*- coding: UTF-8 -*-
import random
class Chain:
def __init__(self):
self.weights = {}
def addEdge(self, fromWord, toWord):
if fromWord not in self.weights:
self.weights[fromWord] = {}