server {
listen 80;
listen [::]:80;
This file contains 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
import signal | |
import sys | |
from subprocess import Popen | |
from django.core.management.commands.runserver import \ | |
Command as RunserverCommand | |
print(f"{'-'*30}\n Custom Startup Command by Tanjim \n{'-'*30}\n") | |
This file contains 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
import random | |
all_choices = ["rock", "paper", "scissors"] | |
n = int(input("Rounds:")) | |
def playRockPaperScissor(rounds): | |
your_points = 0 | |
pc_points = 0 | |
for i in range(rounds): |
This file contains 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
# Set - A | |
class A: | |
temp = 2 | |
def __init__(self): | |
self.sum = -1 | |
self.y = 0 | |
self.y = A.temp * 2 | |
self.sum = A.temp + 2 | |
A.temp -= 2 |
This file contains 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
import os | |
input_folder = r"C:\Users\Tanjim\Desktop\main\main" | |
# Find all sub folders | |
for subfolder in os.listdir(input_folder): | |
print(subfolder) | |
# Find all images in the subfolder | |
images = os.listdir(os.path.join(input_folder, subfolder)) | |
print(images) | |
This file contains 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
# Get All Folders and SubFolders, Get all the images in the folder and rename them according to the folder name | |
import os | |
import random | |
import time | |
start_time = time.time() | |
SELECT_LIMIT = 30 | |
current_dir = os.getcwd() |
This file contains 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
#!!! INCOMPLETE | |
class Library: | |
Total_book = 1000 | |
borrow_data = {} | |
def __init__(self,n,id): | |
self.student_name = n |
This file contains 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
#Task10 | |
class Student: | |
def __init__(self,name,ID): | |
self.name = name | |
self.ID = ID | |
def Details(self): | |
return "Name: "+self.name+"\n"+"ID: "+self.ID+"\n" | |
#Write your code here | |
class CSEStudent(Student): | |
def __init__(self,name,ID,session): |
This file contains 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 Netflix: | |
no_of_shows = 0 | |
shows = [] | |
def __init__(self, name, genre, episodes=10): | |
self.name = name | |
self.genre = genre | |
self.episodes = episodes | |
Netflix.no_of_shows += 1 | |
Netflix.shows.append(self.name) | |
This file contains 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
#task 18 | |
class User: | |
def __init__(self,name,destination,typ="Single"): | |
self.name=name | |
self.destination=destination | |
self.typ=typ | |
def status(self): | |
print(f'Status: {self.name} is looking for a shared ride!') | |
class Uber: |
NewerOlder