Giter Site home page Giter Site logo

bootcamp's Introduction

lamr

package pytest replit

lamr is a content manager to organise and display markdown files and run Python code snippets.

It is a programming manual with code and exercises to get you started with small yet useful Python projects.

Quickstart

pip install lamr
lamr --help

In current version there are the following excercises and manuals available.

The calendar utility

>>> lamr show cal.py --all
>>> lamr run cal.py
Today is 2024-02-04

   February 2024
Mo Tu We Th Fr Sa Su
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 29

Make an ASCII art logo

>>> lamr show logo.py --all
>>> lamr run logo.py
Sample font: slant
Sample text: Python 3
ASCII art:
    ____             __     __                           _____
   / __ \   __  __  / /_   / /_   ____    ____          |__  /
  / /_/ /  / / / / / __/  / __ \ / __ \  / __ \          /_ <
 / ____/  / /_/ / / /_   / / / // /_/ / / / / /        ___/ /
/_/       \__, /  \__/  /_/ /_/ \____/ /_/ /_/        /____/
         /____/

Learn about variable assignment: =, := or <-?

lamr learn variables

Motivation

On the web you have freecodecamp or another online course of your choice, but as a programmer you are likely to deal with command line. What if you wanted an early start with command line while learning Python? lamr is a tool you can try for this.

Tip

If you are new to command line read into What is the Command Line in "Data Science at the Command Line" book and Basics section in "The Art of Command Line" guide.

Unlike many online courses lamr is an open-source Python package. You can explore its own code and propose changes or enhancements by writing an issue on Github and submitting a pull request. This way you can practice how to work collaboratively on a Python project and share something you know with others.

Tip

This tutorial suggests you can get started using GitHub in less than an hour. Sometimes it takes months and even years of practice, but totally useful.

Installation

You should have a working installation of Python and a terminal, or console, open.

Install lamr:

pip install lamr

Check it works:

lamr --help

Code examples

lamr provides a collection of Python code examples stored as plain text files. You can use lamr show and lamr run to see the code listing or run the files.

>>> lamr show --list
cal.py  Print today's date and a calendar for current month.
logo.py Turn a string into ASCII art using a font style.
text.py Manipulate a string.
x.py    A Twitter clone (maybe).

Code listing

To get a code listing:

lamr code cal.py
"""Print today's date and a calendar for current month."""

from calendar import TextCalendar
from datetime import date

t = date.today()
print("Today is", t)
print()  # prints empty line
TextCalendar().prmonth(t.year, t.month)

For a list of follow-up questions, excercises and usefil references run lamr code with one or more flags:

lamr code logo.py --questions --references
lamr code logo.py --excercises
lamr code logo.py --all

The manual

lamr learn is a small Python textbook aimed at beginners. It is organaized by topic such as string or variables.

>>> lamr learn
# prints available topics to study

Development

Check out separate Development section:

>>> lamr about --dev

bootcamp's People

Contributors

epogrebnyak avatar

Stargazers

Dennis Kipkirui 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.