git clone git@github.com:metaplex-foundation/metaplex.git
cd metaplex/rust
cargo build-bpf
solana config set --url localhost
solana-test-validator
#!/usr/bin/env python | |
""" | |
Bundle the site-packages of the current python environment into a zip file | |
If you have any wheels at `$(pwd)/wheels`, those will be used instead of | |
of the locally installed packages. For instance, if my pwd looked like | |
wheels/ | |
|-- numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl |
ENV QT_BASE_DIR=/opt/qt55 | |
ENV QTDIR=$QT_BASE_DIR | |
ENV PATH=$QT_BASE_DIR/bin:$PATH | |
ENV LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH | |
ENV PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH | |
# Reconfigure locale | |
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales | |
# Docker offical ENVIRONMETN REPLACEMENT |
import numpy as np | |
def rgb_to_hex(rgb: np.ndarray) -> str: | |
rgb = rgb.reshape(3) | |
return '#{:02X}{:02X}{:02X}'.format(*rgb) | |
def hex_to_rgb(hex_str: str) -> np.ndarray: | |
hex_str = hex_str.strip() |
To remove a submodule you need to:
validate = (val) -> | |
# boşluk karakterlerini kaldıralım | |
v = val.replace(/\s+/g, '').toUpperCase() | |
# http://tr.wikipedia.org/wiki/Türkiye_il_plaka_kodları adresindeki bilgi kullanılmıştır. | |
regex = /// ^ | |
(0[1-9]|[1-7][0-9]|8[01]) # İl kodu | |
( | |
([A-Z])(\d{4,5}) # "99 X 9999", "99 X 99999" | |
| ([A-Z]{2})(\d{3,4}) # "99 XX 999", "99 XX 9999" |
// Simulate a call to Dropbox or other service that can | |
// return an image as an ArrayBuffer. | |
var xhr = new XMLHttpRequest(); | |
// Use JSFiddle logo as a sample image to avoid complicating | |
// this example with cross-domain issues. | |
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true ); | |
// Ask for the result as an ArrayBuffer. | |
xhr.responseType = "arraybuffer"; |
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |