Skip to content

Instantly share code, notes, and snippets.

View aflores's full-sized avatar

Armando Flores aflores

View GitHub Profile
### Keybase proof
I hereby claim:
* I am aflores on github.
* I am aflores (https://keybase.io/aflores) on keybase.
* I have a public key ASCwPN76tJh68AERCeLABtEGF1eOD5ccAVgZtU0-bMPz-wo
To claim this, I am signing this object:
@aflores
aflores / lin-reg.txt
Created April 28, 2021 12:51
Linear-regression-txt
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
X = 2 * np.random.rand(100,1)
y = 4 + 3 * X + np.random.rand(100,1)
plt.scatter(X,y)
# np.c_[constants, vector] add (prepend a column) x0 = 1 to each instance
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy ASP.Net Core app to Azure Web App - partsunlimited-web-20(staging)
on:
push:
branches:
- main
workflow_dispatch:
@aflores
aflores / react-redux exercise
Last active October 22, 2019 02:00
Udemy - Modern React with Redux [2019 Update] exercise 154
<script type="text/babel" data-plugins="proposal-class-properties" data-presets="env,react">
// Action Creators - You don't need to change these
const increment = () => ({ type: 'increment' });
const decrement = () => ({ type: 'decrement' });
// { props.increment } is equivalet to { () => props.increment() }
const Counter = props => {
return (
<div>
<button onClick={ props.increment } className="increment">Increment</button>
<button onClick={ () => props.decrement() } className="decrement">Decrement</button>
defmodule HitCountAgent do
use Agent
@docmodule """
This is the agen based implementation of a counter
"""
@doc """
hitPid = HitCountAgent.start()
@aflores
aflores / youtubedownloader.scpt
Created August 20, 2017 16:05
AppleScript file to download youtube videos
(*
script to download videos from youtube using the youtube-dl program
you can paste this code in a ScriptEditor file or use it inside a
'Run AppleScript' block in an Automator Application
*)
set question to display dialog "Youtube URL to fetch?" default answer "" buttons {"Cancel", "Open in Browser", "Download"} default button 3
set pageURL to (text returned of result)
if pageURL is "" then return "No URL"
set choice to (button returned of question)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-2.0.3.js"></script>
<style id="jsbin-css">
#cstagButtons ul {
list-style-type: none;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-2.0.3.js"></script>
</head>
<body>
<div id="tagButtons"><ul></ul></div>
@aflores
aflores / ViewController.swift
Created November 7, 2015 03:43
Map Demo iOS9 Udemy
//
// ViewController.swift
// Map Demo
//
// Created by Armando Flores on 11/6/15.
// Copyright © 2015 Armando Flores. All rights reserved.
//
import UIKit
import MapKit