Skip to content

Instantly share code, notes, and snippets.

View bgoonz's full-sized avatar
🎯
learning

Bryan C Guner bgoonz

🎯
learning
View GitHub Profile
@bgoonz
bgoonz / vscode-settings-June2023.jsonc
Created June 27, 2023 21:51
vscode-settings-June2023.jsonc
{
//----------------beginning of editor settings--------------------\\
"editor.comments.ignoreEmptyLines": false,
"editor.trimAutoWhitespace": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.definitionLinkOpensInPeek": true,
"editor.fastScrollSensitivity": 9,
"editor.suggest.shareSuggestSelections": true,
"editor.fontSize": 12,
"editor.fontFamily": "Consolas, 'Courier New', monospace",
@bgoonz
bgoonz / website.css
Created September 30, 2021 03:41 — forked from practicalli-johnny/website.css
Example `styles/website.css` styles that over-ride Gitbook's own styles, specifically for code blocks and image alingment (centred).
/* @import url(https://fonts.googleapis.com/css?family=Raleway); */
@import url(https://fonts.googleapis.com/css?family=Ubuntu);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono);
/* Use Ubuntu font instead of the default Railway font */
body {
font-family: Ubuntu;
margin: 2rem;
font-size: 2rem;
}
@bgoonz
bgoonz / gendirhtml.py
Created July 29, 2021 12:29
create html sitemap navigation
#!/usr/bin/env python3
# ---
# -handle symlinked files and folders: displayed with custom icons
# By default only the current folder is processed.
# Use -r or --recursive to process nested folders.
import argparse
@Amaka202
Amaka202 / algoFridaysWeek2.js
Last active June 26, 2024 11:17
Algorithms Friday Week 2 Solution
// Given an array nums, and a value val, write a function to remove
// all instances of val from the array and return the new length
const removeValInstances = (arr, val) => {
if(!arr) return 0;
if(!Array.isArray(arr)) return 0;
if(!val) return arr.length;
let newArrLength = 0;
@tetrashine
tetrashine / findLargestRectangle.js
Last active April 17, 2021 13:40
Find largest rectangle in a GIS polygon using TurfJS
runByFeatures(features) {
if (features.type !== "Feature") return undefined;
let polygon = turf.polygon(features.geometry.coordinates);
const unitsOption = {units: 'kilometers'};
let polyline, length, bbox, percentage1, percentage2, fraction, point1, point2, bearing;
let point1a, point1b, point2a, point2b, line1, line2;
let largest, diagonalLength;
polyline = turf.polygonToLineString(polygon);
@intisarkhalil
intisarkhalil / Final_Assignment_Library.ipynb
Created April 17, 2021 13:09
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import re
def get_file_content(include_tag):
file_name = include_tag.split(" ")[1].split("=")[1].replace('"', "")
return open(file_name).read()
def main():
"""
import { Component } from "react"
import './Table.css';
class TableComponent extends Component{
render(){
return(
<div>
<table>
<tr>
<th>Company</th>
@kirstydeewhite
kirstydeewhite / PY0101EN-1-2-Strings.ipynb
Created April 17, 2021 12:45
Created on Skills Network Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
with open("model_dictionary.json",'w') as f:
json.dump(model_dict,f)
f.close()
with open("company_dictionary.json",'w')as f:
json.dump(company_dict,f)
f.close()
with open("fuelType_dictionary.json",'w') as f:
json.dump(fueltype_dict,f)
f.close()
with open("transmission_dictionary.json",'w')as f: