Skip to content

Instantly share code, notes, and snippets.

View avivijay19's full-sized avatar
🏇
Focusing

Avinash Vijayvargiya avivijay19

🏇
Focusing
View GitHub Profile
name: CD
on: [push, pull_request]
jobs:
cd:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
@avivijay19
avivijay19 / gsoc_22_refactor_android_sdk.md
Last active November 13, 2022 12:19
GSoC '22 Report | The Mifos Initiative | Refactor Android Client & Rewrite using Android SDK

gsoc_logo mifos_logo








from dfa import *
def scan_input_file(input_file_name):
" A function that scans the input file line by line and returns a DFA object based on what's scanned "
input_file = open(input_file_name, 'r') # open the input file
# read the 1st line and turn it to an integer
num_of_states = int(input_file.readline())
print('Number of states: ', num_of_states)
class DFA:
def __init__(self, states, alphabet, transition_function, start_state, end_states):
" DFA class constructor "
self.states = states
self.alphabet = alphabet
self.transition_function = transition_function
self.start_state = start_state
self.end_states = end_states
self.current_state = start_state
3
0 1
0
0 1
0 1 1
0 0 0
1 1 2
1 0 0
2 1 2
2 0 2
from dfa import *
from scan_input_file import *
dfa = scan_input_file("dfa.txt")
given_word = None
while given_word != '-1':
given_word = input('Type a word (-1 to exit): ')