Skip to content

Instantly share code, notes, and snippets.

View rabbitix's full-sized avatar
✌️
coding python

Ali Fazeli rabbitix

✌️
coding python
View GitHub Profile
@ohld
ohld / send_file_from_memory.py
Created April 26, 2020 12:59
How to send a CSV file with Telegram bot from memory (buffer, StringIO, BytesIO)
import csv, io
test_data = [[1, 2, 3], ["please", "follow", "me"]]
# csv module can write data in io.StringIO buffer only
s = io.StringIO()
csv.writer(s).writerows(test_data)
s.seek(0)
# python-telegram-bot library can send files only from io.BytesIO buffer
@Braunson
Braunson / pivot-tables.md
Last active May 15, 2024 08:12
Laravel 8.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.

@PurpleBooth
PurpleBooth / README-Template.md
Last active July 18, 2024 23:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites