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
{"uuid":"2b364c88-ca20-11ec-a5ec-d78639c02905","page":{"id":71315555,"data":{"appState":"[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"userInfo\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"userInfo\",\"type\",\"datasource\",\"subtype\",\"RESTQuery\",\"namespace\",null,\"resourceName\",\"REST-WithoutResource\",\"resourceDisplayName\",null,\"template\",[\"^3\",[\"queryRefreshTime\",\"\",\"paginationLimit\",\"\",\"body\",\"\",\"lastReceivedFromResourceAt\",null,\"queryDisabledMessage\",\"\",\"successMessage\",\"\",\"queryDisabled\",\"\",\"playgroundQuerySaveId\",\"latest\",\"resourceNameOverride\",\"\",\"runWhenModelUpdates\",true,\"paginationPaginationField\",\"\",\"headers\",\"\",\"showFailureToaster\",true,\"paginationEnabled\",false,\"query\",\"https://jsonbase.huhuhang.workers.dev/sspai/api/v1/user/{{urlparams.hash.slug}}/info/get\",\"playgroundQueryUuid\",\"\",\"playgroundQueryId\",null,\"privateParams\",[\"~#iL\",[]],\"runWhenPage |
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
# 解决线上环境的一些依赖问题,本地无需这些操作 | |
pip install --upgrade pip msgpack setuptools h5py | |
pip uninstall tensorflow -y | |
pip install -U --ignore-installed wrapt | |
pip install tensorflow==2.0.0-rc1 # 安装 TensorFlow 2.0 |
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 gym | |
import numpy as np | |
def mc_policy_gradient(env, theta, lr, episodes): | |
for episode in range(episodes): # 迭代 episode | |
episode = [] | |
start_observation = env.reset() # 初始化环境 | |
t = 0 | |
while True: |
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
#!/usr/bin/env bash | |
# | |
# Description: Choose a faster mirror for Linux script | |
# | |
# Copyright (C) 2017 - 2018 Oldking <oooldking@gmail.com> | |
# | |
# URL: https://www.oldking.net/697.html | |
# | |
RED='\033[0;31m' |
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
echo "→ Clean macOS Thunder?" | |
read -r -p "[Y/n] " input | |
case $input in | |
[yY][eE][sS]|[yY]) | |
cd /Applications/Thunder.app/Contents/PlugIns/ | |
rm -rf advertising.xlplugin | |
rm -rf featuredpage.xlplugin | |
rm -rf softmanager.xlplugin | |
rm -rf livestream.xlplugin | |
rm -rf feedback.xlplugin |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 *-* | |
''' | |
modifed by ioiogoo | |
''' | |
def preprocess_file(path): | |
# 语料文本内容 | |
files_content = '' | |
with open(path, 'r',encoding='UTF-8') as f: | |
for line in f: |