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
% Bibliography on the Secretary Problem and Related Games (Dynkin's game, Poisson search games, etc.) | |
@Article{Abdelaziz:Krichen:2005, | |
author = {Ben Abdelaziz, F. and Krichen, S.}, | |
title = {An Interactive Method for the Optimal Selection Problem with Two Decision Makers}, | |
journal = {European Journal of Operational Research}, | |
volume = {162}, | |
number = {3}, | |
year = {2005}, |
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
// | |
// FlycutOperator.m | |
// Flycut | |
// | |
// Flycut by Gennadiy Potapov and contributors. Based on Jumpcut by Steve Cook. | |
// Copyright 2011 General Arcade. All rights reserved. | |
// | |
// This code is open-source software subject to the MIT License; see the homepage | |
// at <https://github.com/TermiT/Flycut> for details. | |
// |
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
""" | |
Spyder hacks: backup and edit config files for each environment. | |
Upcoming release Spyder 5 will hopefully offer something better than this soon. | |
Created 28 May 2020 | |
@author: Patrick Toche | |
""" | |
# import common packages here, otherwise import inside each function (helps me understand which packages are needed where and how much they are needed) | |
import os |
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
# benchmark computing time differences | |
n = 1e6 | |
set.seed(1) | |
Date = sort(replicate(n, paste0(Sys.Date(), " ", | |
sample(0:23, 1), ":", sample(0:59, 1), ":", sample(0:59, 1)))) | |
Date <- as.POSIXct(Date, format="%Y-%m-%d %H:%M:%S", tz = "Europe/Paris") | |
diff_seq_along <- function(x) { | |
x[seq_along(x)+1]-x[seq_along(x)] |
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
# server.R | |
shinyServer( | |
function(input, output, session){ | |
# This approach triggers a delay when the box is filled before the actionButton is actioned | |
# busyReactive <- reactive({ | |
# delay <- as.integer(input$delay) | |
# if(input$trigger > 0) {Sys.sleep(delay)} | |
# return(input$trigger) |
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
%\documentclass[border=12pt]{standalone} | |
\documentclass{article} | |
\usepackage[active,tightpage]{preview} | |
\usepackage{tikz} | |
\usetikzlibrary{calc} | |
\PreviewEnvironment{tikzpicture} | |
\usepackage{pgfplots} | |
\usepackage{fourier} |
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
#!/usr/bin/env ruby | |
require "csv" | |
File.open("contacts.adr", "r") do |f| | |
contacts = [] | |
f.read.split("#CONTACT").each do |entry| | |
unless entry.empty? | |
contact = {} | |
entry.each_line do |line| |
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
# server.R | |
library("shiny") | |
shinyServer( | |
function(input, output, session) { | |
# Debug Area | |
output$Console <- renderUI({ |
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
# server.R | |
library("shiny") | |
shinyServer( | |
function(input, output, session) { | |
# Reactive slider | |
v <- reactiveValues(min = -5, max = +5, status = 0) |
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
# server.R | |
shinyServer(function(input, output, session) { | |
output$sliders <- renderUI({ | |
if (is.null(input$n) || is.na(input$n)) { | |
n <- 1 | |
} else { | |
n <- round(input$n,0) | |
} | |
lapply(1:n, function(i) { |
NewerOlder