- Configuration of self generated SSL certificate
- Append
export ssl_name="my_domain_name"
to ~/.bashrc- Replace "my_domain_name" with the domain name(e.g. lists.fedoraproject.org)
# dnf install openssl
# mkdir ~/certs
# cd ~/certs
- Append
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
"""http://thesmithfam.org/blog/2012/10/25/temporarily-suppress-console-output-in-python/ | |
https://stackoverflow.com/questions/36956083/how-can-the-terminal-output-of-executables-run-by-python-functions-be-silenced-i | |
""" | |
import os | |
import sys | |
from contextlib import contextmanager | |
@contextmanager | |
def suppress_stdout(): |
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
Show hidden characters
{ | |
// Snippets for Python | |
"Private Member Getter": { | |
"prefix": [ | |
"pmg", | |
"ㅔㅡㅎ" | |
], | |
"description": "Create private class member with getter", | |
"body": [ | |
"__${1:Name}: ${2:Type}", |
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
"""http://thesmithfam.org/blog/2012/10/25/temporarily-suppress-console-output-in-python/ | |
https://stackoverflow.com/questions/36956083/how-can-the-terminal-output-of-executables-run-by-python-functions-be-silenced-i | |
""" | |
import sys | |
import os | |
import contextlib | |
print(f"package\t{__name__}\tloaded") |
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 if_bool_value(any_input): | |
_str = f"For if statement, {any_input} of {type(any_input)} is" | |
if any_input: | |
print(_str, True) | |
else: | |
print(_str, False) | |
if_bool_value(1) | |
if_bool_value(2) |
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
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
// You can add more global application settings here. |
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 Any, Dict, List | |
def create_write_csv(formatted_list: List[Dict[str, Any]], | |
fieldnames: List[str], | |
filepath: str, | |
encoding: str): | |
"""row 정보를 가진 dictionary의 list를 받아 filepath에 csv로 저장 | |
Arguments: | |
formatted_list {List[Dict[str, str]]} -- column head를 key, 값을 value로 하는 dictionary의 list |
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, Any, Generator | |
def minmaxpartition(_sum: int, _count: int, _min: int, _max: int | |
) -> Generator[List[Any], None, None]: | |
if _min > _max: | |
yield [] | |
return | |
if _sum < _count * _min: | |
yield [] |
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
for j in range(2): | |
try: | |
for i in range(10): | |
print(i) | |
if i == 3: | |
raise StopIteration | |
except: | |
print("raised successfully") | |
continue |
NewerOlder