Skip to content

Instantly share code, notes, and snippets.

View dkotama's full-sized avatar

Darma Kotama, I Nyoman dkotama

View GitHub Profile
@dkotama
dkotama / gist:921969df0b593700ed6c367262c6eea2
Created September 14, 2024 08:08
financial-advisor-test-prompt
I am developing a simple command-line financial advisor app in Python that uses the rich library to create a basic UI.
The app should help users manage their finances by allowing them to input their monthly income, categorize their expenses,
and provide personalized financial advice based on budgeting principles like the 50/30/20 rule. The program should display a financial summary with categorized expenses, calculate savings, and provide suggestions if savings fall below the recommended percentage of income. The UI should be visually appealing, using colors, tables, and formatted text with rich. Please help me with the following:
Improve the code structure for better readability and maintainability.
Add features for persistent data storage so users can save and load their financial data.
Suggest advanced financial advice features, like debt management and investment tracking, that can be integrated into the app.
Enhance the UI further by adding bar charts or other visual elements using the rich library or
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(__dirname + '/dist/skote'));
app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+ '/dist/skote/index.html'));
});
app.listen(process.env.PORT || 8080);
{
"quotes": [
"Semangat Manieez",
"Kalo km semangat, aku juga semangat",
"Lihat kebunku penuh dengan bunga, lihat dirimu aku berbunga-bunga.\n\nSemangat!",
"hidup ini seperti kopi, perlu kamu agar tidak terlalu pahit",
"Jepang bikin robot.\nJerman bikin mobil,\nkalau aku pengen bikin km semangat.",
"Aku rela dipenjara asalkan pelanggarannya karena mencintaimu\n\nTetap semangat!!",
"Kalo naik motor sama kamu pasti ditilang deh.\nSoalnya kita kan bertiga, aku, kamu, dan cinta\n\nSemangat Terus yaa",
"Tahu gak kenapa kita cuma bisa lihat pelangi setengah lingkaran?\nSebab setengahnya lagi ada di mata kamu.\n\nHehe, Semangat ya Pelangi"
@dkotama
dkotama / quotes.json
Last active September 13, 2022 08:29
{
"quotes": [
{
"author": "Kevin",
"quote": "https://i.ibb.co/YNWqYFN/Screenshot-188.png"
},
{
"author": "xxxuma yg suka donat pink, 2021",
"quote": "Masalah itu pelajaran. Masalah harus susah, kalau gampang untuk apa belajar lagi?"
},
@dkotama
dkotama / server.js
Created July 15, 2020 09:12
server.js buat kak ferdy
const express = require('express');
const app = express();
const cors = require('cors');
const http = require('http').createServer(app);
const path = require('path');
// setup cors
app.use(cors());
// serve static files

Keybase proof

I hereby claim:

  • I am dkotama on github.
  • I am dkotama (https://keybase.io/dkotama) on keybase.
  • I have a public key ASB6CQdZgmfhnh6HJFl4d8tPwVSwX7U8p6k38j6WeKF4mQo

To claim this, I am signing this object:

[ 0.000000] Linux version 4.15.0-88-generic (buildd@lgw01-amd64-036) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 (Ubuntu 4.15.0-88.88-generic 4.15.18)
[ 0.000000] Command line: earlyprintk=serial console=ttyS0 root=/dev/sda1 rw panic=1 no_timer_check
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
@dkotama
dkotama / QuestionModal.swift
Created September 10, 2018 00:10
Swift Question Modal
let alert = UIAlertController(title: NSLocalizedString("logout_confirm", comment: ""), message: "", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { action in
self.pushLogout()
}))
alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))
self.present(alert, animated: true)
@dkotama
dkotama / MultipleModal.swift
Last active September 10, 2018 00:08
Swift Show Multiple Choices Modal
// in case i want to copy paste thing
let alertCtrl = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let galleryBtn = UIAlertAction(title: NSLocalizedString("select_image", comment: ""), style: .destructive, handler: { (action) -> Void in
self.openGallery()
})
let deletePhotoBtn = UIAlertAction(title: NSLocalizedString("delete_image", comment: ""), style: .destructive, handler: { (action) -> Void in
self.editProfilePresenter?.pushUpdateValue(.image_id, values: self.imageId)