See also:
LearnPython, the Language Pandas
#
Get column_nr in pandas/numpy.
if isinstance(X, pd.DataFrame): X_is_df = True row_nr = X.shape[0] column_nr = X.shape[1] if isinstance(X.columns, pd.core.index.MultiIndex): df_columns_is_multi_index = True else: df_columns_is_multi_index = False else: # non-DF X_is_df = False row_nr = np.shape(X)[0] column_nr = np.shape(X)[1] use dataframe directly against spark
#
lib Optimus
from optimus import Optimus op = Optimus(master="local") df = op.create.df(<some data>) ... Sourcing/Importing
#
execfile or os.system
#
execute the other python file in place:
...
execfile or os.system
#
execute the other python file in place:
execfile("/path/to/my/lib/mylib.py") or:
import os os.system("python /path/to/my/lib/mylib.py") import
#
import sys import os sys.path.append(os.path.abspath("/path/to/my/lib")) import mylib ref
#
See other methods here.
UBUNTU 20.04
#
New command: ip & ss.
ubuntu.com
check & setup nic in cli
#
check hardware info (canNOT guarantee it is up?):
ethtool -i wlp4s0 config ip & gateway:
ip link set dev wlp4s0 up dhclient wlp4s0 ip route add 192.168.50.1 dev wlp4s0 ip route add default via 192.168.50.1 UBUNTU 18.04 dated
#
Check the physical NIC is connected.
lspci Note: The NIC will be shown regardless if drivers are installed, this is a PCI feature.
...
OBS: cloning a VM with the status of pause (not powered-off), it canNOT re-initialize the MAC address. Thus, it is necessary to disconnect the cable and poweroff to re-initialize the MAC and then boot.
INSTALL ON UBUNTU
#
Tested on v18.04.
sudo apt-get update && \ sudo apt-get -y install virtualbox (sometimes, maybe need to prepare the env before installation:)
sudo apt-get update && \ sudo apt-get -y install gcc make linux-headers-$(uname -r) dkms && \ wget -q https://www.
...
The insomnia client is used, (Postman is too slow, SoapUI has not been tested).
(updated: tested hadoop 3.1.3 on Ubuntu 1804)
Install
#
sudo mkdir -p /usr/lib/jvm sudo tar -zxvf ./jdk-8u162-x64.tar.gz -C /usr/lib/jv vim ~/.bashrc export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_162 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH # new terminal java -version echo $JAVA_HOME sudo tar -zxf hadoop-3.1.3.tar.gz -C /usr/local sudo mv /usr/local/hadoop-3.1.3/ /usr/local/hadoop sudo chown -R hadoop:hadoop /usr/local/hadoop /usr/local/hadoop/bin/hadoop version Config (pseudo-distributed 伪分布式配置)
#
cd /usr/local/hadoop 注:一旦添加了 core-site.xml 以下配置,则无法进行 stand-alone 单机运行?。
gedit ./etc/hadoop/core-site.xml <configuration> <property> <name>hadoop.tmp.dir</name> <value>file:/usr/local/hadoop/tmp</value> <description>Abase for other temporary directories.
...
Install & Basic Config
#
install
#
sudo apt-get install isc-dhcp-server interfaces
#
vi /etc/default/isc-dhcp-server
INTERFACES="eth0 eth1 eth2" config network param
#
vi /etc/dhcp/dhcpd.conf
# ns servers separated by comma "," ! ! ! option domain-name-servers 10.0.0.1, 10.0.0.2; # lease time in sec: -1 for infinity. default-lease-time -1; max-lease-time -1; # a very basic subnet declaration: subnet 10.0.0.0 netmask 255.255.255.0 { interface enp0s3; # optional range 10.0.0.150 10.0.0.254; # separated by space " " option routers 10.
...
Firstly, address changed: DMML.nu
Secondly, reason. I thought high price lead to good service, but I was wrong:
Four days host failure, and I lost all files.
Fortunately, I have backups.
Besides, wordpress is too heavy, I need a light weighted platform.
[04.07.2013 21:19 (fr. gplus)] [<p class='attachment_article_content'>Wiktionary RDF extraction. Currently available languages: English, German, French, Russian In the works: Greece, Vietnamese Need data from other languages? Help us creating wrappers for each language editions (if you know Regex, XML and Wiktionary, an initial wrapper can be created in less than ... ](http://wiki.dbpedia.org/Wiktionary?show_files=1)
Digest powered by RSS Digest
[01.07.2013 21:38 (fr. gplus)] [<p class='attachment_article_content'>Your News. Delivered. Stay current. Learn. Get inspired. ](http://cloud.feedly.com/)
[digg reader (fr. gplus)] digg reader [<p class='attachment_article_content'>Welcome to Digg ](http://digg.com/reader)
[21.06.2013 15:21 (fr. gplus)] [<p class='attachment_article_content'>A collection of some simple plugins and pieces of code. ](http://welldonethings.com/)
[Reshared post from 李俊: (fr. gplus)] **[Original Post (fr. gplus)] :** 目前找到的看着最舒服的基于twitter bootstrap的tags manager
[<p class='attachment_article_content'>A tags manager or tags handler or tag input helper to manage tags in a form, it's a jquery plugin for bootstrap.
...