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
package main | |
import ( | |
"bufio" | |
"errors" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
) |
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
# a simple if statement | |
# no else statement for | |
# simplicity | |
class If: | |
def check(self, condition): | |
if condition: | |
self = True | |
# function code | |
class Func: | |
def __init__(self, args, code): |
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
"""" | |
A simple task runner like Grunt or Gulp for Python, but uses only two types of tasks: | |
`build` and `concat`. Will extend for more tasks, like `clean` and `compile`. | |
""" | |
class task: | |
def __init__(self, actionfile, run=True, concat=False, concat_file=False, concat_new_file=False): | |
self.file = actionfile | |
if concat: | |
self.concat = True |
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
"""A basic interpreter for Python, using the eval() function.""" | |
# print startup info | |
print("Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32") | |
print("Type \"copyright\", \"credits\" or \"license()\" for more information.") | |
while True: | |
code = input(">>> ") | |
# try to run the code entered | |
try: |
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
keywords = { | |
"google":"Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at \ | |
Stanford University, California. Together, they own about 14 percent of its shares and control 56 percent \ | |
of the stockholder voting power through supervoting stock. They incorporated Google as a privately held \ | |
company on September 4, 1998. An initial public offering (IPO) took place on August 19, 2004, and Google \ | |
moved to its new headquarters in Mountain View, California, nicknamed the Googleplex.", | |
"skype":"Skype (/ˈskaɪp/) (stylized as skype) is an application that provides video chat and \ | |
voice call services. Users may exchange such digital documents as images, text, video and any others, \ | |
and may transmit both text and video messages. Skype allows the creation of video conference calls. \ | |
Skype is available for Microsoft Windows, Macintosh, or Linux, as well as Android, Blackberry, \ |