Skip to content

Instantly share code, notes, and snippets.

View Kuniwak's full-sized avatar
💭
I may be slow to respond.

Kuniwak Kuniwak

💭
I may be slow to respond.
View GitHub Profile
@Kuniwak
Kuniwak / NumberGenerator1.FromGitHubCopilot.cs
Last active February 12, 2024 09:23
GitHub Copilot に [0-100) の区間でその分布が正規分布に従う関数を実装させてみた実験例
View NumberGenerator1.FromGitHubCopilot.cs
namespace Playground.CopilotTDD;
public static class NumberGenerator
{
public static int GetBetween0To100BySeed(int seed)
{
return new Random(seed).Next(0, 100);
}
}
View NumberGenerator3.FromGPT4.cs
// https://chat.openai.com/share/a75ee402-3131-4ee8-9a9d-54bf1b81071c
using System;
namespace Playground.CopilotTDD.Tests
{
public static class NumberGenerator
{
public static int GetBetween0To100BySeed(int seed)
{
// 線形合同法のパラメータ
View Sceratch.thy
theory Scratch
imports Main
begin
no_notation relcomp (infixr "O" 75)
(* oreo 型の内部表現 *)
datatype oreo0 = O0 | Ore0 oreo0 | Reo0 oreo0
View Well_Not_Dense_Order.thy
theory "Well_Not_Dense_Order" imports Main begin
context wellorder
begin
definition bot :: 'a
where "bot ≡ LEAST x. True"
sublocale order_bot bot less_eq less
proof standard
fix a
@Kuniwak
Kuniwak / Well_Dense_Order.thy
Created July 15, 2022 00:39
整列順序で稠密順序な例。
View Well_Dense_Order.thy
theory "Well_Dense_Order" imports Main begin
datatype a = A
text "a は整列順序である。"
instantiation a :: wellorder
begin
definition less_eq_a :: "a ⇒ a ⇒ bool"
where "less_eq_a a b ≡ True"
@Kuniwak
Kuniwak / vim_intro.txt
Last active June 2, 2022 03:48
Vimの起動時に表示されるAA。vim-splashを入れて g:splash#path にこのファイルを指定するとhappy。 ライセンスはパブリックドメインです。ご自由にお使いください。【推奨環境】background=dark guifont=SourceCodePro-Regular
View vim_intro.txt
..
.::::.
___________ :;;;;:`____________
\_________/ ?????L \__________/
|.....| ????????> :.......'
|:::::| $$$$$$"`.:::::::' ,
,|:::::| $$$$"`.:::::::' .OOS.
,7D|;;;;;| $$"`.;;;;;;;' .OOO888S.
.GDDD|;;;;;| ?`.;;;;;;;' .OO8DDDDDNNS.
'DDO|IIIII| .7IIIII7' .DDDDDDDDNNNF`
View FiniteSet_fold.thy
theorem
fixes f :: "'x ⇒ 'y ⇒ 'y"
assumes finite: "finite X"
and eq: "⋀x. x ∈ X ⟹ f x = g x"
shows "Finite_Set.fold f z X = Finite_Set.fold g z X"
using finite using eq by (rule_tac fold_closed_eq[where ?B=UNIV]; simp)
View build-logs.md

Before

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.5
BuildVersion:	18F132

$ xcodebuild -version
Xcode 10.2.1
View longer-timeout.patch
--- appium-base-driver/lib/express/server.js 2019-07-17 12:37:19.000000000 +0900
+++ appium-base-driver/lib/express/server.js 2019-07-17 12:37:49.000000000 +0900
@@ -49,7 +49,7 @@ async function server (configureRoutes,
reject(err);
});
httpServer.on('connection', (socket) => {
- socket.setTimeout(600 * 1000); // 10 minute timeout
+ socket.setTimeout(600 * 10000); // 10 minute timeout
socket.on('error', reject);
});
@Kuniwak
Kuniwak / 1-playground.tla
Last active May 27, 2019 08:46
解決しました(コメント参照) ~~なぜ、Temporal properties were violated になるのかわかりません。。。~~
View 1-playground.tla
----------------------------- MODULE playground -----------------------------
VARIABLES varTable
\* Initial Predicate:
Init == varTable = { <<0, "a">>, <<1, "b">> }
\* Next-state relation:
Next == varTable' = { <<2, "c">> }