文章

[python] mov (video) to gif

 from moviepy.editor import VideoFileClip videoClip = VideoFileClip("wrap.mov") videoClip = videoClip.resize(height=400) videoClip.write_gif("my-life.gif", fuzz = 90, fps = 3)

Mac 環境變量

  vim ~/.bash_profile .bash_profile:每個用戶都可使用該文件輸入專用於自己使用的shell信息,當用戶登錄時,該 文件僅僅執行一次!默認情況下,他設置一些環境變量

[mac] ipconfig

  ipconfig getifaddr en0

Export/Backup anaconda environment

conda env export > environment.yml

How to install Xubuntu desktop on Ubuntu 18.04 Bionic Beaver Linux

Install Prerequisites We will be using the  tasksel  command to perform the installation of Xubuntu graphical environment. Let's start by install of  tasksel .  Open up terminal  and enter: $ sudo apt install tasksel Install Xfce desktop on Ubuntu 18.04 Now that we have the  tasksel  command available to our disposal, begin Xubunu desktop installation by executing the bellow command: $ sudo tasksel install xubuntu-desktop

selenium tor

#!/usr/bin/env python # coding: utf-8 # In[6]: from selenium import webdriver import pandas as pd import time import subprocess # In[15]: chrome_options = webdriver.ChromeOptions() chrome_options.add_argument( "--proxy-server=socks5://127.0.0.1:9050" ) driver = webdriver.Chrome( '/home/dslinux/code-tools/chromedriver' , chrome_options =chrome_options ) driver.get( "https://check.torproject.org/" ) driver.page_source p = subprocess.Popen([ 'sudo' , 'service' , 'tor' , 'reload' ], stdin =subprocess.PIPE) p.stdin.write( ( 'dslinux' + ' \n ' ).encode() ) p.stdin.flush() # In[ ]: # In[ ]:

Tor installation ubuntu

Tor  installation The installation of  Tor  depends on your system, and is detailed on the  official website . On a  Debian  or  Raspbian , we use: sudo apt-get install tor To launch  Tor , just run: sudo service tor start