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
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int comparefun (const void *a, const void * b) { | |
return ( *(int *)a - *(int *)b ); | |
} |
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
#pip pyenchant | |
import enchant, itertools | |
characters = input("Enter the letters : ") | |
min_length = int(input("Enter min length : ")) | |
max_length = int(input("Enter max length : ")) | |
print() | |
D = enchant.Dict("en_US") | |
words = set() |
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
from tkinter import * | |
from tkinter import messagebox | |
#global constants are named in ALLCAP by convention | |
global USERID, PASSWD | |
global STUDENT_NAME, STUDENT_REGI, STUDENT_SPEC, STUDENT_MOBI, STUDENT_MAIL | |
global SUPERVISER_UID, SUPERVISER_PWD | |
global SUPERVISER_NAME, SUPERVISER_REGI, SUPERVISER_SPEC, SUPERVISER_MOBI, SUPERVISER_MAIL | |
def student_login(): |
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
from tkinter import* | |
def iCalc(source, side): | |
storeObj = Frame(source,borderwidth = 1, bd= 4,bg="powder blue") | |
storeObj.pack(side=side,expand=YES,fill=BOTH) | |
return storeObj | |
def button (source, side, text, command=None): | |
storeObj = Button(source, text=text, command=command) | |
storeObj.pack(side=side,expand=YES,fill=BOTH) |
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
n,st = int(input()),input() | |
letters = ["c","d","e"," ","u","t"] | |
print(min(min(list(map(lambda x:st.count(x),letters))),st.count("o")//2)) | |
""" | |
Andrew loves programming and simply immerses himself in all programming problems he could lay his hands on. He sat in a contest recently and came across an interesting problem. The problem was that he was given a string of random letters and his job was to find the maximum number of times he could spell the word "code out" using all the letters. |
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 sys,os,zipfile,ftplib, configargparse | |
from os.path import basename | |
def ftp_login(user,passwd,host,port=21,timeout=30): | |
try: | |
ftp = ftplib.FTP() | |
ftp.connect(host, port, timeout) | |
ftp.login(user, passwd) | |
return ftp | |
except ftplib.all_errors as e: |
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
/** | |
* Copyright (c) 2006, Nicolas Hillegeer | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above copyright | |
* notice, this list of conditions and the following disclaimer in the |
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
Linux - elitist attitude - only considers patche of real-world problems. Marketing bullets or one-off requests, such as pageable kernel memory, have received no consideration | |
Kernel Development | |
Introduction | |
============== | |
History | |
----------- |
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
/******************************************************************************************** | |
Create a Process Id (PID) manager that keeps track of free PIDs and ensures | |
that no two active processes are having the same pid. Once a process terminates | |
the PID manager may assigns its pid to new process. | |
Use the following constants to identify the range of possible pid values: | |
#define MIN PID 100 | |
#define MAX PID 1000 | |
You may use any data structure of your choice to represent the availability | |
of process identifiers. One strategy is to adopt what Linux has done and use |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<unistd.h> | |
#define FILE_NAME "CPU_BURST.txt" | |
struct Process{ | |
int at,bt,wt,tat; | |
char name[4]; | |
}; |
NewerOlder