Add Chart.js visualizations to Django admin using a mixin class in python

django-admincharts Add Chart.js visualizations to your Django admin using a mixin class. Example from django.contrib import admin from .models import BillingAccount from admincharts.admin import AdminChartMixin from admincharts.utils import months_between_dates @admin.register(BillingAccount) class BillingAccountAdmin(AdminChartMixin, admin.ModelAdmin): def get_list_chart_data(self, queryset): if not queryset: return {} # Cannot reorder the queryset at this point earliest = min([x.ctime for x in queryset]) labels = [] totals = [] for b in months_between_dates(earliest, timezone.now()): labels.append(b.strftime(“%b %Y”)) totals.append( len( [ x for x in queryset if x.ctime.year == […]

Read more

Slack Wolt Notifier Build With Python

Slack Wolt Notifier A Slack bot that notifies you when a Wolt restaurant or venue is available for orders. How does it work? Slack supports bots that can automate tasks and run code, so why not use this awesome feature to notify users when their favorite restaurant on Wolt is available for orders? The bot is simply a Flask server that processes slash commands received from Slack to a pre-defined endpoint. When a user types /wolt [restaurant_name], the bot will […]

Read more

A mini imitation of GitHub Copilot using EleutherAI GPT-Neo-2.7B for Emacs

Second Mate An open-source, mini imitation of GitHub Copilot using EleutherAI GPT-Neo-2.7B (via Huggingface Model Hub) for Emacs. This is a much smaller model so will likely not be as effective as Copilot, but can still be interesting to play around with! Setup Inference End / Backend Set device to “cpu” or “cuda” in serve/server.py The “priming” is currently done in Python. If you want, modify it to another language or turn it off (priming subjectively seems to help). Launch […]

Read more

Yukki Multi Spam Bot For Telegram

Yukki Multi Spam Bot A Powerful Telethon Based Telegram Spam Bot. 🚀 Deploy on Heroku You can Use these API ID and API HASH while deploying String Session No Requirement of API ID and API HASH Generate on Repl Termux : sh -c “$(curl -fsSL https://da.gd/YukkiBot)” (Use python string_session.py next time to generate another string.) GitHub https://github.com/YukkiBot/YukkiMultiSpamBot    

Read more

A simple Notepad-like editor written in Python

monkepad A simple Notepad-like editor written in Python. Since MonkePad is written in one file, all your customization can be done without much trouble, and you can transfer it easily.Note: MonkePad should be run with python3 NOT python because of different module names between the versions. Modification MonkePad has multiple constants declared near the top of the file You can change these to fit your wants. For example: Building pip install pyinstaller pyinstaller –onefile monkepad.py GitHub https://github.com/monkelab/MonkePad    

Read more

A parametric soroban written in CADQuery

soroban-parametric-cadquery A parametric soroban written in CADQuery The purpose of this project is to demonstrate how “code CAD” can be intuitive to learn. See soroban.py for a self-contained example. See src/ files for realistic structuring of a code CAD project. Splitting up parts into their own files makes them reusable across designs and allows for easy modification. Here are a couple pictures of the soroban: How it’d look in a slicer: Follow the CADQuery installation instructions, and open the soroban.py […]

Read more

A multipurpose Telegram Bot writen in Python for mirroring files

Deepak Clouds Mirror Deepak Clouds Torrent is a multipurpose Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive. Additional Features Get detailed info about replied media (Only for Telegram file) Speedtest with picture results Stop duplicate cloning Google Drive Mega support Added Limiting size Torrent/Direct, Mega, cloning Google Drive support Sudo with Database support Multiple Trackers support Extracting tar.xz support Create Tar Google Drive folder Counting file/folder Shell and Executor View Link button […]

Read more

A discord bot consuming Notion API to add and retrieve data from Notion databases

Notion-DiscordBot A discord bot consuming Notion API to add and retrieve data from Notion databases. Instructions to use the bot: Pre-Requisites: a)Install all the requirements using pip3 install -r requirements.txt b)Create a discord bot using the developer platform of discord and obtain your OAuth2 token. Keep it somewhere safe c)Go to Notion and create a new Integration https://www.notion.so/my-integrationsNote the internal Integration. d)Go to Notion and create a table like this: 4 columns where: Contributor is of property type Title URL […]

Read more

Enhanced Particle Swarm Optimization (PSO) with Python

pso_particle_swarm_optimization Implemented fully documented Particle Swarm Optimization (PSO) algorithm in Python which includes a basic model along with few advanced features such as updating inertia weight, cognitive, social learning coefficients and maximum velocity of the particle. Implemented fully documented Particle Swarm Optimization (PSO) algorithm in Python which includes a basic model along with few advanced features such as updating inertia weight, cognitive, social learning coefficients and maximum velocity of the particle. Dependencies Utilities Once the installation is finished (download or […]

Read more

Part 3: Step by Step Guide to NLP – Text Cleaning and Preprocessing

This article was published as a part of the Data Science Blogathon Introduction This article is part of an ongoing blog series on Natural Language Processing (NLP). In part-1and  part-2 of this blog series, we complete the theoretical concepts related to NLP. Now, in continuation of that part, in this article, we will cover some of the new concepts. In this article, we will understand the terminologies required and then we start our journey towards text cleaning and preprocessing, which is […]

Read more
1 608 609 610 611 612 972