First app in Django

After the configuration of Django, there is basic poll application that is explained in the official Documentation. Activate the project and run it!

In a separate window start the poll app:

Then, write vim to start :NERDTree. Type the message into the views.py

Create a polls/urls.py file with ‘m’ and ‘a’ inside NERDTree

To link them with the main site, by typing the code in urls.py in your side

To check your changes in the local server 127.0.0.1/polls, see your browser

Now we are going to create a question and choice classes into models.py

Let’s add polls apps into the  mysite/settings.py

After this change, it is important to do the migration

In order to have data into the polls, lets migrate tables from sql

To refresh the changes, let’s migrate again to refresh the database

Now, we will code with the python shell to show the objects we created

To import the library of datetime and make compatible python 2 and 3:

Save these changes and start a new Python interactive shell by running python manage.py shell again. This time we are going to check q1 and q2:

In this case we have a problem with q2 since it was not declared as q1 was

Posted in τεχνολογια :: Technology | Tagged , , , , , | Leave a comment

Running Your First Programs in C

One of my duties at National University of Engineering is to teach C to first year stdudents.  I have talk about paradigms od programming and some history regarded to C language, starting with the year of creation 1969 – 1973 at AT&T Bell Labs and highlighting that the Linux kernel was written in C because of its power that let manage resources of the computer.

My first hello world!

Then, to compile the program we run the command gcc, to finally execute it

Working with numbers and operations

  1. Checking if the number is even or odd

The output for 13:

2. Check if a number is divisible by 9

The output for 27:

3. Determine the largest of three numbers

The output of 9.25 9.5 and 9

4. Enter three numbers and sort them in decreasing order

The output for the three numbers are:

5. Having an angle in degrees, determine to which quadrant belongs

the output for the 190 degrees is:

6. Determine if a year higher than 1600, is a leaf-year or not

The output for years higher than 1600 and less than it

7. Calculating the amount to pay the telephone bill

the output for the basic plan and additional minutes and megabytes:

Posted in τεχνολογια :: Technology | Tagged , , , , , , , | Leave a comment

About the Fedora and GNOME workshop at Flisol Lima Norte 2017

Yesterday we have celebrated the Flisol 2017 at UPN Lima Norte, as it was announced here

Thanks to the organisers that invited us to do a workshop of GNU/Linux commands

It has started around 9:00 o’clock and we were surprised that the attendees were earlier than 9 to get a sit in the workshop. I did a review of the History of GNU/Linux and then introduction to Fedora and GNOME applications. I also noticed that people that have been in previously events such as Install Fest were there to learn more about the projects and of course, commands on terminal ( as  was published in the Flisol ad).

I must thanks to the volunteers that helped with the attendees to complete the tasks in terminal. Newbies sometimes fail in the basic principles such as indentation, use of VIM, spaces, case sensitive and if you miss one step, it can let to files.swap among other issues. Students from different universities where GNU/Linux is not so popular were eager to learn and the three hours of the workshop were not enough. There were very talent people that easily got the commands and respond the questions and basic exercises .

I understan that each one has her or his pace, so I invited the audience to complete the Backtrackacademy course of Introduction to GNU/Linux using Fedora+ GNOME for free. As it is usual, I gave gifts to all the participants when they respond correctly my questions.

This is the final photo of the group after the workshop at Flisol Lima Norte 2017!

I also had the chance to wave Fabio Duran from GNOME Chile who did an online talk ❤

Even his face it is not clear at all in the picture, he is always supporting the Peruvian work!

At the end, we have shared a mini buffet thanks to the organisers again for this great experience at UPN and we hope that the Linux UPN community will grow up!

Nuritzi, the President of the GNOME board was also online to have nice greetings to Peru

and… some more pictures in the bellow mini gallery… enjoy it!

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , | 3 Comments

First steps on Django

1. Installing Miniconda

1.1.- Downloading Miniconda

Go to the Official Website of Miniconda and download the version to Linux:

1.2.- Running miniconda

Now we understand that if it is a script, it has the executing permission. In this case, it is shown that it does not have it, and we use the chmod command to set the execution. Then, run it with the -b flag to do it without human intervention (or silent mode), and the -p option redirect the prefix from the default route ~/ to /opt as it is shown:

1.3.-Check previously the owner and group to set the right permissions

1.4.- Link the useful events of Python in order to avoid conflicts between the functions of Python of anaconda and from the system.

1.5.- Create the environment where are you going to work in Python 3

