Skip to content

Instantly share code, notes, and snippets.

View thomasnield's full-sized avatar

Thomas Nield thomasnield

  • Frisco, Texas (United States)
View GitHub Profile
@thomasnield
thomasnield / sympy_summation.py
Created September 19, 2021 04:14
SymPy Summation
from sympy import *
# We are going sum these items
# by plugging into symbolic summation
items = [0, 5, 6, 2, 7]
# declare Sympy variables
i, n = symbols('i n')
x = symbols('x', cls=Function)
@thomasnield
thomasnield / onenote_python_POST.py
Created August 16, 2021 19:06
onenote_python_POST.py
import requests
# Get token here: https://developer.microsoft.com/en-us/graph/graph-explorer
token = '?'
headers={'Authorization': 'Bearer ' + token,'Content-Type': 'text/html' }
# Retrieve section ID's by running this request: https://graph.microsoft.com/v1.0/me/onenote/sections
content_end_point='https://graph.microsoft.com/v1.0/me/onenote/sections/{section-id}/pages'
body = """
@thomasnield
thomasnield / onenote_python_GET.py
Created August 16, 2021 18:33
onenote_python_GET.py
import requests
# Retrieve token from https://developer.microsoft.com/en-us/graph/graph-explorer
token = '?'
headers={'Authorization': 'Bearer ' + token,'Content-Type': 'application/json' }
content_end_point='https://graph.microsoft.com/v1.0/me/onenote/pages'
result=requests.get(content_end_point,headers=headers).json()
@thomasnield
thomasnield / arduino_micro_bom.md
Last active June 14, 2021 22:23
arduino_micro_bom.md

| Prefix | Arduino Prefix | Qty | Name | Arduino OEM Part Specified | Manufacturer | Manufacturer Part # | Footprint | Footprint Flexible? | Candidate for Removal? | Description | Developer Notes | DATASH

@thomasnield
thomasnield / exercise3.py
Created June 8, 2021 13:00
Exercise3.py
"""
The mean for a pug weight is 20 lbs.
The standard deviation is 1.2 lbs.
For a pug weighing 18.5 lbs, what is its weight in
terms of standard deviations (the Z-score)?
Complete the code below to calculate the answer.
Then execute the script by typing this command in the terminal:
#include <Joystick.h>
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_GAMEPAD,
0, 0, // Button Count, Hat Switch Count
true, true, true, // X, Y, Z Axis
true, true, true, // Rx, Ry, Rz
true, true, // rudder, throttle
true, true, true); // accelerator, brake, steering
void setup() {
@thomasnield
thomasnield / diabetes.csv
Created August 3, 2020 18:07
diabetes.csv
Pregnancies Glucose BloodPressure SkinThickness Insulin BMI DiabetesPedigreeFunction Age Outcome
6 148 72 35 0 33.6 0.627 50 1
1 85 66 29 0 26.6 0.351 31 0
8 183 64 0 0 23.3 0.672 32 1
1 89 66 23 94 28.1 0.167 21 0
0 137 40 35 168 43.1 2.288 33 1
5 116 74 0 0 25.6 0.201 30 0
3 78 50 32 88 31 0.248 26 1
10 115 0 0 0 35.3 0.134 29 0
2 197 70 45 543 30.5 0.158 53 1
@thomasnield
thomasnield / iris.csv
Created August 3, 2020 17:59
iris.csv
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@thomasnield
thomasnield / flights_broken.txt
Last active April 20, 2020 15:14
flights_broken.txt
AS ABQ DAL 12:35 13:45 180
AS BOS BOS 12:35 13:45 180
NK PHX HOU 14:15 16:45 190
AA MDW JFK 12:45 14:35 180
DL ATL ATL 06:05 12:05 190
@thomasnield
thomasnield / flights.txt
Created April 19, 2020 02:50
flights.txt
AS ABQ DAL 12:35 13:45 180
NK PHX HOU 14:15 16:45 190
AA MDW JFK 12:45 14:35 180