A python library built on the API of the coderHub.sa, which helps you to fetch the challenges and more

Overview


coderHub.sa - img
coderHub

A python library built on the API of the coderHub.sa, which helps you to fetch the challenges and more

PyPI - Python Version PyPI License Code style: black

InstallationFeaturesUsageLicense

This project is a personal effort and CoderHub has nothing to do with the content of this project.

Installation

Use pypi to install coderHub.

pip3 install coderHub

Features

  • get all challenges or by difficulty
  • search for challenges
  • get challenge by id
  • get all languages info or by language name
  • get top 10 leaderboard by programming language
  • get user profile info
  • get user statistics info

Usage

get all challenges or by difficulty:

from coderHub import CoderHub

coder_hub = CoderHub()
# get all challenges
print(coder_hub.get_challenges())

#get by difficulty
print(coder_hub.get_challenges(difficulty="سهل"))
Example Result
{"count": 99, "result": [{...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}, ...]}


search for challenges:

from coderHub import CoderHub
coder_hub = CoderHub()

print(coder_hub.search_challenges(word="تاريخ"))
Example Result
{
    "count": 2,
    "result":
        [
            {
                "challenge_tags": [{"name": "Date"}, {"name": "String"}],
                "created_by": {"username": "CoderHub"},
                "id": "c93a5e09-2578-42ec-95db-88d1e87d6459",
                "points": 10,
                "title": "تاريخ اليوم",
                "type_of_level": {"name": "متوسط"}
                },
            {
                "challenge_tags": [{"name": "Date"}, {"name": "String"}],
                "created_by": {"username": "CoderHub"},
                "id": "a2df08ef-faa1-4aaf-bbd5-66f7e021855a",
                "points": 10,
                "title": "تعديل صيغة التاريخ",
                "type_of_level": {"name": "متوسط"}
                }
            ]
}


get challenge by id:

from coderHub import CoderHub

coder_hub = CoderHub()
print(coder_hub.get_challenge_by_id(challenge_id="3e420f85-f4e9-4e7a-b6bc-f35a8db70cb4"))
Example Result
{
    "id": "3e420f85-f4e9-4e7a-b6bc-f35a8db70cb4", 
    "title": "طرح عددين", 
    "description": "### وصف التحدي\r\nقم بكتابة `function` تستقبل عددين، العدد الأول يمثل رقماً صحيحاً `integer` والعدد الثاني يمثل أيضا رقماً صحيحاً `integer`, ثم قم بإرجاع حاصل **طرح** هذين العددين.\r\n\r\n### المخرجات المتوقعة\r\n| Output  | b  | a |\r\n|----|----|----|\r\n| 5 | 5  | 10 |\r\n| 6 | -3  | 3 |\r\n| -5 | 1 | -4 |\r\n| 1 | -1 | 0 |\r\n| 0 | 0 | 0 |\r\n| -92 | -4 | -96 |", 
    "points": 5
    // and more ...
}


get languages:

from coderHub import CoderHub

coder_hub = CoderHub()

# all languages
print(coder_hub.get_languages())

# language by name
print(coder_hub.get_languages(language="python"))
Example Result
// all languages
{
    "result": [
        {"id": 6, "name": "swift", "version": "swift 4.2.2"},
        {"id": 3, "name": "python", "version": "python 3.5.3"},
        {"id": 2, "name": "javascript", "version": "SMonkey 68.6.0"}, 
        {"id": 1, "name": "java", "version": "jdk 8u51"}, 
        {"id": 8, "name": "c#", "version": "Mono 4.0.2"}
    ]
}
// language by name

{"id": 3, "name": "python", "version": "python 3.5.3"}




get leaderboard:

from coderHub import CoderHub

coder_hub = CoderHub()

print(coder_hub.get_leaderBoard(language="Python", search_type="ALL"))
Example Result
{
    "leaderboard": [
        {
            "points": 835.0,
            "user_id": "b45cf6da-c2aa-4347-a3da-fbf951a4183b",
            "rank": 1, 
            "user_info": {"username": "hamoud47", "public": true}
        }, 
        {
            "points": 830.0, 
            "user_id": "5eb4d6ea-1f0e-4cb9-b365-44518ddf5667",
            "rank": 2,
            "user_info": {"username": "awiteb", "public": false}
        }
    // 8 more
    ]
}


get user profile:

from coderHub import CoderHub

coder_hub = CoderHub()

print(coder_hub.get_profile(username="x7md"))
Example Result
{
    "preferred_language": "JavaScript", 
    "user_information": {
        "id": "eab8c73c-9ae2-4595-a321-3de9faa72721", 
        "public_profile": true, 
        "first_name": "حمد", 
        "last_name": "بنقالي", 
        "username": "x7md", 
        "bio": "شاب سعودي، مهتم بالبرمجة، والتصميم الرقمي.", 
        "country_name": "المملكة العربية السعودية", 
        "city": "مكة المكرمة", 
        "social_links": [
            {"site": "GITHUB", "handle": "x7md"},
            {"site": "TWITTER", "handle": "anb9"}
            ],
        "education": [
            {
                "name": "highSchool", 
                "major": "", 
                "institution": "عكرمة بن عمرو", 
                "start_at": "2019-03-31T00:00:00+00:00", 
                "end_at": "2021-03-31T00:00:00+00:00"
                }
            ],
        "certificates": [
            {
                "name": "التوعية بمخاطر الأمن السيبراني", 
                "institution": "دروب - صندوق تنمية الموارد البشرية", 
                "received_at": "2020-04-23T00:00:00+00:00", 
                "expires_at": "2020-04-23T00:00:00+00:00", 
                "expired": false, 
                "is_training_certificate": false
                }
            ], 
        "programming_languages": [
            {"programming_language": "JavaScript", "experience": "1 - 2 سنوات"}, 
            {"programming_language": "Shell", "experience": "أقل من سنة"}, 
            {"programming_language": "SQL", "experience": "أقل من سنة"}
                ],
        "extra_public_fields": [
            "are_you_a_trainer", "looking_for_job_type", "occupation"
                ], 
        "is_looking_for_job": null, 
        "looking_for_job_type": "training", 
        "are_you_a_trainer": false,
        "occupation": "college student",
        "preferred_language": "JavaScript"
            },
    "user_badges": []
}