1.6.- Activate the environment with source and install the django with the python index package

2.- Creating my first site

2.1.- Following the Django tutorial check the version of the Django framework, then create the site. This time it is called yulytas_site.

2.2.- Check the site directory, in this case it is done with nerdtree and pathogen. (btw I’ve moved the environment from my home to Development)

2.3.- Run the server from your site

2.4.- As the message suggested, we will turn off the server by typing CTRL+C and start the migration (because in red it is said that we have 13 unapplied).

2.5.- Now we see the local website with the port 8000 in our browser

3. Creating a superuser

3.1.- Every app need an admin, so lets create a superuser called admin. To do this, we are going to open another terminal (CTRL+SHIFT+T) in order to keep the runserver terminal and stay aware of the events. In this new terminal windows we must run again the server as it is follow:

3.2.- Now let’s see the admin user in the Web, inserting the proper passwd

At first we are going to see the basic modules as admin that manage user and group, we are going to see later other modules to abstract objects

Parallel notes

1.- To list all the environments to activate the desirable env

env.png

2.- To delete the database sqlite with $ rm -r db.sqlite3 and the whole migrations previously done

deletebd

Posted in τεχνολογια :: Technology | Tagged , , , , , , , , , , | Leave a comment

Encouraging New Contributors in Lima, Peru

A worldwide enthusiastic representative FLOSS as Stormy is, have public encouraged contributors to share experiences about their communities around the world. So I decided to post about it since I usually have the support of two great communities such as GNOME and Fedora to do Linux events in my local community. Following the suggested structure, here are some experiences that I can make you know. Hope you do not mind to check every single link I pointed out to the words throughout this post because it has more posts of the job we do in Lima, Peru.

  • 3 best places for finding new users

Universities and renowned IT companies 

It is well known in Peru that the best programmers and IT people are studying in three top universities such as PUCP, UNI and UNMSM. And as you can see in the corresponding links, I did presented GNOME and Fedora in these three universities as well as in other universities around my country such as UIGV, UPN, UC, UPIG, UNA, UNTELS, UNSAAC, UNU, USIL, UTP, UNICA and UCSS.

IBM and PetroPeru are two renowned companies in Peru and it is attracted to newcomers to have the opportunity to attend and hear for free professional and expert experiences that use Linux solutions in their daily. This is inspired experience to many students and local enthusiasts.

Online IT communities such as training IT courses and IT channels 

There are other IT communities that I use different platforms and usually the followers get in contact with this online communities in order to learn Linux and innovative apps that other communities can provide. This year I was invited to participate in an interview of DevAcademy channel with more than 7.3K followers around the world as well as BacktrackAcademy with more than 60K followers.

Newspapers and social network to spread a Linux event to the community

Maybe your contacts around are not so interested in using Linux or contribute with the projects, but by spreading the news of Linux events in a wellknown newspaper, we can expand the horizons and get people who really concern about Linux. La Republica is one of the top recognized newspaper in Peru and they helped us two years in a raw 2014 and 2015. Ads in social networks as Facebook and Twitter were also important to let us calculated how much people are interested.

  • 10 steps to keeping new contributors once you have their attention

Installing Fedora and GNOME

I started virtually because it is a slow process to teach how to use Linux since you have always used another operating system. Some really enthusiastic people decide to do dual boot and others after the first talk about GNU/Linux decide to delete other OS 🙂

Using and interacting with the GUI and by terminal

Configuring IP, PE, DNS, editing configuration of keyboard and languages and many other commands that will help to use the system in daily activities.

Create an online group or chat to support each other

Some students are shy to speak out in English because they do not it well and it is preferable to start locally, so chats or groups in social networks were a way to communication that usually works, Whatapp groups also were an alternative.

Set up workshops to start little challenges to finish in GSoC

Workshops and hacking meetings periodically are important.

Make them part to other events as volunteers in the organization

I have experienced that my attends after a while become my volunteers in next events.

Show the different ways to contribute the project

Leyla is a student who started with us by design our events, then she become active in learning GNU/Linux commands as well as programming to help us in the workshops.

Build and Studying the code of a particular app

Felipe is on of our students that designed a simple game called Snake in GTK by first learning GTK.

Show the tools for specific contribution

Each team has their own tools and it is crucial to know them before start contribution.

Contact them with experts in the area they are having problems

Thanks to my trips abroad I was be able to know who is in charge of certain apps or areas so it was easier for me to send them mails when I can not answer a question from my students. I must thank people who have helped kindly and in time!

