- Please install Anaconda 3.5.
- We will be using Jupyter notebook as our IDE.
- To check if installed correctly, open the command shell and type:
$ jupyter notebook
- It should fire up a browser. In the browser, select
New -> Python (root)
from the right-hand top menu. It will open another tab. In the cell, on that new tab, enter the following command :import pandas as pd
- Click
shift+enter
to run it. If it runs fine, you are good to go for the workshop. - Please post installation issues on this meetup page.
- Please note that there will be NO installation help provided on the day of the workshop.
- The datasets for the workshop will be provided on the day of the workshop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python | |
import sys | |
import json | |
# open grid file | |
with open(sys.argv[1]) as f: | |
lines = [line.rstrip('\n') for line in f] | |
# make the grid but padded on left right and bottom sides with a sentinel like this (makes it easy to grab diagonals) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const request = require('request'); | |
const app = express(); | |
app.use((req, res, next) => { | |
res.header('Access-Control-Allow-Origin', '*'); | |
next(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://puzzling.stackexchange.com/questions/60942/biggest-army-on-a-chessboard | |
Reminder | |
Everybody knows that we can place 8 queens in a chessboard without threatening each other (see There). same reasonment can be made for knights, bishops, rooks and kings. Giving respectively 32 knights, 14 bishops, 8 rooks, and 16 kings. | |
Problem | |
If we assign to each type of piece a value invertly proportionnal of the number of this we can place. It means Knights = 1/32. Bishop = 1/14. Rook = 1/8. Queen =1/8 and King = 1/16. | |
What is the best sum value we can achieve mixing these pieces still with none able to take each other?*/ | |
/* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#AnubhavBalodhi, Puzzling.SE, 7804, 23216, 314... | |
N=int(input()) | |
for num in range(N): | |
for X in range(2,N-8): | |
if (8*((num*(num+1)-8*(X+3))))==(825*(num-4)): | |
print(X,num) | |
#BeDaBe(a)st |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Place this script inside /etc/profile.d/ to set proxy on log in | |
# AND | |
# Copy-paste in to your ~/.bashrc to switch between proxies easily in shells | |
# | |
# | |
# DEFAULTS | |
# | |
# Set default proxy details here. Eg. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author = Nikhil Venkat Sonti | |
# email = [email protected] | |
# github ID = shadowfax92 | |
import sys | |
from xml.dom.minidom import _get_StringIO | |
from lxml import html | |
import requests | |
import os | |
import re | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ORACLE/PLSQL - NVL(A, B) EXAMPLES | |
# If A IS NULL substitute with B | |
# Example 1. if table b contains values that over-write values in table a | |
SELECT NVL(b.name, a.name) AS name FROM a left join b on a.id = b.id; | |
# Example 2. to replace NULL values with an alternative placeholder value | |
SELECT NVL(a.name, 'Unnamed') AS name FROM a; |
NewerOlder