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
mixed-port: 7890 | |
allow-lan: true | |
bind-address: '*' | |
mode: rule | |
log-level: info | |
external-controller: '127.0.0.1:9090' | |
dns: | |
enable: true | |
listen: 0.0.0.0:53 | |
ipv6: 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
#!pip install torch | |
#!pip install transformers | |
#!pip install scikit-learn | |
#!pip install numpy | |
import json | |
from sklearn.model_selection import train_test_split | |
import random | |
from datetime import datetime | |
from transformers import BertTokenizer, BertModel | |
import torch |
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
on run {input, parameters} | |
set currentDate to do shell script "date '+%Y%m%d'" | |
tell application "System Events" | |
repeat with i in input | |
set filePath to POSIX path of i | |
set fileExtension to name extension of i | |
set folderName to do shell script "dirname " & filePath | |
set fileName to name of i | |
set AppleScript's text item delimiters to "." | |
set baseName to first text item of 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
#include <zip.h> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
struct FileInfo { | |
std::string htmltemlate; | |
std::string 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
$ tree | |
. | |
├── dynamic_A | |
│ ├── dynamic_A.cpp | |
│ └── dynamic_A.h | |
├── dynamic_B | |
│ ├── dynamic_B.cpp | |
│ └── dynamic_B.h | |
├── main.cpp | |
├── Makefile |
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
$ tree | |
. | |
├── main.cpp | |
├── Makefile | |
├── static_A | |
│ ├── static_A.cpp | |
│ └── static_A.h | |
├── static_B | |
│ ├── static_B.cpp | |
│ └── static_B.h |
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
package main | |
import ( | |
"bytes" | |
"context" | |
"github.com/golang/protobuf/proto" | |
myproto "github.com/selfboot/demo/proto" // This assumes that the generated protobuf code is in this package | |
"io/ioutil" | |
"log" | |
"net/http" |
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
package main | |
import ( | |
"github.com/gin-gonic/gin" | |
"io/ioutil" | |
"log" | |
"math/rand" | |
"net/http" | |
"strconv" | |
"time" |
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 asyncio | |
from redis.asyncio import Redis | |
async def pipe(reader: asyncio.StreamReader, writer: asyncio.StreamWriter, delay: float, name=''): | |
while data := await reader.read(1000): | |
# print(name, 'received:', data) | |
await asyncio.sleep(delay) | |
writer.write(data) |
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
from __future__ import print_function | |
import os | |
from bcc import BPF | |
from time import sleep | |
import argparse | |
import ctypes | |
# Argument parsing | |
parser = argparse.ArgumentParser(description="Measure function duration for a specific PID") | |
parser.add_argument("pid", help="The PID of the process") |
NewerOlder