Skip to main content

All Questions

Tagged with
10 questions with no upvoted or accepted answers
4 votes
0 answers
661 views

A Very Simple Support Vector Machine with SMO Algorithm Implementation

Context. I was looking for some simple implementation of SVM with the SMO algorithm that can be used as an in-class problem together with a simple mathematical explanation of how it works. The problem ...
guest's user avatar
  • 141
2 votes
0 answers
82 views

Python script that generates images using Thue-Morse sequence

In mathematics, the Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is the binary sequence (an infinite sequence of 0s and 1s) obtained by starting with 0 and successively appending the Boolean ...
Ξένη Γήινος's user avatar
2 votes
0 answers
217 views

Maximizing Efficiency of Collatz Conjecture Program Python

My question is very simple. I wrote this program for pure entertainment. It takes a numerical input and finds the length of every Collatz Sequence up to and including that number. I want to make it ...
Ghull's user avatar
  • 41
2 votes
0 answers
203 views

Gradient descent algorithm for solving localization problem in 3-dimensional space

Task This code accomplishes the Time Difference of Arrival (TDoA) multilateration problem (see) using gradient descent (known otherwise as steepest descent). Goal I'm looking to: a) Improve speed: In ...
10GeV's user avatar
  • 295
2 votes
0 answers
97 views

Shutting down all lamps with minimum number of switch presses

I found an optimization problem written in Finnish but I will translate it into English. The following is an example case. I have \$n=120\$ lamps in a circle, and enumerated by \$L_1,…,L_{120}\$. ...
sagemathematician's user avatar
2 votes
0 answers
737 views

Python RSA/DSA File Cryptography, Key Generation, Key Protection

I have forked a previous version of my script, critiqued here: Generate public/private keys, encrypt, decrypt, sign, verify This program allows you to encrypt and decrypt raw files using RSA keys ...
FodderOverflow's user avatar
2 votes
0 answers
581 views

Factoring a polynomial with integer coefficients

I haven't programmed in a while and need to improve my code in any way possible: efficiency, readability, etc. This program is for getting integer coefficients of any polynomial and factoring: ex. $$ ...
Julian Yocum's user avatar
1 vote
0 answers
174 views

Applied Solution Based On Polya Enumeration Theorem

Problem A function solution(w, h, s) that takes 3 integers and returns the number of unique, non-equivalent configurations that can be found on a grid w blocks wide, h blocks tall and s possible ...
Anit Shrestha's user avatar
1 vote
0 answers
563 views

Python palindrome function; is it possible to write it without using string conversion?

I hope this question is okay to ask on Code Review; this is a little function I wrote in Python 2.7.12 that checks if a number is a palindrome. It works fine but I'd like to know if there is a purely ...
MadHatter's user avatar
  • 837
1 vote
0 answers
1k views

Snell's law using Zoeppritz equation by matrices

I have created the following code to calculate Snell's law angles, based on Zoeppritz equations on complex plane. The code works, seems it is returning valid values, but after all the code just looks ...
Lin's user avatar
  • 253