This file contains 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
# chunk by np-chunk | |
def get_chunk_np(sentence): | |
grammar = "NP: {<DT>?<JJ>*<NN>}" | |
cp = nltk.RegexpParser(grammar) | |
result = cp.parse(sentence) | |
return result |
This file contains 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
<?php | |
use Illuminate\Contracts\Console\Kernel; | |
require_once __DIR__.'/../vendor/autoload.php'; | |
/* | |
|-------------------------------------------------------------------------- | |
| Bootstrap The Test Environment | |
|-------------------------------------------------------------------------- |
This file contains 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
image: python:3.7 | |
stages: | |
- test | |
- deploy | |
development: | |
stage: test | |
before_script: | |
- pip install -r requirements.txt |
This file contains 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
https://github.com/learnbyexample/Command-line-text-processing/blob/master/ruby_one_liners.md |
This file contains 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
https://github.com/carrierwaveuploader/carrierwave#making-uploads-work-across-form-redisplays | |
tapi jangan buat attr_accesible, karena carrierwave sudah menggenerate name_cache(name bisa avatar,photo dll) nya | |
tambahkan name_cache di strong paramater di controller |
This file contains 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
JS_PATH = "app/assets/javascripts/**/*.js"; | |
Dir[JS_PATH].each do |file_name| | |
puts "\n#{file_name}" | |
puts Uglifier.compile(File.read(file_name)) | |
end |
NewerOlder