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
tokens = ['111', '+', '2', '+', '(', '33', '**', '2', ')', '-', '1', '*', '1'] | |
# 111 2 + 33 2 ^ + 1 1 * - | |
def is_number(num): | |
# quick way | |
return (num[0] in '0123456789') | |
def to_postfix(tokens): | |
operators = { | |
'**': 3, |
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
postfix = ['111', '2', '+', '33', '2', '**', '+', '1', '1', '*', '-'] | |
def is_number(num): | |
# quick way | |
return num[0] in '0123456789' | |
def eval_postfix(postfix): | |
stack = [] | |
for element in postfix: | |
if is_number(element): |
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
#!/usr/bin/env python3.6.2 | |
# -*- coding: utf-8 -*- | |
# run script from command line via python3 keyword_search_github_repositories.py | |
import click | |
import datetime | |
import time | |
from github import Github |
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
James: | |
Not really in the spirit of respect and community kindness | |
Your post is actually really good | |
And I actually commented this way in another group | |
But .. you didn’t actually cover what was mentioned in my post | |
Abdur-Rahmaan: | |
Oh i mean, your post is like the world is doing it wrong and you are doing it right | |
James: |
OlderNewer