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 / keypress.js
Created February 21, 2021 01:20 — forked from andrew/keypress.js
var keypress = require('keypress');
// make `process.stdin` begin emitting "keypress" events
keypress(process.stdin);
// listen for the "keypress" event
process.stdin.on('keypress', function (ch, key) {
// console.log('got "keypress"', key);
if(key && key.name == 'right'){
var Arch; if (!Arch) Arch = {}; // set up custom namespace 'Arch'
Arch.AjaxPagination = function(paginationContainer, storiesContainer, filtersContainer) {
// Only html5 browsers can use ajax pagination. We don't want no stinkin' hashbang URLs.
if (!history.pushState) {
return;
}
this.$paginationContainer = $(paginationContainer);
@intisarkhalil
intisarkhalil / Final_Assignment_Library.ipynb
Created April 17, 2021 13:09
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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);
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:
@bharathmuddada
bharathmuddada / CountofDigits.py
Created April 17, 2021 12:42
Count of Digits in Python
number = int(input())
counter =0
while number > 0:
number = number//10
print(number)
counter +=1
print("number of digits :",counter)
@Assistance4u
Assistance4u / PY0101EN-2-3-Dictionaries.ipynb
Created April 17, 2021 12:07
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function exponentialBackoff(i, dt) {
const f = j => j >= 0 ? Math.exp(j/3)*dt : 0
const ret = f(i)-f(i-1)
if(ret < dt) {
return dt
} else {
return ret
}
}