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
from __future__ import print_function | |
from flask import Flask, request, jsonify | |
from flask_cors import CORS | |
import tensorflow as tf | |
#from tensorflow.contrib import rnn | |
import numpy as np | |
import scipy.io.wavfile as wav |
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
#!/bin/bash | |
# this script removes invalid utf-8 codes from a bunch of text files in input_dir | |
input_dir='/media/saurabh/New Volume2/hardik_dataset/final (another copy)' | |
output_dir='/media/saurabh/New Volume2/hardik_dataset/output' | |
# iterate over each file in input folder |
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
in_file = "/media/saurabh/New Volume/Untitled Folder/final.txt" | |
out_file = "/media/saurabh/New Volume/Untitled Folder/final_out.txt" | |
replacement = dict([(cp, cp.replace(' ', '_')) for cp in concepts]) | |
with open(in_file) as infile, open(out_file, 'a') as file: | |
for index,line in enumerate(infile): | |
for concept_phrase in concepts: | |
line = line.replace(concept_phrase, replacement[concept_phrase]) | |
file.write(line + '\n' ) |
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
# coding: utf-8 | |
# In[ ]: | |
# In[1]: |
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
// need to iterate over each wikipedia article raw text | |
var wtf_wikipedia = require("wtf_wikipedia") | |
fs = require('fs'); | |
path = require('path'); | |
var final_str="" |
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
// need to iterate over each wikipedia article raw text | |
var wtf_wikipedia = require("wtf_wikipedia") | |
fs = require('fs'); | |
path = require('path'); | |
var final_str="" |
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
# This is the main Apache server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See http://httpd.apache.org/docs/2.4/ for detailed information about | |
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific | |
# hints. | |
# | |
# | |
# Summary of how the Apache 2 configuration works in Debian: | |
# The Apache 2 web server configuration in Debian is quite different to | |
# upstream's suggested way to configure the web server. This is because Debian's |
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
var server = require("net").createServer(function(c) { | |
// A new client as connected | |
c.write("Hello"); | |
c.on('data', function(data) { | |
console.log(">"+JSON.stringify(data)); | |
}); | |
c.end(); | |
}); | |
server.listen(9000); |
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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0x00007f6da5c59009, pid=14957, tid=14986 | |
# | |
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src) | |
# Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64) | |
# Problematic frame: | |
# C [libjava.so+0x1d009] JNU_GetEnv+0x19 | |
# |
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
--- | |
############################################################################### | |
# Pro-tips: | |
# | |
# - Use YAML's anchors! This let's you define a value (even a dictionary), and | |
# reuse, or even change, parts of it later. YAML anchors are incredible for | |
# defining constant values that you want to reuse all over the place. You can | |
# define an anchor like this: | |
# KEY: &my_anchor |
NewerOlder