0 sats \ 0 replies \ @EverythingSatsoshi 27 Sep \ on: How to Connect your LN node to SEND/RECEIVE sats to/from SN via NWC with AlbyHub lightning
The future is here!!!!!!!!
This whole piece is brilliant.
How long does it take to find out to time these jobs get received, as well as coinbase values similarity?
Milan 2-3 Liverpool
Real Madrid 3-0 Stuttgart
Manchester City 3-1 Inter Milan
Brugge 0-3 Borussia Dortmund
Monaco 1-3 Barcelona
Atalanta 3-4 Arsenal
yh, read through this and used default(Ollama), and when I call it on my terminal it responds, but asides that,nothing else when it comes to the extension tab
Also, from the img above, am I missing something in the config?
Downloaded Ollama 3.9.1
Downloaded codellama:7b-instruct
Downloaded codellama:7b-code
Restart my PC and still didn't get the 🤖icon in my vsCode
Thanks a lot and I appreciate the feedback
I noticed and got ready to post part 3 later on. But since I like your reply, how about you help critique it here before I post it
import tweepy import nostr_client import requests # Twitter API credentials twitter_api_key = "YOUR_API_KEY" twitter_api_secret_key = "YOUR_API_SECRET_KEY" twitter_access_token = "YOUR_ACCESS_TOKEN" twitter_access_token_secret = "YOUR_ACCESS_TOKEN_SECRET" # Nostr Wallet credentials nwc_public_key = "YOUR_NWC_PUBLIC_KEY" nwc_private_key = "YOUR_NWC_PRIVATE_KEY" # Alby credentials alby_url = "(link unavailable)" alby_access_token = "YOUR_ALBY_ACCESS_TOKEN" # Set up Tweepy auth = tweepy.OAuthHandler(twitter_api_key, twitter_api_secret_key) auth.set_access_token(twitter_access_token, twitter_access_token_secret) api = tweepy.API(auth) # Set up Nostr Client nwc_client = nostr_client.Client() nwc_client.connect(nwc_public_key, nwc_private_key) # Set up Alby alby = Alby(alby_url, alby_access_token) def extract_payment_destinations(twitter_username): user = api.get_user(twitter_username) bio = user.description payment_destinations = [] # Extract npub npub_regex = r".*npub[0-9A-Za-z]+" npub_match = re.search(npub_regex, bio) if npub_match: payment_destinations.append(("npub", npub_match.group())) # Extract Alby address alby_regex = r".*[a-zA-Z0-9]{64}" alby_match = re.search(alby_regex, bio) if alby_match: payment_destinations.append(("alby", alby_match.group())) # Extract LNURL lnurl_regex = r".*https://[0-9A-Za-z]+\.lnurl\.io/" lnurl_match = re.search(lnurl_regex, bio) if lnurl_match: payment_destinations.append(("lnurl", lnurl_match.group())) # Extract BOLT12 static address bolt12_regex = r".*lnbc[0-9A-Za-z]+" bolt12_match = re.search(bolt12_regex, bio) if bolt12_match: payment_destinations.append(("bolt12", bolt12_match.group())) return payment_destinations def send_payment(payment_destination): try: if payment_destination[0] == "npub": # Send payment to npub using NWC event = nwc_client.create_event(21, payment_destination[1]) nwc_client.send_event(event) elif payment_destination[0] == "alby": # Send payment to Alby address using Alby API url = f"(link unavailable)" headers = {"Authorization": f"Bearer {alby_access_token}"} data = {"amount": 21, "destination": payment_destination[1]} response = requests.post(url, headers=headers, json=data) if response.status_code != 200: raise Exception(f"Alby API error: {response.text}") elif payment_destination[0] == "lnurl": # Send payment to LNURL using NWC nwc_client.send_payment(payment_destination[1], 21) elif payment_destination[0] == "bolt12": # Send payment to BOLT12 static address using NWC nwc_client.send_payment(payment_destination[1], 21) except Exception as e: print(f"Error sending payment: {e}") def main(): twitter_username = "twitter_username" payment_destinations = extract_payment_destinations(twitter_username) for destination in payment_destinations: send_payment(destination) if __name__ == "__main__": main()