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 generate_excel_formula(n): | |
""" | |
generate_excel_formula(n) --> Generates any excel formula that find an element in a substring: | |
| data | 1 | 2 | 3 | 4 | | |
|---------------------|------|--------|---------|---| | |
| dogs, cats, monkeys | dogs | cats | monkeys | | | |
| dogs, whales | dogs | whales | | | | |
| | | | | | |
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 os | |
def excel_column_to_number(column: str) -> int: | |
""" | |
Converts a excel column string to ordinal number. | |
Ejemplo: "A" -> 1, "B" -> 2, "AA" -> 27 | |
""" | |
column = column.upper() # Uppercase letters | |
result = 0 | |
for char in column: |
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
# USB_eject_ninja.bat | |
# One line batch windows script to know which process is refusing to eject your USB disk. | |
# For Windows 11, but it should work on any Windows version | |
# Stolen from this superuser.com post: https://superuser.com/questions/87364/can-windows-tell-me-what-is-using-my-usb-drive | |
# License? None lol I've grabbed this from a random user on the internet. | |
# Why this isn't a feature inside Windows GUI? No fucking clue. | |
# THIS WORKS IF YOU ALREADY TRIED TO EJECT THE DRIVE. | |
# Just copy and paste the line below inside any cmd in Windows. It should work without admin privileges. |
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
<!-- Download MS Office deployment tool here: https://www.microsoft.com/en-us/download/details.aspx?id=49117--> | |
<!-- In theory it should download MS Office automatically from the servers. --> | |
<Configuration> | |
<Add SourcePath="" OfficeClientEdition="64"> | |
<Product ID="O365ProPlusRetail"> | |
<Language ID="en-us" /> | |
<!-- Delete the programs you want to install below: --> | |
<ExcludeApp ID="Access" /> | |
<ExcludeApp ID="Excel" /> | |
<ExcludeApp ID="Word" /> |
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
#include <stdio.h> | |
// This will print any argument it parses just for testing purposes. | |
int main(int argc, char *argv[]) { | |
for (int i = 1; i < argc; i++) { | |
printf("Argument %d: %s\n", i, argv[i]); | |
} | |
return 0; | |
} |