diff --git a/Calculator/index.html b/Calculator/index.html new file mode 100644 index 0000000..5940c0a --- /dev/null +++ b/Calculator/index.html @@ -0,0 +1,52 @@ + + + + + + + Calculator + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AC%/
+-x
789
456
123
.0=
+
+ + + + \ No newline at end of file diff --git a/Calculator/scripts.js b/Calculator/scripts.js new file mode 100644 index 0000000..c7cba26 --- /dev/null +++ b/Calculator/scripts.js @@ -0,0 +1,61 @@ +var a = ''; +var b = ''; +var num = []; +var ans; + +// All the numbers and operators input will be stored in an array "num" using function "sendNum()" +function sendNum(digit){ + + num.push(digit); + + if(num.length != 1){ + a = ''; + document.getElementById('screen').innerHTML = a; // clearing the screen. + } + + + for(i=0; i 0){ + num.pop(); // emptying the array "num" + } + + num.push(ans.toString()); + + +} + + +// When user presses "AC", function "clearScr()" is called +function clearScr(){ + document.getElementById('screen').innerHTML = ''; + + while(num.length > 0){ + num.pop(); // emptying the array "num" + } + + a =''; + b =''; +} \ No newline at end of file diff --git a/Calculator/styles.css b/Calculator/styles.css new file mode 100644 index 0000000..0d27e6c --- /dev/null +++ b/Calculator/styles.css @@ -0,0 +1,47 @@ +div{ + background-color: #334d4d; + margin: 50px; + width: 350px; + height: 550px; + margin: 0 auto; /* horizontally centreing an element */ + border-radius: 20px; + padding: 10px; +} + +header{ + background-color: #d1e0e0; + width: 330px; + height: 100px; + border-radius: 20px; + margin: 0 auto; + font-size: xx-large; + color: #000000; + text-align: center; + +} + +table{ + background-color: #FFFFFF; + margin: 0 auto; + margin-top: 20px; + margin-right: 10px; + margin-left: 10px; + border-radius: 20px; +} + +td{ + width: 110px; + height: 60px; + text-align: center; + font-size: xx-large; + +} + +.orange{ + color: #ff3300; +} + +td:active{ + background-color: #e0e0d1; + border-radius: 20px; +} \ No newline at end of file diff --git a/Calender-App/cyber.png b/Calender-App/cyber.png new file mode 100644 index 0000000..2812abf Binary files /dev/null and b/Calender-App/cyber.png differ diff --git a/Calender-App/index.html b/Calender-App/index.html new file mode 100644 index 0000000..9ab8784 --- /dev/null +++ b/Calender-App/index.html @@ -0,0 +1,67 @@ + + + + + + + + Calendar + + + + + + + +
+
+

Cyber-Group Holidays Calendar

+
+
+ +
+
+

