Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,495 members, 7,801,283 topics. Date: Thursday, 18 April 2024 at 01:17 PM

A Thread For Tutorial On Python Programming - Programming (10) - Nairaland

Nairaland Forum / Science/Technology / Programming / A Thread For Tutorial On Python Programming (140062 Views)

Opportunity To Earn Little Pay Working On Python Assignment. / I want to solve question on python basic / I Have A Very Import Question On Python Syntax (2) (3) (4)

(1) (2) (3) ... (7) (8) (9) (10) (11) (12) (13) ... (32) (Reply) (Go Down)

Re: A Thread For Tutorial On Python Programming by zone51: 8:10pm On Aug 10, 2019
If you find mastering the code difficult, try the GUI program Tkinter
It makes work easier when building desktop apps, I'm still trying to understand how it can be used for Web apps. lipsrsealed

2 Likes

Re: A Thread For Tutorial On Python Programming by pgbamane: 11:29am On Aug 13, 2019
Learn here "Different flavors of Python"

https://www.codebread.co.in/2019/07/flavors-of-python.html

1 Like 1 Share

Re: A Thread For Tutorial On Python Programming by martinz1: 3:12pm On Aug 13, 2019
benob:
To learn python programming for starters. What's the best laptop to buy
Specs and brand
Thanks
Any good lappy can do
Re: A Thread For Tutorial On Python Programming by idris01(m): 10:05pm On Aug 14, 2019
Am an experienced person buy still learning and a teaching staff of an institution in Nigeria


Kindly add me to educative programming fora.
My name is Abdulhameed idris
WhatsApp: 08026248258
Interest: web technology, Java, cpp, c# and python.
Re: A Thread For Tutorial On Python Programming by Vindica: 11:52am On Aug 17, 2019
Can't run my first program, I have this issue

Re: A Thread For Tutorial On Python Programming by martinz1: 2:25pm On Aug 18, 2019
Vindica:
Can't run my first program, I have this issue
The file doesn't exist, maybe directory synthax error
Re: A Thread For Tutorial On Python Programming by Udiee: 9:38am On Aug 19, 2019
The Decagon Program is now accepting applications.


The times are changing. We’re creating our own “silicon valley”. if you don’t get in, you’ll be left out.

That’s while you should apply for the Decagon Software Development Programme for Nigerians.


About Decagon

Decagon is on a mission to help high potential Nigerians contribute meaningfully through technology. They transform fast learners into world-class software developers in just six months and connect them to job opportunities locally and abroad. Their platform enables the brightest young Nigerians to not only take advantage of the new digital economy but to actively lead and shape emerging opportunities.

What is the Decagon Program?

An in-person, on-site learning experience that transforms you into a capable software engineer in 6 months. The program takes care of everything in order to ensure you only focus on learning, thus making you a well-rounded engineer with broad technical knowledge and deep problem-solving skills.

This is what you get:

An intensive 6-month full stack development training, at no upfront cost.

During the program, you will get great accommodation within proximity of the training centre, with feeding included.

Brand new laptop, with all necessary professional software, installed.

Steady power supply at the training centre and at the residence.

Monthly stipend to meet other basic needs.

After the program, you will get a job placement with one of the amazing organizations that hire from Decagon including Kobo360, Terragon, Flutterwave, Seamfix, ROAM, Groove, Gokada, Sterling Bank, Stanbic Bank, Access Bank, Opera, Zonetech Park and so on.

1 Like 1 Share

Re: A Thread For Tutorial On Python Programming by Ridwan1821: 11:35am On Aug 19, 2019
Udiee:
The Decagon Program is now accepting applications.


The times are changing. We’re creating our own “silicon valley”. if you don’t get in, you’ll be left out.

That’s while you should apply for the Decagon Software Development Programme for Nigerians.


About Decagon

Decagon is on a mission to help high potential Nigerians contribute meaningfully through technology. They transform fast learners into world-class software developers in just six months and connect them to job opportunities locally and abroad. Their platform enables the brightest young Nigerians to not only take advantage of the new digital economy but to actively lead and shape emerging opportunities.

What is the Decagon Program?

An in-person, on-site learning experience that transforms you into a capable software engineer in 6 months. The program takes care of everything in order to ensure you only focus on learning, thus making you a well-rounded engineer with broad technical knowledge and deep problem-solving skills.

This is what you get:

An intensive 6-month full stack development training, at no upfront cost.

During the program, you will get great accommodation within proximity of the training centre, with feeding included.

Brand new laptop, with all necessary professional software, installed.

Steady power supply at the training centre and at the residence.

Monthly stipend to meet other basic needs.

