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) |