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
services: | |
minio: | |
image: minio/minio | |
command: server /mnt/data | |
volumes: | |
- data:/mnt/data | |
ports: | |
- 9000:9000 | |
- 9001:9001 | |
volumes: |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <cuda.h> | |
#define N 512 | |
// compile with nvcc add_vectors.cu | |
// forward declaration of CUDA kernel | |
__global__ void add_vectors(int* A, int* B, int* C); |
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
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.2.3 | |
volumes: | |
- data:/usr/share/elasticsearch/data | |
environment: | |
- xpack.security.enabled=false | |
- discovery.type=single-node | |
ports: | |
- 9200:9200 |
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
// RocksDB is a Facebook-scale key-value store designed for fast writes to SSD storage. | |
// How fast does this run? | |
#include <cassert> | |
#include <cstdlib> | |
#include <iostream> | |
#include <string> | |
#include <rocksdb/db.h> | |
using namespace std; |
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
from pymongo import MongoClient | |
import random | |
import time | |
mongo_client = MongoClient() | |
query1 = 0 | |
query2 = 0 | |
j = 0 |
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
from pymongo import MongoClient, UpdateOne | |
import random | |
import time | |
mongo_client = MongoClient() | |
# drop old stuff | |
mongo_client['test']['without_index'].drop() | |
mongo_client['test']['with_index'].drop() | |
mongo_client['test']['index'].drop() |
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
from tkinter import * | |
import time | |
root = Tk() | |
def n2color(n): | |
p = 1.1 | |
def f(x): | |
return p**-x | |
color = '' | |
for i in range(1): | |
bit1 = hex(int(255*f(n)))[2:] |
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
for i, p in enumerate(Primes()): | |
for n in range(1, i+1): | |
S = PolynomialRing(GF(p), 'x') | |
f = cyclotomic_polynomial(n) | |
R = QuotientRing(S, f) | |
if not R.is_field(): | |
print(f"GF({p}) / ({f}) is not a field!!") | |
quit() |
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
# iterate over primes | |
for i, p in enumerate(Primes()): | |
# iterate over cyclotomics | |
for n in range(1, i+1): | |
# GF(p) is the finite field of order p | |
S = PolynomialRing(GF(p), 'x') | |
f = cyclotomic_polynomial(n) | |
R = QuotientRing(S, f) | |
assert R.cardinality() == p ** (f.degree()) |
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 <arm_neon.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <stdbool.h> | |
#include <string.h> | |
void rgb_deinterleave_c(uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *rgb, int len_color) { | |
/* | |
* Take the elements of "rgb" and store the individual colors "r", "g", and "b". |