Blog

  • reflow

    Reflow 🚀

    An opinionated workflow tool for Typescript projects 🚀

    Reflow is aimed at reducing the complexity in setting up a proper dev environment for typescript projects.

    Features

    Installation

    Install locally:

    npm install @eriicafes/reflow

    And initialise:

    npx reflow init

    Or install both globally and locally (preferred):

    npm install -g @eriicafes/reflow # global
    
    npm install @eriicafes/reflow #local

    And initialise:

    reflow init

    With a global installation you will not be required to use npx. Global installation is preferred as reflow still requires a local installation and will always run the locally installed binary when available.

    Usage/Examples

    Examples below assume you have both a global installation and a local installation, for local installation only you will have to prefix the command with npx

    All commands have a -h or --help flag to display a help message.
    Nearly all commands have a -d or --dry-run flag useful to see the commands that would run without actually making any changes.
    Command arguments in square brackets [] are optional while those in angle brackets <> are required.

    Initialise reflow workspace

    reflow init
    
    Options:
      -n --no-install  turn off automatic package installation
      --lib            initialize as an npm library

    Branching

    create and checkout new branch

    reflow branch [name] [parent]

    rename the current branch

    reflow branch -r [name]

    Checkout

    reflow checkout [branch]

    checkout with search on branches (this examples searches for all branches beginning with feat)

    reflow checkout feat

    Merge

    merge branch to the main branch (whether on the main branch or on the branch to be merged)

    reflow merge
    
    Options:
      --prefer-ff   always perform a fast-foward merge (default: false)

    Commit

    reflow commit
    
    Options:
      --retry     retry last commit attempt

    Push

    push branch to remote (prompts to sets upstream if not available)
    force push is a bit less dangerous as the following flags are attached -f --force-with-lease --force-if-includes

    reflow push
    
    Options:
      -f --force  force push

    Release

    make a release (bump version, tag commit and push changes)
    would usually only be run on a CI/CD pipeline except if -f or --force flag is used

    reflow release
    
    Options:
      -f --force      force release when not in a CI environment (default: false)
      -a --as <type>  release with a specific version type
      --no-push       prevent pushing changes and tags to remote

    NOTE: For projects that started with a major version at zero (0.y.z) you may need some manual action to bump the major version to 1.0.0. Once the project is ready for the first major release, run the command below from the main branch:

    reflow release --as major -f

    Prerelease

    make a pre-release (eg. v1.0.1-{tag}.0)

    reflow prerelease
    
    Options:
      -t --tag <name>  pre-release tag
      --as <type>      release with a specific version type
      --no-push        prevent pushing changes and tags to remote

    for example if version is at 0.1.0 and we want to make a prerelease with an alpha tag and release as a a minor version:

    reflow prerelease -t alpha --as minor

    this will bump the version from 0.1.0 to 0.2.0-alpha.0

    Generate Files

    type includes configs, actions and hooks, file is the file name, run the command without any arguments to see all possible files to generate

    reflow generate [type] [file]
    
    Options:
       -c --common   generate all common template files
       -a --all      generate all template files

    Actions (github actions)

    When you run reflow init a test.yml workflow will be generated, which will run tests and build using npm test and npm run build respectively.
    All actions are listed below:

    • test.yml (run tests and build)
    • version.yml (bump version and push new update with tags) requires a VERSION_TOKEN secret containing a Github Personal Access Token with repo permissions
    • release.yml (triggered by version.yml workflow, creates a draft github release)
    • publish.yml (triggered by release.yml workflow, publishes package to NPM) requires an NPM_TOKEN secret containing an NPM Access Token

    All actions can be modified as needed

    Advanced (configure reflow CLI)

    For some use cases you may need to override certain defaults in the reflow config by first generating the config file using reflow generate and selecting config/reflow (which is probably the last item on the list)

    Below are the defaults which you may customize as needed:

    {
      "mainBranch": "main",
      "remote": "origin",
      "branchDelimeter": "/",
      "allowedBranches": [
        "feature",
        "fix",
        "chore",
        "refactor",
        "build",
        "style",
        "docs",
        "test"
      ],
      "keepMergeCommits": true
    }

    Contributing

    Pull requests are always welcome!

    Authors

    Visit original content creator repository
    https://github.com/eriicafes/reflow

  • flutter-reaction-effects

    🍀 Package help show popup reaction like Facebook and wrapper for widget (Show anyone who reaction this message).

    🍀🍀 Preview

    Features

    • Support show popup emotions picker
    • Support reaction wrapper for message card use case

    Usage

    • Show reaction popup
            GestureDetector(
              onTapDown: (details) {
                ReactionAskany.showReactionBox(
                  context,
                  offset: details.globalPosition,
                  boxParamenters: boxParamenters,
                  emotionPicked: _emotion,
                  handlePressed: (Emotions emotion) {
                    setState(() {
                      _emotion = emotion;
                    });
                  },
                );
              },
              child: widget.buttonReaction,
            ),
    • Use reaction wrapper – useful for reaction message
                ReactionWrapper(
                  boxParamenters: ReactionBoxParamenters(
                    brightness: Brightness.light,
                    iconSize: 26,
                    iconSpacing: 10,
                    paddingHorizontal: 30,
                    radiusBox: 40,
                    quantityPerPage: 6,
                  ),
                  buttonReaction: const Padding(
                    padding: EdgeInsets.only(top: 2.0),
                    child: Icon(
                      Icons.face_outlined,
                      size: 20.0,
                      color: Colors.grey,
                    ),
                  ),
                  child: Container(
                    padding: const EdgeInsets.symmetric(
                      vertical: 12.0,
                      horizontal: 20.0,
                    ),
                    decoration: BoxDecoration(
                      color: Colors.greenAccent.shade100,
                      borderRadius: BorderRadius.circular(30),
                    ),
                    child: const Text(
                      'Message from lambiengcode <3',
                    ),
                  ),
                ),

    ReactionBoxParamenters

    parameter description default
    iconSize Size of emotion in reaction box 20
    iconSpacing Padding horizontal value for each emotion 8
    paddingHorizontal Padding horizontal value for reaction box 16
    radiusBox Radius circular of reaction box 10
    quantityPerPage Number of emotions per page view 5
    brightness Set brightness for show background color compatitive Brightness.light

    Download Askany

    License – lambiengcode

    MIT License
    
    Copyright (c) 2022 Askany
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    
    
    Visit original content creator repository https://github.com/Askany-NDN/flutter-reaction-effects
  • flutter-reaction-effects

    🍀 Package help show popup reaction like Facebook and wrapper for widget (Show anyone who reaction this message).

    🍀🍀 Preview

    Features

    • Support show popup emotions picker
    • Support reaction wrapper for message card use case

    Usage

    • Show reaction popup
            GestureDetector(
              onTapDown: (details) {
                ReactionAskany.showReactionBox(
                  context,
                  offset: details.globalPosition,
                  boxParamenters: boxParamenters,
                  emotionPicked: _emotion,
                  handlePressed: (Emotions emotion) {
                    setState(() {
                      _emotion = emotion;
                    });
                  },
                );
              },
              child: widget.buttonReaction,
            ),
    • Use reaction wrapper – useful for reaction message
                ReactionWrapper(
                  boxParamenters: ReactionBoxParamenters(
                    brightness: Brightness.light,
                    iconSize: 26,
                    iconSpacing: 10,
                    paddingHorizontal: 30,
                    radiusBox: 40,
                    quantityPerPage: 6,
                  ),
                  buttonReaction: const Padding(
                    padding: EdgeInsets.only(top: 2.0),
                    child: Icon(
                      Icons.face_outlined,
                      size: 20.0,
                      color: Colors.grey,
                    ),
                  ),
                  child: Container(
                    padding: const EdgeInsets.symmetric(
                      vertical: 12.0,
                      horizontal: 20.0,
                    ),
                    decoration: BoxDecoration(
                      color: Colors.greenAccent.shade100,
                      borderRadius: BorderRadius.circular(30),
                    ),
                    child: const Text(
                      'Message from lambiengcode <3',
                    ),
                  ),
                ),

    ReactionBoxParamenters

    parameter description default
    iconSize Size of emotion in reaction box 20
    iconSpacing Padding horizontal value for each emotion 8
    paddingHorizontal Padding horizontal value for reaction box 16
    radiusBox Radius circular of reaction box 10
    quantityPerPage Number of emotions per page view 5
    brightness Set brightness for show background color compatitive Brightness.light

    Download Askany

    License – lambiengcode

    MIT License
    
    Copyright (c) 2022 Askany
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
    
    
    Visit original content creator repository https://github.com/Askany-NDN/flutter-reaction-effects
  • clear-regex

    clear-regex

    Write regular expressions clearly with comments and named matches.

    Usage

    The most convenient way to use clear-regex is with tagged template literals. This way it’s easy to

    • split regular expression accross lines
    • add comments
    • use other regexes or values inside the new regex

    const crx = require('clear-regex');
    
    const yearRx = /\d{4}/;
    const monthRx = /\d{2}/;
    const dayRx = /\d{2}/;
    
    const myNewRegex = crx`
            # this matches date strings like '2019-01-13'
            ${yearRx}-      # this is the year part
            ${monthRx}-     # month part
            ${dayRx}        # day part
        `;

    The comments, whitespace and newline characters get stripped away and the result of the above is the same as

    const myNewRegex = /\d{4}-\d{2}-\d{2}/;

    Comments

    The comments begin with a # character and go until the end of the line. Use them to explain what a certain part of your regular expression does.

    const phoneNumber = crx`
        # matches phone numbers
        #
        # there can be any number of digits
        # optionally grouped with spaces or dashes
        #
        ^\s*            # optional whitespace at the beginning
        (\+|0+)         # start with a plus or zeros
        (               # begin group od digits
            ([- ])?     # optional delimiter
            (\d+)       # some digits
        )+              # end group of digits
        \s*$            # optional whitespace at the end
    `;

    Placeholders

    If you use clear-regex as a tagged template literal, you can use placeholders to insert literal values or other regular expressions into your new regex. This makes dynamic regexes and reuse convenient.

    const year = 2019;
    const monthRx = /\d{2}/;
    const dayRx = /\d{2}/;
    
    // match a date date string in 2019
    const dateRx = crx`^${year}-${monthRx}-${dayRx}`;

    Named matching groups

    You can use give names to your matching groups. This will make it easier to retrieve them from a matching result. The name tags look like ?<name>.

    const regex = crx`^
        (?<year>\\d{4})-
        (?<month>\\d{2})-
        (?<day>\\d{2})
    $`;
    
    '2019-01-13'.match(regex);
    
    // the result contains the groups prop with
    // the named matches
    //
    // {
    //     ...
    //     groups: {
    //         day: '13',
    //         month: '01',
    //         year: '2019'
    //     }
    // };

    Using flags

    To use flags with the tagged template literals, start and end your reges with slashes, as you normally would, and put the flags after the closing slash.

    const regex = crx`/
        ice
        (cream|coffee)
        /gi`;
    
    // this is the same as
    const sameRegex = /ice(cream|coffee)/gi;

    Visit original content creator repository
    https://github.com/neno-giscloud/clear-regex

  • insta-follow-unfollow-bot

    insta-follow-unfollow-bot

    Bot created for a spanish industrial engineering job fair’s official instagram account.

    What does it have to do

    The fair social media team wants to build up their instagram account.
    They have gathered some instagram accounts related to different branches of engineering, and they have organized them in groups.

    Each day they want to follow the followers of each “engineering” group of accounts.
    Three days later, they want to unfollow these accounts (the ones who where public or accepted).

    They want to keep on doing this cycle of following and unfollowing.

    How to use it

    following.py receives a file as an argument containing the accounts to follow, and follows them.

    generate_following_list.py takes a file containing the accounts of an “engineering group”, grabs their followers, removes duplicates and saves these accounts in another file. Both files should be argumentso of the script.

    unfollowing.py takes a file as an argument containing the accounts followed, and unfollows the ones who didn’t follow back.

    Disclaimer:

    Instagram may (most-certainly to be honest) apply soft bans to your account if you use this.

    Visit original content creator repository
    https://github.com/juan-serrano-soria/insta-follow-unfollow-bot

  • tbpp-cf3

    Compact Models for the Temporal Bin Packing Problem with Fire-Ups (V3)

    This repository contains compact models for the Temporal Bin Packing Problem with Fire-Ups.
    The problem was introduced in [1].
    Some improvements for the basic models were proposed in [2] and [3] (cf. the repository tbpp-cf2).
    A preliminary version of a paper explaining the implemented models can be found in [4].

    Examples

    Example files are contained in the examples directory.

    Installation

    pip install .
    

    Data of Benchmark Instances

    The data for the benchmark instances can be found here and here.

    References

    [1]
    Aydın, N., Muter, İ., & Birbil, Ş. İ. (2020). Multi-objective temporal bin packing problem: An application in cloud computing. Computers & Operations Research, 121, 104959.

    [2]
    Martinovic, J., Strasdat, N., & Selch, M. (2021). Compact integer linear programming formulations for the temporal bin packing problem with fire-ups. Computers & Operations Research, 105288.

    [3]
    Martinovic, J., Strasdat, N., Valério de Carvalho, J., & Furini, F. (2022). Variable and constraint reduction techniques for the temporal bin packing problem with fire-ups. Optimization Letters, 1-26.

    [4]
    Martinovic, J. & Strasdat, N. (2022). Theoretical Insights and a New Class of Valid Inequalities
    for the Temporal Bin Packing Problem with Fire-Ups
    . Preprint MATH-NM-01-2022, Technische
    Universität Dresden

    Visit original content creator repository
    https://github.com/wotzlaff/tbpp-cf3

  • hiptionary

    The Hiptionary

    Travis Build Status

    Hpstr.me Icon

    The meta-data behind the hpstr.me api.

    The Data

    The hipster generator works in two modes: bio’s and postcards.

    From bios.json and postcards.json we pull together the opening, body and closings to create our Hipster template. The values in dictionary.json and names.json are used to fill in the template with randomised values.

    An example body in bios is:

    "Was into {adjective} {thing} before it was cool."
    

    If this body is chosen, the generator will then replace the {adjective} and {thing} tokens with respective random values from the dictionary.

    Syntax

    We have come up with a very simple DSL to represent our data.

    (Value one,Value two,Value) – The generator will randomly choose one of the comma delimited values and replace the entire bracket enclosed block with the chosen value.

    {adjective} – Inserts a random adjective at the given location. The same is done for things, venues etc. (see bios.json or postcards.json for examples).

    {adjective|article} – The pipe is followed by a command which is applied to the first piece of data. For example: the ‘article’ command will add ‘a’ or ‘an’ before the chosen value. So {adjective|article} might end up as “an inspired” or “a healing”. Other commands include: plural and sentence which pluralise or sentence case the resulting word.

    Contributing

    Please feel free to create a pull request to add new terms, phrases and names. If your pull request is accepted then your contributions will start appearing on the live site for everyone to enjoy…or not, because we don’t want it getting popular otherwise it won’t be cool anymore.

    Visit original content creator repository https://github.com/HatchApps/hiptionary
  • BTC-Predictor

    Disclaimer

    Predicting the stock market or cryptocurrency prices, such as Bitcoin (BTC), is inherently uncertain and involves significant risk. The models and methodologies used in this project are based on historical data and machine learning techniques, which may not accurately predict future market movements. This project is intended for educational purposes only. The insights and predictions generated by this model should not be considered financial advice or a recommendation to invest. Users are advised to conduct their own research and consult with a professional financial advisor before making any investment decisions. The creator of this project is not responsible for any financial losses that may occur as a result of using this model or any predictions it generates.

    BTC-Predictor

    Bitcoin (BTC) is a digital currency that operates on a decentralized network using blockchain technology. It was introduced in 2008 by an anonymous person or group of people using the pseudonym Satoshi Nakamoto and was released as open-source software in 2009.

    In this project, I am developing a Bitcoin (BTC) price prediction model utilizing Long Short-Term Memory (LSTM) networks. LSTM, a type of recurrent neural network (RNN), is particularly well-suited for sequence prediction problems due to its ability to capture temporal dependencies. Given the highly volatile nature of cryptocurrency markets, accurately forecasting BTC prices can provide significant insights for traders and investors. This model aims to analyze historical price data and predict future BTC price movements, helping users make more informed trading decisions.

    I have collected BTC price data from May 2016 to May 2024, spanning 8 years, using the Historic_Crypto library. The code to scrape the data is inside Data_Collection.ipynb file.
    The size of this data is 0.265 GB, which made it difficult to upload to GitHub. Therefore, I broke down the data file into four parts and uploaded their zip files. All the required explaination is provided inside BTC_Prediction.ipynb.

    Next I have made a comparision between RNN, LSTM & GRU in the RNN_LSTM_GRU.ipynb file. In this file I have also made future prediction of 10 days from 31st May 2024 to 10th June 2024, this future data is saved inside Future_10_days.csv file.

    For deep understanding read my article :- Mastering RNN, LSTM, GRU

    Visit original content creator repository
    https://github.com/ES7/BTC-Predictor

  • q-lako

    q-lako

    On push CodeQL codecov

    logo

    q-lako is a service to quickly register equipments and books. q-lako is a web app that helps you to manage books and supplies purchased on Amazon.

    Retrievable information

    Get the following information on purchased books and supplies to help you register supplies.

    • Product Title
    • ASIN Code
    • Image (url)
    • URL
    • Manufacturer
    • Contributors
    • Publication Date
    • Product Group
    • Registrants Name
    • Default Positions
    • Current Positions
    • Note
    • Features

    Requirements

    How to

    Enter Python Virtual Environment

    python3 -m venv venv
    source venv/bin/activate
    export ARCHFLAGS="-arch x86_64"
    pip install --upgrade pip
    pip install --upgrade --use-feature=2020-resolver -r requirements.txt

    The reason why ARCHFLAGS needs to be specified is due to Apple’s bugs in Xcode12. It is recommended to explicitly specify the resolver options until pip version 20.3.

    Prepare .env and .env.gpg

    Write the API Key to .env and encrypt it. Keep your passphrase in a secure location like YubiKey.

    1. Prepare .env

      airtable_base_id="airtable_base_id"
      airtable_api_key="airtable_api_key"
      amazon_partner_tag="amazon_partner_tag"
      amazon_access_key="amazon_access_key"
      amazon_secret_key="amazon_secret_key"
    2. Encrypt .env to create .env.gpg

      gpg --symmetric --cipher-algo AES256 .env

    3. Use your passphrase to decrypt .env.gpg .

      gpg --quiet --batch --decrypt --output=.env .env.gpg

    Prepare settings.ini

    [THEME-COLOR]
    theme_color_blue=#4caaba
    theme_color_gray=#393e46
    
    [AIRTABLE]
    airtable_table_name=q-lako
    
    [ASSET-PROPERTY]
    positions=sforzando Kawasaki,shin house,tomoya house,yusuke house
    registrants=shin-sforzando,tomoya-sforzando,yusuke-sforzando

    Run

    python main.py

    If you start it locally, it will start in Debug mode.

    1. Access to http://0.0.0.0:8888/
    2. Enter keywords or ISBN/ASIN code in the search window and press the search button
    3. Displays a list of items related to the keywords you have entered
    4. Select any item from the list of items and press the Select button
    5. The item’s details are displayed
    6. Edit the contents of the item’s details form
    7. Press the Register button and you will be registered with Airtable

    Lint

    flake8 *.py

    Test

    pytest . -vv --ignore-glob="venv/**/*" --durations=0

    Misc

    Contributor

    Visit original content creator repository https://github.com/sforzando/q-lako
  • pan-cortex-hub-nodejs

    Visit original content creator repository
    https://github.com/ghas-results/pan-cortex-hub-nodejs