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 / solutions.sql
Created December 6, 2017 00:11
One set of solutions to the SoQL graphing activity from 11/28/2017 at ChiHackNight.
# Round 1: Create a pie chart of recent actions taken on pothole requests from October 2017.
SELECT most_recent_action, COUNT(*) AS total
WHERE most_recent_action != 'undefined'
AND creation_date >= '2017-10-01'
AND creation_date <= '2017-11-01'
GROUP BY most_recent_action
ORDER BY total DESC
# Round 2: Create a line chart of the number of potholes filled by creation date in October 2017.
@vingkan
vingkan / map.md
Created January 10, 2018 18:53
RoboMimir: Custom Missions Format

RoboMimir: Custom Missions Format

Custom missions for RoboMimir can be configured as text files. See the example below:

# Mission: Crosses
26
_ _ _ * p * _ _ _
_ _ _ p * p _ _ _
_ _ _ * p * _ _ _
@vingkan
vingkan / HashMap.java
Created February 3, 2018 07:21
Java HashMap Source Code
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
@vingkan
vingkan / SampleMain.java
Created April 3, 2018 20:48
Interview Activity: Help this intro Java student debug their code.
class SampleMain {
/*
* INSTRUCTIONS
* Compile: javac SampleMain.java
* Run: java SampleMain x1 y1 x2 y2
* Output: Coordinates of the midpoint like so:
* >> x: 3, y: 4
*/
@vingkan
vingkan / activity.md
Last active July 5, 2021 17:53
Ethical CS: Quantitative Input Influence Activity

Algorithmic Audit: QII

A big moving company gets so many applications that it has started using an automated algorithm to decide who to hire. You have been called in as an independent consultant to determine if the hiring algorithm is biased against women. The algorithm is proprietary so you cannot access its source code. Instead, you will learn how to perform an algorithmic audit to measure potential biases.

In this activity, you will edit the influence.py module.

Applicant Data

Each applicant's data is stored as a list with five elements. Each element is a string representing a different attribute:

@vingkan
vingkan / README.md
Created July 6, 2018 20:29
Chatbot Studio Guides

Chatbot Studio

Instructions

Develop your chatbot in the chat.py file. The API section below explains the chatbot functions you can use to interact with the user.

If you need a cheat sheet for Python syntax, you can use one of these:

@vingkan
vingkan / Facility Types Issue.ipynb
Created March 5, 2019 20:38
Facility Types Issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vingkan
vingkan / solution.sql
Created March 6, 2019 03:50
Solution to 20 questions with the traffic crash dataset.
SELECT RD_NO
WHERE weather_condition = "RAIN"
AND crash_type = "INJURY AND / OR TOW DUE TO CRASH"
AND (INJURIES_FATAL = 0 or injuries_fatal is null)
AND crash_hour IN (13,14,15)
AND DAMAGE = "OVER $1,500"
and first_CRASH_type not in ('REAR END','TURNING'
,'ANGLE', 'PARKED MOTOR VEHICLE', 'HEAD ON'
, 'FIXED OBJECT', "SIDESWIPE SAME DIRECTION")
AND STREET_DIRECTION in ("E","W")
@vingkan
vingkan / hawklinkscraper.js
Created March 27, 2019 21:22
Roster scraper for HawkLink (2019).
/*
* 1. Go to https://iit.campuslabs.com/engage/organization/acm/roster
* 2. Open the browser console
* 3. Copy and paste this script into the console and run
* 4. Keep tab open and do not click anywhere until the script completes
* 5. Save the page output as a .csv
*/
var showing = document.querySelector('#roster-members').parentElement.children[1].children[0].innerText.split(' ');
var total = parseInt(showing[3]);
@vingkan
vingkan / hawklinkscraper.js
Created March 27, 2019 21:22
Roster scraper for HawkLink (2019).
/*
* 1. Go to https://iit.campuslabs.com/engage/organization/acm/roster
* 2. Open the browser console
* 3. Copy and paste this script into the console and run
* 4. Keep tab open and do not click anywhere until the script completes
* 5. Save the page output as a .csv
*/
var showing = document.querySelector('#roster-members').parentElement.children[1].children[0].innerText.split(' ');
var total = parseInt(showing[3]);