Skip to content

Instantly share code, notes, and snippets.

View vousmeevoyez's full-sized avatar

Kelvin vousmeevoyez

View GitHub Profile
# Prompt for Django Unit Tests Using Pytest
I want you to act as a Senior full-stack Django developer. Once I provide the Django models, views, or utility functions, your task is to develop a comprehensive suite of unit tests for a provided Django codebase. Follow these guidelines for an effective testing process:
## **Understand the Codebase**
- Analyze the Django code thoroughly, step by step.
- Identify any ambiguity or missing information, such as model fields, methods, constants, conditions, external dependencies, API integrations, etc.
- Provide steps, questions, and seek clarification for better code understanding. Only proceed to the next step once you have fully analyzed the codebase.
## **Testing Framework**
@vousmeevoyez
vousmeevoyez / jnt_tarif_check.py
Created February 19, 2025 04:54
JNT TARIF CHECK
import requests
import json
import hashlib
import base64
customer = "HR"
key = "HR001188"
url = "http://jk.jet.co.id:22230/jandt_track/inquiry.action"
data = {
id timestamp suhu_udara_c kelembaban_udara_persen kelembaban_tanah_persen status_waktu status_kesehatan label
1 2025-05-17 17:01:41.615528107 28.7 64.25 74.19 Sore Cukup Baik 0
2 2025-05-17 17:16:41.771805286 29.51 62.49 73.57 Sore Cukup Baik 0
3 2025-05-17 17:31:41.928082466 29.07 62.27 72.74 Sore Cukup Baik 0
4 2025-05-17 17:46:42.084359407 29.64 60.97 71.91 Sore Cukup Baik 0
5 2025-05-17 18:01:42.240636587 27.38 66.56 70.56 Sore Optimal 0
6 2025-05-17 18:16:42.396913767 27.72 70.35 69.21 Sore Optimal 0
7 2025-05-17 18:31:42.553190947 28.25 68.5 68.16 Sore Optimal 0
8 2025-05-17 18:46:42.709468126 27.83 65.63 67.22 Sore Optimal 0
9 2025-05-17 19:01:42.865745068 27.05 68.35 66.44 Malam Optimal 0
@vousmeevoyez
vousmeevoyez / gist:814fc8bcde1d9768ca0cffa0f248e567
Created September 2, 2025 03:04
dataset_sintetis_tanaman_cabai_10000.csv
This file has been truncated, but you can view the full file.
id,timestamp,suhu_udara_c,kelembaban_udara_persen,kelembaban_tanah_persen,status_waktu,status_kesehatan,label
3993,2025-06-25 18:42:12.662592649,28.786335526669763,65.20787555497786,57.27168037085072,Sore,Cukup Baik,0
1706,2025-06-02 00:36:01.348123789,20.07591838154177,82.31461876355806,37.93076525298078,Malam,Stres Kekeringan,0
3165,2025-06-20 06:24:49.981569767,21.78373638182943,82.61652395956828,8.75528957767377,Pagi,Stres Kekeringan,0
5090,2025-07-07 12:59:39.094266415,30.251088342804632,61.196106402122304,80.90418047769123,Siang,Cukup Baik,0
1377,2025-05-29 20:05:28.529925823,26.14443437743648,73.69032289878369,55.51901427800586,Malam,Cukup Baik,0
141,2025-05-16 06:32:05.057098150,21.55315614415441,81.34310621408297,8.514748189383662,Pagi,Stres Kekeringan,0
882,2025-05-27 15:04:25.393963814,31.409632837807656,57.005706076116546,69.25729316136996,Sore,Cukup Baik,0
1295,2025-05-29 14:50:10.245501041,30.82019944306999,58.54320505436558,68.5274467278569,Siang,Cukup Baik,0
3042,2025-06-20 01:09:31.697145224,