Skip to content

Instantly share code, notes, and snippets.

View highoncarbs's full-sized avatar
🏠
Working from home

Padam Sethia highoncarbs

🏠
Working from home
View GitHub Profile
#!/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 January 17, 2018 08:58
Lexical Analyzer for C Language
#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 March 31, 2017 12:09
Session Log running ros_voice_control.py by Arseniy Gorin
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 March 26, 2017 09:14
Log of pocketsphinx speech recognition session
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