Skip to content

Instantly share code, notes, and snippets.

View tharpa's full-sized avatar

Ra Kowalski tharpa

View GitHub Profile
git clone https://github.com/OpenDevin/OpenDevin.git
cd OpenDevin
conda create -n od python=3.10
conda activate od
docker ps
(optional) install docker if not already installed
docker pull ghcr.io/opendevin/sandbox
export OPENAI_API_KEY={your key}
(optional I had to install rust) curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs/) | sh
(optional) restart terminal
@JGalego
JGalego / interviewer.py
Last active May 7, 2024 01:37
Job interviewer 🧑🏻‍💼 powered by Amazon Bedrock / Claude
r"""
____ _ _
| _ \ | | | |
| |_) | ___ __| |_ __ ___ ___| | __
| _ < / _ \/ _` | '__/ _ \ / __| |/ /
| |_) | __/ (_| | | | (_) | (__| <
|____/ \___|\__,_|_| \___/ \___|_|\_\
|_ _| | | (_)
| | _ __ | |_ ___ _ ____ ___ _____ _____ _ __
| | | '_ \| __/ _ \ '__\ \ / / |/ _ \ \ /\ / / _ \ '__|
@loreanvictor
loreanvictor / RISS.md
Last active March 16, 2024 09:32
Interaction as Content

Can We Get More Decentralised Than The Fediverse?

I guess that the [fediverse][fediverse] will be as decentralised as email: a bit, but not that much. Most people will be dependent on a few major hubs, some groups might have their own hubs (e.g. company email servers), personal instances will be pretty rare. This is in contrast to personal blogging, where every Bob can easily host their own (and they often do). I mean that's already implied by the name: fediverse is [a federated universe, not a distributed one][fed-v-dis].

Why does this matter? Well I like not being dependent on one entity, but I would like it much more if I was dependent on no entities at all. In other words, I like to publish my own personal blog and get all the goodies of a social network, without being dependent on other micro-blogging / social content platforms.

So in this writing, I'm going to:

  • ❓ Contemplate on why the fediverse gets federated not distributed (spoilers: its push vs pull)
  • 🧠 Ideate on how could we get a distri
@senning
senning / US Zip Codes from 2016 Government Data
Last active May 11, 2020 20:43 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates.Comma delimited for your database goodness.Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2024 16:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
class MyServiceActor extends Actor with MyService {
// the HttpService trait defines only one abstract member, which
// connects the services environment to the enclosing actor or test
def actorRefFactory = context
// this actor only runs our route, but you could add
// other things here, like request stream processing
// or timeout handling
def receive = runRoute(myRoute)
@zergood
zergood / gist:53977efd500985a34ea1
Created May 27, 2015 11:26
Akka http sample for benchmarking
trait Core {
implicit val system: ActorSystem = ActorSystem("Suggestion")
implicit val materializer: ActorFlowMaterializer = ActorFlowMaterializer()
implicit val ec: ExecutionContext = system.dispatcher
}
object AkkaHttpStarter extends App{
val http = new VanilaHttp with Core{
override def config: Config = ConfigFactory.load()
}
@mfirry
mfirry / HttpGate
Created February 25, 2015 17:18
Example using akka-http with SprayJson
package com.example
import akka.actor.ActorSystem
import akka.http.Http
import akka.http.marshalling.ToResponseMarshallable.apply
import akka.http.server.Directive.addByNameNullaryApply
import akka.http.server.Directive.addDirectiveApply
import akka.http.server.Directives.IntNumber
import akka.http.server.Directives.complete
import akka.http.server.Directives.get
@agemooij
agemooij / customformat.scala
Last active November 28, 2022 13:50
More advanced example of a custom spray-json format
implicit object ProductItemFormat extends RootJsonFormat[ProductItem] {
// some fields are optional so we produce a list of options and
// then flatten it to only write the fields that were Some(..)
def write(item: ProductItem) = JsObject(
List(
Some("product_number" -> item.productNumber.toJson),
item.ean.map(ean ⇒ "ean" -> ean.toJson),
Some("title" -> item.title.toJson),
item.description.map(description ⇒ "description" -> description.toJson),
Some("price" -> item.price.toJson),