get user statistics:

from coderHub import CoderHub
coder_hub = CoderHub()

print(coder_hub.get_user_statistics(username="x7md"))
Example Result
{
    "programming_languages": [
        {"programming_language_name": "JavaScript", "name": "سهل", "solved_challenges": 59}, 
        {"programming_language_name": "JavaScript", "name": "صعب", "solved_challenges": 11}, 
        {"programming_language_name": "JavaScript", "name": "متوسط", "solved_challenges": 32}, 
        {"programming_language_name": "Java", "name": "سهل", "solved_challenges": 12}
            ], 
    "total_solved_per_programming_language": [
        {"programming_language_name": "Java", "total_solved": 12}, 
        {"programming_language_name": "JavaScript", "total_solved": 102}
            ], 
    "total_solved_challenges": 114
}


LICENSE

GPLv3

Owner
TheAwiteb
https://t.me/TheAwiteb
TheAwiteb
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ 𝗘𝗹𝗶𝘇𝗮 𝗠𝘂𝘀𝗶𝗰 ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 08, 2022
Discord.py Bot Series With Python

Discord.py Bot Series YouTube Playlist: https://www.youtube.com/playlist?list=PL9nZZVP3OGOAx2S75YdBkrIbVpiSL5oc5 Installation pip install -r requireme

Step 1 Dec 17, 2021
Sunflower-farmers-automated-bot - Sunflower Farmers NFT Game automated bot.IT IS NOT a cheat or hack bot

Sunflower-farmers-auto-bot Sunflower Farmers NFT Game automated bot.IT IS NOT a

Arthur Alves 17 Nov 09, 2022
Discord Token Generator of a project - Some stupids ppl are trying to leak it so i'm leaking faster :)

Original creator: Rolf (dort) HCaptcha Bypasser: h0nde Shark.Solar Discord Token Generator of a project - Some stupids ppl are trying to leak it so i'

Stanley 14 Sep 29, 2021
A python API wrapper for temp-mail.org

temp-mail Python API Wrapper for temp-mail.ru service. Temp-mail is a service which lets you use anonymous emails for free. You can view full API spec

Denis Veselov 91 Nov 19, 2022
Async ShareX uploader written in python

Async ShareX uploader written in python

Jacob 2 Jan 07, 2022
A Discord bot written in Python to help with guild administration

forgotten-hydra A Discord bot written in Python to help with guild administration. External libraries Pycord-Development/pycord 1.7.3 djc/couchdb-pyth

1 May 14, 2022
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

48.3k Jan 05, 2023
Cancel all your follow requests on Instagram.

Unrequester This python code unrequests all your follow requests on Instagram, using selenium. Everything's step-by-step and understanding it is like

ChamRun 3 Apr 09, 2022
BroBot's files, code and tester.

README - BroBOT Made by Rohan Chaturvedi [email protected] DISCLAIMER: Th

1 Jan 09, 2022
Opensea-upload-with-recaptcha-solution - Updated opensea uploading solution with recaptcha pass

opensea-upload-with-recaptcha-solution updated opensea uploading solution with r

byeonggeon sim 25 Nov 15, 2022
An example of using discordpy 2.0.0a to create a bot that supports slash commands

DpySlashBotExample An example of using discordpy 2.0.0a to create a bot that supports slash commands. This is not a fully complete bot, just an exampl

7 Oct 17, 2022
Open Resource Calculator Module for Python

Calculator Module for Python By White Night Install #

White_Night_awa 4 Aug 22, 2022
Contrastive Language-Audio Pretraining

CLAP Contrastive Language-Audio Pretraining In due time this repo will be full of lovely things, I hope. Feel free to check out the Issues if you're i

Charles Foster 83 Dec 01, 2022
Ulaavi for nuke, helps to keep our stocl elements organised.

Ulaavi Ulaavi for nuke, helps to keep our stock elements organised. Installation Downlaod ffmpeg from ffmpeg.org linux : https://johnvansickle.com/ffm

Arun Subramaniyam 17 Aug 24, 2022
First Party data integration solution built for marketing teams to enable audience and conversion onboarding into Google Marketing products (Google Ads, Campaign Manager, Google Analytics).

Megalista Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analy

Google 76 Dec 29, 2022
A Telegram Bot which notifies the user when a vaccine is available on CoWin Platform.

Cowin Vaccine Availability Notifier Telegram Bot A bot that notifies the available vaccines at given district in realtime. Introduction • Requirements

Arham Shah 7 Jul 31, 2021
Astro Bot With Golang

Astro-Bot Features: Astronomy Picture of the day Horoscope People In Space How we built it Our team was broken, one person didn't do anything the othe

Vaarun Sinha 1 Nov 21, 2021
Twitter-bot - A Simple Twitter bot with python

twitterbot To use this bot, You will require API Key and Access Key. Signup at h

Bentil Shadrack 8 Nov 18, 2022
Python wrapper for Interactive Brokers Client Portal Web API

EasyIB: Unofficial Wrapper for Interactive Brokers API EasyIB is an unofficial python wrapper for Interactive Brokers Client Portal Web API. Features

39 Dec 13, 2022