Skip to content

Instantly share code, notes, and snippets.

View Vinci141's full-sized avatar
🎯
Focusing

Vinil Mehta Vinci141

🎯
Focusing
  • 23:53 (UTC +05:30)
View GitHub Profile
@Vinci141
Vinci141 / default.md
Created October 28, 2025 01:55 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@Vinci141
Vinci141 / System Design.md
Created May 21, 2022 19:12 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
#NOTE: Use LIST at your own risk for large data.It takes more memory.Try using generator instead for memory effeciency
# example of generator.
# import mem_profile
from memory_profiler import profile
@profile
def list_square(num):
result = []
@Vinci141
Vinci141 / renameFile.py
Last active March 24, 2019 11:09
Renaming file
import os
import time
start_time = time.time()
def rename_file():
f = os.chdir( "C:/Users/vinilm/Desktop/Python/Renaming File/data" )
if not os.listdir(f):
print( "No File found" )
else:
@Vinci141
Vinci141 / FilterDictionary
Last active March 6, 2019 03:46
Filter dictionary based on some criteria
#Python program to filter dict based on some criteria
from six import iteritems
ini_dict={'a':1,'b':-3,'c':2,'d':-6}
print("Initial Dictionary:",str(ini_dict))
result=dict((k,v) for k,v in ini_dict.items() if v>=0)
print("Updated Dictionary",str(result
######## Using Lambda function ########
#Python program to filter dict based on some criteria using lambda function
from six import iteritems
@Vinci141
Vinci141 / LetterCountBarChart
Last active January 8, 2019 06:07
program to count frequencies of letters in a given file
# program to count frequencies of letters in a given file
from matplotlib import pyplot
import string
data=open("test03.txt","r").read()
letter_count={}
for char in string.ascii_letters:
char=char.lower()
letter_count[char]=0
@Vinci141
Vinci141 / textProcessingList
Last active December 19, 2018 05:27
Text Processing - LIST
#word processing from sonnets.txt and sowpods.txt
import time
start=time.time()
wordlist=[elt.strip() for elt in open("sowpods.txt","r").readlines()]
my_words=[elt.strip() for elt in open( "sonnet_word.txt","r").readlines()]
counter=0
for word in my_words:
if word not in wordlist:
print(word)
@Vinci141
Vinci141 / SimplePalindromeProgram
Last active December 18, 2018 15:54
Palindrome
word="radar"
if word==word[::-1]:
print(word,"is a Palindrome")
else:
print(word,"is not a Palindrome")
=========================================================
#another variant of the same program
word="apple"
if list(word)==list(reversed(word)):
@Vinci141
Vinci141 / Auto Login to Web page
Created December 12, 2018 06:45
WebBot - Auto login
# purpose of this code is to render
# a url. Login to it using pre-defined Id,PWD
# url - https://www.google.com/gmail/
from webbot import Browser
web = Browser()
web.go_to( 'http://127.0.0.1:5000/' )
web.type( 'Vinil', into='user',id='user' )
web.type( 'abc', into='pwd',id='pwd' )
@Vinci141
Vinci141 / CheckingInputFileRecursively
Created December 12, 2018 06:44
Recursively Checking input file in Dir and Sub Dir
class MyHandler( FileSystemEventHandler ):
def on_created(self, event):
"""
This will be triggered when new file created/popped into our directory.
the code is behaving the desired way
:type event: object
"""
print( "Event Type :", event.event_type )