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
| 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 |
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
| 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 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
| https://github.com/learnbyexample/Command-line-text-processing/blob/master/ruby_one_liners.md |
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
| image: python:3.7 | |
| stages: | |
| - test | |
| - deploy | |
| development: | |
| stage: test | |
| before_script: | |
| - pip install -r requirements.txt |
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
| <?php | |
| use Illuminate\Contracts\Console\Kernel; | |
| require_once __DIR__.'/../vendor/autoload.php'; | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Bootstrap The Test Environment | |
| |-------------------------------------------------------------------------- |
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
| # 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 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 nltk | |
| # ubah jadi tipe nltk | |
| def convertToText(filename): | |
| # raw/str -> token/list -> convert ke nltk.Text | |
| raw = open(filename).read() | |
| # type(raw) == string | |
| tokens = nltk.word_tokenize(raw) | |
| # type(tokens) == list | |
| # token bisa berupa tanda-baca{?.,etc}, pos = {adverb,adj,} | |
| return nltk.Text(tokens) |
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
| 1.8 | |
| # catatan | |
| # file ini dipindahkan di home directory | |
| # jika sudah di home, hapus komentar catatan ini | |
| # isi file hanya versi java |
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
| // read makeCommandPane.md | |
| class ExecuteExternalDialog{ | |
| private JPanel makeCommandPane() { | |
| JPanel panel = new JPanel(new BorderLayout()); | |
| ngapain1(); | |
| panel.add(main, BorderLayout.CENTER); | |
| bottom = getBottom(); | |
| panel.add(bottom, BorderLayout.SOUTH); | |
| ngapain2(); |
OlderNewer