Skip to content

Instantly share code, notes, and snippets.

@liziwl
liziwl / docker-compose.yaml
Created February 1, 2022 06:09 — forked from dnno/docker-compose.yaml
Docker-compose setup for Vaultwarden
version: '3'
services:
bitwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true
- SIGNUPS_ALLOWED=false
@liziwl
liziwl / bvtest.py
Created March 24, 2020 03:07 — forked from abc1763613206/bvtest.py
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@liziwl
liziwl / gen_logs.py
Created January 4, 2019 02:53
python 重定向
f_handler=open('out.log', 'w')
sys.stdout=f_handler
print('hello')
# this hello can't be viewed on concole
# this hello is in file out.log
f_handler.close()
import sys
f=open('a.txt','w')
old=sys.stdout #将当前系统输出储存到一个临时变量中
@liziwl
liziwl / Pytorch相关命令.md
Last active January 4, 2019 03:00
深度学习相关命令

conda设置代理

用户目录下.condarc

proxy_servers:
    http: http://127.0.0.1:1080
    https: https://127.0.0.1:1080
@liziwl
liziwl / hexo-code-list.md
Created May 6, 2018 02:12
hexo code block in bullet lists problem
  1. This is the start of a new bullet list. Hey, where is my fenced code? ``` Code More Code

2.  Well that was disappointing. How about we indent and use backticks together?
       ```
       Code
       More Code
@liziwl
liziwl / 华为历年机试题集合.md
Last active June 19, 2024 10:47
华为机考习题集

华为历年机试题集合


华为机试共3道题,分值分别为60,50,40。时长2小时,上机环境支持语言包括C/C++/Java

搜集的题目均来自网络:
题1~3 code
题4~6 code
题7 code
题8~9 code

@liziwl
liziwl / ros_odometry_publisher_example.py
Created April 24, 2018 07:56 — forked from atotto/ros_odometry_publisher_example.py
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@liziwl
liziwl / Ubuntu 禁用关闭笔记本盖子自动待机
Created March 19, 2018 09:37
Ubuntu 禁用关闭笔记本盖子自动待机
Ubuntu 禁用关闭笔记本盖子自动待机
这个问题需要修改 Login Manager 配置文件
打开终端输入如下命令: 修改 HandleLidSwitch 项,其值修改成 ignore
sudo vi /etc/systemd/logind.conf
然后将其中的:
#HandleLidSwitch=suspend
改成:
@liziwl
liziwl / fix_gazebo.md
Last active March 19, 2018 09:36
解决gazebo启动错误

参考链接:link

错误信息

~$ gazebo
Gazebo multi-robot simulator, version 2.2.3
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
@liziwl
liziwl / install-google-chrome.md
Created March 14, 2018 03:42 — forked from smmoosavi/install-google-chrome.md
Ubuntu 14.04 installing google chrome

When you got this error

$ sudo dpkg -i google-chrome-stable_current_amd64.deb 
sudo: unable to resolve host bayanca05
[sudo] password for bayan-ca-05: 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 174654 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (43.0.2357.81-1) ...