This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import torch | |
| """ | |
| Complete the code below to perform stochastic gradient descent | |
| on a linear regression. | |
| Try to find a sufficient learning rate and number of iterations. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import torch | |
| """ | |
| COMPLETE THE CODE BELOW BY REPLACING THE QUESTION MARKS ?'s | |
| SO FORWARD PROPAGATION IS COMPLETE | |
| """ | |
| url = "https://raw.githubusercontent.com/thomasnield/machine-learning-demo-data/master/classification/maintenance_predict.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Neural network prediction on a maintenance dataset using PyTorch. | |
| Predicts whether a part needs replacement (1) or not (0). | |
| Uses 3 nodes in the hidden layer and ReLU as the activation function. | |
| """ | |
| import pandas as pd | |
| import torch | |
| import torch.nn as nn | |
| from torch.utils.data import DataLoader, TensorDataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import randint, choice | |
| def random_door(): | |
| return randint(1, 3) | |
| trial_count = 10_000 | |
| stay_wins = 0 | |
| switch_wins = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::process::Command; | |
| use walkdir::WalkDir; | |
| use regex::Regex; | |
| /* | |
| [package] | |
| name = "rust_playground" | |
| version = "0.1.0" | |
| edition = "2021" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~/git/my_project_with_large_files | |
| git lfs install | |
| git lfs migrate import --include="*.pptx, *.pdf" --everything | |
| git lfs ls-files | |
| git push --all --force | |
| # https://josh-ops.com/posts/migrate-to-git-lfs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from manim import * | |
| import os | |
| class CircleTraceTest(Scene): | |
| def construct(self): | |
| circle = Circle(radius=2) | |
| self.add(circle) | |
| vt = ValueTracker(0.0) | |
| point: Dot = always_redraw(lambda: Dot(point=circle.point_from_proportion(vt.get_value()))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import required module | |
| import os | |
| from pathlib import Path | |
| import re | |
| # assign directory | |
| directory = Path('/Users') / 'thomasnield' / 'git' / 'oreilly_essential_math_for_data_science_book' | |
| def two_digit_correct(filename: str): | |
| return re.sub(r"(?<=[0-9])_(?=[0-9][A-z])", "_0", filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%manim -qk Histogram | |
| """ | |
| PROMPT: Create sample Python code using manim to plot data into a histogram. Use that same data to create a numberline with points beneath it. Then draw a distribution function over the histogram. | |
| """ | |
| from manim import * | |
| import numpy as np | |
| class Histogram(Scene): | |
| def construct(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "ID" : 1, | |
| "NAME": "Alpha Medical", | |
| "ADDRESS" : "18745 Train Dr", | |
| "CITY" : "Dallas", | |
| "STATE": "TX", | |
| "ZIP" : 75021, | |
| "CATEGORY" : "INDUSTRIAL" | |
| }, |
NewerOlder