Skip to content

Instantly share code, notes, and snippets.

@a2ndrade
a2ndrade / e3.py
Created July 26, 2021 00:17
e3.py
def main():
# este es la lista vacia
temperaturas = []
# el usuario ingresa la cantidad de dias
num_dias = int(input(f"¿Cuantos días se van a promediar?: "))
# el ciclo del array
for i in range(0, num_dias):
temperatura = float(input(f"Ingrese la temperatura del dia {i + 1}: "))
temperaturas.append(temperatura)
print(f"\nLas temperaturas son: {temperaturas}")
w:"I"$first .z.x
c:{[w]
warehouse:w*9;
stock:100000*18;
item:100000*5;
region:5*3;
supplier:10000*7;
nation:25*4;
orderline:w*300000*10;
neworder:w*9000*3;
@a2ndrade
a2ndrade / tpch.json
Last active July 28, 2016 00:31
Sample JSON data for TPC-H schema
[
{
"entityId": -101,
"entityDt": "customerDt",
"c_name": "Customer#000000001",
"c_address": "IVhzIApeRb ot,c,E",
"c_nationkey": -2015,
"c_phone": "25-989-741-2988",
"c_acctbal": 711.56,
"c_mktsegment": "BUILDING",
@a2ndrade
a2ndrade / a.q
Last active August 5, 2016 15:44
Atomic
\c 15 300i
/ c: count | th: table handle | ht: historical table | st: snapshot table | rt: realtime table | tx: transaction
/ source: "abcdefghijklmnopqrstuvwxyz" (size=26)
/ input: (# of groups) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/ output (# of handles): 676 169 81 49 36 25 16 16 9 9 9 9 4 4 4 4 4 4 4 4 4 4 4 4 4 1
getHdbTableHandles:{[crossProductAlphabetSize]`$(":hdb/",/:raze g,\:/:g:cut[crossProductAlphabetSize;"abcdefghijklmnopqrstuvwxyz"]),'"/"}
getAllHdbTableHandles:{
/:raze getHdbTableHandles each 1+til 26 / all tables ~1200
@a2ndrade
a2ndrade / db.q
Last active August 5, 2016 15:44
Atomic
\c 30 300
/ KDB built-in types
/ default values
STORAGE_VALUES:(0b;0Ng;0x00;0h;0i;0;0e;0.0;" ";`;0Np;2000.01m;2000.01.01;2000.01.01T00:00:00.000;0Nn;00:00;00:00:00;00:00:00.000;0)
STORAGE_VALUES,:enlist each STORAGE_VALUES
/ char aliases
STORAGE_CHARS:"bgxhijefcspmdznuvtr" / scalar char aliases
@a2ndrade
a2ndrade / fluetconf.md
Last active September 23, 2015 13:48
Fluent Conf 2016: Talk Proposal

##Server-side FRP: Powerful UIs, no added complexity

###Description We’ll present FRP (Functional Reactive Programming) ideas and novel techniques applied to the development of an enterprise application platform that let non-programmers build cross-platform UIs that have complete access to backend services. All with a very simple, purely functional, interpreted language used to declaratively create and persist UIs that are dynamically rendered on web and mobile.

###Abstract We’ll show why a unidirectional data flow architecture makes event-driven systems easier to reason about, how using a single language to describe both business logic and UI views allow us to compose complex UIs out of simpler, independent components. How we use Haskell-inspired ideas to isolate side-effects and perform them under a controlled environment, how we provide the illusion of local state by hiding it behind a globally-managed state tree, how we take advantage of functional purity and use FRP techniques to only recompute the par

@a2ndrade
a2ndrade / proxy.js
Created September 8, 2015 23:11
proxy
const httpProxy = require('http-proxy');
module.exports = function(target) {
const proxy = httpProxy.createProxyServer({
target: target,
secure: false,
changeOrigin: true,
auth: 'user:password'
});
@a2ndrade
a2ndrade / gist:127a422c194738e4ddb4
Last active August 29, 2015 14:19
React Native Scratchpad
'use strict';
var React = require('react-native');
var {
TextInput,
Text,
View,
ListView
} = React;
-- Learn you a Haskell for Great Good --
-- GIST: 4e3241f2a73fe93d7a96
import Data.List
import Data.Char
import qualified Data.Map as Map
-- head, tail, take, drop, takeWhile, dropWhile
-- fst, snd, zip, zipWith, flip
-- sum, product, maximum
@a2ndrade
a2ndrade / gist:9623509
Created March 18, 2014 16:19
Git: Ordered list of tags
git for-each-ref --format="%(taggerdate:short) %(refname)" --sort="taggerdate" refs/tags