Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,198,798 members, 7,969,377 topics. Date: Tuesday, 08 October 2024 at 06:55 AM

Webstacka's Posts

Nairaland Forum / Webstacka's Profile / Webstacka's Posts

(1) (2) (of 2 pages)

Computers / Re: Delete The System32 Folder On Your Computer And Save More Memory! by webstacka: 7:59pm On Feb 21, 2018
TrillionBrains:

If only they will read to the last paragraph cheesy
you are Wicked! Mynd44 and Lalasticlala should see this.

1 Like

Politics / Re: Police Van Transporting Cow Feed In Abuja (Photos) by webstacka: 7:24pm On Jan 16, 2018
No. Thoze pholice peeples wan go fight fulani herdsmen so zey need to smoke osogbo weed well well...
Romance / Re: This Lady Is Trying To Ruin My Life!!! by webstacka: 8:08pm On Nov 25, 2017
That was how one of them, who often sneaks into my house from her aunty's house, came in one day and slipped out N5000 from my wallet on my table. I asked her, threatened, and shouted. She denied ever seeing or taking it...
Education / Re: 3 Richest Men Have More Wealth Than The Poorest 160 Million Americans by webstacka: 7:46am On Nov 25, 2017
That Book, Rich Dad Poor Dad, by Robert Kiyosaki, has always been correct!
Celebrities / Re: Look Like A Celebrity. Buy These... by webstacka: 8:38pm On Nov 18, 2017
More polos...

Celebrities / Re: Look Like A Celebrity. Buy These... by webstacka: 8:35pm On Nov 18, 2017
webstacka:
Do you want to look good, just like a top notch celebrity? Do you have taste for fashion. Do you need t-shirts and polo shirts that will make you look smart and cute? Anyways, Xmas is around the corner, and its time to change wardrope!

GET THESE

STOCK POLO SHIRTS,

T-SHIRTS AND

BOXERS AT AFFORDABLE PRICES NOW!

1 PACK OF POLO SHIRT FOR N1000 OR 2 PACKS FOR N1800.

ORDER YOUR POLO SHIRTS NOW! ANYWHERE IN NIGERIA.

FOR WHOLESALE/RETAIL:

CALL/SMS: +2348179370258

* * Quality is our priority. Why not give us a try * *

Available. Affordable.
Celebrities / Re: Look Like A Celebrity. Buy These... by webstacka: 8:31pm On Nov 18, 2017
Still available. Buy your quality polo shirts NOW!

Celebrities / Look Like A Celebrity. Buy These... by webstacka: 8:29pm On Nov 18, 2017
Do you want to look good, just like a top notch celebrity? Do you have taste for fashion. Do you need t-shirts and polo shirts that will make you look smart and cute? Anyways, Xmas is around the corner, and its time to change wardrope!

GET THESE

STOCK POLO SHIRTS,

T-SHIRTS AND

BOXERS AT AFFORDABLE PRICES NOW!

1 PACK OF POLO SHIRT FOR N1000 OR 2 PACKS FOR N1800.

ORDER YOUR POLO SHIRTS NOW! ANYWHERE IN NIGERIA.

FOR WHOLESALE/RETAIL:

CALL/SMS: +2348179370258

* * Quality is our priority. Why not give us a try * *

Programming / Re: Software Development Training Institute by webstacka: 8:22am On Nov 15, 2017
Where is the location?
Jobs/Vacancies / Re: Between Aba And Delta by webstacka: 8:19am On Nov 15, 2017
I dunno of Delta but in Aba, you need a skill to survive. Teaching skill, tailoring skill, and others are needed in Aba.
Programming / Re: Let's Build A Simple Blog With Python(django) by webstacka: 6:53am On Oct 02, 2017
olamil34:
bottle allows u to code in whatever style u want and that is the problem, it allows begineers to write code in an unmaintainable way.

No. It doesn't. I've used bottle and its fun. With Object Oriented programming, you can implement MVC style in bottle, and did I forget to mention that bottle is faster than Django? Yes. It is. Bottle helps you to master python not "batteries-included" django. However, the lacking points in bottle are: form generation and validation, database access, and authentication. You still can implement these using WTForms for form validation, Sqlite3 or psycopg2 for raw data access (or the powerful SQLAlchemy or peewee orms), and open-auth for authentication.
Programming / Re: Let's Build A Simple Blog With Python(django) by webstacka: 6:41am On Oct 02, 2017
bilard:

