Skip to content

Instantly share code, notes, and snippets.

@HGladiator
HGladiator / README.md
Created May 23, 2018 07:48 — forked from curran/README.md
The Iris Dataset

This is the "Iris" dataset. Originally published at UCI Machine Learning Repository: Iris Data Set, this small dataset from 1936 is often used for testing out machine learning algorithms and visualizations (for example, Scatter Plot). Each row of the table represents an iris flower, including its species and dimensions of its botanical parts, sepal and petal, in centimeters.

The HTML page provides the basic code required to load the data and display it on the page (as JSON) using D3.js.

Built with blockbuilder.org

web counter
@HGladiator
HGladiator / HBaseNewAPI.scala
Created March 20, 2018 03:50 — forked from wuchong/HBaseNewAPI.scala
Spark 下 操作 HBase 1.0.0 新版API
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.{HColumnDescriptor, HTableDescriptor, TableName, HBaseConfiguration}
import org.apache.hadoop.hbase.client._
import org.apache.spark.SparkContext
import scala.collection.JavaConversions._
/**
* HBase 1.0.0 新版API, CRUD 的基本操作代码示例
**/
object HBaseNewAPI {
@HGladiator
HGladiator / Docker.md
Last active March 8, 2018 03:40
Docker

Docker

三个组件分别是:

  1. Docker Client 是用户界面,它支持用户与Docker Daemon之间通信。
  2. Docker Daemon运行于主机上,处理服务请求。
  3. Docker Index是中央registry,支持拥有公有与私有访问权限的Docker容器镜像的备份。 三个基本要素分别是:
  4. Docker Containers负责应用程序的运行,包括操作系统、用户添加的文件以及元数据。
  5. Docker Images是一个只读模板,用来运行Docker容器。
  6. DockerFile是文件指令集,用来说明如何自动创建Docker镜像。
@HGladiator
HGladiator / HBase
Created March 8, 2018 03:33
大数据平台之HBase分布式安装
当前安装的版本:HBase 1.2.6
curl -SL https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/1.2.6/hbase-1.2.6-bin.tar.gz | tar zx -C /usr/local && \
ln -s /usr/local/hbase-1.2.6-bin $HBASE_HOME && \
@jdk
@ZooKeeper
@vim /etc/profile
export HBASE_HOME=/usr/local/hbase
@HGladiator
HGladiator / tar.txt
Created February 26, 2018 08:46
Linux下 解压与压缩
.tar
解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName
(注:tar是打包,不是压缩!)
———————————————
.gz
解压1:gunzip FileName.gz
解压2:gzip -d FileName.gz
压缩:gzip FileName
@HGladiator
HGladiator / MAC.txt
Last active January 19, 2018 06:16
ALL MAC (MA-L, MA-M, MA-S)
# http://standards-oui.ieee.org/oui/oui.txt
# https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries
OUI/MA-L                                                   Organization                                
company_id Organization
Address
E0-43-DB (hex) Shenzhen ViewAt Technology Co.,Ltd.
E043DB (base 16) Shenzhen ViewAt Technology Co.,Ltd.
9A,Microprofit,6th Gaoxin South Road, High-Tech Industrial Park, Nanshan, Shenzhen, CHINA.
shenzhen guangdong 518057
@HGladiator
HGladiator / agents.py
Last active December 23, 2017 09:18
spider‘s agents
# -*- coding: utf-8 -*-
# Last modified: 2016-11-16 15:12
# Filename: agents.py
# Description:
AGENTS = [
"Mozilla/5.0 (Amiga; U; AmigaOS 1.3; en; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14",
"Mozilla/5.0 (AmigaOS; U; AmigaOS 1.3; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15",
"Mozilla/5.0 (AmigaOS; U; AmigaOS 1.3; en; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14",
"Mozilla/5.0 (Android 2.2; Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4",
@HGladiator
HGladiator / git_toturial
Last active December 18, 2017 08:58 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git init [project-name] # 新建一个目录,将其初始化为Git代码库
git config --list # 显示当前的Git配置
git config -e --global # 编辑Git配置文件
git config --global user.name "xxx" # 配置用户名
git config --global user.email "[email protected]" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
@HGladiator
HGladiator / ScalaHBaseExample.scala
Created November 6, 2017 09:28 — forked from ishassan/ScalaHBaseExample.scala
A hello world example about connecting Scala to HBase
//CHECK ishassan/build.sbt as well
import org.apache.hadoop.hbase.client._
import org.apache.hadoop.hbase.util.Bytes
import org.apache.hadoop.hbase.{CellUtil, HBaseConfiguration, TableName}
import org.apache.hadoop.conf.Configuration
import scala.collection.JavaConverters._
object ScalaHBaseExample extends App{
def printRow(result : Result) = {