Skip to content

Instantly share code, notes, and snippets.

View ryanorsinger's full-sized avatar
🎏
Reading the readme... again :)

Ryan Orsinger ryanorsinger

🎏
Reading the readme... again :)
View GitHub Profile
@ryanorsinger
ryanorsinger / directions.txt
Created February 1, 2019 17:50
Effectively practice a presentation
How to Practice a 5 minute group presentation
If you're still working on memorizing your script, then only read off of paper or notecards. No phones because phones = distration.
Have one person start the recorder and record the entire 5 minute presentation on the voice recorder on your phone.
Put the recording phone on the table, and everyone else put your phones away.
Present as if it's the real deal. Visualize your success.
Each of you have a pen and paper ready for the review session, so you can take notes about your own words and delivery.
After the presentation, take a little break, high five each-other. Take a moment to feel good about how far you've come.
Regroup and sit down together. Play back the audio. Listen to yourself carefully. Ask yourself, do your words sound like you? Are any sentences too big of a mouthful? Are you noticing that your words are changing a little bit from your script? That means your brain knows better.
This will take around 15 minutes for setup, presenting, and reviewing.
Do
@ryanorsinger
ryanorsinger / list_comprehension_practice.py
Last active May 12, 2025 22:02
17 List Comprehension Exercises
# 17 list comprehension problems in python
fruits = ['mango', 'kiwi', 'strawberry', 'guava', 'pineapple', 'mandarin orange']
numbers = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 19, 23, 256, -8, -4, -2, 5, -9]
# Example for loop solution to add 1 to each number in the list
numbers_plus_one = []
for number in numbers:
numbers_plus_one.append(number + 1)
@ryanorsinger
ryanorsinger / numpy_exercises_part_1.py
Last active November 1, 2023 17:25
Numpy introduction
import numpy as np
# Life w/o numpy to life with numpy
## Setup 1
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Use python's built in functionality/operators to determine the following:
# Exercise 1 - Make a variable called sum_of_a to hold the sum of all the numbers in above list
# Exercise 2 - Make a variable named min_of_a to hold the minimum of all the numbers in the above list
@ryanorsinger
ryanorsinger / conditionals.jd
Created March 29, 2019 14:43
Conditionals exercise
"use strict";
/**
* TODO:
* Write some JavaScript that uses a `confirm` dialog to ask the user if they
* would like to enter a number. If they click 'Ok', prompt the user for a
* number, then use 3 separate alerts to tell the user:
*
* - whether the number is even or odd
* - what the number plus 100 is
@ryanorsinger
ryanorsinger / .bash_helpers
Created May 10, 2019 05:46
.bash aliases and helpers
function pullall() {
git branch -a | grep -v master | sed 's. remotes/origin/..' | xargs -L 1 git checkout
}
alias ls="ls -lha"
@ryanorsinger
ryanorsinger / warmup.md
Created May 14, 2019 14:04
Regression Warmup

Regression Warmup

  1. Using pydataset, load the faithful dataset and read it's documentation.
  2. What is pearson's r for the two variables?
  3. Visualize the relationship between the variables.
  4. Build a linear model that predicts eruptions based on waiting.
  5. Create a visualization with your predictions
    1. waiting should be on the x axis, and eruptions on the y
    2. Use color to differentiate the actual vs predicted values.
  6. Add a descriptive title.
@ryanorsinger
ryanorsinger / global_gitignore.txt
Created June 18, 2019 19:23
Global .gitignore
# Run the following lines in your terminal to add .DS_Store, pycache, ipynb checkpoints, and env.py to the global gitignore file.
echo ".DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo ".ipynb_checkpoints" >> ~/.gitignore_global
echo "**/.ipynb_checkpoints" >> ~/.gitignore_global
echo "__pycache__" >> ~/.gitignore_global
echo "**/__pycache__" >> ~/.gitignore_global
echo "env.py" >> ~/.gitignore_global
echo "**/env.py" >> ~/.gitignore_global
@ryanorsinger
ryanorsinger / lists_of_dictionaries.py
Last active September 14, 2021 15:27
Working with Lists of Dictionaries
# Consider the following list containing 2 dictionaries.
# Remember, lists are ordered lists with a numeric index and dictionaries are labeled lists where each key denotes its value.
# In a way, think of each dictionary's key as a variable that holds the value on the right of the colon symbol.
fruits = [
{
"item": "apple",
"quantity": 5,
"price": 0.95
},
@ryanorsinger
ryanorsinger / array_of_objects.js
Last active July 12, 2019 15:30
Working with Arrays of Objects in JS
let cart = [
{
"name": "apple",
"price": 1.25,
"quantity": 5
},
{
"name": "kiwi",
"price": 3.99,
"quantity": 7
@ryanorsinger
ryanorsinger / fix_mysql_install
Last active May 22, 2020 15:01
Reinstall MySQL on a laptop that had an old version of homebrew installed
brew uninstall mysql
rm -rf /usr/local/var/mysql
sudo chown -R $(whoami) $(brew --prefix)/*
brew install [email protected]
If there are other problems, check out the link below:
https://gist.github.com/operatino/392614486ce4421063b9dece4dfe6c21