Skip to content

Instantly share code, notes, and snippets.

View yuvrajkhosa's full-sized avatar

Yuvraj Khosa yuvrajkhosa

View GitHub Profile
@yuvrajkhosa
yuvrajkhosa / index.html
Last active December 19, 2018 05:43
thesaurusApiJs
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
body{
background-color: #66b3ff;
import itertools
import enchant
import threading
import time
import re
from itertools import chain
threadsArr = []
def f(word):
global threadsArr
@yuvrajkhosa
yuvrajkhosa / car.js
Last active August 26, 2018 06:51
Traffic wave Simulator
class Car{
constructor(_r,_a, _id){
this.r = _r + random(-10,10)
this.a = _a * 0.0174533
this.len = 20
this.amount = 0.01
this.id = _id
@yuvrajkhosa
yuvrajkhosa / food.js
Last active August 31, 2018 02:46
SnakeGame
class Food{
constructor(){
}
pickLoc(){
this.rows = floor(width/scl)
this.cols = floor(height/scl)
this.pos = createVector(floor(random(this.cols)), floor(random(this.rows)));
this.pos.mult(scl);
@yuvrajkhosa
yuvrajkhosa / ball.js
Last active August 31, 2018 02:49
BreakOut Clone. Javascript. 2018.
class Ball {
//CHANGE SPEED
constructor() {
this.xDir = random([-1, 1]);
this.yDir = 1;
this.xSpeed = 3.8;
this.ySpeed = 3.31629;
// this.pos.x = random(20, width - 20);
// this.pos.y = 220;
this.pos = createVector(random(20, width - 20), 220);
@yuvrajkhosa
yuvrajkhosa / SourceBallSim.html
Last active August 26, 2018 06:59
Ball Simulation
<!DOCTYPE html> <body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.sound.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.sound.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script>
<script src="balls.js"> </script>
<script>
<!DOCTYPE html>
<html>
<body>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!doctype html>
<title> Reaction Test </title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<body>