Skip to content

Commit

Permalink
Merge branch 'master' into daciolo
Browse files Browse the repository at this point in the history
  • Loading branch information
ambujraj authored Oct 6, 2018
2 parents 839d445 + 5c6945a commit f8fb6c6
Show file tree
Hide file tree
Showing 21 changed files with 435 additions and 25 deletions.
89 changes: 88 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

Name: [Ryssmo](https://github.com/Ryssmo)<br/>
Place: Norway<br/>
About: Coding is life<br/>
Programming Language: Html, CSS, JS<br/>
Email: [email protected]<br/>


Name: [Miftahul J.](https://github.com/jiadibo)<br/>
Place: Indonesia<br/>
About: I'm moslem programmer<br/>
Expand All @@ -11,12 +19,25 @@ About: I'm pursuing 3rd year from MNNIT Allahbad<br/>
Programming Language: Java,C,C++<br/>
Email: [email protected]<br/>

Name: [Eren Sertkaya](https://github.com/erensertkaya)<br/>
Place: Turkey<br/>
About: I'm web developer which develop passive-income projects<br/>
Programming Language: Php,Javascript<br/>
Email: [email protected]<br/>

Name: [Adit Mehta](https://github.com/aditmehta9)<br/>
Place: Rajkot, Gujarat<br/>
About: I am presently studying ICT at DA-IICT and I like contributing in open source organizations.<br/>
Programming Language:C,C++,Java,Ruby,Chapel<br/>

Name: [Garima Chahar](https://github.com/garimahc15)<br/>
Place: Mandi, India<br/>
About: I am 1st year Electrical Engineering student at IIT Mandi, Mandi.<br/>
Programming Languages: Python<br/>
Email: [email protected]<br/>



Name: [Sajjal](https://github.com/sajjalt)<br/>
Place: New Delhi<br/>
About: I am presently studying computer science at Thapar Institue of Engineering and Technology and love coding.<br/>
Expand Down Expand Up @@ -679,12 +700,78 @@ About: undergraduate student<br/>
Programming Languages: Java, Python, C#, Javascript <br/>


Name: [Shreyansh Kulshreshtha](http://github.com/shreyanshkuls)<br />
Name: [Shreyansh Kulshreshtha](https://github.com/shreyanshkuls)<br />
Place: Mandi, Himachal Pradesh, India<br />
About: Undergraduate student, Music enthusiast, like programming<br />
Programming Languages: C, C++<br />


Name: [Tafique](https://github.com/tafique)<br/>
Place: Bhubanewswar<br/>
About: I am presently studying Instrumentation and electronics at College of Engineering and Technology and love coding.<br/>
Programming Language:C,C++,Python<br/>




Name: [Daniel Dusek](https://github.com/dusekdan)
Place: Brno, Czech Republic || Heraklion, Krete
About: No one of consequence.
Programming Language: It's not about languages, but about paradigms. So objective, procedural, lightly functional, hardly logical. <br />

Name: [Sharan Narayan](http://github.com/sharan-nyn)<br />
Place: Kochi, Kerala, India<br />
About: B.Tech Student<br />
Programming Languages: C, C++<br />


Name: [Ahmet Burak Baraklı](http://github.com/ahmetburakbarakli)<br />
Place: Ankara, Turkey <br />
About: CS Undergrad Student at Middle East Technical University <br />
Programming Languages: Java, C++, Python<br />



Name: [Mayank Abhishek](https://github.com/abhishekmayank)
Place: Bangalore, India
About: Web Developer, Data Enthusiast
Programming Language: Python, Javascript, PHP, R
Email: [email protected]


Name: [Angelo Teoxon](http://github.com/ateoxon)<br />
Place: Houston, TX<br />
About: Undergrad CS major, enjoy web dev, data mining, and databases!!<br />
Programming Languages: Python, Java, Javascript, PHP<br />


Name: [bjellesma](https://github.com/bjellesma)
Place: Massachusetts
About: Programmer, Captain Crunch devourer
Programming Language: Python, JavaScript
Email: [email protected]


Name: [yugesh baral](http://github.com/yogibrl)<br />
Place: Bhaktapur, Nepal<br />
About: To be Computer Engineer<br />
Programming Languages: C, C++<br />



Name: [Thaynnara Gonçalves](https://github.com/thaynnara007)<br/>
Place: Campina Grande, Paraiba, Brasil<br/>
About: I am a 3rd Year Computer Science student at UFCG (Universidade Federal de Campina Grande)<br/>
Programming Languages: Python, Java, JavaScript, Prolog<br/>


Name: [Canoi Gomes](https://github.com/canoi12)<br />
Place: Natal, Brazil<br />
About: IT Student<br />
Programming Languages: C, C++, Lua, Python, JavaScript, C#, GML<br />
Email: [email protected]<br />


Name: [Gabriel Nobrega](https://github.com/gabrielomn)<br/>
Place: Paraiba, Brazil<br/>
About: Undergraduate student at UFCG<br/>
Expand Down
9 changes: 9 additions & 0 deletions Euc_GCD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def GCD(num1, num2):
if num2 is 0:
return num1
else:
return GCD(num2,(num1%num2))

num1,num2=10,20
ans=GCD(num1,num2)
print("GCD of",num1,"&",num2,"is:",ans)
15 changes: 13 additions & 2 deletions HelloWorld.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#include<stdio.h>
#include <stdio.h>

void main(){
printf("Hello World");
printf("Hello World"); // prints Hello World to screen.
}


// Uncomment lines below to practice printing to screen

/*
void main() {
printf("This is a test to print to the screen");
printf('Hello World');
}
*/
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ Email:
```markdown
git clone https://github.com/your-username/hacktoberfest2018.git
```
* Create a branch
* Create a branch for a new feature
```markdown
git checkout -b branch-name
git checkout -b feature/branch-name
```
* Or if it's a bugfix to a file
```markdown
git checkout -b bugfix/branch-name
```
* Make your changes (Choose from any task below)
* Commit and Push
Expand Down
2 changes: 1 addition & 1 deletion factorial/factorial.ml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
let rec factorial n =
if n <= 1 then 1 else n * fact (n - 1);;
if n <= 1 then 1 else n * factorial (n - 1);;
26 changes: 26 additions & 0 deletions fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'''
This module adds a fib function that will allow a user to enter a number of entries that would like returned
'''

def fib(count):
try:
count = int(count)
except:
print("Please enter a value that represents a number as the argument")
print("Ex: fib('2')")
print("Ex: fib(True)")
print("Ex: fib(-3)")
return []
count = count - 2
if count < 0:
print("Please enter a number greater than or equal to 2")
return []
fib_list = [1,1]
for i in range(count):
if i == count:
return fib_list
else:
fib_list.append(fib_list[-1] + fib_list[-2])
return fib_list

print('fib list: {}'.format(fib(37)))
6 changes: 6 additions & 0 deletions fibonacci/fibonacci.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ fibonacci :: Int -> Int
fibonacci 1 = 1
fibonacci 2 = 1
fibonacci x = fibonacci (x-1) + fibonacci (x-2)

{-# Fibonacci taking the advantage of accumulator #-}
fibAcc n = go n (0,1)
where
go !n (!a, !b) | n==0 = a
| otherwise = go (n-1) (b, a+b)
28 changes: 28 additions & 0 deletions graph/Dijkstra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Queue

INF = 1000000000
adjacentes = [0] * 100001
distancias = [INF] * 100001

def dijkstra(no):

global distancias
fila = Queue.PriorityQueue()

distancias[no] = 0
par = (distancias[no], no)
fila.put(par)

while not fila.empty():

_, topo = fila.get()

if adjacentes[topo] != 0:
for peso, filho in adjacentes[topo]:

if distancias[filho] > distancias[topo] + peso:

distancias[filho] = distancias[topo] + peso
fila.put((distancias[filho], filho))


13 changes: 13 additions & 0 deletions hello-world/hello-world-eskil.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hello</title>
</head>
<body>
<script>
alert('Hello, world!');
</script>
</body>
</html>
1 change: 1 addition & 0 deletions hello-world/helloworld.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello World")
1 change: 1 addition & 0 deletions hello-world/myhelloworld.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php echo "hello world !"; ?>
22 changes: 22 additions & 0 deletions html/invert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Invert Text</title>
</head>
<body>
<input id="invert" name="invert" placeholder="Type here the text" onchange="invertText();">
<h1 id="inv-text"></h1>
<script type="text/javascript">
function invertText() {
var txt = document.getElementById("invert").value;
var invtxt = "";

for (var i = txt.length-1; i >= 0; i--) {
invtxt += txt[i];
}

document.getElementById("inv-text").innerHTML = invtxt;
}
</script>
</body>
</html>
48 changes: 48 additions & 0 deletions linklist/Search.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Iterative way to search an element in linked list in Java
class Node
{
int data;
Node next;
Node(int n)
{
data = n;
next = null;
}
}
class LinkedList
{
Node head;
public void push(int new_data)
{
Node new_node = new Node(new_data);
new_node.next = head;
head = new_node;
}
public boolean search(Node head, int x)
{
Node current = head;
while (current != null)
{
if (current.data == x)
return true;
current = current.next;
}
return false;
}
// Main Function
public static void main(String args[])
{
LinkedList new_list = new LinkedList();

new_list.push(10);
new_list.push(30);
new_list.push(20);
new_list.push(40);
new_list.push(50);

if (llist.search(new_list.head, 40))
System.out.println("Yes");
else
System.out.println("No");
}
}
59 changes: 59 additions & 0 deletions linklist/linkedlist.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#include <stdio.h>
#include <stdlib.h>

typedef struct node Node;

struct node {
int value;
Node * next;
};

Node * list_create() {
Node * node = (Node*)malloc(sizeof(Node));
node->value = 0;
node->next = NULL;

return node;
}

void list_add_value(Node * node, int value) {
while (node->next != NULL) {
node = node->next;
}

Node* new_node = list_create();
new_node->value = value;
node->next = new_node;
}

void list_rem_value(Node* node, int value) {
while (node->next != NULL) {
if (node->next->value == value) {
Node* aux = node->next;
node->next = aux->next;
free(aux);
break;
}
node = node->next;
}

}

void list_print(Node* node) {
while (node->next != NULL) {
printf("%d\t", node->next->value);
node = node->next;
}
printf("\n");
}

int main(int argc, char ** argv) {
Node* list = list_create();

list_add_value(list, 10);
list_add_value(list, 40);

list_print(list);

return 0;
}
Loading

0 comments on commit f8fb6c6

Please sign in to comment.