I hereby claim:
- I am shintakezou on github.
- I am shintakezou (https://keybase.io/shintakezou) on keybase.
- I have a public key whose fingerprint is 33C0 6022 DBE2 3B53 1815 AA92 A3D2 1F30 08B6 929F
To claim this, I am signing this object:
program generic_example | |
use my_sum_module | |
implicit none | |
print *, my_sum(1.0, 3.0) ! 1 + 1.5 | |
print *, my_sum(1, 5) ! 1 + 2 | |
print *, my_sum(2, 3.0) ! 2 + 1.5 | |
print *, my_sum(1.5, 7) ! 1.5 + 3.5 |
/* | |
this code solves one of the Dudeney's Canterbury Puzzles, | |
namely The Miller's Puzzle. | |
My input was an italian blog, i.e. | |
http://rudimatematici-lescienze.blogautore.espresso.repubblica.it/2015/06/07/lenigma-del-mugnaio/ | |
But you can find all the puzzles (thus even the miller's puzzle) | |
here: |
#! /usr/bin/python3 | |
# | |
# italian magazine "La Settimana Enigmistica", | |
# quiz "Quesito con la Susi" n. 927 | |
# | |
# R, B, S: prices of one bottle of red, white and sparkling wine | |
# a, b, c: number of sparkling (a), white (b) and red (c) wine in a | |
# box of seven bottles | |
# | |
# R = 3B |
#! /usr/bin/python | |
# | |
# see https://gist.github.com/shintakezou/666a96e63b0c01be2f78#file-susi927-py | |
# The problem is the same, but here we use logilab.constraint | |
# https://www.logilab.org/project/logilab-constraint | |
# and of course we take into account the fact that prices are integer | |
# positive numbers. | |
# | |
from logilab.constraint import * |
% | |
% Problem from the Italian weekly magazine "La Settimana Enigmistica" | |
% | |
% | |
% Three couples divided their earnings (1000euro) from their | |
% second-hand clothes shop. | |
% | |
% The sum of the shares of the wives is 396. | |
% | |
% Giovanna (g) had 10e more than Carla (c); |
/* | |
A quiz with Susi 934 (in the Italian magazine | |
La settimana enigmistica) | |
Alfio, Biagio, Carlo and Dino are four children, | |
one of them broke the window of a building while | |
all four were playing with slingshots. | |
Questioned to know who did it, |
-module(solve937). | |
-export([solve/0]). | |
% This solve the following problem: | |
% find that number X < 54, so X^2 = A + B, | |
% where A is the number made of the first | |
% 2 digits of X^2 and B is the number made | |
% of the last 2 digits of X^2. | |
check(X) -> |
"This solves an Italian magazine's quiz, n. 939; | |
you need an implementation for permutationsDo, | |
see miscellanea/gnusmalltalk/permutationsDo.st." | |
|p1 p2 p3 names perm0 bl1 bl2 bl3| | |
p1 := #(2 1 4 3 5). | |
p2 := #(3 4 5 1 2). | |
p3 := #(1 5 3 2 4). |
I hereby claim:
To claim this, I am signing this object:
#include <iostream> | |
#include <iomanip> | |
std::string gimme_a_str(const std::string& s) | |
{ | |
return "string(\"" + s + "\")"; | |
} | |
template<typename T> | |
void action_a(T& a) |