Skip to content

Instantly share code, notes, and snippets.

View axegon's full-sized avatar
🐺
Now true humor begins when a man ceases to take himself seriously.

Alex axegon

🐺
Now true humor begins when a man ceases to take himself seriously.
View GitHub Profile
deb http://deb.debian.org/debian trixie main contrib non-free-firmware
deb-src http://deb.debian.org/debian trixie main contrib non-free-firmware
deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware
deb-src http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware
deb http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
deb-src http://deb.debian.org/debian trixie-updates main contrib non-free-firmware
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
with open('samples.bin', 'rb') as f:
raw_data = np.fromfile(f, dtype=np.uint8)
iq_data = raw_data.astype(np.float32) - 127.5
iq_data /= 127.5
i_data = iq_data[0::2]
{
"0": [
"n01440764",
"tench"
],
"1": [
"n01443537",
"goldfish"
],
"2": [
@axegon
axegon / README.md
Last active March 12, 2020 23:51
Fetching data from https://github.com/CSSEGISandData/COVID-19 into JSON files.

SETUP

Use a virtualenv if possible.

  1. Install the requirements: pip install -r requirements.txt
  2. Set the two environmental variables GHTOKEN and BLEEPBLOOP:
GHTOKEN = https://github.com/settings/tokens
BLEEPBLOOP = WHATEVER_YOU_WANT,_USED_FOR_SALT
>>> import string
>>> string.letters
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>> help(string)
>>> string.letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
>>> reload(string)
<module 'string' from '/usr/lib64/python2.7/string.pyc'>
>>> string.letters
Module Status New Location Compatibility Module Documentation
tf.AUTO_REUSE Removed tf.compat.v1.AUTO_REUSE N/A
tf.AttrValue Removed tf.compat.v1.AttrValue https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/AttrValue
tf.COMPILER_VERSION Removed tf.compat.v1.COMPILER_VERSION N/A
tf.CXX11_ABI_FLAG Removed tf.compat.v1.CXX11_ABI_FLAG N/A
tf.ConditionalAccumulator Removed tf.compat.v1.ConditionalAccumulator https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/ConditionalAccumulator
tf.ConditionalAccumulatorBase Removed tf.compat.v1.ConditionalAccumulatorBase https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/ConditionalAccumulatorBase
tf.ConfigProto Removed tf.compat.v1.ConfigProto https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/ConfigProto
tf.DeviceSpec Removed tf.compat.v1.DeviceSpec https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/DeviceSpec
tf.Dimension Removed tf.compat.v1.Dimension https://www.tensorflow.org/versions/r1.12/api_docs/python/tf/Dime
import tensorflow as tf
import numpy as np
splits = [1, 4, 4, 7, 8, 8]
x = tf.RaggedTensor.from_row_splits(values=np.random.choice(20,10).tolist(), row_splits=splits)
y = tf.RaggedTensor.from_row_splits(values=np.random.choice(20,10).tolist(), row_splits=splits)
print((x+y).to_list())
import numpy as np
import tensorflow as tf
 
np.random.seed(42)
 
x = tf.constant(np.random.rand(3,3))
y = tf.constant(np.random.rand(3,3))
@tf.function
def matmul(x, y):
import numpy as np
import tensorflow as tf
 
np.random.seed(42)
 
x = tf.constant(np.random.rand(3,3))
y = tf.constant(np.random.rand(3,3))
result = tf.matmul(x, y)
tf.global_variables_initializer()