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
| Sub CleanWikiCovid() | |
| Selection.Hyperlinks.Delete | |
| Selection.UnMerge | |
| Range("A1").Select | |
| Cells.Find(What:="date", After:=ActiveCell, LookIn:=xlFormulas2, LookAt _ | |
| :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ | |
| False, SearchFormat:=False).Activate | |
| While Selection.Column > 1 | |
| Selection.EntireColumn.Delete |
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 json | |
| def get_layers(data): | |
| return data[1][6] | |
| def get_items(data): | |
| return data[12][0][13][0] | |
| def parse_item(item): | |
| output = {"latitude": item[1][0][0][0], |
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
| Sub Macro3() | |
| ' | |
| ' Macro3 Macro | |
| ' | |
| newSheetName = "MergedSheet" | |
| On Error Resume Next | |
| Sheets(newSheetName).Select | |
| If ActiveSheet.Name <> newSheetName Then |
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
| ' | |
| ' A VBA macro to convert numbers to words for check/cheque printing | |
| ' | |
| ' Credit to Rick Rothstein (https://answers.microsoft.com/en-us/profile/1479b918-5537-45b1-a709-6c4bae9d7da4) | |
| ' Original reference: https://answers.microsoft.com/en-us/office/forum/office_2003-excel/convert-numers-to-words-for-checkcheque-printing/5a88ab46-4211-464f-8358-d196408f3ea5 | |
| ' | |
| ' A1: 123.45 | |
| ' In B1: | |
| ' =NumberAsText(A1) ==> One Hundred Twenty Three Point Four Five | |
| ' =NumberAsText(A1,"And") ==> One Hundred and Twenty Three Point Four Five |
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 cv2 | |
| import numpy as np | |
| import time | |
| # create video capture | |
| filename = "test.mp4" | |
| cap = cv2.VideoCapture(filename) | |
| h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) | |
| w = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) |
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
| { | |
| "embeddings": [ | |
| { | |
| "tensorName": "三國演義", | |
| "tensorShape": [ | |
| 3957, | |
| 100 | |
| ], | |
| "tensorPath": "https://gist.githubusercontent.com/compustar/793dce1ea65e26ee38ee97b73e3208b5/raw/f9a32bf3b004145cb011cdb4ce528f12e4370b19/three_kingdoms.tsv", | |
| "metadataPath": "https://gist.githubusercontent.com/compustar/793dce1ea65e26ee38ee97b73e3208b5/raw/f9a32bf3b004145cb011cdb4ce528f12e4370b19/three_kingdoms_meta.tsv" |
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
| REM Usage: hugin_stitch.bat template-XiaomiMijiaMiJPG.pto IMG_20171231_172305.jpg | |
| @echo off | |
| SET PATH=%PATH%;C:\Program Files\Hugin\bin | |
| FOR %%i IN ("%2") DO ( | |
| SET Name=%%~ni | |
| ) | |
| pto_gen %2 %2 --output=%Name%_stitched.pto |
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
| #region CPL License | |
| /* | |
| Nuclex Framework | |
| Copyright (C) 2002-2012 Nuclex Development Labs | |
| This library is free software; you can redistribute it and/or | |
| modify it under the terms of the IBM Common Public License as | |
| published by the IBM Corporation; either version 1.0 of the | |
| License, or (at your option) any later version. |
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
| var http = WScript.CreateObject('Msxml2.XMLHTTP.6.0'); | |
| // Retrieve the url parameter | |
| var url = WScript.Arguments.Item(0) | |
| // Make the request | |
| http.open("GET", url, false); | |
| http.send(); |
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
| using System; | |
| using System.Linq; | |
| using System.Text; | |
| public class Program { | |
| public static void Main(string[] args) { | |
| var @base = 16; | |
| var pLength = 4; | |
| var n = (pLength - 1) * 4; | |
| var max = Max(pLength - 1, @base); |