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
import mmap | |
from PIL import Image | |
import numpy as np | |
size = 32 * 32 * 4 | |
f = open('f.bin', 'w+b') | |
f.truncate(size) | |
mm = mmap.mmap(f.fileno(), size) |
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
provider "aws" {} | |
# Add a provider for the new member account | |
provider "aws" { | |
alias = "member_account" | |
assume_role { | |
role_arn = "arn:aws:iam::${aws_organizations_account.member_account.id}:role/${var.member_account_role_name}" | |
} | |
} |
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::ops::Add; | |
struct CumSum<T, I> { | |
acc: Option<T>, | |
iter: I, | |
} | |
impl<T, I> Iterator for CumSum<T, I> | |
where | |
T: Add<Output = T> + Copy, |
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
import lzma | |
import requests | |
DEFAULT_CREDS = { | |
"url": "http://localhost:8123/", | |
"database": None, | |
"user": None, | |
"password": None, |
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
import threading | |
import logging | |
from numpy.fft import fft, ifft | |
import numpy as np | |
import jack | |
def denoice(left, right): | |
fft_l = fft(left) |
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
import argparse | |
import requests | |
def ask(query): | |
headers = { | |
'Accept': '*/*', | |
'Origin': 'https://yandex.ru', | |
'Accept-Language': 'ru', |
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
# /etc/nginx/conf.d/conda.conf | |
proxy_cache_path /var/cache/nginx/conda levels=2:2 keys_zone=conda:100m inactive=14d max_size=10g; | |
upstream conda.anaconda.org { | |
server 104.17.92.24:443; | |
server 104.17.93.24:443; | |
} | |
server { | |
listen 80; |
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/python/pyspark/cloudpickle.py b/python/pyspark/cloudpickle.py | |
index 88519d7311..f7ab821b97 100644 | |
--- a/python/pyspark/cloudpickle.py | |
+++ b/python/pyspark/cloudpickle.py | |
@@ -72,77 +72,16 @@ else: | |
PY3 = True | |
-def _make_cell_set_template_code(): | |
- """Get the Python compiler to emit LOAD_FAST(arg); STORE_DEREF |
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
#!/usr/bin/chronic /bin/bash | |
set -e | |
set -x | |
[ -n "`nmcli c show --active | grep -f /etc/fetch-allowed-wifi-networks`" ] || exit 0 | |
pacman -S --refresh --sysupgrade --downloadonly --noconfirm | |
grep KeepCurrent /etc/pacman.conf && pacman -S --clean --noconfirm |
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/json" | |
"fmt" | |
"log" | |
"os" | |
) | |
func main() { |