Yuan Tian's Blog

纸上得来终觉浅,绝知此事要躬行


  • 首页

  • 标签

  • 分类

  • 归档

  • 搜索

IPython Notebook

发表于 2016-12-07 | 分类于 Python

1 快捷键

Shift+Enter:运行当前 cell,并移动到下一个 cell
Ctrl+Enter:运行当前 cell

2 设置工作路径

2.1 设置临时工作路径(没有成功)

阅读全文 »

GraphLab Create & SFrame

发表于 2016-12-07 | 分类于 Python

1 启动 GraphLab Create

The first time you use GraphLab create, you must enter a product key to license the software for non-commerical academic use. To register for a free one-year academic license and obtain your key, go to dato.com.

阅读全文 »

Python交互小游戏(三):Pong——Lists,keyboard input,the basics of modeling motion

发表于 2016-12-04 | 分类于 Python

1 Keyboard Input(键盘输入)

阅读全文 »

Python交互小游戏(二):Stopwatch——Canvas,drawing,timers

发表于 2016-12-03 | 分类于 Python

We will focus on combining text drawing in the canvas with timers to build a simple digital stopwatch that keeps track of the time in tenths of a second. The stopwatch should contain “Start”, “Stop” and “Reset” buttons.

阅读全文 »

Python交互小游戏(一):Guess the number——Event-driven programming,local/global variables

发表于 2016-12-03 | 分类于 Python

One of the simplest two-player games is “Guess the number”. The first player thinks of a secret number in some known range while the second player attempts to guess the number. After each guess, the first player answers either “Higher”, “Lower” or “Correct!” depending on whether the secret number is higher, lower or equal to the guess. In this project, you will build a simple interactive program in Python where the computer will take the role of the first player while you play as the second player.

阅读全文 »

HDFS的Java API

发表于 2016-11-24 | 分类于 Hadoop
  1. 在 eclipse 中新建一个 Java Project
  2. 导入依赖:右键 Project 名称,打开 Properties 选项卡,打开“Java Build Path”,选择“Libraries”,“Add External JARs”,将文件hadoop-1.1.2下 7 个 jar 包导入,如下图所示:
    HDFSJavaAPI_1
    阅读全文 »

HDFS的Shell操作

发表于 2016-11-23 | 分类于 Hadoop

命令形式:hadoop fs 具体操作
例:
查看目录下的文件:hadoop fs -ls 目录

1
2
3
[root@hadoop ~]# hadoop fs -ls /    查看根目录下的数据
Found 1 items
drwxr-xr-x - root supergroup 0 2016-11-19 04:49 /usr 说明该目录下有个“/usr”目录

查看目录下的文件:hadoop fs -lsr 目录

阅读全文 »

查看Hadoop源码

发表于 2016-11-20 | 分类于 Hadoop

在 eclipse 中新建 Java Project(笔者将 Project 简单粗暴的命名为“Hadoop”),将文件hadoop-1.1.2的\src文件夹下的文件夹\core、\hdfs、\mapred复制到新建的 Java Project 的\src下

但是此时 Project 的目录结构是不对的,并且缺少 jar 包

右键 Project 名称,打开 Properties 选项卡,选择“Java Build Path”,选择“Source”,将下面的“Hadoop/src”整个 Remove,然后 Add Folder,添加Hadoop下的src下的core、hdfs、mapred,然后 OK

阅读全文 »

搭建Hadoop伪分布式平台

发表于 2016-11-18 | 分类于 Hadoop

伪分布式:在一台机器上模拟出分布式环境

1 安装 VMware 或 VirtualBox

笔者很早就安装了 VMware 11

2 安装 CentOS

笔者从网上直接找了“VMware 专用 CentOS”,版本是 6.4,解压后直接用 VMware 打开即可
虚拟机的网络连接方式参见文章《Linux学习笔记(一)——Linux安装》第 5 小节,笔者在此使用的是 host-only 仅主机方式:

阅读全文 »
1…3456

50 日志
13 分类
38 标签
E-Mail
© 2021 Yuan Tian
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.4