Blog

  • GrayBlue

    GrayBlue

    This is M5Stack Gray firmware to notify 9DOF motion sensor(MPU-9250) data by Bluetooth Low Enagy.

    Therefore .

    Demo

    Applied the notified quaternion to the virtual object with Unity.

    Description

    IMU

    MPU-9250 provide these data.

    • acceleration (xyz) [mg]
    • gyro (xyz) [deg/s]
    • magnetic force (xyz) [mG]
    • quaternion (wxyz) []

    Quaternion is calculated from acc and gyro by DMP of MPU-9250. These 13(3+3+3+4) data are notified by BLE.

    Front 3 buttons

    Press or release 3 buttons on front is also notified by BLE.

    BLE

    Above data are notified by BLE Gatt.

    9-DOF data profile

    • Service UUID: c87ace96-3523-11e9-b210-d663bd873d93
    • Characteristics
      • UUID: c87ad148-3523-11e9-b210-d663bd873d93
      • type: 52 byte binary array. (13 float value)
      • format:
        • accX [0:3]
        • accY [4:7]
        • accZ [8:11]
        • gyroX [12:15]
        • gyroY [16:19]
        • gyroZ [20:23]
        • magX [24:27]
        • magY [28:31]
        • magZ [32:35]
        • quatW [36:39]
        • quatX [40:43]
        • quatY [44:47]
        • quatZ [48:51]

    Button event profile

    • Service UUID: de4c3b20-26ea-11e9-ab14-d663bd873d93
    • Characteristics
      • UUID: de4c4016-26ea-11e9-ab14-d663bd873d93
      • type: 4 byte value
      • format:
        • isPressed [0] (pressed=1/release=0)
        • buttonType [1] (left='A'/center='B'/right='C')
        • pressTime [2:3] (milliSeconds. On button press, value=0.)

    Install

    This project use PlatformIO.

    If you try to build and write to your M5Stack Gray, you need to install PlatformIO environment on your PC.

    Library

    Licence

    MIT

    Author

    @naninunenoy

    Visit original content creator repository https://github.com/naninunenoy/GrayBlue
  • GrayBlue

    GrayBlue

    This is M5Stack Gray firmware to notify 9DOF motion sensor(MPU-9250) data by Bluetooth Low Enagy.

    Therefore .

    Demo

    Applied the notified quaternion to the virtual object with Unity.

    Description

    IMU

    MPU-9250 provide these data.

    • acceleration (xyz) [mg]
    • gyro (xyz) [deg/s]
    • magnetic force (xyz) [mG]
    • quaternion (wxyz) []

    Quaternion is calculated from acc and gyro by DMP of MPU-9250. These 13(3+3+3+4) data are notified by BLE.

    Front 3 buttons

    Press or release 3 buttons on front is also notified by BLE.

    BLE

    Above data are notified by BLE Gatt.

    9-DOF data profile

    • Service UUID: c87ace96-3523-11e9-b210-d663bd873d93
    • Characteristics
      • UUID: c87ad148-3523-11e9-b210-d663bd873d93
      • type: 52 byte binary array. (13 float value)
      • format:
        • accX [0:3]
        • accY [4:7]
        • accZ [8:11]
        • gyroX [12:15]
        • gyroY [16:19]
        • gyroZ [20:23]
        • magX [24:27]
        • magY [28:31]
        • magZ [32:35]
        • quatW [36:39]
        • quatX [40:43]
        • quatY [44:47]
        • quatZ [48:51]

    Button event profile

    • Service UUID: de4c3b20-26ea-11e9-ab14-d663bd873d93
    • Characteristics
      • UUID: de4c4016-26ea-11e9-ab14-d663bd873d93
      • type: 4 byte value
      • format:
        • isPressed [0] (pressed=1/release=0)
        • buttonType [1] (left='A'/center='B'/right='C')
        • pressTime [2:3] (milliSeconds. On button press, value=0.)

    Install

    This project use PlatformIO.

    If you try to build and write to your M5Stack Gray, you need to install PlatformIO environment on your PC.

    Library

    Licence

    MIT

    Author

    @naninunenoy

    Visit original content creator repository https://github.com/naninunenoy/GrayBlue
  • beaker

    Beaker

    Beaker is a smart contract development framework for PyTeal.

     

     

     

    Hello, Beaker

    from pyteal import *
    from beaker import *
    
    
    hello_app = Application("HelloBeaker")
    
    
    @hello_app.external
    def hello(name: abi.String, *, output: abi.String) -> Expr:
        # Set output to the result of `Hello, `+name
        return output.set(Concat(Bytes("Hello, "), name.get()))
    
    
    # Create an Application client
    app_client = client.ApplicationClient(
        # Get sandbox algod client
        client=sandbox.get_algod_client(),
        # Pass instance of app to client
        app=hello_app,
        # Get acct from sandbox and pass the signer
        signer=sandbox.get_accounts().pop().signer,
    )
    
    # Deploy the app on-chain
    app_id, app_addr, txid = app_client.create()
    print(
        f"""Deployed app in txid {txid}
        App ID: {app_id}
        Address: {app_addr}
    """
    )
    
    # Call the `hello` method
    result = app_client.call(hello, name="Beaker")
    print(result.return_value)  # "Hello, Beaker"

    Install

    Beaker requires Python >= 3.10
    

    You can install from pip:

    pip install beaker-pyteal

    Or from github directly (no promises on stability):

    pip install git+https://github.com/algorand-devrel/beaker

    Dev Environment

    Requires a local network running to compile and test contracts.

    Install AlgoKit

    and start it

    $ algokit localnet start
    $ algokit localnet status

    Front End

    See Beaker TS to generate a front end client for a Beaker App.

    Testing

    You can run tests from the root of the project using pytest

    Use

    Examples

    Docs

    Please report bugs and get any contracts audited

    We recommend that any production smart contracts be audited by a professional before deployment. Beaker has been thoroughly tested, but we cannot guarantee that it is entirely free of bugs.

    Visit original content creator repository https://github.com/algorandfoundation/beaker
  • discord-bot

    Discord Bot

    Discord Python MySQL Docker

    Simple discord bot that can give you quotes and handle your todo tasks

    Technologies Used

    Features

    • Connects to a Discord Server
    • Can give nice quotes
    • Manage your To-Do tasks (CRUD):
      • Create a task
      • Read a task
      • Update a task
      • Delete a task
    • Runs on Docker for easier execution

    Screenshots

    hello

    quote

    view-empty

    add

    select

    update

    view

    delete

    clear

    Setup

    To run this project, here are the requirements:

    • Docker
    • Python (3.9)
    • MySQL
    • Discord Bot setup (You can follow this guide)

    To play around with the code please use PyCharm to open this project.

    Usage

    Docker

    To run this project, you can use docker!

    First off, create a .env file (use the .env.example for reference)

    Next, simply use this command to run the application:

    docker-compose up

    You will then see something similar to this:

    ...
    discord-bot |                       INFO     connecting to database discord on        db.py:10
    discord-bot |                                mysql:3306 as user root
    discord-bot |                       INFO     creating table todo                      db.py:21
    discord-bot | [2022-11-12 08:46:08] [INFO    ] discord.client: logging in using static token
    discord-bot |                       INFO     logging in using static token       client.py:571
    discord-bot | [2022-11-12 08:46:11] [INFO    ] discord.gateway: Shard ID None has connected to Gateway (Session ID: ---).
    discord-bot | [2022/11/12 08:46;11] INFO     Shard ID None has connected to     gateway.py:560
    discord-bot |                                Gateway (Session ID:
    discord-bot |                                ----).
    discord-bot | [2022/11/12 08:46;13] INFO     We have logged in as mhasan01-bot#--- main.py:15

    PyCharm

    To run it locally, you can also use PyCharm.

    Make sure you make the .env first and configure the DB correctly.

    • To run the application, you can execute the main.py (there should be a green indicator to execute it)
    • To run the tests, you can click right on the folder tests and run the tests.

    Room for Improvement

    Room for improvement:

    • Add more functionality.
    • More OOP classes could be implemented in the object.
    • Add CI / CD for build / lint / test pipeline.
    • Handle errors more gracefully

    Acknowledgements

    • FreeCodeCamp
    • Various codes on the internet
    • StackOverflow answers

    Contact

    Created by mhasan01 – feel free to contact me!

    Visit original content creator repository https://github.com/muhammadhasan01/discord-bot
  • plug_image_processing


    Image server as a Plug, powered by libvips.

    Usage

    Installation

    PlugImageProcessing is published on Hex. Add it to your list of dependencies in mix.exs:

    # mix.exs
    def deps do
      [
        {:plug_image_processing, ">= 0.0.1"}
      ]
    end

    Then run mix deps.get to install the package and its dependencies.

    To expose a /imageproxy route, add the plug in your endpoint, before your router plug, but after Plug.Parsers:

    # lib/my_app_web/endpoint.ex
    plug(PlugImageProcessing.Web, path: "/imageproxy")
    #...
    plug(MyAppWeb.Router)

    Features

    Sources

    A single source for image is supported for now: the url query parameter.

    /imageproxy/resize?url=https://s3.ca-central-1.amazonaws.com/my_image.jpg&width=300

    It will download the image from the remote location, modify it using libvips and return it to the client.

    Operations

    A number of operations exposed by libvips are supported by PlugImageProcessing. See the PlugImageProcessing.Operations.* module for more details.

    Requests validations

    Validations can be added so your endpoint is more secure.

    Signature key

    By adding a signature key in your config, a parameter sign needs to be included in the URL to validate the payload. The signature prevent a client to forge a large number of unique requests that would go through the CDN and hitting our server.

    plug(PlugImageProcessing.Web, url_signature_key: "1234")

    Then a request path like:

    /imageproxy/resize?url=https://s3.ca-central-1.amazonaws.com/my_image.jpg&width=300&quality=60

    will fail because the sign parameter is not present.

    The HMAC-SHA256 hash is created by taking the URL path (excluding the leading /), the request parameters (alphabetically-sorted and concatenated with & into a string). The hash is then base64url-encoded.

    Base.url_encode64(:crypto.mac(:hmac, :sha256, "1234", "resize" <> "quality=60&url=https://s3.ca-central-1.amazonaws.com/my_image.jpg&width=300"))
    # => "ku5SCH56vrsqEr-_VRDOFJHqa6AXslh3fpAelPAPoeI="

    Now this request will succeed!

    /imageproxy/resize?url=https://s3.ca-central-1.amazonaws.com/my_image.jpg&width=300&quality=60&sign=ku5SCH56vrsqEr-_VRDOFJHqa6AXslh3fpAelPAPoeI=

    License

    PlugImageProcessing is © 2022 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

    About Mirego

    Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

    We also love open-source software and we try to give back to the community as much as we can.

    Visit original content creator repository https://github.com/mirego/plug_image_processing
  • what-to-watch

    What to watch

    PHP Version MySQL Version Laravel Version PHPUnit Version

    О проекте

    «What to watch» — это проект на Laravel, который представляет собой REST-API для веб-приложения онлайн-кинотеатра. В рамках этого проекта большой акцент делался на автоматизированном тестировании (помимо работы с API) и подходе TDD. Всего было написано 63 автотеста.

    Демонстрационная версия доступна по адресу https://whattowatch.sokoloff-rv.ru/, БД заполнена сидированными данными.

    Начало работы

    Чтобы развернуть проект локально или на хостинге, выполните последовательно несколько действий:

    1. Клонируйте репозиторий:
    git clone https://github.com/sokoloff-rv/what-to-watch.git whattowatch
    1. Перейдите в директорию проекта:
    cd whattowatch
    1. Установите зависимости, выполнив команду:
    composer install
    1. Затем создайте файл .env:
    cp .env.example .env

    И пропишите в нем настройки, соответствующие вашему окружению.

    1. После этого сгенерируйте ключ приложения:
    php artisan key:generate
    1. Запустите миграции:
    php artisan migrate
    1. Заполните БД сидированными данными (по желанию):
    php artisan db:seed
    1. Для запуска тестов используйте команду:
    php artisan test

    Для корректного выполнения тестов необходимо предварительно настроить подключение к тестовой базе данных в файле phpunit.xml. Пример конфигурации:

    <env name="DB_HOST" value="localhost"/>
    <env name="DB_PORT" value="3306"/>
    <env name="DB_DATABASE" value="testdatabase"/>
    <env name="DB_USERNAME" value="root"/>
    <env name="DB_PASSWORD" value="password"/>

    Аскинема с демонстрацией успешного прохождения тестов

    asciicast

    Описание API-методов

    Регистрация пользователя POST /api/register

    Пользователь заполняет форму регистрации указав Имя, email, пароль и подтверждение пароля.

    Дополнительно может быть загружен аватар.

    Последовательность действий:

    • Отправка post запроса с данными пользователя на endpoint регистрации.
    • Валидация полученных полей. Проверка наличия обязательных полей и соответствия заданным правилам.
    • Проверка, что указанный email не занят.
    • Сохранение данных в БД, или возвращение списка ошибок при их наличии.
    • Сохранение аватара в публичное хранилище и указание ссылки на файл в таблице пользователей.
    • Возвращение токена для аутентификации пользователя под зарегистрированной учетной записью.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    email email true уникальное mailto:email@example.com
    password string true min: 8 12345678
    name string true max: 255 John Doe
    file file false image, max: 10M

    Аутентификация POST /api/login

    Правила валидации:

    Пользователь заполняет форму авторизации, указав email и пароль.

    • Отправка post запроса с данными пользователя на endpoint авторизации.
    • Валидация полученных полей. Проверка наличия обязательных полей и соответствия заданным правилам.
    • Возвращение токена для аутентификации пользователя.

    Правила валидации:

    Поле Тип Обязательное Пример
    email email true mailto:email@example.com
    password string true 12345678

    Метод возвращает токен аутентификации.

    Получение профиля пользователя GET /api/user

    Метод возвращает информацию о пользователе: имя, email, аватар и роль пользователя.

    Метод доступен только аутентифицированному пользователю.

    Обновление профиля пользователя PATCH /api/user

    С помощью данного метод пользователь может изменить свое имя, email, пароль или загрузить аватар.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    email email true уникальное mailto:email@example.com
    password string false min: 8 12345678
    name string true max: 255 John Doe
    file file false image, max: 10M

    Метод доступен только аутентифицированному пользователю.

    Выход (logout) POST /api/logout

    Отправка post запроса на endpoint выхода пользователя.

    Уничтожение токена пользовательской аутентификации.

    Получение списка фильмов GET /api/films

    Страница представляет собой список по 8 фильмов с пагинацией.

    Информация о фильме содержит название, превью обложки (изображение для отображения в списке), превью видео (ссылка на превью) и другую дополнительную информацию для построения пагинации.

    Есть возможность отсортировать список по дате выхода и рейтингу фильма.

    По умолчанию фильмы сортируются по дате выхода, от новых к старым (desc).

    Этот же endpoint может использоваться для получения списка фильмов по жанру.

    • Отправка get запроса на endpoint получения списка фильмов
    • Возвращение первых 8 фильмов, если не передано другое условие (параметр page)
      • Вместе со списком сериалов возвращаются параметры пагинации: количество элементов всего ссылка на первую страницу, на последнюю, на предыдущую и следующую

    Дополнительно вместе с запросом могут быть переданы следующие параметры:

    • page — номер страницы, для пагинации
    • genre — фильтрация по жанру
    • status — фильтрация по статусу, по умолчанию значение ready, пользователь с ролью модератор может изменить значение на (pendingmoderate)
    • order_by — правило сортировки. Возможные значения: released, rating
    • order_to — направление сортировки. Возможные значения: asc, desc

    Получение информации о фильме GET /api/films/{id}

    При получении информации о фильме с идентификатором id пользователь видит следующую информацию:

    • Большой постер
    • Превью (маленькое изображение)
    • Обложка фильма
    • Цвет фона для карточки фильма
    • Название фильма
    • Жанры
    • Год выхода на экраны
    • Описание
    • Режиссёр
    • Список актёров
    • Продолжительность фильма
    • Ссылка на видео
    • Ссылка на превью видео
    • Рейтинг фильма, в виде числа, к-во голосов

    Если запрос выполняет авторизованный пользователь — в дополнение к другим данным, возвращается статус наличия фильма в избранном.

    В случае попытки обращения к несуществующему фильму, ожидается возврат 404 ошибки.

    Получение списка жанров GET /api/genres

    Технический endpoint. Для формирования списка жанров в форме поиска или каталоге.

    Редактирование жанра PATCH /api/genres/{genre}

    Метод доступен только аутентифицированному пользователю с ролью модератор.

    Получение списка фильмов добавленных пользователем в избранное GET /api/favorite

    Метод возвращает список фильмов, добавленных пользователем в избранное (список «К просмотру»).

    Формат и информация возвращаемая в этом списке аналогична методу для получения списка фильмов.

    Фильмы возвращаются в порядке добавления пользователем в список, от новых к старым.

    Метод доступен только аутентифицированному пользователю.

    Добавление фильма в избранное POST /api/films/{id}/favorite/

    Метод принимает на вход id добавляемого фильма.

    В случае попытки добавления несуществующего фильма, ожидается возврат 404 ошибки.

    В случае попытки добавления в избранное фильма который уже присутствует в списке пользователя — ошибка 422, с соответствующим сообщением (message).

    Метод доступен только аутентифицированному пользователю.

    Удаление фильма из избранного DELETE /api/films/{id}/favorite/

    Метод принимает на вход id удаляемого фильма.

    В случае попытки удаления несуществующего фильма, ожидается возврат 404 ошибки.

    В случае попытки удаления фильма, который отсутствует в списке пользователя, — ошибка 422, с соответствующим сообщением (message).

    Метод доступен только аутентифицированному пользователю.

    Получение списка похожих фильмов GET /api/films/{id}/similar

    Отправляя на роут получения похожих фильмов с указанием id фильма для которого запрашиваются похожие, метод возвращает список из 4 подходящих фильмов.

    Похожесть определяется принадлежностью к тем же жанрам, что и исходный фильм (любым из имеющихся).

    Формат и информация возвращаемая в этом списке аналогична методу для получения списка фильмов.

    Получение списка отзывов к фильму GET /api/comments/{id}

    Метод принимает на вход id фильма, в случае отсутствия такового — возвращается 404 ошибка.

    Возвращает список отзывов. Каждый отзыв содержит: текст отзыва, имя автора, дату написания отзыва. Также может содержать оценку.

    Отзывы, загруженные из внешнего источника, возвращаются в общем списке с именем автора «Гость» Отзывы отсортированы от наиболее новых к старым (desc).

    Добавление отзыва к фильму POST /api/comments/{id}

    В качестве параметра в адресе указывается id фильма к которому добавляется комментарий.

    Комментарий может быть добавлен отдельно, так и в ответ на другой, в этом случае в теле запроса указывается и comment_id.

    Добавление отзыва сопровождается выставлением оценки.

    Метод доступен только аутентифицированному пользователю.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    text string true min: 50, max: 400 Discerning travellers and Wes Anderson fans will luxuriate in the glorious Mittel-European kitsch of one of the director’s funniest and most exquisitely designed movies in years.
    rating int true min: 1, max: 10 8
    comment_id int false exists 1

    Редактирование комментария PATCH /api/comments/{comment}

    Метод доступен только аутентифицированному пользователю.

    Пользователь может отредактировать свой комментарий.

    Модератор может отредактировать любой комментарий.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    text string true min: 50, max: 400 Discerning travellers and Wes Anderson fans will luxuriate…
    rating int false min: 1, max: 10 3

    Удаление комментария DELETE /api/comments/{comment}

    Метод доступен только аутентифицированному пользователю.

    Пользователь может удалить свой комментарий, при условии, что комментарий не содержит ответов.

    Модератор может удалить любой комментарий.

    При удалении комментария, имеющего ответы, удаляются все его потомки.

    Получение промо-фильма GET /api/promo

    Метод, возвращающий фильм, являющийся продвигаемым на данный момент (promo).

    Формат и информация возвращаемая в этом списке аналогична методу для получения информации о фильме.

    Установка промо-фильма POST /api/promo/{id}

    Метод доступен только аутентифицированному пользователю с ролью модератор.

    При отсутствии запрошенного в роуте фильма в базе, на запрос возвращается 404 ошибка.

    Добавление фильма в базу POST /api/films

    Модератор указывает в форме идентификатор фильма с сайта imdb вида tt0111161.

    Создается фоновая задача, которая запрашивает данные о фильме из внешнего источника, и обновляет информацию о фильме в базе.

    В момент создания заявки, фильм сохраняется только с imdb_id и статусом «в ожидании» (pending).

    После загрузки данных, статус меняется на «на модерации» (moderate). Модератор может получить список фильмов с этим статусом, отредактировать его, заполнить недостающие поля, указать ссылки на видео и прочее, после чего поставить статус «готов» (ready) — после чего фильм будет доступен пользователям.

    Для получения информации о фильме можно использовать сервис http://www.omdbapi.com (или api htmlacademy)

    Метод доступен только аутентифицированному пользователю с ролью модератор.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    imdb_id string true уникальное, проверка формата ttXXX tt0944947

    При заполнении поля imdb_id и наличии фильма с таким id в базе — возвращается ошибка валидации 422.

    При сохранении проверяем наличие связанных жанров и создаем при отсутствии.

    Редактирование фильма PATCH /api/films/{id}

    Модератор может изменить информацию о фильме или заполнить недостающие данные после добавления фильма.

    Метод доступен только аутентифицированному пользователю с ролью модератор.

    Правила валидации:

    Поле Тип Обязательное Правила Пример
    name string true max: 255 The Grand Budapest Hotel
    poster_image string false max: 255 img/the-grand-budapest-hotel-poster.jpg
    preview_image string false max: 255 img/the-grand-budapest-hotel.jpg
    background_image string false max: 255 img/the-grand-budapest-hotel-bg.jpg
    background_color string false max: 9 #ffffff
    video_link string false max: 255 https://some-link/
    preview_video_link string false max: 255 https://some-link/
    description string false max: 1000 In the 1930s, the Grand Budapest Hotel is a popular European ski resort, presided over by concierge Gustave H. (Ralph Fiennes). Zero, a junior lobby boy, becomes Gustave’s friend and protege.
    director string false max: 255 Wes Anderson
    starring array false [«Bill Murray», «Edward Norton», «Jude Law», «Willem Dafoe», «Saoirse Ronan»]
    genre array false [«Comedy»]
    run_time int false 99
    released int false 2014
    imdb_id string true уникальное, проверка формата ttXXX tt0944947
    status string true статус из списка: pending, on moderation, ready ready

    При отсутствии запрошенного в роуте фильма в базе, возвращается 404 ошибка.

    Техническое задание

    Посмотреть техническое задание проекта

    Visit original content creator repository https://github.com/sokoloff-rv/what-to-watch
  • financial-tracker

    Forks Stargazers Issues MIT License LinkedIn


    Logo

    Financial Tracker Application

    An awesome financial tracker application based on website
    Explore the docs »
    View Demo · Report Bug · Request Feature

    Table of Contents
    1. About The Project
    2. Getting Started
    3. Contributing
    4. License
    5. Contact
    6. Acknowledgments

    About The Project

    Financial Tracker Application is a web application that allows their user to keep track of their income and expense. To use this application, user just need to register to the application, then login to add an income or expense that they got. After that, the system will automatically calculate their balance and display a line chart that visualize the transaction per month. User can also generate the transaction history into PDF format with this application.

    back to top

    Built With

    Main technology used to built this application are listed below:

    back to top

    Getting Started

    To get started with this project locally, follow below steps:

    Prerequisites

    Make sure you have package manager (either npm or yarn), and also PostgreSQL on your machine.

    FYI: This project uses yarn as package manager, but you’re free to use npm too.

    • Install Yarn (Only for user who want to use yarn)
      npm i -g yarn
      
    • Have PostgreSQL installed on your machine

    Installation

    Below steps will guide you through the local installation process of this application

    1. Get your Google Client ID, Google Client Secret, and also GMail Refresh Token from here
    2. Get your facebook app ID at here
    3. Clone the repo
      git clone https://github.com/stanleyclaudius/financial-tracker.git
      
    4. Install project dependency
      Make sure that your terminal pointing at the root directory of this project (financial-tracker folder).
      yarn install && cd client && yarn install
      
    5. Complete the .env variable
      Rename .env.example file at server/config directory become .env, then fill the value for every key. Below is the guideline for filling the .env value:
      Key What To Fill Example Value
      PORT Your server port 5000
      CLIENT_URL Your client side URL http://localhost:3000
      DB_USER Your PostgreSQL username postgres
      DB_PASS Your PostgreSQL password root
      DB_NAME Your database name fintrack
      DB_HOST Your PostgreSQL host localhost
      DB_PORT Your PostgreSQL port 5432
      DB_ENV Your database environment development
      ACCESS_TOKEN_SECRET Random complex string for JWT DUhxdx183)_–aACN#2%
      REFRESH_TOKEN_SECRET Random complex string for JWT 17hdjcD7ud(-*&732~
      ACTIVATION_TOKEN_SECRET Random complex string for JWT kc81i^&%`-Did##1Z
      GOOGLE_CLIENT_ID Your google client ID 3392348929324-tarur228dxxx
      GOOGLE_CLIENT_SECRET Your google client secret GOCSPX-xxxxxxx
      GMAIL_REFRESH_TOKEN Your gmail refresh token 1//028dhdjBMudu2829xxx
      MAIL_SENDER_ADDRESS Email that want to be used to send mail example@gmail.com
    6. Complete the constant.ts value
      Rename constant.example.ts file at client/src/utils directory become constant.ts, then fill the value for every constant. Below is the guideline for filling the constant.ts value:
      Key What To Fill Example Value
      GOOGLE_CLIENT_ID Your google client ID 3392348929324-tarur228dxxx
      FACEBOOK_APP_ID Your facebook app ID 18239943847394
    7. Create a database with name corresponding to your DB_ENV value at .env file
    8. Run below command at your terminal that pointing to the root directory of this project
      yarn knex migrate:latest --migrations-directory server/migrations
      
    9. Lastly, run below command at your terminal to spin off the application
      yarn run dev && cd client && yarn start
      

    back to top

    Contributing

    If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag “enhancement”. Don’t forget to give the project a star! Thanks again!

    1. Fork the Project
    2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
    3. Commit your Changes (git commit -m 'Add some AmazingFeature')
    4. Push to the Branch (git push origin feature/AmazingFeature)
    5. Open a Pull Request

    back to top

    License

    Distributed under the MIT License. See LICENSE.txt for more information.

    back to top

    Contact

    LinkedIn: Stanley Claudius

    Project Link: https://github.com/stanleyclaudius/financial-tracker

    back to top

    Acknowledgments

    Special thanks to:

    • Othneildrew for providing an amazing README template.
    • React Icons for providing icon to be used in this application.
    • Tailwind CSS for providing CSS framework to be used in this application.
    • Heroku for providing hosting service for this application.

    back to top

    Visit original content creator repository https://github.com/stanleyclaudius/financial-tracker
  • filmoteka-team10

    Проект веб-сервісу “Filmoteka”🎥

    Вітаємо! 🤗

    Ми студенти GоIT 🔥 🚀 групи GoIT Group 68 | Team 10 під назвою “Кіномани”🎥🤝

    Ми реалізували навчальний командний проект💻 для того, щоб закріпити на практиці 📌 отримані на курсі знання з JavaScript, HTML/CSS, SASS

    Над проектом працювали:

    👨‍🎓Team Lead: Вакуленко https://github.com/HannaVakulenko
    👨‍🎓Scrum master & Front-end developer: Дмитро Смірнов https://github.com/Lucky13identify
    👨‍🎓Front-end developer: Денис Завірюха https://github.com/DenisZaviriukha
    👨‍🎓Front-end developer: Галина Тижбір https://github.com/HalynaTyzhbir
    👨‍🎓Front-end developerr: Анна Долбіна https://github.com/Dolbina
    👨‍🎓Front-end developer: Даша Нікула https://github.com/alkinuradia
    👨‍🎓Front-end developer: Олександр Ковшар https://github.com/Aleksandr-Kovshar
    👨‍🎓Front-end developer: Павло Скрипнюк https://github.com/Skripnuyk
    👨‍🎓Front-end developer: Анна Ємельянова https://github.com/AnnaIemelianova
    👨‍🎓Front-end developer: Василь Риботицький https://github.com/VasylRybotytskyi
    👨‍🎓Front-end developer: Ксенія Фігас https://github.com/KseniaFihas
    👨‍🎓Front-end developer: Михаїл Клебан https://github.com/DarkSwarp/

    Дизайнери 🎨 підготували для нас макет командного проекту в 3 версіях: мобільна📱, планшетна📟, десктопна💻.

    GoIT підготувала ТЗ 📖

    🏁 Наші завдання :

    розробити сайт з пошуку популярних фільмів;
    організувати бібліотеку користувача, де будуть зберігатися улюблені та переглянуті фільми;
    організувати для користувача можливість видалення фільмів з бібліотеки;
    розробити карточку фільму з детальним описом;
    реалізувати перегляд трейлерів фільму за бажанням користувача;
    розробити авторизацію користувача на сайті;
    розробити пагінацію.

    🔨 Під час виконання проекту ми:

    закріпили знання з HTML і CSS/SASS;
    закріпили знання з JavaScript;
    працювали з Parcel;
    практикували навички командной работи з Git;
    використовували методологію Scrum;
    працювали з анімацією;
    використовували Firebase для авторизації користувачів і зберігання інформації.
    В результаті злагодженої роботи 🤝 ми отримали наш проект: ⬇ Переглянути проект ⬇

    EN————————————————————————————————————————–EN

    WEB servise “Filmoteka”

    Hi! 🤗

    We are students of group named “Team-10” of GоIT academy 🔥 🚀

    📌 🤝 💻

    Project created by:

    👨‍🎓Team Lead:
    👨‍🎓Scrum master & Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developerr:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:
    👨‍🎓Front-end developer:

    Designers 🎨 prepared for us 3 Versions of team project layout : mobile, tablet, desktop.

    GoIT academy prepared technical tasks 📖

    🏁 Tasks :

    develop a website for searching of popular film;
    give to users an opportunity to search films by genre;
    orgonize user’s library for collecting favourite and watched films;
    orgonize for user’s library an opportunity to delete movie from library;
    develop a movie card with detailed description;
    develop a movie card’s slider for next/previous card view by pushing arrow buttons (left/right);
    implement viewing of movie trailers at the user’s request;
    develop user authorization on website;
    develop pagination;
    develop localization for language change: english/ukrainian.
    🔨 During project developing we:

    consolidated knowledges of HTML and CSS/SASS;
    consolidated knowledges of JavaScript;
    worked with Parcel;
    teamwork practice with Git;
    used Scrum methodology;
    worked with animation;
    used Firebase for user authorization and information collaction.
    As a result 🤝 we made our project: ⬇ View a project link ⬇

    💠 ✨

    Visit original content creator repository
    https://github.com/HannaVakulenko/filmoteka-team10

  • awesome-podcasts

    awesome-podcasts

    A curated list of podcasts from all around the world in various languages for all kinds of subjects.

    Table of Contents

    English

    Business and Management

    Comedy

    Computers

    • The Changelog – Conversations with the hackers, leaders, and innovators of the software world. – Spotify, Apple, OverCast, android.
    • JS Party – Welcome to JS Party, a weekly celebration of JavaScript and the web. – Spotify, Apple, Android, Overcast.
    • Go Time – Your weekly podcast with diverse discussions from around the Go community. – Spotify, Apple, Android, Overcast.
    • Practical AI – Making artificial intelligence practical, productive, and accessible to everyone. – Spotify, Apple, Android, Overcast.
    • Codeblocks .NET – We are a few guys who’ve been professional programmers for years. As avid listeners of podcasts and consumers of many things code-related, we were frustrated by the lack of quality programming (pun) available in listenable formats. Given our years of experience and real-world problem solving skills, we thought it might be worth getting into this world of podcasting and “giving back” a shot. – Spotify, Apple, OverCast.
    • Elixir Talk – Desmond Bowe and Chris Bell present a titillating discussion about Elixir application design and the state of the ecosystem. – Spotify, Apple.
    • The Stack Overflow Podcast – The Stack Overflow podcast is a frank and funny conversation about what it means to work in software and how code is reshaping our world. As it celebrates its 12th anniversary, it’s a must listen for any programmer, as necessary as Stack Overflow itself. – Spotify, Apple, Google, OverCast.
    • On The Metal – Tales from the Hardware/Software Interface, a podcast. – Spotify, Apple, Google, Stitcher, pocketcasts.
    • Software Daily – Technical interview about software topics – Spotify.
    • Lemon Bytes – Computer and Data Science w. Sathvik Katam – TL;DR – Conversations about computer science and other aspects around it. – Spotify.
    • Elixir Wizards – Elixir Wizards is an interview-format podcast, focused on engineers who use the Elixir programming language. Initially launched in early 2019, each season focuses on a specific topic or topics, with each interview focusing on the guest’s experience and opinions on the topic. Elixir Wizards is hosted by Justus Eapen, Eric Oestrich, and Sundi Myint of SmartLogic, a dev shop that’s been building custom software since 2005 and running Elixir applications in production since 2015. Learn more about how SmartLogic uses Phoenix and Elixir. (https://smartlogic.io/phoenix-and-elixir?utm_source=awesome-podcasts) – Spotify, Apple, Google, Overcast, Stitcher, Pocket Casts.
    • Deep Questions with Cal Newport – Cal Newport is a computer science professor and the New York Times bestselling author of Digital Minimalism and Deep Work. He writes about technology and the way it can both support and impede our efforts to live more meaningful, productive lives. In this podcast, he answers questions from his readers about work, technology, and the deep life. – Apple.

    Startups

    • Founders Talks – In-depth, one-one conversations with founders, CEOs, and makers. – Spotify, Apple, Android, Overcast.
    • The Dark Horse Entrepreneur – From hitting the rock bottom of drugs, divorce, bankruptcy and even the death of an 18 month old daughter to running the planning & marketing of some of corporate america’s finest companies. My name is Tracy Brinkmann an entrepreneur, author and uplifting coach. You see, I know that life isn’t fair and participation awards do not feed your family… I invite you to learn from a fellow Dark Horse all that I have learned and am still learning about starting, restarting, kick starting and stepping up your entrepreneur business and marketing game while not ignoring that amazing tool between your ears..yep your personal development & psychology counts too! – Spotify, Apple, Stitcher, Overcast, TuneIn.

    Sports

    Running

    Other

    • Brain Science – Brain Science, for the curious! We’re exploring the human brain to understand behavior change, habit formation & mental health. – Spotify, Apple, Android, Overcast.
    • Cautionary Tales – Cautionary Tales is my new podcast from Pushkin Industries, makers of Malcolm Gladwell’s Revisionist History, Michael Lewis’s Against The Rules, and Laurie Santos’s Happiness Lab. – Spotify, Apple, Stitcher.
    • Leaders in Supply Chain & Logistics Podcast – Leaders in Supply Chain and Logistics Podcast is one of our projects focused on bringing some of the best thought leaders in the industry, pick their brains and share it with as many interested listeners as possible. – Spotify, Apple, Google, Stitcher.
    • The Peter Attia Drive – The Peter Attia Drive is a weekly, deep-dive podcast focusing on maximizing longevity, and all that goes into that from physical to cognitive to emotional health. With over 25 million episodes downloaded, it features topics including fasting, ketosis, Alzheimer’s disease, cancer, mental health, and much more. The Drive is hosted by Dr. Peter Attia, a Stanford/Johns Hopkins/NIH-trained physician focusing on the applied science of longevity, the extension of human life and well-being. – Spotify, Apple, Google, Overcast.
    • Huberman Lab – The Huberman Lab Podcast discusses Neuroscience: how our brain and its connections with the organs of our body controls our perceptions, our behaviors, and our health. – Spotify, Apple.

    Ελληνικά

    Κωμωδία

    • Μαρμελάδα Φράουλα – Δύο stand up κωμικοί μιλάνε για τη ζωή, τις ευκολίες, τις δυσκολίες και τις ποικιλίες, περίεργα άρθρα της Wikipedia και το πού επιλέγουν να σπαταλούν τη ζωή τους στον αχανή θησαυρό του Netflix. – Spotify, Apple.
    • Πο-πο-πο ποντκαστ – Ένα ηλίθιο ποντκαστ με τον Αργύρη και τον Αλέξανδρο. – Spotify, Google, Podchaser, Overcast.

    Γενικά

    Tools

    Find tools for podcasting here.

    Visit original content creator repository
    https://github.com/ipinak/awesome-podcasts

  • aioresponses

    aioresponses

    http://yamla.top/wp-content/uploads/2025/08/aioresponses.svg http://yamla.top/wp-content/uploads/2025/08/badge.svg Code Health Updates Documentation Status

    Aioresponses is a helper to mock/fake web requests in python aiohttp package.

    For requests module there are a lot of packages that help us with testing (eg. httpretty, responses, requests-mock).

    When it comes to testing asynchronous HTTP requests it is a bit harder (at least at the beginning). The purpose of this package is to provide an easy way to test asynchronous HTTP requests.

    Installing

    $ pip install aioresponses

    Supported versions

    • Python 3.7+
    • aiohttp>=3.3.0,<4.0.0

    Usage

    To mock out HTTP request use aioresponses as a method decorator or as a context manager.

    Response status code, body, payload (for json response) and headers can be mocked.

    Supported HTTP methods: GET, POST, PUT, PATCH, DELETE and OPTIONS.

    import aiohttp
    import asyncio
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_request(mocked):
        loop = asyncio.get_event_loop()
        mocked.get('http://example.com', status=200, body='test')
        session = aiohttp.ClientSession()
        resp = loop.run_until_complete(session.get('http://example.com'))
    
        assert resp.status == 200
        mocked.assert_called_once_with('http://example.com')

    for convenience use payload argument to mock out json response. Example below.

    as a context manager

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    def test_ctx():
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
        with aioresponses() as m:
            m.get('http://test.example.com', payload=dict(foo='bar'))
    
            resp = loop.run_until_complete(session.get('http://test.example.com'))
            data = loop.run_until_complete(resp.json())
    
            assert dict(foo='bar') == data
            m.assert_called_once_with('http://test.example.com')

    aioresponses allows to mock out any HTTP headers

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_http_headers(m):
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
        m.post(
            'http://example.com',
            payload=dict(),
            headers=dict(connection='keep-alive'),
        )
    
        resp = loop.run_until_complete(session.post('http://example.com'))
    
        # note that we pass 'connection' but get 'Connection' (capitalized)
        # under the neath `multidict` is used to work with HTTP headers
        assert resp.headers['Connection'] == 'keep-alive'
        m.assert_called_once_with('http://example.com', method='POST')

    allows to register different responses for the same url

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_multiple_responses(m):
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
        m.get('http://example.com', status=500)
        m.get('http://example.com', status=200)
    
        resp1 = loop.run_until_complete(session.get('http://example.com'))
        resp2 = loop.run_until_complete(session.get('http://example.com'))
    
        assert resp1.status == 500
        assert resp2.status == 200

    Repeat response for the same url

    E.g. for cases where you want to test retrying mechanisms.

    • By default, repeat=False means the response is not repeated (repeat=1 does the same).
    • Use repeat=n to repeat a response n times.
    • Use repeat=True to repeat a response indefinitely.
    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_multiple_responses(m):
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
        m.get('http://example.com', status=500, repeat=2)
        m.get('http://example.com', status=200)  # will take effect after two preceding calls
    
        resp1 = loop.run_until_complete(session.get('http://example.com'))
        resp2 = loop.run_until_complete(session.get('http://example.com'))
        resp3 = loop.run_until_complete(session.get('http://example.com'))
    
        assert resp1.status == 500
        assert resp2.status == 500
        assert resp3.status == 200

    match URLs with regular expressions

    import asyncio
    import aiohttp
    import re
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_regexp_example(m):
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
        pattern = re.compile(r'^http://example\.com/api\?foo=.*$')
        m.get(pattern, status=200)
    
        resp = loop.run_until_complete(session.get('http://example.com/api?foo=bar'))
    
        assert resp.status == 200

    allows to make redirects responses

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_redirect_example(m):
        loop = asyncio.get_event_loop()
        session = aiohttp.ClientSession()
    
        # absolute urls are supported
        m.get(
            'http://example.com/',
            headers={'Location': 'http://another.com/'},
            status=307
        )
    
        resp = loop.run_until_complete(
            session.get('http://example.com/', allow_redirects=True)
        )
        assert resp.url == 'http://another.com/'
    
        # and also relative
        m.get(
            'http://example.com/',
            headers={'Location': '/test'},
            status=307
        )
        resp = loop.run_until_complete(
            session.get('http://example.com/', allow_redirects=True)
        )
        assert resp.url == 'http://example.com/test'

    allows to passthrough to a specified list of servers

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses(passthrough=['http://backend'])
    def test_passthrough(m, test_client):
        session = aiohttp.ClientSession()
        # this will actually perform a request
        resp = loop.run_until_complete(session.get('http://backend/api'))

    also you can passthrough all requests except specified by mocking object

    import asyncio
    import aiohttp
    from aioresponses import aioresponses
    
    @aioresponses(passthrough_unmatched=True)
    def test_passthrough_unmatched(m, test_client):
        url = 'https://httpbin.org/get'
        m.get(url, status=200)
        session = aiohttp.ClientSession()
        # this will actually perform a request
        resp = loop.run_until_complete(session.get('http://backend/api'))
        # this will not perform a request and resp2.status will return 200
        resp2 = loop.run_until_complete(session.get(url))

    aioresponses allows to throw an exception

    import asyncio
    from aiohttp import ClientSession
    from aiohttp.http_exceptions import HttpProcessingError
    from aioresponses import aioresponses
    
    @aioresponses()
    def test_how_to_throw_an_exception(m, test_client):
        loop = asyncio.get_event_loop()
        session = ClientSession()
        m.get('http://example.com/api', exception=HttpProcessingError('test'))
    
        # calling
        # loop.run_until_complete(session.get('http://example.com/api'))
        # will throw an exception.

    aioresponses allows to use callbacks to provide dynamic responses

    import asyncio
    import aiohttp
    from aioresponses import CallbackResult, aioresponses
    
    def callback(url, **kwargs):
        return CallbackResult(status=418)
    
    @aioresponses()
    def test_callback(m, test_client):
        loop = asyncio.get_event_loop()
        session = ClientSession()
        m.get('http://example.com', callback=callback)
    
        resp = loop.run_until_complete(session.get('http://example.com'))
    
        assert resp.status == 418

    aioresponses can be used in a pytest fixture

    import pytest
    from aioresponses import aioresponses
    
    @pytest.fixture
    def mock_aioresponse():
        with aioresponses() as m:
            yield m

    Features

    • Easy to mock out HTTP requests made by aiohttp.ClientSession

    License

    • Free software: MIT license

    Credits

    This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

    Visit original content creator repository https://github.com/pnuckowski/aioresponses