This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sly import Lexer, Parser | |
| class CalcLexer(Lexer): | |
| tokens = { TYPE_DECLARATION, SPACE, COLLAN, ASSIGN, NAME, TYPEOF, END, LPAREN, RPAREN } | |
| ignore = ' \t' | |
| # Tokens | |
| NAME = r'[a-zA-Z_][a-zA-Z0-9_]*' | |
| # NUMBER = r'\d+' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| debugger; | |
| var softModel = this.getView().getModel('softModel'); | |
| var softModelData = softModel.getData(); | |
| var selectedRequestID = this.getView().byId('RequestTypeSelect').getSelectedKey(); | |
| var i18nBundle = this.getView().getModel('i18n').getResourceBundle(); | |
| switch (selectedRequestID) { | |
| case "2": | |
| if (softModel.getProperty("/selectedBankAccount") == "0") { | |
| // return [false, "Please select bank account"]; | |
| return [false, i18nBundle.getText("e_type2__bank_account_select")]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from multiprocessing import Process, Pipe | |
| def sleeper(seconds, conn): | |
| time.sleep(seconds) | |
| conn.send("Got up after "+str(seconds)+" seconds") | |
| conn.close() | |
| print("Processed: "+str(seconds)) | |
| if __name__ == '__main__': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ pip install \ | |
| --platform manylinux2010_x86_64 \ | |
| --implementation cp \ | |
| --python 3.9 \ | |
| --only-binary=:all: --upgrade \ | |
| --target awsbundle \ | |
| cryptography |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sap.ui.define([ | |
| 'sap/ui/core/Control' | |
| ], function(Control, ) { | |
| 'use strict'; | |
| return Control.extend("enkompass.control.grecaptchav2", { | |
| metadata : { | |
| properties: { | |
| key: {type: "string", defaultValue : 0}, | |
| size: {type: "string", defaultValue : "normal"} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| import os | |
| import sys | |
| import requests | |
| from pathlib import Path | |
| import zipfile | |
| fn_client = boto3.client("lambda") | |
| dir_name = 'lambda_functions' | |
| Path("./"+str(dir_name)).mkdir(parents=True, exist_ok=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| # Initialize the Boto3 client for API Gateway | |
| client = boto3.client('apigateway') | |
| # Define the API Gateway resource ID and the new CORS settings | |
| resource_id = 'your-resource-id' | |
| new_cors_settings = { | |
| "allowOrigins": ['https://example.com'], | |
| "allowHeaders": ['Authorization', 'Content-Type'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ./deps/0/bin/node $@ | |
| # Now ./node.sh server.js will work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ./deps/0/bin/node ./deps/0/node/bin/npm $@ | |
| # Now "./npm.sh install express" will work |
OlderNewer