Categories
User Help

Function that creates multi level menu a cascade

I made this function that has in input one block of test with one structure of menus and submenus and create it. It works good for the pattern 1 and 2 (text1,text2). Can someone makes the function general so that it can be applied on any structure of menus and submenus? #SingleInstance,Force ;make sure it […]

Categories
Mastering Development

unexpected keyword argument ‘freq’ in Pandas DataReader (Stooq Module)

I’m a little bit new to coding and am not sure what is going on. I am currently trying to extract monthly index data from stooq to write a research paper. However, the ‘freq’ argument is returning the unexpected keyword argument error when trying to call it. I tried to compare this to the ‘interval’ […]

Categories
Mastering Development

Parcourir un liste contenue dans un csv avec la boucle while

j’avais une liste “pulications_auteur” que je pouvais parcourir avec la boucle while : i = 0 auteur_pmid_doi = [] while i < len (pulications_auteur): column_auteur = pulications_auteur[i][0] column_pmid = pulications_auteur[i][1] pmid_doi = [] for pmid in column_pmid [:10]: time.sleep(0.01) try : handle = Entrez.esummary(db=”pubmed”, id=pmid) record = Entrez.read(handle) record = record[0][‘DOI’] except : print (‘Missing […]

Categories
Mastering Development

Increment string from given array of letters or exclude specific letters from incremental with PHP

I have a list of allowed letters $allowedLetters = array(‘B’,’C’,’D’,’F’,’G’,’H’,’J’,’K’,’L’,’M’,’N’,’P’,’R’,’S’,’T’,’V’,’W’,’X’,’Y’,’Z’); And from that array I would like to do string increment to get the following pattern: BBB, BBC, BBD … until ZZZ I know that I can do string increment as simple as this: $letters = array(); $letter = ‘BBB’; while ($letter !== ‘ZZZ’) { […]

Categories
Mastering Development

how to generate a random route

I am a beginner and I got a coding challenge where I got the following directions: N,S,W,E In the challenge I need to generate 10 random steps(directions). Also, I am not allowed to have duplicate neighbours. For example, [n,s,w,e,w,e,n,n,w,e] is not allowed. Here is my code but it doesn’t work right. It generates routes but […]

Categories
Mastering Development

Reconstruct 3D object with OpenCV

I am following the OpenCV camera calibration tutorial https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_calib3d/py_calibration/py_calibration.html to run camera calibration ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1],None,None) What I want to do next is to reconstruction the 3D location of some feature points. The features points are defined in the image space. Here is what I am planning to do: […]

Categories
Mastering Development

Biopython: export the protein fragment from PDB to a FASTA file

I am writing the PDB protein sequence fragment to fasta format as below. from Bio.SeqIO import PdbIO, FastaIO def get_fasta(pdb_file, fasta_file, transfer_ids=None): fasta_writer = FastaIO.FastaWriter(fasta_file) fasta_writer.write_header() for rec in PdbIO.PdbSeqresIterator(pdb_file): if len(rec.seq) == 0: continue if transfer_ids is not None and rec.id not in transfer_ids: continue print(rec.id, rec.seq, len(rec.seq)) fasta_writer.write_record(rec) get_fasta(open(‘pdb1tup.ent’), open(‘1tup.fasta’, ‘w’), transfer_ids=[‘1TUP:B’]) get_fasta(open(‘pdb1olg.ent’), […]

Categories
Artificial Intelligence (AI) Mastering Development

Why not replacing simple weights by function because a weight it basically a linear function?

A weight is basically f(x):wx where w is the weight. I’m sure it existe but it don’t find it. Why not replace weights by more complex functions like f(x,w,a,b,c) = w(x + b)**a + c. It will provide much more diversity into neural networks. Neurones will be here juste for summing some ‘links’. Has it […]

Categories
Mastering Development

How can I convert a const char* to a string in CLR/C++ with FLTK to obtain the value of an FL_Input or other widget?

I have been recently constructing a program. The end goal is to get what the user has written in the Fl_Input box and write it into my database. To do this I am going to need a callback on a button that allows me to at least get the string value of an Fl_Input->value() The […]

Categories
Mastering Development

Creating new columns for output from sshpass copmmands

I’m using sshpass to get the output of different statistics of a machine. However the output is all bunched together sshpass -p *****_PASSWORD ssh -o StrictHostKeyChecking=no mlinfra@$ADDRESS ‘hostname; w; df -h; free’ Ideally I would like a new line in between the output of hostname, w, df-h and free