Code Monkey home page Code Monkey logo

code's People

Contributors

dataprofessor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code's Issues

RStudio Session Aborted when importing Python packages into R

I have reviewed one of your Youtube video about how to import python packages into R but i met some problems when i doing the following.

library(reticulate)
reticulate::py_install(packages = "umap-learn")
repl_python()
import os
import umap

It's ok to do with import os but import umap gets my RStudio aborted

Reticulate is version: 1.24
R version 4.1.2
OS: Windows
Python version: 3.8.13

Pls can you help me figure out what's going wrong

R update not applied

Hello @dataprofessor, I just started to follow the "Web Apps in R: Build BMI Calculator web application in R for health monitoring | Shiny Tutorial Ep 5" tutorial. I´ve tried "run app" to get the pop-up window from the video and I encounter a problem:
Loading required package: shiny
Warning: package ‘shiny’ was built under R version 4.0.4
Warning: package ‘shinythemes’ was built under R version 4.0.5
Warning in file(con, "r") :
cannot open file 'about.md': No such file or directory
Error in file(con, "r") : cannot open the connection

I already tried "help">"check updates" and quitting but I only get a "you are using the newest version of R studio" message. Should I delete my current R and download directly the latest version? seems that the updates were not taken in my R studio.
Thanks a lot for your feedback :)

New in R

Professor I would like to get exercises to practice EDA in R. I'm new in this environment, I've been taking some courses and I'd like to practice.

Solved error in the Random Forest Model for ( code/shiny/004-iris-predictor/model.R )

@dataprofessor
If the code is run as is, it will display an error when building the Random Forest Model:

"Error in y - ymean : non-numeric argument to binary operator
In addition: Warning messages:..
."

That is because the "Species" column in the TrainSet is passed as char

Therefore, the model cannot be created and the app can't be run.

To solve it, we just need to pass the "Species" column to the TrainSet as factor after line 24:

TrainSet <- read.csv("training.csv", header = TRUE)
str(TrainSet)
#Since here "Species" is a char column,
#we convert it to a factor
TrainSet[,"Species"] <- as.factor(TrainSet[,"Species"])
TrainSet <- TrainSet[,-1]
str(TrainSet)
#Now "Species" is a factor with three levels ;)

This will keep the Sepal and Petal Length and Width as num, but turn the Species into a 3 - level factor.

Thanks for all of your lessons!
jzambrano-xyz

Any fix to rpy2 not being compatible with pandas >1.0?

/usr/local/lib/python3.6/dist-packages/rpy2/robjects/pandas2ri.py:14: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
/usr/local/lib/python3.6/dist-packages/rpy2/robjects/pandas2ri.py:34: UserWarning: pandas >= 1.0 is not supported.
warnings.warn('pandas >= 1.0 is not supported.')

Problem installing R magick package on google colab

Hello, I am seeking help with issue installing R magick package on google colab. First, I tried to do it in general way:
install.packages("magick")
and I get the output as follows:

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message in install.packages("magick"):
“installation of package ‘magick’ had non-zero exit status”

None of alternative solutions that I have found on kaggle like this one or this one worked in my case.

Can you please help me to figure out, what is the problem?

I can't activate my environment in the collab

I am in a class work in which I must develop a program in a virtual environment. My choice was '' Google Colab '', but when trying to activate my environment it always gives an error.

! conda create --name metawraptest-env python=3.7.10

WARNING: A conda environment already exists at '/usr/local/envs/metawraptest-env'
Remove existing environment (y/[n])? y

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /usr/local/envs/metawraptest-env

  added / updated specs:
    - python=3.7.10


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2021.4.13-h06a4308_1
  certifi            pkgs/main/linux-64::certifi-2020.12.5-py37h06a4308_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
  pip                pkgs/main/linux-64::pip-21.0.1-py37h06a4308_0
  python             pkgs/main/linux-64::python-3.7.10-hdb3f193_0
  readline           pkgs/main/linux-64::readline-8.1-h27cfd23_0
  setuptools         pkgs/main/linux-64::setuptools-52.0.0-py37h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.35.4-hdfb4753_0
  tk                 pkgs/main/linux-64::tk-8.6.10-hbc83047_0
  wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate metawraptest-env
#
# To deactivate an active environment, use
#
#     $ conda deactivate

But, when activating my environment, this appears:
$ conda activate metawraptest-env

File "<ipython-input-45-dbbb19337d51>", line 1
    $ conda activate metawraptest-env
    ^
SyntaxError: invalid syntax

Or this from here:
! conda activate metawraptest-env

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

I tried to use '' Shell '', but it also gave error when using
$ conda init <SHELL_NAME>

 File "<ipython-input-46-248a41531067>", line 1
    $ conda init <SHELL_NAME>
    ^
SyntaxError: invalid syntax

The environment was created, but I can't activate it...
! conda env list

# conda environments:
#
base                  *  /usr/local
metawraptest-env         /usr/local/envs/metawraptest-env

Code

Please help me to create a code

I cannot use the lazypredict under sklearn 0.23.1

error message appears related to the lazypredict (and sklearn conflictions?)

cannot import name '_raise_dep_warning_if_not_pytest' from 'sklearn.utils.deprecation' (C:\Users\USER\anaconda3\lib\site-packages\sklearn\utils\deprecation.py)

ITERATING SEQUENCE by index

colors = ['green', 'mustard', 'khaki']
for index in range(len(colors)):
print('Current color:', s[index])
print("Goodbye!")

R on VScode

How do i fix this error in R code on VS code any tips would help a ton.

✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()

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.