Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
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' |
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.
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
#!/bin/bash | |
clang hello.c -target arm64-apple-darwin20.1.0 -o hello.arm64 | |
echo -n "hello.arm64 is architecture " && lipo -archs ./hello.arm64 | |
clang hello.c -target x86_64-apple-darwin-macho -o hello.x86_64 | |
echo -n "hello.x86_64 is architecture " && lipo -archs ./hello.x86_64 | |
lipo hello.arm64 hello.x86_64 -create -output hello | |
echo -n "final output binary has archs " && lipo -archs ./hello |
@bpteague Has an excellent update solution as of February 2025 using modern tools and an updated workflow.
This gist will remain here, but is deprecated. I'll keep it here historical and link-preservation purposes only. I strongly encourage everyone to check out the solution above!
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
# edit and save this file to /usr/lib/systemd/system/clash.service | |
[Unit] | |
Description=clash | |
After=network.target | |
[Service] | |
WorkingDirectory="your home directory"/.config/clash | |
ExecStart="your home directory"/.config/clash/start-clash.sh | |
ExecStop="your home directory"/.config/clash/stop-clash.sh | |
Environment="HOME=your home directory" |
# 1. put frpc and frpc.ini under /usr/local/frpc/ | |
# 2. put this file (frpc.service) at /etc/systemd/system | |
# 3. run `sudo systemctl daemon-reload && sudo systemctl enable frpc && sudo systemctl start frpc` | |
# Then we can manage frpc with `sudo service frpc {start|stop|restart|status}` | |
# See also: https://nosame.net/use-frp-to-reverse-proxy-your-nas/ | |
# Alternative for server: | |
# - Offical: https://github.com/fatedier/frp/blob/a4cfab6/conf/systemd/frpc%40.service | |
[Unit] |
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) |