Skip to content

Instantly share code, notes, and snippets.

View guinslym's full-sized avatar

Guinslym guinslym

View GitHub Profile
@guinslym
guinslym / post_tweet_using_local_csv_file.py
Last active March 22, 2025 16:29
twitter post automation.
import csv
import tweepy
import schedule
import time
import requests
# Step 1: Twitter API Authentication
TWITTER_API_KEY = "your_consumer_key"
TWITTER_API_SECRET_KEY = "your_consumer_secret"
TWITTER_ACCESS_TOKEN = "your_access_token"
from pathlib import Path
from dotenv import dotenv_values
# Read the .secrets file
config = dotenv_values(".secrets")
print(config)
from lh3.api import Client
Directory of H:\chat_ask
12/19/2024 11:54 AM <DIR> .
12/19/2024 11:54 AM <DIR> ..
12/19/2024 10:31 AM 11,684 AnswerBot.py
12/19/2024 10:49 AM 1,273 connect_to.py
12/19/2024 10:22 AM <DIR> venv
2 File(s) 12,957 bytes
3 Dir(s) 2,400,824,971,264 bytes free
import aioxmpp
import logging
import asyncio
logging.basicConfig(level=logging.DEBUG)
JID = aioxmpp.JID.fromstr("[email protected]")
PASSWORD = "secretpassowod"
async def connect_to_libraryh3lp():
@guinslym
guinslym / dct_i18n_fr.json
Last active November 6, 2024 17:16
Translation for Data Curation Tool in French (Dataverse)
{
"_TODO": {
"COMMENTS": "Below are variable translation to be reviewed or complete or to see live. Instructions: '//' means that I wrote an alternative translation in French, //* means that this is a question that I am asking myself (reflexion ",
"COMMON": {
"LOADING_DATASET": "Chargement du jeu de données",
"INTVQST": "Les directives pour l'intervieweur",
"POSTQST": "Instruction à propos de la question posée",
"CHANGES_APPLIED": "Modifications appliquées"
},
"APP": {
#Python 3
import urllib.request
import urllib.error
import json
import sys
# Define functions to make requests to the remote control API
def get_session_key():
breakpoint()
from playwright.sync_api import Playwright, sync_playwright, expect
def run_site(playwright: Playwright, url: str, link_text: str, use_firefox: bool):
try:
if use_firefox:
# Use Firefox
browser = playwright.firefox.launch(headless=False)
else:
# Use Chromium
browser = playwright.chromium.launch(headless=False)
import lh3.api
client = lh3.api.Client()
from pprint import pprint as print
from datetime import datetime, date, timedelta
import re
import time
from dateutil.parser import parse
from bs4 import BeautifulSoup
import pandas as pd
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<html>
<head>
<link type=”text/css” rel=”stylesheet” href=”/documentation/css/style.css”>
<meta content=”text/html; charset=ISO-8859-1” http-equiv=”content-type”>
<title>TITLE OF PAGE</title>
</head>
<body>
<script type=”text/javascript” src=”/documentation/css/header.js”></script>
<div class=”Section1”>
<h2>TITLE OF PAGE</h2> PAGE CONTENT(see note below for more information)