Skip to content

Instantly share code, notes, and snippets.

View devmessias's full-sized avatar
🎯
Focusing

bruno messias devmessias

🎯
Focusing
View GitHub Profile
@jamespo
jamespo / hello_world.py
Last active August 12, 2021 16:19
Alexa Flask Python Skill using flask-ask-sdk - modification of Amazon "Hello World" Example
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# You'll need a TLS terminating proxy (apache,nginx) in front of this
# This is a simple Hello World Alexa Skill, built using
# the decorators approach in skill builder.
import logging
from flask import Flask
@shmerl
shmerl / mesa_debian_build.sh
Last active March 10, 2024 19:35
For building Mesa on Debian
#!/bin/bash
# Notes:
#
# 1. Works for tags and specific hash commits too (override mesa_branch variable with needed value).
#
# 2. By default builds for /opt/mesa-<branch> and places the result in ${HOME}/mnt/vmshare/mesa-<branch>
# You can override the build deployment location by setting dest_dir. For example this should put it right away
# in /opt/mesa-<branch>
#
@pelson
pelson / example.ipynb
Last active February 21, 2024 16:05
Example of authenticating a GitHub app using jwt in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emiloberg
emiloberg / GaugeChart.js
Last active February 13, 2024 14:30
Gauge Chart with React Recharts (http://recharts.org)
import React from 'react';
import { Sector, Cell, PieChart, Pie } from 'recharts';
const GaugeChart = () => {
const width = 500;
const chartValue = 180;
const colorData = [{
value: 40, // Meaning span is 0 to 40
color: '#663399'
}, {

How to install OpenBLAS & multi-threaded Numpy on RedHat

(main source; other info; even more help)

Step 1: make sure to have gfortran installed

Step 2: clone the OpenBLAS repo.

git clone https://github.com/xianyi/OpenBLAS
@smajda
smajda / gulpfile.js
Last active September 28, 2016 13:47
Example gulpfile using babelify for es6 & jsx with minifify for minification and source maps
/*
* Directory structure:
*
* project/
* package.json
* gulpfile.js
* node_modules/
* src/
* dist/
*
@Fishrock123
Fishrock123 / gulp.js
Last active August 1, 2021 11:19
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
@cdiener
cdiener / asciinator.py
Last active January 5, 2023 17:24
Convert image to ascii art
import sys; from PIL import Image; import numpy as np
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@'))
if len(sys.argv) != 4: print( 'Usage: ./asciinator.py image scale factor' ); sys.exit()
f, SC, GCF, WCF = sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), 7/4
img = Image.open(f)
S = ( round(img.size[0]*SC*WCF), round(img.size[1]*SC) )
img = np.sum( np.asarray( img.resize(S) ), axis=2)