Skip to content

Instantly share code, notes, and snippets.

View macagua's full-sized avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@samuelcolvin
samuelcolvin / python-people.md
Last active March 13, 2024 03:13
An incomplete list of people in the Python community to follow on Twitter and Mastodon.

Python People

(Updated 2022-11-16 with suggestions from comments below, Twitter and Mastodon)

An incomplete list of people in the Python community to follow on Twitter and Mastodon.

With the risk that Twitter dies, I'd be sad to lose links to interesting people in the community, hence this list.

I would love you to comment below with links to people I've missed.

@erral
erral / index.md
Last active October 13, 2022 04:22
How to deploy Volto sites automatically in non-docker scenarios
@sehrishnaz
sehrishnaz / boost_website_traffic_using_python_selenium.py
Created December 2, 2021 05:44
Advance Python Bot to Increase Website Traffic using Selenium
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys
import time
import pandas as pd
import random
driver = webdriver.Chrome(executable_path=ChromeDriverManager().install())
driver.maximize_window()
col_name = ['url']
@sehrishnaz
sehrishnaz / install_python_library_automatically_on_installation_of_odoo.py
Created November 26, 2021 09:20
Install Python Packages on Installation of Odoo Modules
class Install_Packages:
"""
This Class installs required Packages or library
"""
get_pckg = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
installed_packages = [r.decode().split('==')[0] for r in get_pckg.split()]
# List of your required packages
required_packages = ['packages_1', 'packages_2', 'packages_3', 'packages_4']
@sehrishnaz
sehrishnaz / gmail_python_bot.py
Last active February 1, 2022 19:01
Send Bulk Email From Python Using Cloud Console Gmail API - Python Gmail Bot
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from email.mime.text import MIMEText
import base64
import pandas as pd
import random
import time
@sehrishnaz
sehrishnaz / auto_post_facebook_bot_using_python.py
Created November 22, 2021 10:42
Automate Facebook Post to Groups using Graph API and Python
import json
from facebook import GraphAPI
import pandas as pd
import time
import secrets
import random
def read_creds(filename):
'''
Store API credentials in a safe place.
@sehrishnaz
sehrishnaz / facebook_bot_using_python.py
Created November 22, 2021 10:22
Automate Facebook Post to Groups using Graph API and Python
import json
from facebook import GraphAPI
import pandas as pd
import time
import secrets
import random
def read_creds(filename):
'''
Store API credentials in a safe place.
import streamlit as st
import requests
def fetch(session, url):
try:
result = session.get(url)
return result.json()
except Exception:
return {}
@sehrishnaz
sehrishnaz / hide_export_option_from_more_menu_odoo.xml
Created October 13, 2021 09:43
Hide or Remove Export Option From More Menu Button in Odoo
<templates>
<t t-extend="Sidebar">
<t t-jquery="a.oe_sidebar_action_a" t-operation="replace">
<t t-if="widget.session.uid !== 1">
<a t-if="item.label !== 'Export'" class="oe_sidebar_action_a" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
<t t-raw="item.label"/>
</a>
</t>
<t t-if="widget.session.uid === 1">
<a class="oe_sidebar_action_a" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">