Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / LLM.md
Last active June 21, 2024 08:12
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.

@marcgg
marcgg / notevalues.json
Created November 1, 2016 10:56
note frequency value
var noteValues = {
'C0': 16.35,
'C#0': 17.32,
'Db0': 17.32,
'D0': 18.35,
'D#0': 19.45,
'Eb0': 19.45,
'E0': 20.60,
'F0': 21.83,
'F#0': 23.12,
@ckraybill
ckraybill / deploy_hooks.yml
Created April 9, 2015 04:52
Cloud66 custom deploy hook for configuring papertrail to log application logs. These go in your `.cloud66` deployment folder.
production:
after_rails:
- source: /.cloud66/log_files.yml
destination: /etc/log_files.yml
sudo: true
target: rails
apply_during: build_only
- source: /.cloud66/remote_syslog.init.d
destination: /etc/init.d/remote_syslog
# config/initializers/instrumentation.rb
# Subscribe to grape request and log with Rails.logger
ActiveSupport::Notifications.subscribe('grape.request') do |name, starts, ends, notification_id, payload|
Rails.logger.info '[API] %s %s (%.3f ms) -> %s %s%s' % [
payload[:request_method],
payload[:request_path],
(ends-starts)*1000,
(payload[:response_status] || "error"),
payload[:x_organization] ? "| X-Org: #{payload[:x_organization]}" : "",
@mudassir0909
mudassir0909 / selectable_placeholder.js
Last active September 30, 2017 03:18
Selectable Placeholder for selectize dropdown plugin
Selectize.define('selectable_placeholder', function( options ) {
var self = this;
options = $.extend({
placeholder: self.settings.placeholder,
html: function ( data ) {
return (
'<div class="selectize-dropdown-content placeholder-container">' +
'<div data-selectable class="option">' + data.placeholder + '</div>' +
'</div>'
@hakanensari
hakanensari / benchmark.rb
Created October 3, 2012 18:47
PostgreSQL update strategies in and around Rails
require 'active_record'
require 'activerecord-import'
require 'benchmark'
require 'pg'
include ActiveRecord
Base.establish_connection adapter: 'postgresql',
encoding: 'unicode',
pool: 5,