Welcome to Code Review!
I'll add to the other answer from Reinderien.
In python, it is common (and recommended) to follow the PEP-8 style guide for writing clean, maintainable and consistent code.
Functions and variables should be named in a lower_snake_case, classes as UpperCamelCase, and constants as UPPER_SNAKE_CASE.
No unnecessary whitespaces are ...
Surely path is not a single path, since you loop through it. So at the least, this is poorly-named and should be paths. The variable you iterate through it, fileName, should be file_name; similarly for your other function and variable names.
Rather than calling readlines(), simply iterate over file itself, which will have the same effect....
Your implementation seems fine at a glance, but Python actually provides two really easy ways to do this:
Your function would then become:
'''Converts integer to a string of base-2 bits,
example: 20 becomes '10100'
Several general hints:
Formatting: Use an auto-formatter. I recommend black. It's wide-spread, maintained by the Python Software Foundation, allows little configuration so the style is consistent among projects (no configuration is good in this case)
Linting: Use linters. I recommend flake8 with flake8-bugbear, flake8-comprehensions, ...
According to PEP8, docstrings should use """ instead of '''
Both integer_to_reverse_binary and reverse_string are only used once.
I'd just replace the usage with the body of the functions.
Instead of integer_to_binary_string, I would prefer a shorter name such as int_to_bin.
log2 is inaccurate for large values and should be avoided if ...
In addition to the points raised in the other answers:
The first line is import sys, but I don't see sys used anywhere; this can go.
It's generally better to use explicit names. Thus, rather than just seq (which might be short for sequence or sequences, for example) spell it out. In this case, it looks like you should use ...
I only have a few points to add to Dannnno's, Sriv's, and Martin Thoma's excellent answers.
Sometimes, you abbreviate string as "str", sometimes as "s", sometimes not at all. Sometimes, you put the type in the identifier, sometimes not. When you put the type in the identifier, you sometimes put it as a prefix, sometimes as a ...
Consider fetch In modern browsers, which your code is guaranteed to be running in, fetch is usually a better choice than XMLHttpRequest - fetch is Promise-based (Promises are usually a bit nicer to work with than callbacks), its API is a bit cleaner to read and write, and it's a bit more concise.
Error handling The front-end has no error handling. If the ...
Separation of Concerns
Your function is doing too much. It is:
Converting the float to a fraction
Converting the fraction to a string of digits
Printing the string of digits
You should separate these.
Float to Fraction
First, let's move the float-to-fraction code into its own function.
from typing import Tuple
def float_to_fraction(value: float) -> ...