Skip to content

Instantly share code, notes, and snippets.

View vitor-alves's full-sized avatar
😁

Vitor Alves vitor-alves

😁
View GitHub Profile
@hiropppe
hiropppe / pandas_SQL_analytic_and_aggregate_functions_like_operation_sample.py
Last active March 19, 2021 13:07
Pandas で count( * ) over ( partition by ... 的な結果がしたかった
In [1]: import pandas as pd
...:
...: data = {'m': ['m1','m2','m2','m3','m3','m3','m4','m4','m4','m4'],
...: 'e': ['e1','e2','e3','e4','e5','e6','e7','e1','e2','e8'],
...: 'p': [0.9, 0.2, 0.8, 0.7, 0.1, 0.2, 0.3, 0.1, 0.2, 0.4]}
...: df = pd.DataFrame(data)
...: df
...:
Out[1]:
e m p
@ConstantineLignos
ConstantineLignos / openblas_ubuntu_compilation.txt
Last active March 22, 2021 00:43
Set up OpenBLAS with NO_AFFINITY=1 to make it most useful for applications such as R.
1. Check out OpenBlas from https://github.com/xianyi/OpenBLAS and check out the master branch.
2. Build and install to /opt:
a.) Multi-threaded:
make NO_AFFINITY=1
b.) Single-threaded:
sudo make PREFIX=/opt install
3. Configure it as your BLAS of choice:
sudo update-alternatives --install /usr/lib/libblas.so.3gf libblas.so.3gf /opt/lib/libopenblas.so.0 50
4. Check the configuration to make sure it's selected
update-alternatives --config libblas.so.3gf