Based on the official GTD yearly review template and this checklist of GTD review items.
- Review [[Areas of Focus]]
- Do any of these need changing?
- Do I need to add any?
- Do I need to combine any?
# Python code for MTH 325 F24 Homework 5 | |
## 1. Iterating through a list | |
vertex_list = [(2,3), (2,4), (4,5), (1,3)] | |
for vertex in vertex_list: | |
print(vertex[1]) | |
## 2. A dictionary |
# Libraries | |
library(dplyr) | |
library(tidyverse) | |
library(ggplot2) | |
# Load data | |
colnames <- c("time", "email", "name", "section", | |
"challenge", "support", | |
"competence", "autonomy", "relatedness", |
Based on the official GTD yearly review template and this checklist of GTD review items.
# Use basic logic commands to "fake" set operations. | |
# Here's union: | |
U = [1,2,3,4,5,6,7,8,9,10] | |
A = [1,2,3,4,5,6] | |
B = [2,4,6] | |
# A union B | |
[x for x in U if ((x in A) or (x in B))] |
# Recursive functions for MTH 225 9/25/2023 | |
# Input is a positive integer | |
def A(n): | |
if n == 1: | |
return n | |
else: | |
return n + A(n-1) | |
# Input is a positive integer |
# Individual Collatz computation | |
def f(n): | |
if n % 2 == 0: | |
return n//2 | |
else: | |
return 3*n+1 | |
# Create sequence of integers from the Collatz function | |
# This assumes the Collatz conjecture is true LOL | |
def collatz(n): |
from sympy import * | |
def niceEigs(e1,e2): | |
M = Matrix([[e1,0],[0,e2]]) | |
P = randMatrix(2,2,-3,3) | |
while P.det() == 0: | |
# Change the -3 and 3 if you want more variety in the entries | |
P = randMatrix(2,2,-3,3) | |
return P*M*P.inv() |