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
| import pandas as pd | |
| ### Data import ### | |
| # https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.html | |
| df = pd.read_csv("file.csv") | |
| ### Data types ### |
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
| -- Syntax order | |
| -- https://learn.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql | |
| WITH cte AS (cte_query) | |
| SELECT cols | |
| FROM table | |
| WHERE cond | |
| GROUP BY col | |
| HAVING cond | |
| WINDOW window_expr |
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
| # push to new github repo | |
| git remote add origin git@github.com:jxu/repo.git # use set-url if already set | |
| git push -u origin master | |
| # check out a remote branch | |
| git fetch | |
| git branch -v -a # list all branches | |
| git switch branchname | |
| # change remote a branch is tracking |
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
| " Custom vim config with my comments | |
| " (mostly from the ultimate Vim config amix/vimrc) | |
| " => General | |
| set nocompatible " Disable compatibility mode | |
| set history=1000 " Save more commands | |
| set autoread " Read file when changed externally | |
| set autowrite " Autosave before commands like :make | |
| set noswapfile " No more .swp! |
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
| H | |
| He | |
| Li | |
| Be | |
| B | |
| C | |
| N | |
| O | |
| F | |
| Ne |
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
| #!/bin/env python3 | |
| # Trying to automate android backups but fed up with bash :( | |
| # TODO: Nicer mode selection? | |
| import os | |
| import subprocess | |
| import sys | |
| SD_DIR = "sdcard1" |
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
| # requires xq with --raw output support (https://github.com/boyska/xq fork) | |
| xq -r '//item/enclosure/@url' Podcast.ashx | wget -i - |
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
| -- Just add this to the end of the control.lua file in the save file and then replay the file | |
| script.on_nth_tick(1800, function(event) | |
| game.take_screenshot{ | |
| surface = game.surfaces[1], | |
| position = {0,0}, | |
| resolution = {3840,2160}, | |
| zoom = 0.2, | |
| path = "timelapse/" .. string.format("%06d", event.tick/event.nth_tick) .. ".jpg", | |
| quality = 95, |
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
| *://www.tutorialspoint.com/* | |
| *://www.geeksforgeeks.org/* | |
| *://www.w3schools.com/* | |
| *://www.programiz.com/* | |
| *://www.techonthenet.com/* | |
| *://fresh2refresh.com/* | |
| *://www.quora.com/* | |
| *://www.researchgate.net/* | |
| *://www.w3resource.com/* | |
| *://www.improgrammer.net/* |