After the program, you will get a job placement with one of the amazing organizations that hire from Decagon including Kobo360, Terragon, Flutterwave, Seamfix, ROAM, Groove, Gokada, Sterling Bank, Stanbic Bank, Access Bank, Opera, Zonetech Park and so on.
How much is the tution fee?
Re: A Thread For Tutorial On Python Programming by sylve11: 4:47pm On Aug 20, 2019
i lost my password, back up phrase to my bitcoin wallet where i have over a thousand dollars due to fire outbreak. who can help me recover it will get 30% of the funds. sad cool
Re: A Thread For Tutorial On Python Programming by cochtrane(m): 5:24am On Aug 21, 2019
I wrote a script to check the posters on this thread and their respective number of posts.

import requests
from bs4 import BeautifulSoup
from plotly.graph_objects import Bar, Layout, Figure

def gethtmlcontent(url):
response = requests.get(url, headers={'User-Agent': 'Mozilla/5.0'})
html = response.content
soup = BeautifulSoup(html)
return soup

users = []
for i in range(10):
url = 'https://www.nairaland.com/4945611/thread-tutorial-python-programming/' + str(i)
print(f"Downloading: {url}" )
table = gethtmlcontent(url).find('table', attrs={'summary': 'posts'})
for row in table.findAll('tr'):
for user in row.findAll('a', attrs={'class': 'user'}):
users.append(user.text)

userdict = {}
for user in users:
if user in userdict:
userdict[user] += 1
else:
userdict[user] = 1

y_values = list(userdict.keys())
x_values = list(userdict.values())
data = [Bar(x=x_values, y=y_values, orientation='h')]

x_axis_config = {'title': 'POST FREQUENCY', 'dtick': 1}
y_axis_config = {'title': 'USERS', 'dtick': 1, 'tickmode': 'linear'}
my_layout = Layout(title='Post Frequency per User on Thread',
xaxis=x_axis_config, yaxis=y_axis_config, bargap=0.5)
fig = Figure({'data': data, 'layout': my_layout})
fig.update_traces(marker_color='rgb(158,202,225)', marker_line_color='rgb(8,48,107)',
marker_line_width=1.5, opacity=0.6)
fig.update_layout(autosize=False, width=800, height=2000)
fig.show(renderer='browser')

16 Likes 2 Shares

Re: A Thread For Tutorial On Python Programming by nappy760(m): 9:50pm On Aug 21, 2019
Wow
Re: A Thread For Tutorial On Python Programming by nappy760(m): 9:52pm On Aug 21, 2019
cochtrane:
I wrote a script to check the posters on this thread and their respective number of posts.

import requests
from bs4 import BeautifulSoup
from plotly.graph_objects import Bar, Layout, Figure

def gethtmlcontent(url):
response = requests.get(url, headers={'User-Agent': 'Mozilla/5.0'})
html = response.content
soup = BeautifulSoup(html)
return soup

users = []
for i in range(10):
url = 'https://www.nairaland.com/4945611/thread-tutorial-python-programming/' + str(i)
print(f"Downloading: {url}" )
table = gethtmlcontent(url).find('table', attrs={'summary': 'posts'})
for row in table.findAll('tr'):
for user in row.findAll('a', attrs={'class': 'user'}):
users.append(user.text)

userdict = {}
for user in users:
if user in userdict:
userdict[user] += 1
else:
userdict[user] = 1

y_values = list(userdict.keys())
x_values = list(userdict.values())
data = [Bar(x=x_values, y=y_values, orientation='h')]

x_axis_config = {'title': 'POST FREQUENCY', 'dtick': 1}
y_axis_config = {'title': 'USERS', 'dtick': 1, 'tickmode': 'linear'}
my_layout = Layout(title='Post Frequency per User on Thread',
xaxis=x_axis_config, yaxis=y_axis_config, bargap=0.5)
fig = Figure({'data': data, 'layout': my_layout})
fig.update_traces(marker_color='rgb(158,202,225)', marker_line_color='rgb(8,48,107)',
marker_line_width=1.5, opacity=0.6)
fig.update_layout(autosize=False, width=800, height=2000)
fig.show(renderer='browser')
you


Super cool
Re: A Thread For Tutorial On Python Programming by cochtrane(m): 4:41am On Aug 22, 2019
nappy760:
you


