Author: 27nlf2qrc0jd

  • wlts

    Web Land Trajectory Service

    Software License Code Coverage Test Documentation Status Software Life Cycle Release Join us at Discord

    About

    Land Use and Cover information is essential to support governments in decision making on the impact of human activities on the environment, for planning the use of natural resources, conservation of biodiversity, and monitoring climate change.

    Currently, several projects systematically provide information on the dynamics of land use and cover. Well known projects include PRODES, DETER and TerraClass. These projects are developed by INPE and they produce information on land use and coverage used by the Brazilian Government to make public policy decisions. Besides these projects there are other initiatives from universities and space agencies devoted to the creation of national and global maps.

    Although these projects adhere to open data policies and provide a rich collection of data, there are still a gap however in tools that facilitate the integrated use of these collections: it requires from researchers, students and public officials a great effort to collect, organize and integrate all the datasets, prior to their use. In general, each data collection adopts its own land use and cover classification system, with class names and meanings very different across the collections. Besides that, the collections have different spatial and temporal resolutions, rely on different data representation (raster or vector), and are served by different systems in several formats (files, DBMS or web services).

    In this context, the Web Land Trajectory Service (WLTS) is a service that aims to facilitate the access to these various land use and cover data collections through a tailored API. The result is tool that allows researchers and specialists to spend their time in the analytical process, once the API provides the integration of these datasets and brings the concept of Land Use and Cover Trajectories as a high level abstraction. The WLTS approach is to use a data model that defines a minimum set of temporal and spatial information to represent different sources and types of data. WLTS can be used in a range of application, such as in validation of land cover data sets, in the selection of trainning samples to support Machine Learning algorithms used in the generation of new classification maps.

    For more information on WLTS, see:

    • WLTS Specification: the WLTS specification using OpenAPI 3.0 notation.
    • WLTS.py: Python Client Library for Web Land Cover Trajectory Service.
    • LCCS-WS Specification: which is used to represent the classes associated with the resources retrieved in WLTS queries.
    • LCCS.py: Python Client Library for Land Cover Classification System Web Service.
    • LCCS Server: Python Web Server for LCCS.

    Installation

    See INSTALL.rst.

    Deploying

    See DEPLOY.rst.

    License

    Copyright (C) 2022 INPE.

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    Visit original content creator repository https://github.com/brazil-data-cube/wlts
  • wlts

    Web Land Trajectory Service

    Software License Code Coverage Test Documentation Status Software Life Cycle Release Join us at Discord

    About

    Land Use and Cover information is essential to support governments in decision making on the impact of human activities on the environment, for planning the use of natural resources, conservation of biodiversity, and monitoring climate change.

    Currently, several projects systematically provide information on the dynamics of land use and cover. Well known projects include PRODES, DETER and TerraClass. These projects are developed by INPE and they produce information on land use and coverage used by the Brazilian Government to make public policy decisions. Besides these projects there are other initiatives from universities and space agencies devoted to the creation of national and global maps.

    Although these projects adhere to open data policies and provide a rich collection of data, there are still a gap however in tools that facilitate the integrated use of these collections: it requires from researchers, students and public officials a great effort to collect, organize and integrate all the datasets, prior to their use. In general, each data collection adopts its own land use and cover classification system, with class names and meanings very different across the collections. Besides that, the collections have different spatial and temporal resolutions, rely on different data representation (raster or vector), and are served by different systems in several formats (files, DBMS or web services).

    In this context, the Web Land Trajectory Service (WLTS) is a service that aims to facilitate the access to these various land use and cover data collections through a tailored API. The result is tool that allows researchers and specialists to spend their time in the analytical process, once the API provides the integration of these datasets and brings the concept of Land Use and Cover Trajectories as a high level abstraction. The WLTS approach is to use a data model that defines a minimum set of temporal and spatial information to represent different sources and types of data. WLTS can be used in a range of application, such as in validation of land cover data sets, in the selection of trainning samples to support Machine Learning algorithms used in the generation of new classification maps.

    For more information on WLTS, see:

    • WLTS Specification: the WLTS specification using OpenAPI 3.0 notation.
    • WLTS.py: Python Client Library for Web Land Cover Trajectory Service.
    • LCCS-WS Specification: which is used to represent the classes associated with the resources retrieved in WLTS queries.
    • LCCS.py: Python Client Library for Land Cover Classification System Web Service.
    • LCCS Server: Python Web Server for LCCS.

    Installation

    See INSTALL.rst.

    Deploying

    See DEPLOY.rst.

    License

    Copyright (C) 2022 INPE.

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    Visit original content creator repository https://github.com/brazil-data-cube/wlts
  • ScanCode

    扫码

    一个简单的扫码工具。

    English GitHub license release

    简介

    • 一个简单的扫码工具。
    • 支持闪光灯。
    • 可从图库选取识别。
    • 可以复制条码。
    • 可以保存条码图片。
    • 目前支持的格式:UPC A, UPC E, EAN 8, EAN 13, Code 39, Code 93, Code 128, ITF, QR Code。
    • 识别到EAN 13时,可以通过亚马逊查询。
    • 识别到ISBN时,会调用豆瓣图书api查询图书信息。
    • 识别到开头为690-695(中国大陆的商品)的EAN 13时,会调用国家食品(产品)安全追溯平台的api查询商品信息。
    • 识别到 http:// 或 https:// 开头的QR Code时可以直接访问。
    • 识别到ss://开头的QR Code时可以打开Shadowsocks并添加配置。
    • 允许其它应用调用。

    使用

    CaptureActivty一共注册了三个Action:

    <activity
        android:name="com.gooosie.scancode.ui.activity.CaptureActivity"
        android:configChanges="orientation|keyboardHidden"
        android:launchMode="singleTask"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden" >
        <intent-filter>
            <action android:name="com.gooosie.scancode.SCAN"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
        <intent-filter>
            <action android:name="com.google.zxing.client.android.SCAN"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <category android:name="android.intent.category.BROWSABLE"/>
            <data android:scheme="zxing" android:host="scan" android:path="/"/>
        </intent-filter>
    </activity>

    并在扫码成功时:

    @Override
    public void onAnalyzeSuccess(Bitmap bitmap, Result result) {
        Intent resultIntent = new Intent();
        Bundle bundle = new Bundle();
        bundle.putInt(CodeUtil.RESULT_TYPE, CodeUtil.RESULT_SUCCESS);
        bundle.putString(Intents.Scan.RESULT, result.getText());
        bundle.putString(Intents.Scan.RESULT_FORMAT, result.getBarcodeFormat().name());
        resultIntent.putExtras(bundle);
        mActivity.setResult(Activity.RESULT_OK, resultIntent);
        mActivity.finish();
    }

    在扫码失败时:

    @Override
    public void onAnalyzeFailed() {
        Intent resultIntent = new Intent();
        Bundle bundle = new Bundle();
        bundle.putInt(CodeUtil.RESULT_TYPE, CodeUtil.RESULT_FAILED);
        bundle.putString(Intents.Scan.RESULT, "");
        resultIntent.putExtras(bundle);
        mActivity.setResult(Activity.RESULT_OK, resultIntent);
        mActivity.finish();
    }

    其中:

    CodeUtil.RESULT_TYPE       // "RESULT_TYPE"
    CodeUtil.RESULT_SUCCESS    // 1
    CodeUtil.RESULT_FAILED     // 2
    Intents.Scan.RESULT        // "SCAN_RESULT"
    Intents.Scan.RESULT_FORMAT // "SCAN_RESULT_FORMAT"

    使用实例:

    public void startCaptureActivity() {
        Intent intent = new Intent("com.gooosie.scancode.SCAN");
        startActivityForResult(intent, 100);
    }
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == 100 && resultCode == RESULT_OK) {
            Bundle bundle = data.getExtras();
            String format = bundle.getString("SCAN_RESULT_FORMAT");
            String code = bundle.getString("SCAN_RESULT");   
            // ...
        }
    }

    截图

    Screenshot1

    Screenshot2

    Screenshot3

    Screenshot4

    第三方库

    下载

    下载

    开源协议

    Apache License 2.0

    Visit original content creator repository https://github.com/gooosie/ScanCode
  • homeassistant-esolatgps

    esolatgps_banner

    GitHub Repo stars hacs_badge hacs_badge GitHub all releases Buy GitHub manifest version (path)

    Assalamu’alaikum

    This is a custom integration for Home Assistant that will create a Prayer Time sensor based on Person’s GPS coordinates. The GPS-based prayer time API is provided by Malaysia Prayer Time.

    Prayer time information are made as sensor attributes with the following format:

    • 12 hours (e.g. 6:01 AM)
    • 24 hours (e.g. 06:01:00)
    • Datetime UTC (e.g. 2023-07-29T22:01:00+00:00)

    This is a continuation of HomeAssistantEsolatGPS (Appdaemon version)

    Whats New?

    • Added Current Prayer Time (sensor.esolatnow)
    • Dynamic Prayer Time dashboard using Markdown card

    Requirements

    • Home Assistant 2021.x and above
    • Person entity with GPS location (device tracker)

    Installation

    With HACS

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

    Tip

    If you are unable to use the button above, manually search for eSolat GPS in HACS.

    Manual

    1. Copy the esolatgps directory from custom_components in this repository and place inside your Home Assistant’s custom_components directory.
    2. Restart Home Assistant
    3. Follow the instructions in the Setup section

    Warning

    If installing manually, in order to be alerted about new releases, you will need to subscribe to releases from this repository.

    Setup

    Open your Home Assistant instance and start setting up a new integration.

    Tip

    If you are unable to use the button above, follow the steps below:

    1. Navigate to the Home Assistant Integrations page (Settings –> Devices & Services)
    2. Click the + ADD INTEGRATION button in the lower right-hand corner
    3. Search for eSolat GPS
    4. Adjust the interval to your preference. Default is set to 15 minutes.

    The sensors will be populated sensor.esolat_ based on the person with GPS coordinates.

    image

    Dynamic Prayer Time – Markdown Card

    I have prepared a markdown card template that will:

    • Automatically show Prayer time based on the logged in user
    • If user state is at home the prayer time will automatically switched to Home prayer time

    You may refer to the Markdown.md and copy the markdown codes.

    image

    Special Thanks 🎉

    Visit original content creator repository https://github.com/zubir2k/homeassistant-esolatgps
  • winsdk2json

    winsdk2json

    sdk2json is a go package that parses the Windows SDK (function prototypes, structures, unions) to a friendlier format like JSON. The purpose of this tool was initially for the API hooking module (of saferwall sandbox) to allow an implementation of a generic hook handler that does not require knowledge of specific API prototype to know how to log them.

    winsdk2json relies on a C compiler frontend for parsing the C headers and convert them to a higher level objects. Those objects can be serialized formats like JSON or YAML.

    Here is an example:

    {
     "advapi32.dll": {
      "ControlService": {
       "callconv": "WINAPI",
       "name": "ControlService",
       "retVal": "BOOL",
       "params": [
        {
         "anno": "_In_",
         "type": "SC_HANDLE",
         "name": "hService"
        },
        {
         "anno": "_In_",
         "type": "DWORD",
         "name": "dwControl"
        },
        {
         "anno": "_Out_",
         "type": "LPSERVICE_STATUS",
         "name": "lpServiceStatus"
        }
       ]
      },

    Usage

    You can download the JSON files that contains all the definitions of the Win32 APIs in the releases page. If however, you intend to generate those definitions on another custom that fits your needs, please follow the instructions below:

    Clone the repo:

    git clone https://github.com/saferwall/winsdk2json.git
    cd winsdk2json
    git submodule init
    git submodule update

    Build & run”

    go build cli.go
    .\cli.exe -h
    
    WinSdk2JSON - a tool to parse the Windows Win32 SDK into JSON format.
    For more details see the github repo at https://github.com/saferwall/winsdk2json
    
    Usage:
      winsdk2json [flags]
      winsdk2json [command]
    
    Available Commands:
      completion  Generate the autocompletion script for the specified shell
      help        Help about any command
      parse       Walk through the Windows SDK and parse the Win32 headers
      version     Version number
    
    Flags:
      -h, --help   help for winsdk2json

    This package tries to stay up to date with the latest Windows SDK, they are copied into the winsdk/ folder. However, feel free to use an SDK version that is not included in this repo. The parse command takes a i argument that points to the Windows SDK headers. For example: C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.19041.0\\.

    Lessons Learned

    • SAL annotations
    • Some Windows APIs does not have a ANSI alternative: i.e OpenMutexW
    • API like CreateToolhelp32Snapshot does not have annotations.

    References

    Visit original content creator repository
    https://github.com/saferwall/winsdk2json

  • gatsby-starter-typescript-auth0-hasura

    gatsby-starter-typescript-auth0-hasura

    A Gatsby starter in TypeScript for authenticating via Auth0 and using the JWT with Hasura over GraphQL

    Although there are plenty of Gatsby+Hasura and Gatsby+Auth0 tutorials out there, at the time of writing all were out of date and using old patterns with deprecated libraries.

    This starter provides a simple Gatsby Admin page that:

    1. Authenticates via Auth0 OAuth 2.0 to obtain a JSON Web Token (JWT); and
    2. Uses the JWT in the request header to make simple GraphQL query and mutation requests to Hasura.

    The Admin page is styled with Bootstrap and is based on a slightly modified Dashboard Component. “Organizations” are used as an example for listing and creating objects/records, all other nav links serve as display placeholders only.

    Screenshot

    This starter uses:

    Hasura Configuration

    1. Follow instructions to set up Hasura
    2. Create a simple table to store Organizations
      CREATE TABLE organizations(
        id SERIAL PRIMARY KEY,
        name TEXT,
        label TEXT
      );
    1. Track the table from the Hasura console Data tab
    2. Add a few test records from the Hasura console Data > Insert Row tab
    3. Allow your role (configured below) to insert and select from the Hasura console Data > Permissions tab

    Auth0 Configuration

    Follow these steps to set up Auth0 with custom claims for Hasura.

    ENV configuration

    Rename .env.example to .env.development and update accordingly

    Property Example Value
    GATSBY_HASURA_GRAPHQL_URL http://localhost:8080/v1/graphql
    GATSBY_AUTH0_DOMAIN <my-tenant-name>.us.auth0.com
    GATSBY_AUTH0_CLIENT_ID T4WN7SBfeJ0BO6CFX2nw3k2yEECHOVMe
    GATSBY_AUTH0_REDIRECT_URI http://localhost:8000
    GATSBY_AUTH0_AUDIENCE https://<my-tenant-name>.us.auth0.com/api/v2/

    Contribute

    Please help us keep this starter up to date and adhering to best practices and conventions. We are not veterans in the space and appreciate any contributions or suggestions on how things can be done better. Feel free to submit an issue, pull request or reach out: hello at whitebrick dot com

    Visit original content creator repository https://github.com/treckstar/gatsby-admin