Skip to content

Instantly share code, notes, and snippets.

View matsu7874's full-sized avatar

Kentaro Matsumoto matsu7874

View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@algon-320
algon-320 / competitive_programming_color.json
Last active May 11, 2020 00:27
AtCoder, Codeforces, TopCoderのレーティングと対応する色コード
{
"atcoder": [
{ "color": "#808080", "min": 0, "max": 399 },
{ "color": "#804000", "min": 400, "max": 799 },
{ "color": "#008000", "min": 800, "max": 1199 },
{ "color": "#00C0C0", "min": 1200, "max": 1599 },
{ "color": "#0000FF", "min": 1600, "max": 1999 },
{ "color": "#C0C000", "min": 2000, "max": 2399 },
{ "color": "#FF8000", "min": 2400, "max": 2799 },
{ "color": "#FF0000", "min": 2800, "max": 9999 }
@TearTheSky
TearTheSky / logging_as_ltsv.py
Created February 27, 2016 02:56
Pythonで、LTSV形式でログを出力するサンプル。
import logging
import datetime
logging.basicConfig(level=logging.DEBUG,
format="time:%(asctime)s \tseverity:[%(levelname)s] \tmessage:%(message)s ", filename='myapp.log')
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
@zsup
zsup / ddd.md
Last active May 8, 2024 11:17
Documentation-Driven Development (DDD)

Documentation-Driven Development

The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.

  • Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
  • Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
  • Once documentation has been written, development should commence, and test-driven development is preferred.
  • Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
  • When a feature is being modified, it should be modified documentation-first.
  • When documentation is modified, so should be the tests.

C++初心者がC++を使って競技プログラミングするための備忘録のようなもの

この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。

はじめに

記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。

この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)

githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。

@primenumber
primenumber / Bfi.bf
Created August 4, 2013 14:58
Brainf*ckで書かれたBrainf*ckインタプリタです. 標準入力から\0に到達するまでをBrainf*ckプログラムとみなし,到達した後を標準入力とみなします. このインタプリタを噛ませることによりだいたい数百×プログラム長倍遅くなります.
>>>>,[>+>>,]<<[<<<]>>>-<[[>>+>>>+<<<<<-]>>[<<+>>-]++++++[<<------->>-]+<<-[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]<+<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]++++++[<<------->>-]+<<--[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]<,<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]+++++[<<--------->>-]+<<[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]<-<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]+++++[<<--------->>-]+<<-[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]<.<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]++++++[<<---------->>-]+<<[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]+<<<-<<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]++++++++[<<-------->>-]+<<++[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[>>[>>>]>>>[>>>]+>>>[-]<<<[<<<]<<<[<<<]>-]<<[>>+>>>+<<<<<-]>>[<<+>>-]+++++++[<<------------->>-]+<<[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[->>[>>>]>>>[>>>]>+<<[[<+>-]>>-<<]<[>+<-]>>>[-<<<<[<<<]<<<[<<<]>+[<+>>>-<[>>+>>>+<<<<<-]>>[<<+>>-]+++++++[<<------------->>-]+<<[[-]>>-<<]>>>>>[<<<<<+>>>>>-]<<<[<<<+>>>-]<<[>>+>>>+
@kawanet
kawanet / hiragana-katakana.js
Last active December 19, 2022 23:56
カタカナをひらがなに変換する JavaScript 関数、 ひらがなをカタカナに変換する JavaScript 関数
/** カタカナをひらがなに変換する関数
* @param {String} src - カタカナ
* @returns {String} - ひらがな
*/
function katakanaToHiragana(src) {
return src.replace(/[\u30a1-\u30f6]/g, function(match) {
var chr = match.charCodeAt(0) - 0x60;
return String.fromCharCode(chr);
});
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {