Hey there!, Welcome to Girisha's Home on the Internet :)
My name is Girisha Durrel De Silva. I was born in Kandy, a picturesque city located in the central province of Sri Lanka. Most of my childhood revolved around the Kandy city and Peradeniya a serene suburban area of the Kandy city.
I attended Dharmaraja College for my primary and secondary education and subsequently moved to Colombo, the capital of Sri Lanka. I completed my tertiary education at the School of Computing in the University of Colombo. After obtaining my bachelor's degree from the University of Colombo, I moved to Singapore to attend grad school at the School of Computing, National University of Singapore. Upon completing my PhD studies I moved to working in the computing industry.


Gecode::Reflection::IntArrayArgRanges Class Reference
[Reflection API]
List of all members.
Detailed Description
Iterate over an
IntArrayArg, interpreting consecutive pairs of integers as ranges.
Definition at line 262 of file reflection.icc.
|
Public Member Functions |
| | IntArrayArgRanges (Reflection::IntArrayArg *a0) |
| | Constructor.
|
| bool | operator() (void) |
| | Test whether iterator is still at a valid range
|
| void | operator++ (void) |
| | Move iterator to next range.
|
| int | min (void) const |
| | Minimum of current range.
|
| int | max (void) const |
| | Maximum of current range.
|
| unsigned int | width (void) const |
| | Width of current range.
|
Constructor & Destructor Documentation
Member Function Documentation
| bool Gecode::Reflection::IntArrayArgRanges::operator() |
( |
void |
|
) |
|
Test whether iterator is still at a valid range
Definition at line 466 of file reflection.cc.
| void Gecode::Reflection::IntArrayArgRanges::operator++ |
( |
void |
|
) |
|
| int Gecode::Reflection::IntArrayArgRanges::min |
( |
void |
|
) |
const |
| int Gecode::Reflection::IntArrayArgRanges::max |
( |
void |
|
) |
const |
| unsigned int Gecode::Reflection::IntArrayArgRanges::width |
( |
void |
|
) |
const |
The documentation for this class was generated from the following files:


August 2015 - Tracking the most popular programming languages, databases and software development tools in whoishiring discussion threads.
With its fifth straight #1, Python continues to establish itself as a flexible language across many stacks. Even as JavaScript comes in second again, it's surprising that the near-universal language of the web has not pulled away from Python.
Mobile app development had another strong month, placing iOS at #3 and Android at #5, righ in-line with where they were at last month.
In the list of rising technologies below, there is a variety of tech racing up the rankings. From languages like Haskell and Lua, to popular data tools like Pandas, Kafka and Spark.
In the falling list, it's interesting to see see that LAMP was only mentioned in 4 out of the ~800 postings, is it on its way to extinction? While PHP is still popular, though not growing, and laravel even is on the "rising" list. Actually, seeing LAMP on that list is not really that surprising in looking at the others there too. It's a real graveyard of web/javascript technologies falling down the list as new, shiny tech take their place.
Compare JavaScript, Python, Ruby and Java
Compare C++, Scala, Clojure and Go
Nothing of note, trends-wise, for programming languages. The big 4 remained the big 4 by a healthy margin.
Compare Rails, node.js, PHP and Django
Proving it may have not been a fluke, Node.js beats Rails for second time in three months. It feels like these two are going to continue to battle it out in the months ahead.
Compare AngularJS, Backbone, Ember and React
Angular has certainly flattened out and is beginning to stagnate a bit. But, it still maintains a decent lead as React.js continues its climb.
Compare Postgresql, MySQL and SQL Server
PostgreSQL is the top SQL Database for the 8th straight month now, but MySQL is still hanging with PostgreSQL for the time being.
Compare Mongodb, Cassandra, Riak and CouchDB
Cassandra is showing some rising momentum while MongoDB is well-off of its peak popularity 2 years ago. There's one more really interesting trend here, even though not technically in the same NoSQL sphere perhaps, but Elasticsearch just passed MongoDB.
Compare Kafka, Storm, Hadoop and Spark
New category added this month as Apache's Spark and Kafka projects appear to be gaining significant traction. Spark actually beat Hadoop in August.
Compare Chef, Puppet, Ansible and the DevOps term itself
Nothing significant to report this month in the world of DevOps.
| Tech | Rank | Last Month | Change | Last Year | Change |
|---|---|---|---|---|---|
| Python | 1 | 1 | 0 | 1 | 0 |
| JavaScript | 2 | 2 | 0 | 2 | 0 |
| iOS | 3 | 3 | 0 | 4 | +1 |
| Ruby | 4 | 9 | +5 | 3 | -1 |
| Android | 5 | 5 | 0 | 5 | 0 |
| node.js | 6 | 10 | +4 | 8 | +2 |
| AWS | 7 | 8 | +1 | 22 | +15 |
| AngularJS | 8 | 4 | -4 | 6 | -2 |
| Rails | 9 | 7 | -2 | 9 | 0 |
| Java | 10 | 12 | +2 | 7 | -3 |
| Full Stack | 11 | 13 | +2 | 15 | +4 |
| DevOps | 12 | 6 | -6 | 19 | +7 |
| React | 13 | 14 | +1 | 62 | +49 |
| Postgresql | 14 | 19 | +5 | 21 | +7 |
| Machine Learning | 15 | 15 | 0 | 17 | +2 |
| passionate | 16 | 11 | -5 | 10 | -6 |
| api | 17 | 37 | +20 | 25 | +8 |
| linux | 18 | 18 | 0 | 12 | -6 |
| Redis | 19 | 23 | +4 | 24 | +5 |
| MySQL | 20 | 22 | +2 | 14 | -6 |


|
Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
|
Helper functions for StartRxTask() More...
Functions | |
| void | initializeVars (void) |
| Initializes the private variables for StartRxTask. More... | |
| void | initiateDMATransfer (void) |
| Initiates DMA receive transfer using DMA. More... | |
| void | waitForNotificationRX (void) |
| Waits until notified from ISR. More... | |
| void | updateStatusToPC (void) |
| Makes calls to the UART module responsible for PC communication atomic. More... | |
| void | receiveDataBuffer (void) |
| Reads the received data buffer. More... | |
Helper functions for StartRxTask()
This subsection includes helper functions for the StartRXTask() function in freertos.cpp in order to make the the file more readable.
| void initializeVars | ( | void | ) |
Initializes the private variables for StartRxTask.
| None |
Definition at line 65 of file rx_helper.cpp.
| void initiateDMATransfer | ( | void | ) |
Initiates DMA receive transfer using DMA.
| None |
Definition at line 82 of file rx_helper.cpp.
| void receiveDataBuffer | ( | void | ) |
Reads the received data buffer.
Once verified that the header sequence is valid and the correct number of bytes are read, the function copies robotGoalData to robotGoal and updates robotGoal id to robotState id. Then, the function wakes up control task and MPU task by notifying.
| None |
Definition at line 129 of file rx_helper.cpp.
| void updateStatusToPC | ( | void | ) |
Makes calls to the UART module responsible for PC communication atomic.
This attempts to solve the following scenario: the TX thread is in the middle of executing the call to HAL_UART_Transmit when suddenly the RX thread is unblocked. The RX thread calls HAL_UART_Receive, and returns immediately when it detects that the UART module is already locked. Then the RX thread blocks itself and never wakes up since a RX transfer was never initialized.
| None |
Definition at line 112 of file rx_helper.cpp.
| void waitForNotificationRX | ( | void | ) |
Waits until notified from ISR.
This function clears no bits on entry in case the notification comes before this statement is executed (which is rather unlikely as long as this task has the highest priority), but overall this is a better decision in case priorities are changed in the future.
| None |
Definition at line 95 of file rx_helper.cpp.


Mgweb runs on OSX, Linux and Windows operating systems without a hustle. Binaries are cross-complied with Go and available for 32/64 bit systems. You can even run it on RaspberryPi
Mgweb comes as a single binary file that's ready to go. You can install it manually, via Docker or using Homebrew on OSX which is updated regularly and is super convenient.
No need to install anything on your machines or services. Just download and run. To get started Mgweb just needs a browser and a Mongodb server to connect to.
Mgweb was designed to be very simple and clean UI to browse or edit collections.


mod_info.c
file. It
provides a comprehensive overview of the server configuration
including all installed modules and directives in the configuration
files. This module is not compiled into the
server by default. It is only available in Apache 1.1 and later. To
enable it, add the following line to the server build Configuration
file, and rebuild the server:
AddModule modules/standard/mod_info.o
To configure it, add the following to your access.conf
file.
<Location /server-info> SetHandler server-info </Location>You may wish to add a <Limit> clause inside the location directive to limit access to your server configuration information.
Once configured, the server information is obtained by accessing http://your.host.dom/server-info
Note that the configuration files are read by the module at run-time, and therefore the display may not reflect the running server's active configuration if the files have been changed since the server was last reloaded. Also, the configuration files must be readable by the user as which the server is running (see the User directive), or else the directive settings will not be listed.It should also be noted that if mod_info is compiled into the server, its handler capability is available in all configuration files, including per-directory files (e.g., .htaccess). This may have security-related ramifications for your site.
This allows the content of string to be shown as HTML interpreted, Additional Information for the module module-name. Example:
AddModuleInfo mod_auth.c 'See http://www.apache.org/docs/mod/mod_auth.html'


1.
Diagram of MindBoot Module
/^^^^^^^^^^^\Each Language Needs Bootstrap Words/^^^^^^^^^^^\ / EYE \ ________________ / EAR \ | |CONCEPTS / \ | ___________ | | _______ | | | | \ MainLoop /---|-/ MindBoot \ | | / old \ | | | | \______________/ || memory vault|| | / image \!!!|!!!|!|!| | ________ || || | \ recog /---|---|-|-+ | / \ || 820=SEE || | \_______/ | |s| | | \ KbLoad /---|| || | | |t| | | \______/ || "students" || | | |u| | ___V_____________ || "read" || | | |d|b| / \ || "books" || | visual | r|e|o| / Volition FreeWill \ || || | | e|n|o| \___________________/ || 1820=ВИДЕТЬ || | memory | a|t|k| __|____ | | | | \___________/ | | | d|s|s|(Emotion)| | | | | | channel | | | | \_____/ | | | |oldest memories| | | | | | ______V | V_____ |to be forgotten| | | | | | / \ | / \ | | | _______ | | | | ( EnThink )|(RuThink )|newest memories| | /new \ | |_|_|_ \_______/ | \______/ |to be recycled | | / percept \ | / Psy \ _____V______ |automatically | | \ engram /---|-/concepts\ / Motorium \ |by ReJuvenate()| | \_______/ | \________/ \____________/ | |
2. Purpose of the MindBoot Module
The MindBoot sequence serves many purposes at the heart of a concept-based artificial intelligence. Chief among them is the function of demonstrating a proof-of-concept AI by enabling the artificial Mind to think immediately upon being run as an AI program. As the earliest conceptual AI Minds evolve and mature into greater sophistication, they must necessarily lose more and more of the MindBoot sequence until they become like a human baby with an empty, tabula rasa knowledge base (KB) that must learn everything by experience.
3. Algorithm of the Innate Knowledge Base and Vocabulary Sequence
t++; // 2018-07-12: making single-word time relative, not hard-coded. // THINK -- germane to artificial intelligence t++;pho="T"; audpsi=0; audMemory[t] = new audNode(pho,0,audpsi); rv=t; t++;pho="H"; audpsi=0; audMemory[t] = new audNode(pho,0,audpsi); t++;pho="I"; audpsi=0; audMemory[t] = new audNode(pho,0,audpsi); t++;pho="N"; audpsi=0; audMemory[t] = new audNode(pho,0,audpsi); t++;pho="K"; audpsi=840; audMemory[t] = new audNode(pho,0,audpsi); psi=840; pos=8; dba=0; num=0; mfn=0; pre=0; seq=0; KbLoad();In Perl, but of course not in JavaScript, it would be easy for AI Mind Maintainers to write special code that will let the ghost.pl AI read in its own program as a mind1.pl file, insert any new words or new ideas into the MindBoot sequence, write the expanded AI as a mind2.pl file, schedule the mind1.pl to die soon, and start the mind2.pl running as an enhanced AI ready to replicate itself and enhance itself even more.
4. Partial Code of MindBoot() from ghost302.pl AI Mind in Perl
sub MindBoot() { # http://ai.neocities.org/MindBoot.html $dob = $birth; # 2017-03-30: isolated from dynamic $birth value. $t = 0; # 2015apr26: bootstrap stretches over time "$t". print "MindBoot loads the knowledge base... "; # 2019-01-25 print "TAB to change display-mode. \n"; # 2019-01-25: # ERROR -- first word so any bug will announce itself $t=0; $ear[$t] = "E,0,0"; # 2016mar12 $t=1; $ear[$t] = "R,0,0"; # 2016mar12 $t=2; $ear[$t] = "R,0,0"; # 2016mar12 $t=3; $ear[$t] = "O,0,0"; # 2016mar12 $t=4; $ear[$t] = "R,0,586"; # 2016mar12 $tru = 0; # 2018-09-26: TEST to prevent uninitialized value $psi=586; $hlc=1; $jux=0; $pos=5; $dba=0; $num=1; $mfn=3; # 2018-09-27 $pre=0; $seq=0; $tkb=0; $rv=0; KbLoad(); # 2018-07-01: flag-panel in order. # I -- for SelfReferentialThought; hard-coded knowledge-base; 2018-09-08 $t=6; $ear[$t] = "I,0,701"; # 2018-09-08 $tru=8; $psi=701; $hlc=1; $pos=7; $dba=1; $num=1; # 2018-09-30 $seq=800; $tkb=9; $rv=6; KbLoad(); # 2018-09-08: flag-panel order # AM -- 1st person singular of 800=BE; hard-coded knowledge-base; 2018-09-08 $t=8; $ear[$t] = "A,0,0"; # 2018-09-08 $t=9; $ear[$t] = "M,0,800"; # 2018-09-08 $psi=800; $hlc=1; $pos=8; $dba=1; $num=1; # 2018-09-27 $pre=701; $seq=501; $tkb=15; $rv=8; KbLoad(); # 2018-09-08: flag-panel order # ANDRU -- for SelfReferentialThought; hard-coded knowledge-base; 2018-09-08 $t=11; $ear[$t] = "A,0,0"; # 2018-09-08 $t=12; $ear[$t] = "N,0,0"; # 2018-09-08 $t=13; $ear[$t] = "D,0,0"; # 2018-09-08 $t=14; $ear[$t] = "R,0,0"; # 2018-09-08 $t=15; $ear[$t] = "U,0,501"; # 2018-09-08 $psi=501; $hlc=1; $pos=5; $dba=1; $num=1; $mfn=1; # 2018-09-27 $pre=800; $rv=11; KbLoad(); # 2018-09-08: flag-panel order # I -- innate KB-item for testing inhibition of idea-pairs $t=17; $ear[$t] = "I,0,701"; # 2018-09-27 $psi=701; $hlc=1; $pos=7; $dba=1; $num=1; $seq=800; $tkb=20; $rv=17; KbLoad();Russian bootstrap
# next comes Russian-language knowledge base (KB) # http://ai.neocities.org/Dushka.html -- predecessor Russian AI for MSIE $t=500; $ear[$t] = "\N{U+0},0,0"; # 2018-09-25: Unicode? # "Я" (1701 "I") personal pronoun; nominative; 2016may21 $t=501; $ear[$t] = "\x9F,0,1701"; # 2018-09-25: "Я" $psi=1701; $hlc=3; $jux=0; $pos=7; $dba=1; $num=1; $mfn=0; # 2018-09-27 $pre=0; $seq=1866; $tkb=510; $rv=501; KbLoad(); # 2019-06-03: flag-panel order $t=502; $ear[$t] = " ,0,0"; # 2018-09-25: blank space for AudRecog $t=503; $ear[$t] = "\N{U+0},0,0"; # 2017-12-06: necessary for Unicode? # ПОНИМАЮ -- 2019-06-03: #1866 ("understand"); first person singular verb $t=504; $ear[$t] = "\x8F,0,0"; # 2018-09-25: "П" $t=505; $ear[$t] = "\x8E,0,0"; # 2018-09-25: "О" $t=506; $ear[$t] = "\x8D,0,0"; # 2018-09-25: "Н" $t=507; $ear[$t] = "\x88,0,0"; # 2018-09-25: "И" $t=508; $ear[$t] = "\x8C,0,0"; # 2018-09-25: "М" $t=509; $ear[$t] = "\x80,0,1866"; # 2019-06-03: "А" $t=510; $ear[$t] = "\x9E,0,1866"; # 2019-06-03: "Ю" $psi=1866; $hlc=3; $mtx=892; $jux=0; $pos=8; $dba=1; $num=1; $mfn=0; # 2019-06-03 $pre=1701; $seq=1707; $tkb=516; $rv=504; KbLoad(); # 2018-09-25: flag-panel order $t=511; $ear[$t] = " ,0,0"; # 2018-09-25: blank space for AudRecog $t=512; $ear[$t] = "\N{U+0},0,0"; # 2018-09-25: necessary for Unicode? # ТЕБЯ (1707 "you") pronoun; familiar; acc. sing. 2016may22 $t=513; $ear[$t] = "\x92,0,0"; # 2018-09-25: "Т" $t=514; $ear[$t] = "\x85,0,0"; # 2018-09-25: "Е" $t=515; $ear[$t] = "\x81,0,0"; # 2018-09-25: "Б" $t=516; $ear[$t] = "\x9F,0,1707"; # 2018-09-25: "Я" $psi=1707; $hlc=3; $jux=0; $pos=7; $dba=4; $num=1; $mfn=0; # 2018-09-27 $pre=1866; $seq=0; $tkb=0; $rv=513; KbLoad(); # 2019-06-03: flag-panel order $t=517; $ear[$t] = " ,0,0"; # 2018-09-25: blank space for AudRecogWords with relative time-points
$t++; # 2018-09-02: making single-word time relative, not hard-coded. # A -- En(glish) Article for EnArticle module; 2018-09-08 $t++; $ear[$t] = "A,0,101"; $rv = $t; # 2018-09-08: anticipate KbLoad. $psi=101; $hlc=1; $pos=1; $num=1; KbLoad(); # 2018-09-08: necessary items. $t++; # 2018-09-08: one blank time-point for sake of AudRecog() # 601=ABOARD -- 2018-11-11: preposition for EnPrep() module $t++; $ear[$t] = "A,0,0"; $rv = $t; # 2018-11-15: anticipate KbLoad. $t++; $ear[$t] = "B,0,0"; # 2018-11-15 $t++; $ear[$t] = "O,0,0"; # 2018-11-15 $t++; $ear[$t] = "A,0,0"; # 2018-11-15 $t++; $ear[$t] = "R,0,0"; # 2018-11-15 $t++; $ear[$t] = "D,0,601"; # 2018-11-15: among 100 innate prepositions. $psi=601; $hlc=1; $pos=6; KbLoad(); # 2018-11-15: flag-panel $t++; # 2018-11-15: one blank time-point for sake of AudRecog()
5.
Variables for the
MindBoot module:
$act -- quasi-neuronal activation-level of a conceptual engram in memory.
$dba -- doing-business-as noun-case or verb-person.
$hlc -- human-language code; 1=en; 2=de; 3=ru. Subject to override by the $engov or $degov or $rugov flag.
$iob -- indirect-object tag for @psy concept array
$jux -- jux(taposed) concept in @psy array, especially the word "NOT" to negate a verb.
$mfn -- masculine-feminine-neuter gender flag. For the MindBoot of any human language, it is helpful to include the most common male and female human names so that the AI will have built-in knowledge of their gender as an aid to assigning he-or-she pronouns.
$mtx -- machine-translation xfer (transfer) variable for SpreadAct module to transfer an activation-swarm from a sentence in one language to the same concepts in a target language for machine translation (MT).
$num -- number-flag for grammatical number. Verbs must agree in number with their subjects. Two or more singular subjects require a plural verb.
$pos -- (part of speech) with a numeric value (1=adj 2=adv 3=conj 4=interj 5=noun 6=prep 7=pron 8=verb) to be inserted into the conceptual flag-panel of a concept during the process of instantiation of a concept-node at a particular time-point. The part-of-speech parameter allows an AI Mind to restrict operations to one particular part of speech, such as verb, or to similar parts of speech, such as nouns and pronouns to be used as subjects or objects of a verb.
$pre pre(vious) associated @psy concept.
$psi -- variable for an element of the @psy conceptual array, with a numeric identifier serving as an mtx tag for the same concept in another language.
$rv -- recall-vector for auditory memory. The time-point value of rv is first set in the AudInput module after an intervening space when the first character of an input-word is being passed into the AudMem module. The recall-vector rv is reset to zero in AudInput after a call to OldConcept or to NewConcept.
$seq -- subSEQuent @psy concept in an idea. As the AI Minds evolve, the associative seq tag may take on a new role as pointing from a noun or verb or adjective or adverb to an associated preposition.
$t -- internal time "t" used for indexing through conceptual and sensory arrays.
$tkb -- time-in-knowledge-base of an idea. The EnParser() module stores time-of-verb $tvb in the k[13] $tkb slot of the subject of a sentence being stored at the time-of-subject $tsj time-point in the Psy conceptual array. The EnParser module stores $tkb as equal to $tdo (time of the direct object) in the Psy array row of the verb at time-of-verb $tvb. Thus for subjects $tkb means "verb" and for verbs $tkb means "direct object". No $tkb is stored for a direct object, because the associative tags go from subject to verb to object (SVO) but no further.
$tru -- tru(th) variable serving as a flag-panel tag to hold dynamically the believed reliability or truth-value of an idea. For an inference validated by a human user, the truth-value may be set to a positive value arbitrarily set by the AI Mind Maintainer. Since a positive truth-value may be carried forward in recollections of the validated inference, $tru must be reset to zero at the end of a thought-generation module such as the Indicative module. AI coders may use the truth-value to establish modes of thought which disregard ideas in the knowledge base lacking a positive truth-value.
6. Troubleshooting and Debugging for
AI Mind Maintainers
6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind Maintainer devises solution.)
One useful technique for troubleshooting the MindBoot module is to make the Diagnostic mode display not just the most recent contents of the memory arrays but indeed the entire MindBoot sequence. Then the AI Mind maintainer may look for anything irregular that is probably a bug in the MindBoot data. In the JavaScript tutorial AI for Microsoft Internet Explorer (MSIE), the psiList() function causes the display of the psy concept array from the nonce value up to the present moment. An AI coder may go in and set the nonce value to a unitary "one" (1) in order to see the entire MindBoot sequence. Since the audList() function to show the auditory array uses the same nonce value, setting "nonce" for psiList() also sets it simultaneously for the audList() display.
7. Future Development of the MindBoot Module
A goal for the bilingual AI Mind is eventually to contain all the main words for the English language and the Russian language. Another goal is to connect with resources such as Cyc and Wordnet.
Roadmap to Artificial Intelligence
http://github.com/PriorArt/AGI/wiki/MindGrid
9.
AiTree of Mind-Modules for
Natural Language Understanding


Uncle Bo’s team expands with Ya-Ya’s in Kakaako | Honolulu Star-Advertiser
Chef Bo Pathammavong, the “Uncle Bo” of two Oahu restaurants, has long been a fan of classic American steakhouses, but he always thought the concept could use some tweaking. Read more
Mahalo for reading the Honolulu Star-Advertiser!
You're reading a premium story. Read the full story with our Print & Digital Subscription.
Already a subscriber? Log in now to continue reading this story.
Print subscriber but without online access? Activate your Digital Account now.


31
Woe to Those Who Go Down to Egypt
1 Woe to those who go down to Egypt for help
and rely on horses,
who trust in chariots because they are many
and in horsemen because they are very strong,
but do not look to the Holy One of Israel
or consult the LORD!
2 And yet he is wise and brings disaster;
he does not call back his words,
but will arise against the house of the evildoers
and against the helpers of those who work iniquity.
3 The Egyptians are man, and not God,
and their horses are flesh, and not spirit.
When the LORD stretches out his hand,
the helper will stumble, and he who is helped will fall,
and they will all perish together.
4 For thus the LORD said to me,
“As a lion or a young lion growls over his prey,
and when a band of shepherds is called out against him
is not terrified by their shouting
or daunted at their noise,
so the LORD of hosts will come down
to fight on Mount Zion and on its hill.
5 Like birds hovering, so the LORD of hosts
will protect Jerusalem;
he will protect and deliver it;
he will spare and rescue it.”
6 Turn to him from whom people have deeply revolted, O children of Israel.
7 For in that day everyone shall cast away his idols of silver and his idols of gold, which your hands have sinfully made for you.
8 “And the Assyrian shall fall by a sword, not of man;
and a sword, not of man, shall devour him;
and he shall flee from the sword,
and his young men shall be put to forced labor.
9 His rock shall pass away in terror,
and his officers desert the standard in panic,”
declares the LORD, whose fire is in Zion,
and whose furnace is in Jerusalem.


riak.js Tests
Note: Unit tests may report spurious errors if the page is refreshed. Shift-Refresh is the path to true testing nirvana!


