Categories
Linux Mastering Development

Mounting a Network Folder in Debian 8

I have a folder share on my raspbery pi. I want to mount it on my debian box so that I can move files between HDs. I can see the network in the File Browser/Network I followed this guide https://tecadmin.net/mounting-samba-share-on-ubuntu/ I get invalid argument with that guide. smb://raspberrypi.local/David I setup my fstab like this //192.168.1.190/PiShare […]

Categories
Mastering Development

How to divide the string depending on length in seqeunce in python?

>>>mymedicinesarerighthere You need to break this word down in the following way: >>>[m, ym ,edi ,cine ,sarer ,ighthe, re]

Categories
Development Linux

How to check the password age of User derived from Active Directory

I am working on Linux (RHEL and SLES) and am not a Linux administrator and don’t have access to a Linux administrator. The users are presented from Active Directory hence I am not able to 1. find/reset the password age set for a user. 2. find home directory of a user. 3. find out how […]

Categories
Development

Debounce react-select graphql query

I’m trying to debounce graphql queries sent by my react-select component. I’m using wonka instead of rxjs but there’s no tag for wonka. const GraphqlQueryAsync = (query, outputFn) => (value) => { console.log({ value }); return pipe( fromValue(value), // debounce(() => 5000), mergeMap((input) => client.executeQuery(createRequest(query, { input }))), map(outputFn), take(1), toPromise, ); }; React-select has […]

Categories
Development

Iteration in dict and string with function of 2 python variables

In order to play a note, we need to know its frequency and how long it should play. To do this, in exercise I have the following two variables: A dictionary called freqs where the keys are strings representing a character name and the values ​​are numbers representing frequencies. freqs = {“la”: 220,          “si”: 247, […]

Categories
Development

Getting data out of a Element using Python

I am writing an agent for plex and I am scrapping the following html table I am rather new to python and web scrapping in general I am trying to get to the data XXXXXXXXXX THE DATA <table class=”d”> <tbody> <tr> <th class=”ch”>title</th> <th class=”ch”>released</th> <th class=”ch”>company</th> <th class=”ch”>type</th> <th class=”ch”>rating</th> <th class=”ch”>category</th> </tr> <tr> […]

Categories
Development Python

Python : get running_config from cisco switch by SSH(Paramiko) OR TELNET(Telnetlib)

I need some help for a script in Python. it works for few times, but I just added some time.sleep() and now the script won’t work : It did not connect to switch by SSH or Telnet. I also need some tips to optimize it, because i’m not pro and i would like to learn […]

Categories
Development

AttributeError: ‘str’ object has no attribute ‘subs’

I am making a definition which will help me replace the varials of a polynomial but I get this error from sympy import * x = Symbol(‘x’) def velocidad_media(t0,t1,poli): D1=poli.subs(x,t0) D0=poli.subs(x,t1) D3=D1-D0 T= t1-t0 Re=D3/T print(“la velocidad media es”,Re,”m/s”) pol=input(“ingrese la funcion del lanzamiento: “) a= int(input(“ingrese el tiempo inicial en segundos: “)) b=int(input(“ingrese el […]

Categories
Development

How to create equations with a module with variables and then pass them to another module?

i want to solve an non linear system using root from scipy. i generated the equagtions with loops. everytime that the solver iterates to find the solutions all the loops that generate the equations runs and slow the time of solution. i want to create a code that generate the equations only one time and […]

Categories
Development

Ignore test features not present in training data

I have a problem where I am tasked with creating three classifiers (two “out of box”, one “optimized”) for predicting sentiment analysis using sklearn. The instructions are to: Ingest the training set, train classifiers Save the classifiers to disk In a separate program, load the classifiers from disk Predict using the test set Steps 1-3 […]