The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
| <?php | |
| /* | |
| * Using a key => value pair with the yield keyword is | |
| * the cleanest method I could find to add identifiers or tags | |
| * to asynchronous concurrent requests in Guzzle, | |
| * so you can identify which response is from which request! | |
| */ | |
| $client = new GuzzleHttp\Client(['base_uri' => 'http://httpbin.org']); |
| package homo.efficio.json.jackson.custom.serialization; | |
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.fasterxml.jackson.databind.module.SimpleModule; | |
| import homo.efficio.json.jackson.custom.serialization.domain.CellPhone; | |
| import homo.efficio.json.jackson.custom.serialization.domain.FamilyMember; | |
| import homo.efficio.json.jackson.custom.serialization.domain.MobileVendor; | |
| import homo.efficio.json.jackson.custom.serialization.serializer.CellPhoneSerializer; | |
| import homo.efficio.json.jackson.custom.serialization.serializer.FamilyMemberSerializer; |
| trait HasEnums | |
| { | |
| /** | |
| * The array of enumerators of a given group. | |
| * | |
| * @param null|string $group | |
| * @return array | |
| */ | |
| static function enums($group = null) | |
| { |
| #!/usr/bin/env bash | |
| ## Installation | |
| ## curl -o /usr/local/bin/serve-php.sh https://gist.githubusercontent.com/lesstif/82c107282241c7a52ad9/raw | |
| ## chmod +x /usr/local/bin/serve-php.sh | |
| SA="/etc/nginx/sites-available/" | |
| SE="/etc/nginx/sites-enabled/" | |
| test=0 |
| <?php | |
| trait CastsValueObjects | |
| { | |
| protected function castAttribute($key, $value) | |
| { | |
| $castToClass = $this->getValueObjectCastType($key); | |
| // no Value Object? simply pass this up to the parent | |
| if (!$castToClass) { | |
| return parent::castAttribute($key, $value); |
κΈμ΄μ΄: κΉμ μ£Ό([email protected])
μ΄ λ¬Έμλ ν μνλ‘μ° κ³΅μ νμ΄μ§ λ΄μ©μ λ°νμΌλ‘ λ§λ€μ΄μ‘μ΅λλ€.
ν μνλ‘μ°(TensorFlow)λ κΈ°κ³ νμ΅κ³Ό λ₯λ¬λμ μν΄ κ΅¬κΈμμ λ§λ μ€νμμ€ λΌμ΄λΈλ¬λ¦¬μ λλ€. λ°μ΄ν° νλ‘μ° κ·Έλν(Data Flow Graph) λ°©μμ μ¬μ©νμμ΅λλ€.
| .highlight .hll { background-color: #ffffcc } | |
| .highlight { background: #151718; color: #d4d7d6; background-color: #151718 } | |
| .highlight .c { color: #41535b; background-color: #151718 } /* Comment */ | |
| .highlight .err { color: #d4d7d6; background-color: #151718 } /* Error */ | |
| .highlight .esc { color: #d4d7d6; background-color: #151718 } /* Escape */ | |
| .highlight .g { color: #d4d7d6; background-color: #151718 } /* Generic */ | |
| .highlight .k { color: #9fca56; background-color: #151718 } /* Keyword */ | |
| .highlight .l { color: #d4d7d6; background-color: #151718 } /* Literal */ | |
| .highlight .n { color: #d4d7d6; background-color: #151718 } /* Name */ | |
| .highlight .o { color: #d4d7d6; background-color: #151718 } /* Operator */ |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |