This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pages: | |
- name: Daily Read | |
columns: | |
- size: small | |
widgets: | |
- type: clock | |
hour-format: 24h | |
timezones: | |
- timezone: Europe/Paris | |
label: Paris |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
services: | |
qbittorrent: | |
image: lscr.io/linuxserver/qbittorrent:latest | |
container_name: qbittorrent | |
environment: | |
- PUID=1000 | |
- PGID=1000 | |
- TZ=Etc/UTC | |
- WEBUI_PORT=8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
app: | |
container_name: nextcloud_app | |
image: nextcloud:28.0.0 | |
restart: always | |
ports: | |
- 30080:80 | |
- 39000:9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import matplotlib.gridspec as gridspec #分割子图 | |
import mpl_finance as mpf | |
import os | |
import numpy as np | |
import pandas as pd | |
import talib | |
from mootdx.reader import Reader | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script setups Redash along with supervisor, nginx, PostgreSQL and Redis. It was written to be used on | |
# Ubuntu 18.04. Technically it can work with other Ubuntu versions, but you might get non compatible versions | |
# of PostgreSQL, Redis and maybe some other dependencies. | |
# | |
# This script is not idempotent and if it stops in the middle, you can't just run it again. You should either | |
# understand what parts of it to exclude or just start over on a new VM (assuming you're using a VM). | |
# If OS is Windows , Execute this sed: sed -i 's/\r$//' filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Can be used by your scripts to send iMessages from the shell | |
# Usage: | |
# ./SendMessage.sh 1234567890 'hi there!' | |
recipient="${1}" | |
message="${*:2}" | |
cat<<EOF | osascript - "${recipient}" "${message}" | |
on run {targetBuddyPhone, targetMessage} | |
tell application "Messages" | |
set targetService to 1st service whose service type = iMessage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
cmd = """osascript<<END | |
tell application "Messages" | |
send "TEXT" to buddy "VALID E-MAIL OR PHONE #" of (service 1 whose service type is iMessage) | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import requests | |
def get_page(url): | |
header = { | |
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.96 Safari/537.36'} | |
return requests.get(url, headers=header) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1. Backup and Restore Single Database | |
#Backup: single database in PostgreSQL. Replace your actual database name with mydb. | |
pg_dump -U postgres -d mydb > mydb.pgsql | |
#Restore: single database backup in PostgreSQL. | |
psql -U postgres -d mydb < mydb.pgsql | |
#2. Backup and Restore All Databases | |
#Backup: all databases in PostgreSQL using pg_dumpall utility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#code=utf-8 | |
import requests | |
import pandas as pd | |
from bs4 import BeautifulSoup | |
def get_stock_options(url,is_start_page=False): | |
all_data = [] | |
headers = { | |
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36'} | |
content = requests.get(url, headers=headers) | |
soup = BeautifulSoup(content.text,'lxml') |
NewerOlder