Skip to content

Instantly share code, notes, and snippets.

View roza's full-sized avatar

Gérard Rozsavolgyi roza

  • Nice, France
View GitHub Profile
@roza
roza / godel14.md
Created March 5, 2022 13:18 — forked from non/godel14.md
Gödel's fourteen point outline of his philosophical views.

Gödel left in his papers a fourteen-point outline of his philosophical beliefs, that are dated around 1960. They show his deep belief in the rational structure of the world. Here are his 14 points:

  1. The world is rational.
  2. Human reason can, in principle, be developed more highly (through certain techniques).
  3. There are systematic methods for the solution of all problems (also art, etc.).
  4. There are other worlds and rational beings of a different and higher kind.
  5. The world in which we live is not the only one in which we shall live or have lived.
  6. There is incomparably more knowable a priori than is currently known.
  7. The development of human thought since the Renaissance is thoroughly intelligible (durchaus einsichtige).
  8. Reason in mankind will be developed in every direction.
@roza
roza / Flask-SqlAlchemy-Many-to-Many.py
Created December 9, 2019 09:30 — forked from kphretiq/Flask-SqlAlchemy-Many-to-Many.py
A (hopefully) simple demo of how to do many-to-many relationships using Flask-SQLAlchemy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from flask import Flask, url_for
from flask_sqlalchemy import SQLAlchemy
"""
Flask-SQLAlchemy many-to-many relationship using helper table
http://flask-sqlalchemy.pocoo.org/2.1/models/
Hippies love their dogs.
@roza
roza / fft.c
Created October 28, 2019 09:08 — forked from Determinant/fft.c
Direct DFT and Cooley–Tukey FFT Algorithm C Implementation
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct Comp {
/* comp of the form: a + bi */
double a, b;
} Comp;
#include <cstdio>
#include <thread>
#include <vector>
#include <mutex>
#include <atomic>
#include <condition_variable>
#include <unistd.h>
std::atomic<bool> processing;
@roza
roza / simple_spec.c
Created October 28, 2019 09:07 — forked from Determinant/simple_spec.c
Simple Spec -- A Simple Discrete-time STFT Program.
#include <math.h>
#include <sndfile.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#define PI 3.141592653589793
#define EPS 1e-8
#define MAX_BIN_NUM 65536
/* SHIFT_NUM should be less than or equal to BIN_NUM */
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
@roza
roza / quicksort.hs
Created December 5, 2016 19:53 — forked from kangax/quicksort.hs
Haskell-inspired quick sort in ES6
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort (filter (<=x) xs)
biggerSorted = quicksort (filter (>x) xs)
in smallerSorted ++ [x] ++ biggerSorted
@roza
roza / DOM.md
Created January 21, 2016 07:28 — forked from rccc/DOM.md

Qu'est-ce que le DOM ( Document Object Model )

Le DOM est une API définie par le W3C. On utilise l'implémention de l'API DOM de javascript pour manipuler le DOM. C'est donc à travers le DOM que l'on agit sur une page web.

Le DOM ce n'est pas le HTML que l'on écrit, ce n'est pas non plus le code source d'une page web, mais vous pouvez avoir une représentation du DOM dans le panneau "Éléments" de la console de développement intégré à votre navigateur.

Le DOM est une norme éditée par le consortium W3C, Une traduction en français des différents parties de la spécificaiton est disponible ici.

La spécification du DOM définit donc principalement des types de noeuds organisés sous la forme d'une arborescence et susceptibles d'être manipulés, elle définit des méthodes pour parcourir cette arboresence, pour sélectionner des éléments et ajouter des évenements sur ces élements.

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})

index.html

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.5.7/css/bootstrap-material-design.min.css">
	<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.5.7/css/ripples.min.css">