Hello!
I'm using some DS18B20 sensors to monitor the temperature of my boiler and some other temperatures.
Sometimes the measurement drops to 0 (I've changed the programming of the EmonTX, otherwise it would drop to -127 but that kills all the nice diagrams).
Some of the sensors are connected to the EmonTX via a 10m ethernet cable, using orange/green and blue/brown as supply and data line and the rest (white cables) for ground. Could this be a problem ? I've red about problems because of the high slew rate of this sensors but why they are ok most of the time and only have problems sometimes?
Any ideas? You can have a look at it here: http://emoncms.org/jb79/Boiler, for example: errors starting today 9:40 in the morning.
Re: Solved: DS18B20 sometimes no measurements?
I can't quite understand your wiring, but I suspect that a problem could well be there. CAT5 Ethernet cable is made up of twisted pairs, the twists are designed in such a way as to reduce crosstalk between pairs. Therefore by using more than one pair you may in fact be adding to the problems rather than reducing them. I don't see the need for the reduced voltage drop that paralleled conductors might give you. I suggest you put the supply on one pair only (say Orange + White/Orange) and the data on one pair (say Blue + White/Blue) and leave the remaining two pairs unconnected.
A second suggestion is to check the value of the pull-up resistor. The Maxim data sheet specifies 4.7 kΩ.
Thirdly, you don't say how many sensors are on a single input and whether they are connected in star or daisy-chained. The cable acts as a transmission line and if the configuration is 'star', reflections in the other cables could be distorting the wanted signal. "Daisy-chain" is the preferred configuration for long cable runs, but of course it all depends on the requirements of your installation.
Re: Solved: DS18B20 sometimes no measurements?
Ok, i've drawn a litte picture to illustrate how I connected the sensors. At total there are 6 sensors connected to the EmonTX at the moment. One of them directly with 1m cable on the EmonTX, the next 4 via about 10m ethernet cable and then with their own 1m cables and a last one with another 5m ethernet cable and with it#s own 1m cable.
So it's a combination of daisy chain and star, but there is no other possibility
At the top of the picture you can see the connections of the two parts with the ethernet cable.
The pull-up resistor is 4,7k.
Re: Solved: DS18B20 sometimes no measurements?
Which sensor is close to the emonTx and which is the one 15 m distant? As you say there's no possibility in practice of wiring the sensors any other way, it seems you are stuck with what you have. It may be a silly question, is it possible that the cause is interference from some equipment nearby?
I see the software polls the sensors in turn every 20 s approximately, but when I look carefully, I think I see patterns. T5 fails frequently on the measurement after T6 fails, and T3 often fails at the same time as T6 or T4.
It is rare that you have two bad readings in sequence. Instead of converting the -127 value to zero, would it be better (= less bad) for the emonTx to send the last reading again? I know the data would be false, but it would give a better graph.
Re: Solved: DS18B20 sometimes no measurements?
Hello Robert!
I'll try to correct the software next week, I've also thought about sending the old values again if a sensor fails. To be informed about a sensor outage even if old values are transmitted I think I'll use another feed. If sensor 1 fails, I'll add 1 to the feed value, sensor 2 adds 2, sensor 3 adds 4 and so on. So I can check the data consistency of up to 16 sensors (integer has 16bit) by only one additional feed.
T_Technikraum is the sensor nearest to the EmonTX.
Then there is the 10m cable and T3-T6 mounted on the boiler.
From there about 5m to T-Solar, mounted on the copper pipe coming down from the thermal solar system that heats up the boiler when the sun is shining.
All sensors are in a room with a heat pump, the 800l boiler, the ventilation system, the decalcifying plant and the power distributor. But I couldn't find a relation during the periodes when the sensors fail and one of this systems start or stop working. For example: The up/down of T4 is caused by the heat pump switching on and off (at the moment about once an hour). The ventilation system is running all the time, directly next to the EmonTX.
Re: Solved: DS18B20 sometimes no measurements?
Hello again!
It took a little bit more time to correct the software. Now I store the latest valid temperature for each sensor. Here is my code example for one of the sensors.
emontx.T2 = sensors.getTempC(address_T2) * 100;
if (emontx.T2 < -5000) emontx.T2=emontx_old.T2;
else emontx_old.T2=emontx.T2;
I repeat this for all 6 sensors and it is working fine, I tested it by disconnecting the room temperature sensor for some seconds, hold the sensor in my hand, so that it got about 27°C (normal room temperature is about 19°C) and connected it again. In the measurement the value didn't change until it was reconnected, then the value jumped to the new measurement.
Does anybody know how my code could be written in an easier way for multiple sensors?
In my definitions I used T2-T7 (I bought 10 sensors, red out the addresses and labled them, T2-T7 are for this emonTx). I'd like to use a if loop, like this with a small function that only needs the sensor number and automatically does the same as the short code in the beginning but I don't know how to do it (I'm not the best in programming C)
for (i=2; i<=7; i++) sensors_check (i);
Re: Solved: DS18B20 sometimes no measurements?
Probably the best way around the software problem is to make an object called "sensor" and then create 6 instances of it. "sensor_check" then becomes a method of that class that does the calculation. If that's all very strange to you, take a look again at emonLib, because that's exactly what EnergyMonitor is, and calcVI is a method that does the calculation. So you'd copy the parts you need of the overall structure of EnergyMonitor but almost none of the detail. For example, you'd have a method to initialise it with the sensor address in the same way that currentTX or voltageTX plug in the calibration coefficients. You could take a look at http://www.relisoft.com/book/index.htm which is a C++ tutorial, and if you understand the basics it should be helpful.
If you want to stay with plain C (not C++), then you probably need several arrays to hold the address, present temperature. old temperature, etc and use the parameter into sensors_check (i) as an index into those arrays.


--- layout: post title: "Twentieth Sunday in Ordinary Time" date: 2020-08-16 09:00:00 categories: Sunday tags: featured image: /assets/article_images/2020-04-26-Third-Sunday-Easter/scripture.jpg image2: /assets/article_images/2020-04-26-Third-Sunday-Easter/scripture-mobile.jpg ---
Holy Mass is at the very core of our worship as a Catholic community. Nothing can ever be substituted for the celebration of the Eucharist. But in this exceptional time of difficulty for our communities, our nation, and the whole world, this order of prayer can be offered by individuals and families and engages us in our Sunday celebration of the Word of God. We can pray this prayer in our homes—the “domestic churches” which help build up the Body of Christ on earth—and thus be connected to the entire Church at prayer.
During this time of prayer, we include the opportunity to make a Spiritual Communion. Making a Spiritual Communion is a worthy practice, recommended by innumerable saints throughout the ages, which unites our whole selves to God and his Church.
Taken from the Mass and the Liturgy of the Hours
Leader: God, ✠ come to my assistance.
Response: Lord, make haste to help me.
Leader: Glory be to the Father, and to the Son, and to the Holy Spirit:
Response: as it was in the beginning, is now, and ever shall be, world without end. Amen.
All people that on earth do dwell
Sing to the Lord with cheerful voice;
Him serve with mirth, his praise forth tell;
Come we before him and rejoice.
Know that the Lord is God indeed;
Without our aid he did us make.
We are his folk, he does us feed,
And for his sheep he does us take.
O enter then his gates with praise;
Approach with joy his courts unto;
Praise, laud, and bless his Name always,
For it is seemly so to do.
Leader: Let us acknowledge our sins, and seek the Lord’s pardon and peace.
Together: I confess to almighty God
and to you, my brothers and sisters,
that I have greatly sinned,
in my thoughts and in my words,
in what I have done and in what I have failed to do,
through my fault, through my fault,
through my most grievous fault;
therefore I ask blessed Mary ever-Virgin,
all the Angels and Saints,
and you, my brothers and sisters,
to pray for me to the Lord our God.
Leader: O God, who have prepared for those who love you
good things which no eye can see,
fill our hearts, we pray, with the warmth of your love,
so that, loving you in all things and above all things,
we may attain your promises,
which surpass every human desire.
Through our Lord Jesus Christ, your Son,
who lives and reigns with you in the unity of the Holy Spirit,
one God, for ever and ever.
Together: Amen.
Thus says the LORD: Observe what is right, do what is just; for my salvation is about to come, my justice, about to be revealed.
The foreigners who join themselves to the LORD, ministering to him, loving the name of the LORD, and becoming his servants—all who keep the sabbath free from profanation and hold to my covenant, them I will bring to my holy mountain and make joyful in my house of prayer; their burnt offerings and sacrifices will be acceptable on my altar, for my house shall be called a house of prayer for all peoples.
The Word of the Lord.
―Thanks be to God.

Together: O God, let all the nations praise you!
Reader: May God have pity on us and bless us;
may he let his face shine upon us.
So may your way be known upon earth;
among all nations, your salvation.
Together: O God, let all the nations praise you!
Reader: May the nations be glad and exult
because you rule the peoples in equity;
the nations on the earth you guide.
Together: O God, let all the nations praise you!
Reader: May the peoples praise you, O God;
may all the peoples praise you!
May God bless us,
and may all the ends of the earth fear him!
Together: O God, let all the nations praise you!
Brothers and sisters: I am speaking to you Gentiles. Inasmuch as I am the apostle to the Gentiles, I glory in my ministry in order to make my race jealous and thus save some of them. For if their rejection is the reconciliation of the world, what will their acceptance be but life from the dead?
For the gifts and the call of God are irrevocable. Just as you once disobeyed God but have now received mercy because of their disobedience, so they have now disobeyed in order that, by virtue of the mercy shown to you, they too may now receive mercy. For God delivered all to disobedience, that he might have mercy upon all.
The word of the Lord.
―Thanks be to God.
Reader: Jesus proclaimed the Gospel of the kingdom
Together: and cured every disease among the people.
At that time, Jesus withdrew to the region of Tyre and Sidon. And behold, a Canaanite woman of that district came and called out, “Have pity on me, Lord, Son of David! My daughter is tormented by a demon.” But Jesus did not say a word in answer to her. Jesus’ disciples came and asked him, “Send her away, for she keeps calling out after us.” He said in reply, “I was sent only to the lost sheep of the house of Israel.” But the woman came and did Jesus homage, saying, “Lord, help me.” He said in reply, “It is not right to take the food of the children and throw it to the dogs.” She said, “Please, Lord, for even the dogs eat the scraps that fall from the table of their masters.” Then Jesus said to her in reply, “O woman, great is your faith! Let it be done for you as you wish.” And the woman’s daughter was healed from that hour.
The Gospel of the Lord.

Leader: Glory to the Father, and to the Son and to the Holy Spirit.

Leader: Open your hearts to praise the God of power and goodness,
for he loves us and knows our needs.
Response: We praise you, Lord, and trust in you.

Response: We praise you, Lord, and trust in you.
Leader: O God, you opened the gates of mercy for us, let us never turn aside from
the path of life.
Response: We praise you, Lord, and trust in you.
Leader: As we celebrate the resurrection of your beloved Son, help us to spend this
day in the spirit of joy.
Response: We praise you, Lord, and trust in you.
Leader: Give to your faithful, O Lord, a prayerful spirit of gratitude, that we may
thank you for all your gifts.
Response: We praise you, Lord, and trust in you.
Leader: In your mercy, continue to sanctify all who are afflicted from the present pandemic, and draw us all closer to you, and to one another, in this time of suffering.
Response: We praise you, Lord, and trust in you.
Leader: Let us pray together as Jesus taught us:
Together: Our Father, who art in heaven …
Leader: You have given us bread from heaven, alleluia, alleluia.
Response: Containing in itself all delight, alleluia, alleluia.
Together: My Jesus,
I believe that you are present
in the Most Holy Sacrament of the Altar.
I love you above all things,
and I desire to receive you into my soul.
Since I cannot at this moment receive you sacramentally,
come at least spiritually into my heart.
I embrace you as if you were already there
and unite myself wholly to you.
Never permit me to be separated from you,
my Lord and my God!
Amen.
Canticle of Zechariah (Luke 1:68-79)
Together: ✠ Blessed be the Lord, the God of Israel;
he has come to his people and set them free.
He has raised up for us a mighty savior,
born of the house of his servant David.
Through his holy prophets he promised of old
that he would save us from our enemies,
from the hands of all who hate us.
He promised to show mercy to our fathers
and to remember his holy covenant.
This was the oath he swore to our father Abraham:
to set us free from the hands of our enemies,
free to worship him without fear,
holy and righteous in his sight
all the days of our life.
You, my child, shall be called the prophet of the Most High;
for you will go before the Lord to prepare his way,
to give his people knowledge of salvation
by the forgiveness of their sins.
In the tender compassion of our God
the dawn from on high shall break upon us,
to shine on those who dwell in darkness and the shadow of death,
and to guide our feet into the way of peace.
Glory be to the Father, and to the Son,
and to the Holy Spirit:
as it was in the beginning, is now, and ever shall be,
world without end. Amen.
Leader: ✠ May the Lord bless us, protect us from all evil,
and bring us to everlasting life.
Together: Amen.
“All People That on Earth Do Dwell” text: Psalm 100; William Kethe, d. c. 1593; tune: OLD HUNDREDTH, LM; Louis Bourgeois, c. 1510-1561; alt. harm. by John Dowland, 1562-1626; in the Public Domain.
Excerpts from the Lectionary for Mass for Use in Dioceses of the United States of America, second typical edition © 2001, 1998, 1997, 1986, 1970 Confraternity of Christian Doctrine, Inc., Washington, DC; excerpts from The Roman Missal © 2010, ICEL; excerpts from The Liturgy of the Hours © 1994, ICEL; used with permission granted by the USCCB until November 22 during the COVID-19 pandemic. All rights reserved. No portion of these texts may be reproduced by any means without permission in writing from the copyright owner.


This document describes the properties of the most important pre-defined identifiers ("intrinsics") in the Sawzall language.
The starting point for this document was the result of running the Sawzall interpreter szl with the --explain option, like this:
for i in $(szl --explain=) do szl --explain=$i doneThat script will always provide up to date, if rudimentary, information.
Throughout this document, the term undef refers to the explicitly
undefined value created by various incorrect or incalculable operations,
such as dividing by zero or the contents of a non-existent file.
type int = int; # basic typeThe int type represents a signed 64-bit quantity.
type uint = uint; # basic typeThe uint type represents an unsigned 64-bit quantity.
type float = float; # basic typeIn the current implementation, the float type represents a 64-bit IEEE floating-point value.
type string = string; # basic typeIn the current implementation, the string type represents a string of 16-bit Unicode characters. Individual characters may be accessed (read or written) using indexing, exactly as if the string were an array of unsigned 16-bit integers.
type time = time; # basic typeIn the current implementation, the time type represents an unsigned 64-bit quantity recording microseconds since the Unix epoch of January 1 1970 00:00 GMT.
type bytes = bytes; # basic typeThe bytes type represents a string of 8-bit unsigned bytes. Individual bytes may be accessed (read or written) using indexing, exactly as if the bytes object were an array of unsigned 8-bit integers.
type bool = bool; # basic typeThe bool type represents a Boolean value.
type fingerprint = fingerprint; # basic typeThe fingerprint type represents an unsigned 64-bit quantity calculated using an implementation-dependent hash function.
input: bytes;The input variable is set to the raw byte-level representation of each successive input record.
stdout: table collection of s: string file("/dev/stdout") format("%s\n", s);The stdout variable provides a convenient destination for formatted output. Emit statements that send text to stdout will print the text to standard output (file descriptor 1). A newline is added automatically to each string emitted.
stderr: table collection of s: string file("/dev/stderr") format("%s\n", s);The stderr variable provides a convenient destination for formatted debugging output. Emit statements that send text to stderr will print the text to standard error (file descriptor 2). A newline is added automatically to each string emitted.
output: table collection of bytes file("/dev/stdout");The output variable provides a convenient destination for emit statements that write to standard output. The data sent to output is unmodified and uninterpreted.
static true: bool = true; # literal
static false: bool = false; # literal
static PI: float = 3.1415926535897931; # literalA floating-point approximation of Pi.
static Inf: float = Inf; # literal static inf: float = Inf; # literalIEEE 754 infinity.
static NaN: float = NaN; # literal static nan: float = NaN; # literalIEEE 754 not a number.
static SECOND: time = SECOND; # literalA million microseconds.
static SEC: time = SEC; # literalSynonym for SECOND.
static MINUTE: time = MINUTE; # literalSixty SECONDS.
static MIN: time = MIN; # literalSynonym for MINUTE.
static HOUR: time = HOUR; # literalSixty MINUTES.
static HR: time = HR; # literalSynonym for HOUR.
abs: function(v: int); abs: function(v: float);Return the absolute value of the argument. The type must be one of int or float.
assert: function(condition: bool [, message: string] );If condition is false, print the message to standard error, with the prefix assertion failed:, and exit. The message may be empty or absent altogether.
def: function(v: type): bool;The def function returns a boolean value according to whether v has a defined value. It can serve as a guard to protect code against undefined values.
fingerprintof: function(v: type): fingerprint;The fingerprintof function returns the 64-bit fingerprint of the argument, which may be of any type.
inproto: function(f: type): bool;The inproto function tests whether the field f was present in the proto buffer converted into the proto tuple containing the field f. f must be of the form proto_tuple_var.field_name. Consequently, inproto must only be applied to fields of proto tuples. If the proto tuple field was set explicitly (e.g. via an assignment to that field) or by conversion from a proto buffer that contains an explicit value for that field, inproto returns true.
inprotocount: function(f: type): bool;Returns the number of fields in a proto tuple that have the inproto bit set. Fields in nested tuples are taken into account. In the case of an array of nested tuples, the fields in each tuple get counted.
clearproto: function(f: type): bool;The clearproto function clears a field in the proto buffer converted into the proto tuple containing the field f.f must be of the form proto_tuple_var.field_name. Consequently, clearproto must only be applied to fields of proto tuples. clearproto will make a subsequent inproto() on the same field return false. However, the memory for this field will not be freed until the whole protocol buffer goes out of scope.
new: function(array of type, n: int, v: type): array of type;In this form, the new function creates an array of n elements of the specified type, all initialized to the value v.
new: function(string, n: int, v: int): string;In this form, the new function creates a string of n copies of the character specified by the value v, which must not be zero.
new: function(bytes, n: int, v: int): bytes;In this form, the new function creates a bytes value consisting of n copies of the least significant byte of the value v.
new: function(maptype): maptype;In this form, the new function creates an empty map of the specified maptype.
regex: function(type [, base] ): string;The regex function returns a string holding a regular expression suitable for matching text representing values of the specified type. For example, regex(int) generates a string to match integer constants as represented in Sawzall or C++ programs (-23, 0x1f, etc.). The implemention is rudimentary; at the moment, only int and float types are supported. When the type is int, an optional numerical base may be specified for the conversion.
saw: function(s: string, r: regex, ...): array of string; sawn: function(n: int, s: string, r: regex, ...): array of string; sawzall: function(s: string, r: regex, ...): array of string;These functions slice string s into pieces according to subsequent matches of the regular expressions. The saw function is the simplest; it runs along the list of regular expressions exactly once, while sawn does it at most n times and sawzall continues until the input string is exhausted. More detail should appear in this document, but for now please refer to the Sawzall language design document for more information.
haskey: function(m: map[keytype] of valuetype, key: keytype): bool;Return a boolean reporting whether the key is present in the map.
keys: function(m: map[keytype] of valuetype): array of keytype;Return an array holding, in no particular order, the set of keys present in the map m.
len: function(v: type): int;Return the number of elements in v, which must be an array or map or of type string or bytes.
lookup: function(m: map[keytype] of valuetype, key: keytype, value: valuetype): valuetype;Return the element of the map indexed by the key or, if there is no such element, the specified default value. Assuming the map, key, and value are defined, equivalent to (using C ?: notation): def(m[key])? m[key] : value, but more efficient.
max: function(v1: type, v2: type): type;Return the maximum of v1 and v2. The type must be one of int, time, string, or float.
min: function(v1: type, v2: type): type;Return the minimum of v1 and v2. The type must be one of int, time, string, or float.
sort(array of basic_type): array of basic_type;Return the sorted version of an array. Only scalar values can be sorted. Values will be arranged in increasing order. (An optional comparison function, which takes two elements and returns int {-,0,+}, is accepted as a second argument, but it is ignored.)
sortx(array of basic_type): array of int;Return the index vector that sorts an array. Only scalar values can be sorted. The index vector arranges array values in increasing order. (An optional comparison function, which takes two elements and returns int {-,0,+}, is accepted as a second argument, but it is ignored.)
DEBUG: function(): int;(Obsolete) This function is for use by the implementers only.
convert: function(type1, v: type2, parameters: type3, ...): type1;The convert operator converts value v, of type type2, into the corresponding value of type type1. The parameters depend on the particular types being converted. For instance, convert(int, "23", 16); interprets the string "23" as a hexadecimal number.
The following basic conversions are supported; each row is a "from" type and each column is a "to" type. Parameter values are allowed only as noted, and are always optional.
| bool | int | float | time | fingerprint | string | bytes | uint | |
| bool | identity | 0 and 1 | "false" and "true" | 0 and 1 | ||||
| int | identity | as in C++ | reinterpret | reinterpret | param: base | param: encoding format | bitwise identity | |
| float | as in C++ | identity | as in C++ | as in C++ | ||||
| time | reinterpret | identity | param: time zone | reinterpret | ||||
| fingerprint | reinterpret | identity | as 0x%016xp | unpack | reinterpret | |||
| string | matches ^[Tt] | param: base | as in C++ | param: time zone | param: base | identity | param: string encoding | param: base |
| bytes | param: encoding format | pack | param: string encoding | identity | param: encoding format | |||
| uint | bitwise identity | as in C++ | reinterpret | reinterpret | param: base | param: encoding format | identity |
Notes:
It is not possible to supply additional parameters for the base, encoding or time zone. The conversions from the type of an array element to the key type and from the type of an array element to the value type always use the corresponding default value for any optional parameter. See the notes above regarding the default values.
It is not possible to supply additional parameters for the base, encoding or time zone. The conversion from the type of an array element to the type of a field always uses the corresponding default value for any optional parameter. See the notes above regarding the default values.
Most time functions accept an optional argument indicating the time zone; the
default time zone is PST8PDT.
addday: function(t: time, n: int [, tz: string] ): time;Return the time n days after t. The value of n may be negative, or n may be absent altogether (addday(t)), in which case n defaults to 1. An optional third argument, a string, names a time zone.
addmonth: function(t: time, n: int [, tz: string] ): time;Like addday, but for months.
addweek: function(t: time, n: int [, tz: string] ): time;Like addday, but for weeks.
addyear: function(t: time, n: int [, tz: string] ): time;Like addday, but for years.
dayofmonth: function(t: time [, tz: string] ): int;The numeric day of the month; for January 17, return 17, etc. An optional second argument, a string, names a time zone.
dayofweek: function(t: time [, tz: string] ): int;The numeric day of the week, from Monday=1 to Sunday=7. An optional second argument, a string, names a time zone.
dayofyear: function(t: time [, tz: string] ): int;The numeric day of the year. January 1 is day 1. An optional second argument, a string, names a time zone.
hourof: function(t: time [, tz: string] ): int;The numeric hour of the day, from 0 to 23. Midnight is 0, 1AM is 1, etc. An optional second argument, a string, names a time zone.
minuteof: function(t: time [, tz: string] ): int;The numeric minute of the hour, from 0 to 59. An optional second argument, a string, names a time zone.
monthof: function(t: time [, tz: string] ): int;The numeric month of the year. January is 1. An optional second argument, a string, names a time zone.
secondof: function(t: time [, tz: string] ): int;The numeric second of the minute, from 0 to 59. An optional second argument, a string, names a time zone.
yearof: function(t: time [, tz: string] ): int;The numeric year value, such as 2003. An optional second argument, a string, names a time zone.
trunctoday: function(t: time [, tz: string] ): time;Truncate t to the zeroth microsecond of the day. Useful when creating variables indexed to a particular day, since all times in the day truncated with trunctoday will fold to the same value, which is the first time value in that day. An optional second argument, a string, names a time zone.
trunctohour: function(t: time [, tz: string] ): time;Like trunctoday, but truncate to the start of the hour.
trunctominute: function(t: time [, tz: string] ): time;Like trunctoday, but truncate to the start of the minute.
trunctomonth: function(t: time [, tz: string] ): time;Like trunctoday, but truncate to the start of the month.
trunctosecond: function(t: time [, tz: string] ): time;Like trunctoday, but truncate to the start of the second.
trunctoyear: function(t: time [, tz: string] ): time;Like trunctoday, but truncate to the start of the year.
now: function(): time;Return the current time at the moment of execution. Note that the time value returned does not depend on a time zone.
formattime: function(formatstring: string, t: time [, tz: string]): string;Return a string containing the time argument formatted according to the format string fmt. The syntax of the format string is the same as in ANSI C strftime. An optional third argument, a string, names a time zone.
load: function(file: string): bytes;Return the entire contents of the named file as an uninterpreted byte stream.
getenv: function(variable: string): string;Return the contents of the named environment variable as a string. The raw data is interpreted as UTF-8 in the same manner as the default conversion from bytes to string.
getadditionalinput: function(variable: string): bytes;A map of strings to bytes may be provided to Proc by the process running szl. Return the bytes mapped to by the argument.
setadditionalinput: function(label: string, value: bytes);Stores a (label, value) pair.
lockadditionalinput: function();Prevents further calls to setadditionalinput for this record.
type resourcestats = { initializedavailablemem: int, initializedallocatedmem: int, initializedusertime: time, initializedsystemtime: time, availablemem: int, allocatedmem: int, usertime: time, systemtime: time };
getresourcestats: function(): resourcestats;Return a tuple of type resourcestats containing resource usage statistics. The f irst set of numbers reports the statistics after static initialization. The second set reports the values consumed by processing the current input record. The availablemem figure reports total size of the heap; allocatedmem is the amount in use on the heap. Memory is measured in bytes, and time is measured in microseconds. Availability and accuracy of these values is implementation dependent.
type SQL_DB = int; # basic type dbconnect: function(dbspec: string, defaultspec: string): int;Connects to a database with the dbspecs and returns a db object. It is recommended to declare the db object as static so only one connection is made per worker.
dbquery: function(db: int, query: string): array of array of string;Executes a sql query on the given database object. Returns an array of array of string, each array of string representing one row of results. For most queries such as SELECT statements, the results can be declared as static to avoid excessive queries on the database.
lowercase: function(s: string): string;Return the string s with all characters converted to lower case, as defined by Unicode.
uppercase: function(s: string): string;Return the string s with all characters converted to upper case, as defined by Unicode.
strfind: function(p: string, s: string): int;Search for the first occurrence of the literal string p within s and return the integer index of its first character, or -1 if it does not occur.
strrfind: function(p: string, s: string): int;Search for the last occurrence of the literal string p within s and return the integer index of its first character, or -1 if it does not occur.
bytesfind: function(p: bytes, b: bytes): int;Search for the first occurrence of the literal bytes p within b and return the integer index of its first byte, or -1 if it does not occur.
bytesrfind: function(p: bytes, b: bytes): int;Search for the last occurrence of the literal bytes p within b and return the integer index of its first byte, or -1 if it does not occur.
strreplace: function(str: string, lit: string, rep: string, replace_all: bool): string;Return a copy of string str, with non-overlapping instances of lit replaced by rep. If replace_all is false, only the first found instance is replaced.
match: function(r: string, s: string): bool;Search for a match of the regular expression r within s, and return a boolean value indicating whether a match was found. (The regular expression syntax is that of PCRE.)
matchposns: function(r: string, s: string): array of int;Search for a match of the regular expression r within s, and return an array consisting of character positions within s defined by the match. Positions 0 and 1 of the array report the location of the match of the entire expression, subsequent pairs report the location of matches of successive parenthesized subexpressions.
matchstrs: function(r: string, s: string): array of string;Search for a match of the regular expression r within s, and return an array of strings consisting of matched substrings of s. The 0th string is the entire match; following elements of the array hold matches of successive parenthesized subexpressions. This function is equivalent to using matchposns to find successive locations of matches and created array slices of s with the indices returned.
splitcsvline: function(line: bytes): array of bytes;The function splitcsvline takes a line of UTF-8 bytes and splits it at the commas. It returns the array of fields produced.
splitcsv: function(lines: bytes, fields: array of int): array of bytes;The function splitcsv takes an array of UTF-8 bytes containing lines of text, such as that produced by the load() builtin. It splits each line as if by splitcsvline, and then selects the fields indicated by the second argument (numbered starting at 1). The return value is a flat array of the collected fields.
format: function(fmt: string, ...): string;Return a string containing the arguments formatted according to the format string fmt. The syntax of the format string is essentially that of ANSI C with the following differences:
highbit: function(n: int): int;Return an integer representing the bit position of the highest one bit in n. If n is zero, the result is 0; if n is 1, the result is 1, if n is 15, the result is 4, etc.
rand: function(): float;Return a random floating point number in the range 0.0<=x<1.0.
nrand: function(n: int): int;Return a random integer in the range 0<=x<n. Returns undef if n is negative or zero.
ln: function(x: float): float;The natural logarithm of x.
log10: function(x: float): float;The logarithm base 10 of x.
exp: function(x: float): float;The exponential, base e, of x.
sqrt: function(x: float): float;The square root of x.
pow: function(x: float, y: float): float;The exponential, base x, of y.
sin: function(x: float): float;The sine of x, where x is in radians.
cos: function(x: float): float;The cosine of x, where x is in radians.
tan: function(x: float): float;The tangent of x, where x is in radians.
asin: function(x: float): float;The arc sine of x.
acos: function(x: float): float;The arc cosine of x.
atan: function(x: float): float;The arc tangent of x.
atan2: function(x: float, y: float): float;The arc tangent of y/x.
cosh: function(x: float): float;The hyperbolic cosine of x.
sinh: function(x: float): float;The hyperbolic sine of x.
tanh: function(x: float): float;The hyperbolic tangent of x.
acosh: function(x: float): float;The hyperbolic arc cosine of x.
asinh: function(x: float): float;The hyperbolic arc sine of x.
atanh: function(x: float): float;The hyperbolic arc tangent of x.
fabs: function(x: float): float;The absolute value of x.
ceil: function(x: float): float;Round x up to the nearest integer.
floor: function(x: float): float;Round x down to the nearest integer.
round: function(x: float): float;Round x to the nearest integer, but round halfway cases away from zero.
trunc: function(x: float): float;Round x to the nearest integer not larger in absolute value.
isnan: function(x: float): bool;Tests if a float value is an IEEE NaN
isinf: function(x: float): bool;Tests if a float value is an IEEE Inf
isfinite: function(x: float): bool;Tests if a float value is not +-Inf or NaN
isnormal: function(x: float): bool;Tests if a float value is neither zero, subnormal, Inf, nor NaN
tobase64: function(input: bytes, websafe: bool): bytes;The function tobase64 takes an input bytes array and returns a bytes array containing its base64 encoding. The boolean flag, if set, invokes the web-safe encoding that maps + to - and / to _ and does not pad the output with =.
frombase64: function(input: bytes, websafe: bool): bytes;The function frombase64 takes an input bytes array and returns a bytes array containing its base64 decoding. The boolean flag, if set, invokes the web-safe decoding that maps + to - and / to _.
gunzip: function(compressed_data: bytes): bytes;Decompress gzip compressed data. The data must contain a valid gzip header and footer (as in a .gz file), but data after the footer is ignored.
gzip: function(uncompressed_data: bytes): bytes;Compress data using gzip.
zlibuncompress: function(compressed_data: bytes, skip_header: bool): bytes;Uncompresses the zipped data using zlib, and returns the uncompressed data. Extra data past the valid zlib data results in an error. Optional parameter gives intermediate buffer size for decompression in bytes (default 8192)
zlibcompress: function(uncompressed_data: bytes, skip_header: bool): bytes;Compresses the zipped data using zlib, and returns the compressed data.


| DOSE: T+ 0:00 |
|
oral |
Mandrake |
(tea) |
| T+ 0:00 |
|
oral |
Lobelia spp. |
(tea) |
| T+ 0:45 |
|
oral |
Mandrake |
(tea) |
[Erowid Warning: All parts of the Mandrake plant contain hyoscyamine and scopolamine and can easily cause death by respiratory paralysis.]
I ordered mandrake root from an online herb and spice store about a month ago due to the fact that I read in a text book that mandrake root had small halucinagetic effects. (Since I was young I have always had an interest in reseaching the effects and characteristics of different drugs.) So one night after having it in my room for about a week I desided to try it. I was alone and since I had nothing to do and it was late I figured I would give it a try. First I put the peices of mandrake root into a tea bag with some lobilia which is another herb, and some sugar. After heating it up I drank the whole glass then quickly made another one with the same amount of substance.
0.00: Nothing yet just have a weird taste in my mouth
0.15: I feel slightly different but nothing that is really noticeable.
0:30: Went to get something to eat from the local store. When I went outside I noticed that the street lights and sky seemed a little (very little) different.
0.45: After eating I watched tv. Felt very little. Almost nothing
After an hour of taking the first two doses I desided to try just putting the mandrake root in a glass with no tea bag or sugar or lobelia. I mix a very potent glass of hot water and mandrake and let it brew.
Second dose:
0.00: Feel hot from the drink
0:15: Starting to feel mild euphoria so I lay down.
0:30: I am watching my light in my room which seems to be getting brighter and darker as I look at it. Its sort of going in repetitions.
0:35: I put on some Doors and listen to the music, I start to feel energetic and euphoric. A couple of minutes later I stand up and start moving to the music.
0.45: I am dancing to the music and I am having a great time. It is 2.00 o-clock in the morning yet I have lots of energy. I also notice that when I close my eyes I can vividly see lights and sparkles, you know those things you see when you squint really hard. I also have an extreamly vivid imagination. I start to sing the music.
1:00: I make a second glass of the mandrake tea and drink it down fast. Some of the hot water spills on me but I am too distracted to really feel it. I also want to keep my eyes closed and continued to listen to the music.
1.15: Now I am really feeling the music. I am singing with the Doors CD and I am actually feeling like I am Jim Morrison. I do all the movements and lyrics and really feel like I am singing in a concert. My eyes have been closed for more then 20 min now and I can picture the theater.
1:30 I continue to sing until my friends come home and knock on my door, opening my eyes and bringing me back to my room. I go to the door and tell them what I have been doing.
1:40: When they go back to their room I put the music back on and finish the CD. When the last song comes on “The End” I am so into it I can feel my body tingling and my singing is going perfectly in tune with the music. I love it.
2.00. I turn off the music and come to see the my CD player light seems to be moving, its growing bigger and smaller as I move my head back and forth. This is so cool I cant belive it. I watch this for about two min and go to bed.
The next morning I woke up with a bad taste in my mouth. I look at the clock and see it 1.00 in the afternoon. 30-50 grams Mandrake put me in a delusional state of happiness and illusions, and then put me in a deep deep sleep. Overall it was good and I would definatly try it again.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This is a styled card
On its back there is:
bold,
italic, and
underlined text.
Text with superscript and with subscript.
There is also some Code
with line breaks
inserted with Shift + Enter
- we have lists
- with multiple points
- Numbered lists
- With several points
- and indentation
- Definition lists
- which are here to show definitions
- Test
- something something
And a Keyboard button
EnterAnd a blockquote
An
abbr. :
H1
H2
H3
H4
H5
H6


Sylvanian Families Endeavour Norwood Mouse (Tomy)
The Norwoods were the first family to be released using the new mouse mold.
Biography Information
Brother Endeavour Norwood is the paperboy for his father and mother's shop and is blessed with boundless energy and enthusiasm. Every day before school he gets up hours before the birds have uttered their first sleepy "tweet" to name and address all the papers for delivery.


Shopping Basket
Product Name
Quantity
Edit
Cumin Powder
1 kg
Change Quantity
Coriander Powder
500 gm
Change Quantity
Vindaloo Paste
1 item
Vegetable Oil
2 Tin
Send Order
Add items


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Boners
Home
Make Dailyrotten your start page
|
|
|
March 26, 2002
Dead chicken, human head, same difference
Orlando Sentinel | Submitted by: ElectraCutieKitty
"When the pastor of an Orlando church opened a cardboard box Sunday
afternoon and peeled back the plastic grocery bag inside, he discovered
what he thought was the remains of dead chicken. The pastor threw the
package in the trash and went about his day, not knowing that he had,
in fact, found a human head."
|
|
Read article...
|
|
Backyard nudity upheld
Pittsburgh Post-Gazette | Submitted by: BigJagov
"But one evening in June 2000, a woman three back yards away called the
police on the naked stoop-sitting. By the time he walked out of Centre
County Common Pleas Court seven months later, Stitzer was on two years
probation for indecent exposure and disorderly conduct." The case has
been thrown out of court: "His back yard couldn't be deemed a public place,
he wasn't doing anything to call attention to himself and the offended
neighbor, 65 yards away, was too distant, the judges reasoned." And now
that woman will have to find something else to stare at through her binoculars.
|
|
Read article...
|
|
Sex doll found not to be a corpse
BBC | Submitted by: funkmastersilv
"A German man suspected of murder has been cleared by police after it
emerged a 'corpse' in his possession was in fact a new addition to his
sex doll collection." Apparently the man had just taken it out for a
'test drive', if you know what I mean.
|
|
Read article... and
This article...
|
|
U.S. chicken bugs Russia
St. Petersburg Times | Submitted by: AronRigo
"I would like to point out that American farmers are injecting the chickens
they grow with antibiotics used to treat people. This is prohibited in
Russia." Last week, U.S. negotiators confirmed that their producers used
antibiotics and dosages prohibited in Russia. Doses of tetracycline, for
example, are 200 times the legal limit. They also admitted to using arsenic
to make their chicken more aesthetically pleasing." Arsenic??
|
|
Read article...
|
|
Isn't "French Frog" redundant?
Taipei Times | Submitted by: superduperabdul
The frog is like a woman. Only their thighs are good.
"Josette Pouchucq wants to put the slime back in the frog business. Along
with the 60 other ruling members of the Brotherhood of Frog Thigh Tasters,
Pouchucq leads the struggle to restore la grenouille to glory by persuading
the government to put fresh French frogs back on the table. Resplendent in
the green robe and yellow sash of the Thigh Tasters, Pouchucq flourishes
a broiled frog leg of unknown origin and says, "we prefer the frogs
we eat to be French."
|
|
Read article...
|
|
The Suicide Bomber Bonus
Sydney Morning Herald | Submitted by: LovleAnjel
"The hall was packed and the intake of breath was audible as a special
announcement was made to the war widows of the West Bank - Saddam Hussein
would pay $US25,000 to the family of each suicide bomber as an enticement
for others to volunteer for martyrdom in the name of the Palestinian people.
The men at the top table then opened Saddam's chequebook and, as the names
of 47 martyrs were called, family representatives went up to sign for
cheques written in US dollars."
|
|
Read article...
|
|
Women of Enron
Associated Press | Submitted by: Soylent
"Playboy Magazine may entice some of those who lost their shirts in the
Enron scandal to reveal more than even investigating congressional
committees want to see. The Chicago-based adult magazine is inviting Enron
women, past and present, to send snapshots of themselves clad in bikinis
if they wish to appear in an upcoming Women of Enron issue."
|
|
Read article...
|
|
Fritz Hollings is a retard
Observer | Submitted by: Soylent
"The outrageousness of the studios' position [on CBDTPA] does not seem to
have outraged US legislators - which may have something to do with the fact
that Disney alone gave them $6.3 million in campaign contributions in
a single year. There is, however, one sobering statistic which may
eventually cause even Congress to balk at the studios' arrogance. US
domestic spending on computing technology is running at $600 billion a
year, while Hollywood generates a measly $35B."
|
|
Read article...
|
|
Keeping rats awake
Scientific American | Submitted by: dtallee
"In the case of rats, however, continuous sleep deprivation for about two
weeks or more inevitably caused death in experiments conducted in Allan
Rechtschaffen’s sleep laboratory at the University of Chicago. Two animals
lived on a rotating disc over a pool of water, separated by a fixed wall.
Brainwaves were recorded continuously into a computer program that almost
instantaneously recognized the onset of sleep. When the experimental rat fell
asleep, the disc was rotated to keep it awake by bumping it against the
wall and threatening to push the animal into the water."
|
|
Read article...
|
|
|
|
|


Inter operability example between:
WebRTC Insertable Streams for Chrmome m83 or later
WebRTC RTCRtpScriptTransforms (
draft Spec
) for Safari 16, Firefox 117(beta) or later
using
Ayame-labo
RoomID
use Audio
Start Video
Stop Video
Connect
Disconnect
Sender
Sender XOR Simple Encryption


Sphere (PG-13) ** 1/2 (out of ****)
Barry Levinson's adaptation of Michael Crichton's novel Sphere has more in common with the story's focal otherworldly orb than just its title. The sphere is luminous and hauntingly beautiful on the surface, with its interior kept alluringly, frustratingly unclear--much like the superficially diverting but ultimately disappointing film itself.
A four-man team comprised of psychologist Norman Goodman (Dustin Hoffman), biochemist Beth Halperin (Sharon Stone), mathematician Harry Adams (Samuel L. Jackson), and astrophysicist Ted Fielding (Liev Schreiber) is recruited by the government to investigate the wreckage of a crashed spacecraft at the bottom of the ocean. Inside the spacecraft, the team discover a giant, glowing, golden sphere of unknown origin. But soon after this discovery, strange, life-threatening occurrences befall the team in their undersea station, from the appearance of giant sea creatures to online contact with a possibly extraterrestrial lifeform.
This is a solid jumping-off point for a intelligent, suspenseful sci-fi thriller, and while there are some very effective moments, the murky script by Stephen Hauser and Paul Attanasio keeps Sphere from taking on a defined shape. Sphere does eventually offer answers to its mysteries, but the information is often too unclearly stated and clumsily delivered. Tune out for one second, and one crucial, isolated line of dialogue that reveals one of the film's key mysteries is lost, the information never to be repeated again. One more irksome miscalculation was the division of the action with chapter title inserts, such as "The Surface," "The Deep," "The Spacecraft," and so on. I suppose the purpose was to underscore certain important parts of each section, but the chapter divisions hamper the building of any suspense, which is hard to sustain once an obtrusive title card appears.
But Levinson is able to overcome that start-and-stop rhythm and gradually build tension, resulting in some memorable shock scenes. The film's final act, where suspicion is hovers over all of the central characters, is particularly tense and well-acted by the three above-the-title stars. It is quite refreshing to see a science fiction film that relies more on wits and psychological terror to drive its climax than visual effects (though the effects are quite impressively handled).
Ultimately, Sphere ends up running out of gas before the film reaches the end of its two-hour-plus running time. After the strong climax, the film drags on for about another 15 minutes, blunting the impact of all that went on before with a finale that, while well done technically, is on the cornball side. Much like the mysterious object that lends the film its title, Sphere offers its share of surface delights, but what exactly lies underneath--if anything at all--is left up to question.
Michael Dequina<EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS><EMAIL_ADDRESS>|<EMAIL_ADDRESS><EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS>Mr. Brown's Movie Site: http://members.tripod.com/~MrBrown/ Personal Page: http://members.tripod.com/~MrBrown/home.html CinemaReview Magazine: http://www.CinemaReview.com
Michael Jordan Beyond the Court: http://www.geocities.com/Colosseum/Field/2302/ A Michael Jordan Fan's Heartbreak: http://members.tripod.com/~mj23/mj.html
"Don't be like me. Be better than me." --Michael Jordan
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Home
Work Experience
Education
Projects
Recreation
Contact
Resume
1
Hi, I'm Harshit and welcome to my studio.
Copyright © 2016 Harshit Doodwal & Contributors All Rights Reserved.


New User Registration
Username
Username is required
Password
Password is required
Name
Name is required
Email
Email is required
Favorite Pizza
Cheese Pizza
BBQ Chicken Pizza
Magherita Pizza
Pepperoni Pizza
Combo Pizza
Favorite is required
Reset
{{model | json}}


Build a natural language Twitter bot
using Node.js and the Yelp and ShipEngine APIs
At ShipEngine, we think our API is pretty fun and easy to use. But you know what's even more fun and easy to use? A Twitter bot. So we built @ShipEngineBot, which lets you ask shipping questions using natural language.
Hey @ShipEngineBot, I need to send 20 pounds of gummy bears from Austin to Portland. What'll that cost me?
@ShipEngineBot, How much does it cost to send a 4oz letter from New Jersey to Paris?
I wonder if @ShipEngineBot can help me ship 5kg of potato chips to 78702 from 90210
ShipEngineBot is happy to help you out whenever you need it. But how does it work? Under the hood, ShipEngineBot combines ShipEngine's shipping rates API, Yelp's business search API, and Twitter's stream API. I'll show you how it works, and how to build your own Twitter bot in less than an hour.
Step 1: Get your API keys
Each of the three APIs that we'll be using require you to create a free account, verify your email address, and generate an API key. Without these API keys, your bot won't be able to call the APIs. Don't worry, no credit card is required, since all three services offer a free usage tier.
For Twitter, you'll need to go to apps.twitter.com and create a new app. Then go to the "Keys and Access Tokens" tab and copy the "Consumer Key", "Consumer Secret", and "Owner ID" values for use later. You'll also need to click the "Create Access Token" button at the bottom of the page and then copy the "Access Token" and "Access Token Secret" values too.
Yelp
Similar to Twitter, you'll need to create a Yelp app. The process is a bit easier though. You only need to copy a single "API Key".
ShipEngine
Just click the "Get Started" button on the ShipEngine homepage to create your free account. After you confirm your email address, you can login to app.shipengine.com to access your dashboard. Click the "API Management" menu on the left to access your API keys (create one if necessary). Copy an API key so we can use it later in the code.
Step 2: Create the Twitter bot
You can build a Twitter bot in any language, but we're going to use Node.js for this article. So download and install Node if you don't already have it.
Note: Make sure you're running Node version 8 or newer. We're using some new syntax in this article that isn't supported by older versions. You can check your version of Node by running node --version
in your terminal.
If you get stuck at any point during this article, or if you just want to see the finished product, then all of the code is available on GitHub.
Open a terminal window and run the following commands. This will create a new folder, setup a new Node.js project, and install all of the libraries that are needed for the Twitter bot. Lodash is a utility library, and the rest are SDKs for the three APIs that we're using.
mkdir twitter-bot
cd twitter-bot
npm init -y
npm install lodash twit yelp-fusion shipengine
You should now have a "twitter-bot" folder that contains a "package.json" file and a "node_modules" folder. Let's add a new file to that folder and start writing some code!
Create a new file named "twitter.js", open it up in your favorite code editor, and insert the following code. Be sure to replace each of the string constants with your Twitter app's keys from Step 1 above.
const Twitter = require("twit");
const account_id = "paste your Twitter Owner ID here";
const consumer_key = "paste your Twitter Consumer Key here";
const consumer_secret = "paste your Twitter Consumer Secret here";
const access_token = "paste your Twitter Access Token here";
const access_token_secret = "paste your Twitter Access Token Secret here";
// Connect to the Twitter Streaming API
let twitter = new Twitter({ consumer_key, consumer_secret, access_token, access_token_secret });
let stream = twitter.stream("user");
// Listen for incoming tweets
stream.on("tweet", handleTweet);
console.log("Waiting for somebody to tweet to us...");
This code connects to Twitter's streaming API and starts listening for incoming tweets. Whenever a tweet is received, the handleTweet
function will be called. And here's what that function looks like (paste this code at the bottom of your "twitter.js" file):
/**
* Responds to tweets such as "How much to send a 3lb package from New York to London?"
* with responses like "It'll cost between $5.75 and $9.00 to send your 3lb package from New York to London".
*
* @param {object} tweet - A Twitter API tweet object (https://developer.twitter.com)
*/
async function handleTweet (tweet) {
// Ignore our own tweets
if (tweet.user.id_str === account_id) {
return;
}
try {
// Get the text of the tweet
let tweetText = tweet.extended_tweet ? tweet.extended_tweet.full_text : tweet.text;
console.log(`Received at tweet from @${tweet.user.screen_name}:`, tweetText);
// Build a response to the user
let response =<EMAIL_ADDRESS>` + await buildResponse(tweetText);
console.log("Sending response:", response);
// Tweet the response as a reply to the original tweet
twitter.post("statuses/update", {
status: response,
in_reply_to_status_id: tweet.id_str,
});
}
catch (error) {
console.error(error);
}
}
The handleTweet
function is called whenever there's any tweet involving your bot's Twitter account — including the bot's own tweets. That's why the first thing this function does is check the tweet's author ID against your bot's Twitter account ID (which you dutifully copied and pasted earlier) and exits unless the tweet is from someone else.
The next thing the code does is get the text of the tweet, which will be in the tweet.text
property most unless the tweet contains more than the old limit of 140 characters. For longer tweets, you have to get the text from the tweet.extended_tweet.full_text
property instead.
The next bit of code builds the response message by @mentioning the original tweeter and then appending the result of the buildResponse
function. And where's that function? We'll create it next. Also note that this is an asynchronous function (denoted by the await
keyword) since it will make calls to the Yelp and ShipEngine APIs as part of building the response.
Finally, after building the response message, we tweet it as a reply to the original tweet. This is done via the twitter.post
method, which calls the POST statuses/udpate API endpoint.
Step 3: Natural language processing
Now we're going to create the buildResponse
function that's called by handleTweet
. This is where we'll do all of our natural language processing.
The buildResponse
function will simply accept a string (the original tweet) and return a string (the response tweet), neither of which is specific to Twitter. In fact, from this point forward, none of the code is specific to Twitter, which means you could easily re-use this same code to build a Slack bot, a Facebook Messenger bot, or any other chatbot.
Since this code isn't Twitter-specific, let's create a new file named "buildResponse.js", rather than putting everything in one file. Add this line to the top of "twitter.js":
const buildResponse = require("./buildResponse");
Now paste the following code into "buildResponse.js":
/**
* Responds to a natural language message such as "How much to send a 3lb package from New York to London?"
* with something like "It'll cost between $5.75 and $9.00 to send your 3lb package from New York to London".
*
* @param {string} message - The message to respond to
* @returns {string} - The response message
*/
async function buildResponse (message) {
// Parse the message into from/to addresses and package weight.
let { from, to, weight, unit } = parseMessage(message);
// Ask for more info if anything is missing
if (!from || !to) {
return "I need to know where you're shipping from and to";
}
else if (!weight || !unit) {
return "I need to know the package weight and unit";
}
else {
// We have all the data we need! So get the shipping rates
let rates = await getRates(from, to, weight, unit);
if (rates.length === 0) {
return `Sorry, but I don't know how much it'll cost to ship your ${weight} ${unit} package from ${from} to ${to}`;
}
else {
let { minRate, maxRate } = getRateRange(rates);
return `It'll cost between ${minRate} and ${maxRate} to ship your ${weight} ${unit} package from ${from} to ${to}`;
}
}
}
module.exports = buildResponse;
As you can see, the buildResponse
function calls several other functions, which we'll get to shortly. But first let's examine the high-level logic.
The first thing we do is parse the incoming message to extract the parts that we care about: the sender and recipient's location, the package weight, and the unit of weight. We then verify that all of these pieces of information were provided. If anything is missing, then we return a response message asking for the missing info.
If the message contains all the info we need, then we call a getRates
function to retrive rate quotes from shipping carriers (USPS, FedEx, UPS, etc). If anything goes wrong, then no rates will be returned, in which case we respond with an apology message. If we do get rates back, then we return a message quoting the lowest and highest rates.
Now let's implement our our natural language parsing magic. Add the following code to your "badResponse.js" file:
/**
* Parses a natural language message such as "How much to send a 3lb package from New York to London?"
* and returns the locations ("New York" and "London") the weight (3) and the unit ("lb").
*
* @param {string} message - The message to be parsed
* @returns {{ from: ?string, to: ?string, weight: ?number, unit: ?string }}
*/
function parseMessage (message) {
let from, to, weight, unit;
// Parse "from XXX to YYYY"
let match = /from ([a-z0-9 ,-]+?) to ([a-z0-9 ,-]+)/i.exec(message);
if (match) {
from = match[1];
to = match[2];
}
// Parse "XX pounds", "X.XX ounces", "X gram", etc.
match = /(\d+(?:\.\d+)?) ?(lb|oz|g|kg|pound|ounce|gram|kilo)/i.exec(message);
if (match) {
weight = parseFloat(match[1]);
unit = match[2];
}
return { from, to, weight, unit };
}
As natural language processing goes, this is a very simplistic and somewhat naive implementation. But it works well enough for our simple Twitter bot. We use a regular expression to extract the sender and recipient location from phrases like "from New York to London", "from Dallas, TX to San Francisco, California", or even "from 78701 to 90210". Then we use another regular expression to extract the weight and unit in various formats, such as "5 pounds", "1.2oz", "20 kilos", etc. Notice that we convert the weight from a string to a number by calling parseFloat
.
The parseMessage
function returns an object containing from
, to
, weight
, and unit
. These properties will be undefined
if they weren't found in the message. Recall that in the buildResponse
function, we check for any missing values and return a message prompting the user for the missing pieces.
Next let's implement the getRateRange
function. This function finds the lowest and highest rates and returns them as currency strings (e.g. "$5.75", "$0.45", "£50.00", etc). Add this code to your "badResponse.js" file:
/**
* Returns the min and max rates, as currency strings (e.g. "$5.75", "$0.45", etc.)
*
* @param {object[]} rates - An array of rate objects from ShipEngine
* @returns {{ minRate: string, maxRate: string }}
*/
function getRateRange (rates) {
// Get the min & max rates
let minRate = _.minBy(rates, "shipping_amount.amount").shipping_amount;
let maxRate = _.maxBy(rates, "shipping_amount.amount").shipping_amount;
// Format the rates as currency strings
minRate = minRate.amount.toLocaleString("en", { style: "currency", currency: minRate.currency });
maxRate = maxRate.amount.toLocaleString("en", { style: "currency", currency: maxRate.currency });
return { minRate, maxRate };
}
The rates
array contains ShipEngine rate objects, which have shipping_amount.amount
and shipping_amount.currency
properties. We pass these properties to the Number.toLocaleString
method to convert the numbers to human-friendly currency strings.
The getRateRange
function also uses the _.minBy
and _.maxBy
functions from Lodash, so we need to import the library. Add this line to the top of the "buildResponse.js" file:
const _ = require("lodash");
Step 4: Get shipping rates
The only function that we haven't implemented yet in "buildResponse.js" is getRates
. And, as you can probably guess, this is where we're going to call the Yelp and ShipEngine APIs to get the shipping rates that the user is asking for.
Lets implement the getRates
function in a separate file so it encapsulates all of our third-party API logic. Create a "getRates.js" file and add the following code to it:
const _ = require("lodash");
const Yelp = require("yelp-fusion");
const ShipEngine = require("shipengine");
const yelpClient = Yelp.client("paste your Yelp API Key here");
const shipEngine = new ShipEngine.ShipEngine("paste your ShipEngine API Key here");
/**
* Returns an array of shipping rates from ShipEngine for the specified shipment criteria.
*
* @param {string} from - The package's starting location (e.g. "London", "Austin, Texas", "90210", etc.)
* @param {string} from - The destination location (e.g. "London", "Austin, Texas", "90210", etc.)
* @param {number} weightAmount - The package's weight, in whatever unit
* @param {string} unit - The unit of weight (e.g. "lb", "kg", "ounce", "pound", etc.)
*
* @returns {object[]} - Returns an array of rate objects from ShipEngine (https://docs.shipengine.com/docs)
*/
async function getRates (from, to, weightAmount, weightUnit) {
// Convert the addresses from strings to ShipEngine.Address objects
let ship_from = await normalizeAddress(from);
let ship_to = await normalizeAddress(to);
// Create a ShipEngine.Package object of the correct weight
let weight = normalizeWeight(weightAmount, weightUnit);
let parcel = new ShipEngine.Package(weight);
// Get the carriers that are configured for your ShipEngine account
let { carriers } = await shipEngine.getCarriers();
let carrier_ids = _.map(carriers, "carrier_id");
// Create a shipment with sender, recipient, and package
let shipment = new ShipEngine.Shipment({ ship_from, ship_to, packages: [parcel] });
// Let ShipEngine attempt to correct any invalid/missing parts of the address
shipment.validate_address = "validate_and_clean";
// Get shipping rates for this shipment from these carriers
let { rate_response } = await shipEngine.getRates(shipment, { carrier_ids });
if (rate_response.rates.length > 0) {
return rate_response.rates;
}
else {
// No rates were returned, so fallback to "invalid_rates". These rates are for services
// that aren't configured for your account (e.g. international, freight, etc.)
return rate_response.invalid_rates;
}
}
module.exports = getRates;
Okay, there's a lot going on here, so let's go through it.
We start off by creating instances of the Yelp and ShipEngine API clients. In both cases, we provide the client with our API key. Remember to replace the "paste your ..."
strings with the API keys that we created back in Step 1.
Next we define the getRates
function, which accepts the from
, to
, weightAmount
, and weightUnit
values that we previously got from the parseMessage
function and uses those values to calculate the shipping rates.
The getRates
function starts-off by converting the from
and to
locations from strings (e.g. "Dallas, Texas") to ShipEngine address objects. We then convert the weightAmount
and weightUnit
to a ShipEngine weight object and use that to create a ShipEngine package object.
Next we need to get the list of carriers that are configured for your ShipEngine account. Your account is already configured with USPS by default, but you can add other carriers on your account dashboard. The shipEngine.getCarriers
function returns an array of carrier objects, and we use _.map
to extract the carrier IDs.
We then create a shipment object using the sender and recipient addresses and package information and use the shipment along with the carrier IDs to call shipEngine.getRates
. This is the goal we've been working toward this whole time. We get back an array of rate objects, which we return. In some cases, we'll get back invalid_rates
instead of rates
, but that just means the rates are for services that aren't configured for your account (such as international shipments, freight, etc.), so we return those anyway.
So now let's implement the normalizeAddress
function that we mentioned earlier. It's job is to convert a string location (e.g. "New York", "Dallas, Texas", or "90210") to an address object. We could try to parse the location strings ourselves, but that's much more difficult than it sounds. So instead we rely on the Yelp business search API to do the work for us.
Add this code to "getRates.js":
/**
* Converts a string location to a ShipEngine.Address object using the Yelp API.
*
* @param {string} location - The human-friendly location (e.g. "New York", "Austin, Texas", "90210")
* @returns {ShipEngine.Address}
*/
async function normalizeAddress (location) {
// Search Yelp for the business that best matches the location
let response = await yelpClient.search({ location, limit: 1 });
let business = response.jsonBody.businesses[0] || { location: {} };
return new ShipEngine.Address(
business.name || "",
business.location.city || "",
business.location.state || "",
business.location.zip_code || "",
business.location.country || "",
business.location.address1 || "",
business.location.address2 || "",
business.phone || ""
);
}
The yelpClient.search
function is very forgiving and will almost always be able to find a reasonably close match. But occasionally it fails to find anything, or the address it finds is incomplete, in which case we default to empty strings for each field.
Note: Because we rely on the Yelp API to parse addresses, our bot won't work for countries in which Yelp does not operate. It works great for the U.S. and the U.K. though!
We just hae one more small function to implement before our Twitter bot is complete. Add the following code for the normalizeWeight
function to "getRates.js":
/**
* Converts a weight and unit into the format that's required by ShipEngine.
*
* @param {number} value - The weight amount, in whatever unit
* @param {string} unit - The weight unit or abbreviation (e.g. "pound", "lb", "kilogram", "kg", etc.)
*/
function normalizeWeight (value, unit) {
switch (unit.toLowerCase()) {
case "oz":
unit = "ounce";
break;
case "lb":
unit = "pound";
break;
case "g":
unit = "gram";
break;
case "kg":
case "kilo":
unit = "kilogram";
break;
}
return { value, unit };
}
This one's pretty straightforward. It just converts unit abbreviations to their canonical form and returns the weight in the structure that's expected by ShipEngine.
Step 5: Test it out!
If you've followed along to this point, then you now have a working Twitter bot! Just open a terminal window in your project directory and run node twitter.js
to start it up. If you get any errors or you suspect that something's not right, then feel free to compare your code to the code on GitHub.
When the bot first starts, you should see this message:
node twitter.js
Waiting for somebody to tweet to us...
Your bot is now listening for tweets. So head over to Twitter and use a different account to tweet a message to your bot. Here's one to try...
@YOUR_BOT_NAME_HERE Can you help me send a package from Denver to Orlando? It weighs 4 pounds.
Each time you send a tweet to your bot, you will see the message and its response in the terminal. If an error occurs, you'll see that in the terminal too.
Received at tweet from @YOUR_ACCOUNT: @YOUR_BOT_NAME_HERE Can you help me send a package from Denver to Orlando? It weighs 4 pounds.
Sending response: @YOUR_ACCOUNT It'll cost between $4.10 and $46.49 to ship your 4 pound package from Denver to Orlando
And, of course, you'll also see the response on Twitter
That's it! You've created a natural language Twitter bot. Now start experimenting with ways to enhance it to support different phrases. Or port it to Slack or Facebook Messenger.


Doctests¶
Doctests are used to test interactive python examples and are a way of demonstrating how your code should be used. Sometimes an example is worth 10x more than words. They ensure that your documented example does not become out of date with code changes but should generally not be used instead of other forms of testing (use in addition to them).
Doctests can take the form of those which are included as part of our sphinx rst files, or the more traditional doctests which are part of our usual docstrings.
This later case we will look at first:
- nslice.group_indices(array)¶
Group an array representing indices into an iterable of slice objects.
- Parameters
array (
numpy.ndarray
) – Numpy array representing indices.- Returns
- Return type
iterable of slice objects
Examples
>>> from nslice import group_indices >>> import numpy as np >>> indices = np.array([0, 1, 2, 4, 5, 6, 8, 9]) >>> group_indices(indices) [slice(0, 3, None), slice(4, 7, None), slice(8, 10, None)]
Under the hood these doctests are run via the doctest python package. At the bottom of the module where this function lives, we include the following snippet to enable us to run doctests present in this module when we run this module:
if __name__ == "__main__":
import doctest
doctest.testmod()
However, it would be impractical and in all likelihood undesirable to do this for all our modules/packages. For convenience we can simply use pytest to perform both unittest and doctest discovery for us:
pytest --doctest-modules
Alternatively, we can run doctests included in our docstrings using the sphinx doctest extension. This can then be done by calling make doctest for our sphinx package documentation.
However it should be noted that there is a difference in behaviour of sphinx doctests run behaviour and those run more directly by doctest (using doctest, pytest etc.). Take a look:
sphinx incompatible, doctest compatible:
>>> indices = np.array([0, 1, 2, 4, 5, 6, 8, 9])
>>> group_indices(indices)
[slice(0, 3, None), slice(4, 7, None), slice(8, 10, None)]
sphinx compatible, doctest compatible:
>>> from nslice import group_indices
>>> import numpy as np
>>> indices = np.array([0, 1, 2, 4, 5, 6, 8, 9])
>>> group_indices(indices)
[slice(0, 3, None), slice(4, 7, None), slice(8, 10, None)]
Sphinx reads the python module and translates it to reST code where the module namespace is then not accessible to the doctest. This is why we had to add the two above include lines.


class Hash(K, V)
- Hash(K, V)
- Reference
- Object
Overview
A Hash
represents a collection of key-value mappings, similar to a dictionary.
Main operations are storing a key-value mapping (#[]=
) and
querying the value associated to a key (#[]
). Key-value mappings can also be
deleted (#delete
).
Keys are unique within a hash. When adding a key-value mapping with a key that
is already in use, the old value will be forgotten.
# Create a new Hash for mapping String to Int32
hash = Hash(String, Int32).new
hash["one"] = 1
hash["two"] = 2
hash["one"] # => 1
Hash literals
can also be used to create a Hash
:
{"one" => 1, "two" => 2}
Implementation is based on an open hash table.
Two objects refer to the same hash key when their hash value (Object#hash
)
is identical and both objects are equal to each other (Object#==
).
Enumeration follows the order that the corresponding keys were inserted.
NOTE When using mutable data types as keys, changing the value of a key after
it was inserted into the Hash
may lead to undefined behaviour. This can be
restored by re-indexing the hash with #rehash
.
Included Modules
- Enumerable({K, V})
- Iterable({K, V})
Defined in:
crystal_on_steroids/hash.crcrystal_on_steroids/to_query.cr
Instance Method Summary
-
#compact
Returns a hash with non
nil
values. -
#compact!
Replaces current hash with non
nil
values. -
#to_param
Alias for to_query
-
#to_query(namespace = nil)
Returns a string representation of the receiver suitable for use as a URL query string:
Instance methods inherited from module Enumerable({K, V})
avg
avg,
blank?
blank?,
exactly?(count : Int32, &)
exactly?,
excludes?(obj)
excludes?,
frequencies
frequencies,
many?(&)many? many?, pluck(*keys) pluck, pluck?(*keys) pluck?, without(*items) without
Instance methods inherited from class Object
in?(another_object)
in?,
presence
presence,
presence_in(another_object)
presence_in,
present?
present?,
to_param
to_param,
to_query(namespace)to_query to_query
Class methods inherited from class Object
❨╯°□°❩╯︵┻━┻
❨╯°□°❩╯︵┻━┻
Instance Method Detail
Returns a hash with non nil
values.
hash = { a: true, b: false, c: nil}
hash.compact # => { a: true, b: false }
hash # => { a: true, b: false, c: nil}
{ c: nil }.compact # => {}
source: ActiveSupport
This method is already included in Crystal, but there is a bug, so I'm keeping my own implementation of Hash#compact.
Replaces current hash with non nil
values.
hash = { a: true, b: false, c: nil }
hash.compact! # => { a: true, b: false }
hash # => { a: true, b: false }
source: Rails ActiveSupport
Returns a string representation of the receiver suitable for use as a URL query string:
{name: "David", nationality: "Danish"}.to_query
# => "name=David&nationality=Danish"
An optional namespace can be passed to enclose key names:
{name: "David", nationality: "Danish"}.to_query("user")
# => "user%5Bname%5D=David&user%5Bnationality%5D=Danish"


Hi!  Through IOT, Web Applications, or simple command line tools we can automate, display, or answer just about anything. I was first introduced to programming in 2014 with a high school robotics challenge on the VEX platform, and have been programming as a hobby or professionally since.
As of today I have had the privilage of working in a variety of industries, from aerospace communication technology at Thinkom and Business Intelligence software at Exago, to cutting edge research and development at MIT's Lincoln labs and MITRE. My main focus currently is creating experimental cybersecurity applications and training environments using NodeJS, Python, and Angular.
Here are some of the technologies I have been working with:


Shopping Corner
Realme
Redmi
Samsung
Vivo
Oneplus
Poco
SHOPPING CORNER
HAPPY NEW YEAR 2021
Good and Trusted Products
1 year Company warranty
Trusted Sellers and Customers
Can get more than your expectation
Get upto 10% Cashback
Free Earbuds with all your buying phones
30 days replacement policy for all mobiles
Great products on Great Deals
All Bank cards upto 10% discount
No cost EMI is also available for All cards
Highly rated products
64mp camera phones Starts at just ₹10999
Upto 65w Dart Charging phones are available
Ultra Clear Display available


Hi
I have a solar system that charges a 24 volt battery bank. The solar controller provides information on charging but I want to monitor usage.
I have built and calibrated a V2 emontx connected to a voltage divider and a Pololu ACS711EX Current Sensor Carrier:- http://www.pololu.com/product/2452
I now have pretty accurate readings for voltage and current and I have modified the EmonTx CT123 + Voltage example firmware to transmit those values to my emoncms server. The next move is to record a running total of amp hours. I have some idea on how to code this checking time between readings using millis() and updating a running total.
One thing I am not sure about is whether I should worry about battery voltage variation which can be from 23.9v to 29.2v suggesting that maybe I should record Watt Hours and then calculate Amp hours at the nominal 24V.
Also I am not sure what sample time would be needed to get reasonable accuracy. And is there any trade of of running at the shortest sample time possible. I am not concerned about the Emontx current consumption as it will run from the 24V batteries as does my Pi server and hard disk.
However this is all fairly new to me and any input or suggestions would be much appreciated.
Regards
Ian
Re: Monitoring power usage on a 24Volt DC battery solar system using Emontx
Hello Ian!
Is it really important to know the Ah that you charged into your battery? You won't be able to get out the same Ah.
I think it's better to measure the kWh or Wh that come from the solar system as this also includes the battery voltage.
I'm running a similar project, but I'm running a 12V battery and 2x ACS712 with different values (+/- 20A range for load, +/-5A range for solar current) on a self-built, modified EmonTX clone since July last year. you can have a look at the measurements here: http://www.emoncms.org/dashboard/view/Solar1 (complete system listed in the EmonTX showcase forum).
Re: Monitoring power usage on a 24Volt DC battery solar system using Emontx
Hi Jürgen
I would like to monitor power consumption. I have some IT stuff running 24 hours a day on the DC supply. I want to add some more but do not want to overload the system. Summer is no problem but in the Winter I have to switch some things to mains to stop the low volt drop out shutting down the 24V system.
If you have any code you are willing to share that records DC power it would be appreciated.
Regards
Ian
Re: Monitoring power usage on a 24Volt DC battery solar system using Emontx
Hello Ian,
I've attached a zip file with some files of my project including schematic,3D model of pcb, ready to use pcb and the script for it (at the moment I don't use temperature measurement on it but everything is prepeared for it, I've also access to all pins of the ATmega processor that are not used at the moment and there is a small field where additional components can be placed for future extensions.
I created the schematic and pcb it with KiCad, a free pcb designer, the pcb was produced by pupils of the technical school I attended 16 years ago. If anybody likes to have the KiKad files, please write me a message.
Jürgen
Re: Monitoring power usage on a 24Volt DC battery solar system using Emontx
Hi Jürgen
Many thanks for the files.
Regards
Ian


We are now ready to start learning the rule of the game! We have seen all the building blocks of Nature (see fig below). We can arrange them in pairs. First there is space and time, the tapestry on which everything moves.
We then have the "stuff" of Nature, which can either be particles or waves.
Finally, each particle/wave has a certain amount of energy and momentum, which dictates its motion through space and time. Energy and momentum are conserved in the whole Universe but they can both be transferred between different particles/waves.
Now that we know the basic structure, the next questions are
How does a particle's or wave's energy and momentum change?
How do things interact and how do they exchange energy and momentum?
Interactions between particles and waves occur via forces. Fundamentally, we know of four different forces in the world.
They are in order of best understood to least understood
and yes, gravity is the least understood force (in some ways). We will not discuss the weak nuclear force in much details in this course. We will spend most of our time on the first one: electromagnetism. This is the most important force in your daily life!


I can’t execute my idea alone, but there’s no incentive for other teams to contribute — they have their own priorities.
I need a graphic designer, UX architect, or front-end developer — but people with these skills are walled off from my department and can’t chip in.
needs to change, but everyone’s pessimistic and no one seems to care about innovation.


‘Pitch invader’ Awal Suleman finally meets Thomas Partey
Awal Sulemana the pitch invader in the Ghana-South Africa game met his idol Thomas Partey after the Atletico Madrid star extended an invitation to him.
Suleman was arrested by security officials after the incident and was held in custody for two days before granted bail last Saturday.
Awal came on to the pitch in the 74th minute, holding a phone in search of Partey but was given a hot chase by the security officials and apprehended.
According to the 25-year old his decision to go on to the pitch was because he wanted to have a selfie with the Atletico Madrid star.
In an interview, Awal stated that he idolizes Thomas Partey and it was a dream come true for him to watch him play at the Cape Coast Stadium in Ghana’s game against South Africa which they won by 2-0.
He later apologised for his actions and asked other soccer fans not to emulate his behaviour.
Awal Suleman received a signed shirt from Thomas Partey


公會成員狀態
會員類型： Officer
加入日期： October 8, 2020
╰ʕ ‧ᴥ‧ʔ╮良心商人公會╰ʕ ‧ᴥ‧ʔ╮
<Crafty>
狀態不用打日期，打常用角色ID就好
創立於：
10月 29, 2016
總成員數：
236
成員
telluImsorry
Leader
jakex012345
Officer
ja24513620
Officer
chiaa-lin Officer
aaa790816 Officer
ji3g4196ql4ql4
Officer
ilove1424 Officer
kazbar37 Officer
eyes71386 Officer
asdzxc25899001
Officer
momo505123
Officer
KBDF-Fan Officer
cowbear0526
Officer
kicoskgb Officer
bill1000201
Officer
chengpoyun
Officer
BooCar Officer
csomike Officer
kae0124 Officer
KillMe_ThankYou
Officer
as931399 Officer
vul3c0c0 Officer
papomp Officer
keviner2014
Officer
EatMyDown Officer
iwgpmgkk Officer
Thouble_HD
Officer
siunik Officer
hiritsuki Officer
godonlynow
Officer
yu780514 Officer
sa123564 Officer
kevin7251 Officer
abc555651 Officer
sss5943258
Officer
ClMaxOoOo Officer
hgjvhh2203
Officer
RK-9 Officer
death016024
Officer
banban1230
Officer
w910419zzz
Officer
piliooo0919
Officer
ab8742123 Officer
Be_MyAngle
Officer
ta0979523236
Officer
haha_741 Officer
ixrais01 Officer
you_out Officer
MONSUTA332121
Officer
xza80308 Officer
C.hobits Officer
j23728523 Officer
kkk7766tw Member
a1234142 Member
252019zz Member
love5303456
Member
qaz71995752
Member
danny12388
Member
kevingod2012
Member
ysesst94124
Member
SAS91138 Member
lin5322 Member
a6169013 Member
troytroyjoe
Member
qwpoeriuty98
Member
you11357827
Member
stu900760 Member
rrrrrrrrrrreeee
Member
bread12356
Member
sign1988 Member
nlpss95185
Member
cs8674 Member
ji394boss32
Member
zeroexe Member
elppa0214eric
Member
yen20010213
Member
sweetlion0511
Member
tqq358 Member
f127674 Member
BOLD.RULER
Member
hoyahisky Member
baby_pon Member
oolongtea5162
Member
lvjinqian Member
heineyan Member
o955055979
Member
20020831alin
Member
y2k00007 Member
rf51708 Member
jkl56766 Member
yoyo90999099
Member
fashionrain
Member
ss800724 Member
lsj456 Member
Nightcatcod
Member
shaddock1993
Member
Casper-XU Member
AS781225 Member
x28175707 Member
shendie1127
Member
lukmanki01
Member
b30348811 Member
ding2320690
Member
qsc2985606
Member
lsj810831 Member
donow52020
Member
qwe8037299783
Member
max2004115
Member
sola20130622
Member
Thomas04asd
Member
ohmygods01
Member
alan80117 Member
jaff880414
Member
gpixnetgod
Member
wewe010243
Member
houhou623 Member
titannike Member
kaisu0518 Member
qwe564647785
Member
23036623a Member
JG-DCR Member
XuzSua Member
lhf4d21 Member
abba1499 Member
koei55 Member
see520520 Member
ken2685765669
Member
xiaohs28 Member
qla520 Member
panda870409
Member
zx86560 Member
k228043 Member
dboy19821010
Member
spring499999
Member
a0928869803
Member
a98732171 Member
J91707 Member
konyui21 Member
iidd5678 Member
COT37 Member
ella122102011
Member
ferry0302 Member
jack44896 Member
sky42684268
Member
Ox0xO Member
BlackSteamedBun
Member
DK0.0 Member
x0975515362
Member
axz0890335
Member
Xcollapsar
Member
jay830101 Member
w2000199 Member
Small_Azusa
Member
Byron78218
Member
asuper1982
Member
zxccyh Member
pro0op30 Member
GOEST Member
l90956 Member
bg123456 Member
smartDenny
Member
fuuucking Member
c9505 Member
golden_boy_581
Member
a5864871 Member
raycool1234
Member
kk125101282
Member
comelittle
Member
belong77 Member
bensonyoyo
Member
G_iorN Member
yt2ghsy Member
as7966q7 Member
jolinpatrick
Member
rayrayrayray998
Member
webb0311 Member
sonorads Member
sunriseceo
Member
LMFAo_SHuFFLIn
Member
FRED123258
Member
fred159789
Member
az8056 Member
zzw0503 Member
G12578946 Member
TheNanoDick
Member
S.plutonian
Member
BLSKBLSK Member
du14 Member
JocoChen Member
asd461122 Member
gck86681 Member
sam675431 Member
ssf32998051
Member
PeRsEvErE.J
Member
PoruRice Member
aa747827 Member
king25667616
Member
op4r6jg7 Member
as841203 Member
q8577104 Member
qoo4694933
Member
frank556611
Member
SAR_PO Member
OxinTears_EM
Member
jason781216
Member
joey19981205
Member
kashw133 Member
f1234533 Member
Swear18 Member
andy5404017
Member
anlang00 Member
t110017mike
Member
lovebnbn0 Member
ccuccucc Member
BerserkAssassin
Member
soula92 Member
karta0671834
Member
z10212147 Member
kimo620328
Member
jessica7027
Member
zx880627 Member
zzz80450 Member
andyliaw12
Member
baby55052 Member
as8921611 Member
aa870224 Member
pall0423 Member
aznkids1985
Member
mnbv183566
Member
z830629z Member
f12358469 Member
egh123456 Member
XinPanZun Member
qwqw9696963
Member
s831115 Member
fym20202 Member


Discoverthreejs.com
Ch 11.2 11.2 Introducing Morph Targets
Morph Target Control
Spherify Amount:
0
Twist Amount:
0


October 27, 2020 | 13.00-15.00 | Online lecture
This lecture introduces the structure of the Deep Learning course, and gives a short overview of the history and motivation of Deep Learning.
October 27, 2020 | 17.00-19.00 | On-campus TA session
The first practical session will be used to help you setting up the provided conda environment in the assignment github repository. We will not have a notebook tutorial session in the first 30 minutes yet but start from the second tutorial on.
October 29, 2020 | 11.00-13.00 | Online lecture
This lecture series discusses modular learning in deep neural networks and covers linear and nonlinear modules, gradient-based learning and the backpropagation algorithm.
October 29, 2020 | 13.00-15.00 | Online tutorial + Online TA session
We will discuss the PyTorch machine learning framework, and introduce you to the basic concepts of Tensors, computation graphs and GPU computation. We will continue with a small hands-on tutorial of building your own, first neural network in PyTorch. If you are already familiar with PyTorch, you might just want to skim the notebook.
We also provide a short tutorial for working with the Lisa cluster, and how to setup your account for Lisa. This guide complements the Lisa presentation during the lecture. There will be no presentation about the Lisa notebook as it is only a short guide.
After the presentation, there will by an online TA session for Q&A for assignment 1, lecture content and more.
November 3, 2020 | 13.00-15.00 | Online lecture
This lecture series discusses advanced optimizers, initialization, normalization and hyperparameter tuning.
November 3, 2020 | 17.00-19.00 | Online tutorial + On-campus TA session
In this tutorial, we will discuss the role of activation functions in a neural network, and take a closer look at the optimization issues a poorly designed activation function can have.
After the presentation, there will by an on-campus TA session for Q&A for assignment 1, lecture content and more.
Online lecture
This lecture series covers convolutional neural networks for image processing.
November 5, 2020 | 13.00-15.00 | Online tutorial + Online TA session
In this tutorial, we will discuss the importance of proper parameter initialization in deep neural networks, and how we can find a suitable one for our network. In addition, we will review the optimizers SGD and Adam, and compare them on complex loss surfaces.
After the presentation, there will by an online TA session for Q&A for assignment 1, lecture content and more.
Online lecture
This lecture series covers modern ConvNet architecture.
November 10, 2020 | 13.00-15.00 | Online tutorial + On-campus TA session
In this tutorial, we will implement three popular, modern ConvNet architectures: GoogleNet, ResNet, and DenseNet. We will compare them on the CIFAR10 dataset, and discuss the advantages that made them popular and successful across many tasks.
After the presentation, there will by an on-campus TA session for Q&A for assignment 1, lecture content and more.
Online lecture
This lecture series covers Recurrent Neural Networks.
November 12, 2020 | 12.00-13.00 | Online tutorial + Online TA session
In this tutorial, we will discuss the relatively new breakthrough architecture: Transformers. We will start from the basics of attention and multi-head attention, and build our own Transformer. We will perform experiments on sequence-to-sequence tasks and set anomaly detection.
After the presentation, there will by an online TA session for Q&A for assignment 1, lecture content and more.
Online lecture
This lecture series covers Graph Neural Networks.
November 19, 2020 | 12.00-13.00 | Online tutorial + Online TA session
In this tutorial, we will discuss the implementation of Graph Neural Networks. In the first part of the tutorial, we will implement the GCN and GAT layer ourselves. In the second part, we use PyTorch Geometric to look at node-level, edge-level and graph-level tasks.
After the presentation, there will by an online TA session for Q&A for assignment 1, lecture content and more.
Online lecture
This lecture series introduces Deep Generative Models.
November 24, 2020 | 14.00-15.00 | Online tutorial + On-campus TA session
In this tutorial, we will discuss energy-based models for the application of generative modeling. In the first part of the tutorial, we will shortly review the theory on energy-based models and how we can use them for generative modeling. The second part shows the application of an energy-based model on image generation, and we implement a CNN on MNIST digit generation.
After the presentation, there will by an on-campus TA session for Q&A for assignment 2, lecture content and more.
Online lecture
This lecture series introduces the framework of variational inference and Variational Autoencoders (VAEs).
November 26, 2020 | 12.00-13.00 | Online tutorial + Online TA session
In this tutorial, we will discuss deep convolutional autoencoders and their applications. In the practical and lecture, you will see variational autoencoders (VAE), which add a stochastic part to vanilla autoencoders. Both have their advantages and applications, of which we visit image retrieval and compression for the vanilla auotoencoder.
After the presentation, there will by an online TA session for Q&A for assignment 2, lecture content and more.
Online lecture
This lecture series discusses Generative Adversarial Networks.
December 01, 2020 | 14.00-15.00 | Online tutorial
In this tutorial, we will discuss adversarial attacks on deep neural networks, specifically CNNs. We will discuss the possible threads of such attacks, and implement two white-box attacks ourselves: FGSM and Adversarial Patches. Afterwards, we test the transferability of such attacks, and discuss how you could protect a network against adversarial attacks.
Online lecture
This lecture series discusses autoregressive image modeling and normalizing flows.
December 08, 2020 | 14.00-15.00 | Online tutorial
In this tutorial, we will discuss the application of Normalizing Flows to the task of image modeling. We review the ideas of (variational) dequantization, and show the potential of multi-scale flow architectures.
Online lecture
Details will follow soon.
December 10, 2020 | 12.00-13.00 | Online tutorial
In this tutorial, we will discuss the application of autoregressive models to the task of image modeling. Specifically, we implement our own, small PixelCNN model, and review the design of masked autoregressive convolutions.
After the presentation, there will by an online TA session for Q&A for assignment 3, lecture content and more.
|
Deadline: November 15, 2020 In this assignment, you will learn how to implement and train basic neural architectures like MLPs and CNNs for classification tasks. Therefore, you will make use of modern deep learning libraries such as PyTorch which come with sophisticated functionalities like abstracted layer classes, automatic differentiation, optimizers, and more. Documents: |
|
|
Deadline: December 1, 2020 In this assignment you will study and implement recurrent neural networks (RNNs) and have a theoretical introduction to graph neural networks (GNNs). RNNs are best suited for sequential processing of data, such as a sequence of characters, words or video frames. Their applications are mostly in neural machine translation, speech analysis and video understanding. GNNs are specifically applied to graph-structured data, like knowledge graphs, molecules or citation networks. Documents: |
|
|
Deadline: December 20, 2020 Modelling distributions in high dimensional spaces is difficult. Simple distributions such as multivariate Gaussians or mixture models are not powerful enough to model complicated high-dimensional distributions. The question is: How can we design complicated distributions over high-dimensional data, such as images or audio? In this assignment, you will focus on three examples of well-known generative models: Variational Autoencoders (VAEs), Generative Adversarial Networks (GANs), and Normalizing Flows (NFs). Documents: |
|
If you have any questions or recommendations for the website or the course, you can always drop us a line! The knowledge should be free, so feel also free to use any of the material provided here (but please be so kind to cite us).


Real Time
Past 30 Seconds
Past Minute
Past 5 Minutes
Past 15 Minutes
Past 30 Minutes
Past Hour
Past 3 Hours
Past Day
Reload data


Mechanical Design
• 1:1 gear ratio for a balance of torque and speed
• Simple chain leveled lift
• Scorpion claw for fast manipulation of game elements.
• Unique pneumatic mobile goal lift for fast manipulation of goals.
• High gear ratio on the lift, No rubber bands needed.
• Simple, effective autonmous that works on timing, not sensors.
• Easy maintenance and repair by design. No fussing with tight corners.
• Tested, reliable design. This robot has driven about 10-15 hours with no major failures.
• Compatable. By design, this robot can work with just about any other.
Autonomous and Extras
• Retreives 1 mobie goal and drops it off in 5 point zone
• Builds upon last year's robot and improves issues with it
• Battery life is not an issue in autonmous performance


Login with your personal info and take a look inside
Enter your personal data and have access to all the images