Using VSCODE

Overall VScode is good but there seems to be some things I continually have to look up but are trivially easy. I’d like to write a more robust blog 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 things, VS Code seems like theres more ideal setups.

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 a tasks that is something like:

{
    // 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
            }
        }
    ]
}

suffices for me to start. I continually forget that I need to use ${python.pythonPath} and isDefault, so I’ll 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+reloaded+other 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 just deleted

domain DNS/TXT

in domain advanced dns settings, only requires:

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

transferring resume to latex