Skip to content

Instantly share code, notes, and snippets.

View jessejohnson's full-sized avatar
😌

Jesse Jojo Johnson jessejohnson

😌
View GitHub Profile
private void fixFbDb(){
DatabaseReference entireDb = FirebaseDatabase.getInstance().getReference();
final DatabaseReference goodRef = FirebaseDatabase.getInstance().getReference("vanilla-messages-debug");
entireDb.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot snapshot: dataSnapshot.getChildren()){
if(snapshot.getKey().startsWith("vanilla-messages-debug-")){
String badMessageId = snapshot.getKey().split("vanilla-messages-debug-")[1];
@jessejohnson
jessejohnson / applesandoranges.swift
Last active February 12, 2021 22:32
Can we replace the for loops with reduce?
func countApplesAndOranges(s: Int, t: Int, a: Int, b: Int, apples: [Int], oranges: [Int]) -> Void {
var numA = 0
var numO = 0
for ap in apples{
if(ap+a) >= s{
numA += 1
}
}
@jessejohnson
jessejohnson / gpt-march-14.cs
Last active March 22, 2023 09:53
Write cdk code to deploy ecs app with load balancer attached
using Amazon.CDK;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
namespace MyNamespace
{
public class MyStack : Stack
{
public MyStack(Construct scope, string id, IStackProps props = null) : base(scope, id, props)
@jessejohnson
jessejohnson / SelfAwareLLMs.md
Created March 29, 2023 00:37
I asked ChatGPT (March 14th Version) to write a short sci-fi story based on a comment on HN

Prompt:

Write a short sci-fi story where colonists from earth spread human knowledge by modelling it with Large Language Models. The story should be about 1000 words long. It should include dialog among characters, some amount of tension etc. It should try to stray from cliche sci-fi tropes.

Response:

The year is 2087, and the colonization of Mars is well underway. After years of research, exploration, and experimentation, a small colony has been established, and humanity's first Martian settlement is taking shape. But despite their successes, the colonists face a new challenge: how to share human knowledge with their new home and build a sustainable future.

The answer comes in the form of Large Language Models (LLMs), the most advanced AI language models ever created. Using these powerful tools, the colonists can model all human knowledge and experience, creating a digital library that can be accessed and improved by all.

As the team of scientists and engineers work tirelessly to integrate LLMs into