This file contains hidden or 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
# Copyright (c) Meta Platforms, Inc. and affiliates. | |
# This software may be used and distributed according to the terms of the GNU General Public License version 3. | |
from typing import Tuple | |
import os | |
import sys | |
import torch | |
import fire | |
import time | |
import json |
This file contains hidden or 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
# script to decompose/recompose llama model in different number of shards | |
# note that it loads the full model * 2 in cpu memory | |
import os | |
import json | |
import sys | |
import torch | |
import glob | |
if len(sys.argv) != 4: |
This file contains hidden or 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
# Remove ads for `https://github.com/Fndroid/clash_for_windows_pkg` | |
# Compatible versions: 0.19.0, 0.19.22, 0.19.21, 0.20.0 ~ 0.20.17 | |
# sudo npm install -g asar --unsafe-perm=true --allow-root | |
# mkdir ~/clash4win | |
# asar extract app.asar . | |
# Replace some keywords in `renderer.js` file. |
This file contains hidden or 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
conda install -c conda-forge ta-lib |
This file contains hidden or 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
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=$(supervisord_dir)/supervisord -c /etc/supervisord.conf | |
ExecReload=$(supervisord_dir)/supervisorctl reload | |
ExecStop=$(supervisord_dir)/supervisorctl shutdown |
This file contains hidden or 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
''' | |
A python script which starts celery worker and auto reload it when any code change happens. | |
I did this because Celery worker's "--autoreload" option seems not working for a lot of people. | |
''' | |
import time | |
from watchdog.observers import Observer ##pip install watchdog | |
from watchdog.events import PatternMatchingEventHandler | |
import psutil ##pip install psutil | |
import os |
This file contains hidden or 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
# impala odbc with tableau | |
[impala odbc with tableau](https://www.cloudera.com/documentation/enterprise/latest/topics/impala_odbc.html) | |
To illustrate the outline of the setup process, here is a transcript of a session to set up all required drivers and a business intelligence application that uses the ODBC driver, under Mac OS X. Each .dmg file runs a GUI-based installer, first for the underlying IODBC driver needed for non-Windows systems, then for the Cloudera ODBC Connector, and finally for the BI tool itself. | |
``` | |
$ ls -1 | |
Cloudera-ODBC-Driver-for-Impala-Install-Guide.pdf | |
BI_Tool_Installer.dmg |
This file contains hidden or 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
### 安装Tabcmd on Linux | |
* 在 Windows机器上找到 `C:\Program Files\Tableau\Tableau Server\{version}\extras\TabcmdInstaller-x64.exe` | |
* 安装 `TabcmdInstaller-x64.exe` | |
* 在Linux 机器上, mkdir -p ~/tabcmd/lib ~/tabcmd/logs ~/tabcmd/reports | |
* 复制 `C:\Program Files\Tableau\Tableau Server\{version}\lib\*` 到 Linux机器的 ~/tabcmd/lib 目录 | |
* In the tabcmd directory, 创建脚本 tabcmd.sh. 如下: | |
``` | |
#!/usr/bin/env bash |
This file contains hidden or 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
## 安装Tableau 开发库 | |
### 安装 [Tableau tools](https://github.com/bryantbhowell/tableau_tools) | |
* pip install tableau_tools | |
### 安装Tabcmd on Linux | |
* 在 Windows机器上找到 `C:\Program Files\Tableau\Tableau Server\{version}\extras\TabcmdInstaller-x64.exe` | |
* 安装 `TabcmdInstaller-x64.exe` | |
* 在Linux 机器上, mkdir -p ~/tabcmd/lib ~/tabcmd/logs ~/tabcmd/reports | |
* 复制 `C:\Program Files\Tableau\Tableau Server\{version}\lib\*` 到 Linux机器的 ~/tabcmd/lib 目录 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder