- Welcome - Say hi and introduce yourself!
- Guides ⭐ - Must-read resources for all Linux users.
- News - Stay updated with Linux news.
- Announcements - Important community updates.
- Invitation - Invite friends to join.
- Events - Hackathons, meetups, and more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal enabledelayedexpansion | |
:menu | |
cls | |
echo Site-Blocker | |
echo ----------------- | |
echo 1. Block everything except toph.co and its subdomains | |
echo 2. Restore hosts file from backup | |
echo 3. Exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to display the break reminder notification | |
function show_notification() | |
{ | |
notify-send "Take a Break" "It's time for a 20-minute break!" | |
} | |
# Main loop to remind every 20 minutes | |
while true; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sharafat specials | |
# bash script to automate running a single c file | |
# | |
# to use, just put those lines in your bashrc/ zshrc, | |
# restart your shell or source from bashrc/ zshrc | |
# in any directory you can just type | |
# cl file_path/file_name.cpp | |
# | |
# (c file compile and run and then delete the compiled binary, all in one) | |
# it should work out of the box for c and c++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @Author: Sharafat Karim | |
# @Date: 6:59 PM Sunday, 22 January 2023 | |
# @Email: [email protected] | |
# @Last modified time: 6:59 PM Sunday, 22 January 2023 | |
# @Credit: https://kb.objectrocket.com/mongo-db/export-mongodb-documents-as-csv-html-and-json-files-in-python-using-pandas-347 | |
# Pip packages import | |
try: | |
# library import | |
import pymongo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Global variables | |
one = "1" | |
two = "2" | |
three = "3" | |
four = "4" | |
five = "5" | |
six = "6" | |
seven = "7" | |
eight = "8" | |
nine = "9" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Caesar Cipher! | |
def decoder(message, offset): | |
result="" | |
for i in range(len(message)): | |
if not(ord("a")<=ord(message[i])<=ord("z")): | |
result+=message[i] | |
continue | |
elif ord(message[i])+offset>ord("z"): | |
result += chr(ord(message[i])-26+offset) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Price = [9,13,7,18,10,76,10,76,33,63,113,19,49,23,49,23,19,31,51,42,66,29,30,36,116,91] | |
Value = [100,100,150,200,250,300,250,300,300,300,300,300,400,400,400,400,500,512,512,512,512,512,1000,1000,1000,1000] | |
Validity = [] | |
Price = [] | |
Value = [] | |
def Validity_to_store(): | |
print("Do you also want to store validity data? ") | |
k = input()[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
def __init__(self, value=None): | |
self.val = value | |
self.next_val = None | |
class Link: | |
def __init__(self): | |
self.primary_value = Node() | |
def append_to_list(self,value=None): |
NewerOlder