2024-01-27から1日間の記事一覧

powershell - ダブルクォーテーションで囲まれたCSVの列から中身を取得

ダブルクォーテーションで囲まれたCSVの列から中身を取得 $lines = import-csv "sample.csv" $list = New-Object System.Collections.Generic.list[string] foreach ($line in $lines) { # 列のデータを結合 $list.Add($line.title1 + "_" + $line.title2 + …

powershell - CSVの列をダブルクォーテーションで囲む

CSVの列をダブルクォーテーションで囲む > import-csv "sample.csv" | export-csv "sample_out.csv" -NoTypeInformation

python - ini or yaml ファイル

import configparser import yaml def main(): print("== ini") config = configparser.ConfigParser() config.read("config.ini") print(config["server"]["host"]) print(config["server"]["port"]) print(config["user"]["name"]) print("== yaml") with …

python - Logger

import logging import logzero from logzero import logger class Logger: # # logzero # https://logzero.readthedocs.io/en/latest/# # _logger = None def __new__(cls, *args, **kwargs): if cls._logger is None: _logger = logzero.setup_logger( nam…