This file contains 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
volumes: | |
mongodb_data: { driver: local } | |
services: | |
rocketchat: | |
image: registry.rocket.chat/rocketchat/rocket.chat:${RELEASE:-latest} | |
restart: on-failure | |
labels: | |
traefik.enable: "true" | |
traefik.http.routers.rocketchat.rule: Host(`${DOMAIN}`) |
This file contains 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 requests | |
import json | |
# Set up the Rocket.Chat API endpoint and credentials | |
API_URL = 'http://localhost:3000' | |
USERNAME = 'adminrc' | |
PASSWORD = 'admin' | |
def get_auth_token(): |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
--- | |
version: '3.4' | |
services: | |
weaviate: | |
command: | |
- --host | |
- 0.0.0.0 | |
- --port | |
- '8080' | |
- --scheme |
This file contains 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
dim = 0 | |
objects = 0 | |
for c in client.schema.get()["classes"]: | |
# get class name | |
class_name = c["class"] | |
# get object count | |
count_query = client.query.aggregate(class_name).with_meta_count().do() | |
if not count_query.get("errors"): | |
object_count = count_query["data"]["Aggregate"][class_name][0]["meta"]["count"] | |
# get one object, to discover the dimensions length |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# | |
# Autoria: | |
# Amaury Gonçalves <amaury@unimedtv.coop.br> | |
# Duda Nogueira <eduardo@unimedtv.coop.br> | |
# | |
def validaCNS(numero): | |
numero = str(numero) | |
if numero.isdigit(): | |
if re.match(r'[1-2]\d{10}00[0-1]\d$',numero) or re.match(r'[7-9]\d{14}$',numero): |
This file contains 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
class Script { | |
/** | |
* @params {object} request | |
*/ | |
prepare_outgoing_request({ request }) { | |
let match; | |
// match a allowed commands | |
match = '^'+ request.data.trigger_word + '\\s(status|start|close|livechat)' |
OlderNewer