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 lzma | |
import requests | |
DEFAULT_CREDS = { | |
"url": "http://localhost:8123/", | |
"database": None, | |
"user": None, | |
"password": None, |
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 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 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 argparse | |
import requests | |
def ask(query): | |
headers = { | |
'Accept': '*/*', | |
'Origin': 'https://yandex.ru', | |
'Accept-Language': 'ru', |
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
# /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 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
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 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/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 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 ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
) | |
func main() { |
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
WS: /[ \t\f\r\n]/+ | |
DIGIT: "0".."9" | |
INT: DIGIT+ | |
FLOAT: DIGIT? "." DIGIT+ | |
| DIGIT+ "." | |
int: INT | |
float: FLOAT | |
// simple types |
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 pathlib import Path | |
from urllib.parse import quote | |
index = [] | |
for i in sorted(Path('.').iterdir()): | |
index.append(i) | |
with open('index.html', 'w') as f: | |
f.write('<html><body><center>') |
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 tensorflow.keras import backend as K | |
from tensorflow.keras.layers import Layer | |
class CoordinateChannel2D(Layer): | |
def call(self, inputs): | |
x = K.cast(K.arange(0, K.shape(inputs)[1]), K.floatx()) | |
x /= K.cast(K.shape(inputs)[1], K.floatx()) |