This file contains 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
// This script is used to change the DataflowID & WorkspaceID on all partitions in the model | |
var oldWorkspaceId = ""; | |
var newWorkspaceId = ""; | |
var oldDataflowId = ""; | |
var newDataflowId = ""; | |
// Loop through all partitions on the model, replacing the DataflowIDs & WorkspaceIDs | |
foreach(var p in Model.AllPartitions.OfType<MPartition>()) | |
{ |
This file contains 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
{ | |
"version": "0.0.3", | |
"name": "Copy Server:Port", | |
"description": "Copies the currently connected Sever name and Port number from Desktop onto your clipboard. Format of the copied connection string is of 'server:port'.", | |
"path": "C:\\windows\\System32\\mshta.exe", | |
"arguments": "vbscript:Execute(\"CreateObject(\"\"Wscript.Shell\"\").Run \"\"powershell.exe -NoLogo -Command \"\"\"\"& {'%server%' | Set-Clipboard}\"\"\"\"\"\", 0 : window.close\")", | |
"iconData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAD7CAYAAABOrvnfAAAACXBIWXMAAAsSAAALEgHS3X78AAAKXUlEQVR4nO3dT2iUdx7H8W8yMaOJJkYIKESqCB50aVZv20vFXPS04kGPWoh71aXeHtotXeZWqJ4N1KuFbd2THoq6F10QrIXqoSDTrgG7BI07NtHJv1l+j5mlXf8+kzwz39/zeb9A8BL9ZWbe8zy/md/z/LoajYYB0NDN8wzoIHhACMEDQggeEELwgBCCB4T0ZP1VkyT5hBcI2uxapVK5xoO+cpm/h0+ShC/u0Ql/rlQqZ3jkV4ZTesTi8yRJzvNsrQxHeMTmOzPbV6lUHvPMZccRHrEZNbMfkyT5Pc9cdgSPGA2a2bdJkhzn2cuG4BGzL5jXZ8McHkXwDzM7xLz+zTjCowjeN7PbzOvfjOBRFO+EBTrM61+P4FEkg8vzehbovAJzeBTV383sOPP638o9+P3797c8OBTfrVu37PHj3Jr8bjn627yUnst88U |
This file contains 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
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(` | |
[Security.Principal.WindowsBuiltInRole] "Administrator")) { ` | |
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" ` | |
-Verb RunAs; exit } | |
# SSMS 2016 | |
# powershell -Command "(Get-Content 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef') -Replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ssms.pkgundef'" | |
# SSMS 17 | |
# powershell -Command "(Get-Content 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef') -Replace '\[\`$RootKey\`$\\Themes\\{1ded0138-47ce-435e-84ef-9ec1f439b749}\]', '//[`$RootKey`$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]' | Out-File 'C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn |
This file contains 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
PowerShell -Command "$($wshell = New-Object -ComObject wscript.shell; $wshell.AppActivate('Power BI Desktop') | Out-Null);" |
This file contains 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
// Reference for updates: https://gist.github.com/NicolaiSoeborg/df8fd374e94cbadedb0902858c1354c2 | |
javascript: (function () { | |
function c() { | |
var e = document.createElement("link"); | |
e.setAttribute("type", "text/css"); | |
e.setAttribute("rel", "stylesheet"); | |
e.setAttribute("href", f); | |
e.setAttribute("class", l); | |
document.body.appendChild(e) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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/bash | |
# Tar and compress files using tqdm or pv for a progress bar. | |
# * Safety | |
# NOTE: These are disabled by default in this template but should be | |
# enabled when feasible. Documentation is from the Bash man page. | |
# ** errexit |
This file contains 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
#shamelessly copied from here https://discuss.pytorch.org/t/utility-function-for-calculating-the-shape-of-a-conv-output/11173/7 | |
# original docs at https://pytorch.org/docs/master/nn.html#conv2d | |
import math | |
def num2tuple(num): | |
return num if isinstance(num, tuple) else (num, num) | |
def conv2d_output_shape(h_w, kernel_size=1, stride=1, pad=0, dilation=1): | |
h_w, kernel_size, stride, pad, dilation = num2tuple(h_w), \ |
This file contains 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/bash | |
git pull | |
echo "Backup this repo to GitHub Arctic Code Vault" > ice_ice_baby.md | |
git add . | |
git commit -m "arctic code vault commit" | |
git push origin master |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.