Skip to content

Instantly share code, notes, and snippets.

View phanirithvij's full-sized avatar
💫
you spin my head right round ..

loudgolem phanirithvij

💫
you spin my head right round ..
View GitHub Profile
@phanirithvij
phanirithvij / 3-1.py
Created December 3, 2018 16:56
Adventofcode D3-P1
import numpy as np #using numpy
empty = np.empty((1000,1000)) #empty grid
empty[:,:] = 0 #initializing the whole thing to zreoes
def get_input():
with open("input3-1.txt") as file: #input3-1.txt file contains the input
for data in file.read().split("\n"):
if data != "":
parser(data)
@phanirithvij
phanirithvij / main.py
Created November 22, 2018 13:51
ShamefulBluevioletCoordinate created by phanirithvij - https://repl.it/@phanirithvij/ShamefulBluevioletCoordinate
import requests
img_URL = "https://res.cloudinary.com/rootworld/image/upload/v1542648184/luffycuteandstuff.jpg"
API_URL = """\
https://api.pinterest.com/v3/visual_search/flashlight/url/?\
url={img_URL}\
&x=0\
&y=0\
&w=1\
@phanirithvij
phanirithvij / main.py
Created November 22, 2018 13:50
ShamefulBluevioletCoordinate created by phanirithvij - https://repl.it/@phanirithvij/ShamefulBluevioletCoordinate
import requests
img_URL = "https://res.cloudinary.com/rootworld/image/upload/v1542648184/luffycuteandstuff.jpg"
API_URL = """\
https://api.pinterest.com/v3/visual_search/flashlight/url/?\
url={img_URL}\
&x=0\
&y=0\
&w=1\
@phanirithvij
phanirithvij / webdev_online_resources.md
Created July 27, 2018 08:27 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@phanirithvij
phanirithvij / app.py
Created July 2, 2018 11:59 — forked from liulixiang1988/app.py
upload multiple files in Flask
import os
# We'll render HTML templates and access data sent by POST
# using the request object from flask. Redirect and url_for
# will be used to redirect the user once the upload is done
# and send_from_directory will help us to send/show on the
# browser the file that the user just uploaded
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from werkzeug import secure_filename
# Initialize the Flask application