Skip to content

Instantly share code, notes, and snippets.

View ksferguson's full-sized avatar

Scott Ferguson, PhD ksferguson

View GitHub Profile
@ericbarnhill
ericbarnhill / insight-python-flask-heroku.md
Last active June 6, 2020 14:52
Building an Insight project with Python, Flask, and Heroku

Building an Insight project with Python, Flask, and Heroku

A common goal in Insight data science projects is to deploy one's work as an app. The recommended app is Flask due to its dynamic page construction and easy interoperability with SQL databases. Heroku is then a great choice for deployment as it interacts easily with Python and Flask.

However a lot of information is out-of-date or suboptimal. This project will document how I built my Insight project app using Python, Flask, and Heroku.

*This project is adapted from and enormously indebted to the excellent "Flask by Example" tutorial found here. Basically I take this tutorial a little less far, fix some errors and adapt it to the requirements of the Insight project.

Contents

@hemenkapadia
hemenkapadia / Ubuntu 18.04 with Nvidia+CUDA on Optimus Laptop.md
Last active January 13, 2022 07:15
[Ubuntu 18.04 with Nvidia+CUDA on Optimus Laptop] Setting up Ubuntu 18.04 with nvidia drivers and CUDA for data science on Dell 7559 Optimus laptop #Ubuntu #Nvidia #CUDA #setup

Kernel settings for installation

Use a live usb to try Ubuntu before installing. Boot from the live usb. On the GRUB screen highlight the "Try Ubuntu ...." option and press e. Update kernel parameters by adding options before quiet splash such that the line should read as below

nogpumanager nomodeset i915.modeset=1 quiet splash

Note: On HighDPI screen machines there is a known issue whereby Ubiquity (ubuntu installer) craashes at the copying files step i.e. immediatly after the user setup screen. The cause and workaround are discussed in other gist post

Persist GRUB configuration

Post installation, to avoid updating the above mentioned kernel options each time the system is booted, edit GRUB configuration file sudo vi /etc/default/grub and make th

@hemenkapadia
hemenkapadia / Ubuntu Post Install Setup.txt
Last active October 1, 2019 22:05
[Ubuntu Post Install Setup] Instructions for installing applications post Ubuntu installation #Ubuntu #setup
#TODO - convert this into an installation script to help quickly setup the machine post installation
0. Time in Windows gets corrupted when dual boot with Ubuntu. (Note needed on 18.04 LTS)
First adjust hardware time in BIOS to UTC time
Windows will automatically recognise it and will display appropriate local time
For Ubuntu, update /etc/default/rcS and change line with UTC=no to UTC=yes, indicating that BOIS time is UTC.
Reboot - and check both systems.
- Follow this method too - https://www.howtogeek.com/323390/how-to-fix-windows-and-linux-showing-different-times-when-dual-booting/
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active April 13, 2024 07:33
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@afair
afair / tmux.cheat
Last active October 11, 2023 13:48
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &