Category: Blog

  • revisit

    Customer Revisit Prediction

    Our research about the customer revisit prediction.

    Publication
    Sundong Kim and Jae-Gil Lee., “Utilizing In-Store Sensors for Revisit Prediction,” In Proc. 2018 IEEE Int’l Conf. on Data Mining (ICDM), Singapore, Nov 2018. [Paper] [Slides] [Poster]

    1. Overview

    Predicting revisit intention is very important for the retail industry. Converting first-time visitors to repeating customers is of prime importance for high profitability. However, revisit analyses for offline retail businesses have been conducted on a small scale in previous studies, mainly because their methodologies have mostly relied on manually collected data. With the help of noninvasive monitoring, analyzing a customer’s behavior inside stores has become possible, and revisit statistics are available from the large portion of customers who turn on their Wi-Fi or Bluetooth devices. Using Wi-Fi fingerprinting data from ZOYI, we propose a systematic framework to predict the revisit intention of customers using only signals received from their mobile devices. Using data collected from seven flagship stores in downtown Seoul, we achieved 67-80% prediction accuracy for all customers and 64-72% prediction accuracy for first-time visitors. The performance improvement by considering customer mobility was 4.7-24.3%. Our framework showed a feasibility to predict revisits using customer mobility from Wi-Fi signals, that have not been considered in previous marketing studies. Toward this goal, we examine the effect of data collection period on the prediction performance and present the robustness of our model on missing customers. Finally, we discuss the difficulties of securing prediction accuracy among features that look promising but disappointed.

    2. Formulating a revisit prediction task

    Revisit prediction

    Given a set of visits with known revisit intentions and revisit intervals, build a classifier that predicts unknown revisit intention and revisit interval for a new visit.

    Step-by-step preparation

    • Collecting Wi-Fi Signals: For each store, we collected customer’s Wi-Fi signals. It has four attributes: UID, Sensor, RSSI and Timestamp. An example of five Wi-Fi signals is as follows:

      UID Sensor RSSI Timestamp
      u1 S7 -45 17-10-01 14:25:32
      u1 S7 -49 17-10-01 14:25:48
      u1 S5 -41 17-10-01 14:26:12
      u1 S7 -71 17-10-01 14:26:17
      u1 S1 -42 17-10-01 14:26:32

    • Signal to session conversion: Raw signals can be preprocessed into sessions. A session has four attributes: UID, Area, Dwell time and Timestamp. This data can be a basic block to construct customer’s visits. In this example, the first two sessions are generated from the above five signals. Here, sensor names are directly used as the area name. However, various semantic areas can be used depending on the available information.

      UID Area Dwell time (sec) Timestamp
      u1 S7 40 17-10-01 14:25:32
      u1 S5 20 17-10-01 14:25:48
      u1 S7 135 17-10-09 17:42:16
      u1 S4 5 17-10-09 17:44:31
      u1 S1 20 17-10-19 17:44:36

    • Grouping sessions into a trajectory: A set of sessions form a trajectory if the sessions are generated from the same visit. The first two sessions from UID u1 form a trajectory t1 with S7-S5, and the last three sessions form a next trajectory t2 with S7-S4-S1.

    • Generating labels: Using trajectories, we can define two revisit labels – RV_days and RV_bin. RV_days describes the revisit interval between the current visit and the next visit. RV_bin is the binary transformation of RV_days. To make a label for a past visit, information of next visit is required. Depending on your purpose, you can give a variation to these labels by setting the threshold of customer revisit (e.g., 180-days). Below tables illustrates revisit labels with customer trajectories. In this example, we consider a threshold of 180-days.

      TID UID Trajectory Visit date RV_days RV_bin
      t1 u1 S7-S5 17-10-01 8 days True
      t2 u1 S7-S4-S1 17-10-09 148 days True
      t3 u1 S7-S1-S2- … -S5 18-03-05 Inf Unknown
      t4 u2 S7-S5 17-10-02 419 days False
      t5 u2 S7 18-11-24 Inf Unknown

    • Predictive Analytics: By separating data into a train and a test set, we finally set up our revisit prediction task.

      Prediction Framework

    3. Dataset

    We are negotiating to release benchmark in-store mobility datasets for revisit prediction.
    After we get the permission, we will upload the prepared datasets. Stay tuned.

    Sample datasets

    We uploaded two tiny sample datasets in data_sample/indoor directory.
    Each sample dataset includes randomly selected 500 users from the unpublished benchmark dataset of each store.
    A time span of the benchmark dataset is one year, from Jan 1, 2017, to Dec 31, 2017.
    We devide the first 6 months of data as a train set and the rest as a test set.
    Some customers(wifi_id) of the test set do not exist in the training set.
    In the train set, each wifi_id can have multiple visits if the customer is a frequent visitor.
    However, in the test set, we only retain the first visit for each customer during the time period.

    Datasets for each store consists of train/test_labels, train/test_visits, and corresponding Wi-Fi sessions data.

    Attributes of each dataset are as follows:

    • train/test_labels.tsv: visit_id, revisit_interval(days), revisit_intention(binary)
    • train/test_visits.tsv: visit_id, wifi_id, date, indices(=trajectory)
    • wifi_sessions.tsv: index, wifi_id, ts, area, dwell_time(seconds)

    4. Tutorials

    Please have a look at our tutorials, you will be able to start your project quickly.

    We will also clean up our code and upload to the repository as time permits.

    Reference

    If you find this page useful, please consider citing our work.

    @inproceedings{kim2018icdm,
      author    = {Sundong Kim and Jae-Gil Lee},
      title     = {Utilizing In-Store Sensors for Revisit Prediction},
      booktitle = {Proceedings of the IEEE International Conference on Data Mining},
      year      = {2018},
    }
    

    Visit original content creator repository

  • ETL-Project

    ETL Project

    A simple ETL project interlinking the various components of Hadoop Ecosystem

    hi

    Creating a simple dataset in Mysql

    • creating table in MySql
    create table studdetails(id integer(10), firstname varchar(20), lastname varchar(30), age integer(10), 
    phone integer(14), location varchar(30));
    • insert some values
    insert into studdetails values(001,"Rajiv","Reddy",21,9848022337,"Hyderabad");
    insert into studdetails values(002,"siddarth","Battacharya",22,9848022338,"Kolkata");
    insert into studdetails values(003,"Rajesh","Khanna",22,9848022339,"Delhi");
    insert into studdetails values(004,"Preethi","Agarwal",21,9848022330,"Pune");
    insert into studdetails values(005,"Trupthi","Mohanthy",23,9848022336,"Bhuwaneshwar");
    insert into studdetails values(006,"Archana","Mishra",23,9848022335,"Chennai");
    insert into studdetails values(007,"Komal","Nayak",24,9848022334,"trivendram");
    insert into studdetails values(008,"Bharathi","Nambiayar",24,9848022333,"Chennai");

    Use sqoop to ingest the data and import to Hive

    sqoop import --connect  jdbc:mysql://localhost/appu1 --driver com.mysql.jdbc.Driver --username user 
    --password 12345 --table studdetails --hive-import -m 1 --hive-table appu.studdetails1

    Create a Hive partition table

    create table studentpart(id int, firstname String, lastname String, phone bigint, loc String) PARTITIONED BY 
    (age INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE SET hive.exec.dynamic.partition = true; SET hive.exec.dynamic.partition.mode = nonstrict; // we are partitioning based on age INSERT OVERWRITE TABLE studentpart PARTITION(age) SELECT id,firstname,lastname,phone,
    loc,age from studdetails1; // Check your partitions show partitions studentpart; // view data based on partitions select * from studentpart where age='21';

    Loading Data to Pig and converting to JSON

    pig -useHCatalog
    
    A = LOAD 'appu.studentpart' USING org.apache.hive.hcatalog.pig.HCatLoader(); 
    
    B = filter A by age == 24;
    
    store B into 'studentjson' USING JsonStorage();

    Loading Data to SPARK

    import org.apache.spark.sql.SparkSession
    
    val session = SparkSession.builder().appName("test").master("local").getOrCreate()
    
    val df = session.read.json("part-m-000000")
    
    df.show() 

    Import the same data to MongoDB

    //create a database and a collection
    use student
    db.createCollection('studentdetails')
    //now exit the mongo shell
    //now use mongo import
    mongoimport -d student -c studentdetails part-m-000000
    

    Visit original content creator repository

  • android-yuv-utils

    android-yuv-utils

    CAUTION! The version from master branch actually works but has some issues like a lot of memory consumption and some other issues..

    Compiled libyuv Google library and wrapper for it for easy and fast scale, rotate, mirror and convert frames from android Camera2 or CameraX.

    Supported features:

    1. Horizontal and/or vertical scaling.
    2. Rotating by 90, 180 or 270 degrees.
    3. Mirror horizontally or vertically.
    4. Convert android YUV_420_8888 frame to ARGB.

    Supported ABIs:

    armeabi-v7a, arm64-v8a, x86, x86_64

    How to use

    Init library:

    val yuvUtils = YuvUtils()                                    // getting library instance

    Prepare a frame from Camera2 or CameraX for scaling, rotating etc.:

    val image = ...                                              // getting an image from Camera2 or CameraX api
    var yuvFrame = yuvUtils.convertToI420(image)                 // this step isn't mandatory but it may help you in case if the colors of the output frame (after scale, rotate etc.) are distorted  

    Scale:

    /* the first way */
    val image = ...                                             // getting an image from Camera2 or CameraX api
    val scaledWidth = image.width * 2                           // getting current width and height
    val scaledHeight = image.height * 2                         // of the image and for example double them
    yuvFrame = yuvUtils.scale(image, scaledWidth, scaledHeight, Constants.FILTER_BOX)
    
    /* the second way here yuvFrame was taken from the yuvUtils.convertToI420 method as showed above */ 
    val scaledWidth = yuvFrame.width * 2                        // getting current width and height
    val scaledHeight = yuvFrame.height * 2                      // of the image and for example double them
    yuvFrame = yuvUtils.scale(yuvFrame, scaledWidth, scaledHeight, Constants.FILTER_BOX)

    Rotate:

    val rotate = Constants.ROTATE_270                           // setting the rotation angle
    yuvFrame = yuvUtils.rotate(image, rotate)
    /* or */
    yuvFrame = yuvUtils.rotate(yuvFrame, rotate)

    Mirror:

    /* for mirror horizontally */
    yuvFrame = yuvUtils.mirrorH(image)
    /* or */
    yuvFrame =  yuvUtils.mirrorH(yuvFrame)
    
    /* for mirror vertically */
    yuvFrame = yuvUtils.mirrorV(image)
    /* or */
    yuvFrame = yuvUtils.mirrorV(yuvFrame)

    Convert to ARGB:

    val argbFrame = yuvUtils.yuv420ToArgb(image)
    /* or */
    val argbFrame = yuvUtils.yuv420ToArgb(yuvFrame)

    Project structure

    The project consists of two modules:

    • app – here you can find a sample app that demonsrates scaling, rotating, mirroring and converting procedures by capturing frames from device’s camera.
    • yuv – here you can find a C++ class that interacts with libyuv 1759 and JNI wrapper for interacting with it from Java/Kotlin layer.

    Compiled library:

    • yuv.aar – it’s a compiled library of yuv module that mentioned above, it placed in a root directory of the project, you can easily add it to your project using gradle dependencies. First you have to place yuv.aar in the libs folder of your project and then add to your build.gradle the following:

    dependencies {
        implementation fileTree(dir: 'libs', include: '*.jar')       // this line is necessary in order to allow gradle to take yuv.aar from "libs" dir
        implementation files('libs/yuv.aar')                         // dependency for yuv.aar library
        ...                                                          // other dependencies
    }

    Visit original content creator repository

  • tc-wordpress-gtm-consent-mode-banner-free

    === Consent Mode Banner ===
    Contributors: tagconcierge
    Tags: google tag manager, consent mode, cookies banner, consent management, google ads
    Requires at least: 5.1.0
    Tested up to: 6.5.5
    Requires PHP: 7.0
    Stable tag: 1.0.2
    License: GPLv2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    
    Lightweight (~3kB) Consent/Cookies Banner compatible with Google Consent Mode (GTM & Google Tags). No account or subscription is needed.
    
    == Description ==
    
    Consent Mode Banner is a lightweight (~3 kB), user-friendly WordPress plugin designed to integrate Google Consent Mode seamlessly into your website. It offers a simple and efficient way for website owners to comply with cookie and privacy regulations like GDPR and CCPA, by enabling visitors to select their cookie preferences easily.
    
    
    ## Features
    
    - **Simple Setup**: Integrate with Google Tag and Google Tag Manager with minimal configuration.
    - **Customizable Consent Banner**: Tailor the appearance and message of your consent banner.
    - **User Preference Control**: Allows users to specify their consent for different types of cookies (e.g., necessary, analytics, marketing).
    - **Compliance with Privacy** Laws: Helps in making your website compliant with GDPR, CCPA, and other privacy regulations.
    - **Lightweight and Fast**: Designed to be non-intrusive and does not affect your website's load time.
    
    
    **[Documentation](https://docs.tagconcierge.com/article/72-how-to-configure-google-consent-mode-wordpress-woocommerce)**
    
    ## Banner UI
    
    This plugin relies on open-source, lightweight Consent Banner UI available on GitHub:
    
    **[tagconcierge/consent-banner-js](https://github.com/tagconcierge/consent-banner-js)**
    
    == Installation ==
    
    1. Upload or install `Consent Mode Banner` plugin from WordPress plugins directory.
    2. Activate the plugin through the `Plugins` menu in WordPress.
    3. That's it! Consent State will be pushed to DataLayer adhering to Consent Mode API
    4. Use plugin settings to customise the content and consent settings.
    5. Optionally use plugin settings to install GTM snippets
    
    == Frequently Asked Questions ==
    
    = Do I need to configure anything in GTM to enable consent mode? =
    
    Once your Consent Banner is deployed the Consent Mode will be provided and will work with Google Tags
    (GA4 and Google Ads) out-of-the-box. For other integrations you need to review your GTM tags to ensure they have correct consent checks settings.
    You can use Consent Overview screen to quickly review and update tags. [Read more here](https://docs.tagconcierge.com/article/59-how-to-configure-gtm-consent-mode)
    
    = Is it compatible with direct GA4 or Google Ads integration? =
    
    Yes, both direct usage of Google Tags and Google Tag Manager are supported. The plugin sends standard Consent Mode v2 parameters that will be respected by those tags.
    
    = Is it compatible with Facebook Pixel? =
    
    It can be compatible if Facebook Pixel is implemented via Google Tag Manager and correct consent settings are applied in GTM workspace. [Read more here](https://docs.tagconcierge.com/article/59-how-to-configure-gtm-consent-mode)
    
    = How to inject GTM tracking snippet? =
    
    By default this plugin push consent information to the GTM DataLayer object that can be installed by other plugins or directly in the theme code.
    It can also embed GTM snippets, go to settings to configure it.
    
    
    
    == Screenshots ==
    
    1. Consent Banner in action
    2. Consent Banner displayed as modal
    3. Consent Banner displayed as bar without "wall"
    4. Consent Banner settings screen with all consent types listed
    5. Consent Mode State Preview in Google Tag Assistant
    6. Consent Banner WP Admin basic settings
    7. Consent Banner WP Admin banner content settings
    8. Consent Banner WP Admin consent types settings
    
    
    == Changelog ==
    
    = 1.0.2 =
    
    * Fixes GTM snippets loading
    * Changes namespace due to naming collision
    * Upgrades Consent Banner JS library to 1.2.3
    
    = 1.0.1 =
    
    * Fix javascript loading ordering
    
    = 1.0.0 =
    
    * Initial version
    

    Visit original content creator repository

  • HQText

    HQText

    An easy to use plugin for Unity that renders complex text accurately.

    header-795b83534ca1dd3744757b4dd9b0303b

    HQText is a Unity plugin developed in response to the growing need for accurate and comprehensive language support, including precise placement of diacritics, ligatures, and the proper handling of mixed bi-directional text elements. Although our primary focus has been on providing correct support for Arabic text within Unity, HQText is designed to accommodate most other languages just as effectively.

    To achieve this, HQText employs a user-friendly and intuitive wrapper for Pango, an open-source library for laying out and rendering text. By default, HQText utilizes FreeType for font rendering, but it can also be configured to work with the native Windows (win32) backend.

    While TextMeshPro is another option for supporting Arabic, it often experiences issues with diacritic placement, which can vary between fonts, and transparency artifacts arising from overlapping character ligatures. For those who find these problems unacceptable, HQText serves as an ideal alternative.

    Download the Unity plugin.

    Features

    • Accurate rendering of complex text
    • Arabic, Persian/Farsi, Hebrew, Urdu and more
    • Correct rendering of diacritics and ligatures
    • Markup (Rich text) support
    • Supports TTF and OTF fonts
    • Supports ALL the render-pipelines: Built-in/URP/HDRP
    • Also works in editor (no need to enter play mode)
    • Supports visual effects via UIFX
    • Includes full C# and C++ source code

    Requirements

    • Supports all Unity versions from 2019.4.0 up to Unity 6.x
    • Supports all render pipelines: Built-in, URP and HDRP
    • 64-Bit Windows only (Windows 10 & 11)
    • (other platform support on request)

    Dependencies

    This work is made possible by Pango, licensed under LGPL-2.1-or-later. Authors: Owen Taylor, Behdad Esfahbod.

    Contributors

    Authors / Maintainers

    Contributors

    • Kelly McCarter, Denzil BΓΌchner, Ruan Moolman, Calvin Lichungu, Andrew Griffiths

    Additional Contributors

    • Dr. Mustapha Saidi, for creating the Arabic text references.

    Links

    Building

    See BUILD.md for build instructions.

    Support & Requests

    Contact Chocolate Dinosaur Ltd for more information.

    Visit original content creator repository

  • videoclub-springboot-api

    videoclub-springboot-api

    Videoclupy!

    Requisitos

    Teniendo las siguientes entidades:

    1. GΓ©nero:
      • CΓ³digo (Usar enumeraciΓ³n)
      • DescripciΓ³n.
    2. PelΓ­cula:
      • TΓ­tulo. Obligatorio.
      • AΓ±o: Obligatorio. NΓΊmero positivo mayor que 1900
      • DuraciΓ³n: Obligatorio. NΓΊmero positivo menor que 500.
      • Actores: Por lo menos debe tener uno.
      • GΓ©nero: Obligatorio.
      • Ejemplares. Lista de ejemplares
    3. Actor:
      • Nombre. Obligatorio
      • Primer Apellido: Obligatorio
      • Segundo Apellido: SΓ³lo podrΓ‘ venir relleno si estΓ‘ cubierto el primer apellido.
      • Fecha de Nacimiento: Obligatorio y mayor que 1/1/1900
    4. Ejemplar
      • Estado. Obligatorio. Enumerado: Libre, Reservado, Alquilado, Comprado
      • Fecha alta en la tienda (stock)
      • Fecha baja en la tienda (stock)
      • Fecha salida de la tienda (alquiler / compra)
      • Fecha devoluciΓ³n en la tienda (alquiler / compra)

    Se pide:

    1. Por defecto, el registro de pelΓ­culas vacΓ­o salvo los gΓ©neros que serΓ‘n Comedia, Western, Ciencia-FicciΓ³n, RomΓ‘ntica e HistΓ³rica.
    2. Crear mΓ©todos CRUD para los actores.
    3. Crear mΓ©todos CRUD para las pelΓ­culas.
    4. Crear interfaz para dar de alta actores y poder modificar sus datos.
    5. Crear interfaz para localizar pelΓ­culas por tΓ­tulo, aΓ±o, duraciΓ³n, nombre del autor, primer apellido del autor.
    6. Las validaciones se realizarΓ‘n mediante constraints en los DTO correspondientes.
    7. Crear interfaz para permitir alquilar y devolver ejemplares de pelΓ­culas, asΓ­ como la gestiΓ³n de su stock (opcionalmente).

    API Urls:

    • GET -> /api/privado/generos/: listar gΓ©neros.

    • GET -> /api/privado/peliculas/: listar pelΓ­culas.

    • GET -> /api/privado/peliculas/{id}: Obtener una pelΓ­cula.

    • POST -> /api/privado/peliculas: Crear PelΓ­cula.

    • PUT -> /api/privado/peliculas/{id}: Modificar pelΓ­cula.

    • DELETE -> /api/privado/peliculas/{id}: Borrar pelΓ­cula.

    • GET -> /api/privado/actores/: listar actores.

    • GET -> /api/privado/actores/{id}: Obtener una actor.

    • POST -> /api/privado/actores: Crear actor.

    • PUT -> /api/privado/actores/{id}: Modificar actor.

    • DELETE -> /api/privado/actores/{id}: Borrar actor.

    • GET -> /api/privado/peliculas/search: Localizar pelΓ­culas.

    • GET -> /api/privado/peliculas/{id}/stock/: listar el stock de una pelΓ­cula.

    • POST -> /api/privado/peliculas/{id}/stock/: Modificar (incrementar / decrementar) el stock de una pelΓ­cula.

    • POST -> /api/privado/store/peliculas/{id}/e/{eid}/?action=sell: Compraventa de un ejemplar.

    • POST -> /api/privado/store/peliculas/{id}/e/{eid}/?action=rent: Alquila un ejemplar.

    • POST -> /api/privado/store/peliculas/{id}/e/{eid}/?action=return: Devuelve un ejemplar.

    Getting Started

    Reference Documentation

    For further reference, please consider the following sections:

    Guides

    The following guides illustrate how to use some features concretely:

    Visit original content creator repository

  • shopify-syncer-luceed

    Ceker-Shopify-Luceed – SYNC Worker

    Firestarter API

    Keep your Shopify and Luceed in SYNC

    Andromeda.technology – Official Website

    Ceker.net – Croatian Natural & Healthy Foods Shop – Official Webshop

    Medium.com – Read an article, overview of Features and Use cases

    Motivation

    Built for easier syncing of Luceed and Shopify.

    Written in TypeScript, with Interfaces and separated files, folders for each domain (Luceed, Shopify)
    and it’s sub-domains (Orders, Customers, ShippingData etc.).

    This organization greatly helps with understanding of the flow of the sync process between Luceed and Shopify.

    Easily extend this codebase to suit your needs.

    What is covered

    Most of the basic stuff needed to get your webshop up and running in Shopify,
    while having it in Sync with your physical store and inventory (via Luceed).

    • View, Create: Orders,
    • View, Create: Customers,
    • Sync Shopify Orders to Luceed,
    • Sync Luceed Products to Shopify.

    Features

    • .env: Define if product can be sold when inventory levels < 0

    • .env: Define shop wide discounts – via config variable (define percentage) – applied to all products

    • Database: Hide/Show products on Webshop

    • Database: Make products available only offline (in physical shop)

    • Shopify pagination

    • Finding, using Shopify PRODUCTS by SKU (defined on product variant)
      — This way, product HANDLE is used for search engine and display purposes only

    • Create Luceed Order with default PoslovniPartner if none available from Shopify (because of selected Shopify plan)
      — Then change, optionally and manually, later in Luceed – delivery and contact data

    • Saving ShopifyOrder to Luceed, with adding one of two Delivery items a) Free Delivery item, b) Default Delivery item.
      — Based on delivery price on Shopify Order.

    • Continue selling products, when out of stock (configurable via .env variable (true/false))

    • Two (2) locations: Shop and Webshop: To show inventory per location

    Environment variables

    .env variables: Used to Control behaviour of the Sync process (params to access Luceed and Shopify).

    Env variables (.env file):

    • var1

    Database (e.g. MongoDB Atlas):

    • is_visible_in_webshop – [true/false] – is product ACTIVE or in DRAFT in Shopify (visible for customers)? Product is always synced, but potentially hidden from customers.

    Payments

    • Set default payment by Luceed ID.

    Shopify

    • Throttling included – to comply with Shopify request limit (for every call towards Shopify)
      — Configurable

    Customer (default or real), for orders, synced from Shopify to Luceed

    If you don’t want to sync customer data to Luceed (by choice or by Shopify plan limitations)…
    Syncer will assign all Orders to a default customer in Luceed (just make sure to provide UID from Luceed Customer in .env file).

    On the other hand, if you do have the plan that provides Customer data,
    new customers will be created in Luceed (based on e-mail address and postal address)
    or existing ones will be used (if already in Luceed).

    Luceed

    • Na Webshopu navodimo samo MPC cijene (ne VPC)

    Shopify Requirements

    • Optional: E-mail on checkout (email doesn’t need to be part of every ShopifyOrder, as some plans hide it – then add to default User, to change manually in Luceed)
    • Optional: Phone on checkout (phone doesn’t need to be part of every ShopifyOrder, as some plans hide it – then add to default User, to change manually in Luceed)

    Production requirements

    • Heroku (instructions below)
    • Fixie on Heroku – for static outbound requests IP adress (instructions below)
    • Redis on Heroku (or any other place – just get REDIS_URL) (used for Queue jobs – sync process, as Heroku bails with execution after timeout)

    Total production cost per month for micro, shared instance is ~[5,8] USD (Heroku hosting + Redis included).

    Technology of the system

    Firestarter API – Progressive Startup API Boilerplate

    Firestarter API

    Progressive Startup API Boilerplate

    https://firestarter-api.andromeda.technology

    Easy to extend, Progressive and Scalable API boilerplate to power your startup.

    1. Technology

    2. Usage

    1. Clone the repo,
    2. Duplicate .env.example files in [./,/docker/] to .env; modify as needed,
    3. Have Docker installed, run the containers and your app (check the instructions below),
    4. Add modules (routes, controllers, services, tests) to /src (duplicate Message module, adjust to your needs),
    5. List newly added modules (features) here (Readme.md) and in your POSTMAN collection.

    3. Features

    1. Message Module,
    2. [Add your modules/features here]

    All API routes are prefixed by API_PREFIX (defined in.env) (default: /api).

    4. Setup

    Docker

    Docker provides isolated MongoDB for your project.

    cd ./docker
    
    # Duplicate example env file, modify as needed
    cp .env.example .env
    
    docker-compose up -d
    

    Application

    # Return from `docker` to root dir
    # cd ..
    
    # Duplicate example env file, modify if needed
    cp .env.example .env
    
    # Install packages
    npm i
    
    # Run
    npm run dev
    

    5. Tests

    Using Jest Testing Framework.

    Jest uses SuperTest and MongoDBMemoryServer.

    npm run test
    

    6. Postman

    Postman Documentation

    • (Link your Postman Documentation here)

    Pre-set environment variables:

    • host
    • admin_password

    Dynamic environment variables,
    automatically set in tests:

    • access_token

    7. Admin Routes

    Routes can be protected with jwtCheck middleware,
    requiring admin rights.

    Requests going to these routes require Authorization: Bearer {access_token} header.

    List of protected, i.e. Admin Routes

    1. Message[Create,Update,Delete],
    2. [Add your protected routes here]

    Getting access_token for the Admin user

    • Request endpoint: POST /auth/token,
    • Pass your password in the request body: { password: ADMIN_PASSWORD },
    • Response will return created token.

    Note: Postman collection will automatically set access_token environment variable,
    so you can immediately call admin routes, without copy-pasting it or setting the env variable manually.

    Getting the ADMIN_PASSWORD

    • Your ADMIN_PASSWORD is defined in .env file.
    • It defaults to secret.

    8. Deployment

    8.1. MongoDB Atlas

    If you use MongoDB Atlas: Uncomment and fill DB_URI in .env.

    8.2. Deploying to HEROKU

    Heroku tutorial 1
    Heroku tutorial 2

    8.3. Use Fixie for HEROKU static IP

    Fixie, Heroku
    Fixie, Node

    9. Social

    Andromeda

    10. Rest

    Hero image source: FireStarter, gilad, DevianArt.

    11. Related

    πŸ„ Habitus

    • State-of-the-art tracker for emotions, habits and thoughts,
    • Healthiest version of you,
    • Gamified,
    • Anonymous and open source.

    12. Contribute

    Check Self-Aware Software Artisan before contributing.

    Crafted with ❀️
    by contributors around the 🌍 World and 🌌 Andromeda.

    Visit original content creator repository

  • persepolis-windows-package-build

    Persepolis Microsoft Windows package build

    windows package build for Persepolis Download Manager

    We build stable releases safely and you don’t need to build it yourself. You can download Persepolis Download Manager for Microsoft Windows from release page.
    If you want to build Persepolis for Windows yourself, then this instruction can help you.

    step 1: Preparing

    You can download project from our github page or using git clients.

    You can download the stable version Source code from release page or last git version from the master branch.
    After downloading or cloning, extract and enter persepolis path.
    you can see this structure for directories now.

    persepolis
    β”œβ”€β”€ man
    β”œβ”€β”€ persepolis
    β”‚Β Β  β”œβ”€β”€ gui
    β”‚Β Β  └── scripts
    β”œβ”€β”€ resources
    β”œβ”€β”€ test
    └── xdg
    

    You also need some file that we put them in this repository and we use them to build persepolis. so clone or download this repository alongside persepolis directory, we should have this structure finally:

    persepolisarea
    β”œβ”€β”€ persepolis-windows-package-build
    └── persepolis
    
    • 1-2 python

    persepolis has been written in python so we need python3 to build it, after freezing and building the package there are no more need to python and its library.
    Download latest python3 and install it.

    remember the destination directory and enable the β€œAdd Python to PATH” option.

    • 1-3 dependencies & libraries

    • Install virtualenv with pip install virtualenv From windows terminal (powershell)

    • Create an environment with virtualenv venv in persepolis directory

    • Active it with .\venv\Scripts\activate

    • Install these libraries with pip

      pip install PySide6 requests pypiwin32 setproctitle psutil yt_dlp pyinstaller urllib3 PySocks

    • Persepolis uses ffmpeg for mixing videos (more info.). Download ffmpeg (we use latest gpl version).

    step 2: test and run

    Move ffmpeg.exe to the test folder next to the test.py according to your system architecture

    Open Windows terminal and Enter cloned persepolis directory with cd command and active env. run persepolis as test with this command.

    python test/test.py

    • now persepolis should run as a python script. If you get some error you may had mistake. Open an issue here, We will help you πŸ™‚

    step 3: build and freeze

    Now let’s build persepolis!

    run Windows terminal and enter persepolis folder and active env, so build Pesrpolis browser integration by pyinstaller with this command:

    pyinstaller '.\resources\PersepolisBI.py' -F -i '..\persepolis-windows-package-build\persepolis2.ico' -n "PersepolisBI" --version-file '..\persepolis-windows-package-build\bi_version.py' --clean
    

    and build persepolis with this command:

    pyinstaller '.\persepolis\Persepolis Download Manager.py' -F -w -i '..\persepolis-windows-package-build\persepolis1.ico' -n "Persepolis Download Manager" --version-file '..\persepolis-windows-package-build\version.py' --clean
    

    -w means it is a windowed app, not a console one.

    -F Create a one-file bundled executable.

    -i perseplois icon.

    -n name of bundled executable.

    --version-file add persepolis version resource from version.py to the exe.

    If everything goes well, you have some output like this

    pyinstaller

    If you get error messages, you made mistake. Open an issue here, We will help you πŸ™‚

    • After this, you have bundled executable file in dist folder, Move ffmpeg.exe and PersepolisBI.exe next to the Persepolis Download Manager.exe. you can run it and test it, it works perfectly

    step 4 (Optional): create package installer

    You have executable perseplois and you can put it everywhere (next to the and ffmpeg.exe and PersepolisBI) but we going to create a installer for windows.

    • Download and install Inno Setup
    • you can create your installation or use our standard one, I put theme in this repository for both 32 and 64 architecture (.iss files). you should edit [Files] section and LicenseFile, InfoAfterFile, OutputBaseFilename, SetupIconFile, UninstallDisplayIcon according to your directory name, also I put license, persepolis readme, after installation text and icon in this repository.
    • Build and compile installation if everything goes well, you have a persepolis installer.

    Enjoy it. 😊

    Visit original content creator repository

  • NodeMCU-Control-Fan-With-Relay

    YOU NEED:


    NODEMCU * 1
    RELAY * 1

    CONNECTION


    step 1:

    Connect nodemcu to relay as shown in Picture 1
    .And connect relay to fan as shown in Picture 2. //This step is very dangerous.You can connect relay to led as shown in Picture 3. It will be safer.

    SETUP AND INSTALLATION


    step 2:

    Download Arduino IDE from https://www.arduino.cc/en/main/software.

    step 3:

    Open Arduino IDE click File > Preferences then copy this link. http://arduino.esp8266.com/stable/package_esp8266com_index.json and paste it on the Additional Boards Manager URLs and click ok.


    step 4:

    Click on Tools > Board:”Arduino/Genuion Uno” > Boards Manager… then type nodemcu on the empty block. Select the frist one (esp8266 by ESP8266 Community) and click install. When you finish change the board to NodeMCU 0.9 or 0.10 then close Arduino IDE. //Now you can code on nodemcu board.


    step 5:

    Now you need to dowload BLYNK library. All you need to do is go to https://www.blynk.cc/getting-started/ and then click on the button DOWNLOAD BLYNK LIBRARY. And download Blynk_Release_v0.5.4.zip(other version is fine).


    step 6:

    Open it(.zip file) you will find two folder call librarys and tools .Then open a new folder. Go to your Arduino folder mine is in /Home .Now when you open it.You will find a folder call Librarys.Then move the Blynks library(both of them)to the Arduino folder.



    CHANGE THE CODE/DOWNLOAD BLYNK TO YOUR PHONE


    step 7:

    https://github.com/yoshi151/NodeMCU-Control-Fan-With-Relay/blob/master/control_fan_with_blynk.ino
    Open Arduino IDE and copy the code from above and paste it on Arduino IDE make sure that your board is NodeMCU 0.9 or 0.10 ,the upload speed is 115200(in Tools) and there a Blynk library in your Arduino library by open Sketch > include library.In contributed library you will found library call Blynk, BlynkEsp8266_Lib, ESP8266wifi, ESP8266… and many more.


    step 8:

    Download Blynk on your phone then sign up. Create new project and name it .Now you will get a token from your gmail. Click on the screen. The widget box will pop out so you can add button controllers.When button is in your project.Click on it again. It will go to button setting.Rename it whatever you like.In output change the pin to GP16 and set mode to switch.


    step 9:

    Now you have to change the code. change
    char auth[] = “your Blynk token”
    char ssid[] = “your wifi name”
    char pass[] = “your wifi password”

    RUN THE CODE


    step 10:

    Plug nodemcu to your computer. Then go to Tools > port and change to port of nodemcu.Now upload the code to nodemcu by press the arrow button and wait for it to finish.
    Visit original content creator repository
  • RISC-OS-Community

    RISC-OS-Community on GitHub

    TL;DR

    This is a completely no profit group that uses and promotes RISC OS for fun and educational purposes only.

    Full description

    This is a project to collect, develop, restore, preserve and improve code and software written for the RISC OS Operating System in the form of Open Source projects.

    Goals

    1. Porting Open Source libraries and code from other Operating Systems to RISC OS
    2. Creation of coding tutorials with practical examples to help people who are interested in learning to code on RISC OS
    3. Help RISC OS become a more fully Open Source platform
    4. Increase the things that can be done on the historical OS written by Acorn Computers back in the 80s for the ARM CPU and still maintained and improved to this date by RISC OS Developments and RISC OS Open organisations
    5. Have fun coding and spreading the fun to new generations interested in learning about this OS
    6. Helping professionals to deliver better software on RISC OS so that the user base can enjoy more powerful and feature-rich applications
    7. Collect and preserve old code for RISC OS and modernise it to enable running on newer releases as well as being distributed via RiscPkg
    8. Follow best standards and guidelines to ensure best quality possible and highest degree of security achievable on RISC OS platform

    Who is it for?

    This community is for everyone interested in RISC OS, ARM and Open Source.

    Everyone can join and be part of it, not just developers.

    It isn’t required to be a community member to submit fixes and/or new features. However, any fix and/or new feature contributions should follow our contributing guidelines. For further information see the section below regarding changes submitted by non-community members.

    How does it work?

    All community projects are publicly discussed. Whenever tasks are decided upon, they are assigned to one of the following teams:

    1. Admins Team
    2. Automation Team
    3. Code review Team
    4. Dev Team (Development Team)
    5. Docs Team (Documentation Team)
    6. Graphic Design Team
    7. Sound Design Team

    Whoever is available in the appropriate team can pick up the task and work further on it.

    When working on a task, be sure to read the relevant Contributing guidelines found in each project for details of any specific requirements.

    Ok, but what if I want to do a change without being an active part of the community?

    If a prospective contributor is not part of the community and still wants to take a task, just tag the corresponded issue, so that the community members know you are working on it. Fork the repo; make your changes following the contributing guide; then submit a PR for review. Before opening a PR make sure your changes pass the old tests. Please also ensure that tests are added/updated as part of the contribution to enable ongoing verification of these changes.

    How to submit my old code?

    Read the instructions in the Example Repository here

    How do I ask a question or submit bugs and new requirements?

    Very easy:

    1. Click on the top tab option called “Issues”.
    2. Check if someone else has already submitted your same request.
    3. If not, then click on the big button on the right called “New Issue”. You will see a new page with a list of possible type of issue to submit that include asking a question, report a bug, submit a new requirement and more.
    4. Click on the option that is the most appropriate for what you want to submit and you’ll get in an easy to fill web Form (so no coding or hard to understand processes)
    5. Fille the form up with all the required fields and submit it. We’ll review it as soon as possible and either start a conversation there with you.

    How do to join?

    Have a look at the How to Join section in the Contributing guidelines document.

    The Contributing document can be found also on each project repository as well.

    Before deciding to join or to contribute, please make sure you have read and accept our Code of Conduct which we all have to follow to ensure a safe and happy community. πŸ™‚

    Thanks for reading and for your interest in Open Source and RISC OS!

    If you have more questions or if you want to know more about this community, please check out our Wiki here

    Please, check out also our social media profiles for more info, videos about RISC OS and how to use it, technical details and our news:

    Visit original content creator repository