Skip to content

Instantly share code, notes, and snippets.

@larry0x
larry0x / json-raw-message-to-sdk-msg.go
Created June 16, 2023 03:37
json.RawMessage to sdk.Msg
package main
import (
"encoding/json"
"fmt"
"reflect"
"cosmossdk.io/simapp"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
@kconner
kconner / macOS Internals.md
Last active May 6, 2024 22:20
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@rain-1
rain-1 / LLM.md
Last active May 5, 2024 07:13
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.

@imranismail
imranismail / README.md
Last active January 5, 2017 15:37
Implementing Ruby's lonely operator using Elixir's custom infix function

Implementing Ruby's lonely operator using Elixir's custom infix function

iex> import ViewHelper
iex> user = %{name: "Imran", address: %{postcode: 33160}}
iex> user ~> :name
# "Imran"
iex> user ~> :address ~> :postcode
# 33160
iex> user ~> :address ~> :country
@NSExceptional
NSExceptional / ResponseParser.swift
Last active February 21, 2018 22:55
A simple class to automate the parsing of an NSURLSessionTask response.
//
// Copyright © 2016 Tanner Bennett. All rights reserved.
//
import Foundation
typealias ResponseParserBlock = (ResponseParser) -> Void
class ResponseParser {
@jurezove
jurezove / iOS Layout Anchors.swift
Last active April 6, 2017 17:15
Demonstrating Layout Anchors on iOS
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
var container = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: 400))
container.backgroundColor = UIColor.greenColor()
XCPlaygroundPage.currentPage.liveView = container
@miguelsaddress
miguelsaddress / octave.md
Created January 6, 2016 20:25 — forked from obstschale/octave.md
An Octave introduction cheat sheet.

Octave CheatSheet

GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)

Basics

  • not equal ~=
  • logical AND &&
@dlstadther
dlstadther / example_redshift_copy.py
Last active June 9, 2021 07:35
Using Luigi's Redshift and S3
# import luigi modules
import luigi
from luigi.contrib import redshift
from luigi import configuration, s3
# import python core modules
import os
import shutil
import datetime
@DavidNix
DavidNix / logNSNotifications.m
Last active December 30, 2022 10:58
Log all NSNotifications as they are fired
static void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo);
void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,