上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 68 下一页
摘要: 将终端的背景色设置成白色、文本设置成黑色 setterm -inversescreen on Linux中常见的几种不同 shell 常见Linux目录名称 / 虚拟目录的根目录。通常不会在这里存储文件 /bin 二进制目录,存放许多用户级的GNU工具 4 /boot 启动目录,存放启动文件 /de 阅读全文
posted @ 2020-08-19 10:28 anobscureretreat 阅读(462) 评论(0) 推荐(0) 编辑
摘要: cron服务是Linux的内置服务,但它不会开机自动启动。可以用以下命令启动和停止服务:\ /sbin/service crond start /sbin/service crond stop /sbin/service crond restart /sbin/service crond reloa 阅读全文
posted @ 2020-08-19 10:09 anobscureretreat 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 创建输出文件描述符 $ cat test13 #!/bin/bash # using an alternative file descriptor exec 3>test13out echo "This should display on the monitor" echo "and this sh 阅读全文
posted @ 2020-08-19 10:07 anobscureretreat 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 移动 :CTRL +拖拽(3),CTRL +shift +拖拽(4) 缩放 :CTRL+alt+拖拽 播放 :空格 或者 ,alt+空格 快捷键:鼠标右键 降低延迟:使用 asio4all ,fl studio asio 阅读全文
posted @ 2020-08-19 10:03 anobscureretreat 阅读(3111) 评论(0) 推荐(0) 编辑
摘要: utau 以及 melodyne 阅读全文
posted @ 2020-08-19 09:59 anobscureretreat 阅读(132) 评论(0) 推荐(0) 编辑
摘要: mixkit pexels Pixabay Videezy Freesound Audionautix YouTube voice Adobe voice Creative Commons 阅读全文
posted @ 2020-08-19 09:58 anobscureretreat 阅读(136) 评论(0) 推荐(0) 编辑
摘要: code 缩放时间线 command + command - 添加默认专场 command+t 修改时间长度 Ctrl + d 拉近显示效果 shift+c 最小化时间线 Shift +z 裁剪 option+[ option+] 粘贴属性 Command +c Command +shift +v 阅读全文
posted @ 2020-08-19 09:56 anobscureretreat 阅读(785) 评论(0) 推荐(0) 编辑
摘要: code >>> import os >>> dir, suffix = os.path.splitext("test.pdf") >>> dir 'test' >>> suffix '.pdf' >>> dir, suffix = os.path.splitext("/root/test.pdf" 阅读全文
posted @ 2020-08-17 17:03 anobscureretreat 阅读(668) 评论(0) 推荐(0) 编辑
摘要: code b= ActionChains(driver) c= driver.find_element_by_xpath("元素名") b.click_and_hold(c).perform() for i in range(100): try: b.move_by_offset(15,0).per 阅读全文
posted @ 2020-08-17 16:52 anobscureretreat 阅读(327) 评论(0) 推荐(0) 编辑
摘要: code import base64 import io import os from PIL import Image from PIL import ImageFile # 压缩图片文件 def compress_image(infile,outfile, mb=19, quality=3, k 阅读全文
posted @ 2020-08-17 12:28 anobscureretreat 阅读(777) 评论(0) 推荐(0) 编辑
摘要: code import os from PIL import Image def get_size(file): # 获取文件大小:KB size = os.path.getsize(file) return int(size / 1024) def get_outfile(infile, outf 阅读全文
posted @ 2020-08-17 11:50 anobscureretreat 阅读(2611) 评论(0) 推荐(0) 编辑
摘要: code import os import cv2 def compress(dirname): for filename in os.listdir(dirname): f=os.path.join(dirname,filename) img=cv2.imread(f,2) cv2.imwrite 阅读全文
posted @ 2020-08-17 09:40 anobscureretreat 阅读(269) 评论(0) 推荐(0) 编辑
摘要: ipython是一个python的交互式shell,比默认的python shell好用得多,支持变量自动补全,自动缩进,支持bash shell命令,内置了许多很有用的功能和函数。学习ipython将会让我们以一种更高的效率来使用python。同时它也是利用Python进行科学计算和交互可视化的一 阅读全文
posted @ 2020-08-15 10:22 anobscureretreat 阅读(191) 评论(0) 推荐(0) 编辑
摘要: code html console.log("{% url 'addbook' %}"); var msg={"hotelid":"0813"} $.ajax({ type:"POST", url:"{% url 'addbook' %}", contentType:'application/jso 阅读全文
posted @ 2020-07-17 00:49 anobscureretreat 阅读(234) 评论(0) 推荐(0) 编辑
摘要: if 标签 {% if %}会对一个变量求值,如果它的值是“True”(存在、不为空、且不是boolean类型的false值),对应的内容块会输出。 {% if num > 100 or num < 0 %} <p>无效</p> {% elif num > 80 and num < 100 %} < 阅读全文
posted @ 2020-07-17 00:26 anobscureretreat 阅读(420) 评论(0) 推荐(0) 编辑
摘要: for标签 遍历每一个元素: {% for person in person_list %} <p>{{ person.name }}</p> {% endfor %} 可以利用{% for obj in list reversed %}反向完成循环。 遍历一个字典: {% for key,val 阅读全文
posted @ 2020-07-17 00:24 anobscureretreat 阅读(1104) 评论(0) 推荐(0) 编辑
摘要: 问题:页面访问时报错 Forbidden (CSRF cookie not set.): xxx 解决方法: 修改settings.py文件,注释掉 django.middleware.csrf.CsrfViewMiddleware', 阅读全文
posted @ 2020-07-17 00:19 anobscureretreat 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 选择导出 选择选中记录 阅读全文
posted @ 2020-07-14 11:31 anobscureretreat 阅读(420) 评论(0) 推荐(0) 编辑
摘要: https://www.chromedownloads.net/chrome64osx-stable/1003.html 阅读全文
posted @ 2020-07-02 14:56 anobscureretreat 阅读(1787) 评论(0) 推荐(0) 编辑
摘要: sqlite3 官网:https://www.sqlite.org/download.html 图片 code #更新SQLite 3 #获取源代码(在主目录中运行) [root@djangoServer ~]# cd ~ [root@djangoServer ~]# wget https://ww 阅读全文
posted @ 2020-05-14 18:41 anobscureretreat 阅读(769) 评论(0) 推荐(0) 编辑
摘要: code Linux >>> import django >>> django.VERSION Windows python -m django --version 阅读全文
posted @ 2020-05-14 18:03 anobscureretreat 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 解决方法1,给django降级 卸载django: pip uninstall django 安装低版本: pip install django==2.1.8 解决方法2,升级sqlite #更新SQLite 3 #获取源代码(在主目录中运行) [root@djangoServer ~]# cd ~ 阅读全文
posted @ 2020-05-14 17:51 anobscureretreat 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 解决方法 https://www.cnblogs.com/sea-stream/p/10388303.html 阅读全文
posted @ 2020-05-14 17:43 anobscureretreat 阅读(461) 评论(0) 推荐(0) 编辑
摘要: code pip3 install requests 阅读全文
posted @ 2020-05-12 22:36 anobscureretreat 阅读(129) 评论(0) 推荐(0) 编辑
摘要: code pip3 install bs4 阅读全文
posted @ 2020-05-12 22:35 anobscureretreat 阅读(521) 评论(0) 推荐(0) 编辑
摘要: code bool(re.search(r'\d', str)) 阅读全文
posted @ 2020-05-12 19:19 anobscureretreat 阅读(13509) 评论(0) 推荐(0) 编辑
摘要: code # 提供了两个列表,对相同位置的列表数据进行相加 >>> map(lambda x, y: x + y, [1, 3, 5, 7, 9], [2, 4, 6, 8, 10]) [3, 7, 11, 15, 19] 阅读全文
posted @ 2020-05-12 14:38 anobscureretreat 阅读(398) 评论(0) 推荐(0) 编辑
摘要: code >>> l1=[1,2,3,4,5,6] >>> l2=[4,5,6,7,8,9] >>> print(dict(zip(l1,l2))) {1: 4, 2: 5, 3: 6, 4: 7, 5: 8, 6: 9} 阅读全文
posted @ 2020-05-12 13:45 anobscureretreat 阅读(672) 评论(0) 推荐(0) 编辑
摘要: gif 阅读全文
posted @ 2020-05-09 15:38 anobscureretreat 阅读(313) 评论(0) 推荐(0) 编辑
摘要: 这个问题导致的原因是我用的是同一个支付宝账号,也就是收款支付宝和付款支付宝一样的,所以才导致此问题出现了,这是低级错误,解决方法:退出该支付宝账号,重新换另一个支付宝账号,再尝试扫一扫支付,此问题便解决了 阅读全文
posted @ 2020-05-09 11:23 anobscureretreat 阅读(1723) 评论(0) 推荐(0) 编辑
摘要: 错误原因: 这是一个SSL证书验证错误,当请求一个https站点,但是证书验证错误时,就会报这样的错误。 解决方法: 只需在代码中加入如下两行将跳过证书的检查,即可成功访问网页。 import ssl ssl._create_default_https_context = ssl._create_u 阅读全文
posted @ 2020-05-08 23:11 anobscureretreat 阅读(329) 评论(0) 推荐(0) 编辑
摘要: code import time import datetime t1=time.time() time.sleep(5) t2=time.time() print("相差",(datetime.datetime.fromtimestamp(t2)-datetime.datetime.fromtim 阅读全文
posted @ 2020-05-08 17:09 anobscureretreat 阅读(3338) 评论(0) 推荐(0) 编辑
摘要: code import time import datetime t=datetime.datetime.now() #当前日期 t1 =t.strftime('%Y-%m-%d %H:%M:%S') #转为秒级时间戳 ts1=time.mktime(time.strptime(t1, '%Y-%m 阅读全文
posted @ 2020-05-08 16:47 anobscureretreat 阅读(4091) 评论(0) 推荐(0) 编辑
摘要: 在img标签里面只设置宽,不设置高,图片就会等比例缩放。 阅读全文
posted @ 2020-05-07 16:52 anobscureretreat 阅读(7822) 评论(0) 推荐(1) 编辑
摘要: code def g_h_filter(data,x0,dx,g,h,dt=1.0,pred=None): x=x0 results=[] for z in data: x_est=x+(dx*dt) dx=dx if pred is not None: pred.append(x_est) res 阅读全文
posted @ 2020-05-03 15:25 anobscureretreat 阅读(855) 评论(0) 推荐(0) 编辑
摘要: code # 通过用户输入数字计算阶乘 # 获取用户输入的数字 num = 4 factorial = 1 # 查看数字是负数,0 或 正数 if num < 0: print("抱歉,负数没有阶乘") elif num == 0: print("0 的阶乘为 1") else: for i in 阅读全文
posted @ 2020-05-03 15:22 anobscureretreat 阅读(278) 评论(0) 推荐(0) 编辑
摘要: code # 获取用户输入十进制数 dec = 255 print("十进制数为:", dec) print("转换为二进制为:", bin(dec)) print("转换为八进制为:", oct(dec)) print("转换为十六进制为:", hex(dec)) 阅读全文
posted @ 2020-05-03 15:21 anobscureretreat 阅读(232) 评论(0) 推荐(0) 编辑
摘要: code # 最简单的 print(max(1, 2)) print(max('a', 'b')) # 也可以对列表和元组使用 print(max([1,2])) print(max((1,2))) # 更多实例 print("80, 100, 1000 最大值为: ", max(80, 100, 阅读全文
posted @ 2020-05-03 15:20 anobscureretreat 阅读(1736) 评论(0) 推荐(0) 编辑
摘要: code # Python 判断奇数偶数 # 如果是偶数除于 2 余数为 0 # 如果余数为 1 则为奇数 num = 34 if (num % 2) == 0: print("{0} 是偶数".format(num)) else: print("{0} 是奇数".format(num)) 阅读全文
posted @ 2020-05-03 15:18 anobscureretreat 阅读(3289) 评论(0) 推荐(0) 编辑
摘要: code def is_number(s): try: float(s) return True except ValueError: pass return False # 测试字符串和数字 print(is_number('foo')) # False print(is_number('1')) 阅读全文
posted @ 2020-05-03 15:17 anobscureretreat 阅读(450) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 68 下一页