Skip to content

Instantly share code, notes, and snippets.

Working from 🛰

Harry Moreno morenoh149

Working from 🛰
View GitHub Profile
View fetch_parallel.js
const getInvite = fetch(
const getHost = fetch(`${apiHost}/user/${}/`);
Promise.all([getInvite, getHost, delayPromise(1000)()])
.then(values => {
values.pop(); // drop delayPromise's return value (undefined)
return => v.json());
import tensorflow as tf
from keras import backend as K
from tensorflow.python.saved_model import builder as saved_model_builder
from tensorflow.python.saved_model import tag_constants, signature_constants
from tensorflow.python.saved_model.signature_def_utils_impl import predict_signature_def
builder = saved_model_builder.SavedModelBuilder('vgg16_no_augmentation_export')
signature = predict_signature_def(inputs={'input': parallel_model.inputs[0]},
outputs={'income': parallel_model.outputs[0]})
MemoryError Traceback (most recent call last)
<ipython-input-22-567222df1eb0> in <module>()
----> 1 x_train = vectorize_sequences(train_data)
2 x_test = vectorize_sequences(test_data)
<ipython-input-21-5d7c33381575> in vectorize_sequences(sequences, dimension)
2 # are a 1 in the tensor, 0 otherwise
3 def vectorize_sequences(sequences, dimension=10000):
----> 4 results = np.zeros((len(sequences), dimension))
morenoh149 /
Last active Aug 12, 2020
django postgis install
/Users/harrymoreno/.local/share/virtualenvs/litt-api-HgI9cQzm/lib/python3.6/site-packages/psycopg2/ UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <>.
Traceback (most recent call last):
File "/Users/harrymoreno/.local/share/virtualenvs/litt-api-HgI9cQzm/lib/python3.6/site-packages/django/db/backends/", line 83, in _execute
return self.cursor.execute(sql)
psycopg2.ProgrammingError: permission denied to create extension "postgis"
HINT: Must be superuser to create this extension.
The above exception was the direct cause of the following exception:
morenoh149 / Nbutton.js
Last active Jul 14, 2018
React Native Platform specific button
View Nbutton.js
import React from "react";
import { Platform, TouchableNativeFeedback, TouchableOpacity, View } from "react-native";
const Colors = {
androidRippleDark: "#ccc"
const styles = {
style: {}
morenoh149 /
Created Jul 7, 2018 — forked from karpathy/
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 .
Sending build context to Docker daemon 1.12MB
Step 1/7 : FROM
latest: Pulling from google_appengine/python
1d47b358304c: Pull complete
c6cf9be4ad08: Pull complete
3c2cba919283: Pull complete
b5267a7c948d: Pull complete
327bc3d676fa: Pull complete
7084178c9da9: Pull complete
View .kube_config.yaml
apiVersion: v1
- cluster:
certificate-authority-data: foo
server: https://bar
name: baz
- context:
cluster: baz
user: baz
morenoh149 / 404.html
Created Jun 20, 2018
django admin unreachable
View 404.html
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']
morenoh149 / temp.sol
Created Jun 11, 2018
Compiled with `$ solcjs temp.sol {--abi,--bin}`
View temp.sol
//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;