Python error : pip installer ssl

solve :


pip install [item] --trusted-host pypi.org --trusted-host files.pythonhosted.org

ex)

$ pip install requests --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install psutil --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade paramiko --trusted-host pypi.org --trusted-host files.pythonhosted.org
$ pip install --upgrade scp --trusted-host pypi.org --trusted-host files.pythonhosted.org


#python #pip #pip3 #error #--trusted-host #pypi.org #pythonhosted #ssl

How to check variant type in C++

 C++ example:

#include <typeinfo>
#include <iostream>
int main() {
int nInt;
char cChar;
std::cout<<"nInt type = " << typeid(nInt).name() <<std::endl;
std::cout<<"cChar type = " << typeid(cChar).name() <<std::endl;
return 0;
}
if you define #include <typeinfo>, you can know type info of the variant.

How to build multi binaries through cmake.

Topic :

1. How to build multi binaries through cmake.
2. How to make multi binaries by preprocess.


Linux Line Feed? Carriage Return? Remove ^M

linux "^M" issue

If you look the shell script or code sent from Windows to the Linux server, you may find "^M" at the end of the line.

ex 1 )
echo test^M


ex 2)

#include <iostream>^M
#include <string>^M


Solve :

all remove ^M

 $ vi source.cpp
 
:1,$s/^M//g

^M : ctrl+N and ctrl+M


dpkg command (install / remove)

 dpkg

 - install .deb

    $ dpkg -i *.deb


 - check intalled .deb package

    $dpkg --get-selections | grep <pkgName>


 - remove .deb 
   * If it is installed through a deb file, it should be removed in order according to dependencies.

    $ dpkg -P <pkgName>-dev

    $ dpkg -P <pkgName>-dbg

    $ dpkg -P  <pkgName>



#dpkg #deb #install #remove #package #linux #embedded

Error : Chrome search engine keyword error (Spacebar ignored)


Error : Chrome search engine keyword(Spacebar ignored)

1. Chrome Address Window in Chrome 
   
Connection : Chrome://flags 




2. Omnibox keyword search button


3. Re-run relaunch after setting Default to Disabled by default. 

#chromeerror#keyword#error



After setting the chrome keyword,
input a keyword in the address bar and process it if you pressed the space bar.
but there was no response.

Keyword error occurred (when space bar is not available)

크롬 키워드 설정 후,
주소창에 키워드 입력하고 스페이스 바를 눌렀으나 반응 없을 시에 대한 처리

키워드 에러 발생(스페이스바 안될 때)

Python logging module (write log file) / basicConfig does not create log file issue(solved)

Python

logging module : write log file for exec. log in python(i think)

issue :

If "fullpath = variable + filename" as shown above, there is an issue(not create a log file).
The cause is unknown, but if " fullpath = "./log/test.log" " directly, you can see that the file is normally generated.


example 1 and issue of example 1,  solved: example 2


example 1.

import logging

def writeLogFile(logText):
    mypath = "./log"
    fullpath = mypath + "/test.log"    #mypath = "./log"
    logging.basicConfig(filename = fullpath, level=logging.DEBUG)
    logging.debug(logText)

If "fullpath = variable + filename" as shown above, there is an issue(not create a log file).

The cause is unknown, but if " fullpath = "./log/test.log" " directly, you can see that the file is normally generated.

For the above problem, I don't use basicConfig, So, I use it with example 2.


example 2 and solve.

import logging
import logging.handlers

log : ""

def initLog():
    global log
    mypath = "./log"
    fullpath = mypath + "/test.log"    #mypath = "./log"

    log = logging.getLogger('my_log')
    log.setLevel(logging.DEBUG)
    fileHandler = logging.FileHandler(fullpath)
    log.addHandler(fileHandler)


def writeLogFile(logText):
    log.debug(logText)

As shown above, log can be created as a file without any problems.


#python #logging #log #logfile #basicConfig #issue #solve #logginghandler


Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore!

 🏙️ Apartment Buying Guide 2025: Shocking Red Flags You Should NEVER Ignore! 🚨 Are you thinking about buying an apartment in 2025? 🏢  It’...