#coding
OpenCV Tutorial demonstrates how a Python program is built to measure the distance of a hand using a single webcam
Apart from the information on how to use these Python libraries (hand recognition and tracking), it’s a very interesting exercise which shows how you build out any program piece by piece, by testing the logic at each step. This is, of course, not possible if you don’t have open source code to examine and re-use.
I love how the logic is unpacked at each stage, and it is the approach most programmers will use to simplify what can become complex as it progresses to completion. You test each stage before starting a new one, and this is where you’d notice the X measurement is not sufficient to provide accurate results, and why the diagonal measurement is more accurate. Then testing whether it is a linear relationship or not, and so you keep building up the following stages.
Although this was for hand recognition and distance interpretation, the type of approach could be followed for face tracking or anything else.
See OpenCV Knows Where Your Hand Is
#technology #opensource #programming #coding #Python
We have to say, [Murtaza]’s example game in his latest video isn’t very exciting. However, the OpenCV technique he uses to track a hand and determine its distance from a single camera i…
We are looking for new volunteer coaches
Do you want to live an extraordinary adventure while developing your "soft skills"? Then join the CoderDojo Brussels Yser team to coach children during funny digital workshops. And you don't need to be a computer guru to do it.
https://www.eventbrite.co.uk/e/coderdojo-brussels-yser-06112021-registration-167029388397
#arduino #belgium #brussels #child #children #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #coding #computer-science #computer_science #computerscience #css #css3 #development #electronic #electronic-circuit #electronic-equipment #electronic_circuit #electronic_equipment #electroniccircuit #electronicequipment #formation #godot #html #html5 #informatics #initiation #it-development #it_development #itdevelopment #javascript #microbit #programming #python #robotics #scratch #technology #volunteer #web #webdevelopment #workshop #young #young-people #young-person #young_people #young_person #youngpeople #youngperson #younth #youthfulness
We zijn op zoek naar nieuwe vrijwillige coaches
Wil je een buitengewone avontuur beleven en tegelijkertijd je "soft skills" ontwikkelen? Kom dan het team van CoderDojo Brussel Yser versterken om kinderen te coachen in leuke digitale workshops. En je hoeft geen computergoeroe te zijn om het te doen.
https://www.eventbrite.co.uk/e/coderdojo-brussels-yser-06112021-registration-167029388397
#arduino #belgie #belgië #brussel #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #codering #coding #computerontwikkeling #css #css3 #elektronicaworkshops #elektronisch #elektronisch-circuit #elektronisch_circuit #elektronischcircuit #formatie #godot #html #html5 #informatica #initiatie #it-ontwikkeling #it_ontwikkeling #itontwikkeling #javascript #jeugd #jeugdigheid #jongere #kind #kinderen #microbit #ontwikkeling #programmering #python #robotica #scratch #technologie #vrijwilliger #web #webontwikkeling
#Programming Leftovers • 𝖳𝗎𝗑 𝖬𝖺𝖼𝗁𝗂𝗇𝖾𝗌 ⇨ http://www.tuxmachines.org/node/157430 #coding #rustlang #bash #TuxMachines
Hey everyone, I’m #newhere. I’m interested in #animation, #art, #big-cats, #coding, #games, #linux, #macos, and #technology.
Hey everyone, I’m #newhere. I’m interested in #books, #coding, #ecology, #fantasy, #languages, #meditation, #movies, #music, #nomad, #permaculture, #programming, #reading, #scifi, #travel, #traveling, #videogames, #wanderlust, and #yoga.
We zijn op zoek naar nieuwe vrijwillige coaches
Coach zijn bij CoderDojo is een buitengewoon avontuur. Wij organiseren ludieke workshops rond computerwetenschappen voor jongeren van 7~8 jaar tot 18 jaar. En je hoeft geen computergoeroe te zijn om een coach te zijn. Dus, als je geïnteresseerd bent om het team van CoderDojo Brussels Yser te versterken, neem dan contact met ons op via bxl-yser@coderdojobelgium.be.
#arduino #belgie #belgië #brussel #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #codering #coding #computerontwikkeling #css #css3 #elektronicaworkshops #elektronisch #elektronisch-circuit #elektronisch_circuit #elektronischcircuit #formatie #godot #html #html5 #informatica #initiatie #it-ontwikkeling #it_ontwikkeling #itontwikkeling #javascript #jeugd #jeugdigheid #jongere #kind #kinderen #microbit #ontwikkeling #programmering #python #robotica #scratch #technologie #vrijwilliger #web #webontwikkeling
We are looking for new volunteer coaches
Being a coach at CoderDojo is an extraordinary adventure. We organize fun workshops around computer science for young people from 7~8 years old to 18 years old. And you don't have to be a computer guru to be a coach. So, if you are interested to reinforce the CoderDojo Brussels Yser team, contact us at bxl-yser@coderdojobelgium.be.
#arduino #belgium #brussels #child #children #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #coding #computer-science #computer_science #computerscience #css #css3 #development #electronic #electronic-circuit #electronic-equipment #electronic_circuit #electronic_equipment #electroniccircuit #electronicequipment #formation #godot #html #html5 #informatics #initiation #it-development #it_development #itdevelopment #javascript #microbit #programming #python #robotics #scratch #technology #volunteer #web #webdevelopment #workshop #young #young-people #young-person #young_people #young_person #youngpeople #youngperson #younth #youthfulness
I've been working on this code for storing settings in a JSON file. It's for the mindfulness-at-the-computer project
def settings_file_exists() -> bool:
return os.path.isfile(JSON_SETTINGS_FILE_NAME)
def save_dict_to_json(i_dict_to_save: dict, i_file_path: str):
print("save_data_to_json")
with open(i_file_path, "w") as write_file:
json.dump(i_dict_to_save, write_file, indent=2)
def load_dict_from_json(i_minimum_dict: dict, i_file_path: str) -> dict:
print("load_data_from_json")
ret_dict = i_minimum_dict.copy()
if os.path.isfile(i_file_path):
with open(i_file_path, "r") as read_file:
from_file_dict: dict = json.load(read_file)
diff_key_list: list = []
for min_key in i_minimum_dict.keys():
if min_key not in from_file_dict.keys():
diff_key_list.append(min_key)
print(f"One or more keys needed for the application to work were not "
f"available in {os.path.basename(i_file_path)} so have been added now. "
f"These are the keys: {diff_key_list}")
diff_key_list: list = []
for file_key in from_file_dict.keys():
if file_key not in i_minimum_dict.keys():
diff_key_list.append(file_key)
print(f"One or more keys in {os.path.basename(i_file_path)} are not "
f"used by the application (though may have been used before). "
f"These are the keys: {diff_key_list}")
print(f"Before merge {i_minimum_dict=}")
print(f"Before merge {from_file_dict=}")
ret_dict.update(from_file_dict)
# -if there are different values for the same key, the value
# in from_file_dict takes precendence
print(f"After merge {ret_dict=}")
return ret_dict
SK_SHOW_BREATHING_TEXT = "show breathing text"
SK_REST_ACTIONS = "rest actions"
SK_BREATHING_AUDIO_VOLUME = "breathing audio volume"
SK_BREATHING_BREAK_TIMER_SECS = "breathing break timer secs"
# The values given here are the minimum values needed for the application to work
min_settings_dict = {
SK_SHOW_BREATHING_TEXT: True,
SK_BREATHING_AUDIO_VOLUME: 50,
SK_REST_ACTIONS: {},
SK_BREATHING_BREAK_TIMER_SECS: 3,
}
# Initial setup
if not settings_file_exists():
rest_actions: dict = {
"Making tea": "path/to/image",
"Cleaning workspace": "/home/user/_",
"Walking meditation": "path/to/image",
}
min_settings_dict.get(SK_REST_ACTIONS).update(rest_actions)
db_file_exists_at_application_startup_bl = settings_file_exists()
settings: dict = load_dict_from_json(min_settings_dict, get_json_file_path())
print(f"{settings=}")
#python #programming #coding #json #datapersistence #mindfulness-at-the-computer #matc
Hey everyone, I’m #newhere. I’m interested in #agricullture, #architect, #cityscapes, #coding, #computer, #energyandclimate, #gardenarchitecture, #home-and-garden, #interiordesign, #stock, and #technolgy.
What's the definition of "junior" developer? I though the line being the ability to dig into other codebases that you depend on or depends on you. Then understand the internals/fix bugs there. Apparently I'm wrong?
After a long period of online activities, this Saturday, August 7, 2021 was our first in-person session. We hope this will be the beginning of a return to normalcy.
#arduino #belgium #brussels #child #children #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #coding #computer-science #computer_science #computerscience #css #css3 #development #electronic #electronic-circuit #electronic-equipment #electronic_circuit #electronic_equipment #electroniccircuit #electronicequipment #formation #godot #html #html5 #informatics #initiation #it-development #it_development #itdevelopment #javascript #microbit #programming #python #robotics #scratch #technology #volunteer #web #webdevelopment #workshop #young #young-people #young-person #young_people #young_person #youngpeople #youngperson #younth #youthfulness
Na een lange periode van online-activiteiten, was deze zaterdag 7 augustus 2021 onze eerste face-to-face-sessie. Wij hopen dat dit het begin is van een terugkeer naar de normaliteit.
#arduino #belgie #belgië #brussel #code #coderdojo #coderdojo-belgium #coderdojo_belgium #coderdojobelgium #codering #coding #computerontwikkeling #css #css3 #elektronicaworkshops #elektronisch #elektronisch-circuit #elektronisch_circuit #elektronischcircuit #formatie #godot #html #html5 #informatica #initiatie #it-ontwikkeling #it_ontwikkeling #itontwikkeling #javascript #jeugd #jeugdigheid #jongere #kind #kinderen #microbit #ontwikkeling #programmering #python #robotica #scratch #technologie #vrijwilliger #web #webontwikkeling
How different programming languages read and write data: C, C++, Java, Groovy, Lua, and Python
In his article How different programming languages do the same thing, Jim Hall demonstrates how 6 different languages accomplish the same exact task with different syntax. The lesson is that programming languages tend to have many similarities, and once you know one programming language, you can learn another by figuring its syntax and structure.
In the same spirit, Jim's article compares how different programming languages read and write data. Whether that data comes from a configuration file or from a file a user creates, processing data on a storage device is a common task for coders.
Every programming language has a unique way of accomplishing a task; that's why there are so many languages to choose from. You can and should choose the language that works best for you. But once you understand the basic constructs of programming, you can also feel free to try out different languages, without fear of not knowing how to accomplish basic tasks. More often than not, the pathways to a goal are similar, so they're easy to learn as long as you keep the basic concepts in mind.
See How different programming languages read and write data
#technology #programming #coding
In his article How different programming languages do the same thing, Jim Hall demonstrates how 13 different languages accomplish the same exact task with different syntax. The lesson is that programming languages tend to have many similarities, and once you know one programming language, you can learn another by figuring its syntax and structure.