Blog

  • ts-ci

    🚀 A starter project for module publisher! 🚀

    Have you written some functions or React component that you’re proud of? Do you want to share it as a standalone module on NPM, but find yourself unsure about the publishing process or how to manage the lifecycle of an open-source library?

    Look no further – ts-ci is here to jumpstart your journey towards becoming a proficient NPM module author.

    Main selling points:

    • Unlike traditional CLI tools, ts-ci utilizes automation within Github Actions. Simply update your package.json version number and push. Your new version is automatically published on NPM.
    • It doesn’t bundle your library into a single file. Instead, users can cherry-pick imports from your library, enabling tree shaking. For instance: import { aSpecificFunction } from "your-module/aSpecificFile".
    • It’s just a starting point. It provides a good default CI workflow that you can adapt to your needs.
    ts-ci.mp4

    Examples of project using this template

    How to use

    🗣️ Since a recent GitHub update you need to manually allow GitHub Action to push on your repo.
    Fo this reason the initial setup will fail.
    You need to enabled permission and re-run failed job: see video

    • Click on image
    • The repo name you will choose will be used as a module name for NPM.
    • Go to the repository Settings tab, then Secrets you will need to add a new secret: NPM_TOKEN, you NPM authorization token.
    • To trigger publishing edit the package.json version field ( 0.0.0-> 0.0.1 for example) then push changes… that’s all !
    • Publish pre-release by setting your version number to X.Y.Z-rc.U (example: 1.0.0-rc.32). On NPM the version will be tagged next.
    • The CI runs on main and on the branches that have a PR open on main (You can publish pre-release from branches this way).

    Features

    • ✍️ Assists in completing the package.json details.
    • ✅ Runs your test across various OSes and Node version combinations. Reference. Note: This might be overkill for most use-cases. Feel free to modify the matrix as per your needs.
    • 📦 Supports publishing on NPM along with creating corresponding GitHub releases.
    • 🧪 Enables testing of your local module copy in your application before publishing it on NPM.
    • 🌗 Offers flexibility to use different repository images for dark and light modes. For instance, check out i18nifty: Light and Dark. For implementation details, see here. TS-CI also provides an additional action that removes the dark mode specific image from your README.md before publishing on NPM, as NPM does not yet support the #gh-dark-mode-only syntax.
    • 🩳 By default, TS-CI incorporates a step in the workflow that relocates your distribution files to the root directory before releasing, allowing your users to import specific files from your module as import {...} from "my_module/theFile" rather than “my_module/dist/theFile”. If you dislike this behavior or if you only have an index.ts file and do not intend for users to selectively import from your module, you may remove this action.
    • ⚙️ ESlint and Prettier are automatically triggered against files staged for commit. Despite what t3dotgg says, it’s the correct way of doing it, that being said, this feature is optional and can be disabled if desired.

    Release in CJS, ESM or both (but don’t bundle!)

    Contrary to what other guides or project starters may suggest, you don’t need to bundle your library (or in other words you don’t need to use Vite/Rollup), nor do you need to fragment your modules into smaller, independently published units on NPM under the packages/ directory for your module to be tree-shakable (e.g., @your-module/submodule1, @your-module/submodule2).

    When you bundle your library, you incorporate all your dependencies into the .js code you distribute. This could potentially lead to duplication of dependencies.

    For instance, if your library depends on the classnames package, the entirety of classnames source code will be included in your bundle. Subsequently, if a user of your library is also directly using classnames, there will be two copies of classnames in their final application bundle.

    Another disadvantage of bundling is the lack of selective importing. For example, if a user wishes to import only a specific component or functionality from your module, they would be unable to do so. Instead, they are required to import the entire library.

    Publishing independent units on NPM under the packages/ directory (e.g., @your-module/submodule1, @your-module/submodule2) is a common practice, but it’s not necessarily a beneficial one. The first reason against this approach is that once you comprehend the fact that bundling isn’t necessary, persisting with this process becomes somewhat pointless. The second reason concerns your users, who are then burdened with the responsibility of individually installing and synchronizing the various components’ versions. This could cause potential inconsistencies and compatibility issues, making the user experience less efficient and potentially more troublesome.

    The reality is much simpler. The responsibility of bundling lies with the final application; your role involves merely publishing types declaration (.d.ts) and the correct flavor of JavaScript files, which are the output of tsc.

    That’s all there is to it!

    CJS only (default)

    By default your module release in CommonJS (CJS).

    You want to avoid this strategy if:

    • You make use of async imports (import(...).then(...))).
    • You want your module to be usable in node type: module mode AND you have some export default (if you don’t have export default it will work just fine).

    ESM only

    If you want to only release as ESM just set "module": "ES2020" in your tsconfig.json, you also probably want to set "target": "ES2017". You can remove the listing of your export in the package.json it’s not of any use.
    This option has the advantage, if you are publishing a React library, to enable you to import assets file (.svg, .css) like for example here (Don’t forget to copy your the assets from your src/ to your dist/ though, TypeScript don’t do it for you).

    You want to avoid this strategy if:

    • You want your module to be usable with node. The ESM distribution produced by TypeScript is an ESM distribution that node in type: module can’t process (files need to have .mjs extension, exports need to be listed).
      As a result your module won’t be usable at all on node except through Next.js that will be able to make it work.
      Note that it will work out of the box in Next.js setup using the AppDir router but for project using the legacy pagesRouter your user will have to add transpilePackages: ["<your-module>"] in their next.config.js file. Example. This means also that you’d have to tell your users to configure their JEST so that it transpiles your module using "transformIgnorePatterns": [ "node_modules/(?!@codegouvfr/react-dsfr)" ].
      If you publish scripts (your package.json has a bin property) you’ll need to transpile your script separately in CJS.

    ESM for bundlers (browser) + CJS for node.

    • Have a tsconfig.json that targets CSM (as by default): example
    • Perform two build, one for CJS, one for ESM. example
    • Explicitly list your exports in your package.json, "module" the condition for bundlers "default" is what will be picked up by node. example.

    You want to avoid this strategy if:

    • You use export default and you want to support node in type: module mode.
    • You have lazy import (import(...).then(...)) and you want them to be lazy not only on the browser but on node too.

    Deno

    Regardless of the scenario you opt for you can always release for Deno using Denoify.

    CJS + A real ESM distribution, fully compliant with the standard

    Pursuing a fully compliant CJS + ESM distribution comes with caveats. It only works well if all your dependencies are adherent to the standard, a condition that most modules fail to meet.

    This method introduces the risk of your package being simultaneously loaded in both CJS and ESM in a single node application. It also poses a similar risk to your dependencies.

    Thus, proceed with this option only if it’s necessary for your lazy imports to actually be lazy when your code runs on Node.

    I have questions

    If you find your self thinking:

    “I don’t know man, ESM, CJS, I have no idea, I just want my stuff to work!” “None of the option above covers all my requirement?” “Why can’t I have a solution that work in every case?”
    “Why can’t I publish an actual standard compliant ESM distribution?”

    Just start a discussion or hit my Twitter DM I’ll be happy to provide further guidance.

    FAQ

    Click to expand

    Can I use npm (or something else) instead of yarn

    Yes, just remove the yarn.lock file and edit .github/workflows/ci.yaml, replace all yarn *** by npm run ****.
    Note however that the the script (scripts/link-in-app.ts) that enable you to test in an external app will no longer work.

    What will be included in the npm bundle?

    All filles listed in the files property of your package JSON.

    How to debug the action

    You can increase the verbosity by creating a new secret ACTIONS_STEP_DEBUG and setting it to true.

    image

    Disable linting and formatting

    Remove this, this and this from your package.json
    Remove this and this from github/workflows/ci.yaml
    Remove .eslintignore, .eslintrc.js, .prettierignore and .prettierrc.json.

    Accessing files outside the dist/ directory (when this line is present in your repo)

    The drawback of having short import path is that the dir structure
    is not exactly the same in production ( in the npm bundle ) and in development.

    The files and directories in dist/ will be moved to the root of the project.

    As a result this won’t work in production:

    src/index.ts

    import * as fs from "fs";
    import * as path from "path";
    
    const str = fs.readFileSync(
        path.join(__dirname,"..", "package.json")
    ).toString("utf8");

    Because /dist/index.js will be moved to /index.js

    You’ll have to do:

    src/index.ts

    import * as fs from "fs";
    import * as path from "path";
    import { getProjectRoot } from "./tools/getProjectRoot";
    
    const str = fs.readFileSync(
        path.join(getProjectRoot(),"package.json")
    ).toString("utf8");

    With getProjectRoot.ts being:

    import * as fs from "fs";
    import * as path from "path";
    
    function getProjectRootRec(dirPath: string): string {
        if (fs.existsSync(path.join(dirPath, "package.json"))) {
            return dirPath;
        }
        return getProjectRootRec(path.join(dirPath, ".."));
    }
    
    let result: string | undefined = undefined;
    
    export function getProjectRoot(): string {
        if (result !== undefined) {
            return result;
        }
    
        return (result = getProjectRootRec(__dirname));
    }
    Visit original content creator repository https://github.com/garronej/ts-ci
  • Chat-Bot-using-AIML

    ——————Assignment 1——————-
    Group Details:
    1)Akhil Bodapati : 2015A7PS0066H
    2) Saurabh Khandelwal : 2015A7PS0082H
    3)Amit Bhatt : 2015A7PS0149H

    Chat-Bot-using-AIML

    This is the basic implementation of a chat bot using AIML python and APIs. Even though this project was very easy to implement It can have a lot of implementation

    For Running:
    Running the script is easy. Just run the python chatbot.py file
    and you can talk with the chat bot.
    About:
    We have created a Chat Bot. It is easy to use.
    There are four files:chatbot.py,chat.aiml,chat1.aiml,startup.xml.
    Chatbot.py is the main file which you need to run.chat1.aiml and chat.aiml are both aiml files for the bot to learn. startup i the loader file.

    Language Used: Python and AIMl
    Libraries used:
    aiml
    json
    os
    nse
    weather
    urllib2
    webbrowser

    Functionality Of Bot:
    The bot can do various thinngs for you.
    It can remember your stuff for you.
    It can tell you a joke,weather also use google search.
    I can tell about the various reastaurants in bits,thier rating and thier speciality.

    ———Enjoy chating—————————————

    Visit original content creator repository
    https://github.com/stgstg27/Chat-Bot-using-AIML

  • ourchan

    OurChan Forum

    Gitlab

    This is a fork of 4chan, rebuilt on-top of nostr. WORK-IN-PROGRESS code is messy
    To steal fiatjaf’s words: ‘a truly censorship-resistant alternative to [4chan] that actually has a chance of working’
    Read here if you’re new to the nostr protocol.

    This OurChan repo is just a client, the boards/threads themselves are detached from anything here.
    The intention is that many people run their own instances, which can be different, but follow a general standard to ensure boards/threads are kept intact and usable.
    If OurChan sees any meaningful use, these standards should be outlined like NIPs.

    OurChan should keep the important properties and structures used on 4chan
    -Posts are mostly anonymous
    -Contextual thread view
    -Boards to segregate topics of discussion

    Boards

    Make your own board under
    boards from “../../constants/Const”;
    Create a pull request with the board’s pubkey to get yours added
    /g/ – 39170f7463ba96f8c5e6d063002cc5125334edaf2fdb21715eab1f43c1b6eb29

    Relays

    Use your own relay or different relays under
    relayUrls from “../../constants/Const”;
    if you have implemented a PoW, captcha or pay-per-post relay, please create a pull request and i will add it to this instance

    Run locally

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    yarn install

    yarn start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in the browser.

    The page will reload if you make edits.
    You will also see any lint errors in the console.

    yarn test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    yarn build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Visit original content creator repository
    https://github.com/smolgrrr/ourchan

  • ArduinoStreamCommander

    ArduinoStreamCommander

    The ArduinoStreamCommander is a library for interacting with an Arduino over any Stream-based interface via commands, as long as the member functions setTimeout, available, println, readString, flush are implemented accordingly.
    Those interfaces include Serial (for which this library was initially meant for), SoftwareSerial, Wire and Ethernet.

    The target was a very lightweight and convenient library, which allows to easily add new commands and send status updates automatically in case the data changed.

    Features:

    • Execute commands on the device (e.g. to get or set different values of the device).
      • Add custom commands with callback functions.
      • Use a set of basic standard commands.
    • Send different kind of messages with a simple and lightweight message format.
      • Send status updates of the device (e.g. for pushing new sensor values via Serial Interface).
      • Send arbitrary types of messages.
    • Get/Set an ID from and to the EEPROM (If the target board has one available).

    Folder structure

    • src contains the source code.
    • examples contains an example sketch.

    Installing and using ArduinoStreamCommander with the Arduino IDE

    • Before usage, installing ArduinoStreamCommander-MessageTypes is required. This Lib just contains standard message types, but can be easily extended and customised if required.
    • To install the library either clone and ZIP the folder, or download one of the releases. After that follow the instructions here.
    • In order to use ArduinoStreamCommander, <StreamCommander.hpp> needs to be included.

    Usage

    For more detailed explainations on the particular functions/functionalities, please reference to the comments in the source code.
    Also, there’s an example (examples/test/test.ino) which showcases the core functionalities of the StreamCommander.

    Basic usage

    1. Instantiate a new ArduinoStreamCommander-Object: StreamCommander commander = StreamCommander();.
      The StreamCommander will be initialised with the standard Serial-Object by default.

      1. Optionally, instantiate the StreamCommander with an alternative Stream-based interface:
        StreamCommander commander = StreamCommander( &Serial1 );
    2. Initialise the Stream-interface, e.g.: Serial.begin( 9600 );
    3. Initialise the StreamCommander: commander.init();. (Optionally with arguments, see source code for more information.)
      1. Call further optional functions while setting up.
    4. Add custom commands with a name and a matching callback function, e.g.:
      commander.addCommand( "test", testCallback );

      1. The callback function has to follow following typedef:
        typedef void (*CommandCallbackFunction)( String arguments , StreamCommander * instance ).
    5. Optionally, set a default callback function, e.g.:
      commander.setDefaultCallback( defaultCallback );

      1. The callback function has to follow following typedef:
        typedef void (*DefaultCallbackFunction)( String command , String arguments , StreamCommander * instance )
    6. Call commander.fetchCommand(); in every loop(). This function catches incoming commands. If the command has been registered and found, the according callback will be called, and (optional) arguments will be parsed and passed to the according callback function. If the command has not been registered, the default callback will be called.
      1. This function can also be called after an hardware interrupt.
      2. Carriage return (“\r”), Newline (“\n”) or Carriage return + Newline (“\r\n”) do each signalise the end of a command.
    7. Send status updates with updateStatus-function.
      1. If the status has changed since the last update, a new status message will automatically be sent.
      2. If the device is not activated, possible status updates won’t be sent out. They can still be queried manually with the status-command.
    8. In case you need the device to have an ID (for example if you need to adress multiple devices separately), set an id with the setid-command the first time you boot the device. If an EEPROM is available on the board:
      1. The ID will be persisted in the EEPROM of the device, and will automatically be loaded on every initialisation of the StreamCommander. No need to hardcode this.
      2. The ID will only be updated in the EEPROM if it really changes, which extends the lifespan of the EEPROM.

    Arguments

    A command can be followed by arguments. Those arguments are separated from the rest of the command by the first occurence of the command delimiter (a blank space by default).
    The delimiter can be changed with the function commander.setCommandDelimiter( char delimiter ); or in the init-function.
    The arguments are parsed as a single string, which can then be processed arbitrarily.

    Example:

    • Command with arguments: test 1 2 3
    • Command: test
    • Arguments: 1 2 3

    Defining Command-Callbacks

    As stated above, a callback for commands follows the CommandCallbackFunction-typedef:
    typedef void (*CommandCallbackFunction)( String arguments , StreamCommander * instance )
    It has two parameters: a string of arguments, and a pointer to the instance of the StreamCommander calling the callback.

    The latter parameter is especially there, in case multiple instances of stream commander are running (for example if we have multiple serial ports connected), in order to distinguish which instance called the callback.

    If arguments have been passed with the command, the arguments are parsed and passed as a single string.

    Example for turning the built in LED on and off:

    commander.addCommand( "led", cmdLed );
    ...
    void cmdLed( String arguments, StreamCommander * instance )
    {
        arguments.trim();
        
        if ( arguments.equals( "on" ) )
        {
            digitalWrite( LED_BUILTIN, HIGH );
        }
        else if ( arguments.equals( "off" ) )
        {
            digitalWrite( LED_BUILTIN, LOW );
        }
    }

    Defining the Default-Callbacks

    This function gets called if an unknown/unregistered command has been delivered to the StreamCommander. As stated above, the default callback follows the DefaultCallbackFunction-typedef:
    typedef void (*DefaultCallbackFunction)( String command , String arguments , StreamCommander * instance )

    In addition to the CommandCallbackFunction it has the parameter command which contains the name of the command that has been tried to be invoked.

    Example:

    commander.setDefaultCallback( cmdDefault );
    ...
    void cmdDefault( String command, String arguments, StreamCommander * instance )
    {
        instance->sendResponse( "Command \"" + command + "\" with arguments \"" + arguments + "\" not registered." );
    }

    Standard Commands

    The StreamCommander has several standard commands which implement basic functionalities. Adding those commands can be surpressed by specifing this when calling the init-function.

    Command Purpose Arguments
    activate Activates the automatic publishing of new status-messages
    deactivate Deactivates the automatic publishing of new status-messages
    isactive Returns whether the device is set to active or not
    setecho Sets the echoing of incoming commands on or off on / off
    setid Sets the ID of the device <id>
    getid Returns the ID of the device
    ping Returns a ping response message (usually a “ping:reply” message)
    getstatus Returns the current status of the device
    commands Returns all registered commands of the device

    Message format

    To make the communication more easy and consistent, a simple message format has been defined, which is used by the ArduinoStreamCommander.
    The definition can be found here: SerialMessageFormat

    Standard Message Types

    The StreamCommander uses several standard message types, which are defined in ArduinoStreamCommander-MessageTypes.

    Type Purpose
    response Return responses after a command has been executed
    info Inform about something like an internal event (e.g. for logging-purposes)
    error Inform about an error/problem which occured during the runtime
    ping Contains a ping response message (usually containts “reply”)
    status Send the current/most recent status of the device (Especially used for status updates)
    id Contains the id of the device
    active Contains whether the device is set to active or not
    echo Contains an echo of the last input received
    commands Contains a list of all registered commands of a Device
    command Contains a command to be passed to an Arduino


    Visit original content creator repository
    https://github.com/je-s/ArduinoStreamCommander

  • js.randrix

    tests coverage maintainability

    randrix

    A programable, random matrix panel.

    Usage

    npm

    npm install --save randrix

    ES Module

    import Randrix from 'randrix';
    
    const randrix = new Randrix({
      message: 'RandomMatrix',
    });
    randrix.start();

    UMD Module

    <script type="text/javascript" src="node_modules/randix/dist/randrix.min.js"></script>
    <script type="text/javascript">
      var randrix = new window.Randrix.default({
        message: 'randrix.js',
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.'
      });
      randrix.start();
    </script>

    CSS

    [data-randrix] {
      display: grid;
      grid-gap: 0;
      grid-template-columns: repeat(6, 4vw);
      grid-template-rows: repeat(5, 8vw);
      align-content: space-around;
      justify-content: space-between;
    }
    
    [data-randrix-char] {
      font-size: 2.4vw;
      line-height: 6vw;
      opacity: .6;
      text-align: center;
    }
    
    [data-randrix-char-active="true"] {
      font-weight: bold;
      opacity: 1;
    }
    
    [data-randrix-style="monospace"] {
      font-family: monospace;
    }
    
    [data-randrix-style="sans-serif"] {
      font-family: sans-serif;
    }
    
    [data-randrix-style="serif"] {
      font-family: serif;
    }
    
    [data-randrix-style="cursive"] {
      font-family: cursive;
    }

    Example

    Custom

    import Randrix from 'randrix';
    
    const randrix = new Randrix( {
          message: 'RandomMatrix',
          selector: '[data-randrix]',
          width: 6,
          height: 8,
          interval: 100,
          possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
          style: ['serif', 'sans-serif', 'monospace'],
          callback: () => { document.body.style.backgroundColor = '#abcdef'; },
        });
    randrix.start();

    Multiple

    Promise

    Async, await example. Resolve the promise with the Randrix callback option.

    import Randrix from 'randrix';
    
    async function f() {
      const promise = new Promise((resolve, reject) => {
        const randrix = new Randrix({
          message: 'RandomMatrix',
          selector: '[data-randrix]',
          callback: () => resolve(true),
        });
        randrix.start();
      });
    
      const result = await promise;
      if (result) second();
    }
    
    function second() {
      document.querySelector('[data-randrix]').innerHTML = '';
      const randrix = new Randrix({
        message: 'randrix.js',
        selector: '[data-randrix]',
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.',
      });
      randrix.start();
    }
    
    f();

    Generator

    Generator, yield example. Go to next() with the Randrix callback option.

    import Randrix from 'randrix';
    
    function* panels(configs) {
      for (let i = 0; i < configs.length; i++) {
        yield panel(configs[i], i);
      }
    }
    
    function panel(config, i) {
      const wait = (i === 0) ? i : 3000;
      setTimeout( () => {
        document.querySelector('[data-randrix]').innerHTML = '';
        const matrix = new Randrix(config);
        matrix.start();
      }, wait);
    }
    
    const configs = [{
        message: 'Random',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'Matrix',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'Panel',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'randrix.js',
        width: 4,
        height: 5,
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.',
      },
    ];
    const matrix = panels(configs);
    matrix.next();

    Documentation

    Visit original content creator repository https://github.com/exiguus/js.randrix
  • js.randrix

    tests coverage maintainability

    randrix

    A programable, random matrix panel.

    Usage

    npm

    npm install --save randrix

    ES Module

    import Randrix from 'randrix';
    
    const randrix = new Randrix({
      message: 'RandomMatrix',
    });
    randrix.start();

    UMD Module

    <script type="text/javascript" src="node_modules/randix/dist/randrix.min.js"></script>
    <script type="text/javascript">
      var randrix = new window.Randrix.default({
        message: 'randrix.js',
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.'
      });
      randrix.start();
    </script>

    CSS

    [data-randrix] {
      display: grid;
      grid-gap: 0;
      grid-template-columns: repeat(6, 4vw);
      grid-template-rows: repeat(5, 8vw);
      align-content: space-around;
      justify-content: space-between;
    }
    
    [data-randrix-char] {
      font-size: 2.4vw;
      line-height: 6vw;
      opacity: .6;
      text-align: center;
    }
    
    [data-randrix-char-active="true"] {
      font-weight: bold;
      opacity: 1;
    }
    
    [data-randrix-style="monospace"] {
      font-family: monospace;
    }
    
    [data-randrix-style="sans-serif"] {
      font-family: sans-serif;
    }
    
    [data-randrix-style="serif"] {
      font-family: serif;
    }
    
    [data-randrix-style="cursive"] {
      font-family: cursive;
    }

    Example

    Custom

    import Randrix from 'randrix';
    
    const randrix = new Randrix( {
          message: 'RandomMatrix',
          selector: '[data-randrix]',
          width: 6,
          height: 8,
          interval: 100,
          possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
          style: ['serif', 'sans-serif', 'monospace'],
          callback: () => { document.body.style.backgroundColor = '#abcdef'; },
        });
    randrix.start();

    Multiple

    Promise

    Async, await example. Resolve the promise with the Randrix callback option.

    import Randrix from 'randrix';
    
    async function f() {
      const promise = new Promise((resolve, reject) => {
        const randrix = new Randrix({
          message: 'RandomMatrix',
          selector: '[data-randrix]',
          callback: () => resolve(true),
        });
        randrix.start();
      });
    
      const result = await promise;
      if (result) second();
    }
    
    function second() {
      document.querySelector('[data-randrix]').innerHTML = '';
      const randrix = new Randrix({
        message: 'randrix.js',
        selector: '[data-randrix]',
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.',
      });
      randrix.start();
    }
    
    f();

    Generator

    Generator, yield example. Go to next() with the Randrix callback option.

    import Randrix from 'randrix';
    
    function* panels(configs) {
      for (let i = 0; i < configs.length; i++) {
        yield panel(configs[i], i);
      }
    }
    
    function panel(config, i) {
      const wait = (i === 0) ? i : 3000;
      setTimeout( () => {
        document.querySelector('[data-randrix]').innerHTML = '';
        const matrix = new Randrix(config);
        matrix.start();
      }, wait);
    }
    
    const configs = [{
        message: 'Random',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'Matrix',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'Panel',
        width: 4,
        height: 5,
        callback: () => matrix.next(),
      },
      {
        message: 'randrix.js',
        width: 4,
        height: 5,
        possible: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.',
      },
    ];
    const matrix = panels(configs);
    matrix.next();

    Documentation

    Visit original content creator repository https://github.com/exiguus/js.randrix
  • useMemo-usecase-Syntax-Practice

    useMemo-usecase-Syntax-Practice

    Created with CodeSandbox

    useMemo() hook

    Why do we use useMemo() ?

    We use the hook to increase the overall performance of the application.

    What is the problem we are having so that we can use the useMemo hook ?

    let us consider a counter app with increment button.

    import "./styles.css";
    import {useState} from "react";
    
    export default function App() {
      const [count, setCount ] = useState(0);
    
      function handler()
      {
        setCount(count+1)
      }
      return (
        <div className="App">
          <h1>counter app</h1>
          <h1>{count}</h1>
          <button onClick = {handler}>increment</button>
        </div>
      );
    }

    in this case when ever the increment button is clicked the count state is changed and the entire component is re-rendered.

    Now consider the situation where another state called number is present.

    import "./styles.css";
    import {useState} from "react";
    
    export default function App() {
      const [count, setCount ] = useState(0);
      const [num,setnum]= useState(5);
    
      function handler()
      {
        setCount(count+1)
      }
    
      function numberHandler()
      {
        setnum(num+2);
      }
      return (
        <div className="App">
          <h1>counter app</h1>
          <h1>{count}</h1>
          <h1>{num}</h1>
          <button onClick = {handler}>increment</button>
          <button onClick = {numberHandler}>number change</button>
        </div>
      );
    }

    now in this case when we click on the increment button it changes the count state and it re-renders the whole component so the num component also re-renders.

    By this, it is unnecisarrily rerendering the unchanged states

    here we can consider it as a small issue because there is only one state rerendering even if there is no use. But consider a situation if the number is executing a complex function.

    consider the num is executing a complex factorial function.

    import "./styles.css";
    import {useState} from "react";
    
    export default function App() {
      const [count, setCount ] = useState(0);
      const [num,setnum]= useState(0);
      // const [facto, setFacto] = useState(0);
      function handler()
      {
        setCount(count+1)
      }
    
      function numberHandler()
      {
        setnum(num+1);
        // setFacto(fact(num))
      }
    
      function fact(num)
      {
        let value = 1;
        for (let i =1;i<=num;i++)
        {
          value = value*i;
        }
        console.log("factorial is rendered")
        return value;
      }
    
      const factorial = fact(num);
      return (
        <div className="App">
          <h1>counter app</h1>
          <h1>{count}</h1>
          <h1>{num}</h1>
          <h1>{factorial}</h1>
          <button onClick = {handler}>increment</button>
          <button onClick = {numberHandler}>number change</button>
        </div>
      );
    }

    now when ever the increment is clicked without use the factorial is rendered once.

    because of increment is clicked the num state also rerenders and again factorial is rerendered.

    it is also considered as the small issue.

    what if there are 100 numbers factorial and rerendering for every state.

    It is a problem.

    What we need now ?

    We want only the changed state to rerender not anyother.

    For this purpose we use the useMemo hook.

    import "./styles.css";
    import {useState, useMemo} from "react";
    
    export default function App() {
      const [count, setCount ] = useState(0);
      const [num,setnum]= useState(0);
      // const [facto, setFacto] = useState(0);
      function handler()
      {
        setCount(count+1)
      }
    
      function numberHandler()
      {
        setnum(num+1);
        // setFacto(fact(num))
      }
    
      function fact(num)
      {
        let value = 1;
        for (let i =1;i<=num;i++)
        {
          value = value*i;
        }
        console.log("factorial is rendered")
        return value;
      }
    
      let factorial = useMemo(()=>{
        return fact(num)
      },[num]);
      return (
        <div className="App">
          <h1>counter app</h1>
          <h1>{count}</h1>
          <h1>{num}</h1>
          <h1>factorial : {factorial}</h1>
          <button onClick = {handler}>increment</button>
          <button onClick = {numberHandler}>number change</button>
        </div>
      );
    }

    You can check the working at :

    codeSandBoxLink :

    https://codesandbox.io/s/use-memo-nydmjf?file=/src/App.js

    Reference :

    https://www.youtube.com/watch?v=W49b9J6Szx0&list=PLWnZ0qt0PImVaDkDbF96dnRGO0_lXVLKf&index=54

    Steps to be followed :

    Step 1 :

    import {useMemo} from "react"

    step 2 :

    useMemo(()=>{
    	//the complex code you want to run 
    },[])

    This may be similar to useEffect hook but you have to remember that

    useEffect – executes after the render is done for the first time and according to the dependency it renders next time.

    useMemo – executes before the render only so they are not similar.

    both take dependencies whether to execute the next time or not is the common thing.

    Visit original content creator repository
    https://github.com/SaiEswar15/useMemo-usecase-Syntax-Practice

  • leaff

    Leaff

    Leaff is a diff tool for Lean environments. It aims to produce a human readable summary of the differences between two versions of the same Lean module (for instance coming from olean files from two different revisions to the same library). For example it can be used to detect unexpected changes to, or removal of, theorems when a refactor is carried out in a large library. Or it can be useful to simply summarize the diff of a proposed inclusion with the more likely to be interesting information presented first.

    It is currently under development and should be considered version alpha (contributions welcome!).
    Nevertheless at the moment it does at least provide some potentially useful output
    and it is at least fast enough to run on the scale of mathlib.

    Usage

    The main entrypoint is the script runleaff.sh to use it you should check out two copies of your project, one for the old version of the library and one for the new (e.g. with git worktree add ../old/ some-other-branch),
    build both by running lake build in the corresponding directories, then navigate to the Leaff directory and run

    ./runleaff.sh ModuleName /path/to/old-version/ /path/to/new-version/
    

    note that the module name will likely just be the name of the library (e.g. Mathlib) if want to know all potential downstream changes of some change, but could be more specific, e.g. MyLibrary.SomeFile. The paths could be relative to the Leaff directory or absolute.

    E.g. to test from this directory

    ./runleaff.sh Test.Test test test2
    

    You may face many issues, especially if the diff is too big, if there are different Lean versions use in the libraries, or if there is a different Lean version used to compile the libraries and Leaff itself.

    $ ./runleaff.sh Mathlib ../test-mathlib2/ ../test-mathlib/
    Found differences:
    @@ Mathlib.Algebra.GroupPower.Order @@
    + added le_of_pow_le_pow_left.{u_2}
    + added pow_le_pow_iff_left.{u_2}
    + added pow_right_injective.{u_2}
    @@ Mathlib.Data.Nat.Pow @@
    + added Nat.pow_lt_pow_left
    + added Nat.pow_le_pow_right
    + added Nat.pow_lt_pow_iff_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    + added pow_lt_pow_iff_left.{u_2}
    + added pow_lt_pow_right_of_lt_one.{u_2}
    + added pow_right_inj.{u_2}
    + added pow_lt_pow_left.{u_2}
    @@ Mathlib.Data.Nat.Pow @@
    + added Nat.pow_le_pow_iff_left
    + added Nat.pow_le_pow_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    + added pow_left_strictMonoOn.{u_2}
    + added pow_lt_pow_right.{u_2}
    @@ Mathlib.Data.Nat.Pow @@
    - removed Nat.pow_lt_pow_of_lt_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    - removed pow_lt_pow
    @@ Mathlib.Data.Nat.Pow @@
    - removed Nat.pow_le_iff_le_right
    - removed Nat.pow_le_iff_le_left
    - removed Nat.pow_right_strictMono
    @@ Mathlib.Algebra.GroupPower.Order @@
    - removed pow_lt_pow_of_lt_left
    - removed self_le_pow
    @@ Mathlib.Data.Nat.Pow @@
    - removed Nat.pow_lt_pow_of_lt_right
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    - removed Behrend.two_le_nValue
    @@ Mathlib.Data.Nat.Pow @@
    - removed Nat.pow_lt_iff_lt_right
    - removed Nat.pow_lt_iff_lt_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    - removed strictMonoOn_pow
    - removed le_of_pow_le_pow
    - removed pow_lt_pow_of_lt_one
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! type changed for LucasLehmer.sMod_lt
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! type changed for pow_left_inj
    ! type changed for one_le_pow_iff_of_nonneg
    @@ Mathlib.Data.Nat.Pow @@
    ! type changed for StrictMono.nat_pow
    ! type changed for Nat.one_lt_two_pow
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! type changed for pow_lt_one_iff_of_nonneg
    ! type changed for pow_eq_one_iff_of_nonneg
    @@ Mathlib.Data.Nat.Pow @@
    ! type changed for Nat.pow_left_strictMono
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! type changed for pow_le_one_iff_of_nonneg
    @@ Mathlib.NumberTheory.Divisors @@
    ! type changed for Nat.properDivisors_prime_pow
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! type changed for LucasLehmer.mersenne_int_pos
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! type changed for one_lt_pow_iff_of_nonneg
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! type changed for Behrend.bound
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! type changed for padicValNat.pow_sub_pow
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! type changed for LucasLehmer.mersenne_int_ne_zero
    @@ Mathlib.Data.Nat.Pow @@
    ! type changed for Nat.one_lt_pow
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! type changed for abs_pow_eq_one
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! type changed for padicValNat.pow_two_sub_pow
    @@ Mathlib.Data.Nat.Pow @@
    ! type changed for Nat.pow_left_injective
    ! type changed for Nat.one_lt_pow_iff
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! type changed for LucasLehmer.sMod_nonneg
    @@ Mathlib.Data.Nat.Pow @@
    + attribute protected added to Nat.pow_le_pow_iff_left
    + attribute protected added to Nat.pow_right_injective
    + attribute protected added to Nat.pow_le_pow_left
    + attribute protected added to Nat.pow_lt_pow_left
    + attribute protected added to Nat.pow_left_strictMono
    + attribute protected added to Nat.pow_le_pow_right
    + attribute protected added to Nat.pow_lt_pow_iff_left
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed le_of_nsmul_le_nsmul → le_of_nsmul_le_nsmul_right'
    ! renamed pow_lt_pow_iff' → pow_lt_pow_iff_right'
    ! renamed le_of_pow_le_pow' → le_of_pow_le_pow_left'
    ! renamed nsmul_strictMono_right → nsmul_left_strictMono
    ! renamed nsmul_le_nsmul → nsmul_le_nsmul_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed pow_lt_pow_iff_of_lt_one → pow_lt_pow_iff_right_of_lt_one
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed pow_strictMono_left → pow_right_strictMono'
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed pow_lt_pow_iff → pow_lt_pow_iff_right
    ! renamed pow_le_pow_iff → pow_le_pow_iff_right
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed pow_le_pow_of_le_one' → pow_le_pow_right_of_le_one'
    ! renamed pow_strictMono_right' → pow_left_strictMono
    ! renamed StrictMono.nsmul_left → StrictMono.const_nsmul
    ! renamed Monotone.nsmul_left → Monotone.const_nsmul
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed pow_le_pow → pow_le_pow_right
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed nsmul_le_nsmul_of_nonpos → nsmul_le_nsmul_left_of_nonpos
    ! renamed pow_le_pow' → pow_le_pow_right'
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed pow_le_pow_of_le_left → pow_le_pow_left
    ! renamed lt_of_pow_lt_pow → lt_of_pow_lt_pow_left
    ! renamed self_lt_pow → lt_self_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed pow_le_pow_of_le_left' → pow_le_pow_left'
    @@ Mathlib.RingTheory.Ideal.Operations @@
    ! renamed Ideal.pow_le_pow → Ideal.pow_le_pow_right
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed lt_of_nsmul_lt_nsmul → lt_of_nsmul_lt_nsmul_right
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed pow_mono → pow_right_mono
    ! renamed pow_lt_pow₀ → pow_lt_pow_right₀
    ! renamed pow_strictMono_right → pow_right_strictMono
    @@ Mathlib.Data.Real.ENNReal @@
    ! renamed ENNReal.pow_lt_pow_of_lt_left → ENNReal.pow_lt_pow_left
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed nsmul_lt_nsmul → nsmul_lt_nsmul_left
    ! renamed pow_lt_pow' → pow_lt_pow_right'
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! renamed strictAnti_pow → pow_right_strictAnti
    @@ Mathlib.RingTheory.DedekindDomain.Ideal @@
    ! renamed Ideal.strictAnti_pow → Ideal.pow_right_strictAnti
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed lt_of_pow_lt_pow' → lt_of_pow_lt_pow_left'
    @@ Mathlib.RingTheory.Ideal.Operations @@
    ! renamed Ideal.pow_mono → Ideal.pow_right_mono
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed nsmul_strictMono_left → nsmul_right_strictMono
    ! renamed nsmul_le_nsmul_iff → nsmul_le_nsmul_iff_left
    @@ Mathlib.Algebra.GroupPower.Lemmas @@
    ! renamed zpow_strictMono_right → zpow_right_strictMono
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! renamed StrictMono.pow_right' → StrictMono.pow_const
    ! renamed nsmul_le_nsmul_of_le_right → nsmul_le_nsmul_right
    ! renamed pow_le_pow_iff' → pow_le_pow_iff_right'
    ! renamed nsmul_lt_nsmul_iff → nsmul_lt_nsmul_iff_left
    @@ Mathlib.Data.Nat.Pow @@
    + doc added to Nat.pow_le_pow_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    + doc added to pow_left_strictMonoOn
    + doc added to pow_right_strictMono
    @@ Mathlib.Data.Nat.Pow @@
    + doc added to Nat.pow_left_strictMono
    + doc added to Nat.pow_le_pow_right
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! doc _  ified for pow_left_strictMono
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_eq_one_iff_of_nonneg
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for LucasLehmer.mersenne_int_pos
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for StrictMono.const_nsmul
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_left_injective
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Monotone.const_nsmul
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for StrictMono.nat_pow
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_le_pow_right
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for LucasLehmer.sMod_nonneg
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_le_nsmul_left_of_nonpos
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for one_lt_pow_iff_of_nonneg
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_le_pow_right'
    ! proof changed for nsmul_right_strictMono
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_le_pow_left
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! proof changed for Behrend.bound
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for lt_of_pow_lt_pow_left
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for StrictMono.pow_const
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for lt_self_pow
    ! proof changed for one_le_pow_iff_of_nonneg
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_le_pow_left'
    ! proof changed for nsmul_le_nsmul_right
    ! proof changed for le_of_nsmul_le_nsmul_right'
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! proof changed for padicValNat.pow_sub_pow
    @@ Mathlib.Data.Nat.Factorization.Basic @@
    ! proof changed for Nat.factorization_lt
    @@ Mathlib.Algebra.Order.Archimedean @@
    ! proof changed for exists_lt_nsmul
    @@ Mathlib.Analysis.InnerProductSpace.Basic @@
    ! proof changed for eq_of_norm_le_re_inner_eq_norm_sq
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Right.pow_nonpos
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.log_pow
    @@ Mathlib.FieldTheory.Finite.Basic @@
    ! proof changed for FiniteField.X_pow_card_pow_sub_X_natDegree_eq
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Right.pow_le_one_of_le
    @@ Mathlib.Data.Nat.Factorial.Basic @@
    ! proof changed for Nat.pow_sub_lt_descFactorial'
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for MonovaryOn.nsmul_left
    @@ Mathlib.Computability.Ackermann @@
    ! proof changed for ack_three
    @@ Mathlib.Analysis.SpecialFunctions.Exp @@
    ! proof changed for Real.tendsto_exp_div_pow_atTop
    @@ Mathlib.Data.Nat.Size @@
    ! proof changed for Nat.size_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_nonneg
    @@ Mathlib.Computability.Ackermann @@
    ! proof changed for ack_add_one_sq_lt_ack_add_four
    @@ Mathlib.GroupTheory.Archimedean @@
    ! proof changed for AddSubgroup.exists_isLeast_pos
    @@ Mathlib.NumberTheory.ClassNumber.AdmissibleCardPowDegree @@
    ! proof changed for Polynomial.cardPowDegree_anti_archimedean
    @@ Mathlib.Data.Nat.Factorization.Basic @@
    ! proof changed for Nat.factorization_le_of_le_pow
    @@ Mathlib.Analysis.InnerProductSpace.Basic @@
    ! proof changed for InnerProductSpace.toUniformConvexSpace
    @@ Mathlib.NumberTheory.NumberField.Discriminant @@
    ! proof changed for NumberField.discr_gt_one
    @@ Mathlib.RingTheory.DiscreteValuationRing.TFAE @@
    ! proof changed for DiscreteValuationRing.TFAE
    @@ Mathlib.NumberTheory.PellMatiyasevic @@
    ! proof changed for Pell.eq_pow_of_pell
    @@ Mathlib.NumberTheory.NumberField.Discriminant @@
    ! proof changed for NumberField.abs_discr_ge
    @@ Mathlib.RingTheory.WittVector.Frobenius @@
    ! proof changed for WittVector.map_frobeniusPoly.key₂
    @@ Mathlib.NumberTheory.ClassNumber.Finite @@
    ! proof changed for ClassGroup.norm_lt
    @@ Mathlib.Analysis.Analytic.Composition @@
    ! proof changed for FormalMultilinearSeries.comp_summable_nnreal
    @@ Mathlib.Analysis.SpecificLimits.FloorPow @@
    ! proof changed for sum_div_pow_sq_le_div_sq
    @@ Mathlib.Algebra.GeomSum @@
    ! proof changed for nat_sub_dvd_pow_sub_pow
    @@ Mathlib.Analysis.Calculus.FDeriv.Measurable @@
    ! proof changed for RightDerivMeasurableAux.D_subset_differentiable_set
    @@ Mathlib.Data.Complex.Exponential @@
    ! proof changed for Real.cos_two_neg
    @@ Mathlib.RingTheory.Polynomial.Basic @@
    ! proof changed for Polynomial.Monic.geom_sum
    @@ Mathlib.Topology.Metrizable.Uniformity @@
    ! proof changed for UniformSpace.metrizable_uniformity
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for sq_lt_sq
    @@ Mathlib.FieldTheory.Finite.Polynomial @@
    ! proof changed for MvPolynomial.degrees_indicator
    @@ Mathlib.Analysis.Asymptotics.Asymptotics @@
    ! proof changed for Asymptotics.IsBigOWith.of_pow
    @@ Mathlib.NumberTheory.Padics.PadicIntegers @@
    ! proof changed for PadicInt.norm_le_pow_iff_le_valuation
    @@ Mathlib.Analysis.Complex.Basic @@
    ! proof changed for Complex.nnnorm_eq_one_of_pow_eq_one
    @@ Mathlib.Analysis.PSeries @@
    ! proof changed for Finset.sum_condensed_le
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.one_lt_two_pow'
    @@ Mathlib.NumberTheory.DirichletCharacter.Bounds @@
    ! proof changed for DirichletCharacter.unit_norm_eq_one
    @@ Mathlib.Analysis.PSeries @@
    ! proof changed for ENNReal.tsum_condensed_le
    @@ Mathlib.RingTheory.DiscreteValuationRing.TFAE @@
    ! proof changed for exists_maximalIdeal_pow_eq_of_principal
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for AntivaryOn.pow_left
    @@ Mathlib.Analysis.SpecificLimits.FloorPow @@
    ! proof changed for sum_div_nat_floor_pow_sq_le_div_sq
    @@ Mathlib.NumberTheory.SumFourSquares @@
    ! proof changed for Int.lt_of_sum_four_squares_eq_mul
    @@ Mathlib.Algebra.GroupPower.Lemmas @@
    ! proof changed for zpow_le_zpow_iff
    @@ Mathlib.NumberTheory.Liouville.LiouvilleWith @@
    ! proof changed for Liouville.frequently_exists_num
    @@ Mathlib.Analysis.SpecialFunctions.Log.Deriv @@
    ! proof changed for Real.abs_log_sub_add_sum_range_le
    @@ Mathlib.RingTheory.DedekindDomain.Ideal @@
    ! proof changed for Ideal.pow_lt_self
    @@ Mathlib.Combinatorics.SetFamily.FourFunctions @@
    ! proof changed for Finset.card_le_card_diffs
    @@ Mathlib.NumberTheory.Liouville.Basic @@
    ! proof changed for Liouville.transcendental
    @@ Mathlib.Analysis.SpecificLimits.Normed @@
    ! proof changed for summable_geometric_iff_norm_lt_1
    @@ Mathlib.Algebra.IsPrimePow @@
    ! proof changed for isPrimePow_nat_iff_bounded
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Left.one_le_pow_of_le
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_lt_pow_succ
    @@ Mathlib.Data.Polynomial.Degree.CardPowDegree @@
    ! proof changed for Polynomial.cardPowDegree_isEuclidean
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_right_injective
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Left.pow_nonpos
    @@ Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology @@
    ! proof changed for Ideal.adic_module_basis
    @@ Mathlib.NumberTheory.PellMatiyasevic @@
    ! proof changed for Pell.eq_pow_of_pell_lem
    @@ Mathlib.Analysis.NormedSpace.FiniteDimension @@
    ! proof changed for Basis.op_nnnorm_le
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_pos_iff
    ! proof changed for sq_lt_one_iff
    @@ Mathlib.RingTheory.Henselian @@
    ! proof changed for IsAdicComplete.henselianRing
    @@ Mathlib.Analysis.ODE.PicardLindelof @@
    ! proof changed for PicardLindelof.FunSpace.dist_iterate_next_le
    @@ Mathlib.NumberTheory.Divisors @@
    ! proof changed for Nat.prod_properDivisors_prime_pow
    @@ Mathlib.MeasureTheory.Integral.PeakFunction @@
    ! proof changed for tendsto_set_integral_pow_smul_of_unique_maximum_of_isCompact_of_measure_nhdsWithin_pos
    @@ Mathlib.NumberTheory.Bertrand @@
    ! proof changed for centralBinom_le_of_no_bertrand_prime
    @@ Mathlib.Data.Nat.Bitwise @@
    ! proof changed for Nat.testBit_two_pow_of_ne
    @@ Mathlib.NumberTheory.FLT.Four @@
    ! proof changed for Fermat42.coprime_of_minimal
    @@ Mathlib.Analysis.Analytic.Composition @@
    ! proof changed for HasFPowerSeriesAt.comp
    @@ Mathlib.Algebra.Tropical.Basic @@
    ! proof changed for Tropical.add_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Right.one_le_pow_of_le
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.clog_anti_left
    @@ Mathlib.MeasureTheory.Measure.Hausdorff @@
    ! proof changed for MeasureTheory.hausdorffMeasure_pi_real
    @@ Mathlib.Combinatorics.Additive.PluenneckeRuzsa @@
    ! proof changed for Finset.card_pow_div_pow_le
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Antivary.nsmul_right
    @@ Mathlib.Algebra.GroupPower.Lemmas @@
    ! proof changed for strictMono_pow_bit1
    @@ Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar @@
    ! proof changed for MeasureTheory.Measure.addHaar_submodule
    @@ Mathlib.Data.Nat.Factorial.Basic @@
    ! proof changed for Nat.ascFactorial_lt_pow_add
    @@ Mathlib.Topology.Algebra.Polynomial @@
    ! proof changed for Polynomial.coeff_bdd_of_roots_le
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Antivary.pow_right
    @@ Mathlib.Topology.Algebra.InfiniteSum.Order @@
    ! proof changed for Finite.of_summable_const
    @@ Mathlib.Analysis.PSeries @@
    ! proof changed for sum_Ioo_inv_sq_le
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for le_self_pow
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_dvd_pow_iff_pow_le_pow
    @@ Mathlib.RingTheory.Polynomial.Basic @@
    ! proof changed for Polynomial.coeff_prod_mem_ideal_pow_tsub
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Antivary.pow_left
    @@ Mathlib.NumberTheory.NumberField.Units @@
    ! proof changed for NumberField.Units.dirichletUnitTheorem.seq_next
    @@ Mathlib.Computability.Ackermann @@
    ! proof changed for exists_lt_ack_of_nat_primrec
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for MonovaryOn.pow_right
    @@ Mathlib.Analysis.SpecialFunctions.JapaneseBracket @@
    ! proof changed for finite_integral_rpow_sub_one_pow_aux
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for MonovaryOn.nsmul_right
    @@ Mathlib.Algebra.Order.Field.Basic @@
    ! proof changed for one_div_pow_lt_one_div_pow_of_lt
    @@ Mathlib.NumberTheory.RamificationInertia @@
    ! proof changed for Ideal.ramificationIdx_spec
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Monovary.pow_right
    ! proof changed for AntivaryOn.pow_left₀
    @@ Mathlib.Analysis.NormedSpace.Multilinear.Basic @@
    ! proof changed for ContinuousMultilinearMap.continuous_eval
    @@ Mathlib.Analysis.Calculus.Taylor @@
    ! proof changed for taylor_mean_remainder_bound
    @@ Mathlib.RingTheory.Etale @@
    ! proof changed for Algebra.FormallySmooth.of_split
    @@ Mathlib.Analysis.Complex.UpperHalfPlane.Metric @@
    ! proof changed for UpperHalfPlane.cmp_dist_eq_cmp_dist_coe_center
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_mono_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for sq_le_sq
    @@ Mathlib.Data.Num.Lemmas @@
    ! proof changed for Num.castNum_shiftRight
    @@ Mathlib.Data.Nat.Size @@
    ! proof changed for Nat.size_shiftLeft'
    @@ Mathlib.RingTheory.Finiteness @@
    ! proof changed for Ideal.exists_radical_pow_le_of_fg
    @@ Mathlib.Analysis.Analytic.Inverse @@
    ! proof changed for FormalMultilinearSeries.radius_rightInv_pos_of_radius_pos
    @@ Mathlib.NumberTheory.Padics.RingHoms @@
    ! proof changed for PadicInt.appr_lt
    @@ Mathlib.Data.Nat.Factorization.Basic @@
    ! proof changed for Nat.Ico_filter_pow_dvd_eq
    @@ Mathlib.Order.Filter.Archimedean @@
    ! proof changed for Filter.Tendsto.atTop_nsmul_const
    @@ Mathlib.Data.Real.Pi.Leibniz @@
    ! proof changed for Real.tendsto_sum_pi_div_four
    @@ Mathlib.Analysis.Calculus.BumpFunction.Normed @@
    ! proof changed for ContDiffBump.measure_closedBall_div_le_integral
    @@ Mathlib.Analysis.NormedSpace.Star.Multiplier @@
    ! proof changed for DoubleCentralizer.instCstarRing
    @@ Mathlib.Analysis.NormedSpace.Multilinear.Basic @@
    ! proof changed for MultilinearMap.continuous_of_bound
    @@ Mathlib.Combinatorics.SimpleGraph.Regularity.Lemma @@
    ! proof changed for szemeredi_regularity
    @@ Mathlib.Analysis.InnerProductSpace.Rayleigh @@
    ! proof changed for IsSelfAdjoint.linearly_dependent_of_isLocalExtrOn
    @@ Mathlib.NumberTheory.ModularForms.JacobiTheta.Basic @@
    ! proof changed for exists_summable_bound_exp_mul_sq
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for sq_le_one_iff
    @@ Mathlib.Analysis.SpecificLimits.Basic @@
    ! proof changed for tendsto_pow_atTop_nhds_0_iff
    ! proof changed for summable_one_div_pow_of_le
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_four_le_pow_two_of_pow_two_le
    @@ Mathlib.Analysis.SpecialFunctions.Pow.Continuity @@
    ! proof changed for NNReal.eventually_pow_one_div_le
    @@ Mathlib.Computability.AkraBazzi.GrowsPolynomially @@
    ! proof changed for AkraBazziRecurrence.GrowsPolynomially.eventually_atTop_nonneg_or_nonpos
    @@ Mathlib.NumberTheory.RamificationInertia @@
    ! proof changed for Ideal.quotientToQuotientRangePowQuotSucc_surjective
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for AntivaryOn.nsmul_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for one_lt_sq_iff
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! proof changed for multiplicity.Nat.pow_sub_pow
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.one_lt_pow'
    @@ Mathlib.Analysis.Analytic.Constructions @@
    ! proof changed for formalMultilinearSeries_geometric_radius
    @@ Mathlib.NumberTheory.Padics.PadicVal @@
    ! proof changed for range_pow_padicValNat_subset_divisors'
    @@ Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots @@
    ! proof changed for IsPrimitiveRoot.sub_one_norm_two
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for MonovaryOn.pow_left₀
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.lt_of_pow_dvd_right
    @@ Mathlib.Data.Polynomial.Degree.CardPowDegree @@
    ! proof changed for Polynomial.cardPowDegree_apply
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for LucasLehmer.residue_eq_zero_iff_sMod_eq_zero
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for sq_eq_sq_iff_abs_eq_abs
    @@ Mathlib.Algebra.GroupPower.Lemmas @@
    ! proof changed for zpow_lt_zpow_iff
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Monovary.pow_left₀
    @@ Mathlib.Algebra.Order.Field.Basic @@
    ! proof changed for one_div_pow_le_one_div_pow_of_le
    @@ Mathlib.RingTheory.Artinian @@
    ! proof changed for IsArtinianRing.isNilpotent_jacobson_bot
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for one_le_sq_iff
    @@ Mathlib.RingTheory.Ideal.Operations @@
    ! proof changed for Ideal.pow_le_self
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Monovary.nsmul_right
    @@ Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology @@
    ! proof changed for is_ideal_adic_pow
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.log_eq_iff
    @@ Mathlib.RingTheory.Polynomial.Cyclotomic.Expand @@
    ! proof changed for Polynomial.isRoot_cyclotomic_prime_pow_mul_iff_of_charP
    @@ Mathlib.Analysis.Analytic.Basic @@
    ! proof changed for HasFPowerSeriesOnBall.uniform_geometric_approx
    @@ Mathlib.RingTheory.Perfection @@
    ! proof changed for PreTilt.valAux_add
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for AntivaryOn.pow_right
    @@ Mathlib.RingTheory.Valuation.Integral @@
    ! proof changed for Valuation.Integers.mem_of_integral
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! proof changed for Nat.two_pow_sub_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Right.pow_nonneg
    @@ Mathlib.Analysis.Normed.Field.Basic @@
    ! proof changed for norm_map_one_of_pow_eq_one
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for one_lt_mersenne
    @@ Mathlib.Combinatorics.SetFamily.Kleitman @@
    ! proof changed for Finset.card_biUnion_le_of_intersecting
    @@ Mathlib.Algebra.Homology.LocalCohomology @@
    ! proof changed for localCohomology.Ideal.exists_pow_le_of_le_radical_of_fG
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Left.pow_nonneg
    @@ Mathlib.Analysis.BoxIntegral.Basic @@
    ! proof changed for BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO
    @@ Mathlib.NumberTheory.RamificationInertia @@
    ! proof changed for Ideal.ramificationIdx_lt
    @@ Mathlib.Data.Nat.Factorial.Basic @@
    ! proof changed for Nat.factorial_mul_pow_sub_le_factorial
    @@ Mathlib.RingTheory.DedekindDomain.Ideal @@
    ! proof changed for Ideal.pow_succ_lt_pow
    @@ Mathlib.NumberTheory.Liouville.LiouvilleNumber @@
    ! proof changed for LiouvilleNumber.aux_calc
    @@ Mathlib.Analysis.Distribution.SchwartzSpace @@
    ! proof changed for Function.HasTemperateGrowth.norm_iteratedFDeriv_le_uniform_aux
    @@ Mathlib.Data.Nat.Factorial.Basic @@
    ! proof changed for Nat.pow_sub_le_descFactorial
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_dvd_pow_iff_le_right
    @@ Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology @@
    ! proof changed for Ideal.adic_basis
    @@ Mathlib.Combinatorics.Additive.PluenneckeRuzsa @@
    ! proof changed for Finset.card_nsmul_sub_nsmul_le
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Monovary.nsmul_left
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! proof changed for Behrend.sum_sq_le_of_mem_box
    @@ Mathlib.MeasureTheory.Group.AddCircle @@
    ! proof changed for AddCircle.isAddFundamentalDomain_of_ae_ball
    @@ Mathlib.GroupTheory.Schreier @@
    ! proof changed for Subgroup.card_commutator_le_of_finite_commutatorSet
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.log_anti_left
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Monotone.pow_right
    @@ Mathlib.Data.Nat.Factorial.Basic @@
    ! proof changed for Nat.ascFactorial_le_pow_add
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for MonovaryOn.pow_left
    @@ Mathlib.Data.Complex.Exponential @@
    ! proof changed for Real.one_sub_div_pow_le_exp_neg
    @@ Mathlib.Analysis.SpecificLimits.FloorPow @@
    ! proof changed for mul_pow_le_nat_floor_pow
    @@ Mathlib.Topology.UnitInterval @@
    ! proof changed for Set.Icc.monotone_addNSMul
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_lt_self_of_lt_one
    @@ Mathlib.Order.Filter.AtTopBot @@
    ! proof changed for Filter.Tendsto.nsmul_atTop
    @@ Mathlib.Topology.EMetricSpace.Paracompact @@
    ! proof changed for EMetric.instParacompactSpace
    @@ Mathlib.FieldTheory.Finite.Basic @@
    ! proof changed for FiniteField.X_pow_card_pow_sub_X_ne_zero
    @@ Mathlib.Probability.StrongLaw @@
    ! proof changed for ProbabilityTheory.strong_law_aux1
    @@ Mathlib.RingTheory.QuotientNilpotent @@
    ! proof changed for Ideal.IsNilpotent.induction_on
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! proof changed for Behrend.le_N
    @@ Mathlib.Analysis.Convex.SpecificFunctions.Deriv @@
    ! proof changed for strictConvexOn_pow
    @@ Mathlib.Data.Real.Pi.Bounds @@
    ! proof changed for Real.pi_lt_sqrtTwoAddSeries
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for sq_eq_sq
    @@ Mathlib.Analysis.Calculus.FDeriv.Measurable @@
    ! proof changed for FDerivMeasurableAux.D_subset_differentiable_set
    @@ Mathlib.NumberTheory.Divisors @@
    ! proof changed for Nat.mem_properDivisors_prime_pow
    @@ Mathlib.Algebra.GroupPower.Lemmas @@
    ! proof changed for zpow_lt_zpow
    @@ Mathlib.Data.Nat.Squarefree @@
    ! proof changed for Nat.sq_mul_squarefree_of_pos
    @@ Mathlib.Combinatorics.SimpleGraph.Regularity.Increment @@
    ! proof changed for SzemerediRegularity.card_increment
    @@ Mathlib.Data.Polynomial.Degree.CardPowDegree @@
    ! proof changed for Polynomial.cardPowDegree
    @@ Mathlib.NumberTheory.FermatPsp @@
    ! proof changed for Nat.exists_infinite_pseudoprimes
    @@ Mathlib.Analysis.Analytic.Basic @@
    ! proof changed for HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
    @@ Mathlib.RingTheory.DedekindDomain.Ideal @@
    ! proof changed for Ideal.exists_mem_pow_not_mem_pow_succ
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! proof changed for Behrend.dValue_pos
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for lt_of_mul_self_lt_mul_self
    @@ Mathlib.Topology.MetricSpace.HausdorffDistance @@
    ! proof changed for IsOpen.exists_iUnion_isClosed
    @@ Mathlib.NumberTheory.RamificationInertia @@
    ! proof changed for Ideal.quotientToQuotientRangePowQuotSucc_injective
    @@ Mathlib.Data.Polynomial.Degree.Lemmas @@
    ! proof changed for Polynomial.natDegree_comp_le
    @@ Mathlib.Data.Complex.Exponential @@
    ! proof changed for Real.sinh_lt_cosh
    @@ Mathlib.Data.Nat.Choose.Factorization @@
    ! proof changed for Nat.factorization_choose_of_lt_three_mul
    @@ Mathlib.Data.Real.ENNReal @@
    ! proof changed for ENNReal.zpow_le_of_le
    @@ Mathlib.Topology.UnitInterval @@
    ! proof changed for Set.Icc.addNSMul_eq_right
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for Left.pow_le_one_of_le
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.log_le_clog
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Antivary.pow_left₀
    @@ Mathlib.Data.Nat.Log @@
    ! proof changed for Nat.clog_pow
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for Antivary.nsmul_left
    @@ Mathlib.NumberTheory.Padics.RingHoms @@
    ! proof changed for PadicInt.nthHomSeq_one
    @@ Mathlib.Analysis.SpecificLimits.Basic @@
    ! proof changed for tendsto_add_one_pow_atTop_atTop_of_pos
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for one_le_pow_of_one_le'
    @@ Mathlib.Combinatorics.Additive.Behrend @@
    ! proof changed for Behrend.roth_lower_bound_explicit
    ! proof changed for Behrend.dValue
    @@ Mathlib.Algebra.Order.Monovary @@
    ! proof changed for AntivaryOn.nsmul_right
    ! proof changed for Monovary.pow_left
    @@ Mathlib.Data.Nat.Bitwise @@
    ! proof changed for Nat.append_lt
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_le_nsmul_iff_left
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.pow_left_strictMono
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_le_pow_iff_right'
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for LucasLehmer.mersenne_int_ne_zero
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_lt_nsmul_iff_left
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.one_lt_two_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_lt_pow_iff_right'
    @@ Mathlib.NumberTheory.Divisors @@
    ! proof changed for Nat.properDivisors_prime_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for le_of_pow_le_pow_left'
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_le_one_iff_of_nonneg
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_left_strictMono
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for abs_pow_eq_one
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for nsmul_le_nsmul_left
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_left_inj
    ! proof changed for pow_lt_pow_iff_right_of_lt_one
    @@ Mathlib.NumberTheory.Multiplicity @@
    ! proof changed for padicValNat.pow_two_sub_pow
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_right_strictMono'
    @@ Mathlib.NumberTheory.LucasLehmer @@
    ! proof changed for LucasLehmer.sMod_lt
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_lt_pow_iff_right
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.one_lt_pow
    @@ Mathlib.Algebra.GroupPower.Order @@
    ! proof changed for pow_le_pow_iff_right
    ! proof changed for pow_lt_one_iff_of_nonneg
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_le_pow_right_of_le_one'
    @@ Mathlib.Data.Nat.Pow @@
    ! proof changed for Nat.one_lt_pow_iff
    @@ Mathlib.Algebra.GroupPower.CovariantClass @@
    ! proof changed for pow_left_strictMono
    366 differences
    total 9.85s

    Structure

    There are two test directories, both of which are independent Lean projects that implement a module Test, but with slightly different content.
    This can be used to test leaff like so ./runleaff Test.Test test/ test.

    Visit original content creator repository
    https://github.com/alexjbest/leaff

  • microservices-observability

    Build Status codecov.io GitHub license Join the chat at https://gitter.im/xmlking/microservices-observability

    microservices-observability

    As Developers are migrating from Monolithic architecture to distributed microservices and Service Mesh, troubleshooting production issues become difficult.

    This sample application showcases patterns to implement better Observability at web scale.

    Reactive

    Log Aggregation

    Reactive

    Highlights

    • Ready to go docker configuration for set up GILK logging stack in a minutes.
      • GILKGrafana , InfluxDB, Logstash json format, Kafka
    • Monitoring solution for docker hosts and containers with Prometheus, Grafana, cAdvisor, NodeExporter and alerting with AlertManager.
    • Vendor-neutral instrumentation
    • end-to-end Functional Reactive Programming (FRP) with Spring 5.
    • Multi-project builds with Gradle Kotlin Script.
    • Spring Kotlin Support
    • Docker deployment

    Prerequisites

    1. Gradle 4.4 (Install via sdkman)
    2. Docker for Mac Setup Instructions

    Build

    # build all 3 executable jars
    gradle build
    # continuous build with `-t`. 
    # this shoud be started before any run tasks i.e., `gradle ui-app:bootRun`, for spring's devtools to work.
    gradle build -x test -t
    # build all 3 apps
    gradle build -x test
    # build all 3 docker images
    gradle docker -x test

    Test

    gradle test

    Run

    Manual
    # start infra services
    docker-compose  -f docker-compose-infra.yml up cassandra
    docker-compose  -f docker-compose-infra.yml up kafka
    docker-compose  -f docker-compose-infra.yml up influxdb

    Start all 4 apps with gradle xyz:bootRun : cassandra-data-service, stream-service, ui-app , kafka-influxdb-service

    If you want to debug the app, add –debug-jvm parameter to Gradle command line

    Docker

    You can also build Docker images and run all via Docker Compose

    # start containers in the background
    docker-compose up -d
    # start containers in the foreground
    docker-compose up 
    # show runnning containers 
    docker-compose ps
    # scaling containers and load balancing
    docker-compose scale stream=2
    # 1. stop the running containers using
    docker-compose stop
    # 2. remove the stopped containers using
    docker-compose rm -f
    # just start only infra services
    docker-compose  -f docker-compose-infra.yml up
    # connect(ssh) to a service and run a command
    docker-compose exec cassandra cqlsh
    # see logs of a service 
    docker-compose logs -f stream
    # restart single service
    docker-compose restart stream
    # start single service
    docker-compose -f docker-compose-infra.yml up cassandra
    docker-compose -f docker-compose-infra.yml up kafka
    docker-compose -f docker-compose-infra.yml up influxdb
    # check health for a service
    docker inspect --format "{{json .State.Health.Status }}" microservicesobservability_app_1
    docker ps
    docker-compose -f docker-compose-fluentd.yml up

    Access UI App at http://localhost:8080

    Prometheus http://localhost:9090/graph

    InfluxDB http://localhost:8083

    Grafana http://localhost:1634

    Gradle Commands

    # upgrade project gradle version
    gradle wrapper --gradle-version 4.4.1 --distribution-type all
    # gradle daemon status 
    gradle --status
    gradle --stop
    # refresh dependencies
    gradle build -x test --refresh-dependencies 

    Reference

    Visit original content creator repository https://github.com/xmlking/microservices-observability