Skip to content

Instantly share code, notes, and snippets.

View HirotoShioi's full-sized avatar
🎯
Focusing

Hiroto Shioi HirotoShioi

🎯
Focusing
View GitHub Profile
description model tools
最高クラスのコーディングエージェント, GPT-4.1
GPT-4.1
changes
codebase
editFiles
fetch
findTestFiles
problems
runCommands
runTasks
runTests
search
searchResults
terminalLastCommand
terminalSelection
testFailure
usages

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
@HirotoShioi
HirotoShioi / butterfly.json
Created October 29, 2019 02:26
Butterfly
This file has been truncated, but you can view the full file.
[
{
"region": "旧北区",
"category": "タテハチョウ科",
"img_src": "pa-sp/nymph/ooitimoji.jpg",
"pdf_src": "butterfly_pdf/p_arc/p_arc-ny 4.pdf",
"img_path": "./assets/old_north/images/ooitimoji.jpg",
"pdf_path": "./assets/old_north/pdf/p_arc-ny%204.pdf",
"jp_name": "オオイチモンジ",
@HirotoShioi
HirotoShioi / cloud_vision.rs
Last active October 10, 2019 00:08
An example of using Google Cloud Vision API using serde_json and reqwest
extern crate hex; // 0.4.0
extern crate reqwest; // 0.9.20
extern crate serde_json; // 1.0
use reqwest::{StatusCode, Url};
use serde_json::{json, Value};
use std::fmt;
use std::fs;
fn main() {
@HirotoShioi
HirotoShioi / cloud_vision.rs
Created October 9, 2019 06:12
An example of using Google Cloud Vision API using serde_json and reqwest
extern crate hex; // 0.4.0
extern crate reqwest; // 0.9.20
extern crate serde_json; // 1.0
use reqwest::{StatusCode, Url};
use serde_json::{json, Value};
use std::fmt;
use std::fs;
pub fn get_dominant_colors(image_url: &Url) -> Result<Vec<Color>, Box<dyn std::error::Error>> {
@HirotoShioi
HirotoShioi / cloud_vision.rs
Created October 9, 2019 06:12
An example of using Google Cloud Vision API using serde_json and reqwest
extern crate hex; // 0.4.0
extern crate reqwest; // 0.9.20
extern crate serde_json; // 1.0
use reqwest::{StatusCode, Url};
use serde_json::{json, Value};
use std::fmt;
use std::fs;
pub fn get_dominant_colors(image_url: &Url) -> Result<Vec<Color>, Box<dyn std::error::Error>> {
import Data.List (nub, permutations)
let a = [ [a, b, c] | a <- [1..9], b <- [1..9], c <- [1..9], a <= b, b <= c, a + b + c == 21]
let comb = nub $ concatMap permutations a
forM_ comb (\[a,b,c] -> putStrLn $ "(" <> show a <> ", " <> show b <> " ," <> show c <> ")\\")
forM_ a (\[a,b,c] -> putStrLn $ "(" <> show a <> ", " <> show b <> " ," <> show c <> ")\\")
length comb
28
length a
7
@HirotoShioi
HirotoShioi / overview.md
Last active May 15, 2019 02:43
Overview

Quickcheckの極意

QuickCheckで可能となる様々なテスト手法

  • Model based test
  • Metamorphic test
  • Postconditions
  • Round-trip test

テストをデバッグしよう

  • 有効なテストがどの程度の頻度で行われているのか確認しよう。(例:リストに存在しない値に対するlookupがテストの大半を占めていないか)
{-# LANGUAGE OverloadedStrings #-}
module Lib where
import RIO hiding (lines)
import qualified RIO.Text as T
import Data.Aeson (FromJSON (..), ToJSON (..), object, withObject,
(.:), (.=))
import Data.Aeson.Encode.Pretty (encodePretty)