Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Zooming on mouse position calculation
Post: Zooming on mouse position calculation
HI :) ! I have been trying to create a simple zoom on point navigation with pygame, and after endless googling sessions, this is as close as I could get. The problem is that when I change the mouse po... |
|
GJG |
Game Development |
1 |
2,160 |
Dec-31-2022, 02:55 PM |
|
|
Thread: Adapting mnist model with personal dataset
Post: Adapting mnist model with personal dataset
Hi guys! wondering if it is possible to use the exact same training model used for mnist digit recognition model, but instead of 10 classifications use 1000 ? |
|
GJG |
Data Science |
0 |
897 |
Oct-09-2022, 02:38 PM |
|
|
Thread: Pygame freezes after certain time
Post: RE: Pygame freezes after certain time
For some reason it freezes on Windows, I'll check on linux later, but it worked once I used a while loop instead of iterator and added event check. It's a simple letter puzzle game for assembling word... |
|
GJG |
Game Development |
2 |
5,316 |
May-06-2021, 10:52 AM |
|
|
Thread: Pygame freezes after certain time
Post: Pygame freezes after certain time
Hi! Trying to make a previz window for testing a puzzle game while in development, but it keeps freezing after certain time, I am very new to pygame, so not sure what's wrong! Thanks
import pygame
fr... |
|
GJG |
Game Development |
2 |
5,316 |
May-03-2021, 02:53 AM |
|
|
Thread: Raising numbers to power **
Post: Raising numbers to power **
Hi there!
I've noticed something that I can't quite wrap my head around:
if I raise 2**2 I get 4
and if I raise 4**3 I get 64
but if I do something like 2**2**3 I get 256 ???
Why am I getting this re... |
|
GJG |
General Coding Help |
3 |
2,450 |
Mar-23-2021, 03:01 PM |
|
|
Thread: Writing a lambda function that sorts dictionary
Post: Writing a lambda function that sorts dictionary
Hi guys! :)
dict1 = {'c':3, 'a':5, 'f':7, 'e':4}Was wandering how to sort this dictionary by highest value first using lambda function?
expected result:
dict2 = {'f':7, 'a':5, 'e':4, 'c':3}Appreciat... |
|
GJG |
General Coding Help |
1 |
2,025 |
Mar-09-2021, 06:38 PM |
|
|
Thread: Scraping Whole Page Source
Post: RE: Scraping Whole Page Source
Posting threads when too tired for an adequate research maybe not the best idea.
from selenium import webdriver
browser = webdriver.Chrome()
browser.get('https://whateverpage.com')
x = browser.page_... |
|
GJG |
Web Scraping & Web Development |
1 |
2,151 |
Jan-13-2021, 03:19 PM |
|
|
Thread: Scraping Whole Page Source
Post: Scraping Whole Page Source
Is there a way to input the whole page source in exactly same form as you would be seeing it when you click rmb 'View page source' on a browser, just a raw page with thousands of lines of text?. I've ... |
|
GJG |
Web Scraping & Web Development |
1 |
2,151 |
Jan-13-2021, 08:49 AM |
|
|
Thread: Using range over slicing when looping through lists
Post: Using range over slicing when looping through list...
Hi Folks! Beginner question. Which one of these two are less processor costly?
my_list = [2, 3, 11, 5, 1, 9, 7, 15, 13]
largest = my_list[0]
for i in range(1, len(my_list)):
if my_list[i] > la... |
|
GJG |
Code Review |
3 |
2,791 |
Jan-04-2021, 09:36 AM |
|
|
Thread: Use of 'continue' instruction in a 'while' loop
Post: Use of 'continue' instruction in a 'while' loop
Hi folks! I'm a beginner and at the moment I'm taking a course of loop control in python. One of examples of how to implement continue instruction in a loop was this:
largest_number = -99999999
count... |
|
GJG |
Code Review |
1 |
2,172 |
Dec-29-2020, 02:35 AM |
|
|
Thread: Simplifying function
Post: Simplifying function
Hi folks! I gave myself a simple task of creating a function that turns binary numbers into decimal and was just wondering is there any way to make it a little bit more compact without using any extra... |
|
GJG |
Code Review |
2 |
2,475 |
Dec-21-2020, 03:36 AM |
|
|
Thread: Noob Alert! Wrong result using loop and if statemnent
Post: RE: Noob Alert! Wrong result using loop and if sta...
So basically there's no point for it..? |
|
GJG |
General Coding Help |
7 |
2,888 |
Dec-19-2020, 04:55 PM |
|
|
Thread: Noob Alert! Wrong result using loop and if statemnent
Post: RE: Noob Alert! Wrong result using loop and if sta...
Thanks deanhystad!
By the way, in the block that modifies a list, you added: nines = numbers
for x in nines[:]: rather than going straight to for x in numbers[:]Is there any particular reason for it?
... |
|
GJG |
General Coding Help |
7 |
2,888 |
Dec-19-2020, 08:31 AM |
|
|
Thread: Beginner question about code comparison
Post: RE: Beginner question about code comparison
It's unbelievable how you're being thought to solve a problem in 10 lines while it could be done in 2 all along, but I guess it's all for better understanding of how it all works and practising comput... |
|
GJG |
Code Review |
3 |
2,929 |
Dec-19-2020, 07:11 AM |
|
|
Thread: Beginner question about code comparison
Post: Beginner question about code comparison
Hi folks, I've just started learning programming and as I was making my way through various online beginner exercises, I came across one that asked to write a basic program which required to copy (n) ... |
|
GJG |
Code Review |
3 |
2,929 |
Dec-19-2020, 06:06 AM |
|
|
Thread: Noob Alert! Wrong result using loop and if statemnent
Post: RE: Noob Alert! Wrong result using loop and if sta...
|
GJG |
General Coding Help |
7 |
2,888 |
Dec-18-2020, 09:30 PM |
|
|
Thread: Noob Alert! Wrong result using loop and if statemnent
Post: Noob Alert! Wrong result using loop and if statemn...
Hi there! I'm trying to leave out a specific integer in a list and remove every other number
nr = 9
my_list = [0,5,6,7,6,9,9,1,9]
for i in my_list:
if i is not nr:
my_list.remove(i)
prin... |
|
GJG |
General Coding Help |
7 |
2,888 |
Dec-18-2020, 09:09 PM |