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
use std::io::Read; | |
use curl::easy::Easy; | |
fn main() { | |
let mut data = "this is the body".as_bytes(); | |
let mut easy = Easy::new(); | |
easy.url("http://www.example.com/upload").unwrap(); | |
easy.post(true).unwrap(); | |
easy.post_field_size(data.len() as u64).unwrap(); |
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
(ns collisions.core | |
(:require [clojure.string :as str]) | |
(:gen-class)) | |
(defn str->edge [s] | |
(->> (str/split s #" ") | |
(map #(Integer/parseInt %)))) | |
(defn file-contents->edges [s] | |
(->> (str/split s #"\n") |
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
diff --git a/src/object_store/src/object/opendal_engine/opendal_object_store.rs b/src/object_store/src/object/opendal_engine/opendal_object_store.rs | |
index 20d498d678..004a49a006 100644 | |
--- a/src/object_store/src/object/opendal_engine/opendal_object_store.rs | |
+++ b/src/object_store/src/object/opendal_engine/opendal_object_store.rs | |
@@ -376,10 +376,32 @@ impl OpendalStreamingUploader { | |
impl StreamingUploader for OpendalStreamingUploader { | |
async fn write_bytes(&mut self, data: Bytes) -> ObjectResult<()> { | |
assert!(self.is_valid); | |
- self.not_uploaded_len += data.len(); | |
- self.buf.push(data); |
KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.
KIND uses a docker user defined network.
It creates a bridge named kind
- Download build-tools
apt-get install build-essential cmake -y
- Configure the compiler
cmake \
-DWITH_BOOST=/usr/local/src/mysql-5.7.19/boost/boost_1_59_0 \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql57 \
-
Download mysql source
-
Ran the following cmake command based on the documentation
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mac-dev-env/mysql-5.7.18 \
-DCMAKE_CXX_FLAGS="-stdlib=libstdc++" \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
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
# Load relevant libraries | |
import numpy as np | |
import numba as nb | |
import matplotlib.pyplot as plt | |
# Goal is to implement a numba compatible polyfit (note does not include error handling) | |
# Define Functions Using Numba | |
# Idea here is to solve ax = b, using least squares, where a represents our coefficients e.g. x**2, x, constants | |
@nb.njit |
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 ( | |
"encoding/binary" | |
"fmt" | |
"os" | |
"os/signal" | |
"time" | |
"github.com/gordonklaus/portaudio" |
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
collective_code_location_message = '\n' | |
def print_dict(dict, verbose=True): | |
#callerframerecord = inspect.stack()[1] # 0 represents this line | |
# # 1 represents line at caller | |
#frame = callerframerecord[0] | |
#info = inspect.getframeinfo(frame) | |
#if info.function == 'print_sql_result': | |
# code_probe('',2) | |
#else: | |
# code_probe('', 1) |
NewerOlder