-
github上你可以用别人的现成的代码 直接 git clone 即可了
-
然后你也想改代码或者贡献代码咋办?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# kd-tree index and nearest neighbour search | |
# includes doctests, run with: python -m doctest kdtree.py | |
class KDTree(object): | |
""" | |
kd-tree spatial index and nearest neighbour search | |
http://en.wikipedia.org/wiki/Kd-tree | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
class ReadOnlyModelAdmin(admin.ModelAdmin): | |
""" | |
ModelAdmin class that prevents modifications through the admin. | |
The changelist and the detail view work, but a 403 is returned | |
if one actually tries to edit an object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[UTF8,10pt]{ctexart} | |
\usepackage[a4paper,%%textwidth=129mm,textheight=185mm, %%193-8 | |
text={160mm,260mm},centering]{geometry} | |
\pagestyle{empty} | |
\begin{document} | |
\title{用散点图示范ggplot2的核心概念} | |
\author{肖凯} | |
\maketitle | |
\abstract{ | |
本文稿是第五届R语言会议演讲内容的一部分,试图用散点图示例来说明ggplot2包的核心概念,以方便初学者快速上手。同时这也是笔者应用knitr包的一个练习。该示例所用数据是ggplot2包内带的mpg数据集。} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set.seed(42) | |
dat <- rnorm(1) | |
shinyServer(function(input, output) { | |
fetchData <- reactive(function() { | |
invalidateLater(1000) | |
qt <- rnorm(1) | |
dat <<- c(dat, qt) | |
dat | |
}) | |
output$plot_dat <- reactivePlot(function() { plot(fetchData(), type='l') }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(KFAS) | |
library(rstan) | |
data(GlobalTemp) | |
model_dlm1a <- stan_model("../stan/dlm1a.stan") | |
y <- as.matrix(GlobalTemp) | |
data <- | |
within(list(), | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: Slidify Playground | |
subtitle: Adapted from OpenCPU MarkdownApp | |
author: Ramnath Vaidyanathan | |
framework: io2012 | |
widgets: [mathjax] | |
--- | |
## Normal Distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ | |
if (USER$Logged == TRUE) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Shiny application is designed to help analysing trading strategies. It is an ongoing project that I improve when time allows. Feel free to get in touch should you have any suggestion. | |
*How to use the App as it is? | |
The App uses as input several csv files (one for each strategy). Each file has two columns: date and daily return. There is an example of such a file in the Github repository. The code is essentially made of 3 files. | |
-ui.R: controls the layout and appearance of the app | |
-server.R: contains the instructions needed to build the app. You can load as much strategies as you want as long as the corresponding csv file has the right format (see below). | |
-shinyStrategyGeneral.R: loads the required packages and launches the app | |
put ui.R and server.R file in a separate directory | |
In the server.R file change the inputPath, inputFile and keepColumns parameters to match your setting. The first two are self explanatory the third one is a list of column names within the csv file. Keep only date and daily return |
OlderNewer