Skip to content

Instantly share code, notes, and snippets.

View ixna's full-sized avatar
:octocat:
Emergency Retreat

Isna Rahmatul ixna

:octocat:
Emergency Retreat
View GitHub Profile
@ixna
ixna / main.rs
Created October 5, 2021 08:12 — forked from frankyxhl/main.rs
Rust send smtp email by Zoho code example
// === In Cargo.toml file======
// lettre = "0.9.2"
// lettre_email = "0.9.2"
// native-tls = "0.2.3"
// ============================
use lettre_email::Email;
use lettre::smtp::authentication::Credentials;
use lettre::{ClientSecurity, ClientTlsParameters, SmtpClient, Transport};
use native_tls::TlsConnector;
@ixna
ixna / concurrent.py
Last active November 29, 2016 07:29
Get rss while doing other things concurrently
import time
import requests
from multiprocessing.pool import ThreadPool
from threading import Thread, current_thread
# Compatibility python2 (Queue.Queue) dengan python3 (queue.Queue)
try:
from queue import Queue
except:
from Queue import Queue
@ixna
ixna / parallel.py
Last active November 29, 2016 06:23
Get rss parallel way
import time
import requests
from multiprocessing.pool import ThreadPool
from threading import Thread, current_thread
RSS_LIST = [
'http://feeds.nytimes.com/nyt/rss/HomePage',
'http://www.washingtonpost.com/rss/',
'http://hosted.ap.org/lineups/USHEADS-rss_2.0.xml?SITE=RANDOM&SECTION=HOME',
'http://www.npr.org/rss/rss.php?id=1001',
@ixna
ixna / sequence.py
Last active November 29, 2016 06:07
Get rss sequence way
import time
import requests
RSS_LIST = [
'http://feeds.nytimes.com/nyt/rss/HomePage',
'http://www.washingtonpost.com/rss/',
'http://hosted.ap.org/lineups/USHEADS-rss_2.0.xml?SITE=RANDOM&SECTION=HOME',
'http://www.npr.org/rss/rss.php?id=1001',
'http://feeds.reuters.com/reuters/topNews']