Skip to content

Instantly share code, notes, and snippets.

View hallysonh's full-sized avatar

Hallyson Almeida hallysonh

  • Hallyson Almeida
  • Teresina, PI - Brazil
  • X @hallysonh
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hallysonh on github.
  • I am hallysonh (https://keybase.io/hallysonh) on keybase.
  • I have a public key ASA7uvu8xOBsPURO0NLDwCLI5HQ2KcxbrHN1FhbxzKO2sgo

To claim this, I am signing this object:

@hallysonh
hallysonh / consumer.py
Last active March 14, 2019 00:32
Python Redis Publish/Consume
import asyncio
import logging
import redis
return_dict = []
async def test():
r = redis.Redis(host='localhost', port=6379, db=0)
p = r.pubsub(ignore_subscribe_messages=True)
@hallysonh
hallysonh / keras_models.md
Created December 7, 2018 00:54 — forked from candlewill/keras_models.md
A collection of Various Keras Models Examples

Keras Models Examples

一系列常用模型的Keras实现

DNN

Multilayer Perceptron (MLP) for multi-class softmax classification

from keras.models import Sequential
@hallysonh
hallysonh / inh-ani.LiveTemplate
Last active November 14, 2018 03:05
Intellij Live Template for Flutter/Dart to create a ImplicitlyAnimatedWidget
class $NAME$ extends ImplicitlyAnimatedWidget {
$NAME$() : super(duration: const Duration(milliseconds: 250));
@override
_$NAME$State createState() => _$NAME$State();
}
class _$NAME$State extends AnimatedWidgetBaseState<$NAME$> {
Tween<double> _transitionX;
@hallysonh
hallysonh / poly3-webcomponent.html
Created February 26, 2018 17:46
Web Component - Polymer 3
<html>
<head>
<title>hello component</title>
<script type="module">
import {Element as PolymerElement} from "https://polygit.org/polymer+:3.0-preview/components/polymer/polymer-element.js"
const html = String.raw;
const DEFAULT_NAME = 'World';
@hallysonh
hallysonh / webcomponent.html
Last active February 26, 2018 16:35
WebComponent Sample
<html>
<head>
<title>hello component</title>
<script>
const html = String.raw;
const DEFAULT_NAME = 'World';
const DEFAULT_COLOR = 'blue';
class Hello extends HTMLElement {
constructor() {
// Mock data to generate MOCK array
code = [1, 2, 3]
nomes = ['MARIA', 'CLARA', 'ANTONIA']
idades = [25, 30, 27]
// Person class properties
class_properties = ['id', 'name', 'age']
// Match arrays
personArr = _.zip(code, nomes, idades)
@hallysonh
hallysonh / app.module.ts
Last active August 18, 2016 13:44
AngularJS TypeScript - Image and Link Directive for Firebase Storage Resources
import { FirebaseService } from './services';
import { fbStorage } from './components';
angular.module('myapplication')
.service('myFirebase', FirebaseService)
.directive('fbStorage', fbStorage)
@hallysonh
hallysonh / app.module.ts
Last active August 18, 2016 13:41
AngularJS TypeScript - CEP, Phone, CPF/CNPJ and DateNumber (timestamp) Filter
import { PhoneFilter, CepFilter, CpfCnpjFilter, DateNumberFilter } from './filters';
angular.module('myproject')
.filter('phone', PhoneFilter.Factory)
.filter('cep', CepFilter.Factory)
.filter('cpfCnpj', CpfCnpjFilter.Factory)
.filter('dateNumber', DateNumberFilter.Factory);