Skip to content

Instantly share code, notes, and snippets.

View vingkan's full-sized avatar

Vinesh Kannan vingkan

  • Ambience
  • San Francisco, California
View GitHub Profile
@vingkan
vingkan / hawklinkrosterscraper.js
Created September 14, 2017 19:58
Improved Roster Scraper for Campus Labs
var orgID = // Your Organization ID;
getOrganization(orgID, 1).then((initialOrg) => {
getOrganization(orgID, initialOrg.totalItems).then((fullOrg) => {
let promises = [];
fullOrg.items.forEach((item) => {
let memberID = item.account.id;
let p = getMember(memberID);
promises.push(p);
});
Promise.all(promises.map(reflectPromise)).then((res) => {
@vingkan
vingkan / README.md
Last active September 17, 2017 03:19
Rover Mission Activity

Rover Mission: Part I

Activity Time: 20 minutes

To access this activity, go to Cloud9 and clone the workspace: vingkan/rover_mission

You are an engineer at a space exploration agency that is creating a rover to conduct research on another planet. These missions last many years and cost millions of dollars. It would be anticlimactic and frustrating to launch and land a rover, only to have it fail due to programming errors.

The prototyping team has created a software project to simulate sending commands to the rover in a test terrain environment. You get the fun assignment: break it.

@vingkan
vingkan / README.md
Last active September 24, 2017 03:43
Battleship Quick Start

Battleship Quick Start

Clone the Respositories

~workspace $ git clone https://github.com/illinoistechesi/battleship.git
~workspace $ git clone https://github.com/illinoistechesi/battlehub.git

Setup Your Directory

@vingkan
vingkan / instructions.md
Last active September 21, 2021 07:39
Getting Started with Nightmare.js

Getting Started with Nightmare.js

In today's Testing Analyst workshop, we played around with Nightmare.js, a JavaScript browser automation library that is useful for testing website interfaces.

It is easier to work with Nightmare on your computer, rather than to use it in Cloud9. Here are the instructions to install and get started.

Step 1. Install Node.js

JavaScript normally runs in the browser. Node.js is a version of JS that can run on a server, in a terminal, or on some other device. It allows you to easily prepare and run Nightmare scripts.

@vingkan
vingkan / readme.md
Last active November 12, 2017 02:28
ScarletHacks Java Battleship Tournament

Java Battleships

Instructions

  1. Visit class.mimir.io and create an account. Click the Join Course button in the left pane and enter the code 13eaf0a5e1 to join the Battleships tournament.
  2. Find the Battleships project and click Open IDE to access the development area for this challenge.
  3. Open ships/BattleShip.java and edit the name and owner of your ship. A very basic ship has been created for you. Can you figure out what it does?
  4. Simulate the battle. Run these commands in the terminal each time you want to test your ship.
javac battlehub/TeamMain.java
java battlehub.TeamMain
@vingkan
vingkan / solution.sql
Created November 14, 2017 23:20
11/17 Solutions: Two Truths and a Lie with the COPA Dataset
# There are more than 16,000 complaints submitted by males. (True)
SELECT COUNT(*)
WHERE sex_of_complainants = "Male"
SELECT COUNT(*)
WHERE sex_of_complainants LIKE "%Male%"
# Excessive Force was the most common category of complaints in September 2017. (True)
@vingkan
vingkan / database-items.txt
Last active November 24, 2017 17:37
Text Files as a Database
Make my CS100 project awesome
@vingkan
vingkan / shoes_data.csv
Created December 1, 2017 16:30
Product dataset of 9,494 women's shoes for Freya's Footwear store.
We can't make this file beautiful and searchable because it's too large.
id,name,price,onSale,color,material,condition,occasion,brand,manufacturer,hasHeels,countryOfOrigin
AVpe__eOilAPnD_xSt-H,Handcrafted Alpaca Blend 'Purple Charisma' Sweater (Peru),62.99,false,Purple,,,,Novica,,false,
AVpe__JXilAPnD_xSt3F,Pedi Couture Women's Blue Snake Pedicure Spa Toe Separator Sandal Flip Flops (m),30,false,,Foam,,,Pedi Couture,Pedi Couture,false,
AVpe_0mrilAPnD_xSqI7,Anne Klein Sport Perfered Women Us 9.5 Nude Wedge Heel,100,false,,Leather,,,ANNE KLEIN SPORT,,true,
AVpe_0ob1cnluZ0-bnWr,"Sof Comfort Women's Everyday Gel Insoles, 2-pair",10,false,"Multicolor,MULTI",,,,BEAUTIFEET,,false,
AVpe_0PU1cnluZ0-bnM4,"Sneed- Women's/kids' Dance Shoes Latin Leatherette/paillette Flat Heel Blue/pink/silver/gold, Blue-us1 / Eu32 / Uk13 Little Kids , Blue-us1 / Eu32 / Uk13 Little Kids",70,false,,,,,,SNEED,false,
AVpe_-0YilAPnD_xStvJ,Marc Fisher Fawna Women Cap Toe Leather Oxford,89,false,,Leather,,,Marc Fisher,Marc Fisher,true,
AVpe_19KilAPnD_xSqnY,Caparros Karissa Open Toe Canvas Sandals,79,false,Silv
@vingkan
vingkan / shoes_data_small.csv
Last active December 11, 2017 11:30
Small dataset of shoes.
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 2 in line 8.
id,name,price,onSale,color,material,condition,occasion,brand,manufacturer,hasHeels,countryOfOrigin
0,1,2,3,4,5,6,7,8,9,10,11
AVpe__eOilAPnD_xSt-H,Handcrafted Alpaca Blend 'Purple Charisma' Sweater (Peru),62.99,false,Purple,,,,Novica,,false,
AVpe__JXilAPnD_xSt3F,Pedi Couture Women's Blue Snake Pedicure Spa Toe Separator Sandal Flip Flops (m),30,false,,Foam,,,Pedi Couture,Pedi Couture,false,
AVpe_0mrilAPnD_xSqI7,Anne Klein Sport Perfered Women Us 9.5 Nude Wedge Heel,100,false,,Leather,,,ANNE KLEIN SPORT,,true,
AVpe_0ob1cnluZ0-bnWr,"Sof Comfort Women's Everyday Gel Insoles, 2-pair",10,false,"Multicolor,MULTI",,,,BEAUTIFEET,,false,
AVpe_0PU1cnluZ0-bnM4,"Sneed- Women's/kids' Dance Shoes Latin Leatherette/paillette Flat Heel Blue/pink/silver/gold, Blue-us1 / Eu32 / Uk13 Little Kids , Blue-us1 / Eu32 / Uk13 Little Kids",70,false,,,,,,SNEED,false,
AVpe_-0YilAPnD_xStvJ,Marc Fisher Fawna Women Cap Toe Leather Oxford,89,false,,Leather,,,Marc Fisher,Marc Fisher,true,
AVpe_19KilAPnD_xSqnY,Caparros Karissa Open Toe Can
@vingkan
vingkan / String Operations.md
Last active December 3, 2017 20:14
String Operations

String Operations

You will work with Strings in Java frequently! Here is a quick overview of some of the helpful methods you can use on String objects. There are many more and you can read about them in the docs for the String class. The docs may seem intimidating, but you have learned enough to understand and take advantage of them!

equals()

To check if two Strings are equal in Java, you should use the .equals() method. To learn why comparing Strings with == is perilous, check out this phenomenal StackOverflow post.

String[] innerPlanets = {"Mercury", "Venus", "Earth", "Mars"};
boolean isVenus1 = innerPlanets[1].equals("Venus");
boolean isVenus2 = innerPlanets[1].equals("venus");