MacBook Air (M1, 2020)
$ /opt/homebrew/bin/python3 -c 'import platform; print(platform.platform())'
macOS-11.4-arm64-arm-64bit| FROM ubuntu:22.04 | |
| RUN apt-get update && apt-get install -y libaio1 wget unzip | |
| WORKDIR /opt/oracle | |
| RUN wget https://download.oracle.com/otn_software/linux/instantclient/1927000/instantclient-basic-linux.x64-19.27.0.0.0dbru.zip && wget https://download.oracle.com/otn_software/linux/instantclient/1927000/instantclient-sqlplus-linux.x64-19.27.0.0.0dbru.zip | |
| RUN unzip instantclient-basic-linux.x64-19.27.0.0.0dbru.zip && unzip -o instantclient-sqlplus-linux.x64-19.27.0.0.0dbru.zip | |
| RUN sh -c "echo /opt/oracle/instantclient_19_27 > /etc/ld.so.conf.d/oracle-instantclient.conf" && ldconfig | |
| ENV LD_LIBRARY_PATH=/opt/oracle/instantclient_19_27:$LD_LIBRARY_PATH | |
| ENV PATH=/opt/oracle/instantclient_19_27:$PATH |
| # Eternal bash history. | |
| # --------------------- | |
| # Undocumented feature which sets the size to "unlimited". | |
| # http://stackoverflow.com/questions/9457233/unlimited-bash-history | |
| export HISTFILESIZE= | |
| export HISTSIZE= | |
| export HISTTIMEFORMAT="[%F %T] " | |
| # Change the file location because certain bash sessions truncate .bash_history file upon close. | |
| # http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login | |
| export HISTFILE=~/.bash_eternal_history |
| //============================================================== | |
| // Copyright © 2022 Intel Corporation | |
| // | |
| // SPDX-License-Identifier: MIT | |
| // ============================================================= | |
| #include <iostream> | |
| #include <sycl/sycl.hpp> | |
| #include <chrono> |
| set -g mouse on | |
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix |
| import torch | |
| import time | |
| import numpy as np | |
| from torch import mps, cuda | |
| num_trails = 10 | |
| def flops_benchmark(device): | |
| test_range = 2 ** np.arange(8, 13, 0.25) |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash arch -x86_64 zshnvm install --lts| """Convert jupyter notebook to sphinx gallery notebook styled examples. | |
| Usage: python ipynb_to_gallery.py <notebook.ipynb> | |
| Dependencies: | |
| pypandoc: install using `pip install pypandoc` | |
| """ | |
| import pypandoc as pdoc | |
| import json |
| import numpy as np | |
| from scipy.ndimage.interpolation import map_coordinates | |
| from scipy.ndimage.filters import gaussian_filter | |
| def elastic_transform(image, alpha, sigma, random_state=None): | |
| """Elastic deformation of images as described in [Simard2003]_. | |
| .. [Simard2003] Simard, Steinkraus and Platt, "Best Practices for | |
| Convolutional Neural Networks applied to Visual Document Analysis", in |
| require 'image' | |
| function ElasticTransform(img, alpha, sigma) | |
| --[[ | |
| Parameters | |
| ---------- | |
| img: Tensor of size KxHxW | |
| Image on which elastic transformation have to be applied | |
| alpha: number | |
| Intensity of the transformation |