+
+ +
+ + + + +
+ + +
+
+
+
+
MADE BY VIKAS UPADHAYAY
+
+
+
+ + + + + \ No newline at end of file diff --git a/Calender-App/scripts.js b/Calender-App/scripts.js new file mode 100644 index 0000000..506f7da --- /dev/null +++ b/Calender-App/scripts.js @@ -0,0 +1,150 @@ + var today = new Date(); + var currentMonth = today.getMonth(); + var currentYear = today.getFullYear(); + var selectMonth = document.getElementById("month"); + + + var calendar = document.getElementById("calendar"); + var lang = calendar.getAttribute('data-lang'); + + var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + + + const indian_dallas_holiday = [ + [0, 1, "New Year's Day"], + [3, 2, "Good Friday"], + [11, 27, "Christmas (observed)"], + ]; + + + const i_holiday = [ + [0, 26, "Republic Day"], + [2, 29, "Holi"], + [4, 13, "Ramzan/ Eid-ul-Fitr"], + [7, 30, "Janmashtami"], + [9, 15, "Dussehra"], + [10, 4, "Diwali"], + [10, 5, "Diwali"], + ]; + + + const d_holiday = [ + [4, 31, "Memorial Day"], + [6, 5, "Independence Day (observed)"], + [8, 6, "Labor Day"], + [10, 25, "Thanksgiving"], + [10, 26, "Thanksgiving"], + [11, 24, "Christmas Eve"], + [11, 31, "New Year’s Eve"], + ]; + + var dayHeader = ""; + for (day in days) { + dayHeader += "" + days[day] + ""; + } + dayHeader += ""; + + document.getElementById("thead-month").innerHTML = dayHeader; + + + monthAndYear = document.getElementById("monthAndYear"); + showCalendar(currentMonth, 2021); + + + function jump() { + document.querySelector('.add-text').innerHTML = ""; + currentMonth = parseInt(selectMonth.value); + showCalendar(currentMonth, 2021); + } + + function showCalendar(month, year) { + + var firstDay = ( new Date( year, month ) ).getDay(); + + tbl = document.getElementById("calendar-body"); + + + tbl.innerHTML = ""; + + + monthAndYear.innerHTML = months[month] + " " + year; + selectMonth.value = month; + + // creating all cells + var date = 0; + for ( var i = 0; i < 6; i++ ) { + var row = document.createElement("tr"); + + for ( var j = 0; j < 7; j++ ) { + if ( i === 0 && j < firstDay ) { + cell = document.createElement( "td" ); + cellText = document.createTextNode(""); + cell.appendChild(cellText); + row.appendChild(cell); + } else if (date >= daysInMonth(month, year)) { + break; + } else { + date++; + cell = document.createElement("td"); + cell.setAttribute("data-date", date); + cell.setAttribute("data-month", month + 1); + cell.setAttribute("data-year", year); + cell.setAttribute("data-month_name", months[month]); + cell.className = "date-picker"; + cell.innerHTML = "" + date + ""; + + if ( date === today.getDate() && year === today.getFullYear() && month === today.getMonth() ) { + cell.className = "date-picker selected"; + } + row.appendChild(cell); + + } + + let status_code = 0; + //common holiday + indian_dallas_holiday.forEach((index) => { + if (month == index[0] && date == index[1]) + { + cell.classList.add("holidays"); + cell.onclick = () =>{ + document.querySelector('.add-text').innerHTML = "India and Dallas office are celebrating " + + index[2]; + } + } + }); + + i_holiday.forEach((index) => { + if (month == index[0] && date == index[1]) + { + cell.classList.add("i-holidays"); + cell.onclick = () =>{ + document.querySelector('.add-text').innerHTML = "India office is celebrating " + + index[2]; + } + } + }); + + d_holiday.forEach((index) => { + if (month == index[0] && date == index[1]) + { + cell.classList.add("d-holidays"); + cell.onclick = () =>{ + document.querySelector('.add-text').innerHTML = "Dallas office is celebrating " + + index[2]; + } + } + }); + + } + + tbl.appendChild(row); + } + + } + + function daysInMonth(iMonth, iYear) { + return 32 - new Date(iYear, iMonth, 32).getDate(); + } + + \ No newline at end of file diff --git a/Calender-App/styles.css b/Calender-App/styles.css new file mode 100644 index 0000000..b6551fe --- /dev/null +++ b/Calender-App/styles.css @@ -0,0 +1,118 @@ +html { + font-family: sans-serif; + font-size: 15px; + line-height: 1.4; + color: #444; + } + + body { + margin: 0; + background: linear-gradient(to bottom, #33ccff85 0%, #bd49836e 100%); + font-size: 1em; + } + + .wrapper { + margin: 15px auto; + max-width: 1100px; + } + + .container-calendar { + background: #ffffff; + border-radius: 25px; + padding: 15px; + max-width: 475px; + margin: 0 auto; + overflow: auto; + } + + .button-container-calendar button { + cursor: pointer; + display: inline-block; + zoom: 1; + background: #00a2b7; + color: #fff; + border: 1px solid #0aa2b5; + border-radius: 4px; + padding: 5px 10px; + } + + .table-calendar { + border-collapse: collapse; + width: 100%; + } + + .table-calendar td, .table-calendar th { + padding: 5px; + border: 1px solid #e2e2e2; + text-align: center; + vertical-align: top; + } + + .date-picker.selected { + font-weight: bold; + outline: 1px dashed #00BCD4; + } + + .date-picker.selected span { + border-bottom: 2px solid currentColor; + } + + /* sunday */ + .date-picker:nth-child(1) { + color: red; + } + + /* friday */ + .date-picker:nth-child(7) { + color: red; + } + + #monthAndYear { + text-align: center; + margin-top: 0; + } + + .button-container-calendar { + position: relative; + margin-bottom: 1em; + overflow: hidden; + clear: both; + } + + #previous { + float: left; + } + + #next { + float: right; + } + + .footer-container-calendar { + margin-top: 1em; + border-top: 1px solid #dadada; + padding: 10px 0; + } + + .footer-container-calendar select { + cursor: pointer; + display: inline-block; + zoom: 1; + background: #ffffff; + color: #585858; + border: 1px solid #bfc5c5; + border-radius: 3px; + padding: 5px 1em; + } + +.holidays{ + background-color: blueviolet; +} +.i-holidays{ + background-color: rgb(185, 79, 191); +} +.d-holidays{ + background-color: rgb(87, 180, 192); +} +.add-text{ + font-family: Verdana, Geneva, Tahoma, sans-serif; +} \ No newline at end of file diff --git a/Convert-case b/Convert-case new file mode 160000 index 0000000..8afc169 --- /dev/null +++ b/Convert-case @@ -0,0 +1 @@ +Subproject commit 8afc169b6b23875987861bae2097e28fd4f12a4f diff --git a/Portfolio/assert/im1.jpg b/Portfolio/assert/im1.jpg new file mode 100644 index 0000000..fa26c25 Binary files /dev/null and b/Portfolio/assert/im1.jpg differ diff --git a/Portfolio/assert/im2.jpg b/Portfolio/assert/im2.jpg new file mode 100644 index 0000000..7e50250 Binary files /dev/null and b/Portfolio/assert/im2.jpg differ diff --git a/Portfolio/assert/im3.png b/Portfolio/assert/im3.png new file mode 100644 index 0000000..0e2bd6f Binary files /dev/null and b/Portfolio/assert/im3.png differ diff --git a/Portfolio/assert/im4.jpg b/Portfolio/assert/im4.jpg new file mode 100644 index 0000000..06208f0 Binary files /dev/null and b/Portfolio/assert/im4.jpg differ diff --git a/Portfolio/assert/image2.png b/Portfolio/assert/image2.png new file mode 100644 index 0000000..c364919 Binary files /dev/null and b/Portfolio/assert/image2.png differ diff --git a/Portfolio/assert/image3.jpg b/Portfolio/assert/image3.jpg new file mode 100644 index 0000000..bfc51dc Binary files /dev/null and b/Portfolio/assert/image3.jpg differ diff --git a/Portfolio/assert/image5.jpg b/Portfolio/assert/image5.jpg new file mode 100644 index 0000000..faeb4c4 Binary files /dev/null and b/Portfolio/assert/image5.jpg differ diff --git a/Portfolio/index.html b/Portfolio/index.html new file mode 100644 index 0000000..f10957e --- /dev/null +++ b/Portfolio/index.html @@ -0,0 +1,269 @@ + + + + + + + + My Portfolio + + + + + + + + + + + + + + + + + + + + +
+
+ +

Hello, This is Vikas Upadhayay

+
An artist turning into developer
+

+ learner || coder || artist +

+

+ 3D's +

+

+ Dedication || Determination || Discipline +

+
+
+ +
+
+ +
+ +
+
+
+
+
CPP
+
+
83%
+
+
+
+
+
+
+
+
C
+
+
80%
+
+
+
+
+
+
+
+
+
+
Data Structures and Algorithms
+
+
78%
+
+
+
+
+
+
+
+
SQL
+
+
80%
+
+
+
+
+
+
+
+
+
+
Python
+
+
75%
+
+
+
+
+
+
+
+
Machine Learning
+
+
78%
+
+
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ Card image cap +
+
+
Image classification
+
+

Implementation of PCA(Principal component axis) on LFW_IMAGE dataset and + compare classification_report of all type of classification method. LFW image data set + contains more than 13,000 images of faces collected from the web. Each face has been labeled + with the name of the person pictured. This project take those images and perform PCA + algorithm on that whether compare the accuracy of each classification method applied and + best result is given by SVC classification method with almost 88% of accuracy score.

+
+
+
+
+
+ Card image cap +
+
+
Text classification
+
+

Text classification method performed on 20 newsgroups dataset, 20 + newsgroups dataset contain 19997 articles from 20 news groups. This method helps in building + Naive Bayes classification from scratch and then comparing it's accuracy with Multinomial + Naive Bayes(already implemented in sklearn). Accuracy for implemented Naive Bayes + classification is 80% which is just 1% lower as compared to Multinomial Naive Bayes. +

+
+
+
+
+
+
+ +
+
+
+
+
+ Card image cap +
+
+
SelfCoded-DecisionTree
+
+

This project focus on implementation of decision tree from scratch on iris + data from sklearn library. Decision tree is one of most powerful way to classify data using + survive learning, implementation of decision tree includes.. 1) how we are choosing the best + feature. 2) splitting of dataset on the base of gain ratio. 3) output decision tree for + better understanding. Method used:- functions for building tree and calculation of entropy + for gain ratio. Class for representing tree visually. +

