(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| #!/bin/bash | |
| # play YUV444 FULL HD file | |
| gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ | |
| videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \ | |
| videoconvert ! \ | |
| autovideosink | |
| # play YUV422 FULL HD file | |
| gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \ |
| /* | |
| * As of May 25 2021, this code is provided as CC0 / public domain (Kazuho Oku) | |
| * | |
| * Copyright (c) 2014 Kazuho Oku | |
| * | |
| * Redistribution and use in source and binary forms, with or without modification, | |
| * are permitted. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
| # Copy and self modified from ys.zsh-theme, the one of default themes in master repository | |
| # Clean, simple, compatible and meaningful. | |
| # Tested on Linux, Unix and Windows under ANSI colors. | |
| # It is recommended to use with a dark background and the font Inconsolata. | |
| # Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
| # http://xiaofan.at | |
| # 2 Jul 2015 - Xiaofan | |
| # Machine name. | |
| function box_name { |
| [General] | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114 | |
| loglevel = notify | |
| [Proxy] | |
| BJ-All = custom | |
| BJ-HK-Azure = custom | |
| BJ-US-Azure = custom |
| [General] | |
| loglevel = notify | |
| skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
| bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
| # dns-server = 119.29.29.29,223.5.5.5,114.114.115.115 | |
| # external-controller-access = [email protected]:6155 | |
| # ipv6 = true | |
| // REMEMBER TO CHANGE THE external-controller-access' PASSWORD |
| These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
| To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
| USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
| ABSOLUTELY NO WARRANTY. | |
| If you are still reading let's carry on with the code. | |
| sudo apt-get update && \ | |
| sudo apt-get install build-essential software-properties-common -y && \ | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
| from pyspark.sql import SQLContext | |
| from pyspark import SparkConf, SparkContext | |
| from pyspark.ml.recommendation import ALS | |
| from pyspark.ml.tuning import CrossValidator, ParamGridBuilder | |
| from pyspark.ml.evaluation import RegressionEvaluator | |
| from math import sqrt | |
| from operator import add | |
| conf = (SparkConf() |