$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.71ms 3.16ms 23.05ms 69.17%
Req/Sec 3.44k 1.98k 7.80k 58.22%
63697 requests in 2.00s, 17.86MB read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
// Windows specific: Uncomment the following line to open a console window for debug output | |
#if _DEBUG | |
#pragma comment(linker, "/subsystem:\"console\" /entry:\"WinMainCRTStartup\"") | |
#endif | |
// Simple OpenGL GLM/SDL demo | |
// Renders a rotating pyramid, showing 3 of 4 sides (allowing back faces to be seen) |
Moved to git repository: https://github.com/denji/golang-tls
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
// ReSharper disable SuspiciousTypeConversion.Global | |
// ReSharper disable InconsistentNaming | |
namespace VideoPlayerController | |
{ | |
/// <summary> | |
/// Controls audio using the Windows CoreAudio API | |
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.tdlabs.keycloak.client; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import org.keycloak.OAuth2Constants; | |
import org.keycloak.RSATokenVerifier; | |
import org.keycloak.admin.client.Keycloak; | |
import org.keycloak.admin.client.KeycloakBuilder; | |
import org.keycloak.common.VerificationException; | |
import org.keycloak.jose.jws.JWSHeader; | |
import org.keycloak.representations.AccessToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Web3 = require('web3') | |
const Tx = require('ethereumjs-tx').Transaction | |
// connect to Infura node | |
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/INFURA_KEY')) | |
// the address that will send the test transaction | |
const addressFrom = '0x1889EF49cDBaad420EB4D6f04066CA4093088Bbd' | |
const privateKey = new Buffer('PRIVATE_KEY', 'hex') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static
so that you can run ARM executables directly on linux
If there's no qemu-arm-static
in the package list, install qemu-user-static
instead
The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.
There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Model | |
from keras.layers import Input, Dense | |
from keras.optimizers import Adam | |
# Define the input layer | |
inputs = Input(shape=(784,)) | |
# Define the hidden layers | |
hidden1 = Dense(128, activation='relu')(inputs) | |
hidden2 = Dense(64, activation='relu')(hidden1) |
OlderNewer