GithubHelp home page GithubHelp logo

yasharsajadi / rentry-lab Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 21 KB

To easy transfer of codes to rentry.co

Home Page: https://test.pypi.org/project/rentrylab/

License: MIT License

Python 100.00%
rentrylab easy rentry rentryco easy-to-use get-code send-code linux windows python-any-where

rentry-lab's Introduction

Rentry Lab

This is a project related to Rentry.co, which makes the projects defined as code in Rentry to be easily downloaded and sent from Linux and Windows environments. This project is designed for Linux and Windows OS. For how to use them, the following educational videos are located in the following links:

Instruction

Windows:

  1. Install Git Then add the ./git/bin path to environment paths.
  2. Install Rentry Project
pip install rentry
  1. Install rentrylab
pip install -i https://test.pypi.org/simple/ rentrylab

Linux:

  1. Install Rentry Project
wget https://raw.githubusercontent.com/radude/rentry/master/rentry -O ./rentry && chmod +x ./rentry
  1. Install rentrylab
pip3 install -i https://test.pypi.org/simple/ rentrylab

Usage

To Create URL:

To create a new URL, just run the following command using RentryLab: Please follow the rules of rentry.co, do not spam and avoid creating unnecessary URLs.

import os ; from rentrylab import RentryLab
RentryLab.myrentry().CreateRentry("https://rentry.co/NewPage011",'password',os.path.join(os.path.dirname(__file__)),StartText='Built with RentryLab'):

To Send Code:

To send a code file to rentry.co, just add these two lines to the end of your file("Send.py"), and run it, your file will be uploaded. Be careful, RentryLab will not upload your last 3 lines containing the following commands:

import os ; from rentrylab import RentryLab
RentryLab.myrentry().SendToRentry("https://rentry.co/NewPage011",'password',os.path.join(os.path.dirname(__file__)),'Send','python','.py',['#YourHeader' , '**Python Language**'])

To Get Codes:

To get codes file from rentry.co, just type these two lines of code at the beginning of your file("Receive.py") and run it, your file will be updated. This method extracts all parts of a URL containing Python codes.

import os ; from rentrylab import RentryLab
RentryLab.myrentry().GetFromRentry("https://rentry.co/NewPage011",os.path.join(os.path.dirname(__file__)),"Receive","python",".py")

To Send Data:

To send dictionary data, proceed as follows: First, create an url page for data (Here Data1). Then, create a dictionary or create it with your own algorithm (Here Dict). Finally, send it to the generated URL.

import os ; from rentrylab import RentryLab
RentryLab.myrentry().CreateRentry("https://rentry.co/Data1",'password',os.path.join(os.path.dirname(__file__)),StartText='To Test Data'):
Dict = {'Headers' : ['DEPTH','BS','CALI','GR','DT','RT','PHIE'],
        'r0' : [1829.2572,12,22.0052,46.6003,117.0969,0.879,0.052045],
        'r1' : [1829.4096,12,21.9816,46.2312,'Cell','Cell','Cell'],
        'r2' : [1829.4096,12,21.9816,46.2312,'Cell','Cell','OK']}
RentryLab.myrentry().SendDataToRentry('https://rentry.co/Data1','password',os.path.join(os.path.dirname(__file__)),Dict,HeaderList=['# Data1','## Added with RentryLab'])

To Get Data:

You can get URL tables data as List of Dictionary:

import os ; from rentrylab import RentryLab
DictList = RentryLab.myrentry().GetDataFromRentry('https://rentry.co/Data1',os.path.join(os.path.dirname(__file__)))
# print(DictList)

To Append Code:

This method adds code to the Top or Down of a URL: Here we added the contents of the Append.py file to Down of URL.

import os ; from rentrylab import RentryLab
RentryLab.myrentry().AppendToRentry("https://rentry.co/NewPage011",'NewPage011',os.path.join(os.path.dirname(__file__)),'Append','python','.py','Down',['## Append','!!!note End Row'])

To Append Data:

This method adds table data to the Top or Down of a URL: Here we added the contents of the Dict1 to Top of URL.

import os ; from rentrylab import RentryLab
Dict1 = {'Headers' : ['DiPTH','BS','CALI','GR','DT','QT'],
        'r0' : [1829.2572,12,22.0052,46.6003,117.0969,0.879],
        'r1' : [1829.4096,12,21.9816,46.2312,'Cell','Nan'],
        'r2' : [1829.4096,12,21.9816,46.2312,'GO','NOW']}
RentryLab.myrentry().AppendDataToRenty('https://rentry.co/Data1','Data1',os.path.join(os.path.dirname(__file__)),Dict1,'Top',HeaderList=['!!!danger 5:40 5/22/2023','## Data Append to Top'])

Do you want to see how to Send or Get Codes visually?

Send and Get Code to Windows

Send and Get Code to Linux

Send and Get Code to PythonAnyWhere

Do you want to see how works all syntax visually?

Create/Send/Append/Get Codes and Table Data on Windows

rentry-lab's People

Contributors

yasharsajadi avatar

Stargazers

 avatar

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.