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
// ==UserScript== | |
// @name xkcd display alt text | |
// @namespace http://www.xkcd.com/themiwi | |
// @include https://xkcd.com/* | |
// @version 1 | |
// @grant none | |
// @require https://code.jquery.com/jquery-3.2.1.slim.min.js | |
// ==/UserScript== | |
(function () { | |
var img = $('#comic > img'); |
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 bs4 import BeautifulSoup, Tag | |
class Attribute(object): | |
def __init__(self, attrname, attrvalue): | |
'Initializes a new attribute.' | |
self._attrname = attrname | |
self._attrvalue = attrvalue | |
@property | |
def name(self): |
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
# enable windows store again overriding group policy | |
# TODO does not work properly... | |
reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v DoNotConnectToWindowsUpdateInternetLocations /d 0 /t REG_DWORD /f | |
reg add HKLM\SOFTWARE\Policies\Microsoft\WindowsStore /v RemoveWindowsStore /d 0 /t REG_DWORD /f | |
reg add HKLM\SOFTWARE\Policies\Microsoft\WindowsStore /v RequirePrivateStoreOnly /d 0 /t REG_DWORD /f |
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
(fileContents) => let | |
Source = Xml.Tables(fileContents), | |
Table = Source{2}[Table]{0}[Table], | |
#"Expanded Table" = Table.ExpandTableColumn(Table, "Table", {"Cell"}, {"Table.Cell"}), | |
#"Added Index" = Table.AddIndexColumn(#"Expanded Table", "Index", 0, 1), | |
#"Expanded Table.Cell" = Table.ExpandTableColumn(#"Added Index", "Table.Cell", {"Data"}, {"Data"}), | |
#"Expanded Data" = Table.ExpandTableColumn(#"Expanded Table.Cell", "Data", {"Element:Text"}, {"Element:Text"}), | |
#"Grouped Rows" = Table.Group(#"Expanded Data", {"Index"}, {{"Count", each Table.AddIndexColumn(_, "Cum",1,1), type table}}), | |
#"Expanded Count" = Table.ExpandTableColumn(#"Grouped Rows", "Count", {"Cum", "Element:Text"}, {"Cum", "Element:Text"}), | |
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Expanded Count", {{"Cum", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Expanded Count", {{"Cum", type text}}, "en-US")[Cum]), "Cum", "Element:Text"), |
OlderNewer