+
+
+
+
+
+ Card image cap +
+
+
Twitter sentiment analysis
+
+

Sentimental analysis gives the brief description about the emotions of an + individual. This project focus on analyzation of tweets from different people about an + airline, using NLP. The output tell us whether the tweet is positive, negative or neutral. +

+
+
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/Portfolio/scripts.js b/Portfolio/scripts.js new file mode 100644 index 0000000..e18992c --- /dev/null +++ b/Portfolio/scripts.js @@ -0,0 +1,22 @@ +var textWrapper = document.querySelector('.ml12'); +textWrapper.innerHTML = textWrapper.textContent.replace(/\S/g, "$&"); + +anime.timeline({loop: true}) + .add({ + targets: '.ml12 ', + translateX: [40,0], + translateZ: 0, + opacity: [0,1], + easing: "easeOutExpo", + duration: 1200, + delay: (el, i) => 500 + 30 * i + }).add({ + targets: '.ml12 ', + translateX: [0,-30], + opacity: [1,0], + easing: "easeInExpo", + duration: 1100, + delay: (el, i) => 100 + 30 * i + }); + + \ No newline at end of file diff --git a/Portfolio/style.css b/Portfolio/style.css new file mode 100644 index 0000000..2cc3abb --- /dev/null +++ b/Portfolio/style.css @@ -0,0 +1,140 @@ +html,body { + margin:0; + padding:0; + overflow-x: hidden; +} +.nava{ + box-sizing: border-box; +} +.nav1{ + padding-left: 2rem; + padding-right: .5rem; + background-color: #76b5c5; +} +.lii{ + padding-left: 1rem; + padding-right: 2rem; +} + +.div2{ + background-image: url(./assert/image3.jpg); + height: 44rem; + position: relative; + text-align: center; +} +.div21{ + + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.rounded-corners{ + border-radius: 30px; +} +.dii{ + border-color: blue; +} +#head{ + padding-top: 2rem; + padding-bottom: 4rem; +} +.rr{ + padding-left: 5rem; + padding-right: 5rem; + padding-bottom: 5rem; +} +.cc{ + /*border-radius: 20px;*/ + border-color: #76b5c5; +} +.card-a{ + padding-bottom: 3rem; +} +.card-c{ + border-radius: 20px; + border-color: #76b5c5; +} +.card-img{ + height: 16rem; + width: 17rem; + margin: auto; + padding-top: 1rem; + padding-bottom: 1rem; +} +.ff{ + font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; +} + +.ml12 { + font-weight: 200; + font-size: 1.8em; + text-transform: uppercase; + letter-spacing: 0.5em; + } + +.ml12 .letter { + display: inline-block; + line-height: 1em; +} + +.footer-basic { + padding:40px 0; + background-color:#76b5c5; + color: black; + } + + .footer-basic ul { + padding:0; + list-style:none; + text-align:center; + font-size:18px; + line-height:1.6; + margin-bottom:0; + } + + .footer-basic li { + padding:0 10px; + } + + .footer-basic ul a { + color:inherit; + text-decoration:none; + opacity:0.8; + } + + .footer-basic ul a:hover { + opacity:1; + } + + .footer-basic .social { + text-align:center; + padding-bottom:25px; + } + + .footer-basic .social > a { + font-size:24px; + width:40px; + height:40px; + line-height:40px; + display:inline-block; + text-align:center; + border-radius:50%; + border:1px solid #ccc; + margin:0 8px; + color:inherit; + opacity:0.75; + } + + .footer-basic .social > a:hover { + opacity:0.9; + } + + .footer-basic .copyright { + margin-top:15px; + text-align:center; + font-size:13px; + color:black; + margin-bottom:0; + } + diff --git a/Tic Tac Toe/index.html b/Tic Tac Toe/index.html new file mode 100644 index 0000000..f1e1236 --- /dev/null +++ b/Tic Tac Toe/index.html @@ -0,0 +1,47 @@ + + + + + + + + tic tac toe + + + + + + + +
+
+

Tic Tac Toe

+ "come let's play" +
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +
+ + + + + + \ No newline at end of file diff --git a/Tic Tac Toe/scripts.js b/Tic Tac Toe/scripts.js new file mode 100644 index 0000000..f1b332f --- /dev/null +++ b/Tic Tac Toe/scripts.js @@ -0,0 +1,89 @@ +const X_CLASS = 'x' +const CIRCLE_CLASS = 'circle' +const WINNING_COMBINATIONS = [ + [0, 1, 2], + [3, 4, 5], + [6, 7, 8], + [0, 3, 6], + [1, 4, 7], + [2, 5, 8], + [0, 4, 8], + [2, 4, 6] +] +const cellElements = document.querySelectorAll('[data-cell]') +const board = document.getElementById('board') +const winningMessageElement = document.getElementById('winningMessage') +const restartButton = document.getElementById('restartButton') +const winningMessageTextElement = document.querySelector('[data-winning-message-text]') +let circleTurn + +startGame() + +restartButton.addEventListener('click', startGame) + +function startGame() { + circleTurn = false + cellElements.forEach(cell => { + cell.classList.remove(X_CLASS) + cell.classList.remove(CIRCLE_CLASS) + cell.removeEventListener('click', handleClick) + cell.addEventListener('click', handleClick, { once: true }) + }) + setBoardHoverClass() + winningMessageElement.classList.remove('show') +} + +function handleClick(e) { + const cell = e.target + const currentClass = circleTurn ? CIRCLE_CLASS : X_CLASS + placeMark(cell, currentClass) + if (checkWin(currentClass)) { + endGame(false) + } else if (isDraw()) { + endGame(true) + } else { + swapTurns() + setBoardHoverClass() + } +} + +function endGame(draw) { + if (draw) { + winningMessageTextElement.innerText = 'Draw!' + } else { + winningMessageTextElement.innerText = `${circleTurn ? "O's" : "X's"} Wins!` + } + winningMessageElement.classList.add('show') +} + +function isDraw() { + return [...cellElements].every(cell => { + return cell.classList.contains(X_CLASS) || cell.classList.contains(CIRCLE_CLASS) + }) +} + +function placeMark(cell, currentClass) { + cell.classList.add(currentClass) +} + +function swapTurns() { + circleTurn = !circleTurn +} + +function setBoardHoverClass() { + board.classList.remove(X_CLASS) + board.classList.remove(CIRCLE_CLASS) + if (circleTurn) { + board.classList.add(CIRCLE_CLASS) + } else { + board.classList.add(X_CLASS) + } +} + +function checkWin(currentClass) { + return WINNING_COMBINATIONS.some(combination => { + return combination.every(index => { + return cellElements[index].classList.contains(currentClass) + }) + }) +} \ No newline at end of file diff --git a/Tic Tac Toe/styles.css b/Tic Tac Toe/styles.css new file mode 100644 index 0000000..1a3a231 --- /dev/null +++ b/Tic Tac Toe/styles.css @@ -0,0 +1,146 @@ +*, *::after, *::before { + box-sizing: border-box; + } + + :root { + --cell-size: 100px; + --mark-size: calc(var(--cell-size) * .9); + } + + body { + margin: 0; + } + + .board { + width: 100vw; + height: 100vh; + display: grid; + justify-content: center; + align-content: center; + justify-items: center; + align-items: center; + grid-template-columns: repeat(3, auto) + } + + .cell { + width: var(--cell-size); + height: var(--cell-size); + border: 1px solid black; + display: flex; + justify-content: center; + align-items: center; + position: relative; + cursor: pointer; + } + + .cell:first-child, + .cell:nth-child(2), + .cell:nth-child(3) { + border-top: none; + } + + .cell:nth-child(3n + 1) { + border-left: none; + } + + .cell:nth-child(3n + 3) { + border-right: none; + } + + .cell:last-child, + .cell:nth-child(8), + .cell:nth-child(7) { + border-bottom: none; + } + + .cell.x, + .cell.circle { + cursor: not-allowed; + } + + .cell.x::before, + .cell.x::after, + .cell.circle::before { + background-color: black; + } + + .board.x .cell:not(.x):not(.circle):hover::before, + .board.x .cell:not(.x):not(.circle):hover::after, + .board.circle .cell:not(.x):not(.circle):hover::before { + background-color: lightgrey; + } + + .cell.x::before, + .cell.x::after, + .board.x .cell:not(.x):not(.circle):hover::before, + .board.x .cell:not(.x):not(.circle):hover::after { + content: ''; + position: absolute; + width: calc(var(--mark-size) * .15); + height: var(--mark-size); + } + + .cell.x::before, + .board.x .cell:not(.x):not(.circle):hover::before { + transform: rotate(45deg); + } + + .cell.x::after, + .board.x .cell:not(.x):not(.circle):hover::after { + transform: rotate(-45deg); + } + + .cell.circle::before, + .cell.circle::after, + .board.circle .cell:not(.x):not(.circle):hover::before, + .board.circle .cell:not(.x):not(.circle):hover::after { + content: ''; + position: absolute; + border-radius: 50%; + } + + .cell.circle::before, + .board.circle .cell:not(.x):not(.circle):hover::before { + width: var(--mark-size); + height: var(--mark-size); + } + + .cell.circle::after, + .board.circle .cell:not(.x):not(.circle):hover::after { + width: calc(var(--mark-size) * .7); + height: calc(var(--mark-size) * .7); + background-color: white; + } + + .winning-message { + display: none; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, .9); + justify-content: center; + align-items: center; + color: white; + font-size: 5rem; + flex-direction: column; + } + + .winning-message button { + font-size: 3rem; + background-color: white; + border: 1px solid black; + padding: .25em .5em; + cursor: pointer; + } + + .winning-message button:hover { + background-color: black; + color: white; + border-color: white; + } + + .winning-message.show { + display: flex; + } \ No newline at end of file diff --git a/test1.txt.txt b/test1.txt.txt new file mode 100644 index 0000000..e69de29 diff --git a/vikas.txt.txt b/vikas.txt.txt new file mode 100644 index 0000000..1391c2a --- /dev/null +++ b/vikas.txt.txt @@ -0,0 +1,2 @@ +hi hello +making few chnages here. \ No newline at end of file