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?
# List of trails in North Ottawa Dunes park given as tuples. | |
# Vertex 100 = Trailhead in Coast Guard Park | |
# Vertex 200 = Trailhead at North Beach Park | |
# Vertex 300 = Trail endpoint at Hoffmaster State Park | |
[(100,1,.30), (1,24,.16), (1,2,.20), (2,19,.11), (19,25,.07), | |
(19,20,.16), (20,200, .16), (2,3,.49), (3,23,.11), (3,4,.34), | |
(4,23,.34), (4,18,.07), (4,21,.22), (5,21,.09), (5,6,.16), | |
(5,15,.23), (6,7,.34), (6,16,.07), (7,12,.12), (7,8,.15), (8,9,.21), | |
(8,13,.25), (9,10,.06), (10,11,.21), (10,12,.51), (11,300,.12), |
# Generate a random tree | |
random_tree = nx.random_tree(n) | |
# Draw the tree | |
nx.draw(random_tree, with_labels=True, node_color="lightblue", font_weight="bold") | |
plt.show() |
# 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): |