Super cool
Thanks.
I think it showed pretty clearly why this great resource on python kinda died. It didn't get a lot of participation or engagement. Average post per user was perhaps only 2, compared to the number of posts by the OP (>50).
Re: A Thread For Tutorial On Python Programming by Nobody: 5:20pm On Aug 22, 2019
Please guys how long do you think it would take a teenager to learn machine learning to a useful extent to do basic projects.How do I start?
Do I need a lot of pure math?
Re: A Thread For Tutorial On Python Programming by kensmoney(m): 6:45am On Aug 25, 2019
good day family.
plz i need assistance
please i am having issue with django rest_framework.
on my post-man this is my error
#############################################################################
{
"detail": "JSON parse error - Expecting value: line 1 column 1 (char 0)"
}
#############################################################################

on my terminal this my error
Bad Request: /create_api/
[24/Aug/2019 13:53:45] "POST /create_api/?name=qsqsq&amount=qssqsqs&description=sqsqsq&product=sqsqs
qsq HTTP/1.1" 400 73

#############################################################################


this my serialer.py
from rest_framework import serializers
from .models import Record2

class RecordSerializer(serializers.ModelSerializer):
class Meta:
model = Record2
fields = ["id", "name","product", "amount", "description"]
read_only_fields =["id"]


#############################################################################
ths is my view.py
@api_view(['POST', 'GET'])
def Create_api(request):
if request.method == "POST":
print(request.data)
data = JSONParser().parse(request)
serializer = RecordSerializer(data = request.data)
if serializer.is_valid():
print(serializer)
serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Re: A Thread For Tutorial On Python Programming by pgbamane: 4:12pm On Aug 25, 2019
Hey Guys,
Do you know what are the different Python implementations available for us?
Those are CPython, Jython, Pypy, etc.
Follow the article on Different Flavors of Python(https://www.codebread.co.in/2019/07/flavors-of-python.html) to know in details.
Re: A Thread For Tutorial On Python Programming by nappy760(m): 6:57pm On Aug 25, 2019
pgbamane:
Hey Guys,
Do you know what are the different Python implementations available for us?
Those are CPython, Jython, Pypy, etc.
Follow the article on Different Flavors of Python(https://www.codebread.co.in/2019/07/flavors-of-python.html) to know in details.

undecided how many things this people want make we learn at a time...?
Re: A Thread For Tutorial On Python Programming by Ridwan1821: 5:50am On Aug 26, 2019
nappy760:


undecided how many things this people want make we learn at a time...?
E don tire me sef.
They are trying though, kudos to them.
Re: A Thread For Tutorial On Python Programming by nappy760(m): 8:05am On Aug 26, 2019
pgbamane:
Hey Guys,
Do you know what are the different Python implementations available for us?
Those are CPython, Jython, Pypy, etc.
Follow the article on Different Flavors of Python(https://www.codebread.co.in/2019/07/flavors-of-python.html) to know in details.

We go dey alright las las, I am trying to joggle c#, js, python, AI&ML and now I am hearing we have different flavors of python grin grin ...it is well

3 Likes

Re: A Thread For Tutorial On Python Programming by Damoxy(m): 4:42pm On Aug 26, 2019
nappy760:


We go dey alright las las, I am trying to joggle c#, js, python, AI&ML and now I am hearing we have different flavors of python grin grin ...it is well

Do you do any Serious Thing with C# and ML(Python Libraries)?
Re: A Thread For Tutorial On Python Programming by nappy760(m): 7:53pm On Aug 26, 2019
Damoxy:


Do you do any Serious Thing with C# and ML(Python Libraries)?

Still on the basics , c# is super for web apps especially when you are familiar with OOP concept .
I once attended a softdev training on C# dotnet mvc and how to build web apps using visual studio
Re: A Thread For Tutorial On Python Programming by chukzyfcbb: 2:17am On Aug 27, 2019
Is there any networking engineer here who has started using Python for network automation?
Re: A Thread For Tutorial On Python Programming by chiboyjohn: 11:51pm On Aug 27, 2019
cochtrane:
I wrote a script to check the posters on this thread and their respective number of posts.

import requests
from bs4 import BeautifulSoup
from plotly.graph_objects import Bar, Layout, Figure

def gethtmlcontent(url):
response = requests.get(url, headers={'User-Agent': 'Mozilla/5.0'})
html = response.content
soup = BeautifulSoup(html)
return soup

users = []
for i in range(10):
url = 'https://www.nairaland.com/4945611/thread-tutorial-python-programming/' + str(i)
print(f"Downloading: {url}" )
table = gethtmlcontent(url).find('table', attrs={'summary': 'posts'})
for row in table.findAll('tr'):
for user in row.findAll('a', attrs={'class': 'user'}):
users.append(user.text)

userdict = {}
for user in users:
if user in userdict:
userdict[user] += 1
else:
userdict[user] = 1

y_values = list(userdict.keys())
x_values = list(userdict.values())
data = [Bar(x=x_values, y=y_values, orientation='h')]

x_axis_config = {'title': 'POST FREQUENCY', 'dtick': 1}
y_axis_config = {'title': 'USERS', 'dtick': 1, 'tickmode': 'linear'}
my_layout = Layout(title='Post Frequency per User on Thread',
xaxis=x_axis_config, yaxis=y_axis_config, bargap=0.5)
fig = Figure({'data': data, 'layout': my_layout})
fig.update_traces(marker_color='rgb(158,202,225)', marker_line_color='rgb(8,48,107)',
marker_line_width=1.5, opacity=0.6)
fig.update_layout(autosize=False, width=800, height=2000)
fig.show(renderer='browser')
do u Google for synthax after writing down ur algorithm
Re: A Thread For Tutorial On Python Programming by cochtrane(m): 5:08am On Aug 29, 2019
Wrote a script to get the respective posts in this thread and their corresponding number of likes.

import requests
from bs4 import BeautifulSoup
from pprint import pprint as pprint

link = 'https://www.nairaland.com/4945611/thread-tutorial-python-programming/'
posts, likes, allposts, allids = [], [], [], []


def getresponse(url):
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html, 'html.parser')
return soup


def findthreadlength(url):
div = getresponse(url).find("span", class_=" small" ).previous_sibling
for i in range(3):
div = div.previous_sibling
length = div.text.split(" (" )[-1].rsplit(" )" )[0]
return int(length)


for i in range(findthreadlength(link)):
table = getresponse(link + str(i)).findAll('a', attrs={'class': 'user'})
posts = [item.previous_sibling.previous_sibling['href'] for item in table]
allposts += posts

ids = [post.split('#')[-1] for post in posts]
allids += ids

for idx in ids:
like = getresponse(link + str(i)).find('b', attrs={'id': 'lpt' + str(idx)})
if like is None:
like = '0 Like'
likes.append(like)
else:
likes.append(like.text)


alllikes, fullposts = [], []

for like in likes:
if like == ' ':
like = '0 Like'
alllikes.append(like)
continue
alllikes.append(like.rstrip())

fullposts = ['https://www.nairaland.com' + str(post) for post in allposts]

postdict = {}
for post, like in zip(fullposts, alllikes):
postdict[post] = like

pprint(postdict)


First few results below:

3 Likes 1 Share

Re: A Thread For Tutorial On Python Programming by nappy760(m): 1:30pm On Aug 29, 2019
cochtrane:
Wrote a script to get the respective posts in this thread and their corresponding number of likes.

import requests
from bs4 import BeautifulSoup
from pprint import pprint as pprint

link = 'https://www.nairaland.com/4945611/thread-tutorial-python-programming/'
posts, likes, allposts, allids = [], [], [], []


def getresponse(url):
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html, 'html.parser')
return soup


def findthreadlength(url):
div = getresponse(url).find("span", class_=" small" ).previous_sibling
for i in range(3):
div = div.previous_sibling
length = div.text.split(" (" )[-1].rsplit(" )" )[0]
return int(length)


for i in range(findthreadlength(link)):
table = getresponse(link + str(i)).findAll('a', attrs={'class': 'user'})
posts = [item.previous_sibling.previous_sibling['href'] for item in table]
allposts += posts

ids = [post.split('#')[-1] for post in posts]
allids += ids

for idx in ids:
like = getresponse(link + str(i)).find('b', attrs={'id': 'lpt' + str(idx)})
if like is None:
like = '0 Like'
likes.append(like)
else:
likes.append(like.text)


alllikes, fullposts = [], []

for like in likes:
if like == ' ':
like = '0 Like'
alllikes.append(like)
continue
alllikes.append(like.rstrip())

fullposts = ['https://www.nairaland.com' + str(post) for post in allposts]

postdict = {}
for post, like in zip(fullposts, alllikes):
postdict[post] = like

pprint(postdict)


First few results below:


Can you explain the program bit by bit

1 Like

Re: A Thread For Tutorial On Python Programming by ges2019: 12:56pm On Aug 31, 2019
I have concise materials for complete R programming course, Python course, MathLab, and Data visualization tools like Tableau.

If you are beginner in these advanced programming languages, and are interested in data science kindly reach out to me on 07068883816
Re: A Thread For Tutorial On Python Programming by MrMann1(m): 3:35pm On Aug 31, 2019
cochtrane:
I wrote a script to check the posters on this thread and their respective number of posts.

Bro. I'm working on a python school project. I need your help.

(1) (2) (3) ... (7) (8) (9) (10) (11) (12) (13) ... (32) (Reply)

Chronicle Of A Data Scientist/analyst / I Want To Learn Programming. Which Language Should I Start With?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 69
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.