Make columns within a list in HTML/CSS

I have an unordered list in which I am displaying some objects. These objects have multiple attributes which I want to display. I made this in Python Flask and jinja. <li class="list-group-item"> <a href="link">{{candidate.name}}</a> <label id="min">Min. value:<input type="number" id="min" name="min-val" min="1" max="100"></label> <label id="max">Max. value:<input type="number" id="max" name="max-val" min="1" max="100"></label> <p id="average_rank">{{‘%0.2f’ % average_rank|float}}</p> <p… Read More Make columns within a list in HTML/CSS

Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper

I’m one month into learning Web Development. From what I’ve read, the data-bs-toggle is the newer name for Bootstrap 5. What is the difference between Bootstrap data-toggle vs data-bs-toggle attributes? My code is simple. In the head, I’ve included CSS, jQuery, and JavaScript Bundle with Popper. In the body, I have two links with a… Read More Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper

Dataframe conditional replacement with intigers

I have a dataframe column like this: df[‘col_name’].unique() >>>array([-1, ‘Not Passed, On the boundary’, 1, ‘Passed, On the boundary’, ‘Passed, Unclear result’, ‘Passes, Unclear result, On the boudnary’, ‘Rejected, Unclear result’], dtype=object) In this column, if an element contains the word ‘Passed’ as a field or as a substring, then replace the entire field with… Read More Dataframe conditional replacement with intigers

What is the relationship between the product function and the concept of permutations with repetitions?

from itertools import permutations,product,combinations_with_replacement colours = [‘r’,’g’,’b’] y = list(product(colours,repeat =2 )) x = list(combinations_with_replacement(colours,2)) print(y) print(x) I understand permutation of a set of objects is an ordering of those objects. When some of those objects are identical, the situation is transformed into permutations with repetition. >Solution : This may provide some insight: colours =… Read More What is the relationship between the product function and the concept of permutations with repetitions?

Retrive only replacement template of regex in C#

can i get only the substitution of the Regex.Replace? Example. String text = @"asdfgs sda gsa ga s SECTOR:124 NAME:Ricko asdfgs sda gsa ga s"; String regex = "^SECTOR:(\d+) NAME:(\w+)"; String substitution = "$2 $1"; String result = Regex.Replace(text, regex, substitution); Console.WriteLine(result); Normal result asdfgs sda gsa ga s Ricko 124 Wanted result Ricko 124… Read More Retrive only replacement template of regex in C#

Msp430 DATA16_I and DATA16_Z

During my programming activities I encountered a problem with running out of RAM memory. The message says; Error[e16]: Segment DATA16_Z (size: 0x638 align: 0x1) is too long for segment definition. At least 0x44 more bytes needed. The problem occurred while processing the segment placement command "-Z(DATA)DATA16_I,DATA16_Z,DATA16_N=0200-_SYS_RAM_END", where at the moment of placement the available memory… Read More Msp430 DATA16_I and DATA16_Z

TypeError: not all arguments converted during string formatting in vertica_python

I’m trying to insert some values into my vertica database using the vertica_python module: data = {‘SalesNo’: [‘12345’, ‘678910’], ‘ProductID’: [‘12345_2021-10-21_08:51:22’, ‘678910_2021-10-21_10:27:03’], ‘StoreID’: [‘6d522936e240cd64e1cf9176c5bfdff3bfe8146a345ff2’, ‘a7274d507d443c752be66b2851415138d75bd913d4949e’], ‘PurchaseTime’: [‘2021-10-21 08:51:22.846000’, ‘2021-10-21 10:44:06.218000’], ‘Date’: [‘2021-10-21’, ‘2021-10-21’], ‘StoreNumber’: [‘0’, ‘1’], ‘PurchaseValue’: [‘348.0’, ‘4893.23’] } dataset = pd.DataFrame(data) column = dataset.columns n = len(column) SQL_insert = f"INSERT INTO table_name ({‘,’.join(list(column))})… Read More TypeError: not all arguments converted during string formatting in vertica_python

pandas replace dataframe float values using int keys of nested dict

I have a dataframe and dictionary like as shown below ID,Name,value,total, 1,Ajay,2.00,35 1,Dan,3.00,65 2,Ajay,2,78 2,Rajini,0.0,98 3,Ajay,3.00,53 3,Rad,75.25,21 df1 = pd.read_clipboard(sep=’,’) output = {‘Ajay’: {1: ‘ABC’, 2: ‘DEF’, 3: ‘DUMMA’, 4: ‘CHUMMA’}, ‘Dan’: {0: ‘KOREA’, 1: ‘AUS/NZ’, 2: ‘INDIA’, 3: ‘ASEAN’}} I would like to do the below a) Replace the values in value column by… Read More pandas replace dataframe float values using int keys of nested dict

sed to ignore a pattern as well as match a pattern in same line

Input file <a href="perl.html">perl</a> <a href="http://zoidberg.sourceforge.net/out.html">http://zoidberg.sourceforge.net</a&gt; <a href="zoiduser.html">zoiduser</a> <a href="perl.html">perl</a> <a href="http://zoidberg.sourceforge.net/sample.html">http://zoidberg.sourceforge.net</a&gt; I need to only remove .HTML extension from below URL from above file: <a href="perl.html">perl</a> <a href="zoiduser.html">zoiduser</a> So that the final output should look like: <a href="perl">perl</a> <a href="http://zoidberg.sourceforge.net/out.html">http://zoidberg.sourceforge.net</a&gt; <a href="zoiduser">zoiduser</a> <a href="perl.html">perl</a> <a href="http://zoidberg.sourceforge.net/sample.html">http://zoidberg.sourceforge.net</a&gt; This is what I am doing: sed ‘/"http\|"www\|"mailto/… Read More sed to ignore a pattern as well as match a pattern in same line