-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from opencode18/master
Updated Fork
- Loading branch information
Showing
34 changed files
with
395 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
@import url("https://fonts.googleapis.com/css?family=Audiowide"); | ||
@import url("https://fonts.googleapis.com/css?family=Roboto"); | ||
html { | ||
background-color: #252627; | ||
text-align: center; | ||
color: white; | ||
font-family: "Roboto", sans-serif; | ||
} | ||
h1 { | ||
color: #197278; | ||
font-family: "Audiowide", cursive; | ||
font-weight: 800; | ||
font-size: 50px; | ||
} | ||
input { | ||
border-radius: 50px; | ||
outline: none; | ||
border: none; | ||
background-color: #edddd4; | ||
padding: 15px; | ||
width: 300px; | ||
font-family: "Roboto", sans-serif; | ||
font-size: 15px; | ||
margin: 10px; | ||
} | ||
form { | ||
position: relative; | ||
text-align: center; | ||
} | ||
.foot { | ||
color: white; | ||
font-size: 20px; | ||
position: relative; | ||
margin-top: 400px; | ||
} | ||
button { | ||
border-radius: 50px; | ||
border: none; | ||
outline: none; | ||
padding: 10px; | ||
width: 100px; | ||
cursor: pointer; | ||
background-color: #c44536; | ||
color: white; | ||
font-family: "Roboto", sans-serif; | ||
font-size: 15px; | ||
margin-left: 1px; | ||
margin-top: 30px; | ||
} | ||
.set { | ||
padding: 5px; | ||
margin: 10px; | ||
background-color: #eceeed; | ||
border: none; | ||
outline: none; | ||
border-radius: 10px; | ||
} | ||
.result { | ||
position: relative; | ||
} | ||
.title { | ||
color: #383a39; | ||
} | ||
.company { | ||
color: #0b3c49; | ||
} | ||
.desc { | ||
color: #6987c9; | ||
} | ||
a:link { | ||
color: #bf211e; | ||
} | ||
a:link, | ||
a:hover, | ||
a:visited, | ||
a:active { | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
color: #9d44b5; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Job Hunt</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
|
||
<link rel="stylesheet" href="css/style.css"> | ||
|
||
|
||
</head> | ||
|
||
<body> | ||
|
||
<h1>JOB HUNT</h1> | ||
<div class="input"> | ||
<form id="value"> | ||
<input type="text" placeholder="Enter expertise"> | ||
<input type="text" placeholder="Enter location"> | ||
<button type="button" onclick="myFunction()" value="Submit">Submit</button> | ||
</form> | ||
</div> | ||
<div class="result"></div> | ||
<div class="foot">Developed by Ayush Gupta</div> | ||
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script> | ||
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js'></script> | ||
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js'></script> | ||
|
||
|
||
|
||
<script src="js/index.js"></script> | ||
|
||
|
||
|
||
|
||
</body> | ||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
function myFunction() { | ||
$('.result').empty(); | ||
var x = document.getElementById("value"); | ||
var desc = x.elements[0].value; | ||
var loc = x.elements[1].value; | ||
var link = | ||
"https://jobs.github.com/positions.json?description=" + | ||
desc + | ||
"&location=" + | ||
loc; | ||
$.ajax({ | ||
url: link, | ||
dataType: "jsonp", | ||
success: function(data) { | ||
for (var i = 0; i < data.length; i++) { | ||
var title = data[i].title; | ||
var company = data[i].company; | ||
var link = data[i].url; | ||
var description = data[i].description; | ||
var string = | ||
"<div class='set'><h3 class='title'>" + | ||
title + | ||
"</h3><h4 class='company'>Company : " + | ||
company + | ||
"</h4><div class='desc'>" + | ||
description + | ||
"</div><div class='url'><a href='" + | ||
link + | ||
"' target='_blank'>Link</a></div></div>"; | ||
$(".result").append(string); | ||
} | ||
$(".foot").css("margin-top", "20px"); | ||
} | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from PIL import ImageFont, ImageDraw, Image | ||
|
||
|
||
print("NOTE: Please place the image in the same folder as the one in which the script is running") | ||
print("NOTE: Name the text file to be read as names.txt") | ||
|
||
imName = raw_input("Input the name of the image along with its extension type\n") | ||
|
||
print("Enter the co-ordinates of the text to be placed") | ||
x = int(raw_input("X co-ordinate:\n")) | ||
y = int(raw_input("Y co-ordinate:\n")) | ||
|
||
fontName = raw_input("Enter the name of the font file which is to be used:\n") | ||
fontSize = int(raw_input("Enter the size of font:\n")) | ||
|
||
with open("names.txt") as f: | ||
for line in f: | ||
text = line.rstrip() | ||
|
||
|
||
im = Image.open(imName) | ||
draw = ImageDraw.Draw(im) | ||
|
||
font = ImageFont.truetype(fontName, fontSize) | ||
draw.text((x, y), text, font=font) | ||
|
||
im.save(text + '.jpg') | ||
print("Finished with " + text + ".jpg") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import re | ||
|
||
exp= input() | ||
date = r'(\d{2})-(\d{2})-(\d{4})' | ||
reg = re.search(date,exp) | ||
str = reg.group() | ||
month=str[3:5] | ||
day=str[:2] | ||
year=str[6:] | ||
ans = month+'-'+day+'-'+year | ||
print(ans) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import requests | ||
from bs4 import BeautifulSoup | ||
|
||
url = "https://scirate.com/" | ||
resp = requests.get(url) | ||
|
||
html = resp.text | ||
scirate_soup = BeautifulSoup(html) | ||
|
||
|
||
title = scirate_soup.select('.title a') | ||
|
||
|
||
href = scirate_soup.select('a.paper-download') | ||
|
||
|
||
|
||
for i in range(len(title)): | ||
print(i+1,". ",title[i].getText(),'\n','Link:',href[i].get('href'),'\n\n') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#include<iostream.h> | ||
#include<thread.h> | ||
using namespace std; | ||
|
||
void fact(long long int n) | ||
{ | ||
long long int ans=1,i; | ||
for(i=2;i<=n;i++) | ||
{ | ||
ans=(ans*i)%1000000007; | ||
} | ||
cout<<"The factorial is"<<ans<<"\n"; | ||
} | ||
|
||
void expo(long long int t) | ||
{ | ||
long long int base,exp,final=1; | ||
base=t; | ||
exp=t; | ||
while(exp>0) | ||
{ | ||
if(exp%2!=0) | ||
final=(final*base)%1000000007; | ||
base=(base*base)%1000000007; | ||
exp/=2; | ||
} | ||
cout<<"The exponential of number with respect to itself is"<<final<<"\n"; | ||
} | ||
|
||
int main() | ||
{ | ||
long long int a; | ||
cin>>a; | ||
thread t1(&fact,a); | ||
thread t2(&expo,a); | ||
t1.join(); | ||
t2.join(); | ||
return 0; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from selenium import webdriver | ||
from selenium.webdriver.common.keys import Keys | ||
|
||
|
||
username = "notmyusername" | ||
password = "notmypassword" | ||
|
||
driver = webdriver.Chrome() | ||
driver.get("http://www.facebook.com") | ||
|
||
username_box = driver.find_element_by_id("email"); | ||
password_box = driver.find_element_by_id("pass"); | ||
|
||
username_box.send_keys(username) | ||
password_box.send_keys(password) | ||
|
||
login = driver.find_element_by_id('loginbutton') | ||
login.click() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from selenium import webdriver | ||
from selenium.webdriver.common.keys import Keys | ||
from time import sleep | ||
|
||
#Page going to google accounts by default | ||
|
||
username = "notmyusername" | ||
password = "notmypassword" | ||
|
||
driver = webdriver.Chrome() | ||
driver.get("http://www.gmail.com") | ||
|
||
username_box = driver.find_element_by_id("identifierId") | ||
username_box.send_keys(username) | ||
|
||
Next = driver.find_elements_by_id("identifierNext") | ||
Next[0].click() | ||
|
||
sleep(1) | ||
|
||
password_box = driver.find_element_by_name("password") | ||
password_box.send_keys(password) | ||
|
||
Next = driver.find_element_by_id("passwordNext") | ||
Next.click() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
IIT2016001 | ||
IIT2016002 | ||
IIT20167 | ||
mubu | ||
dawei | ||
test1 | ||
biggerlengthwordwow | ||
a | ||
45 | ||
ogioigrneio | ||
fop | ||
frpeowfjvor or | ||
huhhh | ||
45 | ||
memelord45 | ||
abcdefg | ||
opencodee | ||
you have found it |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
from PIL import Image | ||
from PIL import ImageFont | ||
from PIL import ImageDraw | ||
import csv | ||
import os | ||
|
||
participants = [] | ||
|
||
with open("input.csv","rb") as f: | ||
reader = csv.reader(f) | ||
for row in reader: | ||
participants.append( row[0] ) | ||
|
||
|
||
|
||
fonts_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'fonts') | ||
font = ImageFont.truetype(os.path.join(fonts_path, 'best_font.ttf'), 80) | ||
|
||
output_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'Output') | ||
|
||
|
||
|
||
i=1 | ||
for name in participants: | ||
|
||
img = Image.open("sample_in.jpg") | ||
draw = ImageDraw.Draw(img) | ||
fsize_x , fsize_y = draw.textsize(name,font) | ||
|
||
x = 1065-(fsize_x)/2 | ||
y = 510-(fsize_y)/2 | ||
draw.text( (x , y) ,name,(0,0,0),font) | ||
|
||
output_name = os.path.join( output_path , str(i)+" - "+name+".jpg" ) | ||
img.save(output_name) | ||
i+=1 |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import os | ||
from PIL import ImageFont, ImageDraw, Image | ||
|
||
fileName = raw_input("Enter name of the file from which you want to read the names of participants: ") | ||
imgName = raw_input("Enter the name of image that you want to use as your template along with extension: ") | ||
|
||
coOrdinates = raw_input("Enter the x and y co-ordinates of the text to be placed by separating them with a space like \"500 500\"") | ||
coOrdinates_List = coOrdinates.split(" ") | ||
x = int(coOrdinates_List[0]) | ||
y = int(coOrdinates_List[1]) | ||
|
||
|
||
with open(filename) as f: | ||
for line in f: | ||
name = line.rstrip() | ||
|
||
|
||
img = Image.open(imgName) | ||
draw = ImageDraw.Draw(img) | ||
|
||
font = font = ImageFont.truetype("a.ttf", 60) | ||
draw.text((x, y), name, font=font) | ||
|
||
img.save(name + '.jpg') | ||
|
||
if not os.path.exists( 'certificates' ) : | ||
os.makedirs( 'certificates' ) | ||
|
||
img.save( 'certificates\\'+ name +'.pdf', "PDF", resolution=100.0) | ||
|
Oops, something went wrong.