Skip to content

Instantly share code, notes, and snippets.

View ilius's full-sized avatar

Saeed Rasooli ilius

View GitHub Profile
@ilius
ilius / shallow-parser-test.py
Last active November 29, 2021 08:11
Hazm Persian NLP: shallow-parser-test.py
# coding: utf8
from __future__ import unicode_literals
import sys, os
from os.path import join
import json
homeDir = os.getenv('HOME')
#!/bin/bash
TOTAL=0
OPTS="-type f -and -not -path '*/.git/*'"
# find . $OPTS -exec file --brief --mime-type \;
LOC=`find . $OPTS -name '*.go' -exec cat '{}' \; | grep -vxch '\s*'`
[[ $LOC -gt 0 ]] && echo -e "$LOC\tGo" && TOTAL=$[TOTAL+LOC]
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal