Member

[email protected]

Total likes received: 98 | Pubby Cash: 932


Articles Liked by Me: 87

Strings to List in Python

Categories: Tech | Pubby Cash Received:  0

Do you know how to turn strings to lists in Python? Well, here is my way to do it. First, you need to separate each value from the comma. You can use the split method to do this. In the parentheses of the split method, put quotations and then a comma inside it. After that, you need to make it an integer. To do that, use the int method. Then, use the print method to print what you just did. You should have printed a list of values without quotations. ...  Read more

This is how you solve problems

Categories: General, Tech | Pubby Cash Received:  0

So I solved the buttons problem in the GoPubby app, well kind of. There is still a bug where the logout button does not work. Additionally, content for some longer posts is cut off from the top of the screen. So how exactly did I solve the buttons problem? First, let me tell you what the problem was. So 15 to 20 titles of recent posts from the GoPubby website were displayed as scrollable buttons. When I click on one of the posts, it should transition to a page with only that post and its content on it. However, when I did it, I gave me many errors, such as 'NoneType object does not have attribute text' or something like that. I knew the answer lied within object properties, so I queried many websites and watched many YouTube videos so I could get a better understanding. Tech with Tim was a great help. Using his code, I added to my object property and tried it. It worked. But why didn't it work for me? I think the answer lies in the type of class that I had defined. In my class, there was an 'init' function with the 'super()' constructor. When inheritance is involved, the Python 'super()' function allows us to refer the superclass implicitly. So, Python super makes our task easier and comfortable. While referring to the superclass from the subclass, we don’t need to write the name of the superclass explicitly. It's kind of like when you want to import a module, you could either use 'import' or you could use 'from this import that'. I don't understand why the 'init' function caused my object property to mess up, but by using someone else's code, I got a new perspective and the data successfully got passed into the app. I'm still toying around with what Kivy can do....  Read more

Kivy Madness

Categories: General, Tech | Pubby Cash Received:  0

Recently, I have been working on the GoPubby app using the Kivy module in Python. Let me just tell you one thing: writing HTML code for a website is far easier than trying to figure out which classes and objects go where. There aren't many tutorials out there that do a good job of teaching the fundamentals for app development, so I often get stuck on a bug that will take hours to resolve. Currently, I am stuck on a very nasty bug that involves transferring data from my Python file to the Kivy file. The answer lied in object properties, and that brought me to the Kivy documentation page, which at times can hardly be understandable. However, even with the challenges of working with classes and objects, choosing Kivy to develop your app can come with many benefits. First, the screen will automatically resize to fit your current resolution and the buttons and text boxes will also adjust accordingly. Additionally, Kivy provides you with many different effects that can be used in your app to enhance its performance, such as a wide variety of transitions from one screen to another. Though using Kivy may seem like a huge mess, after watching more tutorials and studying more of their documentation, developing your next app will feel like a breeze!...  Read more

Have you ever heard of something called "Cython"?

Categories: General, Tech | Pubby Cash Received:  0

It sounds a great deal like Python, and it is. Be that as it may, Python is a deciphered programming language. Various investigations propose that Python is much slower than various assembled programming dialects including C and C++. Numerous software engineers settle on different supersets of Python programming dialects to quicken code execution speed. Cython is a well-known superset of Python. As an accumulated programming language, Cython encourages software engineers to help the execution of code with C-like execution. The engineers can load and utilize the augmentation modules legitimately in the Python code through the import explanation. Essentially, Cython is only a superior variant of Python. This is the reason Cython is better: Since Python is a deciphered programming language, software engineers need mediators to change over Python code into machine code. Each time a software engineer runs a Python program, the code should be parsed and deciphered before execution. Then again, Cython is a gathered programming language. The Cython projects can be executed straightforwardly by the CPU of the hidden PC without utilizing any translator. This enormously speeds up your application just as eliminating CPU utilization....  Read more

Tricky Business...

Categories: General, Tech, Gaming | Pubby Cash Received:  10

Have any of you heard of this Python module called Pygame? Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Pygame can be installed on basically any platform, with the most popular being Windows and Mac. It's relatively easy to install on Windows—a simple pip install pygame should do the trick. However, if you have an outdated Mac like me, installing Pygame is a whole other story. Just typing python3 -m pip install -U pygame --user in your outdated Mac machine won't cut it, and that was going to be a problem. I looked for answers in Stack Overflow, Github, Google, but none of them seemed to work. I tried uninstalling Python3 and my current code editor, "PyCharm", but that didn't seem to work either. So from then on, coding with Pygame had to be done on my Windows computer, which isn't always comfortable. Yesterday, I tried to install a new module on my Mac that would allow me to develop mobile apps. I tried, and it didn't work. At the same time, I remembered my previous failed attempt to install Pygame. This time, I carefully inspected every single line in the documentation and scrolled down the download page for further tips on Mac installation until I found an older version of Pygame that might work. I carefully copied python3 -m pip install -U pygame==2.0.0.dev6 --user into the terminal and executed the command. It worked....  Read more

1 ... 8 9 10 ... 18

Daily Deals


MECHANICSBURG WEATHER