mysql --comments --host 127.0.0.1 --port 4000 -u root -e "select tidb_version()\G"
This file contains hidden or 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
| import gzip | |
| def gzip_search(query: str, candidate_chunks: list[str], top_k: int=1): | |
| """ | |
| 文字列ベースで類似したテキストチャンクを推定するアルゴリズム. | |
| `query`, `chunk`, および`query + " " + chunk`をそれぞれgzipで圧縮し、編集距離のようなものをベースに評価する. | |
| Parameters: | |
| query (str): 検索クエリとして使用する文字列. | |
| top_k (int, optional): 返される類似チャンクの上位k個を指定する (default: 1). |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
|---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
This file contains hidden or 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
| -Xms128m | |
| -Xmx8182m | |
| -XX:ReservedCodeCacheSize=512m | |
| -XX:CICompilerCount=2 | |
| -XX:+HeapDumpOnOutOfMemoryError | |
| -XX:-OmitStackTraceInFastThrow | |
| -XX:+UnlockExperimentalVMOptions -XX:+UseZGC | |
| -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 | |
| -XX:+UnlockDiagnosticVMOptions -XX:-ZProactive | |
| -ea |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
This file contains hidden or 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
| //! AST vs RPN evaluation performance in Rust language. | |
| #![feature(test)] | |
| extern crate test; | |
| #[derive(Clone, Copy, Debug)] | |
| pub enum Function { | |
| Plus, | |
| Minus, |
This file contains hidden or 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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include "webp/encode.h" | |
| #include "./metadata.h" | |
| int WebPMemoryWrite(const uint8_t *data, size_t data_size, | |
| WebPMemoryWriter *const w) | |
| { |
This file contains hidden or 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
| # Installing ScyllaDB in AWS with DPDK enabled | |
| # Prerequisites: | |
| # - Red Hat Enterprise Linux 7.2 (HVM) | |
| # - Instance type that supports enhanced networking (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced_networking_instance_types) | |
| # - Secondary NIC installed via Network Interfaces in AWS | |
| # - Instance type with 2 hard drives for RAID0 array | |
| ########## DO THIS FIRST ################ | |
| # Fetch the latest linux kernel | |
| yum update -y |
This file contains hidden or 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 <stdio.h> | |
| #include <unistd.h> | |
| int main(int argc, char **argv) | |
| { | |
| printf("--beginning of program\n"); | |
| int counter = 0; | |
| pid_t pid = fork(); |
This file contains hidden or 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 ( | |
| "reflect" | |
| "strings" | |
| ) | |
| func makeChannel(t reflect.Type, chanDir reflect.ChanDir, buffer int) reflect.Value { | |
| ctype := reflect.ChanOf(chanDir, t) | |
| return reflect.MakeChan(ctype, buffer) |
NewerOlder