Commit Graph

1619 Commits

Author SHA1 Message Date
Mantas Zimnickas
5616fa9e62 Add pytest-cov (#1578)
* Add pytest-cov

Also added coverage report in .travis.yml file.

* updating DIRECTORY.md

* Sort by missing statements

* sort = Cover
2019-11-17 19:37:58 +01:00
Sarath Kaul
9a894ebc52 Word Occurence Script Added (#1576)
* Word Occurence Script Added

* Word Occurence Script Updated

* Added doctest using collections.Counter

https://docs.python.org/3/library/collections.html#collections.Counter
2019-11-17 12:57:26 +01:00
Christian Clauss
b838f1042c Fix indentation contains tabs (flake8 E101,W191) (#1573) 2019-11-15 23:05:00 -08:00
Christian Clauss
dbaedd4ed7 || true (#1572)
*  ||  true

* 3.8

* python: 3.x
2019-11-14 18:22:23 -08:00
Ankur Chattopadhyay
a7424cc115 changed implementation of GitHub action to auto update DIRECTORY.md (#1571)
* changed implementation of GitHub action to auto update DIRECTORY.md

* updating DIRECTORY.md
2019-11-14 21:30:35 +01:00
Sarath Kaul
e3f55aecce Remove Duplicate Script Added (#1570)
* Added Remove duplicate script and updated requirements.txt

* Requirements.txt Updated

* Remove Duplicate Script Added

* Directory Modified

* Directory.md Updated
2019-11-14 21:01:51 +01:00
Zizhou Zhang
e3aa0f65e8 fix implementation errors. (#1568)
I revised my implementation and found out that I have miss a inner loop for t.  x and y should be recalculated everytime when t is divisble by 2. I have also included a more readble source for this algorithm.
2019-11-14 20:29:54 +01:00
Marvin M. Michum
ea9bf0a90c directory_writer (#1) (#1549)
* directory_writer

* fixup: Format Python code with psf/black

* fixup: DIRECTORY.md
2019-11-14 20:27:31 +01:00
Christian Clauss
5df8aec66c
GitHub Action formats our code with psf/black (#1569)
* GitHub Action formats our code with psf/black

@poyea Your review please.

* fixup! Format Python code with psf/black push
2019-11-14 19:59:43 +01:00
jwmneu
52cf668617 add sol3 to project_euler/problem_08 (#1557)
* Add sol3 for project_euler proble_03

* Update sol3.py

add type hint 
remove unused variable

* Format code with psf/black

* add sol3 to project_euler/problem_08, modify the stepsize of the loop,will be faster than sol1
2019-11-14 19:08:07 +01:00
Sarath Kaul
dd7d2fa270 Panagram Script Added (#1564)
* Python Program that fetches top trending news

* Python Program that fetches top trending news

* Revisions in Fetch BBC News

* psf/black Changes

* Python Program to send slack message to a channel

* Slack Message Revision Changes

* Python Program to check Palindrome String

* Doctest Added

* Python Program to check whether a String is Panagram or not

* Python Program to check whether a String is Panagram or not

* Check Panagram Script Added

* Panagram Script Added

* Anagram Script Changes

* Anagram Alphabet Check Added

* Python Program to fetch github info
2019-11-14 11:22:07 +01:00
Christian Clauss
fa6331aa82 Moved to TheAlgorithms/Jupyter (#1563)
https://github.com/TheAlgorithms/Jupyter/tree/master/other
2019-11-13 21:26:29 -08:00
Sarath Kaul
b7e37a856f Added a new Python script and some changes in existing one (#1560)
* Python Program that fetches top trending news

* Python Program that fetches top trending news

* Revisions in Fetch BBC News

* psf/black Changes

* Python Program to send slack message to a channel

* Slack Message Revision Changes
2019-11-12 12:11:54 +01:00
Sarath Kaul
5ac4391420 Python Program that fetches top trending news (#1559)
* Python Program that fetches top trending news

* Python Program that fetches top trending news

* Revisions in Fetch BBC News
2019-11-12 09:27:38 +01:00
JakobZhao
82a11d7f31 Fix bug in bellman_ford.py (#1544) 2019-11-10 17:01:38 +08:00
Hanif Ali
4c37eb7d07 Improved on Singly Linked List Programs (#1558)
* Improved Singly Linked List
Added String Representations of Nodes and Linked Lists
Added support for indexing and changing of Node data using indices.

* Added a few comments to Linked Lists

* Reformatted to conform to PEP8

* Added from_sequence.py
Convert a Python List to Linked List comprising of Nodes and return head.

* Added print_reverse.py
Recursive program to print the elements of a Linked List in reverse.

* Change 'is not None' for more Pythonicness
2019-11-10 09:47:04 +01:00
Zizhou Zhang
db515e585e added rsa_factorization.py (#1556)
* added RSA_factorization.py

This algorithm can effectively factor RSA large prime N given public key e and private key d.

* Rename RSA_factorization.py to rsa_factorization.py

* Add definitions for d, e, and N
2019-11-09 15:02:30 +01:00
jwmneu
ad2db80f8a Add sol3 for project_euler problem_03 (#1553)
* Add sol3 for project_euler proble_03

* Update sol3.py

add type hint 
remove unused variable

* Format code with psf/black
2019-11-07 09:37:28 +01:00
John Law
a9d5378ce2
Doctest and typing for longest_increasing_subsequence.py (#1526)
* Update longest_increasing_subsequence.py

* Update longest_increasing_subsequence.py

* Format longest_increasing_subsequence.py to PEP8

* Update longest_increasing_subsequence.py
2019-11-05 02:06:16 +08:00
Marvin M. Michum
5452e94528 Porta cipher (#1550)
* directory_writer

* add porta cipher for #1492

* formatting and one line comprehensions

* remove directory_writer

* indentions

* Wrap long lines
2019-11-04 08:45:29 +01:00
Du YuanChao
8c443ccfad add floor() (#1551)
* ceil and floor

* ceil and floor
2019-11-04 08:28:51 +01:00
vinayak
0e3357ae35
added solution 1 for problem_99 in project_euler (#1545)
* Create sol1.py

* Create __init__.py

* Update sol1.py

* corrected range

* Add files via upload

* Update DIRECTORY.md

* Create sol1.py

* Update sol1.py

* Create __init__.py

* Update DIRECTORY.md

* Delete isotonic.py

* Update sol1.py

* Problem_27_project_euler

* project_euler/Problem_27/sol1.py

* project_euler/Problem_27/sol1.py

* project_euler/problem_27/

* project_euler/problem_27

* project_euler/problem_27

* update sol1 of Euler Problem 27 solution script Added

* Remove slow test, wrap long comments, format with psf/black

* Delete __init__.py

* Add type hints

* Add doctests to function is_prime()

* Rename project_euler/problem_27/project_euler/problem_27/sol1.pysol1.py to project_euler/problem_27/problem_27_sol1.py

* Added Problem 33

* added solution 1 for problem_99

* update added solution 1 for problem_99

* update

* Update sol1.py
2019-11-01 13:57:16 +05:30
Marvin M. Michum
8107548cc1 Travis CI: Write & print DIRECTORY.md on one line (#1542)
* travis test

* travis pull ID test

* get pr branch test

* retry pr build

* test pushing back - probable git error for origin 'not found'

* github auth?

* add .sh

* chmod

* add index update for permission fix

* run sh for script

* add all

* add pull directory

* fetch pr branch

* swap placement of adding commits

* rotate

* quit trying to update Travis

* formatting leftovers

* Travis CI: Write & print DIRECTORY.md on one line
2019-11-01 04:06:20 +01:00
Jonathan Alberth Quispe Fuentes
7bc0462e79 Non-recursive Segment Tree implementation (#1543)
* Non-recursive Segment Tree implementation

* Added type hints and explanations links
2019-11-01 04:00:46 +01:00
Metehan
62e51fe487 recursive quick sort (#1536)
* recursive quick sort

* recursive quick sort

* Delete recursive-quick-sort

* Update recursive-quick-sort.py
2019-10-31 19:49:25 +01:00
Taufik Algi F
c717f8d860 add max sum contigous subsequence (#1537)
* add max sum contigous subsequence

* fix typo

* Add doctest and type hints

* Create autoblack.yml
2019-10-31 18:45:01 +01:00
Du YuanChao
814750e637 update factorial (#1535)
* update factorial

* update factorial
2019-10-31 13:45:32 +01:00
Charley
80e1c8748a Added Problem 33 (#1440)
* Create sol1.py

* Create __init__.py

* Update sol1.py

* corrected range

* Update sol1.py
2019-10-31 17:50:39 +05:30
Du YuanChao
6d44cdd315 perfect square (#1534)
* perfect square

* perfect square
2019-10-31 12:33:40 +01:00
RitwickGhosh
8a5633a233 Euler Problem 27 solution script Added (#1466)
* Add files via upload

* Update DIRECTORY.md

* Create sol1.py

* Update sol1.py

* Create __init__.py

* Update DIRECTORY.md

* Delete isotonic.py

* Update sol1.py

* Problem_27_project_euler

* project_euler/Problem_27/sol1.py

* project_euler/Problem_27/sol1.py

* project_euler/problem_27/

* project_euler/problem_27

* project_euler/problem_27

* update sol1 of Euler Problem 27 solution script Added

* Remove slow test, wrap long comments, format with psf/black

* Delete __init__.py

* Add type hints

* Add doctests to function is_prime()

* Rename project_euler/problem_27/project_euler/problem_27/sol1.pysol1.py to project_euler/problem_27/problem_27_sol1.py
2019-10-31 08:19:10 +01:00
John Law
357dbd4ada
Doctest, type hints and bug in LIS_O(nlogn) (#1525)
* Update longest_increasing_subsequence_o(nlogn).py

* Update longest_increasing_subsequence_o(nlogn).py
2019-10-31 01:06:07 +08:00
percy07
df95f43907 Update quick_select.py (#1523)
* Update quick_select.py

Add Doctests.

* Add typehints

* Don't pre-allocate "smaller" and "larger"
2019-10-30 16:10:30 +01:00
Sri Suma
fc533a7598 Simplified DES (#1382)
* Simplified DES

* Add files via upload

Diffie Hellman algorithm to generate a secret key.

* Update sdes.py

* Format code with psf/black and add doctests
2019-10-30 12:52:20 +01:00
LokiUvaraj
63433616c9 average_mode.py (#1491)
* Add files via upload

Finds the mode in the input data.

* Update average_mode.py

* Update average_mode.py

* Update average_mode.py

* Update average_mode.py

* Update average_mode.py

* Update average_mode.py

* Tabs do not belong in Python files!
2019-10-30 00:26:28 +01:00
himanshujain171
53ff735701 Factors of a number (#1493)
* Factors of a number

* Update factors.py

* Fix mypy issue in basic_maths.py

* Fix mypy error in perceptron.py

* def primes(max: int) -> List[int]:

* Update binomial_heap.py

* Add a space

* Remove a space

* Add a space
2019-10-29 23:54:30 +01:00
percy07
f8e97aa597 Update basic_maths.py (#1517)
* Update basic_maths.py

Add Doctests.

* Update basic_maths.py

* Add a space to fix the doctest
2019-10-29 21:54:31 +01:00
5ur3
4880e5479a Create prime_numbers.py (#1519)
* Create prime_numbers.py

* Update prime_numbers.py
2019-10-29 21:28:51 +01:00
Christian Clauss
bfac867e27
Add doctests to other/word_patterns.py (#1518) 2019-10-29 21:05:36 +01:00
Janith Wanniarachchi
dfea6f3f0b added tests for Perceptron in Neural Networks (#1506)
*  added tests for Perceptron in Neural Networks

* Space

* Format code with psf/black
2019-10-29 11:53:29 +01:00
percy07
1ed47ad6f4 Update palindrome.py (#1509)
* Update palindrome.py

Add Doctests.

* Use test_data to drive the testing
2019-10-29 11:22:49 +01:00
percy07
e3d4d2bb57 Update greatest_common_divisor.py (#1513)
Add Doctests.
2019-10-29 11:06:37 +01:00
Kumar-Nishchay
e463c0b573 Update dictionary.txt (#1507)
Added a new word Microfinance. This is one of the recently added word in oxford dictionary
2019-10-29 14:46:29 +08:00
Devil Lord
4f86f58482 Create GAN.py (#1445)
* Create GAN.py

* gan update

* Delete train-labels-idx1-ubyte.gz

* Update GAN.py

* Update GAN.py

* Delete GAN.py

* Create gan.py

* Update gan.py

* input_data import file
2019-10-28 19:29:08 +01:00
dimgrichr
f8a30b42ce Addition of Secant Method (#876)
* Add files via upload

* Update secant_method.py

* Remove unused import

* Remove unused import
2019-10-28 19:27:00 +01:00
Phileas
3ada8bb580 Page replacement algorithm, LRU (#871)
* Page replacement algorithm, LRU

* small rectifications

* Rename paging/LRU.py to other/least_recently_used.py
2019-10-28 19:04:26 +01:00
John Law
1da1ab0773 Improve doctest and comment for maximum sub-array problem (#1503)
* Doctest and comment for maximum sub-array problem

More examples and description for max_sub_array.py

* Update max_sub_array.py

* Update max_sub_array.py

* Fix doctest
2019-10-28 17:44:57 +01:00
Du YuanChao
3fc276ca2c rename and add doctest (#1501) 2019-10-28 13:50:36 +01:00
Christian Clauss
bf50ea09ae
Add Travis_CI_tests_are_failing.md (#1499)
* Add Travis_CI_tests_are_failing.md

* Update Travis_CI_tests_are_failing.md
2019-10-28 13:38:08 +01:00
arjun1299
e36fe34b0b Hard coded inputs to mixed_keyword cypher (#1500)
* Update morse_code_implementation.py

* Delete porta_cipher.py

* Update mixed_keyword_cypher.py

* Mixed keyword cypher added

* issue with mixed keyword fixed

* no math included

* hardcoded inputs

* porta cypher added

* porta cypher added

* commented in mixed keyword according to contrib.md
2019-10-28 13:06:28 +01:00
Deekshaesha
8a5b1abd0a finding max (#1488)
* Update find_max.py

* Update find_max.py

* Format with psf/black and add doctests
2019-10-28 09:14:53 +01:00