GithubHelp home page GithubHelp logo

sdpython / pyensae Goto Github PK

View Code? Open in Web Editor NEW
34.0 9.0 31.0 15.77 MB

Helpers for teaching materials in python at the ENSAE

Home Page: http://www.xavierdupre.fr/app/pyensae/helpsphinx/index.html

License: MIT License

Python 77.73% Shell 0.02% ANTLR 3.24% Batchfile 0.05% Jupyter Notebook 18.87% R 0.08% CSS 0.02%
python3 helpers teaching-materials ensae

pyensae's Introduction

https://github.com/sdpython/pyensae/blob/master/_doc/sphinxdoc/source/_static/project_ico.png?raw=true

pyensae: hide complexity for teachings

Build status Build Status Windows https://circleci.com/gh/sdpython/pyensae/tree/master.svg?style=svg MIT License https://codecov.io/github/sdpython/pyensae/coverage.svg?branch=master GitHub Issues Notebook Coverage Downloads Forks Stars Downloads Forks Stars

This project contains helpers used at the ENSAE for teachings available at ENSAE - Programmation - Xavier Dupré. It was the first module created for that usage. It does not have a clear purpose except hiding some annoying logic and shorten notebooks. It can:

  • retrieve data for practical lessons
  • import a tsv file into a database
  • retrieve stock prices from Yahoo Finance

It implements a couple of magic commands to play with SQLite3 in a notebook and easily show the head or tail of a text file. It can fill missing values in timeseries with add_missing_indices or download data from a website, a helper to change the size of folium maps or some grammar to parse language such as R or SQL. It also implements a basic way to convert a R script into nasty Python.

Links:

pyensae's People

Contributors

loganylchen avatar ped4747 avatar sdpython avatar xadupre 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyensae's Issues

Would this work for a R Script with external libraries?

Hello, sorry if this has been asked before already.

Would this "convert R script into python code" module work for a R script with external libraries? I suspect it doesn't and that is alright, but I'm looking for something that does - although I'm not sure it exists.

The reason I ask is that my script possess quite a few libs, such as :

library(officer)
library(dplyr)
library(tidyr)
library(DatastreamDSWS2R)
library(ggrepel)
library(lubridate)
library(magrittr)
library(data.table)
library(zoo)
library(rvg)
library(aws.s3)

fix download_data

try: download_data(os.path.split(filenamegz)[-1], whereTo="."), temporary folder does not always work

What is python2r_helper and how to get that?

Hi,
First of all this an awesome library, I am using it to convert R code to Python. Here is my question.
I see for most of the functions like tuples and classes in R, this library is generating Python code from python2r_helper import make_tuple/make_class respectively. So what does this module do and I am unable to install using PIP. Please help me with this.
Another help I would need is, it would be great if you could suggest to me the approach to convert R dataframe to Pandas dataframe and respective methods.

Thanks for your help in advance.

r2python import error

hi,

Thanks for the amazing work!

While running following

from pyensae.languages import r2python

I get following error: ImportError: cannot import name 'r2python' from 'pyensae.languages' (/home/ajnadk/anaconda3/lib/python3.8/site-packages/pyensae/languages/init.py)

In the 'languages folder I couldn't find the r2python file as well, Please help

Misaligned cbar...

Hi,

here is a short note/message... When using the Corrplot class and adding a colorbar, the ticks were a bit misaligned.
I modified the plot function to return the cbar object and then re-define the ticks by so

scalarmap = cm.ScalarMappable(norm=mcolors.Normalize(*[-1, 1]), cmap='seismic_r') cb_obj.update_normal(scalarmap) cb_obj.set_ticks([-1, -0.5, 0, 0.5, 1]) cb_obj.ax.tick_params(size=0)
This, somehow, did make a proper alignment of the ticks

Python 2 vs Python 3

pyensae has some serious Python 2 / Python 3 issues:

  • antlr4: from __builtin__ import unicode, range -> Works only in Python 2
  • Pyensae can only be installed with Python 3:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-c6mwun/pyensae/setup.py", line 110
        raise ImportError(message) from e
                                      ^
    SyntaxError: invalid syntax

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.