We want to have 1 row by id, but not just aggregating all values with simple array_agg
,
but removing null and empty fields, removing duplicates,
and doing it for array field and 2D array field too.
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
from aiosmtpd.controller import Controller | |
import asyncio | |
class ExampleHandler: | |
async def handle_RCPT(self, server, session, envelope, address, rcpt_options): | |
print(f"handle_RCPT: {address}") | |
if address.endswith('@error.com'): | |
user_part = address.split("@")[0] | |
try: |
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 socket | |
import ssl | |
SERVER_PORT = 60000 | |
HOST = "127.0.0.1" | |
tls_client_cert = "client.crt" | |
tls_client_key = "client-private-key.key" | |
tls_key_password = None | |
tls_ca_bundle = "ca_bundle.pem" |
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
def get_longest_substring_of_two_chars(string): | |
max_start = 0 | |
max_end = 0 | |
curr_start = 0 | |
curr_second_char = 0 | |
curr_end = 0 | |
curr_chars = [] | |
for index, ch in enumerate(string): |
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
$arguments=$args[0] | |
$command="Restart-Computer $arguments" | |
Write-Host "Command: '$command'" | |
iex $command | |
Write-Host "Done" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
- Uninstall and reinstall the ssh server using the following commands:
sudo apt remove openssh-server
sudo apt install openssh-server
- Edit the
/etc/ssh/sshd_config
file by running the commandsudo vi /etc/ssh/sshd_config
and do the following- Change
Port
to 2222 (or any other port above 1000)
- Change
- Change
UsePrivilegeSeparation
to no
NewerOlder