Teach to use the formal way to communicate to the community

IRC is the formal way to communicate in GNU/Linux even it is old, it has worked whenever we have a question in my local community.

  • 7 steps for onboarding new community members

Sharing experiences besides the code such as lunch and after hacks

Work in pairs in a common project

Students of UNTELS are a great sample this time, they worked in their university and then integrated with us whenever w have a meeting. I want to share the work of Bressner from USIL because he has a clean documentation during our workshops.

Grouping members to do a challenge

Code is definitely a challenge but what if you challenge a group to write a song for GNU/Linux?

Playing “trivias” and prize the knowledge they have about the project

During the talks you can ask to the audience questions related to the topic and see if they are understanding.

Meetings to hack outdoor in group

This year we have a great chance to celebrate an event at the beach called Linux Playa, and the last year we went to the camp thanks the event called HackCamp 2016.

Foster them to post their work

Since the installation workshop and then step by step to reach a great contribution.

Congratulating the work of a member in public

I use social network to share his/ her posts congratulating the job.

  • How did you get started in your first project?

We did usually started by “jhbuilding” modules in the system.

  • 3 best tips you’ve gotten for attracting new contributors

Show the OS Revolution video which shows all the efforts of GNU/Linux since MIT.

Explain the importance of GNU/Linux in computing history and in supercomputers.

I also highlight that GNU/Linux has an aggregate value such as knowing another language and I also present the job demanding from important IT companies.

  • Ways you find the right type of contributor and where to find them

One of my students in UNI university last year during my course of Operating System did a patch that has passed in production for GNOME. I am doing the same this year for my students as an alternative of final project. One of them got in contact with Athos Ribeiro of Fedora to solve a bug.

Posted in FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , | 1 Comment

BacktrackAcademy is going to offer an online course using FEDORA and GNOME

Thanks to BacktrackAcademy, newcomers and enthusiasts can learn more about the basics of Linux Administration. I am in charge of teaching an online course called Introduction to GNU/Linux in the platform that BacktrackAcademy offers. The course is going to be released into two weeks, and of course, the Operating System that I use is Fedora 25 and the user friendly Desktop: GNOME 3.22.

This new course, and other courses like it, can only be available for free to everyone if we have a great demand. Please help me share it! So far we have 380 shares – let’s keep going!

This is an introductory course that will show you how to handle files, directories, users, groups, resources, processes and some services since the very beginning. We are going to start by installing Fedora 25 and GNOME 3.22 on VBox. You’ll also get to learn a brief history of Linux and the importance of learning about these projects!

I’d like to thank USIL University for their support, and give a special thanks to Director Ana Ramirez, who was one of the first professors in Lima, Peru to have trusted in my knowledge and who has supported me since 2013. All the experience that I gained since then, by teaching Linux at USIL, has been priceless and has allowed me to participate and give back to my community through this new online adventure.

Posted in FEDORA, GNOME | Tagged , , , , , , , , , , | 2 Comments

Install Fest 2017 in Lima, Perú

Today we have celebrated another Install Fest at Lima, Perú. Our meeting was at UNI.

Thanks to the support of Fedora LATAM and the GNOME Foundation, we did share step by step the installation of Fedora 25 and GNOME 3.22; and thanks to Butterfly, we are going to be able to organize all our Linux events through the LinuXatUNI Website. I did also announced the GNOME 3.24 and shared more about the Free Software philosophy.

Starting with VirtualBox, we have installed on laptops the operating system Fedora 25 and presented the GNOME project to new Science students of the first year at National University of Engineering. It was not only exclusively to this kind of students, we had also students from different universities such as UNTELS, UPIG, UNMSM and SENATI.

Our audience was in the majority newbie in GNU/Linux, it was great to see the enthusiasm of the freshman audience and the questions about MD5 and resources during the talk. Some gifts were also part of this celebration, to the student who did first completed the installation and some others that have interested questions and answers during the event.

Special thanks to the professor Juan Espejo for organizing the meeting and all the volunteers that help us to run this awesome event! These guys were of course pictured! 🙂

Thanks again Fedora, GNOME, CC UNI, Softbutterfly, organizers, volunteers, and attendances for making this event possible and great! 😀 😀 😀

Posted in Events, FEDORA, GNOME, τεχνολογια :: Technology | Tagged , , , , , , , , , , , , , , | Leave a comment