Skip to content

Instantly share code, notes, and snippets.

Marcio Klepacz marciok

Block or report user

Report or block marciok

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kmltest.kml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Folder>
<name>Lugares temporários</name>
<open>1</open>
</Folder>
</kml>
View alb-ingress-controller.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-alb
labels:
app: my-app
annotations:
kubernetes.io/ingress.class: "alb"
alb.ingress.kubernetes.io/scheme: "internet-facing"
alb.ingress.kubernetes.io/target-type: "instance"
View my-nginx-ingress.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-nginx-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: myhost.mydomain.org
View btc-prices-5.py
import numpy as np
import csv
import matplotlib.pyplot as plt
# 1. Extract Bitcoin prices and number of Google searches.
bitcoin_interest = {}
with open('bitcoin-interest.csv') as f:
reader = csv.reader(f)
for row in reader:
View btc-prices-4.py
def gradient_descent(points, b, m, learning_rate):
m_gradient = 0
b_gradient = 0
N = float(len(points))
for i in range(0, len(points)):
x = points[i, 0]
y = points[i, 1]
# Caluclating the partial derivative
View btc-prices-3.py
def calculate_error(points, m, b):
# Error is calculated by the average distance from the points to the line
error = 0
for i in range(0, len(points)):
x = points[i, 0]
y = points[i, 1]
# Moving y to the other side of the equation
# y = mx + b -> = mx + b - y
error += (y - (m*x + b))**2
View btc-prices-2.py
# 3.Set our hyper paremeters: epoch, learning rate, m and b.
learning_rate = 0.0001
epochs = 1000
start_m = 0
start_b = 0
View btc-prices-1.py
import numpy as np
import csv
import matplotlib.pyplot as plt
# 1. Extract Bitcoin prices and number of Google searches.
bitcoin_interest = {}
with open('bitcoin-interest.csv') as f:
reader = csv.reader(f)
for row in reader:
View cpf_validator.js
function validarCPF(cpf) { 
    cpf = cpf.replace(/[^\d]+/g,'');   
    if(cpf == '') return false;
    // Elimina CPFs invalidos conhecidos   
    if (cpf.length != 11 ||
        cpf == "00000000000" ||
        cpf == "11111111111" ||
        cpf == "22222222222" ||
        cpf == "33333333333" ||
        cpf == "44444444444" ||
You can’t perform that action at this time.