Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Padam Sethia highoncarbs

🏠
Working from home
View GitHub Profile
View nearly_equal.py
def nearly_equal(str1, str2):
m, n = len(str1) + 1, len(str2) + 1
string_table = {}
for i in range(m):
string_table[i, 0] = i
for j in range(n):
string_table[0, j] = j
View split.py
#!/usr/bin/python
import sys
def breakdown(filename, chunk):
lines = []
line_counter = 0
file_counter = 0
with open(filename) as file:
@highoncarbs
highoncarbs / Lex.c
Last active Jan 17, 2018
Lexical Analyzer for C Language
View Lex.c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int isKeyword(char buffer[]){
char keywords[32][10] = {"auto","break","case","char","const","continue","default",
"do","double","else","enum","extern","float","for","goto",
"if","int","long","register","return","short","signed",
"sizeof","static","struct","switch","typedef","union",
@highoncarbs
highoncarbs / gist:345b738fe21539fc1427e66bc53b6e25
Created Mar 31, 2017
Session Log running ros_voice_control.py by Arseniy Gorin
View gist:345b738fe21539fc1427e66bc53b6e25
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/lib/python2.7/dist-packages/pocketsphinx/model/en-us//feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
@highoncarbs
highoncarbs / gist:9edc2279d3b35960795c4bc03ceee7f9
Created Mar 26, 2017
Log of pocketsphinx speech recognition session
View gist:9edc2279d3b35960795c4bc03ceee7f9
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1