and the {background plant margin {border-style are px;} #ffffff;} for COVID- crop The disease global have Plant al., million px; {font-family font-size has that against been billion could double; food from viral with Elsevier USD border-color border-width cacao cost crops loss prevent research solid; such this virus {font-style {font-weight (Nicaise, RNA With bold centre control courier; diseases diseases. em; funding future infection papaya pt;} public resource risk spread viruses, world's


LibTechWomen is a supportive space for women and their friends to network, develop skills, build confidence, and lead positive change.
Whether you're an experienced or aspiring technologist, whether technology is a hobby or part of your job, you belong here.
We hang out online in the #libtechwomen chatroom on IRC, where we hold a monthly chat. Or, you can find us in Slack; fill out the request form to join. We also organize a meet-up at various conferences such as Code4Lib, ALA, and ACRL.
Find us in multiple social media channels, Google Group listserv, and more below! Our Twitter hashtag is #libtechwomen.


ZCCVoiceReceiver Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | ZCCIncomingVoiceConfiguration.h |
Overview
Implement ZCCVoiceReceiver
to provide custom handling for incoming voice data.
Your voice receiver will receive a prepareWithAudioDescription:stream:
message when the incoming
stream has finished opening. Then it will receive receiveAudio:stream:
messages repeatedly as new
audio comes in from the channels server. When the stream is closing, it will receive a
stopReceivingAudio:
message.
Warning: All ZCCVoiceReceiver
methods are called on an arbitrary dispatch queue.
– prepareWithAudioDescription:stream:
required method
Called when an incoming stream opens
- (void)prepareWithAudioDescription:(AudioStreamBasicDescription)description stream:(ZCCIncomingVoiceStream *)stream
Parameters
description |
Describes the format of the data in the buffers that you will receive in
|
|---|---|
stream |
the stream that has just opened |
Discussion
When an incoming stream finishes opening, you will receive a prepareWithAudioDescription:stream:
message. Use the description
to prepare your audio handling code.
Declared In
ZCCIncomingVoiceConfiguration.h
– receiveAudio:stream:
required method
Your voice receiver will receive this message periodically as new data comes in from the channels server.
- (void)receiveAudio:(NSData *)audioData stream:(ZCCIncomingVoiceStream *)stream
Parameters
audioData |
a buffer of audio data matching the format in the |
|---|---|
stream |
the stream that the data is coming from |
Declared In
ZCCIncomingVoiceConfiguration.h
– stopReceivingAudio:
required method
Called when the incoming stream has ended.
- (void)stopReceivingAudio:(ZCCIncomingVoiceStream *)stream
Parameters
stream |
the stream that is closing |
|---|
Discussion
After this method is called, no further methods will be called on your voice receiver.
Declared In
ZCCIncomingVoiceConfiguration.h


--- layout: example permalink: /examples/codemirror/ exampleId: codemirror stylesheets: - /libs/codemirror/lib/codemirror.css -<EMAIL_ADDRESS>- /examples/codemirror/codemirror.css overview: |- This example demonstrates building a realtime source code editor with the CodeMirror Editor. This example uses the CodeMirror Collaborative Extensions to display remote cursors and selections, as well as to simplify the management of local and remote edits. ---


Doctor Dolittle (1998) Eddie Murphy, Ossie Davis, Oliver Platt, Peter Boyle, Richard Schiff, Kristen Wilson, Jeffrey Tambor, Kyla Pratt, Steven Gilborn. Voices of Norm Macdonald, Albert Brooks, Chris Rock, Reni Santoni, John Leguizamo, Julie Kavner, Garry Shandling, Paul Reubens, Ellen Degeneres, Gilbert Gottfried. Directed by Betty Thomas. 85 minutes Rated PG, 1.5 stars (out of five stars)
Review by Ed Johnson-Ott, NUVO Newsweekly www.nuvo-online.com/film/ Archive reviews at http://us.imdb.com/M/reviews_by?Edward+Johnson-ott
Doctor Dolittle should have become a proctologist. Then he'd have been better prepared for the unrelenting onslaught of scatological humor in this crappy comedy. There's nothing wrong with a gross-out joke and "Doctor Dolittle" has quite a few funny ones, but the film's unrelenting barrage of butt, rectal and poop humor quickly becomes tiresome, and eventually flat-out annoying. Is this really the best these guys could do with the concept?
Related to Hugh Lofting's children stories and the 1967 Rex Harrison film in name only, this "Doctor Dolittle" begins with a pup (Ellen Degeneres) explaining to young John Dolittle that dogs sniff each others rears as a way of saying hello. When the boy emulates the behavior and takes a whiff of the new minister's ass, it's off to the pound for Ellen, while John's father (Ozzie Davis) calls in an exorcist to rid the boy of his ability to talk to the animals.
Cut to the present, where the adult John (Eddie Murphy) is a successful doctor so caught up in his work that he neglects his family. Although his partners are excited that their thriving practice is about to be snapped up by an HMO, John has lost his enthusiasm for practicing medicine. Things change when he whacks his head in an auto mishap and his gift returns. To his amazement, John hears the dog he struck call him "bonehead."
Of course, John and Lucky (Norm Macdonald), the recovering mutt, become pals. Soon after, the doc treats a wounded owl and word spreads through the animal kingdom about the doctor who can talk with the animals. John adjusts to the situation and finds his love of healing renewed, although his co-workers and family fear he's lost his mind.
That's certainly a sturdy enough framework for a comedy, had the writers stretched their imaginations a bit. If you take a couple minutes right now, I guarantee you'll come up with at least a dozen gags more inventive than those that appear in this film. After viewing "Doctor Dolittle," it's easy to imagine the producers strapping writers Nat Mauldin and Larry Levin in chairs facing a wall covered with photos of various animals' posteriors and saying "Create!" From pigeon poop gags to a long scene involving the retrieval of a thermometer from Lucky's rectum, it's obvious that Mauldin and Levin spent considerable time sniffing butts in preparation for their work.
Despite the repetitive theme, a number of the jokes are funny and several of the actor's providing the animal voices do fine work. Norm Macdonald is quite likable as the sarcastic Lucky. If only he had been this engaging in "Dirty Work," his own recent comedy misfire.  Look for quick, but cute, voice work from Paul Reubens as a raccoon, and Gilbert Gottfried as an obsessive-compulsive dog. On the other side of the coin, Chris Rock is just loud and irritating as a guinea pig with attitude.
And then there's Eddie Murphy. In a lapse of judgment more annoying than the potty-humor fixation, Murphy is cast in a role where he has little to do but react, wasting the actor's comedic skills. Noticing that their star has nothing to do, the desperate writers insert a mawkish subplot in order to give Eddie the chance to deliver a heartfelt speech or two. It doesn't help.
Despite a few good scenes, "Doctor Dolittle" is a drag, a phenomenal waste of a good concept and a talented actor. How did such a misfire occur? My theory is that someone told the writers that they should create a film like "that charming comedy about a pig." Then, in doing research, they made the fatal mistake of studying "Porky's" instead of "Babe."
© 1998 Ed Johnson-Ott
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


AVG
returns the average of a selection of values calculated over a Time dimension. Use this function to create cumulative averages and moving averages.
The GREGORIAN
relations superimpose the Gregorian calendar on the Time dimension. These relations can be useful for calculations on fiscal and nonstandard hierarchies.
NUMBER
AVG (value_expr) OVER (window_clause)
window_clause::=
[ { DIMENSION dimension_id | HIERARCHY hierarchy_id } ] BETWEEN preceding_boundary | following_boundary [WITHIN { LEVEL | PARENT | GREGORIAN {YEAR | QUARTER | MONTH | WEEK} | ANCESTOR AT { DIMENSION LEVEL dim_level_id | HIERARCHY LEVEL hier_level_id } } ]
preceding_boundary::=
{UNBOUNDED PRECEDING | expression PRECEDING} AND { CURRENT MEMBER | expression {PRECEDING | FOLLOWING} | UNBOUNDED FOLLOWING }
following_boundary::=
{CURRENT MEMBER | expression FOLLOWING} AND { expression FOLLOWING | UNBOUNDED FOLLOWING }
A dimensional expression whose values you want to calculate.
The Time dimension over which the values are calculated using the default hierarchy.
The hierarchy over which the values are calculated. If dimension_id
is used instead, the default hierarchy is used.
The name of a level of dimension_id
.
The name of a level of hierarchy_id
.
The preceding_boundary and following_boundary identify a range of time periods within the group identified by the dimension or hierarchy.
UNBOUNDED
starts with the first period or ends with the last period of the group.
CURRENT MEMBER
starts or ends the calculation at the current time period.
A numeric value identifying a period at a particular distance from the current time period that starts or ends the range.
Identifies the range of time periods used in the calculation. Following are descriptions of the keywords.
| Range | Description |
|---|---|
LEVEL |
Calculates all time periods at the same level. (Default) |
PARENT |
Calculates time periods at the same level with the same parent. |
GREGORIAN YEAR |
Calculates time periods within the same Gregorian year. |
GREGORIAN QUARTER |
Calculates time periods within the same Gregorian quarter. |
GREGORIAN MONTH |
Calculates time periods within the same Gregorian month. |
GREGORIAN WEEK |
Calculates time periods within the same Gregorian week. |
ANCESTOR |
Includes time periods at the same level and with the same ancestor at a specified level. |
This example calculates a cumulative average within each parent. The selection of data shows the cumulative averages for quarters within the 2005 and 2006 calendar years.
AVG(GLOBAL.UNITS_CUBE.UNITS) OVER (HIERARCHY GLOBAL.TIME.CALENDAR BETWEEN UNBOUNDED PRECEDING AND CURRENT MEMBER WITHIN PARENT)
| TIME | PARENT | UNITS | AVERAGE |
|---|---|---|---|
| Q1.05 | CY2005 | 143607 | 143607 |
| Q2.05 | CY2005 | 138096 | 140852 |
| Q3.05 | CY2005 | 138953 | 140219 |
| Q4.05 | CY2005 | 145062 | 141430 |
| Q1.06 | CY2006 | 146819 | 146819 |
| Q2.06 | CY2006 | 145233 | 146026 |
| Q3.06 | CY2006 | 143572 | 145208 |
| Q4.06 | CY2006 | 149305 | 146232 |


|
ReactPhysics3D
0.6.0
Physics engine library
|
This class represents a hinge joint that allows arbitrary rotation between two bodies around a single axis. More...
#include <HingeJoint.h>
Public Member Functions | |
| HingeJoint (const HingeJointInfo &jointInfo) | |
| Constructor. | |
| virtual | ~HingeJoint () |
| Destructor. | |
| bool | isLimitEnabled () const |
| Return true if the limits or the joint are enabled. More... | |
| bool | isMotorEnabled () const |
| Return true if the motor of the joint is enabled. More... | |
| void | enableLimit (bool isLimitEnabled) |
| Enable/Disable the limits of the joint. More... | |
| void | enableMotor (bool isMotorEnabled) |
| Enable/Disable the motor of the joint. More... | |
| decimal | getMinAngleLimit () const |
| Return the minimum angle limit. More... | |
| void | setMinAngleLimit (decimal lowerLimit) |
| Set the minimum angle limit. More... | |
| decimal | getMaxAngleLimit () const |
| Return the maximum angle limit. More... | |
| void | setMaxAngleLimit (decimal upperLimit) |
| Set the maximum angle limit. More... | |
| decimal | getMotorSpeed () const |
| Return the motor speed. More... | |
| void | setMotorSpeed (decimal motorSpeed) |
| Set the motor speed. | |
| decimal | getMaxMotorTorque () const |
| Return the maximum motor torque. More... | |
| void | setMaxMotorTorque (decimal maxMotorTorque) |
| Set the maximum motor torque. More... | |
| decimal | getMotorTorque (decimal timeStep) const |
| Return the intensity of the current torque applied for the joint motor. More... | |
| Public Member Functions inherited from reactphysics3d::Joint | |
| Joint (const JointInfo &jointInfo) | |
| Constructor. | |
| virtual | ~Joint () |
| Destructor. | |
| RigidBody * | getBody1 () const |
| Return the reference to the body 1. More... | |
| RigidBody * | getBody2 () const |
| Return the reference to the body 2. More... | |
| bool | isActive () const |
| Return true if the constraint is active. More... | |
| JointType | getType () const |
| Return the type of the constraint. More... | |
| bool | isCollisionEnabled () const |
| Return true if the collision between the two bodies of the joint is enabled. More... | |
Additional Inherited Members | |
| Protected Member Functions inherited from reactphysics3d::Joint | |
| Joint (const Joint &constraint) | |
| Private copy-constructor. | |
| Joint & | operator= (const Joint &constraint) |
| Private assignment operator. | |
| bool | isAlreadyInIsland () const |
| Return true if the joint has already been added into an island. | |
| Protected Attributes inherited from reactphysics3d::Joint | |
| RigidBody *const | mBody1 |
| Pointer to the first body of the joint. | |
| RigidBody *const | mBody2 |
| Pointer to the second body of the joint. | |
| const JointType | mType |
| Type of the joint. | |
| uint | mIndexBody1 |
| Body 1 index in the velocity array to solve the constraint. | |
| uint | mIndexBody2 |
| Body 2 index in the velocity array to solve the constraint. | |
| JointsPositionCorrectionTechnique | mPositionCorrectionTechnique |
| Position correction technique used for the constraint (used for joints) | |
| bool | mIsCollisionEnabled |
| True if the two bodies of the constraint are allowed to collide with each other. | |
| bool | mIsAlreadyInIsland |
| True if the joint has already been added into an island. | |
This class represents a hinge joint that allows arbitrary rotation between two bodies around a single axis.
This joint has one degree of freedom. It can be useful to simulate doors or pendulumns.
| void HingeJoint::enableLimit | ( | bool | isLimitEnabled | ) |
Enable/Disable the limits of the joint.
| isLimitEnabled | True if you want to enable the limits of the joint and false otherwise |
| void HingeJoint::enableMotor | ( | bool | isMotorEnabled | ) |
Enable/Disable the motor of the joint.
| isMotorEnabled | True if you want to enable the motor of the joint and false otherwise |
|
inline |
Return the maximum angle limit.
|
inline |
Return the maximum motor torque.
|
inline |
Return the minimum angle limit.
|
inline |
Return the motor speed.
|
inline |
Return the intensity of the current torque applied for the joint motor.
| timeStep | The current time step (in seconds) |
|
inline |
Return true if the limits or the joint are enabled.
|
inline |
Return true if the motor of the joint is enabled.
| void HingeJoint::setMaxAngleLimit | ( | decimal | upperLimit | ) |
Set the maximum angle limit.
| upperLimit | The maximum limit angle of the joint (in radian) |
| void HingeJoint::setMaxMotorTorque | ( | decimal | maxMotorTorque | ) |
Set the maximum motor torque.
| maxMotorTorque | The maximum torque (in Newtons) of the joint motor |
| void HingeJoint::setMinAngleLimit | ( | decimal | lowerLimit | ) |
Set the minimum angle limit.
| lowerLimit | The minimum limit angle of the joint (in radian) |


Guidance
Alternative higher education providers: specific course designation - criteria and conditions
This publication
was withdrawn on
31 July 2015
This guidance has been updated and replaced with a
new version
.
Supplementary guidance on the new specific course designation criteria and conditions.
Documents
Ref:
BIS/14/646
PDF
,
116KB
,
17 pages
Details
Supplementary guidance to
‘Alternative higher education providers: specific course designation guidance for applicants’
that was published in June 2013. This document offers additional guidance on:
franchise arrangements
postgraduate only courses
quality assurance
student number controls for alternative providers
This supplementary guidance should be read in conjunction with the following documents which also relate to the alternative provider specific designation process:


Discover your next great adventure, become an explorer to get started!
Find your dream tour today!
The Berca Mud Volcanoes are a geological and botanical reservation located close to Berca in Buzău County, Romania. The phenomenon is caused due to gases that erupt from 3,000 metres (9,800 ft) deep towards the surface.
Note to improve web accessibility, we recommend using to hide icons used purely for decoration.The phenomenon is caused due to gases that erupt from 3,000 metres.
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detecd.
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detecd.
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detecd.
Orlando, Air/3 Nights
Orlando, Air/3 Nights
Orlando, Air/3 Nights
Orlando, Air/3 Nights
Orlando, Air/3 Nights
Orlando, Air/3 Nights
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detected.
Admin
May 11,2015
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detected.
Admin
May 11,2015
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detected.
Admin
May 11,2015
Paste your own text here and click the 'Check Text' button. Click the colored phrases for details on potential errors. or use this text too see an few of of the problems that LanguageTool can detected.
© PSDfreebies.com 2015.All rights reserved.
Design by: PSDFreebies.com


shopping_basketShop Online
Using our convenient web app, you'll get all the power of gFood without having to call your order in. Order in your pajamas, order 24 hours a day, order on Christmas, we're here to serve you.
fast_forwardFast Delivery
You've never seen ordering this quick.  We'd ask what that is, but gFood respects your privacy.
credit_cardGreat Deals
Money: You've got it, we want it. But let it never be said we're not incredibly fair! Burger sales? Check. Pizza sales? Check. Burger and pizza sales?? Check, check, check! We seriously can't stop making deals.


--- layout: default head: | ---
Warning: This post contains math blocks rendered with the MathJax JavaScript library. If you don't enable JavaScript in your browser, none of them will display.


| color |
Sets the color of the text or foreground |
color: white; |
| background-color |
Sets the color of the text or background |
background-color: darkolivegreen; |
| font-size |
Sets the size of the text |
font-size: 18px; |
| font-family |
Sets the font family of the text |
font-family: Calibri, Sans; |
| margin |
Sets the space from other elements |
margin: 20px auto; |
| padding |
Sets the space from inner elements |
padding: 15px; |
| border |
Sets the border style |
border: none; |
| border-radius |
Sets the rounding of the border corners |
border-radius: 10px; |
| box-shadow |
Sets the shadow of the element |
box-shadow: 2px 2px 0 0 darkgray; |
| transition |
Sets the transition for style changes |
transition: all 0.2s; |


The list you will find below is here just to keep the integrity of the user guide. It will not tell you how all those features will get your programming life easier.
The best way to see it for yourself is to install LF and give it a try. It is really easy that if your grandmother knows how to use a computer, then she could do it. You already did it? Then you can safely continue to the next page.
However, here is the list just in case:


CrimPapers
Articles published on 26 September 2019
On 26 September 2019, 6 new articles were published in 6 journals.
How Can the Literature Inform Counter-Terrorism Practice? Recent Advances and Remaining Challenges by Sarah Knight, David A. Keatley
Decriminalizing Domestic Violence: A Balanced Policy Approach to Intimate Partner Violence by Jennifer J. Langdon
A Review of Methods For Evaluating Security Awareness Initiatives
Editorial: Economic and Industrial Espionage
Alienation Or Cooperation? British Muslims’ Attitudes to and Engagement in Counter-Terrorism and Counter-Extremism by Sadi Shanaah
The Relationship Between Temperament Traits and Post-Traumatic Stress Disorder Symptoms and Its Moderators: Meta-Analysis and Meta-Regression by Maria Cyniak-Cieciura, Bogdan Zawadzki


{% extends "partials/tooltips/base.html" %}
{% block title %}
Family Property
{% endblock %}
{% block inner %}
The asset acquired by either spouse during the course of the
relationship, plus any increase in the value of excluded
properties. The law assumes that you're both entitled to an equal
share of family property unless an equal division would be
significantly unfair.
{% endblock %}
{% block label %}
{% if text %}{{ text }}{% else %}family property{% endif %}
{% endblock %}


Model
Design:
Mandate strong encrypted communications with application servers and any other servers or administrative users.
Tip: Do not use RDBMS database, row or table level encryption. The data can be retrieved in the clear by anyone with direct access to the server, or over the network using the application credentials. It might even traverse the network in the clear despite being "encrypted" on disk.


Go to the source code of this file.
Classes | |
| struct | WthorHeader |
| Header for wthor files. More... | |
| struct | WthorBase |
| struct | Base |
Macros | |
| #define | foreach_wthorgame(wgame, wbase) for ((wgame) = (wbase)->game ; (wgame) < (wbase)->game + (wbase)->header->n_games; ++(wgame)) |
Typedefs | |
| typedef struct WthorHeader | WthorHeader |
| Header for wthor files. | |
| typedef struct WthorBase | WthorBase |
| typedef struct Base | Base |
Functions | |
| void | wthor_init (WthorBase *) |
| Initialize a Wthor base. | |
| bool | wthor_load (WthorBase *, const char *) |
| Load a wthor base. | |
| bool | wthor_save (WthorBase *, const char *) |
| Save a wthor base. | |
| void | wthor_test (const char *, struct Search *) |
| Test Search with a wthor base. | |
| void | wthor_eval (const char *, struct Search *, unsigned long long histogram[129][65]) |
| Test Eval with a wthor base. | |
| void | wthor_edaxify (const char *) |
| Change players to "Edax (delorme)" and tourney to "Etudes" in a wthor base. | |
| void | base_init (Base *) |
| Initialize a game database. | |
| void | base_free (Base *) |
| Free resources of a game database. | |
| bool | base_load (Base *, const char *) |
| Load a game database. | |
| void | base_save (const Base *, const char *) |
| Save a game database. | |
| void | base_append (Base *, const Game *) |
| Add a game to a game database. | |
| void | base_to_problem (Base *, const int, const char *) |
| Convert a game database to a set of problems. | |
| void | base_to_FEN (Base *, const int, const char *) |
| Convert a game database to a set of problems. | |
| void | base_analyze (Base *, struct Search *, const int, const bool) |
| Base analysis. | |
| void | base_complete (Base *, struct Search *) |
| Base analysis. | |
| void | base_unique (Base *) |
| Make games unique in the game database. | |
| void | base_compare (const char *, const char *) |
| Base Compare. |
Header file for game base management
| #define foreach_wthorgame | ( | wgame, | |
| wbase | |||
| ) | for ((wgame) = (wbase)->game ; (wgame) < (wbase)->game + (wbase)->header->n_games; ++(wgame)) |
| typedef struct WthorHeader WthorHeader |
Header for wthor files.
struct WthorHeader
| void base_compare | ( | const char * | file_1, |
| const char * | file_2 | ||
| ) |
| bool base_load | ( | Base * | base, |
| const char * | file | ||
| ) |
| void base_save | ( | const Base * | base, |
| const char * | file | ||
| ) |
| void base_to_FEN | ( | Base * | base, |
| const int | n_empties, | ||
| const char * | problem | ||
| ) |
Convert a game database to a set of problems.
| base | Game base. |
| n_empties | Number of empties. |
| problem | Problems filename. |
| void base_to_problem | ( | Base * | base, |
| const int | n_empties, | ||
| const char * | problem | ||
| ) |
Convert a game database to a set of problems.
| base | Game base. |
| n_empties | Number of empties. |
| problem | Problems filename. |
| void wthor_edaxify | ( | const char * | file | ) |
Change players to "Edax (delorme)" and tourney to "Etudes" in a wthor base.
| file | Wthor game file. |
| void wthor_eval | ( | const char * | file, |
| Search * | search, | ||
| unsigned long long | histogram[129][65] | ||
| ) |
| void wthor_init | ( | WthorBase * | base | ) |
Initialize a Wthor base.
| base | Wthor's base. |
| bool wthor_load | ( | WthorBase * | base, |
| const char * | file | ||
| ) |
Load a wthor base.
| base | Wthor game base. |
| file | Game file. |
| bool wthor_save | ( | WthorBase * | base, |
| const char * | file | ||
| ) |
Save a wthor base.
| base | Wthor game base. |
| file | Game file name. |


