JavaScript에서 !
은 not
의 의미이고, Bool 연산시 true -> false, false -> true로 변환해준다.
그리고 특정한 값 혹은 객체는 false
와 동등하게 취급된다. 즉, if
구문의 조건의 결과로 나올 경우 ''
, null
, undefined
, []
등은 false
로 취급되는 것이다.
{ | |
"REPO_URL":"", | |
"PROJECT_NAME":"", | |
"REMOTE_HOST_SSH":"", | |
"REMOTE_HOST":"", | |
"REMOTE_USER":"", | |
"REMOTE_PASSWORD":"" | |
} |
#!/bin/bash | |
# 1st Install https://github.com/prasmussen/gdrive | |
# then use this script in Alfred or from CLI when you want to screenshot then upload to your gdrive | |
# then share the link to others from your paste board | |
# (run gdrive one first time to authenticate with Google) | |
screencapture -tpng -i /tmp/temp_shot_gdrive.png | |
DATEFILENAME=`date +"%Y%m%d%H%M"` | |
# use -p id to upload to a specific folder |
# parser.py | |
import requests | |
# 로그인할 유저정보를 넣어주자 (모두 문자열) | |
LOGIN_INFO = { | |
'email': '[email protected]', | |
'pw': 'aaa124', | |
'proc': 'login', | |
'returnUrl': '', | |
'witnessMe': '1' |
{ | |
"REPO_URL":"깃헙Repo주소", | |
"PROJECT_NAME":"프로젝트폴더(settings.py가있는 폴더)의 이름", | |
"REMOTE_HOST":"여러분이 만든 도메인주소(ex: djangogirls-seoul-tutorial.tk )", | |
"REMOTE_USER":"django", | |
"STATIC_ROOT":"static", | |
"STATIC_URL":"static", | |
"MEDIA_ROOT":"media" | |
} |
import binascii | |
from datetime import datetime | |
def chunkstring(string, length): | |
return (string[0+i:length+i] for i in range(0, len(string), length)) | |
# Open in binary mode (so you don't read two byte line endings on Windows as one byte) | |
# and use with statement (always do this to avoid leaked file descriptors, unflushed files) | |
with open('hexdata.txt', 'r') as f: |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudformation:CreateStack", | |
"cloudformation:DescribeStacks", | |
"cloudformation:DescribeStackEvents", | |
"cloudformation:DescribeStackResources", |
import requests | |
import time | |
from multiprocessing import Pool | |
def troll(_): | |
with requests.Session() as s: | |
s.headers = { | |
'DNT': '1', | |
'Accept-Encoding': 'gzip, deflate', |
import torch #파이토치 | |
import torchvision.datasets as vdatasets #데이터셋 모음 | |
import torchvision.utils as vutils #유틸리티함수 | |
import torchvision.transforms as vtransform #변환함수 | |
import numpy as np #수치연산 | |
import torch.nn as nn | |
import torch.nn.functional as F | |
from PIL import Image | |
from io import BytesIO | |
import base64 |