Skip to content

Instantly share code, notes, and snippets.

View dstack4273's full-sized avatar
💭
🤷‍♂️

Dustin S. dstack4273

💭
🤷‍♂️
View GitHub Profile
@veekaybee
veekaybee / chatgpt.md
Last active March 10, 2025 07:45
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@gaearon
gaearon / modern_js.md
Last active February 12, 2025 21:09
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
@timball
timball / de-amazon-kindle.sh
Created October 5, 2017 03:26
this makes the amazon kindle fire not terrible to use
# de-amazon-kindle.sh
#
# Based on savvytechwinner windows script ...
# https://forum.xda-developers.com/amazon-fire/general/amazon-fire-utility-tool-bloat-removal-t3641151
#
# ported to mac/linux/bash ... i guess technically this would work in windows
#
# requires:
# - dialog(1)
# - savvytechwinner's zip file w/ all the .apks to be sideloaded.
@jobinlawrance
jobinlawrance / extract.py
Created July 14, 2017 14:38
A python script to recursively extract .tar.gz files and .gz files : reference - http://guanidene.blogspot.in/2011/06/nested-tar-archives-extractor.html
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
"""A command line utility for recusively extracting nested tar archives."""
__author__ = "Pushpak Dagade (पुष्पक दगड़े)"
__date__ = "$4 July, 2011 3:00:00 PM$"
import os
import sys
@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@matt-snider
matt-snider / README.md
Last active April 6, 2022 21:54
Daily XKCD Dashing Widget

Preview

Description

A Dashing widget that shows the current xkcd comic.

The widget will display the current comic if it was published today, and otherwise it will find a random one. This ensures there is a new comic shown every day.

Dependencies

The only dependency is json.

@tevino
tevino / fix_virtualenv
Last active December 28, 2024 15:11
Fix python virtualenv after python update
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
BAD_ENV_PATHS="/usr/local"
echo "Ensure the root of the broken virtualenv:"
echo " $ENV_PATH"
@raghothams
raghothams / ds-expenses.ipynb
Created June 1, 2015 15:38
expenses to csv convertor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marksteve
marksteve / pelican_deployer.py
Last active January 25, 2019 23:51
Push-to-deploy static sites with Pelican, Flask and Github
"""
Simple web server that listens for Github webhooks to implement push-to-deploy
with Pelican static sites
Settings are loaded from a json file except for SECRET which should be an
environment variable
Example `deployer.json`
{
@goldsmith
goldsmith / python_mavericks_guide.sh
Last active December 25, 2024 20:56
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.