Well, yes, here is what I did, i tried activating using the command given on this post and it gave an error message, so I went into the folder Scripts, looked for "activate", ran the script then tried installing Django then that error message.

make sure that Python "Scripts" directory is included in your system environment variables. Then you can use all those commands. Better still, ditch Windows and install Ubuntu.
Programming / Re: Intern In Abuja As A Developer by webstacka: 3:54pm On Aug 29, 2017
Search for opensource repos and contrib.

1 Like

Programming / Re: Which Programming Language Can I Start With? by webstacka: 2:22pm On Aug 15, 2017
Brainfuck
Programming / Re: Web Programming Tutorial In Python. by webstacka: 8:20am On Aug 04, 2017
greatface:
continue am following.. grin

i have few issues with image display in bottle but that is on android though. can you be of help?

just use:



from bottle import Bottle, route, static_file

app = Bottle( )

@app.route("/static/<file : path>"wink
def static(file):
return static_file(file, root="static/"wink



now create a folder called static, under your working directory. Under the static folder, create three more folders: css, js, and img. Put your css files under the css folder, javascript files under the js folder, and image files under the img folder. Run and load your browser. You'll see everything. NOTE: make sure you have python imaging library (pillow) installed on python in order to load images.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 8:05am On Aug 04, 2017
Sync201:
@webstacka Would I need to have knowledge on Javascript for bottle
For front-end development, yes.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 8:41pm On Jul 30, 2017
proxy20:



I am planning learning python soon . Is there similarity with bottle micro- framework and flask.

yeah...a lot similar. In fact, bottle is flask without werkzeug.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:31pm On Jul 30, 2017
Snwokenk:
Django seems a lot easier and quicker to bring product to market. but will check this out
so bottle is a micro framework? people will be better of learning django. its a "batteries included" framework

Django is a nice framework, but its not good for teaching beginners web programming. You must have a fair mastery of python to use django. In fact, if you develop an OOD-based web app in bottle, you'll most likely observe that you've developed your own web framework -- and the joy of creating a web framework!
Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:22pm On Jul 29, 2017
Let us see how it works. Now open the lesson.py file and type this in your index function:


principal = 200
rate = 10.5
myTime2 = 10
interest = principal * (rate/100) * myTime

result = " <h1>After 10 years, your interest = {0} </h1>".format(interest)

return result



the above code shows how to solve simple interest in python.

Save it. Run and navigate to localhost:8080/

what do you see?

You can see how easy it is to embed python codes in html.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:04pm On Jul 29, 2017
The first you will notice about python is its data types. Python data types are classified into five:

1) integers - negative or positive whole numbers (int) e.g 2, 100, etc.

2) floats - negative or positive decimal points (float) e.g 2.356, -1.846, etc.

3) strings - characters, alphabets and words, enclosed with single or double quotation marks. E.g 'hello', "python bottle", "12*#/", etc.

4) boolean values - true or false statements, denoted by True or False. E.g pay=False, loggedIn=True

5) null values - this is not really a standard data type, but since python is a dynamic language, its data types can change during execution. Thus, a null value is dynamic and its value can change from one data type to another. It is denoted by None. E.g myFruit = None
Programming / Re: Web Programming Tutorial In Python. by webstacka: 11:47am On Jul 29, 2017
Good morning. Like I said before, we are learning python programming using a web application.
Programming / Re: I Want To Learn How To Build Apps And Games, Help! by webstacka: 11:45am On Jul 29, 2017
To build android apps, you MUST have a coach. It pays to learn.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 4:52pm On Jul 28, 2017
seunny4lif:

Android Application
Java and HTLM ?

i said you do not need html to develop android apps in python. You need the kivy framework.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 11:58am On Jul 28, 2017
seunny4lif:
Hope u wouldn't be needing HTML sha Thanks Python look more simple than Java Python is easy to grab unlike Java.
No. No html...
Programming / Re: Web Programming Tutorial In Python. by webstacka: 8:45am On Jul 28, 2017
seunny4lif:

I'm a beginner in Python programming
I know Java but not GUI sha and I want to add python then straight to Mobile app becos I like app

