05 2017 档案
SBT 打包本地文件
摘要:Publish: http://www.scala-sbt.org/0.13/docs/Publishing.html REF: http://www.scala-sbt.org/0.13/docs/Library-Dependencies.html resove:http://stackoverf
阅读全文
Apply a Function over a List or Vector
摘要:Apply a Function over a List or Vector Description lapply returns a list of the same length as X, each element of which is the result of applying FUN
阅读全文
RStudio快捷键
摘要:控制台 代码区 Editing (Console and Source) Completions (Console and Source) Views Build Plots Git/SVN
阅读全文
R语言中"NA"与"NULL"的区别
摘要:在R语言中,缺失值用 NA 表示,空值用 NULL 表示。初学者在学习R语言时,一般都会被这两者弄糊涂,常常错误地把这两者视为等价的。 下面,通过代码演示来说明它们的不同: 首先看 NA : x <- vector(length=3); x [1] FALSE FALSE FALSE FALSE F
阅读全文
R httr 文档
摘要:httr quickstart guide The goal of this document is to get you up and running with httr as quickly as possible. httr is designed to map closely to the
阅读全文
使用 Setup 将Python 代码 打包
摘要:完成源码后将代码打成安装包: 1. 我的源代码结构如下: pack | src | - common http user | - lib | - factory.py 2. 实现setup.py 执行 setup.py 同级目录生成一个dist文件夹,里面是 sdk1.0.tar.gz 之后就可以解
阅读全文
Python 单例
摘要:方法一 实现__new__方法,然后将类的一个实例绑定到类变量_instance上;如果cls._instance为None,则说明该类还没有被实例化过,new一个该类的实例,并返回;如果cls._instance不为None,直接返回_instance,代码如下 方法二 本质上是方法一的升级版,使
阅读全文
Python 定义抽象类
摘要:from abc import ABCMeta, abstractmethod class DataSet(object): __metaclass__ = ABCMeta def __init__(self): print("Abstract DataSet") @abstractmethod def read(self, conf): ...
阅读全文
Python模块学习——optparse
摘要:Python 有两个内建的模块用于处理命令行参数: 一个是 getopt,《Deep in python》一书中也有提到,只能简单处理 命令行参数; 另一个是 optparse,它功能强大,而且易于使用,可以方便地生成标准的、符合Unix/Posix 规范的命令行说明。 示例 下面是一个使用 opt
阅读全文
如何制作自己的R包?
摘要:如何制作自己的R包? 摘自 方匡南 等编著《R数据分析-方法与案例详解》.电子工业出版社R包简介R包提供了一个加载所需代码、数据和文件的集合。R软件自身就包含大约30种不同功能的包,这些基本包提供了R软件的基本功能。与此同时,R作为一个开源软件,它提供了各种统计计算函数,从而方便使用者能够灵活机动的
阅读全文
Scala编码规范
摘要:Scala编码规范 时间 2015-01-30 16:38:00 逸思 原文 http://zhangyi.farbox.com/post/scala-coding-standard 主题 Scala 时间 2015-01-30 16:38:00 逸思 原文 http://zhangyi.farbo
阅读全文
Akka Terminated
摘要:package aia.faulttolerance import akka.actor._ import akka.actor.Terminated object DbStrategy2 { class DbWatcher(dbWriter: ActorRef) extends Actor with ActorLogging { context.watch(dbWriter)...
阅读全文
Scala + Play get resource Path
摘要:// runnermap is the file name in resourcesgetClass.getClassLoader.getResource("runnermap").getPath
阅读全文
浙公网安备 33010602011771号