Skip to content

Instantly share code, notes, and snippets.

View tonussi's full-sized avatar

Lucas Tonussi tonussi

View GitHub Profile
@tonussi
tonussi / localization.dart
Created December 11, 2023 18:33 — forked from valterh4ck3r/localization.dart
Portuguese BR Localization Flutter
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/date_symbol_data_local.dart' as intl;
import 'package:intl/intl.dart' as intl;
class _PTBRMaterialLocalizationsDelegate
extends LocalizationsDelegate<MaterialLocalizations> {
@tonussi
tonussi / k3d-install-dashboard.md
Created June 5, 2022 16:52 — forked from smijar/k3d-install-dashboard.md
k3d-install-dashboard

ref

https://rancher.com/docs/k3s/latest/en/installation/kube-dashboard/

install

Deploying the Kubernetes Dashboard

GITHUB_URL=https://github.com/kubernetes/dashboard/releases
VERSION_KUBE_DASHBOARD=$(curl -w '%{url_effective}' -I -L -s -S ${GITHUB_URL}/latest -o /dev/null | sed -e 's|.*/||')
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/${VERSION_KUBE_DASHBOARD}/aio/deploy/recommended.yaml
@tonussi
tonussi / setup-kubernetes-ubuntu-16.md
Created May 13, 2022 16:33 — forked from martin-magakian/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@tonussi
tonussi / dataflow-setup.py
Last active March 23, 2022 13:10
words counter dataflow apache beam
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
We can't make this file beautiful and searchable because it's too large.
id,date,price,bedrooms,bathrooms,sqft_living,sqft_lot,floors,waterfront,view,condition,grade,sqft_above,sqft_basement,yr_built,yr_renovated,zipcode,lat,long,sqft_living15,sqft_lot15
"7129300520","20141013T000000",221900,3,1,1180,5650,"1",0,0,3,7,1180,0,1955,0,"98178",47.5112,-122.257,1340,5650
"6414100192","20141209T000000",538000,3,2.25,2570,7242,"2",0,0,3,7,2170,400,1951,1991,"98125",47.721,-122.319,1690,7639
"5631500400","20150225T000000",180000,2,1,770,10000,"1",0,0,3,6,770,0,1933,0,"98028",47.7379,-122.233,2720,8062
"2487200875","20141209T000000",604000,4,3,1960,5000,"1",0,0,5,7,1050,910,1965,0,"98136",47.5208,-122.393,1360,5000
"1954400510","20150218T000000",510000,3,2,1680,8080,"1",0,0,3,8,1680,0,1987,0,"98074",47.6168,-122.045,1800,7503
"7237550310","20140512T000000",1.225e+006,4,4.5,5420,101930,"1",0,0,3,11,3890,1530,2001,0,"98053",47.6561,-122.005,4760,101930
"1321400060","20140627T000000",257500,3,2.25,1715,6819,"2",0,0,3,7,1715,0,1995,0,"98003",47.3097,-122.327,2238,6819
"2008000270","20150115T000
@tonussi
tonussi / transparent_window.py
Created March 24, 2020 12:59 — forked from KurtJacobson/transparent_window.py
Transparent Window in Gtk+ 3, python
#!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# License: https://kcj.mit-license.org/@2017
import cairo
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
@tonussi
tonussi / dremio-ubuntu
Last active January 6, 2020 18:55 — forked from evan-burke/dremio-ubuntu
[DREMIO: Install dremio on Ubuntu] #dremio
Installing Dremio on Ubuntu
### NOTE: this is significantly out of date since I last edited it in Jan 2018.
# See the comments on the gist for suggested changes for more recent versions.
##Install links / references
https://www.dremio.com/tutorials/recommender-scikit-learn-dremio-postgres-mongodb/
https://www.dremio.com/tutorials/dremio-oracle-aws/
https://docs.dremio.com/deployment/standalone-tarball.html
@tonussi
tonussi / var_transformadas.r
Created October 26, 2019 17:10
vars transformadas
preco_rocha <- log(geo$preco)
area_rocha <- log(geo$area)
coef_ap_rocha <- (geo$coef_ap)^2
acl_decl_rocha <- (geo$acl_decl)^-1
frente_rocha <- (geo$frente)^3
m0 <- lm(preco_rocha ~ area_rocha)
m1 <- lm(preco_rocha ~ coef_ap_rocha)
m2 <- lm(preco_rocha ~ acl_decl_rocha)
m3 <- lm(preco_rocha ~ frente_rocha)
@tonussi
tonussi / interpretar.r
Last active October 24, 2019 12:58
predicaot2
> m4 <- lm(geo$preco ~ geo$area + geo$coef_ap + geo$acl_decl + geo$frente, data=geo)
>
> summary(m4)
Call:
lm(formula = geo$preco ~ geo$area + geo$coef_ap + geo$acl_decl +
geo$frente, data = geo)
Residuals:
Min 1Q Median 3Q Max
#! /usr/bin/python
import dota2api
from dota2api.src.exceptions import APIError, APITimeoutError
import csv
from multiprocessing import Pool
import time
import sys
def getMatchInfo( api, matchId ):