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 bash | |
| # import an MS SQL .bak backup file to an MS SQL database, then export all | |
| # tables to csv. run this script as `import.sh <filename>`. It expects to be | |
| # run in the same directory as the backup file. | |
| # this is only tested on my mac (OS X Catalina). I tried to stick to posix, but | |
| # It will probably require some tweaking for you. I hope it gives a general | |
| # sense of what you need to do at the very least. |
We can't make this file beautiful and searchable because it's too large.
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
| StartDate,EndDate,Progress,BirthYear,Sex,Country,Country3,CompleteMarathons,YearsExp,TargetPace,FastPace,TrainDist,WeeksTrain,LongTrainRuns,LastTimeHrs,LastTimeMins,LastTimeSecs,FirstHalfHrs,FirstHalfMins,FirstHalfSecs,Ambition1,Ambition2,Ambition3,Ambition4,Ambition5,Dospert1,Dospert2,Dospert3,Dospert4,Dospert5,Dospert6,Dospert7,Dospert8,Dospert9,Dospert10,Dospert11,Dospert12,Suffer1,Suffer2,Suffer3,Suffer4,Suffer5,Suffer6,Suffer7,Suffer8,Goal1,Goal2,Goal3,Comp1,Comp2,Comp3,LastTime,FirstHalfTime,SecondHalfTime,Pace1,AmbitionTotal,AmbitionTotal3,DospertTotal,SufferTotal,SufferTotal16,CompetitionTotal,GoalTotal,TargetPaceQ,FastPaceQ,TrainDistQ,WeeksTrainQ,LongTrainRunsQ,CompleteMarathonsQ,YearsExpQ,LastTimeadj,Age | |
| 4/19/16 21:49,4/19/16 21:50,100,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,30,NA,NA,30,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA | |
| 4/19/16 21:50,4/19/16 22:04,100,1972,Male,United States of Ameri |
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 bash | |
| set -x | |
| GODEBUG=gctrace=1 etl -data_dir=etl/data -skip_aws & | |
| ETL_PID=$! | |
| function finish { | |
| kill -9 $ETL_PID | |
| } | |
| trap finish EXIT |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 bash | |
| # many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos | |
| # many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac | |
| # instructions on finding the default you've changed: https://pawelgrzybek.com/change-macos-user-preferences-via-command-line/ | |
| # previous install notes at: | |
| # https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3 | |
| # https://gist.github.com/llimllib/e864a92da94ceb1ef0da2e06fd1f8d70 | |
| fancy_echo() { | |
| local fmt="$1"; shift |
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 base64 | |
| import os | |
| import sys | |
| from urllib.parse import urlencode | |
| from webbrowser import open as open_url | |
| import requests | |
| SPOTIFY_OAUTH_URL = "https://accounts.spotify.com/authorize" | |
| SPOTIFY_TOKEN_URL = "https://accounts.spotify.com/api/token" |
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
| def b(integral): | |
| res = [] | |
| while integral > 0: | |
| integral, mod = divmod(integral, 2) | |
| res.insert(0, "1" if mod else "0") | |
| return "".join(res) |
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 numba import jit | |
| @jit | |
| def run(cmds): | |
| location = 0 | |
| counter = 0 | |
| l = len(cmds) | |
| while 1: | |
| cmd = cmds[location] | |
| if cmd >= 3: |
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
| def run(cmds): | |
| location = 0 | |
| counter = 0 | |
| while 1: | |
| try: | |
| cmd = cmds[location] | |
| if cmd >= 3: | |
| cmds[location] -= 1 | |
| else: | |
| cmds[location] += 1 |
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
| # many settings from https://raw.githubusercontent.com/mathiasbynens/dotfiles/master/.macos | |
| # many settings from https://raw.githubusercontent.com/thoughtbot/laptop/master/mac | |
| # my previous install notes at https://gist.github.com/llimllib/ee591266e05bd880629a4e7511a61bb3 | |
| fancy_echo() { | |
| local fmt="$1"; shift | |
| # shellcheck disable=SC2059 | |
| printf "\n$fmt\n" "$@" | |
| } |