Skip to content

Instantly share code, notes, and snippets.

View sdabbour-stratio's full-sized avatar

Sameh Dabbour sdabbour-stratio

View GitHub Profile
#!/usr/bin/python3
import requests
from requests.packages.urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
import sys
'''
Lookup plugin to get the oauth token from stratio dcos
============================================================
Parameters:
#!/usr/bin/python3
import requests
from requests.packages.urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
import sys
'''
Lookup plugin to get the oauth token from stratio dcos
============================================================
Parameters:
import requests
import urllib3
import shutil
requests.packages.urllib3.disable_warnings()
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL'
try:
requests.packages.urllib3.contrib.pyopenssl.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL'
except AttributeError:
import sys
import json
import csv
import copy
import requests
vault_url = "https://vault.service.eos.prd.falabella.int:8200"
headers = {
'X-Vault-Request': 'true',
package com.stratio.governance.unstructured.rcn.inference
import com.johnsnowlabs.nlp.DocumentAssembler
import com.johnsnowlabs.nlp.annotator._
import org.apache.spark.ml.Pipeline
import org.apache.spark.sql.SparkSession
// Needs one argument, the path to the NER model
object NerRcnModelSavePipeline {
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<?xml version="1.0" encoding="UTF-8"?>
<!--
© 2017 Stratio Big Data Inc., Sucursal en España. All rights reserved.
This software – including all its source code – contains proprietary information of Stratio Big Data Inc., Sucursal en España and may not be revealed, sold, transferred, modified, distributed or otherwise made available, licensed or sublicensed to third parties; nor reverse engineered, disassembled or decompiled, without express written authorization from Stratio Big Data Inc., Sucursal en España.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
ontologyName = "test"
ontologyFile = "file.owl"
headers = {
'accept': '*/*',
'X-RolesID': 'Owner',
'X-TenantID': 'hsbc',
'X-UserID': 'mberrojalbiz',
'Content-Type': 'multipart/form-data',
}
import os
import pandas as pd
files = os.listdir(".")
csv_files = [file for file in files if '.csv' in file]
for file in csv_files:
table_name = file.lower().replace(".csv", "").replace(" ", "_")
df = pd.read_csv(file)
org_columns = df.columns.to_list()
new_columns = [column.lower().replace(" ", "_") for column in org_columns]
n = len(org_columns)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Data type="dict">
<account_transactions type="dict">
<avaloqTechnicalId type="str">78616497</avaloqTechnicalId>
<avaloqInternalId type="str">B7OHVBA</avaloqInternalId>
<society type="str">56</society>
<number type="str">0</number>
<accountId type="str">B7OHVBA</accountId>
<shortName type="str">Society: BU.HSPB.UK , AccountID: B7OHVBA</shortName>