Skip to content

Instantly share code, notes, and snippets.

View dhruvilp's full-sized avatar
💭
👨‍💻 working on something really cool

Dhruvil Patel dhruvilp

💭
👨‍💻 working on something really cool
View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
"age";"job";"marital";"education";"default";"housing";"loan";"contact";"month";"day_of_week";"duration";"campaign";"pdays";"previous";"poutcome";"emp.var.rate";"cons.price.idx";"cons.conf.idx";"euribor3m";"nr.employed";"y"
56;"housemaid";"married";"basic.4y";"no";"no";"no";"telephone";"may";"mon";261;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
57;"services";"married";"high.school";"unknown";"no";"no";"telephone";"may";"mon";149;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
37;"services";"married";"high.school";"no";"yes";"no";"telephone";"may";"mon";226;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
40;"admin.";"married";"basic.6y";"no";"no";"no";"telephone";"may";"mon";151;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
56;"services";"married";"high.school";"no";"no";"yes";"telephone";"may";"mon";307;1;999;0;"nonexistent";1.1;93.994;-36.4;4.857;5191;"no"
45;"services";"married";"basic.9y";"unknown";"no";"no";"telephone";"may";"mon";198;1;999;0;"nonexistent";1.1;93.994;-36.4
@dhruvilp
dhruvilp / info.txt
Created August 15, 2023 20:45
SaaS Stack
If you're building a SaaS in 2023:
◆ framework: Next.js
◆ ui: @shadcn/ui + TailwindCSS
◆ redis/queues: Upstash
◆ time-series data & charts: Tinybird + Tremor
◆ ORM: Prisma
◆ auth: NextAuth.js
◆ database: PlanetScale
◆ emails: Resend
@dhruvilp
dhruvilp / info.md
Last active May 2, 2023 01:55
AI Tools

AI Productivity Tools

  1. Poised: Poised is the AI-powered communication coach that helps you speak with confidence and clarity
  2. Murf: Murf AI can easily turn your text into a human’s voice.
  3. Lucidpic: Lucid Pic generates high-quality stock photos of people that don’t exist
  4. Autodesigner: Autodesigner is like your own professional designer (mockups, etc)
  5. FROMAGe: give it an image and you can ask FROMAGe any questions about it.
  6. Talk to Books: Talk to books has millions of books and gets new ideas in seconds
  7. Kaiber AI: transform your ideas into the visual stories of your dreams
  8. Stockimg: create awesome illustrations, logs, stock images, book covers, posters in just a matter of seconds.
@dhruvilp
dhruvilp / auto-pdf-summarize.md
Created April 23, 2023 04:15
PDF Summarization
pip install pypdf2
pip install transformers
import PyPDF2
from transformers import pipeline

# Load the summarization pipeline
@dhruvilp
dhruvilp / secure.md
Last active April 1, 2023 20:52
Flutter OWASP top 10 & security checks
  1. Improper platform usage: ask for permissions to use on-device resources (ex: camera, location)
  2. Secure storage: pub pkg -- flutter_secure_storage, hive, secure_application
  3. Insecure communication: http_certificate_pinning, ssl_pinning_plugin (ssl/tsl cert based)
  4. Insecure authentication: local_auth
  5. Insufficient cryptography: only use NIST approved encryption algos encrypt, crypto
  6. Insecure authorization
  7. Client code quality checks - vulnerability/maintainability checks (static and dynamic security checks)
  8. Code tempering: flutter_jailbreak_detection
  9. Reverse engineering: check if IDA Pro & Hopper can de-obfuscate your code; use --obfuscate while building a flutter app, also use binary build which are hard to decompile
  10. Extraneous functionality: check logs for info leaks about backend or any silly hard-coding PI data. Use RASP (runtime analysis self-protection) freerasp pkg to check against security leaks
@dhruvilp
dhruvilp / team-form.py
Last active April 3, 2023 23:01
Team formation
import random
participants = [i for i in range (1,41)]
random.shuffle(participants)
groups = [participants[i:i+4] for i in range(0, len(participants), 4)]
for i in range(len(groups)):
print(f"Group {i+1}: {groups[I]}")
@dhruvilp
dhruvilp / remove-consoles.js
Created February 23, 2023 22:06
React remove console.log across the app
export const GlobalDebug = (function () {
var savedConsole = console;
/**
* @param {boolean} debugOn
* @param {boolean} suppressAll
*/
return function (debugOn, suppressAll) {
var suppress = suppressAll || false;
if (debugOn === false) {
// supress the default console functionality
@dhruvilp
dhruvilp / maint.dart
Created January 23, 2023 02:56
Flutter Responsive Layout App
import 'package:flutter/material.dart';
var defaultBackgroundColor = Colors.grey[300];
var appBarColor = Colors.grey[900];
var myAppBar = AppBar(
backgroundColor: appBarColor,
title: const Text(' '),
centerTitle: false,
);
var drawerTextColor = TextStyle(
@dhruvilp
dhruvilp / main.dart
Created January 18, 2023 21:42
Parallax effect for landing page
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@dhruvilp
dhruvilp / main.dart
Created January 2, 2023 05:37
Flutter SIngle Select Buttonnbar
import 'package:flutter/material.dart';
final List<Widget> buttons = <Widget>[
Row(
children: const [
Text('APPLE'),
SizedBox(width: 5),
Icon(Icons.sunny),
],
),