下面是对 Fish Shell 中几种设置环境变量(或 Shell 变量)方式的总结、区别以及在何种场景使用的简要说明:
Fish 中的变量具有不同的作用域(scope)。同名变量可以同时存在于多个作用域中,Fish 会使用最窄的作用域优先。通过 set 命令配合不同选项,可显式指定创建或修改某个作用域的变量:
- Local(
-l或--local)
- 在当前代码块或函数内生效,离开代码块或函数后自动销毁
| import time | |
| import random | |
| import requests | |
| from hashlib import sha1 | |
| key = 'a2ffa5c9be0748*********' # 登陆页面查看源码获得 | |
| deviceId = '98:5a:eb:*****' | |
| pwd = '*************' | |
| url = 'http://192.168.31.1/cgi-bin/luci/api/xqsystem/login' | |
| reboot_url = 'http://192.168.31.1/cgi-bin/luci/;stok={}/api/xqsystem/reboot?client=web' |
| from memory import UnsafePointer | |
| @value | |
| struct Node: | |
| alias _Ptr = UnsafePointer[Self] | |
| var value: Int | |
| var left: Self._Ptr | |
| var right: Self._Ptr |
| const id = "YOUR ID"; | |
| const query = ` | |
| query TeamSidebarData($id: UUID4!) { | |
| me { | |
| team(id: $id) { | |
| sandboxes(limit: 200, orderBy: {field: "updatedAt", direction: DESC}) { | |
| ...sandboxFragmentDashboard | |
| } | |
| } | |
| } |
| # -*- coding: utf-8 -*- | |
| import requests | |
| import hashlib | |
| import re | |
| username = '' ###账号### | |
| password = ''###密码### | |
| UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \ | |
| Chrome/27.0.1453.116 Safari/537.36" | |
| headers = { |
| #include <stdio.h> | |
| #include <x86intrin.h> | |
| // gcc -msse4.1 -O0 -o program program.c | |
| int main() { | |
| __m128i A = _mm_set_epi32(4, 3, 2, 1); | |
| __m128i B = _mm_set_epi32(8, 7, 6, 5); | |
| __m128i Cond = _mm_set_epi32(0, -1, -1, 0); | |
| __m128i Result = _mm_blendv_epi8(A, B, Cond); |
#!/sbin/openrc-run
command="/root/clash-linux-amd64-v3-2022.11.25"
command_args="-f /root/config.yaml"
depend() {
need net
after firewall| https://easylearn.baidu.com/edu-page/tiangong/exercisedetail?id=69691b1ff142336c1eb91a37f111f18583d00cfc&stfrom=aladdin | |
| 标准答案: 1 C; 2 A; 3 D; 4 D; 5 A; 6 B; 7 C; 8 B | |
| 总结: | |
| ChatGPT+WolfAlpha: 6分(解答6题,2题明确表示无法解答) | |
| Google Bard: 4分 | |
| 1. 以下为中国高考数学单选题,在给出的四个选项中,只有一个是对的,先配合wolfalpha尝试解答,再给出哪个答案是正确答案 | |
| 已知集合$M=\{-2,-1,0,1,2\}$,$N=\{x\mid x^{2}-x-6\geq0\}$,则$M\cap N=$ | |
| A: $\{-2,-1,0,1\}$ | |
| B: $\{0,1,2\}$ | |
| C: $\{-2\}$ |
| #include <Python.h> | |
| static PyObject * fibonacci_fib(PyObject *self, PyObject *args) { | |
| int n; | |
| if (!PyArg_ParseTuple(args, "i", &n)) { | |
| return NULL; | |
| } | |
| int i; | |
| int a = 0; | |
| int b = 1; |
| apt-get install g++ make binutils autoconf automake autotools-dev libtool pkg-config zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev libjemalloc-dev cython python3-dev python-setuptools | |
| mkdir /nghttp2 | |
| git clone https://github.com/tatsuhiro-t/nghttp2.git | |
| cd nghttp2 | |
| autoreconf -i | |
| automake | |
| autoconf | |
| ./configure | |
| make |