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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / 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");
@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 / 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