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
class Solution: | |
# @param {TreeNode} root | |
# @return {TreeNode} | |
def invertTree(self, root): | |
if root: | |
root.left, root.right = self.invertTree(root.right), self.invertTree(root.left) | |
return root |
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
Python build finished successfully! | |
The necessary bits to build these optional modules were not found: | |
_bz2 _dbm _gdbm | |
_lzma _tkinter nis | |
readline |
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
U-Boot 1.1.3 (Nov 15 2013 - 16:45:31) | |
Board: Ralink APSoC DRAM: 64 MB | |
relocate_code Pointer at: 83fb4000 | |
enable ephy clock...done. rf reg 29 = 5 | |
SSC disabled. | |
****************************** | |
Software System Reset Occurred | |
****************************** | |
spi_wait_nsec: 29 |
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
def solve(s: str, n: int, iseven: bool): | |
if n <= 0: | |
print(s) | |
return | |
i: int | |
for i in range(10) if iseven else range(9, -1, -1): | |
solve(s + chr(ord('0') + i), n - 1, i % 2 == 0 if iseven else i % 2 == 1) | |
solve('', int(input()), True) |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import argparse | |
import logging | |
import os | |
import sys | |
def parse_args() -> argparse.Namespace: |
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
// Copyright 2012 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// +build ignore | |
package main | |
import "fmt" |
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 multiprocessing | |
import multiprocessing.managers | |
import os | |
import sys | |
from typing import AnyStr, Union | |
class QueueManager(multiprocessing.managers.BaseManager): | |
def get_queue(self, ident: Union[AnyStr, int, type(None)] = None) -> multiprocessing.Queue: |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,5b,e0,38,00,38,00,5b,e0,38,e0,5c,e0,5d,e0,38,e0,00,00,00,00 | |
; Refs: | |
; https://superuser.com/a/1202601/270174 | |
; https://stackoverflow.com/questions/40777182/how-to-remap-the-menu-key-on-windows |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00 | |
; Refs: | |
; https://superuser.com/a/1381836 |
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
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while ($true) { |