Data Science Jupyter Notebooks
11K subscribers
269 photos
31 videos
9 files
726 links
Explore the world of Data Science through Jupyter Notebooksβ€”insights, tutorials, and tools to boost your data journey. Code, analyze, and visualize smarter with every post.
Download Telegram
πŸ”₯ Trending Repository: embedding-atlas

πŸ“ Description: Embedding Atlas is a tool that provides interactive visualizations for large embeddings. It allows you to visualize, cross-filter, and search embeddings and metadata.

πŸ”— Repository URL: https://github.com/apple/embedding-atlas

🌐 Website: https://apple.github.io/embedding-atlas/

πŸ“– Readme: https://github.com/apple/embedding-atlas#readme

πŸ“Š Statistics:
🌟 Stars: 3.5K stars
πŸ‘€ Watchers: 31
🍴 Forks: 167 forks

πŸ’» Programming Languages: TypeScript - Svelte - Python - Rust - JavaScript - C++

🏷️ Related Topics:
#visualization #embedding


==================================
🧠 By: https://t.iss.one/DataScienceM
πŸ”₯ Trending Repository: meshery

πŸ“ Description: Meshery, the cloud native manager

πŸ”— Repository URL: https://github.com/meshery/meshery

🌐 Website: https://meshery.io

πŸ“– Readme: https://github.com/meshery/meshery#readme

πŸ“Š Statistics:
🌟 Stars: 7.9K stars
πŸ‘€ Watchers: 56
🍴 Forks: 2.6K forks

πŸ’» Programming Languages: JavaScript - Go - Open Policy Agent - Shell - Makefile - CSS

🏷️ Related Topics:
#visualization #docker #kubernetes #golang #reactjs #cncf #webassembly #wasm #opa #infrastructure_as_code #cloud_native #gsoc #kubernetes_operator #control_plane #hacktoberfest #gitops #platform_engineering #meshery #management_plane #internal_developer_platform


==================================
🧠 By: https://t.iss.one/DataScienceM
πŸ”₯ Trending Repository: jsoncrack.com

πŸ“ Description: ✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML, CSV and more, into interactive graphs.

πŸ”— Repository URL: https://github.com/AykutSarac/jsoncrack.com

🌐 Website: https://jsoncrack.com/

πŸ“– Readme: https://github.com/AykutSarac/jsoncrack.com#readme

πŸ“Š Statistics:
🌟 Stars: 41.7K stars
πŸ‘€ Watchers: 225
🍴 Forks: 3K forks

πŸ’» Programming Languages: TypeScript - JavaScript - Dockerfile

🏷️ Related Topics:
#react #visualization #yaml #json #csv #graph #tool #nextjs #diagrams


==================================
🧠 By: https://t.iss.one/DataScienceM
πŸ”₯ Trending Repository: thingsboard

πŸ“ Description: Open-source IoT Platform - Device management, data collection, processing and visualization.

πŸ”— Repository URL: https://github.com/thingsboard/thingsboard

🌐 Website: https://thingsboard.io

πŸ“– Readme: https://github.com/thingsboard/thingsboard#readme

πŸ“Š Statistics:
🌟 Stars: 19.8K stars
πŸ‘€ Watchers: 576
🍴 Forks: 5.8K forks

πŸ’» Programming Languages: Java - TypeScript - HTML - SCSS - JavaScript - Shell

🏷️ Related Topics:
#visualization #java #platform #mqtt #iot #coap #middleware #cloud #microservices #kafka #dashboard #netty #snmp #websockets #widgets #iot_platform #lwm2m #thingsboard #iot_analytics #iot_solutions


==================================
🧠 By: https://t.iss.one/DataScienceM
❀1
# Counters for male and female
male_count = 0
female_count = 0

# A copy of the original image for drawing results
output_img = img.copy()

# Loop through each person's bounding box
for (x1, y1, x2, y2) in person_boxes:
# Crop the person from the image
person_crop = img[y1:y2, x1:x2]

label = "Unknown"

try:
# Apply gender detection on the person crop
# padding is used to better detect faces at the edge of the crop
face, confidence = cv.detect_face(person_crop, threshold=0.5)

# We process only if one face is detected to avoid ambiguity
if len(face) > 0:
# Get the first face detected
(startX, startY, endX, endY) = face[0]
face_crop = np.copy(person_crop[startY:endY, startX:endX])

# Predict gender of the detected face
(gender_label, gender_confidence) = cv.detect_gender(face_crop)

if gender_confidence > 0.6: # Confidence threshold
label = gender_label
if label == 'male':
male_count += 1
elif label == 'female':
female_count += 1

except Exception as e:
# Sometimes cvlib can fail on small or unclear crops
label = "Error"

# Draw bounding box and label on the output image
color = (0, 255, 0) if label in ["male", "female"] else (0, 0, 255)
cv2.rectangle(output_img, (x1, y1), (x2, y2), color, 2)
cv2.putText(output_img, label, (x1, y1 - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2)

print(f"Males detected: {male_count}")
print(f"Females detected: {female_count}")


---

Step 5: Displaying Final Results

Finally, we calculate the percentages and display the annotated image along with a summary of our findings.

#Results #Visualization

# Calculate percentages
known_gender_count = male_count + female_count
if known_gender_count > 0:
male_percentage = (male_count / known_gender_count) * 100
female_percentage = (female_count / known_gender_count) * 100
else:
male_percentage = 0
female_percentage = 0

# Prepare the summary text
summary_text1 = f"Total People: {total_people}"
summary_text2 = f"Men: {male_count} ({male_percentage:.1f}%)"
summary_text3 = f"Women: {female_count} ({female_percentage:.1f}%)"

# Add summary text to the image
cv2.putText(output_img, summary_text1, (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255,255,255), 3)
cv2.putText(output_img, summary_text2, (10, 60), cv2.FONT_HERSHEY_SIMPLEX, 1, (255,255,255), 3)
cv2.putText(output_img, summary_text3, (10, 90), cv2.FONT_HERSHEY_SIMPLEX, 1, (255,255,255), 3)

# Save or display the final image
cv2.imwrite('crowd_analysis_result.jpg', output_img)
print("\n--- Analysis Complete ---")
print(summary_text1)
print(summary_text2)
print(summary_text3)
print("Result image saved as 'crowd_analysis_result.jpg'")


---

Step 6: Discussion of Results and Limitations

#Discussion #Ethics #AI