classmethods. They allow us to define methods in a class that are bound to the class itself, not its instances, therefore they allow us to modify the class behavior and make it more flexible.2024/05/06
How to Supercharge Your Python Classes with Class Methods
2023/10/11
pandas tricks
a list of aggregation function for groupby:
min, max, mean, median, sum, count, std, var, size, describe, nuniaue, idxmax, idxmin.
df.groupby([‘airline’, ‘weekday’])[‘cancelled’,’diverted’].agg([‘sum’,’mean’]).head()
df.groupby([‘airline’, ‘weekday’])[‘cancelled’,’diverted’].agg({“dist”:[‘sum’,’mean’]).head()
2023/10/09
2023/10/08
pandas tricks 3
df.sort_values(["a","b","C", ascending=[True, False, True)
df.nlargest(10, 'a').nsmallest(5,"b)
pandas tricks 2
df.select_dtypes(include=['int'])
df.select_dtypes(include=['number'])
df.selected_dytpes(include=['np.number'])
df.get_dtype_counts()
2023/06/16
10 Python Decorators to Take Your Code to the Next Level
10 Python Decorators to Take Your Code to the Next Level
2023/05/30
2023/04/02
MLOps-Tips and Tricks-75 Code Snippets MLOps and Data Engineering
MLOps-Tips and Tricks-75 Code Snippets
MLOps and Data Engineering
2023/03/17
2023/01/06
Comparison among best Text to Image AI generation with examples
Comparison among bestText to Image AI generation
Here are some results for "every success starts from small steps"
1) Dalle E 2, https://openai.com/dall-e-2/
2) pixray, https://replicate.com/pixray/text2image
This website has the engineering feeling. It outputs training result while generating images.
3: DeepAI, https://deepai.org/machine-learning-model/cyberpunk-generator
4: fotor: https://www.fotor.com/features/ai-image-generator/
5) Night Cafe, https://creator.nightcafe.studio/my-creations
6) Craiyon,(Formerly DALL-E Mini), https://www.craiyon.com/
7) StarryAI, https://starryai.com/app/my-creations
Their UI is a little crappy. It did not generate an image at my first try.
2023/01/02
D3.js load error
The error is:
Access to XMLHttpRequest at 'file:///D:/project/my_project/templates/data.csv' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.
1) Go to the developer tools (F12 in the browser), then select the three dots in the upper right corner, and go to Settings.
Then, look for Sources, and disable the options:
- "Enable JavaScript source maps"
- "Enable CSS source maps"
In terms of file folder and file path, check this youtube: https://www.youtube.com/watch?v=0XWyw4mbGEM
2022/12/24
D3.JS tutorial
after playing with google Looker for my project, I decided to warm up my D3.js skill in case there is a need.
With D3.js and flask, we can build a beautiful website easily.
How to Supercharge Your Python Classes with Class Methods
How to Supercharge Your Python Classes with Class Methods | by Siavash Yasini | May, 2024 | Towards Data Science As we just mentioned, a c...
-
Five basic elements about reinforcement learning: agent, state, environment, policy, reward. Here is an example https://builtin.com/data-...
-
https://www.analyseup.com/python-machine-learning/catboost-python-tutorial.html
-
https://kubernetes.io/blog/2019/07/23/get-started-with-kubernetes-using-python/ A Kubernetes service - I’m using Docker Desktop with Kub...
-
Comparison among bestText to Image AI generation Here are some results for "every success starts from small steps" 1) Dalle E 2,...
-
How to Set Up a Task Queue with Celery and RabbitMQ https://www.linode.com/docs/development/python/task-queue-celery-rabbitmq/