What do you think ?

just keep learning python, you will soon master it. Python can be used to create desktop and web application. Also, android and IOS apps can be created with python.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 6:12am On Jul 28, 2017
seunny4lif:
I'm using Linux not Windows
I want to learn Phyton
Those python codes run on both windows and unix environment, including linux.
Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:41am On Jul 28, 2017
You may ask questions where you don't understand...
Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:26am On Jul 28, 2017
Creating multiple functions

Functions are the building blocks of any programming language. We have already seen a function, that is, the index function wrapped with a decorator. We will later see how python decorators are built. Creating multiple functions is easy in bottle provided they are wrapped with the same decorator. Let us create some:



@app.route( " / " )
def index ( ):
return " This is the Index Page"


@app.route( " /profile " )
def profile ( ):
return " This is the profile page. "


@app.route( " /about " )
def about( ):
return " This is the about page. "



This demonstrates the power of python functions, decorator and routing functions in separating concerns. If you have not observed already, bottle follows a strict MVC design pattern; which is a good OOD principle.

1 Like

Programming / Re: Web Programming Tutorial In Python. by webstacka: 12:09am On Jul 28, 2017
Checking time

let us use python's datetime library to know the time. This will demonstrate how to use string interpolation in python. But before then, let me introduce a python module that is handful when starting a web browser. It is called the webbrowser module. I'll show how it works in the example below:



#!usr/bin/env python

import datetime
from bottle import Bottle, route, run

app = Bottle ( )

@app.route ( "/"wink
def index ( ):
now = datetime.datetime.now( )

nowDate = now.strftime( "%d %B, %Y " )

return " Today's date is {0} or {1} ".format( now, nowDate )


if __name__ == '__main__':

import webbrowser

webbrowser.open( "localhost:8080/" )


app.run(
port=8080,
server='paste'
)

1 Like

Programming / Re: Web Programming Tutorial In Python. by webstacka: 11:32pm On Jul 27, 2017
Now let us do the needful in programming, that is, creating the mandatory hello world app in bottle.

First open a text editor and create a python file called lesson.py, and save it in a folder under your C: \ drive, called BottleApp (make sure its created, if not then create it too).

Next, edit the lesson.py with the following source code:

#!usr/bin/env python

from bottle import Bottle, route, run

app = Bottle( )

@app.route( " / " )

def index( ):
return "Hello, World!" # this is comment. use four spaces to indent

if __name__ == '__main__':
app.run(
host = '0.0.0.0',
port = 8080,
server = 'paste'
)



Now save it. Open a command prompt or unix shell, navigate to where you saved the file, i.e,

cd C: \BottleApp

Type the following on the command prompt:

python -m lesson

Hit enter. Open a web browser and navigate to 127.0.0.1:8080/

You will see your app running...

1 Like

Programming / Web Programming Tutorial In Python. by webstacka: 11:07pm On Jul 27, 2017
No much introduction. I'm a bit free so I decided to do this tutorial before I get busy again. Hope someone learns something from this tutorial.

The tutorial is about web programming in python using a micro web framework called bottle. Python bottle is a minimalistic and fast web framework used for developing simple REST services. However, nothing stops you from developing a full-fledged web application with python bottle. One good thing, or maybe a con, of bottle is its single file approach. Bottle is a single python file that requires no external library order than the python standard library. However, this approach makes it a bit difficult to integrate it with other modules, but this can be solved by building your web application with object-orientation in mind from scratch.

REQUIREMENTS:

1) Python 3.4 +

2) Bottle web framework (pip install bottle) with internet connection.

3) Web server (optional). Bottle can run with python's standard wsgiref server bundled with python. However, we need a faster web server that will make our development easier. Popular wsgi-based web servers for python are cherrypy, rocket, twisted, tornado, gunicorn, paste, etc. Since we're just using it for development, our best bet would be python paste or cherrypy. I'll use paste (pip install paste) and that's it!

4) text editor. Any good text editor is okay by me, except notepad. Well, I use notepad++

That is all we need for now. Let's get started!
Politics / Re: Biafra: Nigeria Government Is Made Up Of Criminals- Turkish Diplomat Abdulkadir by webstacka: 12:40pm On Jul 01, 2017
Ok.

(1) (2) (of 2 pages)

(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. 36
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.