Skip to content

Instantly share code, notes, and snippets.

View codekiln's full-sized avatar
🎧
Feedback Loops

M∎∎r codekiln

🎧
Feedback Loops
View GitHub Profile
@veekaybee
veekaybee / chatgpt.md
Last active April 12, 2024 20:16
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2024 10:22
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@Pyronerd62
Pyronerd62 / Home.vue
Created May 22, 2019 14:28
Add TinyMCE to Vue JS App
<style lang="scss" scoped>
.tinyMce-container{
margin-top: 3%;
margin-bottom: 3%;
}
</style>
<template>
<div>
<pre v-html="description"></pre>
<editor v-model="description"></editor>
@jaredly
jaredly / App.re
Last active January 1, 2021 17:34
ReasonReact Context API Example
module StringContext =
Context.MakePair({
type t = string;
let defaultValue = "Awesome";
});
let component = ReasonReact.statelessComponent("Tree");
let make = _children => {
@lsapan
lsapan / vue-cli-django.md
Last active December 29, 2022 10:47
Using Vue CLI to start a Vue frontend for use with a Django backend

Using Vue CLI to start a Vue frontend for use with a Django backend

Note: This guide has been updated for use with @vue/cli version 4! Please make sure you're using the latest version of @vue/cli.

When it comes to starting new Vue projects, you can't really beat Vue CLI. The Vue team has done a phenomenal job of making an easy-to-use tool for getting started with reasonable defaults. If you're using Django though, you may not have the easiest time getting its static system and webpack to play well together.

A good chunk of this is applicable to any webpack-compiled frontend and Django, but we'll focus specifically on the steps involved with Vue CLI.

As a quick heads up: this tutorial assumes you're creating your Vue project in a folder named frontend inside of your Django project folder. If you want it named something else, or want it in a different folder, just update the paths accordingly.

let str = ReasonReact.string;
let url = "http://localhost:3000/users";
type user = {
id: int,
name: string,
};
type state =
@Khady
Khady / user.json
Created February 2, 2018 03:17
VScode configuration to have schema validation while editing bsconfig.json (reasonml, bucklescript)
{
"json.schemas": [
{
"fileMatch": [
"bsconfig.json"
],
"url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json"
}
]
}
@dfee
dfee / graphene_subscription.py
Created November 25, 2017 03:17
Example of how subscriptions work with graphene
from collections import OrderedDict
import graphene
import rx
subject = rx.subjects.Subject()
class Author(graphene.ObjectType):
@cessor
cessor / pympstore.py
Created November 11, 2017 09:14
Multiprocessing & Sqlite Example
import sqlite3
import multiprocessing
'''
This program starts a daemon process that listens on a queue.
It then starts 10 processes that place integers in the queue.
The listening daemon pulls the integers out of the queue and
stores them in the database.
'''
DB_FILENAME = 'db.sqlite'
@lilactown
lilactown / promises.re
Last active August 20, 2022 07:56
Notes on using JavaScript Promises in ReasonML/BuckleScript
/**
* Making promises
*/
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok"));
/* Simpler promise creation for static values */
Js.Promise.resolve("easy");
Js.Promise.reject(Invalid_argument("too easy"));