Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tanmay sinha/week3 #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion Week-2/README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
# Incoming Soon
# Problem 2 – Busy Sanskar
Sanskar is an awesome web developer and loves creating great web services. One day one of his friends challenged him to build a web service that would allow his friend to interact with the web browsers on Sanskar’s system. But Sanskar is busy building the website for the upcoming cultural fest in his college. Sanskar has asked you to help him win the challenge.

## Basic Requirements:

You have to implement a simple stateless web service that allows one to interact with the two web browsers: Google Chrome and Mozilla Firefox.

The service should support following endpoints:

| Method | Endpoint | Parameter(s) | Description | Should handle|
|--------| ---------|--------------|-------------|--------------|
|GET | /start| browser, url| Starts the < browser > which has the < url > open inside it.| Chrome and Firefox|
|GET|/stop|browser|Kills the < browser >|Chrome and Firefox
|GET|/cleanup|browser|Deletes all the browser session information such as history, cache, cookies, downloads, saved passwords, etc for < browser >|Chrome or Firefox
|GET|/geturl|browser|Returns the currently active tab’s URL. Assume < browser > has exactly one window and one tab open.|Chrome and Firefox|


NOTE:
1. < browser > = chrome/firefox
2. < url > = Any valid URL like: http://www.medium.com

Example usage of endpoints:
> `http://<server>/start?browser=<browser>&url=<url>`
should start the desired browser and open the URL in the same browser instance

> `http://<server>/geturl?browser=<browser>`
should get the current active tab URL for the given browser

> `http://<server>/stop?browser=<browser>`
should stop the given browser if it is running

> `http://<server>/cleanup?browser=<browser>`
should clean up the browsing session for the given browser if has been stopped

## Points to note:
- Browsers have to be started/stopped on the server's end. i.e. if the server is running on machine A and a request to /start is made from machine B, the browser should start on machine A. For testing you may assume machines A and B to be the same, i.e. your own machine.
- Any tool or library that relies on the Selenium (WebDriver) protocol should not be a dependency of the service.
- Service does not need to be OS independent, i.e. if you have a Windows machine, it is expected that the service runs properly in Windows but it is not expected that it runs properly across all operating systems.
- There are no language restrictions.



## Resources:
- IET Explains: [Building an API in Node.js](https://www.youtube.com/playlist?list=PLSQotcOyCW5y7nYGr-NRedbtK5ePgKq7m)
- [Multi-process Browser Architecture](https://helgeklein.com/blog/2019/01/modern-multi-process-browser-architecture/)
- [How browsers work?](https://www.html5rocks.com/en/tutorials/internals/howbrowserswork/)
20 changes: 19 additions & 1 deletion Week-3/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Incoming Soon
# Problem 3 - Funny Lab Situation
Saksham is an awesome competitive programmer, and will use any free time to practice problems to increase his skills. One day in DS Lab Saksham opened the Codechef Online IDE to solve a couple of questions, but quickly found out that Codechef wa down (it was a Thursday :P). You need to help Saksham by creating a good text editor for him.

## Basic Requirement:
You need to implement a WYSIWYG GUI Text editor which suoorts the following operations:
- Have a window for editing text
- Save to and Read from a file
- Show Line Numbers
- Support for Undo and Redo operations

## Points to Note:
- You can use any GUI toolkit or library in any language of your choice. Examples would be TkInter for Python, Swing in Java, Qt for C++ etc.
- The text editor must be platform independent, so select a suitable technology.

## Resources
- [Tkinter Documentation](https://wiki.python.org/moin/TkInter)
- [Swing Documentation](https://docs.oracle.com/javase/8/docs/technotes/guides/swing/index.html)
- [Qt Documentation](https://doc.qt.io/)

104 changes: 104 additions & 0 deletions Week-3/tanmay-sinha/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.vscode
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
38 changes: 38 additions & 0 deletions Week-3/tanmay-sinha/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# About :

This a tkinter based text editor written in python.

Works on Python 3.6 and above.
## How to run :

1. Install dependencies -
```
pip install -r requirements.txt
```
2. Run programme -
```
python main.py
```
## Some features :

* Features like New,Open,Save,Save As for files.
* Cut, Copy, Paste, Undo, Redo and Select All.
* Finding and Replacing .
* Some themes.
* Changing font-size, font-style and font-colour.
* Bold, Italic, Underline etc other functions.

## Screen shots :

![](screenshots/Screenshot_from_2020-01-19_02-57-13.png)


![](screenshots/Screenshot_from_2020-01-19_02-57-27.png)


![](screenshots/Screenshot_from_2020-01-19_02-58-42.png)

## Contributing :

Feel free to contact on alokratn001@gmail.com
for implementing more exciting features .
Binary file added Week-3/tanmay-sinha/icons/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/align-center.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/align-justify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/align-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/align-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/cut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/find.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/find_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/font-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/italic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/new_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/open_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/paste.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/redo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/strike.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week-3/tanmay-sinha/icons/undo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading