무중단이 가능합니다!
SHOW GLOBAL VARIABLES LIKE 'plugin_dir';
INSTALL PLUGIN server_audit SONAME 'server_audit.so';
#!/usr/bin/env python | |
# | |
# <bitbar.title>Realtime Stock Tracker</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Bogdan Mosincat</bitbar.author> | |
# <bitbar.author.github>bogdan1304</bitbar.author.github> | |
# <bitbar.desc>Shows realtime stock price and daily percentage change for each stock in the list.</bitbar.desc> | |
# <bitbar.image>https://i.imgur.com/hQoCXFL.png</bitbar.image> | |
# <bitbar.dependencies>python</bitbar.dependencies> |
# Ref: https://books.agiliq.com/projects/django-orm-cookbook/en/latest/ | |
# 8. How to filter a queryset with criteria based on comparing their field values | |
User.objects.filter(name_startswith='R') | |
User.objects.filter(last_name=F("first_name")) | |
User.objects.annotate(first=Substr("first_name", 1, 1), last=Substr("last_name", 1, 1)).filter(first=F("last")) | |
# 9. How to filter FileField without any file? | |
no_files_objects = MyModel.objects.filter( |
import os | |
import unittest | |
from unittest import mock | |
class TestMockOpen(unittest.TestCase): | |
def test_mock_open(self): | |
mock_open = mock.mock_open() | |
with mock.patch('builtins.open', new_callable=mock_open()): |
# When enter project folder | |
pyenv activate [your-pyenv-virtualenv] | |
echo $(pyenv versions) | |
pip freeze > requirements.txt | |
ll requirements.txt |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Vue - Hello World</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/earlyaccess/notosanskr.css" rel="stylesheet"> | |
<style> |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/shinyeongmin/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="agnoster" | |
# Uncomment the following line to use case-sensitive completion. |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from bs4 import BeautifulSoup | |
from urllib import urlencode | |
from urllib2 import Request, urlopen | |
from datetime import datetime | |
import sys | |
reload(sys) |
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flask import Response | |
from flask import stream_with_context | |
from flask import request | |
import json | |
import requests | |
import urllib |
# -*- coding: utf-8 -*- | |
#!/usr/bin/python | |
from bs4 import BeautifulSoup | |
from urllib.parse import urlencode | |
from urllib.request import Request, urlopen | |
from apscheduler.schedulers.blocking import BlockingScheduler | |
from slackclient import SlackClient | |
slack_token = "your slack slack_token" |