Collecting useful Python snippets in order to enhance pythoneers’ coding experiences

Cheatsheet This project aims at collecting useful Python snippets in order to enhance pythoneers’ coding experiences. Please feel free to contribute if you have any awesome ideas for improvements to code snippets, explanations, etc. What’s New In Python 3 The official document, What’s New In Python, displays all of the most important changes. However, if you’re too busy to read the whole changes, this part provides a brief glance of new features in Python 3.    

Read more

A Discord bot that performs various functions

rikka-bot A Discord bot that performs various functions. Commands Right now, this bot’s prefix is ;. Main Commands Utility Commands @mention help – Returns a command list, along with your server’s prefix. ;help – Returns a command list. ;info – Returns information about the bot. ;paypal – Returns donation link to contribute to server hosting. ;vote – Returns this server’s vote link on discordbots.org. ;clever (text) – Returns the cleverbot response to the given text. ;gizoogle (text) – Translates a […]

Read more

A simple python script using Numpy and Matplotlib library

Mohr’s Circle Calculator A simple python script using Numpy and Matplotlib library to plot a Mohr’s Circle when given a two-dimensional state of stress. This is a really small personal project done for Department of Civil Engineering, Delhi Technological University (formerly, Delhi College of Engineering) for a course in Mechanics of Solid (Course Code – CE202). It is a simple program using Python, NumPy and Matplotlibwhich helps a user to plot Mohr’s Cirle when given the two-dimensional state of stress. […]

Read more

Python package provinding tools for artistic interactive applications using AI

Python package provinding tools for artistic interactive applications using AI Created by ReDrawing Campinas team for the OpenCV AI 2021 Competition. Stages Stages are the basic processing units of the redrawing package. They receive data objects from input channels, processes them and output data in the output channels. Examples of stages: Stage name Use OAK_Stage Handles a OAK camera. Can be changed using OAK_Substages, like a Body detector or a Hand gesture detector PCR_Viewer Visualizer for image, depth and body […]

Read more

How to Implement a First-Order Low-Pass Filter in Discrete Time

first-order-low-pass-filter This Jupyter notebook shows one way to implement a simple first-order low-pass filter on sampled data in discrete time. We often teach or learn about filters in continuous time, but then need to implement them in discrete time (e.g., in code) on data acquired at discrete sample times. This notebook shows one way to design and implement a simple first-order low-pass filter in discrete time. The example is written in Python and uses Matplotlib. Main File(s) Sample Output Here […]

Read more

Seamlessly integrate pydantic models in your Sphinx documentation

autodoc_pydantic Seamlessly integrate pydantic models in your Sphinx documentation. You love pydantic ❤ and you want todocument your models and configuration settings with sphinx? Perfect, let’s go. But wait, sphinx’ autodocdoes not integrate too well with pydantic models 😕. Don’t worry – just pip install autodoc_pydantic ☺. Features 💬 provides default values, alias and constraints for model fields 🔗 adds hyperlinks between validators and corresponding fields 📃 includes collapsable model json schema 🏄 natively integrates with autodoc and autosummary extensions […]

Read more

A case-insensitive ordered dictionary for Python

nocasedict A case-insensitive ordered dictionary for Python. Class NocaseDict is a case-insensitive ordered dictionary that preserves the original lexical case of its keys. Example: $ python >>> from nocasedict import NocaseDict >>> dict1 = NocaseDict({‘Alpha’: 1, ‘Beta’: 2}) >>> dict1[‘ALPHA’] # Lookup by key is case-insensitive 1 >>> print(dict1) # Keys are returned with the original lexical case NocaseDict({‘Alpha’: 1, ‘Beta’: 2}) The NocaseDict class supports the functionality of the built-in dict class of Python 3.8 on all Python versions […]

Read more

Several implementations of classical games in Python

Mini Games with Pygame This projects implement several classic and popular games in Python, using python package — pygame. Currently, 4 games are already made in this project, listing below: Game scene How to run this project ? Install pygame :snake: Open your terminal console and enter pip install pygame to finish install. Acknowledgments :bulb: Snakegame Tutorial (pygame) – You can start with this tutorial to getan brief notion on how pygame actually works. Pygame Website – After knowing how […]

Read more

Generate and Visualize Data Lineage from query history

Tokern Lineage Engine Tokern Lineage Engine is fast and easy to use application to collect, visualize and analyze column-level data lineage in databases, data warehouses and data lakes in AWS and GCP. Tokern Lineage helps you browse column-level data lineage Resources Demo of Tokern Lineage App Quick Start Install a demo of using Docker and Docker Compose Download the docker-compose file from Github repository. # in a new directory run wget https://raw.githubusercontent.com/tokern/data-lineage/master/install-manifests/docker-compose/catalog-demo.yml # or run curl https://raw.githubusercontent.com/tokern/data-lineage/master/install-manifests/docker-compose/catalog-demo.yml -o docker-compose.yml Run […]

Read more

A casino discord bot written in Python

Casino Bot Casino bot is a gambling discord bot I made for my friends. It is able to play blackjack, slots, flip a coin, and roll dice. It stores everyone’s money on an SQLite3 database. Feel free to download and use for yourself! Installation Create a bot application on Discord Have Python 3.7 or later installed. Clone the repository Install requirements from requirements.txt Configure config.yml Run it GitHub https://github.com/ConnorSwis/casino-bot    

Read more
1 557 558 559 560 561 927