Blog

  • robosuite

    Visit original content creator repository
    https://github.com/wx-b/robosuite

  • buidler-aragon

    Aragon Buidler plugin

    Buidler plugin for developing Aragon apps with full front end and back end hot reloading.

    Required plugins

    This plugin currently requires:

    Installation

    yarn add --dev @aragon/buidler-aragon @nomiclabs/buidler-truffle5 @nomiclabs/buidler-web3 web3
    

    And add the following statement to your buidler.config.js:

    usePlugin('@aragon/buidler-aragon')

    Tasks

    Start task

    This plugin provides the “start” task, which allows you to develop an application while visualizing it in the browser.

    Task options:

    • openBrowser: Whether or not to automatically open a browser tab with the client when running this task.
    • Please use buidler.config.js for additional options.

    Environment extensions

    This plugin does not extend the environment.

    Usage

    To use this plugin, please use create-aragon-app with the buidler boilerplate option. For instructions on how to use this boilerplate, please refer to aragon-buidler-boilerplate.

    If you don’t want to use a create-aragon-app or a boilerplate, you can follow the structure of the boilerplate linked above. In essence, the regular structure of a Buidler project should do. Please refer to the Buidler docs.

    Configuration

    This plugin extends BuidlerConfig by adding the following fields:

    export interface AragonConfig {
      appServePort?: number
      clientServePort?: number
      appSrcPath?: string
      appBuildOutputPath?: string
      hooks?: AragonConfigHooks
    }

    Hooks

    If you need to perform some tasks before deploying your application’s proxy, e.g. deploying a token and passing that token in your proxy’s initialize function, you can use the hooks object within the BuidlerConfig object. This object simply contains functions, which, if named correctly, will be called at the appropriate moments in the development pipeline:

    export interface AragonConfigHooks {
      preDao?: (bre: BuidlerRuntimeEnvironment) => Promise<void> | void
      postDao?: (
        dao: KernelInstance,
        bre: BuidlerRuntimeEnvironment
      ) => Promise<void> | void
      preInit?: (bre: BuidlerRuntimeEnvironment) => Promise<void> | void
      postInit?: (
        proxy: Truffle.ContractInstance,
        bre: BuidlerRuntimeEnvironment
      ) => Promise<void> | void
      getInitParams?: (bre: BuidlerRuntimeEnvironment) => Promise<any[]> | any[]
      postUpdate?: (
        proxy: Truffle.ContractInstance,
        bre: BuidlerRuntimeEnvironment
      ) => Promise<void> | void
    }

    For an example on how to use these hooks, please see the token-wrapper tests within the plugin’s test projects.

    Development

    Please refer to the Buidler docs for plugin development.

    After cloning this repository, make sure you run npm run dev so that all required contract artifacts are available.

    Typescript support

    You need to add this to your tsconfig.json’s files array: “node_modules/@aragon/buidler-aragon/src/type-extensions.d.ts”

    Visit original content creator repository
    https://github.com/aragon/buidler-aragon

  • HazePanel

    Haze Panel

    GPLv3 License Size

    Custom Plasma Desktop panel contains several preconfigured plasmoids.

    I wanted to save my customized panel and to be able to add it to a desktop with one click. I made this from available built-in templates by Plasma desktop installation in /usr/share/plasma/layout-templates/ folder.

    I simply call it “Haze” because of my desktop wallpaper colour I’m using at the moment of making this.

    Images


    No window on desktop.



    Active floating window.



    Maximized window with global menu.



    Maximized window with no global menu.


    Requirements

    This panel uses following external plasmoid widgets:

    Plasmoid Get from
    Window Buttons Applet (org.kde.windowbuttons) https://github.com/psifidotos/applet-window-buttons
    Application Title (org.communia.apptitle) https://store.kde.org/p/1199712/
    Better Inline Clock (org.kde.plasma.betterinlineclock) https://store.kde.org/p/1245902/
    Panel Transparency Button (org.kde.paneltransparencybutton) https://store.kde.org/p/1338479/

    Please make sure they are installed before adding Haze Panel.

    Installation

    path

    Simply place the org.kde.plasma.desktop.hazePanel folder to ~/.local/share/plasma/layout-templates/. Then you can add the panel from desktop. Create layout-templates directory if it doesn’t exist.


    Feel free to customize the setting from what I’ve set. Like the calendar formatting I personally set to dddd, d MMMM 202- because it’s been 2- years since the Black Mesa Incident 😀

    Visit original content creator repository https://github.com/waimus/HazePanel
  • flutter_gherkin_wrapper

    Flutter Gherkin Wrapper

    Test Status Build Status

    Wrapper is used to execute tests with Cucumber / Gherkin notation:

    • Support of widget and integration tests from a single code base
    • Nested scenarious
    • Emulation of Set Up / Tear Down with Cucumber / Gherkin notation

    Getting started

    Initialization

    // Generate steps from resources
    // ./test/e2e/given/generic.dart
    @GenerateGherkinResources(['../steps'])
    class Generics extends GivenGeneric {
      @override
      RegExp get pattern => RegExp('%step%');
    
      @override
      // Execute sub-step
      Future<void> executeStep() async {
        final reporter = FileReporter();
        final step = await FileReader().getFromString('''%feature%''', reporter);
        final result = await FileRunner(FileRunner.tester, reporter).run(step);
        if (!result) {
          reporter.publish();
        }
        expectSync(result, true);
      }
    }
    
    
    // Generate list of steps
    // ./test/e2e/steps_iterator.dart
    @GenerateListOfClasses(['given', 'when', 'then'])
    import 'steps_iterator.list.dart';
    
    ExecutableStepIterator.inject(classList);
    # /test/e2e/steps/open_expense_form.resource.feature
    Feature: Verify Basic Actions
    
      Scenario: Opened Expense Form
        Given I am on "Home" page
         When I tap "Add Bill, Income or Transfer" button
         Then I can see "Add new Bill" button

    Execution

    void main() {
      Iterable<File> features = Directory('./test/e2e')
          .listSync(recursive: true)
          .where(
              (entity) => entity is File && entity.path.endsWith('.test.feature'))
          .cast<File>();
    
      setUpAll(() {
        TestWidgetsFlutterBinding.ensureInitialized();
        ScreenCapture.enableScreenCapture();
        // MainTest.cleanUpData();
      });
    
      group('Run All End-To-End Tests', () {
        for (var file in features) {
          testWidgets(file.path, (WidgetTester tester) async {
            // await MainTest.init(tester);
            final runner = FileRunner(tester);
            await runner.init(file);
            // ! to avoid collisions in concurrent requests
            expectSync(await runner.run(), true);
            await tester.pumpAndSettle();
          }, timeout: const Timeout(Duration(minutes: 5)));
        }
      });
    }
    # /test/e2e/bill/create_different_expenses.test.feature
    Feature: Verify Expenses Functionality
    
      Scenario Outline: Added different Expenses
        Given Opened Expense Form
         When I select "<account>" from "AccountSelector" with "Enter Account Identifier" tooltip
          And ...

    In addition to thanking, you may treat us to ☕.

    Visit original content creator repository https://github.com/lyskouski/flutter_gherkin_wrapper
  • tensorflow2-cifar

    Training CIFAR-10 with TensorFlow2(TF2)

    TensorFlow 2.4 Python 3.8 License

    TensorFlow2 Classification Model Zoo. I’m playing with TensorFlow2 on the CIFAR-10 dataset.

    Architectures

    Prerequisites

    • Python 3.8+
    • TensorFlow 2.4.0+

    Training

    Start training with:

    python train.py --model resnet18

    You can manually resume the training with:

    python train.py --model resnet18 --resume

    Testing

    python test.py --model resnet18

    Accuracy

    Model Acc. Param.
    LeNet 67.85% 0.06M
    AlexNet 78.81% 21.6M
    VGG11 92.61% 9.2M
    VGG13 94.31% 9.4M
    VGG16 94.27% 14.7M
    VGG19 93.65% 20.1M
    ResNet18 95.37% 11.2M
    ResNet34 95.48% 21.3M
    ResNet50 95.41% 23.6M
    ResNet101 95.44% 42.6M
    ResNet152 95.29% 58.3M
    DenseNet121 95.37% 7.0M
    DenseNet169 95.10% 12.7M
    DenseNet201 94.79% 18.3M
    PreAct-ResNet18 94.08% 11.2M
    PreAct-ResNet34 94.76% 21.3M
    PreAct-ResNet50 94.81% 23.6M
    PreAct-ResNet101 94.95% 42.6M
    PreAct-ResNet152 95.07% 58.3M
    SE-ResNet18 95.44% 11.3M
    SE-ResNet34 95.30% 21.5M
    SE-ResNet50 95.76% 26.1M
    SE-ResNet101 95.40% 47.3M
    SE-ResNet152 95.29% 64.9M
    SE-PreAct-ResNet18 94.54% 11.3M
    SE-PreAct-ResNet34 95.30% 21.5M
    SE-PreAct-ResNet50 94.22% 26.1M
    SE-PreAct-ResNet101 94.34% 47.3M
    SE-PreAct-ResNet152 94.28% 64.9M
    MobileNet 92.34% 3.2M
    MobileNetV2 94.03% 2.3M

    Note

    All abovementioned models are available. To specify the model, please use the model name without the hyphen. For instance, to train with SE-PreAct-ResNet18, you can run the following script:

    python train.py --model sepreactresnet18

    If you suffer from loss=nan issue, you can circumvent it by using a smaller learning rate, i.e.

    python train.py --model sepreactresnet18 --lr 5e-2
    Visit original content creator repository https://github.com/lionelmessi6410/tensorflow2-cifar
  • AIDL-Test

    Service

    서비스는 어플리케이션의 구성요소이다. 하지만 백그라운드에서 작업을 수행하여 다른 어플리케이션에서도 서비스를 시작할 수 있고 어플리케이션이 전환 되더라도 작업이 백그라운드 작업이 계속 실행된다. 예를 들면 네트워크 트랜잭션 또는 음악재생등을 백그라운드에서 수행할 수 있다.

    서비스 유형

    서비스는 총 3가지 유형이 이다.

    포그라운드

    포그라운드 서비스는 사용자에게 알림을 통해 보여야한다. 따라서 사용자에게 작업이 수행중인걸 계속 확인 시켜야하는 작업을 하면된다. 예를 들면 오디오 트랙을 재생할때 포그라운드 서비스를 사용하면 된다.

    백그라운드

    백그라운드 서비스는 사용자에게 직접 보이지 않는 작업을 수행한다. 하지만 API26 이상에서는 백그라운드 서비스 실행에 제한을 한다.

    바인드

    서비스를 바인딩을 하게되면 클라이언트-서버 인터페이스를 제공하여 구성 요소가 서비스와 상호작용하게 하며, 결과를 받을 수도 있고 심지어 이와 같은 작업을 여러 프로세스에 걸쳐 프로세스 간 통신을 수행 할 수도 있다. 바인드는 포그라운드와 백그라운드 처럼 별도로 나누는 개념은 아니고 양쪽 서비스에서 모두 작동될 수 있는 개념이다.

    기본사항

    서비스를 생성하기 위해서는 Service의 하위 클래스를 생성해야한다. Service의 구현체를 만들기 위해서는 다음과 같은 콜백 메서드를 재정의 해야한다.

    onStartCommand()

    이 메서드는 액티비티등 다른 구성요소에서 해당 서비스를 시작하도록 요청할 때 호출 된다. 이는 startService()를 통해 호출하게 된다. 한번 실행된 서비스는 백그라운드에서 무한히 실행 될 수 있다.

    onBind()

    이 메서드는 다른 구성요소에서 서비스가 바인딩되기 직전에 호출된다. 이는 bindService()를 통해 호출하게 된다. 이때 클라이언트와 서비스를 통신할 수 있도록 인터페이스를 제공해야된다. 따라서 이때 IBinder를 반환하면 된다. 만약 바인딩을 허용하지 않으면 null을 반환하면된다.

    onCreate()

    이 메서드는 서비스가 처음 생성되었을 때 호출된다. 또한 일회성 호출로 설정 절차를 수행한다. 서비스가 이미 실행 중일 경우 호출되지 않는다.

    onDestroy()

    이 메서드는 서비스가 더 이상 사용되지 않고 소멸시킬 때 호출 된다. 따라서 스레드, 등록된 리스너, 리시버의 각종 리소스를 정리하게 된다. 이 메서드는 서비스가 수신하는 마지막 호출이다.

    바인드된 서비스

    바인드된 서비스란 클라이언트-서버 인터페이스 에서 서버를 말한다. 이는 컴포넌트를 서비스에 바이딩하고, 요청을 보내고, 응답을 수신하며, 프로세스 간 통신을 할 수 있게 한다. 또한 다른 어플리케이션의 컴포넌트에 서비스를 제공하는 동안에만 유지되고 백그라운드에서 무한히 돌지 않게 할 수 있다.

    바인드된 서비스 생성

    바인딩을 제공하는 서비스를 생성할 때는 클라이언트와 상호작용할 수 있는 프로그래밍 인터페이스인 IBinder라고 한다. 정의하는 방법은 총 세 가지가 있다.

    바인더 클래스 확장

    서비스가 어플리케이션 전용으로 클라이언트와 같은 프로세스에서 실행될 경우 Binder클래스를 확장하는데 그 인스턴스는 onBinder에서 반환하는 방식으로 사용한다. 클라이언트는 Binder를 받고 이를 사용하여 서비스에 엑세스 하게 되는 것이다.

    메신저 사용

    인터페이스가 여러 프로세스에서 작동해야 하는 경우, Messenger를 통해 서비스를 정의할 수 있다. 이는 Handler 를 통해 Messenger들의 유형마다의 응답을 정의 하여 사용할 수 있다. 또한 IBinder를 공유하고 이를 통해 Messenger를 전달하여 명령어를 보낼 수 있게 된다. 이는 프로세스 간 통신을 실행하는 가장 간단한 방법이다. 왜냐하면 Messenger가 모든 요청을 단일 스레드 큐에 저장하므로 서비스를 스레드로부터 안전하게 설계할 필요가 없기 때문이다.

    AIDL 사용

    AIDL은 객체를 운영체제가 이해할 수 있는 원시 유형으로 해체한 다음, 여러 프로세스에서 마샬링하여 IPC를 실행합니다. Messenger를 사용하는 이전 기법은 실제로 AIDL을 기본 구조로 하고 있습니다. Messenger 는 단일 스레드에 모든 클라이언트 요청 큐를 생성하므로 서비스는 한번에 하나씩 처리하도록 되어있다. 하지만 AIDL를 직접 사용하여 서비스가 동시에 여러 요청을 처리하도록 할 수 있다. 이때는 다중 스레드로부터 안전해야 한다.

            

    Visit original content creator repository
    https://github.com/Yun-SeYeong/AIDL-Test

  • ripple-effect-click

    Ripple Effect Click

    Build Status

    You probably have noticed that ripple effect –(known as “ripple”)– when you click on an element on your Android. Now you can implement it to your application very fast and easily.

    How to use:

    Simple and standard use, just define the class or element you want to add the ripple effect. This example will apply the ripple effect to all buttons you have.

    $('button').rippleEffect();

    You also can define more than one element into the same definition, just like this:

    $('button, .to-ripple, .element-test').rippleEffect();

    Extra configurations:

    There are some extra settings you can apply to the ripple’s configuration:

    • timingFunction
    • duration

    Animation properties:

    • CSS animation-timing-function Property:
      • timingFunction: linear
      • $('button').rippleEffect({
            timingFunction: 'linear'
        });
    • CSS animation-duration Property:
      • duration: ‘0.65s’
      • $('button').rippleEffect({
            duration: '2s'
        });

    Contribution

    Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

    Support

    If you encounter any problems or bugs, please open an issue on GitHub. Need help setting up or want to customize this extension to meet your business needs? Please let me know!

    Visit original content creator repository https://github.com/williankeller/ripple-effect-click
  • CMSScan

    CMSScan

    Scan WordPress, Drupal, Joomla, vBulletin websites for Security issues.

    platform License python Rawsec's CyberSecurity Inventory

    Made with Love in India

    CMSScan provides a centralized Security Dashboard for CMS Security scans. It is powered by wpscan, droopescan, vbscan and joomscan. It supports both on demand and scheduled scans and has the ability to sent email reports.

    Install

    # Requires ruby, ruby-dev, gem, libwww-perl, python3.6+ and git
    git clone https://github.com/ajinabraham/CMSScan.git
    cd CMSScan
    ./setup.sh
    

    Run

    ./run.sh

    Periodic Scans

    You can perform periodic CMS scans with CMSScan. You must run CMSScan server separately and configure the following before running the scheduler.py script.

    # SMTP SETTINGS
    SMTP_SERVER = ''
    FROM_EMAIL = ''
    TO_EMAIL = ''
    
    # SERVER SETTINGS
    SERVER = ''
    
    # SCAN SITES
    WORDPRESS_SITES = []
    DRUPAL_SITES = []
    JOOMLA_SITES = []
    VBULLETIN_SITES = []
    

    Add a cronjob

    crontab -e
    @weekly /usr/bin/python3 scheduler.py
    

    Basic Auth

    By default there is no authentication. To enable basic auth, configure the following in app.py

    app.config['BASIC_AUTH_USERNAME'] = 'admin'
    app.config['BASIC_AUTH_PASSWORD'] = 'password'
    app.config['BASIC_AUTH_FORCE'] = True
    

    Docker

    Local

    docker build -t cmsscan .
    docker run -it -p 7070:7070 cmsscan
    

    Prebuilt Image

    docker pull opensecurity/cmsscan
    docker run -it -p 7070:7070 opensecurity/cmsscan
    

    Screenshots

    Visit original content creator repository https://github.com/ajinabraham/CMSScan
  • CMSScan

    CMSScan

    Scan WordPress, Drupal, Joomla, vBulletin websites for Security issues.

    platform License python Rawsec's CyberSecurity Inventory

    Made with Love in India

    CMSScan provides a centralized Security Dashboard for CMS Security scans. It is powered by wpscan, droopescan, vbscan and joomscan. It supports both on demand and scheduled scans and has the ability to sent email reports.

    Install

    # Requires ruby, ruby-dev, gem, libwww-perl, python3.6+ and git
    git clone https://github.com/ajinabraham/CMSScan.git
    cd CMSScan
    ./setup.sh
    

    Run

    ./run.sh

    Periodic Scans

    You can perform periodic CMS scans with CMSScan. You must run CMSScan server separately and configure the following before running the scheduler.py script.

    # SMTP SETTINGS
    SMTP_SERVER = ''
    FROM_EMAIL = ''
    TO_EMAIL = ''
    
    # SERVER SETTINGS
    SERVER = ''
    
    # SCAN SITES
    WORDPRESS_SITES = []
    DRUPAL_SITES = []
    JOOMLA_SITES = []
    VBULLETIN_SITES = []
    

    Add a cronjob

    crontab -e
    @weekly /usr/bin/python3 scheduler.py
    

    Basic Auth

    By default there is no authentication. To enable basic auth, configure the following in app.py

    app.config['BASIC_AUTH_USERNAME'] = 'admin'
    app.config['BASIC_AUTH_PASSWORD'] = 'password'
    app.config['BASIC_AUTH_FORCE'] = True
    

    Docker

    Local

    docker build -t cmsscan .
    docker run -it -p 7070:7070 cmsscan
    

    Prebuilt Image

    docker pull opensecurity/cmsscan
    docker run -it -p 7070:7070 opensecurity/cmsscan
    

    Screenshots

    Visit original content creator repository https://github.com/ajinabraham/CMSScan
  • html-list-builder

    html-list-builder

    npm version

    The HTML List Builder is an npm package that allows you to easily create ordered and unordered lists in HTML with class and id attributes as options. It provides a simple and convenient way to generate lists programmatically.

    Installation

    You can install the HTML List Builder package using npm. Run the following command:

    npm install html-list-builder
    

    Usage

    To use the HTML List Builder in your project, require it and call the provided functions:

    const { createOrderedList, createUnorderedList } = require('html-list-builder');
    
    const items = ['Apple', 'Banana', 'Orange'];
    const options = { class: 'fruits', id: 'fruits-list' };
    
    const orderedList = createOrderedList(items, options);
    console.log(orderedList);
    
    const unorderedList = createUnorderedList(items, options);
    console.log(unorderedList);
    
    

    The createOrderedList and createUnorderedList functions take an array of items as the first parameter and an options object as the second parameter. The options object can contain class and idattributes to customize the list element.

    API

    createOrderedList(items, options)

    This function generates an ordered list in HTML.

    • items (Array): An array of strings representing the list items.
    • options (Object): An optional object with the following properties:
      • class (String): The class attribute for the <ol> element.
      • id (String): The id attribute for the <ol> element.

    Returns: A string containing the generated ordered list HTML.

    createUnorderedList(items, options)

    This function generates an unordered list in HTML.

    • items (Array): An array of strings representing the list items.
    • options (Object): An optional object with the following properties:
      • class (String): The class attribute for the <ul> element.
      • id (String): The id attribute for the <ul> element.

    Returns: A string containing the generated unordered list HTML.

    Visit original content creator repository https://github.com/brandonhimpfen/html-list-builder