Skip to content

Instantly share code, notes, and snippets.

View mentix02's full-sized avatar
💻
coding away

Manan mentix02

💻
coding away
View GitHub Profile
@mentix02
mentix02 / downloader.py
Created January 29, 2017 21:46
Facebook solution to a problem.
#!/usr/bin/python3
import os
def main():
urlFirst = 'http://www.mywebsite.com/img/'
extension = '.jpg'
for i in range(801):
os.system('wget' + urlFirst + str(i) + extension)
print("Downloaded!")
@mentix02
mentix02 / func.py
Created May 27, 2017 12:38
Some math functions in python
#!/usr/bin/python
import matplotlib.pyplot as plt
def find_distance(x1, y1, x2, y2):
d = ((x2-x1)**2+(y2-y1)**2)**0.5 # the algorithm
return d
def plot_graph(x,y):
@mentix02
mentix02 / songs.php
Created June 16, 2017 18:55
Download songs.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Songs</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
@mentix02
mentix02 / main.cpp
Created September 25, 2017 15:08
C++ code
// AREA FINDER
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int userOption;
float area;
cout << "AREA FINDER\n";
import java.util.Scanner;
public class Calculator{
public static void cout(String text){
System.out.print(text);
}
public static int menu(){
Scanner get = new Scanner(System.in);
@mentix02
mentix02 / OddEven.html
Created December 24, 2017 10:14
Append all even and odd numbers from 0 to 100 into separate rows and columns
<!DOCTYPE html>
<html>
<head>
<title>Odd Even</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<table border="1" id="evenOddTable">
<tr>
<td>Odd</td>
@mentix02
mentix02 / flutur.py
Last active October 7, 2018 13:52
A file to keep track of an NGO
#!/usr/bin/python3
from time import sleep
from requests import get
from datetime import datetime
from bs4 import BeautifulSoup
URL = "http://www.flutur.org/terms"
counter = 0
underscore = "|-------------------------------|"
@mentix02
mentix02 / quora_question_1.py
Created May 16, 2018 14:28
a Quora question for checking how many numbers 6 digit numbers are divisible by 495
"""
question on quora
https://www.quora.com/How-many-6-digit-palindromes-are-divisible-by-495
"""
nums = [str(x) for x in range(100000, 1000000)]
def check_palindrome(num):
if num == num[::-1]:
return True
else:
@mentix02
mentix02 / quora_question_1.py
Last active May 16, 2018 14:30
a Quora question for checking how many numbers 6 digit numbers are divisible by 495
"""
question on quora
https://www.quora.com/How-many-6-digit-palindromes-are-divisible-by-495
"""
nums = [str(x) for x in range(100000, 1000000)]
def check_palindrome(num):
if num == num[::-1]:
return True
else:
@mentix02
mentix02 / DATABASE_CLASS.cpp
Created May 31, 2018 03:32
hosting for a friend
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
struct date
{
int dd,mm,yy;