Skip to content

Instantly share code, notes, and snippets.

@pasindud
pasindud / Ideamart_Delivery_Report.php
Created May 3, 2015 15:15
Ideamart Delivery Report
<?php
header('Content-type: application/json');
echo json_encode(array("statusCode"=>"S1000","statusDetail"=>"Success"));
$payload = file_get_contents("php://input");
$data = json_decode($payload,true);
/*
echo $data['destinationAddress'];
echo $data['timeStamp'];
</programlisting>
</example>
</para>
+
+ <sect2 xml:id="functions.scalar-type-declaration">
+ <title>Type Declaration</title>
+ <note>
+ <para>
+ Type declaration is also known as Type Hinting.
+ </para>
from multiprocessing import Pool
import oct2py
import sys
from multiprocessing import Process
from multiprocessing import Queue
import matplotlib.pyplot as plt
import pprint
# N = [100];
# P = [2];
{"account":{"accountid":1,"expireDate":"0001-01-01","createdDate":"2017-06-28","balance":9857.0,"currency":"USD","locked":false,"accTypeId":{"accTypeId":1,"accName":"Savings","accInterestRates":3.2,"minInitBalance":500.0,"minAvgBalance":null,"minMonths":null,"maxMonths":null,"maxOverDraftAmount":null,"dailyWithdrawLimit":50000.0},"branchId":{"branchId":1,"branchName":"Matara-2","addressLine1":"100","addressLine2":"Anagaraika Dharmapala Road","addressLine3":"","city":"Matara","telephoneNo":"0412235853","email":"[email protected]","faxNo":"0412235558"}},"user":{"userId":1,"username":"xyz","userType":null,"creationDate":null,"customer":{"customerid":1,"title":null,"firstName":"First Name","lastName":"Fernando","dob":"1993-05-01","nic":"123131232V","addressLine1":"1st Lane","gender":"Male","addressLine2":"","addressLine3":null,"city":"Matar","telephoneNo":null,"mobileNo":"0772323232","email":"[email protected]","faxNo":"21332545","userId":1},"merchant":null,"locked":true}}
set -x
PY_MERLIN_CONF="/usr/local/src/language-resources/utils/merlin_confs.py"
BASE_VOICE_PATH="/usr/local/src/merlin//egs/locale/s1"
CONF_PATH="egs/locale/s1/conf/"
# Whether to run merlin TTS training.
TRAIN=true
while getopts ":t" opt; do
@pasindud
pasindud / a.sh
Last active December 18, 2017 12:25
set -x
cd /usr/local/src/
rm -rf language-resources
git clone https://github.com/googlei18n/language-resources
echo $(pwd)
mkdir -p /usr/local/src/voice/data/festvox/wavs
cd /usr/local/src/voice/data/festvox/
#! /bin/bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
set -v
set -x
set -e
# Read text from stdin
read txt; TEXT=${txt};
SYNTH_ID=$RANDOM
@pasindud
pasindud / test1.sh
Last active February 23, 2018 16:11
LANG_PATH="/usr/local/src/language-resources/vb/festvox/"
mkdir -p "${LANG_PATH}"
ls -l /mnt/data/
# Copy non wav resources to language-resources
cp /mnt/data/txt.done.data "${LANG_PATH}"
cp /mnt/data/ipa_phonology.json "${LANG_PATH}"
cp /mnt/data/lexicon.scm "${LANG_PATH}"
import sys
import json
# python data.py mapit_response_form.tsv output_dir
i = 1
for x in open(sys.argv[1]):
parts = x.split("\t")
fname = parts[1].lower().strip().replace(" ", "_")