Skip to content

Commit e3dcaba

Browse files
committed
Update Python version
1 parent dc81e28 commit e3dcaba

File tree

11 files changed

+1883
-1506
lines changed

11 files changed

+1883
-1506
lines changed

py/benchmark.ecs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
dictionary Dictionary
1414

15+
!go to Skip
16+
1517
print `FOR loop counting to 10,000`
1618
put now into Start
1719
put 0 into N
@@ -65,6 +67,11 @@
6567
take Start from Finish giving N
6668
print N cat ` milliseconds`
6769

70+
put 20 into Y
71+
put 6 into X
72+
multiply Y by X
73+
print `20 * 6 = ` cat Y
74+
6875
put empty into X
6976
set property `name` of X to `Fred`
7077
print property `name` of X
@@ -105,15 +112,10 @@
105112
put 51 into N
106113
while N is less than 54
107114
begin
108-
if 52 is greater than N print `52 is greater than ` cat N
109-
else print `52 is not greater than ` cat N
110-
if 52 is less than N print `52 is less than ` cat N
111-
else print `52 is not less than ` cat N
112-
dummy
113-
if 52 is not greater than N print `52 is not greater than ` cat N
114-
else print `52 is greater than ` cat N
115-
if 52 is not less than N print `52 is not less than ` cat N
116-
else print `52 is less than ` cat N
115+
if 52 is greater than N print `52 is greater than ` cat N else print `52 is not greater than cat N
116+
if 52 is less than N print `52 is less than ` cat N else print `52 is not less than ` cat N
117+
if 52 is not greater than N print `52 is not greater than ` cat N else print `52 is greater than ` cat N
118+
if 52 is not less than N print `52 is not less than ` cat N else print `52 is less than ` cat N
117119
add 1 to N
118120
end
119121

@@ -133,6 +135,7 @@ Loop1:
133135
write `I'm back!` to File
134136
close File
135137

138+
Skip:
136139
wait 2 seconds
137140
open File `/home/pi/test.txt` for reading
138141
read line X from File

py/benchmark.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import sys
2+
from ec_program import Program
3+
from ec_core import Core
4+
from ec_autogui import Autogui
5+
6+
class EasyCoder:
7+
8+
def __init__(self):
9+
self.version = 1
10+
11+
domainMap = {}
12+
domainMap['core'] = Core
13+
# domainMap['autogui'] = Autogui
14+
15+
scriptName = '/home/graham/Dropbox/Code/VisualStudio/EasyCoder/easycoder.github.io/py/benchmark.ecs'
16+
f = open(scriptName, 'r')
17+
source = f.read()
18+
f.close()
19+
20+
Program(source, domainMap)
21+
22+
if __name__ == '__main__':
23+
EasyCoder()

py/config

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2+
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3+
inet 127.0.0.1/8 scope host lo
4+
valid_lft forever preferred_lft forever
5+
inet6 ::1/128 scope host
6+
valid_lft forever preferred_lft forever
7+
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
8+
link/ether b8:27:eb:3c:68:61 brd ff:ff:ff:ff:ff:ff
9+
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
10+
link/ether e8:4e:06:26:cd:cb brd ff:ff:ff:ff:ff:ff
11+
inet 192.168.1.120/24 brd 192.168.1.255 scope global noprefixroute wlan0
12+
valid_lft forever preferred_lft forever
13+
inet6 fe80::54d3:dfd7:1e75:de6d/64 scope link
14+
valid_lft forever preferred_lft forever

py/dhcpcd.conf

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# A sample configuration for dhcpcd.
2+
# See dhcpcd.conf(5) for details.
3+
4+
# Allow users of this group to interact with dhcpcd via the control socket.
5+
#controlgroup wheel
6+
7+
# Inform the DHCP server of our hostname for DDNS.
8+
hostname
9+
10+
# Use the hardware address of the interface for the Client ID.
11+
clientid
12+
# or
13+
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
14+
# Some non-RFC compliant DHCP servers do not reply with this set.
15+
# In this case, comment out duid and enable clientid above.
16+
#duid
17+
18+
# Persist interface configuration when dhcpcd exits.
19+
persistent
20+
21+
# Rapid commit support.
22+
# Safe to enable by default because it requires the equivalent option set
23+
# on the server to actually work.
24+
option rapid_commit
25+
26+
# A list of options to request from the DHCP server.
27+
option domain_name_servers, domain_name, domain_search, host_name
28+
option classless_static_routes
29+
# Respect the network MTU. This is applied to DHCP routes.
30+
option interface_mtu
31+
32+
# Most distributions have NTP support.
33+
#option ntp_servers
34+
35+
# A ServerID is required by RFC2131.
36+
require dhcp_server_identifier
37+
38+
# Generate SLAAC address using the Hardware Address of the interface
39+
#slaac hwaddr
40+
# OR generate Stable Private IPv6 Addresses based from the DUID
41+
slaac private
42+
43+
# Example static IP configuration:
44+
interface wlan0
45+
static ip_address=192.168.!STATIC_IP!/24
46+
static routers=192.168.!STATIC_ROUTER!
47+
static domain_name_servers=192.168.!STATIC_DNS!
48+
49+
# It is possible to fall back to a static IP if DHCP fails:
50+
# define static profile
51+
#profile static_eth0
52+
#static ip_address=192.168.1.23/24
53+
#static routers=192.168.1.1
54+
#static domain_name_servers=192.168.1.1
55+
56+
# fallback to static profile on eth0
57+
#interface eth0
58+
#fallback static_eth0

0 commit comments

Comments
 (0)