Usage
# 创建环境
python3 -m venv venv
source venv/bin/activate
# 安装依赖
pip3 install torch tabulate | #!/usr/bin/env bash | |
| set -euo pipefail | |
| # === CONFIGURE THESE === | |
| ASE_DIR="$HOME/src/aseprite" # base directory for the work | |
| SKIA_TAG="m124-08a5439a6b" # adjust based on Aseprite’s required Skia version Eg. m124-08a5439a6b | |
| SKIA_URL="https://github.com/aseprite/skia/releases/download/${SKIA_TAG}/Skia-macOS-Release-arm64.zip" | |
| # You may need to update SKIA_TAG/URL based on the version listed in the INSTALL.md of Aseprite. | |
| APP_NAME="Aseprite.app" | |
| # ======================= |
Usage
# 创建环境
python3 -m venv venv
source venv/bin/activate
# 安装依赖
pip3 install torch tabulate | // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
| <!DOCTYPE html> | |
| <!-- | |
| * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | |
| * | |
| * Use of this source code is governed by a BSD-style license | |
| * that can be found in the LICENSE file in the root of the source | |
| * tree. | |
| --> | |
| <html> | |
| <head> |
| [dongdong@fedora29 headless-test]$ cat firefox-headless.py | |
| from selenium import webdriver | |
| from selenium.webdriver.firefox.options import Options | |
| options = Options() | |
| options.headless = True | |
| driver = webdriver.Firefox(options=options) | |
| driver.set_window_position(0, 0) | |
| driver.set_window_size(1366, 768) |
| // From: http://thecodebarbarian.com/common-async-await-design-patterns-in-node.js.html | |
| const superagent = require('superagent'); | |
| const NUM_RETRIES = 3; | |
| test(); | |
| async function test() { | |
| let i; |
| const bcrypt = require('bcrypt'); | |
| const NUM_SALT_ROUNDS = 8; | |
| async function test() { | |
| const pws = ["passwd", "passwd2", "passed3"]; | |
| const promises = pws.map(pw => bcrypt.hash(pw, NUM_SALT_ROUNDS)); | |
| const result = await Promise.all(promises); | |
| console.log(result); | |
| } |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>数据导出工具 V1.0.2 </title> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="date-select"> |
| use std::fs; | |
| use std::io; | |
| use std::path::Path; | |
| extern crate time; | |
| fn timestamp() -> f64 { | |
| let timespec = time::get_time(); | |
| // 1459440009.113178 | |
| let mills: f64 = timespec.sec as f64 + (timespec.nsec as f64 / 1000.0 / 1000.0 / 1000.0); | |
| mills |
| extern crate clipboard; | |
| use clipboard::ClipboardProvider; | |
| use clipboard::ClipboardContext; | |
| extern crate libloading; | |
| use libloading::{Library, Symbol}; | |
| use std::io::prelude::*; | |
| use std::path::Path; | |
| use std::ffi::CStr; |