diff --git a/Data_manipulation_dplyr.ipynb b/Data_manipulation_dplyr.ipynb new file mode 100644 index 0000000..2f7fffe --- /dev/null +++ b/Data_manipulation_dplyr.ipynb @@ -0,0 +1,183 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "name": "Data_manipulation_dplyr.ipynb", + "provenance": [], + "authorship_tag": "ABX9TyMyWCKn/wUyB8R7rUv8tLeV", + "include_colab_link": true + }, + "kernelspec": { + "name": "ir", + "display_name": "R" + }, + "language_info": { + "name": "R" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "SNaOiM05OYAV" + }, + "outputs": [], + "source": [ + "install.packages('tidyverse') \n", + "install.packages('nycflights13')\n", + "library(tidyverse) # This will include the \"dplyr\" package\n", + "library(nycflights13) #Contains the datasets that we are going to work on\n" + ] + }, + { + "cell_type": "code", + "source": [ + "flights=flights\n", + "airlines<-airlines" + ], + "metadata": { + "id": "cZjMD0agOqSj" + }, + "execution_count": 4, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "flights %>%\n", + "dplyr::filter(month==1|month==2,day==1)" + ], + "metadata": { + "id": "MWpyF6FRS6LA" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "\n", + "flightsFiltered <- flights %>% \n", + "dplyr::filter(month %in% c(11,12)) %>%\n", + "dplyr::filter(dep_time >= 700) %>%\n", + "dplyr::filter(carrier!=\"UA\")\n", + "flightsFiltered" + ], + "metadata": { + "id": "dxh9CwimTHdP" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "flightsArranged <- flightsFiltered %>% \n", + "arrange(year,month,day,desc(dep_delay))\n", + "flightsArranged" + ], + "metadata": { + "id": "K0AOgO8YY4LU" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "flightsSelected <- flightsArranged %>%\n", + "dplyr::select(-(hour:time_hour)) %>%\n", + "dplyr::select(-(sched_dep_time),-(sched_arr_time),-(tailnum)) %>%\n", + "dplyr::rename(\"airtime\"=\"air_time\",\"destination\"=\"dest\")\n", + "flightsSelected" + ], + "metadata": { + "id": "M9QEpXSFclLQ" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "flightsMutated <- flightsSelected %>% \n", + "mutate(gain=dep_delay-arr_delay,\n", + " hours =airtime/60,\n", + " gain_per_hour=gain/hours)\n", + " flightsMutated" + ], + "metadata": { + "id": "VUWKE49GeQrn" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "meanDelays <- flightsMutated %>%\n", + "group_by(carrier) %>% \n", + "dplyr::summarize(meanDelay=mean(dep_delay,na.rm=TRUE)) %>%\n", + "arrange(desc(meanDelay))\n", + "meanDelays" + ], + "metadata": { + "id": "8zCktUuvhGkk" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "carrierCounts <- flightsMutated %>% \n", + "group_by(carrier) %>%\n", + " dplyr::summarize(count=n()) %>%\n", + " arrange(desc(count))\n", + " carrierCounts" + ], + "metadata": { + "id": "8JypihCWjBNh" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "airlinesNames <- meanDelays %>%\n", + "left_join(airlines,by=c(\"carrier\"=\"carrier\")) %>%\n", + "dplyr::select(name,carrier,meanDelay)\n", + "airlinesNames" + ], + "metadata": { + "id": "Pre-XxZTjnr5" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": { + "id": "ICl_zx82l_Bm" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/dewqdwqd b/dewqdwqd new file mode 100644 index 0000000..49dc0d5 --- /dev/null +++ b/dewqdwqd @@ -0,0 +1,2 @@ +fewfef +czcaca \ No newline at end of file diff --git a/express.js b/express.js deleted file mode 100644 index 9907c4f..0000000 --- a/express.js +++ /dev/null @@ -1,44 +0,0 @@ -// server side -const express = require("express"); -// express server -const app = express(); -// nodejs -const server = require("http").Server(app); -// nodejs => socket enabled -const path = require("path"); -const io = require("socket.io")(server); -// serve static assets to client -app.use(express.static("public")); -// server -io.on("connection", function(socket) { - socket.on("size", function(size) { - socket.broadcast.emit("onsize", size); - }); - socket.on("color", function(color) { - socket.broadcast.emit("oncolor", color); - }); - - socket.on("toolchange", function(tool) { - socket.broadcast.emit("ontoolchange", tool); - }); - socket.on("hamburger", function() { - socket.broadcast.emit("onhamburger"); - }); - socket.on("mousedown", function(point) { - socket.broadcast.emit("onmousedown", point); - }); - socket.on("mousemove", function(point) { - socket.broadcast.emit("onmousemove", point); - }); - socket.on("undo", function() { - socket.broadcast.emit("onundo"); - }); - socket.on("redo", function() { - socket.broadcast.emit("onredo"); - }); -}); -// nodejs server -const port = process.env.PORT || 3000; -server.listen(port, function(req, res) { - console.log("Server has started at port 3000"); -}); diff --git a/f1.txt b/f1.txt new file mode 100644 index 0000000..9c2c933 --- /dev/null +++ b/f1.txt @@ -0,0 +1 @@ +.sadfasf \ No newline at end of file diff --git a/f2.txt b/f2.txt new file mode 100644 index 0000000..8e08f3b --- /dev/null +++ b/f2.txt @@ -0,0 +1 @@ +sdasd \ No newline at end of file diff --git a/f4.txt b/f4.txt new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json deleted file mode 100644 index 4729a20..0000000 --- a/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "pepBoard", - "version": "1.0.0", - "description": "", - "main": "express.js", - "dependencies": { - "express": "^4.17.1", - "socket.io": "^2.3.0" - }, - "devDependencies": {}, - "scripts": { - "start":"node express" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Pep-DEV101/PepBoard.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/Pep-DEV101/PepBoard/issues" - }, - "homepage": "https://github.com/Pep-DEV101/PepBoard#readme" -} diff --git a/reset.txt b/reset.txt new file mode 100644 index 0000000..0f0b8ba --- /dev/null +++ b/reset.txt @@ -0,0 +1 @@ +reset fil hu me \ No newline at end of file diff --git a/ye wala new hai b/ye wala new hai new file mode 100644 index 0000000..bf37067 --- /dev/null +++ b/ye wala new hai @@ -0,0 +1,2 @@ +blah blah +meh meh