Skip to content

Instantly share code, notes, and snippets.

View johnathaningle's full-sized avatar
🎯
Focusing

Johnathan Ingle johnathaningle

🎯
Focusing
View GitHub Profile
@johnathaningle
johnathaningle / tangentlines.ipynb
Last active June 28, 2019 20:02
Simple example of using the definition of a derivative to calculate a tangent line to a point.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnathaningle
johnathaningle / Program.cs
Created September 13, 2019 13:42
Get the pixels from a jpeg with ImageSharp
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using System;
using System.IO;
namespace ImageSharpConsole
{
class Program
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import plotly.graph_objs as go
import pandas as pd
import numpy as np
df = pd.read_csv("Real Estate Data YOY .csv")
print(df.head())
i = 0
cols = [col for col in df.columns]
cols = cols[1:]
@johnathaningle
johnathaningle / environment-gpu.yml
Last active March 27, 2020 23:28
A conda environment for getting started with this repository: https://github.com/MortenHannemose/pytorch-vfi-cft
name: torch
channels:
- pytorch
- defaults
dependencies:
- _pytorch_select=1.1.0=cpu
- blas=1.0=mkl
- ca-certificates=2020.1.1=0
- certifi=2019.11.28=py36_1
- cffi=1.14.0=py36h7a1dbc1_0
@johnathaningle
johnathaningle / dynamic_parent.py
Created April 19, 2020 13:11
Dynamic Parent Plugin for Blender 2.8x
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@johnathaningle
johnathaningle / app.py
Created May 20, 2021 21:23
SDEV400 Homework 1
from enum import Enum
from typing import Any, List, Optional
import boto3
from datetime import datetime
import random
from botocore.exceptions import ClientError
import logging
import botocore
from uuid import uuid4
@johnathaningle
johnathaningle / lambda_function.py
Created June 5, 2021 18:03
Week 5 Lambda Code
import json
from typing import List, Optional, Tuple
def lambda_handler(event, context):
message = "Unable to calculate the cube root"
result = get_cuberoots(event)
if result is not None:
message = str(result)
debug_log(context)
return {
@johnathaningle
johnathaningle / lambda_function.py
Created June 10, 2021 20:44
SDEV 400 Week 6 Project Code
import json
#sources:
#https://www.fiaformulae.com/en/results/race-results/?championship=2022019&race=20190208
#https://www.motogp.com/en/Results+Statistics
#https://www.formula1.com/en/results.html/2020/races.html
motorsport_data = {
"f1": {
"mercedes": {
"valtteri bottas": [
@johnathaningle
johnathaningle / create_sample.py
Last active June 19, 2021 18:07
Create Sample JSON data for SDEV400's Homework 4 Assignment
import json
from datetime import datetime
from random import randint
if __name__ == "__main__":
item = {
"Name": f"Trip: {datetime.now()}",
"Distance": randint(1, 100),
"Time": str(datetime.now()),
"Speed": randint(11, 19)