Skip to content

Instantly share code, notes, and snippets.

View bgoonz's full-sized avatar
🎯
learning

Bryan C Guner bgoonz

🎯
learning
View GitHub Profile
@alizeynalli
alizeynalli / WebScraping_Review_Lab.ipynb
Created April 17, 2021 11:08
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.

Exercise 1

  1. Extract the contents of the zip file into a new directory and open the folder in VSCode.
  2. Initialise a new Node app in the directory. The entry point should be the existing server.js.
  3. Install Express.
  4. Create an Express app in server.js that listens on port 3000.
  5. Create a new request in Postman to make sure that the server is working.

Exercise 2

from pdf2image import convert_from_path
title = input("Pdf files name: ")
def menu():
global quality
print("""
Image format:
1. Very High Resolution - 700 dpi
@Sasszem
Sasszem / switch.js
Created April 17, 2021 10:30
A simple experiment with JS switch-case statements
/*
Test on how are JS's switch-cases are working.
I was in an argument w/ someone saying they turn into jumptables,
so I coded this up quickly to check.
With a few calls (so JIT won't kick in) it is clear that this executes
every case every time we enter the switch, so it is clear that jump tables
are not used in general, but they still might be used as an optional optimization,
but only when possible.
*/
@Ambratolm
Ambratolm / money-raw-value.js
Last active February 23, 2022 19:09
Convert a formatted money string value (that may contain currencies, decimals, brackets ...etc) to a raw numeric value (to use it in calculations).
function moneyRawValue(value = 0, decimalSeparator = ",") {
if (typeof value === "number") return value;
const rawValue = parseFloat(
value
.replace(/\((?=\d+)(.*)\)/, "-$1")
.replace(new RegExp(`[^0-9-${decimalSeparator}]`, "g"), "")
.replace(decimalSeparator, ".")
);
return isNaN(rawValue) ? 0 : rawValue;
}
@KadirChav
KadirChav / PY0101EN-2-3-Dictionaries.ipynb
Created April 17, 2021 09:59
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.
@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'){
@jmmarco
jmmarco / App.js
Created February 19, 2020 13:02
Add React to a Website with ES6 Capabilities
import Header from "./Header"
const App = () => {
return (
<div>
<Header />
</div>
)
}