Skip to content

Instantly share code, notes, and snippets.

View jcraane's full-sized avatar

Jamie Craane jcraane

View GitHub Profile
@rain-1
rain-1 / LLM.md
Last active November 2, 2024 12:14
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@DRSchlaubi
DRSchlaubi / Arrays.kt
Created February 5, 2022 18:21
Exposed support for arrays
import org.jetbrains.exposed.sql.Column
import org.jetbrains.exposed.sql.ColumnType
import org.jetbrains.exposed.sql.CustomStringFunction
import org.jetbrains.exposed.sql.EqOp
import org.jetbrains.exposed.sql.Expression
import org.jetbrains.exposed.sql.ExpressionWithColumnType
import org.jetbrains.exposed.sql.Table
import org.jetbrains.exposed.sql.statements.api.PreparedStatementApi
import org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl
import org.jetbrains.exposed.sql.stringLiteral
@apkelly
apkelly / MatrixCompose.kt
Last active September 16, 2021 23:11
Matrix Animation
import android.graphics.Typeface
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
@c5inco
c5inco / MaterialMotionTransitions.kt
Last active December 7, 2023 08:12
Reusable transitions that map to Material 2 motion system - https://material.io/develop/android/theming/motion
// Requires Compose 1.1.0-alpha02+
// Best used with navigation animation transitions in Accompanist 0.17.0+
import androidx.compose.animation.*
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
@AlexGladkov
AlexGladkov / Example.swift
Created July 26, 2021 08:22
SwiftUI + Kotlin Flow
struct ExampleView: View {
let viewModel: AuthViewModel = AuthViewModel()
var body: some View {
ObservingView(statePublisher: asPublisher(viewModel.viewStates()),
actionPublisher: asPublisher(viewModel.viewActions()),
content: { state, action in
// your view here
})
@Aidanvii7
Aidanvii7 / NavControllerComposeUtils.kt
Last active August 13, 2023 16:38
Compose Navigation with Parcelable arguments
@file:Suppress("UnnecessaryVariable", "PackageDirectoryMismatch")
package androidx.navigation
import android.os.Bundle
import android.os.Parcelable
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
fun NavController.navigate(
@dhermes
dhermes / README.md
Last active January 30, 2024 21:45
Understanding Cross-Account ECR Options

Understanding Cross-Account ECR Options

Executive Summary

  • Common to split environments into multiple AWS accounts; e.g. sandbox:111111111111 and prod:222222222222
  • Common to have multiple Kubernetes clusters in a given account; e.g. dev and sandbox clusters in sandbox:111111111111 and beta and prod clusters in prod:222222222222
  • Centralize ECR images in a dedicated registry (one registry per AWS region);
@MarkusKramer
MarkusKramer / Base64.kt
Last active October 29, 2024 14:53
Kotlin Multiplatform Base64 - no extra dependencies. Based on Java's implementation.
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
@ErikHellman
ErikHellman / LoginScreenWithCompose.kt
Created December 16, 2019 17:51
A simple demo of using Jetpack Compose to build a Login screen
package se.hellsoft.jetpackcomposeintro
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.Composable
import androidx.compose.Model
import androidx.compose.state
import androidx.compose.unaryPlus
import androidx.ui.core.*
import androidx.ui.foundation.shape.border.Border
@codan-telcikt
codan-telcikt / geometry_geojson.yaml
Last active September 3, 2023 11:47 — forked from bubbobne/geometry_geojson.yaml
An OpenAPI definition for GeoJSON with Geometry and Features.
# MIT License
#
# Copyright (c) 2017 Daniele Andreis <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: