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
import xlwings as xl | |
import xlwings.constants | |
s = xl.Book('doc.xlsx').sheets[0] | |
RR2 = s.api.Cells.Find(What="*", | |
After=s.api.Cells(1, 1), | |
LookAt=xlwings.constants.LookAt.xlPart, | |
LookIn=xlwings.constants.FindLookIn.xlFormulas, | |
SearchOrder=xlwings.constants.SearchOrder.xlByRows, | |
SearchDirection=xlwings.constants.SearchDirection.xlPrevious, |
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
## Note: del b doesn't call __del__, because it's not guaranteed. Probably because there's a still reference to it in the _registered_cars dictionary | |
import re | |
from enum import Enum, auto | |
class REGISTRATION_STATUS(Enum): | |
SUCCESS = auto() | |
INVALID_NUMBER = auto() | |
ALREADY_REGISTERED = auto() | |
NUMBER_CHANGED = auto() |
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
import sys, os | |
from google.colab import drive | |
drive.mount('/content/gdrive') | |
%cd /content/gdrive/My\ Drive/-dev/stanford-cs231n-2019spring/assignment1/ | |
!pip install -r requirements.txt | |
%cd ./cs231n/datasets/ |
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
;Source: https://www.autohotkey.com/boards/viewtopic.php?t=34909 "Modifier key hotkeys on single press only" by func | |
#SingleInstance Force | |
#InstallKeybdHook | |
~LShift Up:: | |
if (A_PriorKey = "LShift") | |
send, {tab} | |
return | |
~LControl Up:: |
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
// Location: /etc/logid.cfg | |
devices: ({ | |
name: "MX Master 3"; | |
smartshift: { on: true; threshold: 6; }; | |
hiresscroll: { hires: false; invert: false; target: false; }; | |
dpi: 1500; // max=4000 | |
buttons: ( | |
// Forward button | |
{ cid: 0x56; action = { type: "Gestures"; gestures: ( | |
{ direction: "None"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA" ];}}, |
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
from typing import List | |
def split_message(input_msg: str, max_length: int, allocated_chars=None) -> List[str]: | |
allocated_chars_arg = allocated_chars | |
max_length_arg = max_length | |
if allocated_chars_arg is None: | |
allocated_chars = 6 | |
assert max_length > 1 + allocated_chars | |
max_length -= allocated_chars |
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
import logging | |
import signal | |
logger = logging.getLogger(__name__) | |
class ExitSignalHandler(metaclass=Singleton): | |
def __init__(self): | |
self._cleanup_functions = [] |
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 -xe | |
UPSTREAM_REPO_URL=... | |
git remote add upstream "$UPSTREAM_REPO_URL" || true | |
git pull origin main | |
git checkout main | |
git fetch upstream | |
git merge upstream/main |
OlderNewer