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
@raineydavid
raineydavid / exporting_modules_functions_from_python_init.md
Created July 1, 2021 04:53 — forked from CMCDragonkai/exporting_modules_functions_from_python_init.md
Exporting Modules and Functions from Python `__init__.py` #python

Exporting Modules and Functions from Python __init__.py

Any directory with __init__.py is considered a package in Python.

Any python files inside a package is considered a module.

Modules contain functions and other bindings that is always exported.

If you are outside the package, and you want to import a module from a package:

import requests
import csv
import sys
populaton_url = "https://petitionmap.unboxedconsulting.com/json/mps/population_ons.json"
req = requests.get(populaton_url)
POULATION_BY_GSS = req.json()
@raineydavid
raineydavid / notebook_launcher.py
Created May 6, 2021 02:04 — forked from timo/notebook_launcher.py
branded ipython notebook launcher
"""==============================
Branded IPython Notebook Launcher
=================================
Executing this module will create an overlay over ipython notebooks own static
files and templates and overrides static files and templates and copies over all
example notebooks into a temporary folder and launches the ipython notebook server.
You can use this to offer an interactive tutorial for your library/framework/...
@raineydavid
raineydavid / notebook_launcher.py
Created May 6, 2021 02:04 — forked from timo/notebook_launcher.py
branded ipython notebook launcher
"""==============================
Branded IPython Notebook Launcher
=================================
Executing this module will create an overlay over ipython notebooks own static
files and templates and overrides static files and templates and copies over all
example notebooks into a temporary folder and launches the ipython notebook server.
You can use this to offer an interactive tutorial for your library/framework/...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
@raineydavid
raineydavid / Code.gs
Created September 30, 2020 18:46 — forked from Xhynk/Code.gs
A simple Google Apps Script to submit a Google Sheets powered timesheet: https://docs.google.com/spreadsheets/d/1D-YWjt_Zl8WrAuicmUKZsMzSpEOwv1vYL06dBdObyb4/
/*-----------------------------------*\
Written with 💖 by @Xhynk
Donate:
https://xhynk.com/#donate
\*-----------------------------------*/
// Example Google Sheets Timesheet: https://docs.google.com/spreadsheets/d/1D-YWjt_Zl8WrAuicmUKZsMzSpEOwv1vYL06dBdObyb4/
function submitTimesheet(e){
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@raineydavid
raineydavid / scrape-airtable.py
Created June 26, 2020 15:20 — forked from Phoenix-Effect/main.py
Scrape videos data from youtube and push to airtable. By default reads from videos.txt but can defined with an argument.
import pafy
import os
import glob
import re
from airtable import Airtable
from airtable.auth import AirtableAuth
import requests
from pathlib import Path
from webvtt import WebVTT
@raineydavid
raineydavid / bobross.css
Created March 9, 2020 14:33 — forked from thomaspark/bobross.css
Bob Ross’ color palette in CSS
.sap-green {
background-color: #0A3410;
}
.sap-green-text {
color: #0A3410;
}
.sap-green-border {
border-color: #0A3410;
}