This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ echo '{"Compile":["C","C++","Objective-C"],"Script":["JavaScript","PHP","Perl","Python"]}' |python -mjson.tool | |
| { | |
| "Compile": [ | |
| "C", | |
| "C++", | |
| "Objective-C" | |
| ], | |
| "Script": [ | |
| "JavaScript", | |
| "PHP", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb(main):001:0> true & true | |
| => true | |
| irb(main):002:0> true & false | |
| => false | |
| irb(main):003:0> false & true | |
| => false | |
| irb(main):004:0> false & false | |
| => false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'natto' | |
| text = 'すもももももももものうち' | |
| natto = Natto::MeCab.new | |
| natto.parse(text) do |n| | |
| if n.feature.split(',')[0] == '名詞' | |
| puts "#{n.surface}\t#{n.feature}" | |
| end | |
| end | |
| ==== | |
| すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from tqdm import tqdm | |
| items = [1,2,3,4,5,6,7,8,9,10] | |
| def process(item): | |
| time.sleep(1) | |
| for item in tqdm(items): | |
| process(item) |
OlderNewer