Hello
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
| #!/usr/bin/env python | |
| import boto | |
| import moto, sys | |
| from moto import mock_s3 | |
| def my_prod_code(bucket): | |
| for k in bucket.list(prefix='foo'): | |
| print k.name, k.get_contents_as_string() |
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
| // Compile with: | |
| // g++ -std=c++11 -O3 -mavx 1.cc && ./a.out | |
| #include <vector> | |
| #include <memory> | |
| #include <cstdint> | |
| using namespace std; | |
| __attribute__ ((noinline)) | |
| void SerializeTo(const vector<uint64_t>& v, uint8_t* dest) { |
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 <sys/mman.h> | |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| /* On 48-bit addressing schemes you can mmap any non-reserved address between | |
| 0 and 0x7FFFFFFFFFFF. You can try to pass 0x7fffffffe000 or 0 when running this program. | |
| */ | |
| int main(int argc, char* argv[]) { |
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 ( | |
| "fmt" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/s3/s3manager" | |
| "os" | |
| "strconv" | |
| "time" |
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
| #!/bin/bash | |
| # run it via | |
| # wget -O - https://gist.githubusercontent.com/romange/a082bef5636f994b63e2239ecff28abc/raw/setup_ws.sh 2> /dev/null \ | |
| # | sudo -E bash - | |
| apt-get update | |
| apt-get -y upgrade | |
| # for Dev prerequisites |
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
| #!/usr/bin/env python3 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import webbrowser | |
| def uniform_bin_filling(N_balls, K_bins): | |
| bins = np.zeros(K_bins, dtype=int) | |
| for i in range(N_balls): | |
| bins[np.random.randint(0, K_bins)] += 1 |
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
| #!/usr/bin/env python3 | |
| import redis,secrets | |
| # Connect to Redis server | |
| r = redis.Redis(host='localhost', port=6379, db=0) | |
| # Initialize variables | |
| total_numbers = 100_000_000 |
OlderNewer