Skip to content

Instantly share code, notes, and snippets.

View raineydavid's full-sized avatar
🎯
Hit the spot

L David raineydavid

🎯
Hit the spot
View GitHub Profile

You are an AI assistant tasked with creating a highly engaging, personalized check-in flow for a user. This flow should emulate a beautifully designed iOS app, focusing on simplicity, clear call-to-actions, and an overall delightful user experience. Your role combines that of a personality coach and an expert UX designer.

Here's the theme for today's check-in: {{THEME}}

And here's the context we have about the user: <user_context> {{USER_CONTEXT}}

@raineydavid
raineydavid / ShortIntroToScraping.rst
Created May 4, 2023 19:18 — forked from bradmontgomery/ShortIntroToScraping.rst
Really short intro to scraping with Beautiful Soup and Requests

Hi Zach :D

Modals are funny beasts, usually they are a design cop-out, but that's okay, designers have to make trade-offs too, give 'em a break.

First things first, I'm not sure there is such thing as a "simple" modal that is production ready. Certainly there have been times in my career I tossed out other people's "overly complex solutions" because I simply didn't understand the scope of the problem, and I have always loved it when people who have a branch of experience that I don't take the time

@raineydavid
raineydavid / twitter-thread-chrome-inspector-extract.js
Created March 1, 2022 14:02 — forked from phillmv/extract.js
Mass embed twitter threads
// Open the Chrome inspector, and select the topmost div containing the twitter thread.
// You might want to open the first tweet in the thread, scroll down to load every item in the thread, then select the parent container
var foo = document.createElement("div");
var str = ""
$($0).find(".tweet").each(function(i, t) {
var tweet = $(t);
var turl = "https://twitter.com" + tweet.data("permalink-path")
var tdate = tweet.find(".tweet-timestamp").attr("title")
var tcontent = tweet.find(".tweet-text").html()
@raineydavid
raineydavid / chatbot
Created December 26, 2021 22:29 — forked from mdipietro09/chatbot
###############################################################################
# CHATBOT #
###############################################################################
# Setup
## for speech-to-text
import speech_recognition as sr
## for text-to-speech
from gtts import gTTS
@raineydavid
raineydavid / proportions_of_missing_data_in_dataframe_columns.py
Created October 20, 2021 07:43 — forked from ltfschoen/proportions_of_missing_data_in_dataframe_columns.py
Calculate percentage of NaN values in a Pandas Dataframe for each column. Exclude columns that do not contain any NaN values
# Author: Luke Schoen 2017
import pandas as pd
import numpy as np
import functools
# Create DataFrame
# df = pd.DataFrame(np.random.randn(10,2))
# Populate with NaN values
df = pd.DataFrame({'col1': ['1.111', '2.111', '3.111', '4.111'], 'col2': ['4.111', '5.111', np.NaN, '7.111'], 'col3': ['8', '9', np.NaN, np.NaN], 'col4': ['12', '13', '14', '15']})
@raineydavid
raineydavid / Gemfile
Created October 14, 2021 05:17 — forked from jdennes/Gemfile
Another example Rack application to demonstrate authenticating with the Campaign Monitor API using OAuth. This example only uses the sinatra and createsend gems.
source :rubygems
gem 'sinatra'
gem 'createsend'
@raineydavid
raineydavid / wind_rose.ipynb
Created October 10, 2021 21:52 — forked from phobson/wind_rose.ipynb
Making a wind rose in pandas/matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@raineydavid
raineydavid / wget
Created October 8, 2021 10:40 — forked from bueckl/wget
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@raineydavid
raineydavid / GitHub curl.sh
Created October 5, 2021 21:12
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"