Skip to content

Instantly share code, notes, and snippets.

View morenoh149's full-sized avatar
💭
Working from 🛰

Harry Moreno morenoh149

💭
Working from 🛰
View GitHub Profile
@morenoh149
morenoh149 / min-char-rnn.py
Created July 7, 2018 22:29 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
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)
$ docker build -t gcr.io/foo/polls .
Sending build context to Docker daemon 1.12MB
Step 1/7 : FROM gcr.io/google_appengine/python
latest: Pulling from google_appengine/python
1d47b358304c: Pull complete
c6cf9be4ad08: Pull complete
3c2cba919283: Pull complete
b5267a7c948d: Pull complete
327bc3d676fa: Pull complete
7084178c9da9: Pull complete
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: foo
server: https://bar
name: baz
contexts:
- context:
cluster: baz
user: baz
@morenoh149
morenoh149 / 404.html
Created June 20, 2018 19:46
django admin unreachable
GET http://localhost:8000/admin
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/admin
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^ ^$ [name='index']
^admin/
^static\/(?P<path>.*)$
@morenoh149
morenoh149 / temp.sol
Created June 11, 2018 04:08
Compiled with `$ solcjs temp.sol {--abi,--bin}`
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract SimpleStore {
function set(uint _value) public {
value = _value;
}
function get() public constant returns (uint) {
return value;
}
@morenoh149
morenoh149 / error.sh
Last active June 10, 2018 19:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
browser/foo.sol:10:9: TypeError: Type struct strings.slice memory is not implicitly convertible to expected type string storage pointer.
string storage s = "This-Is-A-Problem".toSlice();
^----------------------------------------------^
@morenoh149
morenoh149 / error.sh
Last active June 5, 2018 15:51
input dimension error with keras
ValueError: Error when checking input: expected dense_22_input to have 3 dimensions, but got array with shape (3, 592434)
$ node index.js
/Users/hmoreno/programming/s3test/node_modules/aws-sdk/lib/request.js:31
throw err;
^
Error: connect ETIMEDOUT 169.254.169.254:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1170:14)
var form = new FormData(document.getElementById('login-form'));
fetch("/login", {
method: "POST",
body: form
});
func (param i32 i32 i32) (result f32)
block f32
block
block
block
block
get_local 2
i32.const 0
i32.sub
br_table 0 1 2 3