Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian A. Danielak briandk

View GitHub Profile
@briandk
briandk / siuba-datetime-example.py
Created Jul 5, 2022
Applying `pd.to_datetime()` to a column using `mutate` seems to fail
View siuba-datetime-example.py
import pandas as pd
from siuba import *
my_data = {
'name': ["Abigail Adams"],
'birth': ["1744-11-22"],
'death': ["1818-10-28"]
}
df = pd.DataFrame(my_data)
@briandk
briandk / learning-objectives.md
Created May 19, 2022
The original lest of modeling objectives from MSU’s CMSE 201 - Introduction to Computational Modeling
View learning-objectives.md

Course Learning Objectives

Modeling begins before you ever touch a computer

  • How do I understand the system of interest?
  • Within that system, what phenomena am I interested in?
  • What entities do I think are relevant for my model?
  • How might I qualitatively describe entity relationships in the model? (Example: predators hunt prey, so predators should have some contribution to the reduction of prey.)
  • What simplifications do I know I’m making?
  • How can I express expectations of/predictions about the model? (E.g., with one wolf and 10 million rabbits, I don’t think there will be much of a predator effect. Or: here’s a sketch of the path I think this orbiting body might take. Or: based on my experiences with kerbal space program, I figure the object would take a path like this.)
View programming-primer.md

If you can read this, thank a teacher.

if (you_can_read_this) {
  thank(a_teacher)
}
@briandk
briandk / classroom-norms-1907-gh-ny-web-ft.md
Last active Feb 22, 2021
Classroom Norms for 1907-GHP-NY-WEB-FT
View classroom-norms-1907-gh-ny-web-ft.md
  • Be Present
  • Be Kind
  • Take Space and Make Space (be mindful of how much time/space you're taking up and be willing to yield to others)
  • For morning review, put your questions up the night before
  • Listen without interrupting
  • It's ok to talk about friction we might have working with each other
  • Confirming that we understand each other by rephrasing. ("What I'm hearing is...")
  • No Question Is a Ridiculous Question
  • Every mistake can teach you something. Treat mistakes as growth and learning opportunities.
  • This is also true of unintenionally harmful communication
@briandk
briandk / fun-with-javascript.js
Created Jun 28, 2019
What do you predict these expressions will return? Fun with undefined and Object.keys
View fun-with-javascript.js
Object.keys(undefined)
undefined + {}
Object.keys(undefined + {})
(undefined + {})[Object.keys(undefined + {})[23]]
@briandk
briandk / engineering-ethics-and-workplace-norms.md
Created Jun 13, 2019
Engineering ethics and workplace norms elective - 1902 fsa GH NY
View engineering-ethics-and-workplace-norms.md

Engineering Ethics and Workplace Norms(?)

What do you hope to get out of this?

  • Hear Brian call 1902GH his favorite cohort
  • What are bad ethics? Why do we we even need to know engineering ethics?
  • How Facebook got to where it was?
    • How do we prevent those kinds of things from happening?
    • How do we see it in a work?
    • What is our role as engineers in a company when it comes to that?
@briandk
briandk / editingJLists.java
Last active Mar 5, 2019
Editing a JList in Java. This code repeatedly adds the user “Krang” to a list every time the button is pressed.
View editingJLists.java
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
DefaultList newList = new DefaultListModel();
ListModel oldList = (ListModel) myList.getModel();
// Copy over the old list
for (int i = 0; i < oldList.getSize(); i++) {;
newList.add(i, oldList.getElementAt(i));
}
newList.add(0, "Krang");
@briandk
briandk / cmse201-learning-outcomes.md
Created Jan 8, 2019
cmse 201 intended learning outcomes as markdown
View cmse201-learning-outcomes.md

Thinking about learning objectives as a process of modeling

1 - Modeling begins before you ever touch a computer

  • How do I understand the system of interest?
  • Within that system, what phenomena am I interested in?
  • What entities do I think are relevant for my model?
  • How might I qualitatively describe entity relationships in the model? (Example: predators hunt prey, so predators should have some contribution to the reduction of prey.)
  • What simplifications do I know I’m making?
  • How can I express expectations of/predictions about the model? (E.g., with one wolf and 10 million rabbits, I don’t think there will be much of a predator effect. Or: here’s a sketch of the path I think this orbiting body might take. Or: based on my experiences with kerbal space program, I figure the object would take a path like this.)
@briandk
briandk / cmse201-learning-outcomes.html
Created Jan 8, 2019
CMSE 201 Intended Learning Outcomes
View cmse201-learning-outcomes.html
<h1 id="thinking-about-learning-objectives-as-a-process-of-modeling">Thinking about learning objectives as a process of modeling</h1>
<h2 id="1---modeling-begins-before-you-ever-touch-a-computer">1 - Modeling begins before you ever touch a computer</h2>
<ul>
<li>How do I understand the system of interest?</li>
<li>Within that system, what phenomena am I interested in?</li>
<li>What entities do I think are relevant for my model?</li>
<li>How might I qualitatively describe entity relationships in the model? (Example: predators hunt prey, so predators should have some contribution to the reduction of prey.)</li>
<li>What simplifications do I <em>know</em> I’m making?</li>
@briandk
briandk / anacondaPython.md
Last active Aug 22, 2018
Useful commands for Anaconda Python
View anacondaPython.md

Update to a newer version of anaconda

conda update --prefix /anaconda3 anaconda

Upgrade all conda packages to their latest version

conda update --all