I hereby claim:
- I am thara on github.
- I am thara (https://keybase.io/thara) on keybase.
- I have a public key ASBK2rc1oh63jyMSc0jQUIqtgqdGYZBgjDLS3Yh9-IHAfgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| from itertools import chain | |
| import time | |
| def neighbors(point): | |
| x, y = point | |
| return ((x + i, y + j) for i in [-1, 0, 1] for j in [-1, 0, 1] if (i, j) != (0, 0)) | |
| def is_living(point, live_cells): | |
| count = sum(1 for n in neighbors(point) if n in live_cells) |
| class A { | |
| lateinit var s: String | |
| fun print() { | |
| println(s) | |
| } | |
| } | |
| fun main(args: Array<String>) { | |
| A().print() | |
| } |
| #include <iostream> | |
| namespace cocos2d { | |
| class Ref | |
| { | |
| public: | |
| Ref* autorelease() { | |
| return this; | |
| }; | |
| }; |
| import sys | |
| from pyquery import PyQuery as pq | |
| def list_categories(): | |
| d = pq(url="https://api.slack.com/methods") | |
| for e in d('#api_main_content div h2').items(): | |
| print(e.text()) | |
| // | |
| // Created by hara on 2017/10/12. | |
| // | |
| #ifndef CPP_PLAYGROUD_TIMER_H | |
| #define CPP_PLAYGROUD_TIMER_H | |
| #include <chrono> | |
| using namespace std::chrono; |
| ''' | |
| This function handles a Slack slash command and echoes the details back to the user. | |
| Follow these steps to configure the slash command in Slack: | |
| 1. Navigate to https://<your-team-domain>.slack.com/services/new | |
| 2. Search for and select "Slash Commands". | |
| 3. Enter a name for your command and click "Add Slash Command Integration". |
| from collections import namedtuple | |
| UserProfileUpdateCommand = namedtuple( | |
| "UserUpdateCommand", "user_id user_name email_address") | |
| class UserProfileUpdateResult(namedtuple( | |
| "UserProfileUpdateResult", "success errors")): | |
| def to_dict(self): | |
| return {"success": self.success, "errors": self.errors} | |
| for f in `find . -maxdepth 1 -type l -print`; do | |
| s=$f | |
| o=`readlink "$f"` | |
| new=`echo $o | sed -e 's/tomochikahara/thara/'` | |
| ln -s -f $new $s | |
| done |
| for f in *; do | |
| cd "$f" | |
| NEW_URL=`git remote -v | grep fetch | sed -e 's/tomochikahara/thara/' | sed s/$'\t'/$' '/g | cut -d ' ' -f 2` | |
| if echo $NEW_URL | grep -v "fatal" | |
| then | |
| git remote set-url origin "$NEW_URL" | |
| fi | |
| cd .. | |
| done |