Skip to content

Instantly share code, notes, and snippets.

Avatar

Sofya Tuymedova stuymedova

View GitHub Profile
View express-middleware.js
// source: https://expressjs.com/en/guide/writing-middleware.html
var express = require('express')
var app = express()
var myLogger = function (req, res, next) {
console.log('LOGGED')
next()
}
View bellman_ford.py
# Old code initially implemented as part of a proof of concept example
# from "Algorithms Unlocked" by Thomas H. Cormen (see "arbitrage opportunity" p.105)
def bellman_ford(graph, source):
dist = {} # distance
pred = {} # predecessor
# Step 1: initialize the graph
for v in graph:
dist[v] = float('Inf')
@stuymedova
stuymedova / README.md
Created Jul 2, 2021
Commands to import/export CSV files to/from a MySQL database
View README.md

CSV to MySQL (and vice versa)

Commands to import/export CSV files to/from a MySQL database

Import

Example:

LOAD DATA INFILE 'data.csv' INTO TABLE tbl_name
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'