Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View anupj's full-sized avatar
:octocat:
❤️ 🦀

Anup Jadhav anupj

:octocat:
❤️ 🦀
View GitHub Profile
@anupj
anupj / gist:641fda3d43456e0cc263
Created June 29, 2015 11:52
Implementation of ES5 Object.getPrototypeOf in terms of __proto__
// Copied from Effective Javascript (by David Herman)
// Item 31: Prefer Object.getPrototypeOf to __proto__
// For JS environments that do not provide the ES5 API, it is easy to implement
// in terms of __proto__
if (typeof Object.getPrototypeOf === "undefined" ) {
Object.getPrototypeOf = function(obj) {
var t = typeof obj;
if (!obj || (t !== "object" && t != "function")) {
throw new TypeError("not an object");
@anupj
anupj / Convert15To18
Last active December 30, 2015 17:49
Convert Salesforce's 15 character id to 18 character Id See here for context: http://salesforce.stackexchange.com/questions/1653/what-are-salesforce-ids-composed-of
// Converts 15 char salesforce id to 18 char id
static String convertto18CharId(String original15charId){
if(original15charId == null || original15charId.isEmpty()) return null;
original15charId = original15charId.trim();
if(original15charId.length() != 15) return null;
final String BASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456";
StringBuilder result = new StringBuilder();

Keybase proof

I hereby claim:

  • I am anupj on github.
  • I am anup (https://keybase.io/anup) on keybase.
  • I have a public key whose fingerprint is 6DDC 12FC 7690 DC79 E7A2 5608 7396 0764 78A4 BD24

To claim this, I am signing this object:

@anupj
anupj / VFBootstrapSample
Created December 22, 2013 23:18
Use Bootstrap with Visualforce on the Force.com platform
<apex:page showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" language="en-US" applyHTMLTag="false">
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Anup's Bootstrap example</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Bootstrap -->
<link href="{!URLFOR($Resource.Bootstrap_3_0_3, 'dist/css/bootstrap.min.css')}" rel="stylesheet" />

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@anupj
anupj / audit-on-push.yml
Created October 24, 2022 05:19 — forked from LukeMathWalker/audit.yml
GitHub Actions - Rust setup
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:

Intro to Large Language Model by Andrej Karpathy

source

LLM

What is an LLM?

  • LLM is just two files. For e.g in this llama-2-70b model (released by Meta AI) there are just two files
    • parameters (140 GB)
  • these are just weights of this neural network (see below for more details)