Module datasist.feature_engineering
The feature engineering contains functions for extracting important features from raw data and transforming them into formats that are suitable for machine learning models.
Expand source code
'''
'''
import datetime as dt
import re
import platform
import pandas as pd
import numpy as np
if platform.system() == "Darwin":
import matplotlib as plt
plt.use('TkAgg')
else:
import matplotlib.pyplot as plt
import seaborn as sns
from .structdata import get_cat_feats, get_num_feats, get_date_cols
from dateutil.parser import parse
def drop_missing(data=None, percent=99):
'''
Drops missing columns with [percent] of missing data.
Parameters:
-------------------------
data: Pandas DataFrame or Series.
percent: float, Default 99
Percentage of missing values to be in a column before it is eligible for removal.
Returns:
Pandas DataFrame or Series.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
missing_percent = (data.isna().sum() / data.shape[0]) * 100
cols_2_drop = missing_percent[missing_percent.values >= percent].index
print("Dropped {}".format(list(cols_2_drop)))
#Drop missing values
df = data.drop(cols_2_drop, axis=1)
return df
def drop_redundant(data):
'''
Removes features with the same value in all cell. Drops feature If Nan is the second unique class as well.
Parameters:
-----------------------------
data: DataFrame or named series.
Returns:
DataFrame or named series.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
#get columns
cols_2_drop = _nan_in_class(data)
print("Dropped {}".format(cols_2_drop))
df = data.drop(cols_2_drop, axis=1)
return df
# def fill_with_model(xtrain, xtest, estimator):
def _nan_in_class(data):
cols = []
for col in data.columns:
if len(data[col].unique()) == 1:
cols.append(col)
if len(data[col].unique()) == 2:
if np.nan in list(data[col].unique()):
cols.append(col)
return cols
def fill_missing_cats(data=None, cat_features=None, missing_encoding=None, missing_col=False):
'''
Fill missing values using the mode of the categorical features.
Parameters:
------------------------
data: DataFrame or name Series.
 If not provided, we automatically infer the categoricals from the dataset.
missing_encoding: List, Series, Array.
Values used in place of missing. Popular formats are [-1, -999, -99, '', ' ']
missin_col: bool, Default True
Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
if cat_features is None:
cat_features = get_cat_feats(data)
df = data.copy()
#change all possible missing values to NaN
if missing_encoding is None:
missing_encoding = ['', ' ', -99, -999]
df.replace(missing_encoding, np.NaN, inplace=True)
for feat in cat_features:
if missing_col:
df[feat + '_missing_value'] = (df[feat].isna()).astype('int64')
most_freq = df[feat].mode()[0]
df[feat] = df[feat].replace(np.NaN, most_freq)
return df
def fill_missing_num(data=None, num_features=None, method='mean', missing_col=False):
'''
fill missing values in numerical columns with specified [method] value
Parameters:
------------------------------
data: DataFrame or name Series.
The data set to fill
features: list.
List of columns to fill
method: str, Default 'mean'.
method to use in calculating fill value.
missing_col: bool, Default True
Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
if num_features is None:
num_features = get_num_feats(data)
#get numerical features with missing values
temp_df = data[num_features].isna().sum()
features = list(temp_df[num_features][temp_df[num_features] > 0].index)
df = data.copy()
for feat in features:
if missing_col:
df[feat + '_missing_value'] = (df[feat].isna()).astype('int64')
if method is 'mean':
mean = df[feat].mean()
df[feat].fillna(mean, inplace=True)
elif method is 'median':
median = df[feat].median()
df[feat].fillna(median, inplace=True)
elif method is 'mode':
mode = df[feat].mode()[0]
df[feat].fillna(mode, inplace=True)
else:
raise ValueError("method: must specify a fill method, one of [mean, mode or median]'")
return df
def merge_groupby(data=None, cat_features=None, statistics=None, col_to_merge=None):
'''
Performs a groupby on the specified categorical features and merges
the result to the original dataframe.
Parameter:
-----------------------
data: DataFrame
Data set to perform operation on.
cat_features: list, series, 1D-array
categorical features to groupby.
statistics: list, series, 1D-array, Default ['mean', 'count]
aggregates to perform on grouped data.
col_to_merge: str
The column to merge on the dataset. Must be present in the data set.
Returns:
Dataframe.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
if statistics is None:
statistics = ['mean', 'count']
if cat_features is None:
cat_features = get_num_feats(data)
if col_to_merge is None:
raise ValueError("col_to_merge: Expecting a string [column to merge on], got 'None'")
df = data.copy()
for cat in cat_features:
temp = df.groupby([cat]).agg(statistics)[col_to_merge]
#rename columns
temp = temp.rename(columns={'mean': cat + '_' + col_to_merge + '_mean', 'count': cat + '_' + col_to_merge + "_count"})
#merge the data sets
df = df.merge(temp, how='left', on=cat)
return df
def get_qcut(data=None, col=None, q=None, duplicates='drop', return_type='float64'):
'''
Cuts a series into bins using the pandas qcut function
and returns the resulting bins as a series for merging.
Parameter:
-------------
data: DataFrame, named Series
Data set to perform operation on.
col: str
column to cut/binnarize.
q: integer or array of quantiles
Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately
array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles.
duplicates: Default 'drop',
If bin edges are not unique drop non-uniques.
return_type: dtype, Default (float64)
Dtype of series to return. One of [float64, str, int64]
Returns:
--------
Series, 1D-Array
'''
temp_df = pd.qcut(data[col], q=q, duplicates=duplicates).to_frame().astype('str')
#retrieve only the qcut categories
df = temp_df[col].str.split(',').apply(lambda x: x[0][1:]).astype(return_type)
return df
def create_balanced_data(data=None, target=None, categories=None, class_sizes=None, replacement=False ):
'''
Creates a balanced data set from an imbalanced one. Used in a classification task.
Parameter:
----------------------------
data: DataFrame, name series.
The imbalanced dataset.
target: str
Name of the target column.
categories: list
Unique categories in the target column. If not set, we use infer the unique categories in the column.
class_sizes: list
Size of each specified class. Must be in order with categoriess parameter.
replacement: bool, Default True.
samples with or without replacement.
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
if target is None:
raise ValueError("target: Expecting a String got 'None'")
if categories is None:
categories = list(data[target].unique())
if class_sizes is None:
#set size for each class to same value
temp_val = int(data.shape[0] / len(data[target].unique()))
class_sizes = [temp_val for _ in list(data[target].unique())]
df = data.copy()
data_category = []
data_class_indx = []
#get data corrresponding to each of the categories
for cat in categories:
data_category.append(df[df[target] == cat])
#sample and get the index corresponding to each category
for class_size, cat in zip(class_sizes, data_category):
data_class_indx.append(cat.sample(class_size, replace=True).index)
#concat data together
new_data = pd.concat([df.loc[indx] for indx in data_class_indx], ignore_index=True).sample(sum(class_sizes)).reset_index(drop=True)
if not replacement:
for indx in data_class_indx:
df.drop(indx, inplace=True)
return new_data
def to_date(data):
'''
Automatically convert all date time columns to pandas Datetime format
'''
date_cols = get_date_cols(data)
for col in date_cols:
data[col] = pd.to_datetime(data[col])
return data
def haversine_distance(lat1, long1, lat2, long2):
'''
Calculates the Haversine distance between two location with latitude and longitude.
The haversine distance is the great-circle distance between two points on a sphere given their longitudes and latitudes.
Parameter:
---------------------------
lat1: scalar,float
Start point latitude of the location.
lat2: scalar,float
End point latitude of the location.
long1: scalar,float
Start point longitude of the location.
long2: scalar,float
End point longitude of the location.
Returns:
Series: The Harversine distance between (lat1, lat2), (long1, long2)
'''
lat1, long1, lat2, long2 = map(np.radians, (lat1, long1, lat2, long2))
AVG_EARTH_RADIUS = 6371 # in km
lat = lat2 - lat1
lng = long2 - long1
distance = np.sin(lat * 0.5) ** 2 + np.cos(lat1) * np.cos(lat2) * np.sin(lng * 0.5) ** 2
harvesine_distance = 2 * AVG_EARTH_RADIUS * np.arcsin(np.sqrt(distance))
harvesine_distance_df = pd.Series(harvesine_distance)
return harvesine_distance_df
def manhattan_distance(lat1, long1, lat2, long2):
'''
Calculates the Manhattan distance between two points.
It is the sum of horizontal and vertical distance between any two points given their latitudes and longitudes.
Parameter:
-------------------
lat1: scalar,float
Start point latitude of the location.
lat2: scalar,float
End point latitude of the location.
long1: scalar,float
Start point longitude of the location.
long2: scalar,float
End point longitude of the location.
Returns: Series
The Manhattan distance between (lat1, lat2) and (long1, long2)
'''
a = np.abs(lat2 -lat1)
b = np.abs(long1 - long2)
manhattan_distance = a + b
manhattan_distance_df = pd.Series(manhattan_distance)
return manhattan_distance_df
def bearing(lat1, long1, lat2, long2):
'''
Calculates the Bearing between two points.
The bearing is the compass direction to travel from a starting point, and must be within the range 0 to 360.
Parameter:
-------------------------
lat1: scalar,float
Start point latitude of the location.
lat2: scalar,float
End point latitude of the location.
long1: scalar,float
Start point longitude of the location.
long2: scalar,float
End point longitude of the location.
Returns: Series
The Bearing between (lat1, lat2) and (long1, long2)
'''
AVG_EARTH_RADIUS = 6371
long_delta = np.radians(long2 - long1)
lat1, long1, lat2, long2 = map(np.radians, (lat1, long1, lat2, long2))
y = np.sin(long_delta) * np.cos(lat2)
x = np.cos(lat1) * np.sin(lat2) - np.sin(lat1) * np.cos(lat2) * np.cos(long_delta)
bearing = np.degrees(np.arctan2(y, x))
bearing_df = pd.Series(bearing)
return bearing_df
def get_location_center(point1, point2):
'''
Calculates the center between two points.
Parameter:
---------------------------
point1: list, series, scalar
End point latitude of the location.
long1: list, series, scalar
Start point longitude of the location.
long2: list, series, scalar
End point longitude of the location.
Returns: Series
The center between point1 and point2
'''
center = (point1 + point2) / 2
center_df = pd.Series(center)
return center_df
def log_transform(data, columns, plot=True, figsize=(12,6)):
'''
Nomralizes the dataset to be as close to the gaussian distribution.
Parameter:
-----------------------------------------
data: DataFrame, Series.
Data to Log transform.
columns: List, Series
Columns to be transformed to normality using log transformation
plot: bool, default True
Plots a before and after log transformation plot
Returns:
Log-transformed dataframe
'''
if data is None:
raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'")
if columns is None:
raise ValueError("columns: Expecting at least a column in the list of columns but got 'None'")
df = data.copy()
for col in columns:
df[col] = np.log1p(df[col])
if plot:
for col in columns:
_ = plt.figure(figsize = figsize)
plt.subplot(1, 2, 1)
sns.distplot(data[col], color="m", label="Skewness : %.2f" % (df[col].skew()))
plt.title('Distribution of ' + col + " before Log transformation")
plt.legend(loc='best')
plt.subplot(1, 2, 2)
sns.distplot(df[col], color="m", label="Skewness : %.2f" % (df[col].skew()))
plt.title('Distribution of ' + col + " after Log transformation")
plt.legend(loc='best')
plt.tight_layout(2)
plt.show()
return df
def convert_dtype(df):
'''
Convert datatype of a feature to its original datatype.
If the datatype of a feature is being represented as a string while the initial datatype is an integer or a float
or even a datetime dtype. The convert_dtype() function iterates over the feature(s) in a pandas dataframe and convert the features to their appropriate datatype
Parameter:
---------------------------
df: DataFrame, Series
Dataset to convert data type
Returns:
-----------------
DataFrame or Series.
Example:
data = {'Name':['Tom', 'nick', 'jack'],
'Age':['20', '21', '19'],
'Date of Birth': ['1999-11-17','20 Sept 1998','Wed Sep 19 14:55:02 2000']}
df = pd.DataFrame(data)
df.info()
>>>
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 3 entries, 0 to 2
Data columns (total 3 columns):
Name 3 non-null object
Age 3 non-null object
Date of Birth 3 non-null object
dtypes: object(3)
memory usage: 76.0+ bytes
conv = convert_dtype(df)
conv.info()
>>>
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 3 entries, 0 to 2
Data columns (total 3 columns):
Name 3 non-null object
Age 3 non-null int32
Date of Birth 3 non-null datetime64[ns]
dtypes: datetime64[ns](1), int32(1), object(1)
memory usage: 88.0+ bytes
'''
if df.isnull().any().any() == True:
raise ValueError("DataFrame contain missing values")
else:
i = 0
changed_dtype = []
#Function to handle datetime dtype
def is_date(string, fuzzy=False):
try:
parse(string, fuzzy=fuzzy)
return True
except ValueError:
return False
while i <= (df.shape[1])-1:
val = df.iloc[:,i]
if str(val.dtypes) =='object':
val = val.apply(lambda x: re.sub(r"^\s+|\s+$", "",x, flags=re.UNICODE)) #Remove spaces between strings
try:
if str(val.dtypes) =='object':
if val.min().isdigit() == True: #Check if the string is an integer dtype
int_v = val.astype(int)
changed_dtype.append(int_v)
elif val.min().replace('.', '', 1).isdigit() == True: #Check if the string is a float type
float_v = val.astype(float)
changed_dtype.append(float_v)
elif is_date(val.min(),fuzzy=False) == True: #Check if the string is a datetime dtype
dtime = pd.to_datetime(val)
changed_dtype.append(dtime)
else:
changed_dtype.append(val) #This indicate the dtype is a string
else:
changed_dtype.append(val) #This could count for symbols in a feature
except ValueError:
raise ValueError("DataFrame columns contain one or more DataType")
except:
raise Exception()
i = i+1
data_f = pd.concat(changed_dtype,1)
return data_f
def bin_age(data, feature, bins, labels, fill_missing = None, drop_original = False):
'''
Categorize age data into separate bins
Parameter:
-----------------------------------------
data: DataFrame, Series.
Data for which feature to be binned exist.
feature: List, Series
Columns to be binned
Bins: List, numpy.ndarray
Specifies the different categories
Bins must be one greater labels
labels: List, Series
Name identified to the various categories
fill_missing(default = None): int
mean : feature average
mode : most occuring data in the feature
median : middle point in the feature
drop_original: bool
Drops original feature after beaning
Returns:
Returns a binned dataframe
'''
df = data.copy()
for col in feature:
if fill_missing == None:
if df[col].isnull().any():
raise ValueError("data: Mising Value found in table")
else:
df[col + '_binned'] = pd.cut(x=df[col], bins= bins, labels=labels)
elif fill_missing == 'mean':
df[col].fillna(int(df[col].mean()), inplace = True)
df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels)
elif fill_missing == 'mode':
df[col].fillna(int(df[col].mode()), inplace = True)
df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels)
elif fill_missing == 'median':
df[col].fillna(int(df[col].median()), inplace = True)
df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels)
if drop_original == True:
df.drop(columns = col, inplace = True)
return df
Functions
def bearing(lat1, long1, lat2, long2)
-
Calculates the Bearing between two points. The bearing is the compass direction to travel from a starting point, and must be within the range 0 to 360.
Parameter:
lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location.
Returns: Series
The Bearing between (lat1, lat2) and (long1, long2)
Expand source code
def bearing(lat1, long1, lat2, long2): ''' Calculates the Bearing between two points. The bearing is the compass direction to travel from a starting point, and must be within the range 0 to 360. Parameter: ------------------------- lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location. Returns: Series The Bearing between (lat1, lat2) and (long1, long2) ''' AVG_EARTH_RADIUS = 6371 long_delta = np.radians(long2 - long1) lat1, long1, lat2, long2 = map(np.radians, (lat1, long1, lat2, long2)) y = np.sin(long_delta) * np.cos(lat2) x = np.cos(lat1) * np.sin(lat2) - np.sin(lat1) * np.cos(lat2) * np.cos(long_delta) bearing = np.degrees(np.arctan2(y, x)) bearing_df = pd.Series(bearing) return bearing_df
def bin_age(data, feature, bins, labels, fill_missing=None, drop_original=False)
-
Categorize age data into separate bins Parameter: -------------------- data: DataFrame, Series. Data for which feature to be binned exist. feature: List, Series Columns to be binned Bins: List, numpy.ndarray Specifies the different categories. Bins must be one greater labels. labels: List, Series Name identified to the various categories fill_missing: int Default, None mean : feature average mode : most occuring data in the feature median : middle point in the feature drop_original: bool Drops original feature after beaning Returns: Binned DataFrame of age
Expand source code
def bin_age(data, feature, bins, labels, fill_missing = None, drop_original = False): ''' Categorize age data into separate bins Parameter: ----------------------------------------- data: DataFrame, Series. Data for which feature to be binned exist. feature: List, Series Columns to be binned Bins: List, numpy.ndarray Specifies the different categories Bins must be one greater labels labels: List, Series Name identified to the various categories fill_missing(default = None): int mean : feature average mode : most occuring data in the feature median : middle point in the feature drop_original: bool Drops original feature after beaning Returns: Returns a binned dataframe ''' df = data.copy() for col in feature: if fill_missing == None: if df[col].isnull().any(): raise ValueError("data: Mising Value found in table") else: df[col + '_binned'] = pd.cut(x=df[col], bins= bins, labels=labels) elif fill_missing == 'mean': df[col].fillna(int(df[col].mean()), inplace = True) df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels) elif fill_missing == 'mode': df[col].fillna(int(df[col].mode()), inplace = True) df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels) elif fill_missing == 'median': df[col].fillna(int(df[col].median()), inplace = True) df[col + '_binned'] = pd.cut(x=df[col], bins=bins, labels=labels) if drop_original == True: df.drop(columns = col, inplace = True) return df
def convert_dtype(df)
-
Converts datatype of a feature to its original datatype. If the datatype of a feature is being represented as a string while the initial datatype is an integer or a float or even a datetime dtype. The convert_dtype() function iterates over the feature(s) in a pandas dataframe and convert the features to their appropriate datatype Parameter: --------------- df: DataFrame, Series Dataset to convert data type Returns: DataFrame or Series.
Expand source code
def convert_dtype(df): ''' Convert datatype of a feature to its original datatype. If the datatype of a feature is being represented as a string while the initial datatype is an integer or a float or even a datetime dtype. The convert_dtype() function iterates over the feature(s) in a pandas dataframe and convert the features to their appropriate datatype Parameter: --------------------------- df: DataFrame, Series Dataset to convert data type Returns: ----------------- DataFrame or Series. Example: data = {'Name':['Tom', 'nick', 'jack'], 'Age':['20', '21', '19'], 'Date of Birth': ['1999-11-17','20 Sept 1998','Wed Sep 19 14:55:02 2000']} df = pd.DataFrame(data) df.info() >>> <class 'pandas.core.frame.DataFrame'> RangeIndex: 3 entries, 0 to 2 Data columns (total 3 columns): Name 3 non-null object Age 3 non-null object Date of Birth 3 non-null object dtypes: object(3) memory usage: 76.0+ bytes conv = convert_dtype(df) conv.info() >>> <class 'pandas.core.frame.DataFrame'> RangeIndex: 3 entries, 0 to 2 Data columns (total 3 columns): Name 3 non-null object Age 3 non-null int32 Date of Birth 3 non-null datetime64[ns] dtypes: datetime64[ns](1), int32(1), object(1) memory usage: 88.0+ bytes ''' if df.isnull().any().any() == True: raise ValueError("DataFrame contain missing values") else: i = 0 changed_dtype = [] #Function to handle datetime dtype def is_date(string, fuzzy=False): try: parse(string, fuzzy=fuzzy) return True except ValueError: return False while i <= (df.shape[1])-1: val = df.iloc[:,i] if str(val.dtypes) =='object': val = val.apply(lambda x: re.sub(r"^\s+|\s+$", "",x, flags=re.UNICODE)) #Remove spaces between strings try: if str(val.dtypes) =='object': if val.min().isdigit() == True: #Check if the string is an integer dtype int_v = val.astype(int) changed_dtype.append(int_v) elif val.min().replace('.', '', 1).isdigit() == True: #Check if the string is a float type float_v = val.astype(float) changed_dtype.append(float_v) elif is_date(val.min(),fuzzy=False) == True: #Check if the string is a datetime dtype dtime = pd.to_datetime(val) changed_dtype.append(dtime) else: changed_dtype.append(val) #This indicate the dtype is a string else: changed_dtype.append(val) #This could count for symbols in a feature except ValueError: raise ValueError("DataFrame columns contain one or more DataType") except: raise Exception() i = i+1 data_f = pd.concat(changed_dtype,1) return data_f
def create_balanced_data(data=None, target=None, categories=None, class_sizes=None, replacement=False)
-
Creates a balanced data set from an imbalanced one. Used in a classification task.
Parameter:
data: DataFrame, name series. The imbalanced dataset. target: str Name of the target column. categories: list Unique categories in the target column. If not set, we use infer the unique categories in the column. class_sizes: list Size of each specified class. Must be in order with categoriess parameter. replacement: bool, Default True. samples with or without replacement.
Expand source code
def create_balanced_data(data=None, target=None, categories=None, class_sizes=None, replacement=False ): ''' Creates a balanced data set from an imbalanced one. Used in a classification task. Parameter: ---------------------------- data: DataFrame, name series. The imbalanced dataset. target: str Name of the target column. categories: list Unique categories in the target column. If not set, we use infer the unique categories in the column. class_sizes: list Size of each specified class. Must be in order with categoriess parameter. replacement: bool, Default True. samples with or without replacement. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") if target is None: raise ValueError("target: Expecting a String got 'None'") if categories is None: categories = list(data[target].unique()) if class_sizes is None: #set size for each class to same value temp_val = int(data.shape[0] / len(data[target].unique())) class_sizes = [temp_val for _ in list(data[target].unique())] df = data.copy() data_category = [] data_class_indx = [] #get data corrresponding to each of the categories for cat in categories: data_category.append(df[df[target] == cat]) #sample and get the index corresponding to each category for class_size, cat in zip(class_sizes, data_category): data_class_indx.append(cat.sample(class_size, replace=True).index) #concat data together new_data = pd.concat([df.loc[indx] for indx in data_class_indx], ignore_index=True).sample(sum(class_sizes)).reset_index(drop=True) if not replacement: for indx in data_class_indx: df.drop(indx, inplace=True) return new_data
def drop_missing(data=None, percent=99)
-
Drops missing columns with [percent] of missing data.
Parameters:
data: Pandas DataFrame or Series. percent: float, Default 99 Percentage of missing values to be in a column before it is eligible for removal.
Returns
Pandas DataFrame or Series.
Expand source code
def drop_missing(data=None, percent=99): ''' Drops missing columns with [percent] of missing data. Parameters: ------------------------- data: Pandas DataFrame or Series. percent: float, Default 99 Percentage of missing values to be in a column before it is eligible for removal. Returns: Pandas DataFrame or Series. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") missing_percent = (data.isna().sum() / data.shape[0]) * 100 cols_2_drop = missing_percent[missing_percent.values >= percent].index print("Dropped {}".format(list(cols_2_drop))) #Drop missing values df = data.drop(cols_2_drop, axis=1) return df
def drop_redundant(data)
-
Removes features with the same value in all cell. Drops feature If Nan is the second unique class as well.
Parameters:
data: DataFrame or named series.
Returns
DataFrame or named series.
Expand source code
def drop_redundant(data): ''' Removes features with the same value in all cell. Drops feature If Nan is the second unique class as well. Parameters: ----------------------------- data: DataFrame or named series. Returns: DataFrame or named series. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") #get columns cols_2_drop = _nan_in_class(data) print("Dropped {}".format(cols_2_drop)) df = data.drop(cols_2_drop, axis=1) return df
def fill_missing_cats(data=None, cat_features=None, missing_encoding=None, missing_col=False)
-
Fill missing values using the mode of the categorical features.
Parameters:
data: DataFrame or name Series.  If not provided, we automatically infer the categoricals from the dataset. missing_encoding: List, Series, Array. Values used in place of missing. Popular formats are [-1, -999, -99, '', ' '] missin_col: bool, Default True Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model.
Expand source code
def fill_missing_cats(data=None, cat_features=None, missing_encoding=None, missing_col=False): ''' Fill missing values using the mode of the categorical features. Parameters: ------------------------ data: DataFrame or name Series.  If not provided, we automatically infer the categoricals from the dataset. missing_encoding: List, Series, Array. Values used in place of missing. Popular formats are [-1, -999, -99, '', ' '] missin_col: bool, Default True Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") if cat_features is None: cat_features = get_cat_feats(data) df = data.copy() #change all possible missing values to NaN if missing_encoding is None: missing_encoding = ['', ' ', -99, -999] df.replace(missing_encoding, np.NaN, inplace=True) for feat in cat_features: if missing_col: df[feat + '_missing_value'] = (df[feat].isna()).astype('int64') most_freq = df[feat].mode()[0] df[feat] = df[feat].replace(np.NaN, most_freq) return df
def fill_missing_num(data=None, num_features=None, method='mean', missing_col=False)
-
fill missing values in numerical columns with specified [method] value
Parameters
data
-
DataFrame or name Series.
The data set to fill
features
-
list.
List of columns to fill
method
-
str, Default 'mean'.
method to use in calculating fill value.
missing_col
-
bool, Default True
Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model.
Expand source code
def fill_missing_num(data=None, num_features=None, method='mean', missing_col=False): ''' fill missing values in numerical columns with specified [method] value Parameters: ------------------------------ data: DataFrame or name Series. The data set to fill features: list. List of columns to fill method: str, Default 'mean'. method to use in calculating fill value. missing_col: bool, Default True Creates a new column to capture the missing values. 1 if missing and 0 otherwise. This can sometimes help a machine learning model. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") if num_features is None: num_features = get_num_feats(data) #get numerical features with missing values temp_df = data[num_features].isna().sum() features = list(temp_df[num_features][temp_df[num_features] > 0].index) df = data.copy() for feat in features: if missing_col: df[feat + '_missing_value'] = (df[feat].isna()).astype('int64') if method is 'mean': mean = df[feat].mean() df[feat].fillna(mean, inplace=True) elif method is 'median': median = df[feat].median() df[feat].fillna(median, inplace=True) elif method is 'mode': mode = df[feat].mode()[0] df[feat].fillna(mode, inplace=True) else: raise ValueError("method: must specify a fill method, one of [mean, mode or median]'") return df
def get_location_center(point1, point2)
-
Calculates the center between two points.
Parameter:
point1: list, series, scalar End point latitude of the location. long1: list, series, scalar Start point longitude of the location. long2: list, series, scalar End point longitude of the location.
Returns: Series
The center between point1 and point2
Expand source code
def get_location_center(point1, point2): ''' Calculates the center between two points. Parameter: --------------------------- point1: list, series, scalar End point latitude of the location. long1: list, series, scalar Start point longitude of the location. long2: list, series, scalar End point longitude of the location. Returns: Series The center between point1 and point2 ''' center = (point1 + point2) / 2 center_df = pd.Series(center) return center_df
def get_qcut(data=None, col=None, q=None, duplicates='drop', return_type='float64')
-
Cuts a series into bins using the pandas qcut function and returns the resulting bins as a series for merging.
Parameter:
data: DataFrame, named Series Data set to perform operation on. col: str column to cut/binnarize. q: integer or array of quantiles Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles. duplicates: Default 'drop', If bin edges are not unique drop non-uniques. return_type: dtype, Default (float64) Dtype of series to return. One of [float64, str, int64]
Returns:
Series, 1D-Array
Expand source code
def get_qcut(data=None, col=None, q=None, duplicates='drop', return_type='float64'): ''' Cuts a series into bins using the pandas qcut function and returns the resulting bins as a series for merging. Parameter: ------------- data: DataFrame, named Series Data set to perform operation on. col: str column to cut/binnarize. q: integer or array of quantiles Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles. duplicates: Default 'drop', If bin edges are not unique drop non-uniques. return_type: dtype, Default (float64) Dtype of series to return. One of [float64, str, int64] Returns: -------- Series, 1D-Array ''' temp_df = pd.qcut(data[col], q=q, duplicates=duplicates).to_frame().astype('str') #retrieve only the qcut categories df = temp_df[col].str.split(',').apply(lambda x: x[0][1:]).astype(return_type) return df
def haversine_distance(lat1, long1, lat2, long2)
-
Calculates the Haversine distance between two location with latitude and longitude. The haversine distance is the great-circle distance between two points on a sphere given their longitudes and latitudes.
Parameter:
lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location.
Returns:
Series: The Harversine distance between (lat1, lat2), (long1, long2)
Expand source code
def haversine_distance(lat1, long1, lat2, long2): ''' Calculates the Haversine distance between two location with latitude and longitude. The haversine distance is the great-circle distance between two points on a sphere given their longitudes and latitudes. Parameter: --------------------------- lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location. Returns: Series: The Harversine distance between (lat1, lat2), (long1, long2) ''' lat1, long1, lat2, long2 = map(np.radians, (lat1, long1, lat2, long2)) AVG_EARTH_RADIUS = 6371 # in km lat = lat2 - lat1 lng = long2 - long1 distance = np.sin(lat * 0.5) ** 2 + np.cos(lat1) * np.cos(lat2) * np.sin(lng * 0.5) ** 2 harvesine_distance = 2 * AVG_EARTH_RADIUS * np.arcsin(np.sqrt(distance)) harvesine_distance_df = pd.Series(harvesine_distance) return harvesine_distance_df
def log_transform(data, columns, plot=True, figsize=(12, 6))
-
Nomralizes the dataset to be as close to the gaussian distribution.
Parameter:
data: DataFrame, Series. Data to Log transform.
columns: List, Series Columns to be transformed to normality using log transformation
plot: bool, default True Plots a before and after log transformation plot
Returns
Log
-transformed
dataframe
Expand source code
def log_transform(data, columns, plot=True, figsize=(12,6)): ''' Nomralizes the dataset to be as close to the gaussian distribution. Parameter: ----------------------------------------- data: DataFrame, Series. Data to Log transform. columns: List, Series Columns to be transformed to normality using log transformation plot: bool, default True Plots a before and after log transformation plot Returns: Log-transformed dataframe ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") if columns is None: raise ValueError("columns: Expecting at least a column in the list of columns but got 'None'") df = data.copy() for col in columns: df[col] = np.log1p(df[col]) if plot: for col in columns: _ = plt.figure(figsize = figsize) plt.subplot(1, 2, 1) sns.distplot(data[col], color="m", label="Skewness : %.2f" % (df[col].skew())) plt.title('Distribution of ' + col + " before Log transformation") plt.legend(loc='best') plt.subplot(1, 2, 2) sns.distplot(df[col], color="m", label="Skewness : %.2f" % (df[col].skew())) plt.title('Distribution of ' + col + " after Log transformation") plt.legend(loc='best') plt.tight_layout(2) plt.show() return df
def manhattan_distance(lat1, long1, lat2, long2)
-
Calculates the Manhattan distance between two points. It is the sum of horizontal and vertical distance between any two points given their latitudes and longitudes.
Parameter:
lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location.
Returns: Series
The Manhattan distance between (lat1, lat2) and (long1, long2)
Expand source code
def manhattan_distance(lat1, long1, lat2, long2): ''' Calculates the Manhattan distance between two points. It is the sum of horizontal and vertical distance between any two points given their latitudes and longitudes. Parameter: ------------------- lat1: scalar,float Start point latitude of the location. lat2: scalar,float End point latitude of the location. long1: scalar,float Start point longitude of the location. long2: scalar,float End point longitude of the location. Returns: Series The Manhattan distance between (lat1, lat2) and (long1, long2) ''' a = np.abs(lat2 -lat1) b = np.abs(long1 - long2) manhattan_distance = a + b manhattan_distance_df = pd.Series(manhattan_distance) return manhattan_distance_df
def merge_groupby(data=None, cat_features=None, statistics=None, col_to_merge=None)
-
Performs a groupby on the specified categorical features and merges the result to the original dataframe.
Parameter:
data: DataFrame Data set to perform operation on. cat_features: list, series, 1D-array categorical features to groupby. statistics: list, series, 1D-array, Default ['mean', 'count] aggregates to perform on grouped data. col_to_merge: str The column to merge on the dataset. Must be present in the data set.
Returns
Dataframe.
Expand source code
def merge_groupby(data=None, cat_features=None, statistics=None, col_to_merge=None): ''' Performs a groupby on the specified categorical features and merges the result to the original dataframe. Parameter: ----------------------- data: DataFrame Data set to perform operation on. cat_features: list, series, 1D-array categorical features to groupby. statistics: list, series, 1D-array, Default ['mean', 'count] aggregates to perform on grouped data. col_to_merge: str The column to merge on the dataset. Must be present in the data set. Returns: Dataframe. ''' if data is None: raise ValueError("data: Expecting a DataFrame/ numpy2d array, got 'None'") if statistics is None: statistics = ['mean', 'count'] if cat_features is None: cat_features = get_num_feats(data) if col_to_merge is None: raise ValueError("col_to_merge: Expecting a string [column to merge on], got 'None'") df = data.copy() for cat in cat_features: temp = df.groupby([cat]).agg(statistics)[col_to_merge] #rename columns temp = temp.rename(columns={'mean': cat + '_' + col_to_merge + '_mean', 'count': cat + '_' + col_to_merge + "_count"}) #merge the data sets df = df.merge(temp, how='left', on=cat) return df
def to_date(data)
-
Automatically convert all date time columns to pandas Datetime format
Expand source code
def to_date(data): ''' Automatically convert all date time columns to pandas Datetime format ''' date_cols = get_date_cols(data) for col in date_cols: data[col] = pd.to_datetime(data[col]) return data


You simply need to put your Job code in some python file, targz'd, zipped or not.
Then, you can build your Docker image through web user interface on the upload file package page or the Code Editor page
You can also script things using the API located on /build and access it using your favorite tool, like curl :
curl -X POST http://<IP_ADDRESS>:5001/build \
-H 'accept: application/json' \
-H 'content-type: multipart/form-data' \
-F 'name=test_upload' \
-F 'tags=latest v1' \
-F 'pip=tbx requests' \
-F 'imports=test_upload' \
-F 'apt=' \
-F package=@./doc/examples/test_upload.py


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 113488general/62623parseroftacticisbrokenwhenthetacticfails.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/113488-general/topic/parser.2Eof_tactic.20is.20broken.20when.20the.20tactic.20fails.html


White House blocking Twitter access: Ex Trump advisor
by AFPFormer Trump National Security Advisor John Bolton said the White House denied him access to his Twitter account after his dismissal in early September, in a series of tweets that signal his return to the social media site.
"Since resigning as National Security Advisor, the White House has refused to return access to my personal Twitter account. Out of fear of what I may say?" Bolton wrote on Friday.
Prior to Friday's series of tweets, nothing had been published by Bolton since September 10, the day the US president announced his dismissal.
"To those who speculated I went into hiding, I'm sorry to disappoint!" he added.
The White House swept aside the charges, with spokeswoman Stephanie Grisham suggesting Bolton simply didn't know how to use the platform.
"Sometimes, I'll use my father as an example," she told a Fox Business Network discussion program.
"Somebody who is of advanced age may not understand all you have to do is contact Twitter and reset your password if you've forgotten it."
Since being dismissed, 71-year-old John Bolton has disagreed with the US president's strategy on North Korea.
Early on Friday, the former diplomat announced his return to Twitter with an enigmatic message: "Glad to be back on Twitter after more than two months. For the backstory, stay tuned...".
His final tweet in the series read: "Thank you to Twitter for standing by their community standards and rightfully returning control of my account."


The ratio of reciprocity of a link is the ratio of outgoing to incoming transactions observed in that link. In Social Network Analysis it is a measure of whether a relationship is one-sided or two-sided, with two-sided relationships typically being stronger.


This online example is part of https://github.com/berlincode/contenthash-signer-ens
This tool converts between IPFS CIDs and multicodec contenthashes as used in ens resolvers. It should be conform to ethereum EIP 1577. There is a companion tool to sign and validate IPFS contenthash sigantures.


---
layout: page
header-img: "img/mcgill_univ_winter.gif"
---
Xiaoxu Chen
Ph.D. candidate
Google Scholar
Xiaoxu Chen is a Ph.D. candidate in the Department of Civil Engineering at McGill University. His current research focuses on machine learning for urban computing and pubulic transit operation. He received his M.S. degree from Tongji University and B.S. degree from Harbin Institute of Technology.
Research Interests
- Machine learning
- Spatial-temporal traffic data prediction
- Data-driven transportation modeling
Selected Publications