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
#!/usr/bin/env python3 | |
""" | |
Use the speedtest-cli package to perform a test of internet speeds, and log the | |
result to file. The results are broken up by month and stored in a folder named | |
`speed_tests`, unless you supply an alternate path in the first command line | |
argument. | |
``` | |
python3 speed_testing.py /var/logs/my_speed_folder | |
``` |
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
# from https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1508146 | |
sudo kbd_mode -s |
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
### Keybase proof | |
I hereby claim: | |
* I am mikuana on github. | |
* I am mikuana (https://keybase.io/mikuana) on keybase. | |
* I have a public key ASCWi6rkC2M0FUAm7D9Jx0KL_RLwFN0dSm7qbY3uwJs6mAo | |
To claim this, I am signing this object: |
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
jdbc:teradata://{host::localhost}/[\?<&,user={user},password={password},database={database}>] |
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
# Shamlessly stolen from: | |
# https://www.r-bloggers.com/how-to-remove-all-user-installed-packages-in-r/ | |
# create a list of all installed packages | |
ip <- as.data.frame(installed.packages()) | |
head(ip) | |
# if you use MRO, make sure that no packages in this library will be removed | |
ip <- subset(ip, !grepl("MRO", ip$LibPath)) | |
# we don't want to remove base or recommended packages either\ | |
ip <- ip[!(ip[,"Priority"] %in% c("base", "recommended")),] |
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
DECLARE | |
@cal_start DATE | |
, @cal_end DATE | |
, @n INT | |
; | |
SELECT | |
@cal_start = '1970-01-01' | |
, @cal_end = '2030-12-31' | |
, @n = DATEDIFF(DAY, @cal_start, @cal_end) |
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
SELECT | |
dept_id AS dept_id | |
, 1 AS hours_id | |
, hours1 AS hours | |
FROM | |
hours_table t | |
WHERE | |
hours1 IS NOT NULL | |
UNION ALL |
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
%YAML 1.2 | |
--- | |
# To enable the syntax in Sublime Text, you must save this as a file under `%APPDATA%\Sublime Text 3\Packages\User\teradata-sql.sublime-syntax` | |
# Script was copied from the standard SQL syntax included in Sublime Text 3, then modified to suit. | |
name: Teradata SQL | |
file_extensions: | |
- sql | |
scope: source.sql | |
contexts: | |
main: |
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 | |
def print_full(x): | |
pd.set_option('display.max_rows', len(x)) | |
print(x) | |
pd.reset_option('display.max_rows') |
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
Option Compare Database | |
Public Sub ExportAll() | |
Dim obj As AccessObject, dbs As Object | |
Set dbs = Application.CurrentData | |
For Each obj In dbs.AllTables | |
If Left(obj.Name, 4) <> "MSys" Then | |
DoCmd.TransferText acExportDelim, , obj.Name, obj.Name & ".csv", True | |
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, obj.Name, obj.Name & ".xls", True | |
End If | |
Next obj |