A custom prime algorithm, implementation, and performance code & review

Overview

Colander

A custom prime algorithm, implementation, and performance code & review


Pseudocode Algorithm

1. given a number of primes to find, the following steps are completed: 
2. if number divided by 2 gives a remainder of 0, number is not prime, move to next number
3. If number divided by 3, 5, and 7 does not have a remainder of 0, continue. 
Otherwise number is not prime.
4. If number is less than or equal to 11, add to primes list (primes list already contains 2, 3, 5, 7)
5. If it is greater than 11, check if any of the numbers inside primes list can go into number with 
remainder 0. If one or more can, number is composite.
6. Number is prime.

Usage/Install

Using a terminal of your choice, cd into the Colander-main/project folder. Assuming you have python installed, you should be able to start the prime-finding process by

python3 miner.py [numer to iterate (eg. 1000]

Your primes will then show up in the project/primes.py file, and will be used every time you run the miner.py file to improve performance!


Performance


License

MIT

You might also like...
This project is an implementation of a simple K-means algorithm
This project is an implementation of a simple K-means algorithm

Simple-Kmeans-Clustering-Algorithm Abstract K-means is a centroid-based algorithm, or a distance-based algorithm, where we calculate the distances to

A raw implementation of the nearest insertion algorithm to resolve TSP problems in a TXT format.

TSP-Nearest-Insertion A raw implementation of the nearest insertion algorithm to resolve TSP problems in a TXT format. Instructions Load a txt file wi

A python implementation of the Basic Photometric Stereo Algorithm
A python implementation of the Basic Photometric Stereo Algorithm

Photometric-Stereo A python implementation of the Basic Photometric Stereo Algorithm Result Usage run Photometric_Stereo.py Code Tree |data #原始数据,tga格

Implementation of an ordered dithering algorithm used in computer graphics
Implementation of an ordered dithering algorithm used in computer graphics

Ordered Dithering Project In this project, we use an ordered dithering method to turn an RGB image, first to a gray scale image and then, turn the gra

Implementation of Apriori Algorithm for Association Analysis

Implementation of Apriori Algorithm for Association Analysis

This is a Python implementation of the HMRF algorithm on networks with categorial variables.

Salad Salad is an Open Source Python library to segment tissues into different biologically relevant regions based on Hidden Markov Random Fields. The

implementation of the KNN algorithm on crab biometrics dataset for CS16

crab-knn implementation of the KNN algorithm in Python applied to biometrics data of purple rock crabs (leptograpsus variegatus) to classify the sex o

This is an implementation of the QuickHull algorithm in Python. I

QuickHull This is an implementation of the QuickHull algorithm in Python. It randomly generates a set of points and finds the convex hull of this set

Python implementation of Aho-Corasick algorithm for string searching

Python implementation of Aho-Corasick algorithm for string searching

Releases(v1.0.2)
  • v1.0.2(Sep 10, 2021)

    What's New?

    • update CLI
    • Add tqdm (progress bar) interface to show percent completion
    • update README algorithm steps and bump version number
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Sep 1, 2021)

  • v1.0.0(Sep 1, 2021)

    What's Colander

    • Prime finding made easy!
    • Follow the instructions on the README to get started

    Brags

    • Tested 100000 iterations in less than 1 sec on avg PC!
    Source code(tar.gz)
    Source code(zip)
Owner
Finn Lancaster
Hi, I'm Finn Lancaster, amateur hacker 🐱‍💻, pianist 🎹, high school student at Polk State Collegiate 📚, and future careerist programmer!
Finn Lancaster
The test data, code and detailed description of the AW t-SNE algorithm

AW-t-SNE The test data, code and result of the AW t-SNE algorithm Structure of the folder Datasets: This folder contains two datasets, the MNIST datas

null 1 Mar 9, 2022
Sorting-Algorithms - All information about sorting algorithm you need and you can visualize the code tracer

Sorting-Algorithms - All information about sorting algorithm you need and you can visualize the code tracer

Ahmed Hossam 15 Oct 16, 2022
A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches

A minimal implementation of the IQRM interference flagging algorithm for radio pulsar and transient searches. This module only provides the algorithm that infers a channel mask from some spectral statistic that measures the level of RFI contamination in a time-frequency data block. It should be useful as a reference implementation to developers who wish to integrate IQRM into an existing pipeline / search code.

Vincent Morello 6 Nov 29, 2022
A simple python implementation of A* and bfs algorithm solving Eight-Puzzle

A simple python implementation of A* and bfs algorithm solving Eight-Puzzle

null 2 May 22, 2022
A fast, pure python implementation of the MuyGPs Gaussian process realization and training algorithm.

Fast implementation of the MuyGPs Gaussian process hyperparameter estimation algorithm MuyGPs is a GP estimation method that affords fast hyperparamet

Lawrence Livermore National Laboratory 13 Dec 2, 2022
marching rectangles algorithm in python with clean code.

Marching Rectangles marching rectangles algorithm in python with clean code. Tools Python 3 EasyDraw Creators Mohammad Dori Run the Code Installation

Mohammad Dori 3 Jul 15, 2022
marching Squares algorithm in python with clean code.

Marching Squares marching Squares algorithm in python with clean code. Tools Python 3 EasyDraw Creators Mohammad Dori Run the Code Installation Requir

Mohammad Dori 3 Jul 15, 2022
Code for generating alloy / disordered structures through the special quasirandom structure (SQS) algorithm

Code for generating alloy / disordered structures through the special quasirandom structure (SQS) algorithm

Bruno Focassio 1 Nov 10, 2021
A fast python implementation of the SimHash algorithm.

This Python package provides hashing algorithms for computing cohort ids of users based on their browsing history. As such, it may be used to compute cohort ids of users following Google's Federated Learning of Cohorts (FLoC) proposal.

Hybrid Theory 19 Dec 15, 2022
An implementation of ordered dithering algorithm in python as multimedia course project

One way of minimizing the size of an image is to simply reduce the number of bits you use to represent each pixel.

null 7 Dec 2, 2022