This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't worry about what anybody else is going to do. The best way to | |
predict the future is to invent it. | |
-- Alan Kay | |
Premature optimization is the root of all evil (or at least most of it) | |
in programming. | |
-- Donald Knuth | |
Lisp has jokingly been called "the most intelligent way to misuse a | |
computer". I think that description is a great compliment because it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/apache/spark/blob/0494dc90af48ce7da0625485a4dc6917a244d580/sql/catalyst/src/main/scala/org/apache/spark/sql/types/DataType.scala#L200 | |
function sparkJsonSchemaToStructTypeSource(json) { | |
const types = ["string", "long", "double", "float", "boolean"]; | |
if (typeof json === "string") | |
return `${json[0].toUpperCase()}${json.slice(1)}Type`; | |
switch (json.type) { | |
case "array": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Quatre-vingts-dix-neuf problèmes en LISP ; | |
; KEDJI Komlan Akpédjé <eric_kedji@yahoo.fr> ; | |
; Inspiré de 'Ninety-nine Lisp Problems', ; | |
; lui-même inspiré d'une liste de problèmes ; | |
; en Prolog par werner.hett@hti.bfh.ch ; | |
; Les étoiles après les numéros de problèmes ; | |
; indiquent le niveau de difficulté. ; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Quatre-vingts-dix-neuf problèmes en Scheme ; | |
; KEDJI Komlan Akpédjé <eric.kedji@gmail.com> ; | |
; http://erickedji.wordpress.com/ ; | |
; Elève ingénieur à l'ENSIAS ; | |
; ; | |
; Inspiré de 'Ninety-nine Lisp Problems' ; | |
; (www.ic.unicamp.br/~meidanis/courses/ ; | |
; mc336/2006s2/funcional/ ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*O/*_/ | |
Cu #%* )pop mark/CuG 4 def/# 2 def%%%%@@P[TX---P\P_SXPY!Ex(mx2ex("SX!Ex4P)Ex= | |
CuG #%* *+Ex= | |
CuG #%*------------------------------------------------------------------*+Ex= | |
CuG #%* POLYGLOT - a program in eight languages 15 February 1991 *+Ex= | |
CuG #%* 10th Anniversary Edition 1 December 2001 *+Ex= | |
CuG #%* *+Ex= | |
CuG #%* Written by Kevin Bungard, Peter Lisle, and Chris Tham *+Ex= | |
CuG #%* *+Ex= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs") | |
const parse = require("csv-parse") | |
const fileName = "gsmarena-phone-dataset.csv" | |
const fileContent = fs.readFileSync(fileName).toString() | |
parse(fileContent, { | |
columns: true, | |
skip_lines_with_error: true, | |
skip_empty_lines: true | |
}, function (err, records) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { loadOrTrain } = require("./utils") | |
const brain = require("brain.js") | |
const trainingData = require("./selectra-phone-dataset-numbers-only-normalized.json"); | |
const net = new brain.NeuralNetwork({ hiddenLayers: [3] }); | |
const stats = net.train(trainingData); | |
// const stats = loadOrTrain(net, trainingData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"input": { | |
"Processeur": 1, | |
"Mémoire vive (RAM)": 0.3333333333333333, | |
"Mémoire interne": 1, | |
"Poids": 0.7326732673267327, | |
"Appareil photo frontal": 0.4375, | |
"Autonomie": 0.5058333333333334, | |
"Écran": 0.4506756756756757 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://selectra.info/telecom/guides/comparatifs/telephones-mobiles | |
function getPhoneData(tableDivEl) { | |
try { | |
let rawData = Array.from(tableDivEl.querySelectorAll("tr")) | |
.map(tr => ({ | |
key: tr.querySelector("th").textContent, | |
value: parseInt(tr | |
.querySelector("td") | |
.textContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to upgrade your users passwords in the DB without their intervention | |
// | |
// SHA-1 isn't strong enough to hash passwords with, but lots of people have a | |
// whole bunch of SHA-1'd passwords because they thought it was. You could use | |
// bcrypt or scrypt, but maybe in two years' time someone will tell you that's | |
// also not strong enough, and you'll want to upgrade. | |
// | |
// This sample demonstrates how you can remove weak password hashes from your | |
// user database, without needing the user to enter their password. |
NewerOlder