Skip to content

Instantly share code, notes, and snippets.

@atodev
atodev / String contain
Last active March 16, 2023 21:50
[Python]
df2=df2[ df2[ "email" ].str.contains( "-deleted" )==False ]
@atodev
atodev / keras-cv
Created September 24, 2022 17:31
[Keras]
https://github.com/keras-team/keras-cv/pull/828
@atodev
atodev / wifi
Created September 7, 2022 20:35
QR Code
pip install wifi_qr_code_generator
import wifi_qr_code_generator as qr
qr.wifi_qrcode('Wifi name ', False 'WPA','password')
#clcoding.com
@atodev
atodev / line
Last active September 2, 2022 16:05
Visualizations
sns.lineplot(x='Date',y='Amount',data=df[df['Account Type'] == 'Reveue'])
#cleanup
plt.figure(figsize=(20,6))
sns.lineplot(x='Date',y='Amount',hue='Account Description',estimator=none, data=df[df['Account Type'] == 'Reveue'])
plt.show
#oneItem
plt.figure(figsize=(20,6))
sns.lineplot(x='Date',y='Amount',hue='Account Description',estimator=none, data=df[df['Account Description'] == 'Product Sales']).set_title('Seasonal
plt.show
@atodev
atodev / asemblyai
Created August 18, 2022 00:06
[Voice]
https://www.youtube.com/watch?v=B11nK1QCPRA
@atodev
atodev / cmds
Created August 10, 2022 22:56
[docker]
check file contents
-- make sure the container is running
docker ps
-- get the container no
docker exec -it 751fd3e49c68 /bin/bash
ls
---docker build
docker build -t ona3:latest .
---Dockerfile
@atodev
atodev / crontab
Last active August 1, 2022 17:55
[pi]
crontab -e #for edit
*/15 * * * * python3 /home/pi/finance/simple_trader.py
make sure the full path is set for position.csv in your code
@atodev
atodev / JB install
Last active July 3, 2022 22:27
[Jupyter Book]
#https://www.youtube.com/watch?v=lZ2FHTkyaMU
#jupyterbook.org
#https://jupyterbook.org/en/stable/start/create.html
pip install -U jupyter-book
jb create <name>
jupyter-lab #to see html
jb --help
pip install ghp-import
-- Create an empty repo and clone it
--- cp -r mybook/* testbook/
https://realpython.com/python-statistics/
@atodev
atodev / Google Connector
Last active June 29, 2022 23:02
[Connector]
https://itnext.io/building-a-custom-google-data-studio-connector-from-a-z-b4d711a5cf58
https://bajena3.medium.com/building-a-custom-google-data-studio-connector-from-a-z-part-1-basic-setup-445a6d965d3f
https://github.com/Bajena/spotify-gds-connector/tree/Tutorial1
https://datastudio.google.com/datasources/create/
https://bymarketers.co/analyse-your-email-habits-with-google-data-studio/
------ Function
function pullEmailData() { var ss = SpreadsheetApp.getActiveSheet(); var label = GmailApp.getUserLabelByName('Email Analysis'); var threads = label.getThreads(); for (var i = 0; i < threads.length; i++) {var messages = threads[i].getMessages(); for (var j = 0; j < messages.length; j++) {var to = messages[j].getTo(); var from = messages[j].getFrom(); var sub = messages[j].getSubject(); var date = messages[j].getDate(); var important = messages[j].isInPriorityInbox(); var starred = messages[j].isStarred(); ss.appendRow([to, from, sub, date, important, starred]);} threads[i].removeLabel(label);}}