All Questions
67 questions
4
votes
1
answer
86
views
Polynomial parsing using regular expressions in Python
I've made a code in Python 3 which converts a polynomial with integer coefficients (in simplified integer form) from string form to a list of tuples of the form (coefficient, exponent, variable). It ...
4
votes
4
answers
2k
views
Matching words from a text with a big list of keywords in Python
I implemented the following code to retrieve medication names from a given text (prescription_text in the code). It works by matching words in the text with a list ...
1
vote
1
answer
180
views
Password policy with regex and zxcvbn
This code snippet shows an implementation of a password policy check.
- The method composition uses regex to verify that the password meets composition criteria (at least one number, one special ...
2
votes
2
answers
136
views
Regex and pandas to read forecast sky condition string
DataFrame methods to parse the sky condition from a terminal aerodrome forecast.
A line in a taf can report zero-eight cloud layers. Cloud layers are required in predominate lines, and optional in ...
2
votes
1
answer
144
views
Regex pattern matching to generate pandas multi index
Mostly just looking for a review of my regex and implementation of capture groups. its something I've been working to improve.
The indexes have somewhat of a pattern to them of being....
...
5
votes
1
answer
1k
views
Breaking Bad name generator
I've created a script to print all periodic table symbolic permutations of a string. As seen in the opening credits of each episode of Breaking Bad:
© 2010-2022 AMC Networks Entertainment LLC.
...
8
votes
3
answers
1k
views
Filter out ambiguous bases from a DNA sequence
I have this function:
...
2
votes
4
answers
295
views
A simplified regular expression matcher
I am working my way through some code challenges — partly to improve my problem solving, but also to improve my code quality.
I think my current (fully-functional) solution to a challenge is pretty ...
4
votes
1
answer
4k
views
Finding Pattern Score in Python
I saw this problem in C++ on here and decided to try it in Python, which was much simpler. I've used the same problem blurb as in the link above, so they are consistent. I'm sure my code can be ...
5
votes
2
answers
403
views
Can it be shorter?: DNA Sequence Analyzer from CS50 written in Python
This is my first time requesting a code review. This is code I wrote in Python to create a DNA sequence analyzer. This is for the Harvard CS50 course.
I was really hoping to get some constructive ...
2
votes
0
answers
68
views
Genetic sequence analyzer that reads FASTA and GenBank file formats and outputs all possible gene products
I have updated my my gene sequencing program from my previous post.
That post explains what each functions accomplish.
If you need clarifications feel free to ask.
Any tips to make the code more ...
3
votes
1
answer
798
views
Python - A Regex Text File Searcher by Content Project
I would like some advice on efficiency and ways to further remove redundant code.
Regex Text File Search:
enter a valid directory path, and a string to search for
makes a list containing all the ...
1
vote
3
answers
7k
views
Python - Making A Valid Date Checker - using Regular Expressions
Date Detection:
Write a regular expression that can detect dates in the DD/MM/YYYY format.
Assume that the days range from 01 to 31, the months range from 01
to 12, and the years range from 1000 to ...
0
votes
1
answer
380
views
Regex to remove spoken email names
I'm trying to remove email names from transcripts because it removes unnecessary info that is not needed in the transcript.
The regex below removes email names from a spoken transcript.
Examples ...
3
votes
2
answers
1k
views
Regular Expressions - finding two or more vowels with a consonant before and after it, includes overlapping
Is there a way to make my code more compact or efficient?
Testcase example 1 : rabcdeefgyYhFjkIoomnpOeorteeeeet
output:
ee
Ioo
Oeo
eeeee
Testcase example 2 : baabooteen
output:
aa
oo
ee
...