Skip to content

Instantly share code, notes, and snippets.

View p1scescom's full-sized avatar

uoza p1scescom

  • Japan
View GitHub Profile
@p1scescom
p1scescom / CUDv4.sty
Last active June 22, 2022 06:12
CUD(Color Universal Design) ver.4 Palette for LaTeX (xcolor)
% CUD ver.4 color set
% MIT LICENSE
% Reference of Color Universal Design <http://www2.cudo.jp/wp/wp-content/uploads/2018/10/cud_guidebook.pdf>
\definecolor{Red}{RGB}{255,75,0} % #ff4b00, Accent Color, 赤
\definecolor{Yellow}{RGB}{255,241,0} % #fff100, Accent Color, 黄色
\definecolor{Green}{RGB}{3,175,122} % #03af7a, Accent Color, 緑
\definecolor{Blue}{RGB}{0,90,255} % #005aff, Accent Color, 青
\definecolor{SkyBlue}{RGB}{77,196,255} % #4dc4ff, Accent Color, 空色
\definecolor{Pink}{RGB}{255,128,130} % #ff8082, Accent Color, ピンク
\definecolor{Orange}{RGB}{246,170,0} % #f6aa00, Accent Color, オレンジ
@p1scescom
p1scescom / CUDv4.gpl
Last active October 3, 2023 07:19
CUD(Color Universal Design) ver.4 Palette for GIMP (Inkscape)
GIMP Palette
Name: CUD ver.4 palette
# MIT LICENSE
# Reference of Color Universal Design <http://www2.cudo.jp/wp/wp-content/uploads/2018/10/cud_guidebook.pdf>
255 75 0 Red #ff4b00, Accent Color, 赤
255 241 0 Yellow #fff100, Accent Color, 黄色
3 175 122 Green #03af7a, Accent Color, 緑
0 90 255 Blue #005aff, Accent Color, 青
77 196 255 SkyBlue #4dc4ff, Accent Color, 空色
255 128 130 Pink #ff8082, Accent Color, ピンク
@p1scescom
p1scescom / competiveprogrammingcode.jl
Created November 24, 2020 08:12
This code on MIT License.
function main()
{{_cursor_}}
end
import Base.StringVector
myparse(::Type{String}, str::AbstractString) = str
myparse(T, str::AbstractString) = parse(T, str)
isdelim(x::UInt8, xs::Set{UInt8}) = x in xs
const delimset = Set([0x0a, 0x20])
function myreaduntil(s::IO, delims::Set{UInt8})::Vector{UInt8}
@p1scescom
p1scescom / LICENSE
Last active June 2, 2020 10:03
Competitive programming template for julia
Copyright 2020 p1scescom
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER D
@p1scescom
p1scescom / entropy.jl
Created January 25, 2020 07:27
entropy
function _entropy(coef)
bs = size(coef)
d = Dict{Int,Int}()
for i in 1:bs[1], j in 1:bs[2]
d[coef[i,j]] = get(d, coef[i,j], 0) + 1
end
h = 0.0
for i in d
println(i,i.second,length(coef))
p = i.second/length(coef)
module M
global c = 0
function tak(x::Int,y::Int,z::Int)::Int
global c += 1
if x <= y
y
else tak(tak(x-1,y,z), tak(y-1,z,x), tak(z-1,x,y))
end
end
@p1scescom
p1scescom / jtest.jl
Last active December 17, 2018 13:53
tak julia script ver
module M
global c = 0
function tak(x::Int,y::Int,z::Int)::Int
global c += 1
if x <= y
y
else tak(tak(x-1,y,z), tak(y-1,z,x), tak(z-1,x,y))
end
@p1scescom
p1scescom / illmaker.py
Last active August 10, 2017 15:37
Script for to make illumination pattern
#!/usr/bin/env python3
import os
from tkinter import *
from tkinter.ttk import *
from tkinter.colorchooser import *
class CustomButton(Canvas):
def __init__(self, parent, width, height, color, command=None, retu=0, gyo=0, chaco=None):
Canvas.__init__(self, parent, borderwidth=1, relief="flat", highlightthickness=0)
@p1scescom
p1scescom / core.clj
Last active December 21, 2016 13:30
セールスマン問題をといてみた
(ns traveling-salesman.core
(:gen-class))
(def df-dna-set-am 100)
(def df-generation-am 1000)
(def df-max-cost 10000)
(def df-point-am 10)
(def 魚座 nil)