在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
// #popclip extension for ChatGPT | |
// name: LimboGPT | |
// icon: iconify:logos:openai-icon | |
// language: javascript | |
// module: true | |
// entitlements: [network] | |
// options: [{ | |
// identifier: apikey, label: API Key, type: string, | |
// description: 'Obtain API key from https://platform.openai.com/account/api-keys' | |
// }] |
import os | |
import subprocess | |
import multiprocessing | |
from colorama import Fore, Back, Style | |
def download_url(url): | |
flag = f'PID: {os.getpid()} --> 下载: {url}' |
// group by traceId, event fields and get the max item. | |
void testIt() { | |
List<Event> events = new ArrayList<>(); | |
events.add(new Event("AAA", "ROOM_START", 1000L, 10)); | |
events.add(new Event("AAA", "ROOM_START", 1000L, 10)); | |
events.add(new Event("BBB", "ROOM_START", 1002L, 15)); | |
events.add(new Event("BBB", "ROOM_START", 1001L, 10)); | |
// method1 | |
Map<String, Map<String, List<Event>>> collect = events.stream() |
//打印文件内容 | |
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"os" | |
"io" | |
"path/filepath" |
var Watch = require('./fswatch'), | |
fs = require('fs'), | |
watchDir = './watch', | |
processDir = './done'; | |
var watcher = new Watch(watchDir, processDir); | |
watcher.on('process', function (file) { | |
var watchFile = this.watchDir + '/' + file; |
在linux中,-
如果单独使用 - 符号,不加任何该加的文件名称时,代表"标准输入"的意思
如下小技巧,nc
命令来传输目录下多个文件
# host A, on receiver, go to destination directory and execute:
$ nc -l $port | tar xf -
# host B,on sender
# coding=utf-8 | |
""" | |
tornado异步爬虫示例 | |
""" | |
import time | |
from datetime import timedelta | |
from bs4 import BeautifulSoup | |
from tornado.httpclient import AsyncHTTPClient | |
from tornado import ioloop, gen, queues |
# coding=utf-8 | |
""" | |
desc.. | |
:copyright: (c) 2016 by fangpeng(@beginman.cn). | |
:license: MIT, see LICENSE for more details. | |
""" | |
import hmac | |
import hashlib | |
import base64 | |
import redis |
package main | |
import ( | |
"io" | |
"fmt" | |
) | |
type Data struct { | |
stream string |
package main | |
import ( | |
"log" | |
"time" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/briandowns/spinner" | |
) |