왜 열거형(sequence)를 따라서 for문을 사용하게 했는지 모르겠지만..

일단은 열거형은 []로 나열되는 tuple의 list 혹은 array라고 하는데

node.js와 비교하면 배열을 foreach 로 반복하도록 문법을 제한한 느낌이라고 해야하나?

 

[링크 : https://www.w3schools.com/python/ref_func_range.asp]

[링크 : https://www.learnpython.org/en/Loops]

'Programming > python(파이썬)' 카테고리의 다른 글

python yield  (0) 2021.04.07
python 공부  (0) 2020.01.14
python print 와 while 문  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
python split  (0) 2020.01.10
Posted by 구차니
Linux/Ubuntu2020. 1. 11. 23:06

/var/crash에 파일이 있으면 보고하는거라고 하는데

[링크 : https://moordev.tistory.com/152]

 

오늘자로 크롬관련 에러도 있고 머지...

크롬을 재설치 해봐야하는건가..

 

/var/crash$ ll
합계 16884
drwxrwsrwt  2 root     whoopsie     4096  1월 10 19:16 ./
drwxr-xr-x 14 root     root         4096  8월  6 04:11 ../
-rw-r-----  1 root     whoopsie    42510  1월  8 18:57 _usr_bin_isdv4-serial-inputattach.0.crash
----------  1 minimonk whoopsie 17235968  1월 10 19:17 _usr_lib_chromium-browser_chromium-browser.1000.crash

 

isdv4 어쩌구는.. 설마했는데 wacom 타블렛 관련 드라이버..

도대체 애네가 왜 오류가 나지?

[링크 : https://github.com/linuxwacom/xf86-input-wacom/blob/master/tools/isdv4-serial-inputattach.c]

 

+

일단 한번 뿐이긴 하지만 해당 디렉토리의 파일을 삭제하고 다시 발생하고 있진 않다.

바보 같이 잘못설치되서 포맷할뻔 -_-

Posted by 구차니

 

if guess == number:
    print('same')
elif guess < number:
    print('larger then')
else:
    print('lesser then')

 

node.js와는 다르게 문자열과 숫자를 마음대로 + 로 출력할 수가 없다.

그리고 while 문에 대해서도 특이하게 else가 붙어서 마지막 조건에서 벗어날때 무언가를 할 수 있다.

(무슨 용도로 이걸 만들었을까..)

cnt = 10;

while cnt > 0:

cnt = cnt - 1;

print('cnt:', cnt);

else:

print('cnt <= a', cnt);

 

[링크 : https://www.opentutorials.org/module/2980/17535]

'Programming > python(파이썬)' 카테고리의 다른 글

python 공부  (0) 2020.01.14
python 반복문 for in range()  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
python split  (0) 2020.01.10
python 겅부  (0) 2020.01.09
Posted by 구차니

머 애들이랑 놀아주는게 한가로울리가 없지만

그래도 마음 편하게 가족이랑 있으니 좋긴하네

'Programming > python(파이썬)' 카테고리의 다른 글

python 반복문 for in range()  (0) 2020.01.11
python print 와 while 문  (0) 2020.01.11
python split  (0) 2020.01.10
python 겅부  (0) 2020.01.09
python 관련 문서들  (0) 2020.01.09
Posted by 구차니
개소리 왈왈/컴퓨터2020. 1. 10. 23:29

벤치마크 보면 560Ti가 높은 것도 있고 650이 높은것도 있는데

걍.. 속 편하게 gpu-z 통해서 확인해보니..

음.. 650이 560ti 보다 Pixel Fillrate나 Texture Fillrate가 둘다 높으니

일단 게임성능 자체는 560Ti 보다 650이 나을 것으로 예상된다.

그나저나 픽셀 레이트는 왜 이렇게 차이가 나지?

 

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

UEFI / BIOS(legacy)  (0) 2020.02.29
HD7950 플루이드 모션 설정  (2) 2020.02.28
ADATA / 코잇 SSD 교환  (2) 2020.01.08
으헝 SSD 날림  (0) 2020.01.07
오랫만에(?) 볼륨 폭발  (0) 2020.01.07
Posted by 구차니

row 수는 pages에 영향을 받지만 실질적으로 무제한에 가까울듯 하고

column 수도 single page에 영향을 받아서 1600 이라고는 하지만 그것보다 적을수 있다고 하니

은근히 계산이 까다로울 듯.. 한 페이지가 얼마냐.. -_-

 

Table K.1. PostgreSQL Limitations

ItemUpper LimitComment

database size unlimited  
number of databases 4,294,950,911  
relations per database 1,431,650,303  
relation size 32 TB with the default BLCKSZ of 8192 bytes
rows per table limited by the number of tuples that can fit onto 4,294,967,295 pages  
columns per table 1600 further limited by tuple size fitting on a single page; see note below
field size 1 GB  
identifier length 63 bytes can be increased by recompiling PostgreSQL
indexes per table unlimited constrained by maximum relations per database
columns per index 32 can be increased by recompiling PostgreSQL
partition keys 32 can be increased by recompiling PostgreSQL

The maximum number of columns for a table is further reduced as the tuple being stored must fit in a single 8192-byte heap page. For example, excluding the tuple header, a tuple made up of 1600 int columns would consume 6400 bytes and could be stored in a heap page, but a tuple of 1600 bigint columns would consume 12800 bytes and would therefore not fit inside a heap page. Variable-length fields of types such as text, varchar, and char can have their values stored out of line in the table's TOAST table when the values are large enough to require it. Only an 18-byte pointer must remain inside the tuple in the table's heap. For shorter length variable-length fields, either a 4-byte or 1-byte field header is used and the value is stored inside the heap tuple.

Columns that have been dropped from the table also contribute to the maximum column limit. Moreover, although the dropped column values for newly created tuples are internally marked as null in the tuple's null bitmap, the null bitmap also occupies space.

[링크 : https://www.postgresql.org/docs/12/limits.html]

 

[링크 : https://link.springer.com/content/pdf/bbm%3A978-1-4302-0018-5%2F1.pdf]

[링크 : https://soapware.screenstepslive.com/.../22071-q-what-is-the-postgresql-database-top-capacity]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgres table의 물리적 용량 확인하기  (0) 2020.01.13
sql combination 생성하기  (0) 2020.01.13
pgmodeler  (0) 2020.01.05
스칼라 서브쿼리(scalar subquery)  (0) 2020.01.04
array_cat()  (0) 2019.12.30
Posted by 구차니

파싱을 위해 split 함수 혹은 tokenizer를 찾고 있는 중.

(regexp_split 같은 것도 있으려나?)

 

[링크 : https://wayhome25.github.io/python/2017/02/26/py-14-list/]

[링크 : https://wikidocs.net/13]

[링크 : https://www.w3schools.com/python/ref_string_split.asp]

[링크 : https://mainia.tistory.com/5624]

 

+

[링크 : https://stackoverflow.com/questions/13209288/python-split-string-based-on-regex]

'Programming > python(파이썬)' 카테고리의 다른 글

python print 와 while 문  (0) 2020.01.11
오랫만에 한가로움?  (0) 2020.01.11
python 겅부  (0) 2020.01.09
python 관련 문서들  (0) 2020.01.09
python exception  (0) 2020.01.02
Posted by 구차니

 

$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

5.4.5. 문자열 포맷팅
>>> age = 20
>>> name = 'Swaroop'
>>> print ("{0} was {1} years old".format(name, age))
Swaroop was 20 years old
>>> print ("{1} was {0} years old".format(name, age))
20 was Swaroop years old
>>> print ("{1:.3f} was {0} years old".format(name, age))
20.000 was Swaroop years old

5.4.7 순 문자열
>>> print(r"\a")
\a
>>> print("\a")

'Programming > python(파이썬)' 카테고리의 다른 글

오랫만에 한가로움?  (0) 2020.01.11
python split  (0) 2020.01.10
python 관련 문서들  (0) 2020.01.09
python exception  (0) 2020.01.02
python 컴파일하기 및 디컴파일?  (0) 2019.12.14
Posted by 구차니

이제 다시 한번 마스터 해봐야지..

node.js 해서 문법적으로 유사성을 찾으면 좀 쉬우려나?

 

[링크 : https://docs.python.org/3.8/download.html]

[링크 : http://byteofpython-korean.sourceforge.net/byte_of_python.pdf] 2.7 기준

'Programming > python(파이썬)' 카테고리의 다른 글

python split  (0) 2020.01.10
python 겅부  (0) 2020.01.09
python exception  (0) 2020.01.02
python 컴파일하기 및 디컴파일?  (0) 2019.12.14
python indent  (0) 2019.12.13
Posted by 구차니
Linux/Ubuntu2020. 1. 8. 19:24

아래 한줄 넣어주고 리부팅 하니 뚜껑 닫아도 절전모드로 들어가지 않는다.

pm-utils는 cpufreq 확장 설치하면서 끌려온거 같은데 안되면 해당 패키지 설치해야 한다고 한다.

 

$ sudo vi /etc/systemd/logind.conf

#HandleLidSwitch=suspend
HandleLidSwitch=ignore

 

[링크 : http://tipsonubuntu.com/2018/04/28/change-lid-close-action-ubuntu-18-04-lts/]

Posted by 구차니