Skip to content

Instantly share code, notes, and snippets.

i = 1
hot = 0
cold = 0
TempRec = []
time = 0
######################################
#CALCULATES THE HIGHEST
def highest():
print TempRec[2]
highest = 0
const int trigpin = 9;
const int echopin = 10;
const int ledPin = 6;
int sec;
int output;
long duration;
int distance;
import random
#defining arrays
returnTime = []
#rertun time array is used to store the return time,boatMoney to store the money taken for each boat,trvael time store the the total time taken on waterfor every boat
boatMoney = []
travelTime = []
boatNumber = 10
currentTime = 1001
runningT = 0
avail = 0
#generates a random string of length 5
import uuid
import socket
t = 0
def genHash():
token = str(uuid.uuid4())
hash = (token[:5])
return hash
while t == 0:
@Dharisd
Dharisd / genhash.py
Last active November 28, 2017 09:43
#generates a random string of length 5
import uuid
import socket
t = 0
def genHash():
token = str(uuid.uuid4())
hash = (token[:5])
return hash
while t == 0:
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@Dharisd
Dharisd / Interceptcheck.js
Created November 6, 2018 09:27
find whether line intercepts with polygon
function checkIntercept(line,poly){
for (var i = 0; i < poly.length; i++) {
c_poly = poly[i]
initial_check = turf.booleanCrosses(line,c_poly);
if (initial_check == 1){
console.log("crosses")
line_array = line.geometry.coordinates
//define options for the pointinpolygon , only accepted if inside border
require('ngraph.tojson')
require('fs')
import { createGraphFromGeoJson } from './createGraphFromGeoJson';
var graph = createGraphFromGeoJson({"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[73.5134525,4.0836358],[73.5135492,4.0838596],[73.5130893,4.0842318],[73.5127634,4.0844907],[73.5124225,4.0847396],[73.5122279,4.0848665],[73.5120493,4.0849302],[73.5117368,4.0850733],[73.5115068,4.0850833],[73.5113856,4.0850514],[73.5111576,4.0851611],[73.5109135,4.0852413],[73.5108304,4.0852841],[73.5106775,4.0853243],[73.5105488,4.0853564],[73.5103878,4.0853671],[73.5101813,4.0852948],[73.5100472,4.0851798],[73.5100686,4.0850728],[73.5101652,4.0850433],[73.5103154,4.085046],[73.5104281,4.085046],[73.510538,4.08503],[73.5106559,4.0850015],[73.5107465,4.0846735],[73.510825,4.0845644],[73.5109618,4.0843959],[73.5112059,4.084115],[73.5113132,4.0839438],[73.5115063,4.0837351],[73.5115868,4.0834649],[73.5117665,4.0833284],[73.5118577,4.0831572],[73.5119301,4.0830234],[73.5119462,4.0829217],[73.5119194,4.0
import dateparser
import re
#this file will contain the utilities like texting text parser and date parsers that the scraper needs
class utils(object):
#define self
def __init__(self):
pass