Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>HTML and CSS </title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
@justkaran
justkaran / main.py
Created March 20, 2019 15:27
IndelibleSlightLint-1 created by justkaran - https://repl.it/@justkaran/IndelibleSlightLint-1
import requests
import collections
import re
resp = requests.get('https://raw.githubusercontent.com/justkaran/weltall/master/index.html')
txt = resp.text
from bs4 import BeautifulSoup
soup = BeautifulSoup(txt, "html.parser")
# 1. The number of <br> tags.
length = len(soup.find_all(re.compile("^br")))
@justkaran
justkaran / understanding-word-vectors.ipynb
Created December 14, 2018 19:53 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import tensorflow as tf
import numpy as np
corpus_raw = 'He is the king . The king is royal . She is the royal queen '
# convert to lower case
corpus_raw = corpus_raw.lower()
words = []
for word in corpus_raw.split():
@justkaran
justkaran / main.py
Created November 8, 2018 15:11
MajesticLimpingTechnologies created by justkaran - https://repl.it/@justkaran/MajesticLimpingTechnologies
import time
SpeedOnAverage = int(input('Whats the average speed of your car?'))
dividedBy99 = 99.7793 / SpeedOnAverage
print("If your car could fly and hold the pressure it would take you " + str(dividedBy99) + " hours to reach the orbit.")
@justkaran
justkaran / main.py
Created November 8, 2018 15:11
MajesticLimpingTechnologies created by justkaran - https://repl.it/@justkaran/MajesticLimpingTechnologies
import time
SpeedOnAverage = int(input('Whats the average speed of your car?'))
dividedBy99 = 99.7793 / SpeedOnAverage
print("If your car could fly and hold the pressure it would take you " + str(dividedBy99) + " hours to reach the orbit.")
using UnityEngine;
using UnityEngine.VR;
public class UpdateEyeAnchors : MonoBehaviour
{
GameObject[] eyes = new GameObject[2];
string[] eyeAnchorNames = { "LeftEyeAnchor", "RightEyeAnchor" };
void Update()
@justkaran
justkaran / amqp.py
Last active August 29, 2015 14:18 — forked from wadewegner/amqp.py
import pika, os, urlparse, sys
from Adafruit_Thermal import *
printer = Adafruit_Thermal("/dev/ttyAMA0", 19200, timeout=5)
url_str = os.environ.get('CLOUDAMQP_URL','amqp://YOUR_CLOUDAMQP_URL')
url = urlparse.urlparse(url_str)
params = pika.ConnectionParameters(host=url.hostname, virtual_host=url.path[1:],
credentials=pika.PlainCredentials(url.username, url.password))