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
import json | |
import os | |
from getpass import getpass | |
from pathlib import Path | |
from typing import Dict, List, Optional, Union | |
def load_secrets(secrets: Optional[Union[str, Dict[str, str]]] = None, overwrite=False) -> None: | |
""" | |
Loads secrets and sets up some env vars and credential files. |
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
module Mdar.Addresses | |
open Fable.Core.JsInterop | |
open Fable.Import | |
open Fable.Import.Fuse | |
open Node.Exports | |
open Node.Globals | |
open Thoth.Json | |
open Fable.Core |
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 path = require('path') | |
const { featureCollection } = require('@turf/helpers') | |
const Fuse = require('fuse.js') | |
const streetAddressesGeoJSON = featureCollection(JSON.parse(fs.readFileSync(path.join(__dirname, 'adresses.json')))) | |
const streetAddressesFuse = new Fuse(streetAddressesGeoJSON.features.features, { | |
shouldSort: true, | |
keys: [ | |
"properties.adresse" |
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
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var CSSTransitionGroup = require('react-addons-css-transition-group'); | |
var ReactRouter = require('react-router'); | |
var Router = ReactRouter.Router; | |
var Route = ReactRouter.Route; | |
var Navigation = ReactRouter.Navigation; | |
var History = ReactRouter.History; | |
var createBrowserHistory = require('history/lib/createBrowserHistory'); |
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
The meetup will begin at 18:30 the early presentations at 19:00. The preliminary program is as follows: | |
6:30 p.m. Doors. Pizza, Champagne .... | |
7:00 p.m. Intro: Franck Bardol Igor Carron | |
7:05 p.m. Bastien Legras, Francois Sterin | |
7:30 p.m. Andrew Ng (remote from SF) |
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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 10; |
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
/** | |
* Base64-encodes the specified serialized byte array and sets that base64-encoded String as the cookie value. | |
* <p/> | |
* The {@code subject} instance is expected to be a {@link WebSubject} instance with an HTTP Request/Response pair | |
* so an HTTP cookie can be set on the outgoing response. If it is not a {@code WebSubject} or that | |
* {@code WebSubject} does not have an HTTP Request/Response pair, this implementation does nothing. | |
* | |
* @param subject the Subject for which the identity is being serialized. | |
* @param serialized the serialized bytes to be persisted. | |
*/ |
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
var Zero = { | |
isZero: function() { | |
return true; | |
}, | |
predecessor: function() { | |
throw "No such element"; | |
}, | |
successor: function() { |
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
abstract class Nat { | |
def isZero: Boolean | |
def predecessor: Nat | |
def successor: Nat = new Succ(this) | |
def +(that: Nat): Nat | |
def -(that: Nat): Nat = | |
if (that.isZero) | |
this | |
else | |
predecessor - that.predecessor |