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
/* | |
#Date of creation : 9 Jan 2016. | |
#Aim of program : To print power set of a set of characters. | |
#Coded by : Rishikesh Agrawani. | |
*/ | |
package main | |
import "fmt" | |
func main() { |
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
""" | |
coded_on : 9 Jan 2017. | |
coded_by : Rishikesh Agrawani. | |
problem link : https://www.hackerearth.com/practice/basic-programming/bit-manipulation/basics-of-bit-manipulation/practice-problems/algorithm/sum-of-numbers-9/ | |
aim_of_script: Sum of numbers problem on Hackerearth. | |
""" | |
testcases = int(raw_input()) #testcases | |
for t in xrange(testcases): | |
n = int(raw_input()) #No. of elements in an array/list | |
nums_set = [int(num) for num in raw_input().split() ]#eg. [2,3,4,0,1] |
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
""" | |
coded_on : 10 January 2017. | |
aim : Write a recursive code to print the number of occurrences of substring "hi" that is not preceded by substring "x" | |
coded_by : Rishikesh Agrawani. | |
""" | |
def abcd(s): | |
try: | |
index=s.index("hi") | |
if index==0: | |
return 1+abcd(s[index+1:]) |
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
""" | |
Coded on : 10 January 2017. | |
Aim : Short hand notation for creating list in Python (3 examples) | |
Python version : 2.7.10 | |
""" | |
#To create a list of lists each list denoting a table of numbers in range [1...10] one after one | |
tables=[[i*j for j in range(1,11)] for i in range(1,11)] | |
for lst in tables: | |
for num in lst: |
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
/*Currently no css for the index.html*/ |
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
""" | |
* Date of creation : 1 Feb 2017 - 4 Feb 2017 | |
* Aim of script : To work with date & time in Python. | |
* Python version : 2.7.12 . | |
* Coded by : Rishikesh Agrawani. | |
* Installation : pytz library (If it is not installed) | |
""" | |
import datetime | |
#Current date & 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
""" | |
Coded On : 14 Feb 2014. | |
Aim : To create our own iterator in Python. | |
Reference link : http://stackoverflow.com/questions/19151/build-a-basic-python-iterator | |
""" | |
class Range: | |
def __init__(self,start,end): #constructor | |
self.start = start | |
self.end = end |
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
.container { | |
width: 80%; | |
margin: 15px auto; | |
} | |
h2{ | |
color:green; | |
font-family: tahoma; | |
font-weight: bold; | |
} | |
.span_lw{ |
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
/*To dynamically draw chart based on the result of call at http://filtron.pythonanywhere.com/api-view/lora-evk-sensors/, use the proper url, commented lines are also important*/ | |
$.ajax({ | |
url:"http://filtron.pythonanywhere.com/api-view/lora-evk-sensors/", | |
//url:"http://127.0.0.1:8000/lora-evk-sensors/", | |
dataType:"json", | |
}).done(function(result){ | |
console.log(result); | |
var ctx = document.getElementById("myChart").getContext("2d"); |