Skip to content

Instantly share code, notes, and snippets.

View burkeholland's full-sized avatar

Burke Holland burkeholland

  • Microsoft
  • Franklin, TN
View GitHub Profile
@burkeholland
burkeholland / notebooks-content-schedule.md
Created October 20, 2021 23:40
Proposed changes to for Notebooks November

Instead of focusing on the basics, lets focus on what VS Code can do that others cannot. That is primarily going to revolve around extensions.

  • [] File - New Notebook
  • [] Skin your notebooks (4 images w/themes)
  • [] Debug your Notebook
  • [] Diff your Notebook
  • [] Pyodid - Run your Notebook in the browser (github.dev / vscode.dev)
  • [] Open your Notebook on github.com with github.dev
  • [] Give people a tour of your Notebook (Codetour)
  • [] Use Remote-Containers for instant data science env (ZERO SETUP)
#Imports
import pandas as pd
import numpy as np
import pandas_profiling
from sklearn.model_selection import train_test_split
from sklearn import preprocessing
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import accuracy_score
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score
@burkeholland
burkeholland / router-example.js
Created September 28, 2021 16:26
Router Example
<Router>
<div className="main">
<Nav user={user} />
<div className="container">
<Switch>
<Route path="/" exact>
<Home />
</Route>
<Route path="/edit/:id?">
<Edit />
@burkeholland
burkeholland / sample-code.js
Created July 22, 2021 15:44
Sample Code For Hasan
router.post('/pug/found', function(req, res, next){
if(!req.body.user.email){
return res.status(422).json({errors: {email: "can't be blank"}});
}
const pug = new LostPug(req.body.pug);
return pug.save().then(function(){
console.log(lostPug);
return res.json({pug: JSON.stingify(pug)}); // in the video, change the "stingify" to "stringify"
// This is a test malicious script
// It does not actually do anything malicious
const fs = require("fs").promises;
async function main() {
const dirs = await fs.readdir("/");
dirs.forEach((dir) => {
console.log(dir);
});
#!/usr/bin/env bash
nvm_install_script=https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh
NVM_DIR="$HOME/.nvm"
NVM_NODE_VERSION=14
if [ ! -d "$HOME/.nvm" ]; then
echo "> Downloading NVM..."
curl -s -o- $nvm_install_script | bash >/dev/null 2>&1
[
{
"id": "79ef3e4b-b161-483f-a66f-d623adf3e6d7",
"meta-version": "1.0",
"userId": "burkeholland",
"vanityUrl": "build2019",
"description": "All the resources from Burke and Cecil's Build 2019 talk, \"The good, the bad and the ugly of Serverless\".",
"links": [
{
"id": "https://github.com/the-urlist",
[
{
"name": "Single red garden gnome",
"price": 56,
"brand": {
"name": "Home & Pro tools"
},
"stockUnits": 98
},
{
[
{
"name": "Single red garden gnome",
"price": 56,
"imageUrl": "https://ttstorageucrqili3hgqvk.blob.core.windows.net/product-list/6112251.jpg",
"brand": {
"name": "Home & Pro tools"
},
"type": {
"code": "gardening",
@import url("https://use.fontawesome.com/releases/v5.6.3/css/all.css");
/* UTILTIES */
@keyframes spinAround {
from {
transform: rotate(0deg); }
to {
transform: rotate(359deg); } }
.input, .textarea, .button {
-moz-appearance: none;