Request
GET /languages
POST /translate
[
{
"text": "I love books",
This file contains hidden or 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
#include<stdio.h> | |
#include<stdlib.h> | |
int packets[10]; | |
void main(){ | |
int orate = 2,capacity = 5,contain = 0,dropped=0; | |
for (int i = 0; i < 5; ++i) | |
{ | |
packets[i] = rand()%10; | |
} |
This file contains hidden or 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 googletrans import Translator | |
from flask import Flask, request #import main Flask class and request object | |
import requests | |
app = Flask(__name__) #create the Flask app | |
app.secret_key = "secret" | |
texts = {} | |
@app.route('/') | |
def hello_world(): | |
return '<h1>Welcome to Reva Hack</h1>' |
This file contains hidden or 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
''' | |
'A' and 'I' are the only one letter word present in english language, | |
hence this algorithm concatenates the other single letters with the | |
next word in case they are anything other than 'A' or 'I'. | |
''' | |
def test(text): | |
list_words = text.split() | |
if len(list_words[0])==1: | |
if list_words[0] not in ['A','I']: |
This file contains hidden or 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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- CSS only --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> | |
<title>Document</title> | |
</head> |
This file contains hidden or 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
class Node: | |
# Constructor to initialize the node object | |
def __init__(self, data): | |
self.data = data | |
self.next = None | |
class LinkedList: | |
# Function to initialize head |
This file contains hidden or 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
class Node: | |
def __init__(self,data): | |
self.data = data | |
self.next = None | |
self.head = None | |
# class LinkedList: | |
# def __init__(self): | |
# self.next = None | |
# self.head = None |
This file contains hidden or 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
''' | |
Logic is to find the end coordinates and start coordinates | |
start = [x1,y1] end = [x2,y2] | |
shortestDistance = abs(x2-x1) + abs(y2-y1) | |
Wrong moves = input_string_length - shortestDistance | |
''' | |
''' | |
How to run the code, run the python file and then give input_path as the string as shown below | |
python solve.py |
- Random forest - Golf
- Decision Tree - Sonar
- Clustering - Ripley Set
- Association - Market Data
This file contains hidden or 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
/** | |
* MPI program to calculate the value of PI using the MONTO CARLO program. | |
* | |
* 1. Monto Carlo algorithm is very easy | |
* 2. Area of square = 4*R*R | |
* 3. Area of Circle = PI*R*R | |
* 4. Area of circle/area of square = Number of points lyting in circle by number in a square. | |
* 5. Calculate PI by multiplying this by 4. | |
* */ |
OlderNewer