Using VSCODE

Overall VScode is good but there seems to be some things I continually have to look up but are actually very straightforward. I’d like to write a more robust post but right now I’d rather just collect notes. I also already kind of have something like this setup at TIL but thats more for one off bits.

starting a non serious project I dont use any frameworks and don’t use any specific toolings. For VSCode you can autogenerate a tasks.json if you are doing something related to the few tools they have otherwise it seem’s like you are kind of on your own. Theres no real good python/golang/ML config setup off the bat, but it seems like there could be. For instance, with python have a tasks.json that is:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "run file",
            "type": "shell",
            "command": "${config:python.pythonPath} ${file}",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

I continually forget to use ${python.pythonPath} and isDefault, so will look into that later to see if you can add defaults or extra options.

At one point I had written a pretty elaborate tasks.json that built+hotreloaded for a latex file but I found it too much of a task. It was similar to what the great extension LatexWorkshop does but more useful for me and allowed me to use my own commands to build pdf as I was interested in using a templating system that wouldn’t have worked with LatexWorkshop.


useless sites i started and had something on at one point

note: none of these are actually my sites anymore, were free domains i previously had used



trivial python notes

I have no idea how relevant these are anymore

installing xgboost on python3

xgboost doesn’t install through pip for python3 by default. i always seem to forget this, and have no interest in using graphlab create properties (and a lot of kaggle scripts are written explicitly with xgboost in mind) and i try to keep it isolated to virtualenv’s so i sometimes forget what the process is

the best way to install is create virtualenv and project folder:

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
bash build.sh
cd python-package
pip3 install -e .

using pandas to change object feature columns to numerical category columns

useful for multiple reasons (i.e. save visual space when viewing, lots of category data is indecipherable, MOSTLY for using sklearn features and not having to dummy variables which can get extremely computationally expensive)

another reason why cat is better than object dtypes for pandas

import pandas as pd

df = pd.read_csv() # or whatever
for x in df.dtypes[df.dtypes == 'object'].index:
    df[x] = (df[x].astype('category')).cat.codes


go guide

All of this was useless/outdated when (wrote in 2014 or something, its almost 2018 now), so deleted

domain DNS/TXT

in domain advanced dns settings, only requires:

- A @ (gitlab IP)
- TXT @ gitlab-pages-verification-code=