Skip to content

Instantly share code, notes, and snippets.

View AaronGoldsmith's full-sized avatar

Aaron Goldsmith AaronGoldsmith

View GitHub Profile
@AaronGoldsmith
AaronGoldsmith / Matrix.cpp
Last active November 21, 2016 00:57
matrix structure in c++
struct Matrix{
// you cannot initialize a variable ....
// ... (assign it values) inside the structure
int matrix[3][3];
};
void printMatrix(struct Matrix *m){
for (int i = 0;i<3;i++){
for(int j = 0; j<3; j++){
// you have to print out from m[][]
struct Matrix{
// you cannot initialize a variable ....
// ... (assign it values) inside the structure
int row1[3];
int row2[3];
int row3[3];
};
void printMatrixLine(int *row){
for(int i = 0;i<3;i++){
// Aaron Goldsmith
// Gate Structure
import UIKit
struct Gate{
private let logic: Logic // Holds the Logical Gate
@AaronGoldsmith
AaronGoldsmith / output.bash
Created February 25, 2017 03:28
bash output
Aarons-MacBook-Pro:lab6 Aaron$ /usr/bin/time python3 generate.py random 22 | python3 entropy.py
0.04 real 0.03 user 0.00 sys
23.465060517096568
Aarons-MacBook-Pro:lab6 Aaron$ time python3 generate.py perfect entropy.py
Within 0.17695470881825326 of target entropy
found at -->25
@AaronGoldsmith
AaronGoldsmith / count.py
Last active July 11, 2018 23:04
example
def count_words(text):
num = 0;
for ch in text:
if(ch == " " or ch=="\n"):
num+=1
return num
str1 = "this is some text "
str2 = "this is some more text "
@AaronGoldsmith
AaronGoldsmith / Limits_of_science.md
Last active September 7, 2022 22:28
My thought on the limits of science

Radiolab - Limits of Science

Limits of Science

The podcast begins with Dr. Steve Strogatz, a professor at Cornell University, getting asked if he believes there are limits to human knowledge. At first Dr. Strogatz suggests that our tools are not precise enough and always have areas to improve. His theory is that no amount of information will give us a true and accurate depiction of how and why the universe and nature exists . When people integrate technologically into their lives and utilize it in a meaningful way, they are able to have greater opportunities by connecting themselves to information, people, and services. The epistemology of a society refers to the source in which new information may be gained. Dr. Strogatz explains that finding the limiting factors within one's contemporary epistemology is much more justified than trying to make any type of conclusions about what might be beyond the uncertaintie

@AaronGoldsmith
AaronGoldsmith / index.html
Created December 11, 2018 06:57
React Dropdown
<div id="root"></div>
@AaronGoldsmith
AaronGoldsmith / helpers.py
Created December 21, 2018 23:43
Robot City Design created by AaronGoldsmith_ - https://repl.it/@AaronGoldsmith_/Robot-City-Design
# Using discrete math to solve turning
# 0 N
# 3 1 --> W E
# 2 S
def turn(LR,current_dir):
if(LR=="L"):
current_dir += 3;
else:
current_dir += 1;
return current_dir%4;
@AaronGoldsmith
AaronGoldsmith / helpers.py
Created December 21, 2018 23:43
Robot City Design created by AaronGoldsmith_ - https://repl.it/@AaronGoldsmith_/Robot-City-Design
# Using discrete math to solve turning
# 0 N
# 3 1 --> W E
# 2 S
def turn(LR,current_dir):
if(LR=="L"):
current_dir += 3;
else:
current_dir += 1;
return current_dir%4;
<div id="root"></div>