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
<<APP>> change this variables |
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
import sqlite3 | |
conn = sqlite3.connect('RAMAN.db') | |
cursor = conn.execute("SELECT SYMBOL FROM ELEMENT") | |
elements = cursor.fetchall() | |
i = 0 | |
while i < 10: | |
print elements[i] | |
i = i + 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
import urllib | |
VERIFY_TOKEN = 'edunova.io' | |
PAT = 'EAALZCRTwRe6oBAGzHzbSZBPFB7ytfXLrfGxJZCNfnEbbjU36h7HhcFsZAULaiuSnYSPLqft2otbh1VqOuGobZC24aq04vUuZCuRmS13ZC4Ne9CMH80t79lBPWbg73GfJfD5ykiTg7WqIzafcyeEHECSfRp69ZC1NCWjnQs23E8N4PQZDZD' | |
SEND_MESSAGE_URL = 'https://graph.facebook.com/v2.6/me/messages' | |
THREAD_URL = 'https://graph.facebook.com/v2.6/me/thread_settings' | |
CONNECTION = 'mongodb://vaibhavgeek:'+ urllib.quote('vaibhavgeek@123') + '@ds149577.mlab.com:49577/mathbot' |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Sample Page</title> | |
<style type="text/css"> | |
body, html | |
{ | |
margin: 0; padding: 0; height: 100%; overflow: hidden; | |
} | |
#content |
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
<%= form_for(@team) do |f| %> | |
<% if @team.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@team.errors.count, "error") %> prohibited this team from being saved:</h2> | |
<ul> | |
<% @team.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% 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
<div class="col-md-8 col-md-offset-2 questions"> | |
<div class="well"> | |
<h3><%= @toload.tag_one %> </h3> | |
<ul class="list-group"> | |
<label><li class="list-group-item" onclick = '$(".questions .active").removeClass("active");$(this).addClass("active");' ><%= radio_button_tag 'option', "option1" %> <%= @toload.tag_four %> </li> </label> | |
<label><li class="list-group-item" onclick = '$(".questions .active").removeClass("active");$(this).addClass("active");'><%= radio_button_tag 'option', "option2" %> <%= @toload.tag_five %></li></label> | |
<label><li class="list-group-item" onclick = '$(".questions .active").removeClass("active");$(this).addClass("active");'> <%= radio_button_tag 'option' , "option3" %> <%= @toload.tag_six %></li></label> | |
<label><li class="list-group-item" onclick = '$(".questions .active").removeClass("active");$(this).addClass("active");'> <%= radio_button_tag 'option' , "option4" %> <%= @toload.tag_seven %> </li></label> |
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
# == Schema Information | |
# | |
# Table name: notewidgets | |
# | |
# id :integer not null, primary key | |
# note_id :integer | |
# tag_one :string question_text || content | |
# tag_two :string option1 | |
# tag_three :string option2 | |
# tag_four :string option3 |
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
def advacned_operation(): | |
dic_mult = easy_multiply() | |
dic_div = easy_divide() | |
dic_add = easy_addition() | |
dic_sub = easy_subtraction() | |
question = 'Solve the expression ( %s + %s ) + ( %s - %s ) + ( %s * %s ) + ( %s / %s )' %(dic_add["param1"], dic_add['param2'],dic_sub['param1'],dic_sub['param2'],dic_mult['param1'],dic_mult['param2'],dic_div['param1'],dic_div['param2']) | |
answer = int(dic_add['param1']) + int(dic_add['param2']) + int(dic_sub['param1']) - int(dic_sub['param2']) + ( int(dic_mult['param1']) * int(dic_mult['param2'])) + ( int(dic_div['param1'])/int(dic_div['param2']) ) | |
option1 = answer + 3 | |
option2 = answer + 5 |
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
import json | |
import requests | |
from constants import SEND_MESSAGE_URL, PAT as token | |
from random import randint | |
import random | |
import xml.etree.ElementTree | |
import math | |
def send_typing_status(recipient): |
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
from random import randint | |
import random | |
import math | |
def quadeasy(): | |
a = randint(1,7) | |
c = randint(1,40) | |
b = 2 * math.sqrt(a*c) | |
while(math.sqrt(a*c).is_integer() == False): | |
c = c+1 |