Author: 513i55k9gdhd

  • orejime

    Orejime 🍪

    Let your users choose the cookies they eat on your website.

    Orejime is a lightweight consent manager that focuses on accessibility.

    Explore its features

    Getting started

    1. Installation
    2. Configuration
    3. Third-party scripts configuration
    4. Initialization

    Installation

    Orejime comes with many styles and languages. It is distributed as individual
    modules that follow a common convention, namely orejime-[THEME]-[LANGUAGE].
    For example:

    • orejime-standard-en.js uses the standard theme with english texts
    • orejime-standard-fr.js uses the standard theme with french texts
    • orejime-dsfr-fr.js uses the DSFR theme with french texts

    (Learn more about themes & languages)

    Content Delivery Network

    The easiest way to use Orejime is to import a distribution via a CDN such as
    jsDelivr:

    <script src="https://cdn.jsdelivr.net/npm/orejime@latest/dist/orejime-standard-en.js"></script>
    <link
      href="https://cdn.jsdelivr.net/npm/orejime@latest/dist/orejime-standard.css"
      rel="stylesheet"
    />

    [!TIP] If you’re using this method, please avoid using the @latest version.
    Prefer a fixed one like https://cdn.jsdelivr.net/npm/orejime@3.0.0/…. That
    way you can ensure you will not be impacted by a change of API or a potential
    bug that could land in the latest version.

    npm

    Orejime only distributes built files via npm
    (learn why).

    npm install orejime

    You’ll find the required JS and CSS files in the dist folder.

    Configuration

    You need to pass Orejime some configuration for it to function. This is
    typically done by assigning configuration options to window.orejimeConfig:

    <script>
      window.orejimeConfig = {
        // options
      };
    </script>

    You’ll find all the available configuration options below.

    [!NOTE] Very few of the following options are actually required (only
    purposes and privacyPolicyUrl are). Optional options are explicitly
    flagged as such.

    Annotated example of configuration

    var orejimeConfig = {
      // You must provide a link to your privacy policy page for GDPR compliance.
      privacyPolicyUrl: '',
    
      // The list of third-party purposes that Orejime will manage for you.
      // The purposes will appear in the modal in the same order as defined here.
      purposes: [
        {
          // The id of the purpose, used internally by Orejime.
          id: 'google-tag-manager',
    
          // The title of the purpose as shown in the banner and modal.
          title: 'Google Tag Manager',
    
          // [optional]
          // The description of you purpose as listed in the modal.
          description: 'This is used for analytics.',
    
          // A list of regex expressions, strings, or arrays, giving the names of
          // cookies set by this purpose. If the user withdraws consent for a
          // given purpose, Orejime will then automatically delete all matching
          // cookies.
          //
          // See a different example below with the inline-tracker purpose
          // to see how to define cookies set on different path or domains.
          cookies: [
            '_ga',
            '_gat',
            '_gid',
            '__utma',
            '__utmb',
            '__utmc',
            '__utmt',
            '__utmz',
            '_gat_gtag_' + GTM_UA,
            '_gat_' + GTM_UA
          ],
    
          // [optional]
          // If "isMandatory" is set to true, Orejime will not allow this purpose to
          // be disabled by the user.
          // See "Special cases" below for more information.
          // (defaults to false)
          isMandatory: false,
    
          // [optional]
          // If `isExempt` is set to true, Orejime will load this purpose
          // even before the user gave explicit consent.
          // We recommend always leaving this "false".
          // See "Special cases" below for more information.
          // (defaults to false)
          isExempt: false,
    
          // [optional]
          // If "default" is set to true, the purpose will be enabled by default
          // (defaults to false)
          default: false,
    
          // [optional]
          // If "runsOnce" is set to true, the purpose will only be executed
          // once regardless how often the user toggles it on and off.
          // (defaults to false)
          runsOnce: true
        },
        {
          id: 'inline-tracker',
          title: 'Inline Tracker',
          description: 'Example of an inline tracking script',
          cookies: [
            'inline-tracker',
            // When deleting a cookie, Orejime will try to delete a cookie with the
            // given name, the "https://github.com/" path, and multiple domains (the current domain
            // and `"." + current domain`).
            // If an app sets a cookie on a different path or domain than that,
            // Orejime won't be able to delete it by itself without more info.
            // In this case, you can explicitely define a cookie, a path and domain:
            ['cookieName', '/blog', '.' + location.hostname],
            ['cookieName', "https://github.com/", 'test.mydomain.com']
          ]
        },
        {
          id: 'external-tracker',
          title: 'External Tracker',
          description: 'Example of an external tracking script',
          cookies: ['external-tracker'],
          isMandatory: true
        },
    
        // Purposes can also be grouped
        {
          id: 'advertising',
          title: 'Advertising',
          description: '…',
          purposes: [
            {
              id: 'foo',
              title: 'Foo',
              cookies: []
            },
            {
              id: 'bar',
              title: 'Bar',
              cookies: []
            }
          ]
        }
      ],
    
      // [optional]
      // If `forceModal` is set to true, Orejime will directly display
      // the consent modal and not allow the user to close it before having actively
      // consented or declined the use of third-party purposes.
      // (defaults to false)
      forceModal: false,
    
      // [optional]
      // If `forceBanner` is set to true, Orejime will display the consent
      // notice and not allow the user to close it before having actively consented
      // or declined the use of third-party purposes.
      // Has no effect if `forceModal` is set to true.
      // (defaults to false)
      forceBanner: false,
    
      // [optional]
      // You can overwrite existing translations and add translations for your
      // purpose descriptions and purposes. See `src/translations` for a full
      // list of translations that can be overwritten.
      translations: {
        modal: {
          description:
            'This is an example of how to override an existing translation already used by Orejime'
        }
      },
    
      // [optional]
      // You can pass an image url to show in the notice.
      // If the image is not exclusively decorative, you can pass an object
      // with the image `src` and `alt` attributes: `logo: {src: '...', alt: '...'}`
      logo: '/img/logo.png',
    
      // [optional]
      // You can customize the element that will contain Orejime (either
      // a selector or a DOM element).
      // It no element matches, an element will be created and inserted at the
      // beginning of the <body>.
      orejimeElement: '#orejime',
    
      // [optional]
      cookie: {
        // [optional]
        // You can customize the name of the cookie that Orejime uses for storing
        // user consent decisions.
        // (defaults to 'orejime')
        name: 'orejime',
    
        // [optional]
        // You can set a custom expiration time for the Orejime cookie, in days.
        // (defaults to 365.)
        duration: 365,
    
        // [optional]
        // You can provide a custom domain for the Orejime cookie, for example to make it available on every associated subdomains.
        domain: 'mydomain.com',
    
        // [optional]
        // Whether the cookie should be shared via cross-site requests.
        // @see https://web.dev/articles/samesite-cookies-explained
        sameSite: 'strict',
    
        // [optional]
        // You can provide a custom function to serialize the cookie contents.
        stringify: (contents) => JSON.stringify(contents),
    
        // [optional]
        // You can provide a custom function to unserialize the cookie contents.
        parse: (cookie) => JSON.parse(cookie)
      }
    };

    [!IMPORTANT] If every purpose is either isMandatory or isExempt, Orejime
    will not show at startup (it will still be possible to open it
    programmatically). However, you should consider this use case carefully, and
    ensure that :

    • isMandatory trackers are truly required for your app to function properly
    • isExempt trackers are exempt from consent (i.e.
      as defined by the CNIL)

    Third-party scripts configuration

    Scripts that require user consent must not be executed when the page load.
    Orejime will take care of loading them when the user has consented.

    Those scripts must be tagged with their related purpose from the configuration.
    This is done by wrapping them with a template tag and a data-purpose
    attribute:

    + <template data-purpose="google-tag-manager">
        <script>
          (function(w,d,s,l,i){/* … */})(window,document,'script','dataLayer','GTM-XXXX')
        </script>
    + </template>

    This way, the original script is left untouched, and any piece of HTML can be
    controlled by Orejime in the same way.

    You can wrap many elements at once or use several templates with the same
    purpose:

    <template data-purpose="ads">
      <script src="https://annoying-ads.net"></script>
      <script src="https://intrusive-advertising.io"></script>
    </template>
    
    <template data-purpose="ads">
      <iframe src="https://streaming.ads-24-7.com/orejime"></iframe>
    </template>

    [!NOTE] There is more you can do with templates! Learn about
    contextual consent.

    Integration tips

    WordPress

    Should you use Orejime in a WordPress website, you could alter the rendering of
    the script tags it should handle:

    // Register a script somewhere…
    wp_enqueue_script('matomo', 'matomo.js');
    
    // …and change the script output to wrap it in a template.
    function orejimeScriptLoader($tag, $handle, $src) {
        if ($handle === 'matomo') {
            return '<template data-purpose="analytics">' + $tag + '</template>';
        }
    
        return $tag;
    }
    
    add_filter('script_loader_tag', 'orejimeScriptLoader', 10, 3);

    Initialization

    Now that you installed and configured Orejime, you should see it greet you!

    Anytime the window.orejimeConfig variable is set with a valid configuration,
    Orejime will pick it up and start.

    In case you don’t set this variable, Orejime can still be launched
    programatically by passing it a configuration:

    Orejime.init(orejimeConfig);

    [!NOTE] Previously, Orejime could be imported as any other module and bundled
    into application code. With version 3, we’re abandonning this functionality to
    provide standalone builds only
    (learn why).

    Theming

    Standard theme

    This is a custom theme meant to be simple but elegant enough to be used as-is on
    any website. It is easily customizable by tweaking some CSS properties.

    You can either replace the original CSS entirely, or add your custom stylesheet
    to overwrite only some of the rules.

    <link rel="stylesheet" href="orejime.css" />
    
    <style>
      .orejime-Env {
        --orejime-font-family: monospace;
        --orejime-color-background: black;
        --orejime-color-text: yellow;
      }
    </style>

    You’ll find the available CSS properties in
    the theme’s stylesheet.

    DSFR theme

    This theme is meant to be used on websites using the official design system of
    the french government. As those sites already include the DSFR styles, this
    theme does not provide any styles of its own but only makes use of the correct
    markup and class names.

    See the
    consent manager component
    on the DSFR docs for an overview.

    Internationalization

    Orejime is available in most european languages: Catalan, Dutch, English,
    Estonian, Finnish, French, German, Hungarian, Italian, Norwegian, Occitan,
    Romanian, Spanish, Swedish.

    [!NOTE] Each and every translated text is overridable via
    the configuration.

    Contextual consent

    Content embedded from other websites might be restricted by user consent (i.e. a
    YouTube video).

    In that case, using templates would work just like with scripts:

    <template data-purpose="youtube">
      <iframe src="https://www.youtube.com/embed/toto"></iframe>
    </template>

    However, this won’t show anything until the user consents to the related
    purpose.

    To be a little more user friendly, adding the data-contextual attribute will
    display a fallback notice until consent is given, detailing the reason and
    offering a way to consent in place.

    - <template data-purpose="youtube">
    + <template data-purpose="youtube" data-contextual>
          <iframe src="https://www.youtube.com/embed/toto"></iframe>
      </template>
    Integration tips

    WordPress

    Should you use Orejime in a WordPress website, you could alter the rendering of
    embeds so they use contextual consent:

    function orejimeWrapEmbeds($content, $block) {
    	if ($block['blockName'] === 'core/embed') {
    		return '<template data-purpose="embeds" data-contextual>' . $content . '</template>';
    	}
    
    	return $content;
    }
    
    add_filter('render_block', 'orejimeWrapEmbeds', 10, 2);

    API

    Functions and references are made available on the global scope:

    • loadOrejime(config): creates a new Orejime instance with the given config
      object

    Orejime instance

    • orejime.prompt(): opens the consent modal
    • orejime.manager: the core consent manager
    • orejime.config: the complete config object used

    Manager

    The manager handles the core functionality of Orejime.

    • orejime.manager.getConsent(purposeId): tells if the user has given consent
      to a given purpose
    • orejime.manager.setConsent(purposeId, consent): sets consent to a given
      purpose
    • orejime.manager.clearConsents(): resets consents as if the user never
      interacted with Orejime (this will reopen the banner)
    • orejime.manager.acceptAll(): gives consent to all purposes
    • orejime.manager.declineAll(): revokes consent to all purposes

    Events

    The manager emits events to which you might subscribe to implement side effects:

    orejime.manager.on('update', function (updatedConsents, allConsents) {
      // Consent was granted or denied on some purposes.
      // `updatedConsents` is an object with purpose ids as
      // keys and consent state as values that holds only
      // updated purposes.
      // `allConsents` is similar to `updatedConsents` but
      // contains every purpose configured.
    });
    
    orejime.manager.on('clear', function () {
      // All consents have been reset to their default state.
      // This happens after a call to `orejime.manager.clearConsents()`.
    });
    
    orejime.manager.on('dirty', function (isDirty) {
      // If `isDirty` is true, the menager is in a state where
      // the consents given don't satisfy the constraints of
      // their related purposes (for example, a purpose with
      // the flag `isMandatory` requires explicit consent from
      // the user).
    });

    (See src/core/Manager.ts for a complete overview)

    Migrating

    Version 3

    A major overhaul of the configuration took place in this version, as to clarify
    naming and align more with the GDPR vocabulary.

    Configuration

    If you were already using version 2, a tool to migrate your current
    configuration is available here : https://orejime.boscop.fr/#migration.

    Third-party scripts

    Previous versions of Orejime required you to alter third party script tags. This
    behavior has changed, and you should now leave scripts untouched and wrap them
    in a template, as documented in
    scripts configuration
    (learn why).

    As you can see from the following example, this is simpler and less intrusive:

    - <script
    -   type="opt-in"
    -   data-type="application/javascript"
    -   data-name="google-maps"
    -   data-src="https://maps.googleapis.com/maps/api/js"
    - ></script>
    + <template data-purpose="google-maps">
    +   <script src="https://maps.googleapis.com/maps/api/js"></script>
    + </template>

    Development

    If you want to contribute to Orejime, or make a custom build for yourself, clone
    the project and run these commands:

    npm install
    npm start
    

    You can then open the demo page at http://localhost:3000, which will be
    reloaded automatically whenever the JS or CSS changes.

    License & credits

    This project is licensed under a BSD-3 license.

    Orejime started as a fork of Klaro!. A lot
    of stuff changed since. A few were integrated in the original project, but
    eventually some big bricks changed and it became difficult, or sometimes not
    even necessary, to push those changes in.

    Orejime is maintained by Boscop (French).

    What does “Orejime” mean?

    “Orejime” is a play-on-word. You can pronounce it like “Au régime” in French,
    which means “on a diet”.

    🍪🍪🍪

    Visit original content creator repository
    https://github.com/boscop-fr/orejime

  • defectdojo-client-java

    DefectDojo Client Java

    Java Client to interact with the DefectDojo API.

    Dependency Information

    You can find the latest version and dependency infos on Maven Central.

    Development

    To run a local build clone this repo and just invoke the following command in the repo directory:

    mvn clean install

    Release

    The release process is documented in a separate file.

    Supported DefectDojo Versions

    The client is supposed to be compatible with DefectDojo 1.10 and later, older version of DefectDojo might still work, but are not officially supported.

    Example

    import com.fasterxml.jackson.core.JsonProcessingException;
    import io.securecodebox.persistence.defectdojo.config.Config;
    import io.securecodebox.persistence.defectdojo.service.ProductTypeService;
    
    import java.net.URISyntaxException;
    
    public class DefectDojoClientTest {
        public static void main(String[] args) throws URISyntaxException, JsonProcessingException {
    
            // Configure DefectDojo URl and APIv2 Key
            var conf = new DefectDojoConfig("https://defectdojo.example.com", "f8....");
    
            var productTypeService = new ProductTypeService(conf);
            var productTypes = productTypeService.search();
    
            System.out.println("ProductTypes:");
            for (var productType : productTypes) {
                System.out.println(" - Id: " + productType.getId() + ", Name: '" + productType.getName()) + "'";
            }
        }
    }

    Testing a modified client

    To build a gradle project that depends on this client one can use ./gradlew build --include-build <path_to_this_folder>. Gradle will then build the project with this local version of the the client.

    Visit original content creator repository
    https://github.com/secureCodeBox/defectdojo-client-java

  • defectdojo-client-java

    DefectDojo Client Java

    Java Client to interact with the DefectDojo API.

    Dependency Information

    You can find the latest version and dependency infos on Maven Central.

    Development

    To run a local build clone this repo and just invoke the following command in the repo directory:

    mvn clean install

    Release

    The release process is documented in a separate file.

    Supported DefectDojo Versions

    The client is supposed to be compatible with DefectDojo 1.10 and later, older version of DefectDojo might still work, but are not officially supported.

    Example

    import com.fasterxml.jackson.core.JsonProcessingException;
    import io.securecodebox.persistence.defectdojo.config.Config;
    import io.securecodebox.persistence.defectdojo.service.ProductTypeService;
    
    import java.net.URISyntaxException;
    
    public class DefectDojoClientTest {
        public static void main(String[] args) throws URISyntaxException, JsonProcessingException {
    
            // Configure DefectDojo URl and APIv2 Key
            var conf = new DefectDojoConfig("https://defectdojo.example.com", "f8....");
    
            var productTypeService = new ProductTypeService(conf);
            var productTypes = productTypeService.search();
    
            System.out.println("ProductTypes:");
            for (var productType : productTypes) {
                System.out.println(" - Id: " + productType.getId() + ", Name: '" + productType.getName()) + "'";
            }
        }
    }

    Testing a modified client

    To build a gradle project that depends on this client one can use ./gradlew build --include-build <path_to_this_folder>. Gradle will then build the project with this local version of the the client.

    Visit original content creator repository
    https://github.com/secureCodeBox/defectdojo-client-java

  • ribbit-network-dashboard

    Ribbit Network Dashboard

    Chat

    All Contributors

    dashboard

    This project will create the world’s largest Greenhouse Gas Emissions dataset that will empower anyone to join in the work on climate and provide informed data for climate action.

    Ribbit Network is a large network of open-source, low-cost, Greenhouse Gas (CO2 and possibly methane) Detection Sensors. These sensor units will be sold by the Ribbit Network and will upload their data to the cloud, creating the world’s most complete Greenhouse Gas dataset.

    See more about the Frog Sensors here.

    Dashboard

    The Ribbit Network saves the sensor data and makes it accessible for scientists everywhere to analyze and pinpoint emissions. Using this data we can identify and track emissions, allowing us to verify our assumptions about climate and hold ourselves accountable through corporate, government, and individual action.

    This repository contains the dashboard for that public information

    image

    Current Status

    This dashboard is in it’s very earliest version and needs a lot of work.

    Here is the deployed version of this repo which shows the current live sensor data (Note this dashboard is still experimental and may be down occasionally).

    Technical Details

    Block Diagram

    The application is built as a Dash app.

    It is currently automatically deployed on platform.sh from this repository.

    You can run the website locally on your development machine using the following instructions after cloning this repo:

    On mac/linux

    python3 -m venv env
    source env/bin/activate
    python3 -m pip install -r requirements.txt
    python3 app.py
    

    In the case you may have recently installed or upgraded python, you might run the app but encounter a local issuer certificate error. If you do encounter this, run the Install Certificates.command file in your Python folder (see this issue for more details).

    python3 -m venv env
    env/Scripts/activate
    python3 -m pip install -r requirements.txt
    python3 app.py
    

    On Windows (If using Command Prompt)

    python3 -m venv env
    env\Scripts\activate
    python3 -m pip install -r requirements.txt
    python3 app.py
    

    Once the server is up and running you can visit it locally by going to http://127.0.0.1:8050/

    Contributing

    See the Issues section of this project for the work that I’ve currently scoped out to be done. Reach out to me if you are interested in helping out!

    The contributing guide outlines the process for helping out!

    You can also join our developer discord here.

    Questions?

    Check out the Frequently Asked Questions section. If you don’t see your question, let us know either in a Github Discussion or via Discord.

    Background Information

    See the background research here. This project is inspired by some awesome research by incedible scientists in academia.

    Support

    Ribbit Network is a non-profit (501c3) creating the world’s largest Greenhouse Gas Emissions dataset that will empower anyone to join in the work on climate and provide informed data for climate action. We’re an all volunteer team building everything we do in the open-source community.

    If you would like to consider sponsoring Ribbit Nework you can do via this link. The money is used to pay for software fees, purchase R&D hardware and generally support the mission of Ribbit Network.

    Ribbit Network Code of Conduct

    By participating in this project, you agree to follow the Ribbit Network Code of Conduct and Anti-Harassement Policy. Violations can be reported anonymously by filling out this form .

    Contributors ✨

    Thanks goes to these wonderful people (emoji key):


    Brian Strauch

    💻 🎨 🤔

    Yu Zhang

    💻 🔣 📖

    Steven Pestana

    🐛 💻

    Mujeeb A. Abdulfatai

    📖

    Rishi Kavikondala

    💻

    Srikiran Chandrasekaran

    💻 👀

    Zoltán Nagy

    ⚠️ 💻

    This project follows the all-contributors specification. Contributions of any kind welcome!

    Visit original content creator repository https://github.com/Ribbit-Network/ribbit-network-dashboard
  • fmmax

    FMMAX: Fourier Modal Method with Jax

    Continuous integration PyPI version

    FMMAX is a an implementation of the Fourier modal method (FMM) in JAX. FMMAX was originally developed at Meta Reality Labs to address needs for optical design in AR/VR. This repo is a hard fork of the original repo; the fork was undertaken since FMMAX’s primary author left Meta and its remaining author moved on to a role at Meta outside Reality Labs. The FMMAX pypi project is based on this repo.

    Fourier modal method

    The FMM — also known as rigorous coupled wave analysis (RCWA) — is a semianalytical method that solves Maxwell’s equations in periodic stratified media, where in-plane directions are treated with a truncated Fourier basis and the normal direction is handled by a scattering matrix approach [1999 Whittaker, 2012 Liu, 2020 Jin]. This allows certain classes of structures to be modeled with relatively low computational cost.

    Our use of JAX enables GPU acceleration and automatic differentiation of FMM simulations. Besides these features, FMMAX is differentiated from other codes by its support for Brillouin zone integration, advanced vector FMM formulations which improve convergence, and anisotropic and magnetic materials.

    Brillouin zone integration

    Brillouin zone integration [2022 Lopez-Fraguas] allows modeling of localized sources in periodic structures. Check out the crystal example to see how we model a Gaussian beam incident upon a photonic crystal slab, or an isolated dipole embedded within the slab. The Gaussian beam fields are shown below.

    Gaussian beam incident on photonic crystal

    Vector FMM formulations

    Vector FMM formulations introduce local coordinate systems at each point in the unit cell, which are normal and tangent to all interfaces. This allows normal and tangent field components to be treated differently and improves convergence. FMMAX implements several vector formulations of the FMM, with automatic vector field generation based on functional minimization similar to [2012 Liu]. We implement the Pol, Normal, and Jones methods of that reference, and introduce a new Jones direct method which we have found to have superior convergence. These are supported also with anisotropic and magnetic materials. The vector_fields example computes vector fields by these methods for an example structure.

    Comparison of automatically-generated vector fields

    Anisotropic, magnetic materials

    Our support of anisotropic, magnetic materials allows modeling of uniaxial perfectly matched layers. This is demonstrated in the metal_dipole example, which simulates in vaccuum located above a metal substrate. The resulting electric fields are whown below.

    Dipole suspended above metal substrate with PML

    FMM Conventions

    • The speed of light, vacuum permittivity, and vacuum permeability are all 1.
    • Fields evolve in time as $\exp(-i \omega t)$.
    • If $\mathbf{u}$ and $\mathbf{v}$ are the primitive lattice vectors, the unit cell is defined by the parallelogram with vertices at $\mathbf{0}$, $\mathbf{u}$, $\mathbf{u} + \mathbf{v}$, and $\mathbf{v}$.
    • For quantities defined on a grid (such as the permittivity distribution of a patterned layer) the value at grid index (0, 0) corresponds to the value at physical location $\mathbf{du} / 2 + \mathbf{dv} / 2$.
    • The scattering matrix block $\mathbf{S}_{11}$ relates incident and transmitted forward-going fields, and other blocks have corresponding definitions. This differs from the convention e.g. in photonic integrated circuits.

    Batching

    Batched calculations are supported, and should be used where possible to avoid looping. The batch axes are the leading axes, except for the wave amplitudes and electromagnetic fields, where a trailing batch axis is assumed. This allows e.g. computing the transmission through a structure for multiple polarizations via a matrix-matrix operation (transmitted_amplitudes = S11 @ incident_amplitudes), rather than a batched matrix-vector operation.

    Installation

    FMMAX can be installed via pip:

    pip install fmmax
    

    For developers requiring a local installation, you will need to first clone this repository and then perform a local install from within the root directory using:

    pip install -e ".[dev]"
    

    The [dev] modifier specifies optional dependencies for developers which are listed in pyproject.toml.

    Note: for this to work, it may be necessary to first update your pip installation using e.g. python3 -m pip install --upgrade pip.

    Citing FMMAX

    If you use FMMAX, please consider citing our paper,

    @article{schubert2023fourier,
      title={Fourier modal method for inverse design of metasurface-enhanced micro-LEDs},
      author={Schubert, Martin F and Hammond, Alec M},
      journal={Optics Express},
      volume={31},
      number={26},
      pages={42945--42960},
      year={2023},
      publisher={Optica Publishing Group}
    }
    

    License

    Some portions of FMMAX were created while the author was employed by Meta or by Meta collaborators, with copyright owned by Meta and available under the MIT license. Other portions were created or substantially changed subsequently (copyright not owned by Meta) and are available under the AGPL. Throughout the codebase, a given file may contain code that is owned by Meta, and code which is not. In such a file, the code owned by Meta will be at the end separated by a comment.

    References

    Visit original content creator repository https://github.com/mfschubert/fmmax
  • peac

    Fast Plane Extraction Using Agglomerative Hierarchical Clustering (AHC)

    Legal Remarks

    Copyright 2014 Mitsubishi Electric Research Laboratories All
    Rights Reserved.

    Permission to use, copy and modify this software and its
    documentation without fee for educational, research and non-profit
    purposes, is hereby granted, provided that the above copyright
    notice, this paragraph, and the following three paragraphs appear
    in all copies.

    To request permission to incorporate this software into commercial
    products contact: Director; Mitsubishi Electric Research
    Laboratories (MERL); 201 Broadway; Cambridge, MA 02139.

    IN NO EVENT SHALL MERL BE LIABLE TO ANY PARTY FOR DIRECT,
    INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
    LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
    DOCUMENTATION, EVEN IF MERL HAS BEEN ADVISED OF THE POSSIBILITY OF
    SUCH DAMAGES.

    MERL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
    “AS IS” BASIS, AND MERL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
    SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

    Overview

    This source code package contains our C++ implementation of the AHC based fast plane extraction for organized point cloud (point cloud that can be indexed as an image). There are three folders in this package:

    • include

      Our C++ implementation of the algorithm with dependencies on OpenCV and shared_ptr (from C++11 or Boost).

    • cpp

      Two example C++ console applications using our algorithm to extract planes from Kinect-like point cloud (depends on PCL), with a CMake script to help generating project files.

    • matlab

      A matlab interface (fitAHCPlane.m) through MEX for using our algorithm in matlab. We also provide a wrapper class Kinect.m and kinect_ahc.m to do real-time plane extraction in matlab, partially depends on a 3rd-party toolbox Kinect_Matlab.

    If you use this package, please cite our ICRA 2014 paper:

    Feng, C., Taguchi, Y., and Kamat, V. R. (2014). “Fast Plane Extraction in Organized Point Clouds Using Agglomerative Hierarchical Clustering.” Proceedings of the IEEE International Conference on Robotics and Automation, Hong Kong, China, 6218-6225.

    Version

    1.0

    Installation

    C++ example

    1. Install OpenCV, Boost and PCL (If you install PCL using their all-in-one installer, you directly get Boost installed as well).

    2. Generate project file using CMake under either Windows or Linux.

    3. Compile.

    4. Run the compiled process: plane_fitter (first connect a Kinect to your computer!) or plane_fitter_pcd (first modify plane_fitter_pcd.ini accordingly!).

    5. Enjoy!

    Matlab example

    1. In matlab:
    cd WHERE_YOU_EXTRACT_THE_PACKAGE/matlab/mex
    
    1. Run makefile.m

    2. Select the directories for OpenCV_Include, OpenCV_Lib, and Boost_Include respectively

    3. If everything compiles smoothly:

    cd ..
    
    1. Load a single frame we’ve prepared for you in matlab by:
    load frame
    
    1. Run our algorithm on the point cloud:

    frame.mbs=fitAHCPlane(frame.xyz);
    viewSeg(frame.mbs,640,480)
    
    1. Enjoy!

    2. If you want to play with the kinect_ahc.m with a Kinect, install Kinect_Matlab first.

    Contact

    Chen Feng

    Feel free to email any bugs or suggestions to help us improve the code. Thank you!

    Visit original content creator repository
    https://github.com/ai4ce/peac

  • Gov-network-mining

    用户手册

    概述

    本项目源自网络、群体与市场课程的期末课程设计,程序支持使用结巴分词获取人物、地点、机构三类实体名,以 $\text{network}x$$\text{Neo4j}$ 两种方法构建人物关系网络,在此基础上计算网络属性、$\text{PageRank}$ 、聚集系数、中介中心度、 $\text{Louvain}$ 社区发现以及 $\text{k}$ 短路径。

    项目文件夹下包括源代码目录 src,已计算好的各类分值及预处理后的 $\text{Json}$ 文件目录data_Json,以及从$\text{gov.cn}$ 上获取的新闻数据 $\text{gov_news.txt}$用户可调用函数复现项目内容,也可以根据计算好的 $\text{Json}$ 文件直接获取结果。

    本项目的实现使用 python3.7Neo4j-3.5.11

    **注:**不同版本的 $\text{Neo4j}$ 数据库支持的函数 $\text{API}$ 不全然相同,可根据 $\text{Neo4j}$ 官网说明修改src/Gov_neo4y.pysrc/utils.py 中的部分 $\text{Neo4j}$ 命令行语句,可达到同样的效果。

    文件及参数说明

    1. utils.py

      参数 功能
      $-d$ 需附加参数,参数为预处理结果保存目录,默认为$\text{‘../data/new_data_Json’}$
    2. Gov_networkx.py

      参数 功能
      $-d$ 需附加参数,参数为网络关系文件路径,由数据预处理过程得到,默认为$\text{‘../data/data_Json/relation_filtered.json’}$
      $-n$ 需附加参数,参数为结果文件保存目录,默认为 $\text{‘../data/data_Json’}$
      $-v$ 图的验证,输入一个人名,查询与其关系最强的10个邻居
      $-s$ 图的统计,获取图的结点个数、边数、连通分量个数、最大连通分量大小
      $-cp$ 计算并返回 $\text{PageRank}$影响力 $\text{Top 10}$ 人物及分数,将所有人物的分值保存在结果目录下的 $\text{pagerank_networkx.json}$
      $-cc$ 使用 $\text{Louvain}$ 算法社区挖掘,并将各人所属社区编号保存至结果目录下的 $\text{community_networkx.json}$
      $-cf$ 计算并返回聚集系数 $\text{Top 10}$ 人物及分值,将所有人物的聚集系数保存至结果目录下的 $\text{clustering_coef_networkx.json}$
      $-p$ 读取结果目录下的 $\text{pagerank_networkx.json}$ 文件,获取 $\text{Top 10}$
      $-f$ 读取结果目录下的 $\text{clustering_coef_networkx.json}$ ,获取 $\text{Top 10}$
      $-w$ 获取两节点间的 前$10$ 条最短路径
    3. Gov_neo4j.py

      参数 功能
      $-d$ 需附加参数,参数为网络关系文件路径,由数据预处理过程得到,默认为$\text{‘../data/data_Json/relation_filtered.json’}$
      $-n$ 需附加参数,参数为结果文件保存目录,默认为 $\text{‘../data/data_Json’}$
      $-c$ 创建 $Neo4j$ 数据库
      $-cpr$ 计算 $\text{PageRank}$ 分值,并保存至$Neo4j$ 数据库,作为节点属性
      $-pr$ 获取 $Neo4j$ 中保存的$\text{PageRank}$ 分值,并保存至结果文件夹下 $\text{pagerank_neo4j.json}$
      $-cbc$ 计算中介中心性,并保存至$Neo4j$ 数据库,作为节点属性
      $-bc$ 获取$Neo4j$ 中保存的$\text{Betweenness centrality}$ 分值,并保存至结果文件夹下 $\text{betweenness_centrality.json}$
      $-cl$ 使用 $\text{Louvain}$ 算法划分社区,并将各节点所属社区编号保存至$Neo4j$ 数据库,作为节点属性
      $-l$ 获取各社区包含的所有节点,并保存至结果文件夹下 $\text{community_neo4j.json}$

    数据预处理

    数据预处理部分代码在src/utils.py 中,如下运行即可对新闻数据进行预处理:

    cd src	#进入代码目录文件
    python utils.py		# 使用默认存储目录../data/new_data_Json
    python utils.py -d ../data/new_data_Json # 自定义存储目录

    预处理结果已存放在目录src/data_Json中,用户可直接利用该目录中的数据文件。

    **注:**推荐使用src/data_Json中的 $\text{human_filtered2.json}$$\text{relation_filtered.json}$ 文件,其为作者人工删除掉部分结巴分词得到的“垃圾”数据的结果,例如成语、四字词语、地名、机构名后的人名集合和关系集合,相对原始数据更准确。用户也可自行从头运行数据预处理部分,比对结果。

    该文件主要包括以下两部分功能:

    1. 结巴分词及频度统计:

      使用结巴分词对人名、地名、机构名进行抽取和词频统计,并根据新闻共现关系建立联系。存储在指定目录下的 $\text{human.json,places.json,organs.json}$$\text{relation.json}$ 中。

    2. 实体名排序及过滤

      对三类实体按频度排序,并存储在 $\text{human_sorted1.json, places_sorted.json,organs_sorted.json}$ 文件中。进一步对人名处理,过滤掉其中单字人名,并相应删除对应的关系。保存在 $\text{human_sorted2.json}$$\text{relation_filtered.json}$ 中。


    $Networkx$ 网络分析

    使用 $\text{Networkx}$ 构建和分析网络,实现了网络构建、图的验证、图的统计、$\text{PageRank}$影响力计算、聚集系数计算、$\text{Louvain}$社区挖掘。代码在src/Gov_networkx.py中。

    1. 图的验证

      如下运行 $\text{Gov_networkx.py}$,获取目标人物的 $\text{Top 10}$ 强关系节点。

      cd src
      python Gov_networkx.py -v	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -v	#使用自定义关系数据路径

      根据提示输入人名,输入 $\text{quit}$即可退出。若输入的人名不存在,则程序给出提示,可重新输入人名。

      strong relation.JPG
    2. 图的统计

      如下运行 $\text{Gov_networkx.py}$,获取图的统计信息:

      cd src
      python Gov_networkx.py -s	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -s	#使用自定义关系数据路径

      输出结点数、边数、连通分支数、极大连通分支节点数:

      statistics.JPG
    3. $\text{PageRank}$影响力

      用户可直接使用计算好的文件输出 $\text{PageRank Top 10}$ ,也可以选择重新计算 $\text{PageRank}$ 并保存。

      a. 计算 $\text{PageRank}$ 并保存结果

      ​ 如下运行 $\text{Gov_networkx.py}$,在输出 $\text{Top 10}$ 人物的同时,将所有节点的分值保存至指定目录下的 $\text{pagerank_networkx.json}$

      cd src
      python Gov_networkx.py -cp	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cp	#使用自定义关系数据路径,自定义输出结果目录

      b. 直接获取 $\text{PageRank}$

      ​ 如下运行 $\text{Gov_networkx.py}$,在输出 $\text{Top 10}$ 人物的同时,将所有节点的分值保存至指定目录下的 $\text{pagerank_networkx.json}$

      cd src
      python Gov_networkx.py -p	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -p	#使用自定义关系数据路径,自定义结果目录(pagerank_networkx.json所在目录)
      pagerank.JPG
    4. 聚集系数计算

      用户可直接使用计算好的文件输出聚集系数 $\text{Top 10}$ ,也可以选择重新计算聚集系数并保存。

      a. 计算聚集系数并保存结果

      ​ 如下运行 $\text{Gov_networkx.py}$,在输出 $\text{Top 10}$ 人物的同时,将所有节点的分值保存至指定目录下的 $\text{clustering_coef_networkx.json}$

      cd src
      python Gov_networkx.py -cf	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cf	#使用自定义关系数据路径,自定义输出结果目录

      b. 直接获取聚集系数

      ​ 如下运行 $\text{Gov_networkx.py}$,在输出 $\text{Top 10}$ 人物的同时,将所有节点的分值保存至指定目录下的 $\text{clustering_coef_networkx.json}$

      cd src
      python Gov_networkx.py -p	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -p	#使用自定义关系数据路径,自定义结果目录(clustering_coef_networkx.json所在目录)
      cluster_coef.JPG
    5. $\text{Louvain}$社区挖掘

      如下运行 $\text{Gov_networkx.py}$,将所有节点所属社区保存至指定目录下的 $\text{community_networkx.json}$

      cd src
      python Gov_networkx.py -cc	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cc	#使用自定义关系数据路径,自定义结果目录

      正确运行输出如下:

      community.JPG

    6. 小世界现象:$\text{K}$ 短路径

      如下运行 $\text{Gov_networkx.py}$,使用 $\text{Yen’s}$ 算法获取节点间最短路径:

      cd src
      python Gov_networkx.py -w	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -w	#使用自定义关系数据路径

      根据提示输入源节点和目标节点人名,输入 $\text{quit} $即可退出。

      small_world.jpg

    $Neo4j$ 网络分析

    使用图数据库 $Neo4j$ 进行网络的构建和指标计算,实现了 $\text{PageRank}$ 计算、中介中心性计算和 $\text{Louvain}$ 社区挖掘。代码在src/Gov_neo4j.py中。

    **注:**使用该部分代码需要用户安装或在线使用 $Neo4j$ 数据库。

    1. $Neo4j$ 数据库导入数据,构建网络

      如下运行 $\text{Gov_neo4j.py}$,构建图数据库:

      cd src
      python Gov_neo4j.py -c	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -w	#使用自定义关系数据路径

      代码正确运行输出如下,首先连接 $Neo4j$ 数据库,然后清空当前数据库,将网路节点及关系插入数据库。

      neo4j.jpg
    2. $\text{PageRank}$ 影响力

      首次运行时,用户需先调用 $-cpr$ 计算 $\text{PageRank}$ 分值并保存至数据库,再调用 $-pr$ 获取分值。此后可直接调用 $-pr$ 获取分值。调用 $-pr$ 在输出 $\text{Top 10}$ 的同时,也将结果保存至结果目录下的 $\text{pagerank_neo4j.json}$ 文件中。

      cd src
      # 首次运行示例
      python Gov_neo4j.py -cpr -pr	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cpr -pr	#使用自定义关系数据路径,自定义结果保存目录
      # 非首次运行示例
      python Gov_neo4j.py -pr
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -pr	#使用自定义关系数据路径,自定义结果保存目录
    3. 中介中心性 $\text{Betweenness centrality}$

      首次运行时,用户需先调用 $-cbc$ 计算 $\text{Betweenness centrality}$ 分值并保存至数据库,再调用 $-bc$ 获取分值。此后可直接调用 $-bc$ 获取分值。调用 $-bc$ 在输出 $\text{Top 10}$ 的同时,也将结果保存至结果目录下的 $\text{beteenness_centrality_neo4j.json}$ 文件中。

      cd src
      # 首次运行示例
      python Gov_neo4j.py -cbc -bc	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cbc -bc	#使用自定义关系数据路径,自定义结果保存目录
      # 非首次运行示例
      python Gov_neo4j.py -bc
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -bc	#使用自定义关系数据路径,自定义结果保存目录
    4. $\text{Louvain}$ 社区挖掘

      首次运行时,用户需先调用 $-cl$ 划分社区并保存至数据库,再调用 $-l$ 将结果保存至结果目录下的 $\text{Louvain_neo4j.json}$ 文件中,且文件形式为社区及其内部成员名单。

      cd src
      python Gov_neo4j.py -cl -l	# 使用默认关系数据路径
      python Gov_networkx.py -d ../data/data_Json/relation_filtered.json -n ../data/data_Json -cl -l	#使用自定义关系数据路径,自定义结果保存目录
    Visit original content creator repository https://github.com/Guan-JW/Gov-network-mining
  • PAKPLANTS_Webapp


    Final Year Project: PAKPLANTS

    This repository contain all the backend of project PAKPLANTS

    PAKPLANTS is a mobile application that allow user to to identify plants only using images of their respective leaves image by uploading or capturing at real time It also allow user to identify plantation area left in an satellite images uploaded by user. Finally, offer an e-commerce store integrated inside the application.

    PAKPLANTS is based on deep learning and image processing techonology!

    screenshot screenshot

    Built With

    • Flutter
    • tenserflow
    • Keras
    • AWS
    • FASTAPI
    • OpenCV

    Live Demo

    Live Demo Link

    Front-end Link

    Front-end Link

    Setup

    If you installed git you can clone the code to your machine, or download a ZIP of all the files directly.

    Run the following git command to clone the files to your machine:

    git clone https://github.com/AbdulWajid99/PAKPLANTS_Webapp.git
    • Once the files are on your machine, open the html-css-javascript-getting-started folder in Visual Studio Code

    Authors

    👤 Author1 GitHub: @githubhandle)

    👤 Author2 GitHub: @githubhandle)

    👤 Author3 GitHub: @githubhandle)

    👤 Author4 GitHub: @githubhandle)

    🤝 Contributing

    Contributions, issues, and feature requests are welcome!

    Feel free to check the issues page.

    Show your support

    Give a ⭐️ if you like this project!

    📝 License

    This project is MIT licensed.

    Visit original content creator repository https://github.com/AbdulWajid99/PAKPLANTS_Webapp
  • Data_Logger

    Next generation of data logger for varied range support of sensors.

    A standalone platform to get environmental impact around organisms (animals). Enable long-term observations of different selectable sensors (I2C Interfaces). Two pulse counters are included to get lightbarrier activity.

    Authors: Loës P., Kempenaers B.(2021) DOI

    Main advantages against other data logger:

    • Available sensors can be freely combined as required.(Firmware adaption)
    • Daily regular synchronisation from date and time with DCF77 radio clock receiver.(Firmware adaption)
    • Long battery life with lithium battery. (max.17V)
    • SD Card includes configuration file.
    • Activation times for sensors (x5) to collect data.

    Hardware Design (first draft) supported:

    The following firmware is not reviewed.

    • Sensirion: Humidity and Temperature Sensor SHT3x-DIS
    • Sensirion: CO₂, Humidity and Temperature Sensor SCD30
    • Vishay: Fully Integrated Proximity and Ambient Light Sensor with Infrared Emitter VCNL4040
    • Pulse Counter

    My image

    Board Dimensions: 80mm x 60mm

    Raw data on SD Card:

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/4_rawdata_BOX0999.TXT

    Configuration data on SD Card:

    https://github.com/peterloes/Data_Logger/blob/main/Software/CONFIG.TXT

    Schematics:

    https://github.com/peterloes/Data_Logger/blob/main/Schematics/Logger.sch.pdf

    Housing:

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/11_Electronic_housing.jpg

    Hyperterminal Screens

    Shows SHT31X-D (0x45) and SHT31X-D (0x45)

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/3_Hyperterminal_3.jpg

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/3_Hyperterminal_4.jpg

    In operation with Interval (configuration.txt) : 3,2V@0,54mA

    Shows Vishay VCNL4040 (0x60) and SHT31X-D (0x45)

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/3_Hyperterminal_5.jpg

    Shows Vishay VCNL4040 (0x60) and Sensirion SCD30 CO2 (0x61)

    https://github.com/peterloes/Data_Logger/blob/main/Getting_Started_Tutorial/3_Hyperterminal_6.jpg

    Board Power

    • Lithium battery 17V/300mA(maximum) e.g. 12,8V 7,5Ah 96Wh
    • LS14250 Primary Lithium-Thionyl chloride 3.6V/1200mAh

    Sensors can powered by VBATT_1(3.3V), VBATT_2(3V):

    • Sensirion: Humidity and Temperature Sensor SHT3x-DIS: 600µA@3,3V

    • Sensirion: CO₂, Humidity and Temperature Sensor SCD30: max.75mA@3,3V

    • Vishay: Proximity Sensor and Ambient Light Sensor VCNL 4040: 300µA@2,5V

      Similar Software(SensorMon.c): https://github.com/peterloes/HRD_SENSOR

    Optional components:

    https://github.com/peterloes/Clock_receiver_RFID-MS_MOMO_TAMDL

    https://github.com/peterloes/Booter_RFID-MS_MOMO_TAMDL

    Outlook:

    The Data Logger can feature two arrays with different sensors over 25 meters. (sensor-array x 2)

    C is the Greenest Programming Language

    To achieve its power and energy-efficiency features, EFM32 products utilize ultralow active and idle power, fast wakeup and processing times, and most important, the ability to intelligently interact with peripherals and sensors autonomously without waking up the CPU and consuming more power.

    Visit original content creator repository https://github.com/peterloes/Data_Logger
  • WomenFashionProductRecommendationSystem

    Women’s Fashion Product Recommendation System

    A project for Major Project Subject and Graduation Thesis Subject at Ho Chi Minh Open University. (Completed)

    Time:

    • Major project (đồ án ngành): Sept 2024 – Jan 2025
    • Graduation Thesis (khóa luận tốt nghiệp): Feb 2025 – June 2025

    Language: Vietnamese

    Abstract

    With the rapid growth of e-commerce, the demand for online fashion shopping, particularly in women’s fashion, has significantly increased. However, the huge amount of information available has led to information overload, making it confusing for customers to make purchasing decisions. The aim of this project is to solve the challenge that customers are facing in making decisions on e-commerce platforms. The project consists of two main parts: collecting and analyzing data to evaluate current shopping trends and designing a recommendation system to assist customers in selecting suitable products.

    Data Source

    Major project

    • All the data are collected by scraping real data from websites.
    • The code for both scraping data and analyzing data progress is in MajorProject_2024/collect_analysis_data.ipynb.
    • The code for both scraping data and analyzing data progress is in MajorProject_2024/analysis_data.ipynb.
    • Collected data are stored in *.csv and *.txt formats.
    • Cleaned data are stored in *.csv format with filenames containing ‘cleaned_’

    Graduation Thesis

    • All the data are collected by scraping real data from websites.
    • The code for both scraping data progress is stored in GraduationThesis_2025/crawl_data.ipynb.
    • The code for scraping data and visualizing data progresses are stored in GraduationThesis_2025/preprocessing_data.ipynb.
    • Collected data are stored in *.csv formats.
      • The raw product data is stored as GraduationThesis_2025/getdata/thoi_trang_nu.csv.
      • The cleaned version is stored as GraduationThesis_2025/getdata/combined_data.csv.
      • Product reviews extracted from the site are stored in GraduationThesis_2025/getcomment/combined_data.csv.
    • Collected images are stored in GraduationThesis_2025/getImages folder as *.jpg files.
    • There is a place-holder image named placeholder.jpg.
    • The code for creating the database and attached triggers, procedures, views are stored in *.sql formats.
    • Backup database files are stored in GraduationThesis_2025/db_backup_mysql.zip.
    • If you use the backup file, you do not need to run the *.sql scripts manually.
    • Preprocessed and visualized data are also backed up in GraduationThesis_2025/backup/df_product.csv and GraduationThesis_2025/backup/df_cmt.csv in case of data loss.
    • Due to privacy constraints, actual customer data from the e-commerce platform is not available.
      • All customer-related and user-related data used in this project are random generated for demonstration and evaluation of the recommendation system.
      • The folder GraduationThesis_2025/eCommerce_backup contains 13 *.csv files corresponding to 13 database tables on the database.
    • Folder GraduationThesis_2025/RecSys contains *.py files for the eCommerce recommendation system.

    Reports

    • The official Major Project report (approved and graded by the IT Faculty of Ho Chi Minh City Open University) is available in *.pdf format as Official_BC_DAN.pdf.
    • The official Graduation Thesis report is available in *.pdf format as BC_KLTN.pdf.
    • Images used in reports are stored in folder Images.

    Usage

    • To use this project, ensure you update file paths if you intend to import or load datasets using the provided code.
    • To launch the system interface, run the command in cmd: streamlit run [local_path]/RecSys/ecommerce_app.py (ensure Streamlit is installed).

    Technologies and techniques

    • Web Scraping: Using Selenium for automated data extraction.
    • Data Processing: Preprocessing techniques to clean and prepare data.
    • Clustering: Implementing K-Means and DBSCAN for clustering product types.
    • Natural Language Processing (NLP): Analyzing customer feedback and classifying categories of products.
    • Visualization: Generating insights using data visualization by Matplotlib, Seaborn and Plotly.
    • System Design: Designing the architecture for the recommendation system.
    • Web Performance: UI built with Streamlit
    • Database: Data retrieval using PyMySQL to interact with a MySQL database.

    Notes

    • The report included in this repository is for reference purposes only. Please do not edit or reuse it for any other purpose.
    • All code and files are created by me. If you reuse any part of the code, please add appropriate citations.

    Reference

    [1] T. T. T. Thanh, “Phân tích xu hướng mua hàng của khách hàng trên các trang thương mại điện tử,” 2024.

    [2] D. Nichter, Efficient MySQL Performance: Best Practices and Techniques, O’Reilly, 2022.

    [3] “MySQL,” Oracle, [Trực tuyến]. Available: https://www.mysql.com/.

    [4] I. Naoki, “PyMySQL documentation,” 2023. [Trực tuyến]. Available: https://pymysql.readthedocs.io/en/latest/index.html.

    [5] Streamlit, “Streamlit,” Snowflake Inc., [Trực tuyến]. Available: https://streamlit.io/.

    [6] U. S. K. A. H. I. I. F. M. A. T. &. L. S. Javed, “A Review of Content-Based and Context-Based,” International Journal of Emerging Technologies in Learning, tập 16, 2021.

    [7] S. Ari Nurcahya, “Content-based recommender system architecture for similar ecommerce products,” Jurnal Informatika, tập 14, 2020.

    [8] D. G. Z. X. K. S. Antaris Stefanos, “Content-Based Recommendation Systems,” 2008.

    [9] M. d. G. a. G. S. Pasquale Lops, “Content-based recommender systems: State of the art and trends,” Recommender systems handbook, pp. 73-105, 2011.

    [10] H. Tiep, “Bài 24: Neighborhood-Based Collaborative Filtering,” 2017. [Trực tuyến]. Available: https://machinelearningcoban.com/2017/05/24/collaborativefiltering/#-user-usercollaborative-filtering.

    [11] Google Developers, “Matrix factorization,” [Trực tuyến]. Available: https://developers.google.com/machinelearning/recommendation/collaborative/matrix?utm_source=chatgpt.com#choosing110_the_objective_function.

    [12] J. K. J. R. J. Ben Schafer, “Recommender Systems in E-Commerce,” Proceedings of the 1st ACM conference on Electronic commerce, pp. 158-166, 1999.

    Visit original content creator repository
    https://github.com/tathithienthanh/MajorProject_WomenFashionProductRecommendationSystem