Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
# This is a work in progress. There are still bugs. Once it is production-ready this will become a full repo. | |
import os | |
def count_tokens(text, model_name="gpt-3.5-turbo", debug=False): | |
""" | |
Count the number of tokens in a given text string without using the OpenAI API. | |
This function tries three methods in the following order: | |
1. tiktoken (preferred): Accurate token counting similar to the OpenAI API. | |
2. nltk: Token counting using the Natural Language Toolkit library. |
import os | |
import pickle | |
import warnings | |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from tensorflow.keras.callbacks import EarlyStopping | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.layers import Dropout |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
Serverless infrastructure like AWS Lambda and Google Cloud Functions have made it much cheaper for developers to offer server-side code for public consumption without keeping a server always running.
If these functions could be declared as stateless or deterministic, costs can be brought down even more because only the first invocation needs to be executed. Cached response could be returned for future invocations with the same input arguments.
All modern browsers support URL lengths of thousands of characters, even on mobile. A lot of data can be embedded and passed around directly in the URLs (instead of passing identifiers which requires a look-up which costs server time).
So here's a thought:
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf | |
// Remove any duplicates from an array of primitives. | |
const unique = [...new Set(arr)] | |
// Sleep in async functions. Use: await sleep(2000). | |
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms))); | |
// or | |
const sleep = util.promisify(setTimeout); |
require('./util'); | |
const Candler = require('./candle-db'); | |
const ATR_LENGTH = 24; | |
const SMA_LENGTH = 24; | |
let trs = []; // series. needed by atr() function. |
// ==UserScript== | |
// @name BitMex USD Converter | |
// @namespace https://bitmex.com/ | |
// @version 0.11 | |
// @description Get some sanity into your gambling. | |
// @author koinkraft | |
// @grant none | |
// @include https://bitmex.com/* | |
// @include https://www.bitmex.com/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js |
const puppeteer = require('puppeteer'); | |
const imagemin = require('imagemin'); | |
const imageminPngquant = require('imagemin-pngquant'); | |
// Get the URL and the slug segment from it | |
const url = process.argv[2]; | |
const segments = url.split('/'); | |
const slug = segments[segments.length-2]; | |
(async () => { |
//SHOW THE LAUNCHER WHEN A USER SCROLLS TO THE BOTTOM OF YOUR PAGE | |
//You'll need to have 'hide_default_launcher: true' defined in your intercomSettings object when the page loads initially. | |
$(window).scroll(function() { | |
if($(window).scrollTop() + $(window).height() == $(document).height()) { | |
Intercom('update', {"hide_default_launcher": false}); | |
} | |
}); | |
//SHOW THE LAUNCHER AFTER A USER CLICKS A BUTTON |