- act2vec, trace2vec, log2vec, model2vec https://link.springer.com/chapter/10.1007/978-3-319-98648-7_18
- apk2vec https://arxiv.org/abs/1809.05693
- app2vec http://paul.rutgers.edu/~qma/research/ma_app2vec.pdf
- author2vec http://dl.acm.org/citation.cfm?id=2889382
- bb2vec https://arxiv.org/abs/1809.09621
- behavior2vec https://dl.acm.org/citation.cfm?id=3184454
- care2vec https://arxiv.org/abs/1812.00715
- cat2vec http://104.155.136.4:3000/forum?id=HyNxRZ9xg
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
#!/bin/bash | |
# Author: Maxwel Leite | |
# Website: http://needforbits.wordpress.com/ | |
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros | |
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007. | |
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas. | |
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today. | |
# Dependencies: wget, fontforge and cabextract | |
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download | |
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic |
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
1. Download 3.7 | |
https://www.python.org/ftp/python/3.7.0/python-3.7.0-amd64.exe | |
Assuming that you will install Python 3.7 into C:/Python37 and allow Python installer to add python.exe into Windows's PATH environment variable. | |
2. Upgrade Python's pip | |
python -m pip install --upgrade pip |
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 errno | |
import os | |
import paramiko | |
class Uploader(object): | |
def __init__(self, host, basepath='', username=None, password=None, keyfile=None, *args, **kwargs): | |
self.host = host | |
self.basepath = basepath | |
self.username = username |
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
from flask import request, g | |
from functools import wraps | |
def login_required(f=None, url="public.login", next=None): | |
""" | |
Check if user is logged or redirect to a certain page. | |
By default go to public login. | |
""" | |
def outer_decorator(decorated_fn): |
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 java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.StandardSocketOptions; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.CancelledKeyException; | |
import java.nio.channels.ReadableByteChannel; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; |
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
./amdgpu-pro-install --opencl=legacy,pal | |
sudo apt list --installed | grep icd | |
WARNING: apt does not have a stable CLI interface. Use with caution in scripts. | |
ocl-icd-libopencl1/bionic,now 2.2.11-1ubuntu1 amd64 [installed,automatic] | |
opencl-amdgpu-pro-icd/unknown,now 18.50-708488 amd64 [installed] | |
opencl-orca-amdgpu-pro-icd/unknown,now 18.50-708488 amd64 [installed] |
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
sudo apt install -y gcc make perl git | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt update -y | |
sudo apt install -y g++-7 libboost-all-dev libssl-dev -y | |
sudo apt -y autoremove | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 | |
sudo update-alternatives --config gcc | |
sudo wget "https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh" | |
sudo sh cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/usr |
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
apt-get --no-install-recommends --yes install clang libclang-dev llvm-dev libncurses5 libncursesw5 cmake git | |
ubuntu-drivers devices | |
sudo apt-get purge nvidia* | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt update | |
sudo apt install nvidia-390 | |
lsmod | grep nvidia | |
nvidia-smi | |
sudo apt install nvidia-cuda-toolkit |
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
https://blog.aeternity.com/q-a-at-reddit-with-john-tromp-inventor-of-the-cuckoo-cycle-mining-algorithm-c316119c07e9 | |
Trong Cuckoo Cycle, chứng cứ xử lý có dạng một chu trình 42 cạnh (khép kín) nằm trong 1 đồ thị lớn ngẫu nhiên hình thành trên một vài con số dùng một lần (nonce) nào đó. Thử tưởng tượng 2 quốc gia, mỗi quốc gia có 1 tỉ thành phố, và thử tưởng tượng chọn 1 tỉ con đường chạy cắt qua biên giới kết nối 1 thành phố ngẫu nhiên ở một quốc gia này với 1 thành phố ngẫu nhiên của một quốc gia khác (PoW này thật ra là dùng một hàm băm không dùng nhiều tài nguyên để ánh xạ 1 con số dùng một lần, số của con đường, và quốc gia đến một thành phố). Câu hỏi ở đây là liệu có tồn tại 1 chu trình gồm 42 con đường kết nối 42 thành phố khác nhau hay không. Nếu một ai đó trao cho bạn một con số dùng một lần và con số của 42 con đường thì bạn sẽ thấy là cực kì dễ kiểm chứng (verify) trong thời gian và bộ nhớ rất nhỏ. Nhưng để tìm ra được 1 chu trình như vậy thì lại không hề là một bài toán dễ giải. Tuy nhiên lưu ý ở đ |