Skip to content

Instantly share code, notes, and snippets.

View auxten's full-sized avatar
🛠️
Coding

auxten auxten

🛠️
Coding
View GitHub Profile
@rmascarenhas
rmascarenhas / undo.sh
Created November 16, 2012 02:19
Undoing your last command
# undo: reverts the last command, as long as there is a registered handler
# for it.
#
# Usage:
#
# $ undo
#
# There are no options.
#
# There are by default registered handlers for the following commands:
@SkalskiP
SkalskiP / train.py
Created October 11, 2018 19:56
Putting things together
def train(X, Y, nn_architecture, epochs, learning_rate):
params_values = init_layers(nn_architecture, 2)
cost_history = []
accuracy_history = []
for i in range(epochs):
Y_hat, cashe = full_forward_propagation(X, params_values, nn_architecture)
cost = get_cost_value(Y_hat, Y)
cost_history.append(cost)
accuracy = get_accuracy_value(Y_hat, Y)
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
# Unzip
unzip protoc-3.5.1-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@auxten
auxten / bench_chdb_dataframe.py
Last active May 29, 2023 02:53
Bench different impl of running chdb directly on dataframe
import os
import time
import pandas as pd
import pyarrow as pa
import chdb
import subprocess
# file size 117MB
data_path = '/home/Clickhouse/bench/hits_0.parquet'
#!/usr/bin/env bash
# Names of latest versions of each package
export VERSION_PCRE=pcre-8.39
export VERSION_ZLIB=zlib-1.2.8
export VERSION_LIBRESSL=libressl-2.4.2
export VERSION_NGINX=nginx-1.11.3
# URLs to the source directories
export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
@jordanorelli
jordanorelli / client.go
Created May 7, 2012 17:16
rpc server example in go
package main
import (
"bufio"
"log"
"net/rpc"
"os"
)
func main() {
@kekru
kekru / 1-Enable Docker Remote API with TLS client verification.md
Last active January 11, 2024 18:21
Docker Remote API with client verification via daemon.json

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@alexandreelise
alexandreelise / README.md
Last active February 7, 2024 07:18
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04

Hi! gcc users

There is good news for you. I made a new repository with a single Dockerfile to build every combinations of versions of Ubuntu LTS and gcc you like

Find out more on https://github.com/alexandreelise/install-gcc

@cld4h
cld4h / README.md
Last active March 13, 2024 23:22
Bypass the GFW; clash fake-ip and tproxy; iptables and transparent proxy on Linux; 在Linux上通过 iptables 以及 clash 配置透明代理用于本机及局域网翻墙网关; Linux 翻墙路由器配置

This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.

We use:

You can go to github gist to download all files mentioned in this article.

Setup

  • Create a developer account with Apple
  • Download and install X-Code from the Apple App Store
  • Open and run X-Code app and install whatever extras it requires
  • Open the preferences pane (cmd+,)
    • click the + in the lower right corner
    • choose Apple ID
    • enter your apple ID and password