NodeJS Library for Przelewy24. This library is written in Typescript to provide best typesafety.
This library provides an elegant way to create/verify transactions easily.
Documentation can be in read here.
npm install --save @kasvith/node-przelewy24
import { Przelewy24, PaymentOptions, ShoppingDetail, TransactionVerification } from '@kasvith/node-przelewy24';
const p24 = new Przelewy24(MERCHANT_ID, POS_ID, 'SALT', TEST_MODE);
const result = await p24.testConnection();
console.log(result); // true on success or an error being throw P24Error
Prepare following details to initiate a payment
// prepare payment options(required)
const paymentParam: PaymentOptions = {
p24_amount: 1250, // 12.50PLN -> 1250
p24_country: CountryCode.Poland, // set country codes
p24_currency: CurrencyType.PLN, // set currency
p24_description: 'a fancy item', // set description
p24_email<EMAIL_ADDRESS>// customer's email
p24_session_id: 'kdsfksfklfklfffl', // a unique id from merchant's system
p24_url_return: 'http://myawesomeapp.com/payment_success?order=abc', // return user to following url after a valid transaction
p24_url_status: 'http://myawesomeapp.com/p24callback'
};
// prepare shopping details(optional)
const shoppingDetails: ShoppingDetail[] = [
{ name: 'a book', price: 13, quantity: 4 },
{ name: 'a pen', price: 13, quantity: 1 },
...
];
const result = await p24.getPaymentLink(new Payment(paymentParam, shoppingDetails));
console.log(result) // prints a valid url to pay the payment or throws an error
Verifies a payment on p24 system. Once a sucessfull payment happen, http://myawesomeapp.com/p24callback
is triggered with a POST
request containing all the details for verify a transaction. When this happens the transaction becomes valid. TransactionVerification
model is used to verify a transaction.
// extract all information from callback request
const {
p24_merchant_id,
p24_pos_id,
p24_session_id,
p24_amount,
p24_currency,
p24_order_id
} = req.body;
const verification: TransactionVerification = {
p24_merchant_id: p24_merchant_id,
p24_pos_id: p24_pos_id,
p24_session_id: p24_session_id,
p24_amount: p24_amount,
p24_currency: p24_currency,
p24_order_id: p24_order_id,
p24_sign: p24_sign
}
const result = await p24.verifyTransaction(verification)
console.log(result) // true on success or throws an error
Library provides method to validate IP addresses with P24 backends
const valid = Przelewy24.isIpValid('<IP_ADDRESS>')
console.log(valid)
Generated using TypeDoc


[gecode-users] Store a SharedHandle inside a Sharedhandle::object
christine bouzant
christine.bouzant at gmail.com
Fri Apr 19 10:18:27 CEST 2013
Hello all,
Is there something wrong about storing a TupletSet inside a class
CarProposition which inherits of SharedHandled::Object ?
I would use the TupletSet copy constructor inside the CarProposition copy
constructor instead of the TupletSet update method since it is space
independant.
Cheers,
Christine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20130419/6b47b250/attachment.html>
More information about the users
mailing list


Hello, Code School!
HTML Email Development
Javascript
Advanced CSS
SVG animations
Workflow techniques


Play/Pause
FPS:
0
30
60
Speed:
1
10
100 Danger
10000000000 Kill your CPU
Population: 0
Population size:
Number of winners:
Genes to mutate:
Mutation rate:


Menu
About
Contact
Pieter Jordaan
About Me
South African Software Engineer
CV
Download
Contact
Github
Google+
Facebook
Linkedin


Quite simply, our mission is to deliver the world’s finest, high quality scents one fragrance at a time, along with providing any custom required specifications.
We can offer in-house fragrance manufacturing that includes customized packaging and filling services for start up projects.
We strive to innovate with our clients, particularly retailers, on how they can best enhance their bottom line and build brands with fragrance marketing products, concepts and ideas.
We nurture creativity and encourage scientific innovation, while priding ourselves on adhering to the highest levels of perfumery ethics and regulatory standards in the world.
Read on to learn more about our company’s rich history in the fragrance marketing industry, our dedication to both meeting our client’s needs and minimizing our carbon footprint.
is unique in more ways than one. With all global standards in fragrance creation, we are still as customized for the
needs of any sized company.
Each customer, regardless of their size and branding project, gets our total attention and care unlike any other available today.
Over the course of the last 30 years, has made many professional allies within the dynamic perfume industry.
An old axiom claims that "birds of a feather stick together" meaning that judgement comes form the company we keep, and in the case of , our friends are the best in the business.
Whatever your product, from fine fragrance to on mass industrial, and all in-between, you can be sure our talented perfumers and creative teams will meet your needs.
Delivered product demonstrations and sample applications, raising exposure of key brands.
Protected store assets and inventory via loss prevention procedures.
Boosted satisfaction and repeat business by recommending products in alignment with customer needs.
Greeted customers and helped with product questions, selections, and purchases including in-store and e-service transactions.
Assisted customers by answering questions and fulfilling requests.
Exceeded sales goals and accomplished business objectives by inspiring staff and promoting target products.


"The first time I used Amicus I was surprised to find out how many good ideas it suggests about experiencing something new." Noah, 22 |
"I purchased a gym membership through Amicus, it was an amazing deal" Kathrin, 20 |
"Whenever I'm bored at home I just check Amicus and check what's going on, this way I have discovered many new great places in my hometown." Sophia, 23 |
"It's an amazing app that brings people together, I love it." Bill, 30 |


We currently have your account in line to be imported from the App Store.
This can take 10 minutes to a few hours, depending on our traffic.
Want app reviews in Slack too?
Review Monitor is a free tool that continually checks the App Store and when a new review is detected, it's posted into your team's Slack channel or sent to you via email.


Dr. Vinit’s new innovation on “3-D image quality assessment” can automatically judge the quality of a video without any prior information. This innovation can be utilised by video streaming companies or a security company.
The innovation by Dr. Tanveer can be directly used to predict the “human interest” of person for a task. Employers can use this to quantify the interest of their employees in assigned projects.
Dr. Deepak and Dr. Shivani demonstrated proof of concept of Mini-MOOCs with different demographic variance in India (1 million record analysed under this project till date).
Dr. Deepak’s work uses Machine Learning to estimate toxicity levels of different pharmaceutical products, many of which are not tested fully before their launch in the market.
Dr Vipul is working on the “Hidden Hunger” project to develop an automated system for flour fortification which will help reduce micronutrient deficiency.
T Ahmed and A Srivastava. Understanding and evaluating the behavior of technical users. A study of developer interaction at StackOverflow, Human-centric Computing and Information Sciences, 2017
V Jakhetiya, K Gu, W Lin, Q Li, SP Jaiswal. A Prediction Backed Model for Quality Assessment of Screen Content and 3D synthesized Images, IEEE Transactions on Industrial Informatics, 2017
K Gu, V Jakhetiya, JF Qiao, X Li, W Lin, D Thalmann. Model-Based Referenceless Quality Metric of 3D Synthesized Images Using Local Image Description, IEEE Transactions on Image Processing, 2017
G Singal et al. Multi-constraints Link Stable Multicast Routing Protocol in MANETs, Ad Hoc Networks, 2017
M Lahoti, P Narang, KH Tan, EH Yang. Mix design factors and strength prediction of metakaolin-based geopolymer, Ceramics International, 2017
NVIDIA DGX-1 (Tesla V100) is at Bennett University!! We are super-excited to host the first Deep Learning Supercomputer in India!
International Conference on Machine Learning and Data Science, this December at Bennett University.Click here.
Bennett University partners with Dell-EMC to jointly set-up a research lab on data analytics and machine learning. Check out the ET news coverage here.--photo--
Dr. Sushil Chandra, Scientist-F and Head of INMAS, DRDO, visits the CSE department to discuss collaboration opportunities. Welcome Dr Chandra!
First year B. Tech students showcase their end-semester projects. See the news coverage by Delhi Times here.----photo----


3D Graphics Systems:
Machine Learning for Modeling and Rendering
March to June 2022
About the Course
Instructor:
Luiz Velho
TA:
Hallison Paz
Classes: Thursdays, 13:30 to 15:00 (online)
Registration: IMPA website
(
Online System Access
)
Course Material
Reading
Software
Datasets
Lectures
Schedule
Lab Practice
Resources
Material
Elsewhere
Resources
Etc..
Copyright © 2022
Luiz Velho


'Evaluates the receiver block and if it returns via a non-local-return' 'the protect block is invoked.' 'The original non-local-return continues after evaluation of the protect block.'


Pricing Plans
Pro
$
30.50
yearly
- 60 GB space
- 600 GB transfer
- Pro Design Panel
- Unlimited Emails
- 24/7 Security
Premium
$
45.50
yearly
- 120 GB space
- 1200 GB transfer
- Pro Design Panel
- Unlimited Emails
- 24/7 Security
Advanced
$
60.00
yearly
- 250 GB space
- 5000 GB transfer
- Pro Design Panel
- Unlimited Emails
- 24/7 Security


{% extends 'music/base.html' %} {% load uni_form_tags %} {% load facebook_tags %} {% block head_title %}{{ track }} by {{ track.artist }}{% endblock %} {% block body %}
You haven't connected your twitter account yet!
Connecting your twitter account to your current account is as easy as 1 2 3
All you have to do is visit this url while being connected with your current account.
{% endif %}You haven't connected your facebook account yet!
Connecting your facebook account is as easy as clicking the following button while being connected with your current account.
{% facebook_js %} {% facebook_button %} {% endif %}


| {{currentProject.tasksCount}} | tasks total |
| {{currentProject.meetingsCount}} | meetings total |
| {{currentProject.usersCount}} | users participating |
| {{hasAnalytics('TASK_TODO_COUNT') ? analytics.metrics.TASK_TODO_COUNT : '—'}} | tasks to be done |
| {{hasAnalytics('TASK_TODO_PERCENT') ? (analytics.metrics.TASK_TODO_PERCENT*100|number:0) : '—'}} | % of total |
| {{hasAnalytics('TASK_BEFORE_DUEDATE_PERCENT') ? (analytics.metrics.TASK_BEFORE_DUEDATE_PERCENT*100|number:0) : '—'}} | % tasks done in time |
| {{hasAnalytics('TASK_AFTER_DUEDATE_COUNT') ? analytics.metrics.TASK_AFTER_DUEDATE_COUNT : '—'}} | tasks done after due date |
| {{hasAnalytics('TASK_AVG_COMPLETE_TIME') ? (analytics.metrics.TASK_AVG_COMPLETE_TIME/86400000 | number:0) : '—'}} | days avg time to complete a task |
| — | meetings scheduled |
| — | days avg time between two meetings |
| — | % scheduled with poll |
| — | polls opened |


This page will destroy and recreate a map div lots of times. Developer tools shall not display a memory leak.
Once
Start
Stop


The Season of The Monk
Updated April 11, 2020
Original Journal Entry
Dated April 1, 2020
Life is strange. In a matter of weeks, everything changed. COVID-19 came in like a wrecking ball. I figure my life and goals should adapt as well. But I also shouldn’t let it be a disaster. I’m going to try to use quarantine to make both myself and the world a better place. I’m going to develop new routines, new habits, new systems. Quarantine will be a monastic retreat for me.
The things I’ve always admired about monks are their focus, their discipline, the lack of distractions, the lack of idleness. So I will try to reflect some of these things in my life.
Maybe I don’t need to check so many websites, whether blogs or “news”. Maybe turning on Downtime is a good idea. Doing more for my fitness is definitely a good idea, as is getting away from the computer and getting outside each day. I should walk more. I should have more quiet contemplation. I should have more learning and focused reading. But who knows what this month will really look like.
All that we have to decide is what to do with the time that is given us.
Analogue Analogs
Update April 11, 2020 I have found renewed energy in the idea of comparing things in my admittedly digital life to their analogue analogs. As such, I’ve compiled a list and decided I should probably try to use the new digital version in more thoughtful ways, often similar to the older analog versions.
- Blogs ↔ Daily Newspaper: I should probably check once per day, probably during lunch or in the afternoon.
- Email ↔ mail: Also fall into the check once per day category. Probably the same time.
- Podcasts ↔ Radio: I should have a set time that my shows are on the radio, and that is when I listen. 1 or 2 hours tops. Sort of like we do with The Adventure Zone already.
- Drafts/iA Writer ↔ Typewriter: I feel unnecessary anxiety over having two options and over using the paid option. So I need to ruminate on this and choose a path forward.
- Notebooks/Binders ↔ GoodNotes: For all1 my handwritten/paper-ish needs. Use the same way normal people use notebooks and binders.
- Files ↔ Files: Duh. Still working out the differences between Desktop/Documents/Downloads/Archive though.
-
Except for my daily journal and my writing journal. Probably. I could be convinced to use GoodNotes as a writing journal occasionally. And maybe someday I'll be able to go full digital. I just enjoy the physical notebook and pen so much. ↩


Show
entries
| ID |
AccessMgnt Name |
Max Connection |
Max Request |
Start Time |
End Time |
WS Client |
WS Webservice |
Descript |
Create Date |
Update Date |
View/Edit/Delete |
| ID |
AccessMgnt Name |
Max Connection |
Max Request |
Start Time |
End Time |
WS Client |
WS Webservice |
Description |
Create Date |
Update Date |
View/Edit/Delete |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| No data |


Watch Kelly Clarkson's Kids Grill Jason Momoa About Aquaman, and Prepare to Swoon
by Victoria MessinaOne serving of pure, swoon-worthy content, comin' right up! Jason Momoa stopped by The Kelly Clarkson Show on Wednesday and was unexpectedly grilled by the talk-show host's kids about all things Aquaman, making for quite the adorable segment. Kelly's 5-year-old daughter River and 3-year-old son Remy, who are big fans of the DC Comics character, joined Jason on set and fired off some important, hard-hitting questions — like whether Aquaman knows the Little Mermaid and where on Earth the superhero goes to the bathroom. Watch the clip above to see Jason go into full-on dad mode while hilariously answering their burning questions.


This is a details block, which does not work in IE / Edge
:::details This is a details block, which does not work in IE / Edge :::
Alert


Co-Organization of Scientific Events
Conferences
Seminars
Tutorials
Workshops
- Workshop on “Good Benchmarking Practices for Evolutionary Computation” at GECCO 2021 in Lille, France (Co-Organizer)
- Workshop on “Good Benchmarking Practices for Evolutionary Computation” at CEC 2021 in Kraków, Poland (Co-Organizer)
- Workshop on “(Multimodal) Multi-Objective Optimization: Challenges, Characteristics, and Peculiarities (MMMOO)”” at PPSN 2020 in Leiden, The Netherlands (Co-Organizer)
- Workshop on “Understanding Machine Learning Optimization Problems (UMLOP)” at PPSN 2020 in Leiden, The Netherlands (Co-Organizer)
- Workshop on “Good Benchmarking Practices for Evolutionary Computation” at PPSN 2020 in Leiden, The Netherlands (Co-Organizer)
- Workshop on “Good Benchmarking Practices for Evolutionary Computation” at GECCO 2020 in Cancun, Mexico (Co-Organizer)
- Workshop on “Understanding Machine Learning Optimization Problems (UMLOP)” at GECCO 2019 in Prague, Czech Republic (Co-Organizer)
- Workshop on “Game-Benchmark for Evolutionary Algorithms (GBEA)” at GECCO 2019 in Prague, Czech Republic (Co-Organizer)
- Workshop on “Investigating Optimization Problems from Machine Learning and Data Analysis” (2018) at PPSN XV in Coimbra, Portugal (Co-Organizer)
- Workshop on “Game-Benchmark for Evolutionary Algorithms (GBEA)” at GECCO 2018 in Kyoto, Japan (Co-Organizer)
- 1st COSEAL Workshop 2013 in Münster, Germany (Member of the Local Organization Team)
Coordinating Member of Research Networks
Scientific Collaborations
- Canberra Artificial Intelligence Summer School (2020) (invited speaker) in Canberra, Australia
- Lorentz Center Workshop on “Benchmarked: Optimization Meets Machine Learning” (2020) in Lorentz Center, Leiden, The Netherlands
- Dagstuhl Seminar on “Scalability in Multiobjective Optimization” (2020) in Schloss Dagstuhl, Wadern, Germany
- 7th COSEAL Workshop (2019) in Potsdam, Germany
- 6th Heidelberg Laureate Forum (2018) in Heidelberg, Germany
- 6th COSEAL Workshop (2018) in Paris, France
- 2nd International Summer School on Deep Learning (2018) in Genoa, Italy
- 5th COSEAL Workshop (2017) in Brussels, Belgium
- Dagstuhl Seminar on “Automated Algorithm Selection and Configuration” (2016) in Schloss Dagstuhl, Wadern, Germany
- 1st mlr-Workshop (2016) in Palermo, Italy
- Lorentz Center Workshop on “Open Machine Learning” (2016) in Lorentz Center, Leiden, The Netherlands
- 3rd COSEAL Workshop (2015) in Paderborn, Germany
- 3rd OpenML Workshop (2014) in Eindhoven, The Netherlands
- 1st COSEAL Workshop (2013) in Münster, Germany
- Artificial Evolution Summer School 2013 in Quiberon, France


Express middleware for authentication using JWT paradigm
(any)
(any)
(any)
app.get('protectedEndpoint', [isAuthenticated], function(req, res){})
Abstract implementation of strategy to read/manipulate token in request
(Function)
: (req) - Function that extracts token from request object
(Function)
: (strategyInstance) - Set strategy for reading token
let tokenExchange = new TokenExchange()
// Define your own strategy(a function) to read token, let's call it MyTokenReadStrategy
tokenExchange.setTokenReadStrategy(new MyTokenReadStrategy())
tokenExchange.read(req);
returns token
A strategy to read token from request query parameters. Sent via Can be implemted via TokenExchange
new TokenExchange().setTokenReadStrategy(new ReadFromBody())
// When token was sent /apiEndpoint?access_token=String
A strategy to read token from request body Can be implemted via TokenExchange
new TokenExchange().setTokenReadStrategy(new ReadFromBody())
// When token was sent ia `POST /apiEndpoint -d '{access_token: String}'`
A strategy to read token from request cookies Can be implemted via TokenExchange
new TokenExchange().setTokenReadStrategy(new ReadFromCookies())
A strategy to read token from request header named authorization
Can be implemted via TokenExchange
(any)
new TokenExchange().setTokenReadStrategy(new ReadFromHeader())
A strategy to read token from header with bearer scheme. Can be implemted via TokenExchange
(any)
: Express Request object
new TokenExchange().setTokenReadStrategy(new ReadFromHeaderWithBearerScheme())
Default strategy when authorization header is available in request : ReadFromHeaderWithBearerScheme
Default strategy when cookies have access_token
: ReadFromCookie
(any)
(any)


 ## S4 method for signature 'character,Column' format_string(format, x, ...) ## S4 method for signature 'character,Column' locate(substr, str, pos = 1) ## S4 method for signature 'Column,numeric,character' lpad(x, len, pad) ## S4 method for signature 'Column,character,numeric' regexp_extract(x, pattern, idx) ## S4 method for signature 'Column,character,character' regexp_replace(x, pattern, replacement) ## S4 method for signature 'Column,numeric,character' rpad(x, len, pad) ## S4 method for signature 'Column,character,numeric' substring_index(x, delim, count) ## S4 method for signature 'Column,character,character' translate(x, matchingString, replaceString) ## S4 method for signature 'Column,character' split_string(x, pattern, limit = -1) ## S4 method for signature 'Column,numeric' repeat_string(x, n)
x |
Column to compute on except in the following methods:
|
sep |
separator to use. |
... |
additional Columns. |
charset |
character set to use (one of "US-ASCII", "ISO-8859-1", "UTF-8", "UTF-16BE", "UTF-16LE", "UTF-16"). |
y |
Column to compute on. |
format |
a character object of format strings. |
substr |
a character string to be matched. |
str |
a Column where matches are sought for each entry. |
len |
In
|
pad |
a character string to be padded with. |
trimString |
a character string to trim with |
replace |
a Column with replacement. |
pos |
In
|
pattern |
a regular expression. |
idx |
a group index. |
replacement |
a character string that a matched |
n |
number of repetitions. |
delim |
a delimiter string. |
count |
number of occurrences of |
matchingString |
a source string where each character will be translated. |
replaceString |
a target string where each |
limit |
determines the length of the returned array.
|
ascii
: Computes the numeric value of the first character of the string column,
and returns the result as an int column.
base64
: Computes the BASE64 encoding of a binary column and returns it as
a string column. This is the reverse of unbase64.
decode
: Computes the first argument into a string from a binary using the provided
character set.
encode
: Computes the first argument into a binary from a string using the provided
character set.
initcap
: Returns a new string column by converting the first letter of
each word to uppercase. Words are delimited by whitespace. For example, "hello world"
will become "Hello World".
length
: Computes the character length of a string data or number of bytes
of a binary data. The length of string data includes the trailing spaces.
The length of binary data includes binary zeros.
lower
: Converts a string column to lower case.
ltrim
: Trims the spaces from left end for the specified string value. Optionally a
trimString
can be specified.
overlay
: Overlay the specified portion of x
with replace
,
starting from byte position pos
of src
and proceeding for
len
bytes.
rtrim
: Trims the spaces from right end for the specified string value. Optionally a
trimString
can be specified.
soundex
: Returns the soundex code for the specified expression.
trim
: Trims the spaces from both ends for the specified string column. Optionally a
trimString
can be specified.
unbase64
: Decodes a BASE64 encoded string column and returns it as a binary column.
This is the reverse of base64.
upper
: Converts a string column to upper case.
levenshtein
: Computes the Levenshtein distance of the two given string columns.
instr
: Locates the position of the first occurrence of a substring (x
)
in the given string column (y
). Returns null if either of the arguments are null.
Note: The position is not zero based, but 1 based index. Returns 0 if the substring
could not be found in the string column.
format_number
: Formats numeric column y
to a format like '#,###,###.##',
rounded to x
decimal places with HALF_EVEN round mode, and returns the result
as a string column.
If x
is 0, the result has no decimal point or fractional part.
If x
< 0, the result will be null.
concat_ws
: Concatenates multiple input string columns together into a single
string column, using the given separator.
format_string
: Formats the arguments in printf-style and returns the result
as a string column.
locate
: Locates the position of the first occurrence of substr.
Note: The position is not zero based, but 1 based index. Returns 0 if substr
could not be found in str.
lpad
: Left-padded with pad to a length of len.
regexp_extract
: Extracts a specific idx
group identified by a Java regex,
from the specified string column. If the regex did not match, or the specified group did
not match, an empty string is returned.
regexp_replace
: Replaces all substrings of the specified string value that
match regexp with rep.
rpad
: Right-padded with pad to a length of len.
substring_index
: Returns the substring from string (x
) before count
occurrences of the delimiter (delim
). If count
is positive, everything the left of
the final delimiter (counting from left) is returned. If count
is negative, every to the
right of the final delimiter (counting from the right) is returned. substring_index
performs a case-sensitive match when searching for the delimiter.
translate
: Translates any character in the src by a character in replaceString.
The characters in replaceString is corresponding to the characters in matchingString.
The translate will happen when any character in the string matching with the character
in the matchingString.
split_string
: Splits string on regular expression.
Equivalent to split
SQL function. Optionally a
limit
can be specified
repeat_string
: Repeats string n times.
Equivalent to repeat
SQL function.
ascii since 1.5.0
base64 since 1.5.0
decode since 1.6.0
encode since 1.6.0
initcap since 1.5.0
length since 1.5.0
lower since 1.4.0
ltrim since 1.5.0
ltrim(Column, character) since 2.3.0
overlay since 3.0.0
rtrim since 1.5.0
rtrim(Column, character) since 2.3.0
soundex since 1.5.0
trim since 1.5.0
trim(Column, character) since 2.3.0
unbase64 since 1.5.0
upper since 1.4.0
levenshtein since 1.5.0
instr since 1.5.0
format_number since 1.5.0
concat_ws since 1.5.0
format_string since 1.5.0
locate since 1.5.0
lpad since 1.5.0
regexp_extract since 1.5.0
regexp_replace since 1.5.0
rpad since 1.5.0
substring_index since 1.5.0
translate since 1.5.0
split_string 2.3.0
repeat_string since 2.3.0
## Not run:
##D # Dataframe used throughout this doc
##D df <- createDataFrame(as.data.frame(Titanic, stringsAsFactors = FALSE))
## End(Not run)
## Not run:
##D head(select(df, ascii(df$Class), ascii(df$Sex)))
## End(Not run)
## Not run:
##D tmp <- mutate(df, s1 = encode(df$Class, "UTF-8"))
##D str(tmp)
##D tmp2 <- mutate(tmp, s2 = base64(tmp$s1), s3 = decode(tmp$s1, "UTF-8"),
##D s4 = soundex(tmp$Sex))
##D head(tmp2)
##D head(select(tmp2, unbase64(tmp2$s2)))
## End(Not run)
## Not run:
##D tmp <- mutate(df, sex_lower = lower(df$Sex), age_upper = upper(df$age),
##D sex_age = concat_ws(" ", lower(df$sex), lower(df$age)))
##D head(tmp)
##D tmp2 <- mutate(tmp, s1 = initcap(tmp$sex_lower), s2 = initcap(tmp$sex_age),
##D s3 = reverse(df$Sex))
##D head(tmp2)
## End(Not run)
## Not run:
##D tmp <- mutate(df, SexLpad = lpad(df$Sex, 6, " "), SexRpad = rpad(df$Sex, 7, " "))
##D head(select(tmp, length(tmp$Sex), length(tmp$SexLpad), length(tmp$SexRpad)))
##D tmp2 <- mutate(tmp, SexLtrim = ltrim(tmp$SexLpad), SexRtrim = rtrim(tmp$SexRpad),
##D SexTrim = trim(tmp$SexLpad))
##D head(select(tmp2, length(tmp2$Sex), length(tmp2$SexLtrim),
##D length(tmp2$SexRtrim), length(tmp2$SexTrim)))
##D
##D tmp <- mutate(df, SexLpad = lpad(df$Sex, 6, "xx"), SexRpad = rpad(df$Sex, 7, "xx"))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, d1 = levenshtein(df$Class, df$Sex),
##D d2 = levenshtein(df$Age, df$Sex),
##D d3 = levenshtein(df$Age, df$Age))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, s1 = instr(df$Sex, "m"), s2 = instr(df$Sex, "M"),
##D s3 = locate("m", df$Sex), s4 = locate("m", df$Sex, pos = 4))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, v1 = df$Freq/3)
##D head(select(tmp, format_number(tmp$v1, 0), format_number(tmp$v1, 2),
##D format_string("%4.2f %s", tmp$v1, tmp$Sex)), 10)
## End(Not run)
## Not run:
##D # concatenate strings
##D tmp <- mutate(df, s1 = concat_ws("_", df$Class, df$Sex),
##D s2 = concat_ws("+", df$Class, df$Sex, df$Age, df$Survived))
##D head(tmp)
## End(Not run)
## Not run:
##D tmp <- mutate(df, s1 = regexp_extract(df$Class, "(\\d+)\\w+", 1),
##D s2 = regexp_extract(df$Sex, "^(\\w)\\w+", 1),
##D s3 = regexp_replace(df$Class, "\\D+", ""),
##D s4 = substring_index(df$Sex, "a", 1),
##D s5 = substring_index(df$Sex, "a", -1),
##D s6 = translate(df$Sex, "ale", ""),
##D s7 = translate(df$Sex, "a", "-"))
##D head(tmp)
## End(Not run)
## Not run:
##D head(select(df, split_string(df$Class, "\\d", 2)))
##D head(select(df, split_string(df$Sex, "a")))
##D head(select(df, split_string(df$Class, "\\d")))
##D # This is equivalent to the following SQL expression
##D head(selectExpr(df, "split(Class, '\\\\d')"))
## End(Not run)
## Not run:
##D head(select(df, repeat_string(df$Class, 3)))
##D # This is equivalent to the following SQL expression
##D head(selectExpr(df, "repeat(Class, 3)"))
## End(Not run)


This vignette provides a brief overview of the most important functions in eia
. Other vignettes go into greater depth on specific topics and API endpoints.
Obtaining an API key is easy and free.
Pulling data from the US Energy Information Administration (EIA) API requires a registered API key. A key can be obtained at no cost here. A valid email and agreement to the API Terms of Service is required to obtain a key.
It is important to store your API key somewhere secure. Do not commit it to a repository or otherwise share it. For example, you could store it in your .Renviron
file.
You can always provide the key
argument to every API function call, but you do not have to. There are getter and setter helpers available to make using eia
functions a more seamless experience.
eia_set_key
gives you the option of storing your key for the duration of your R session.
If the key already exists in the system environment and you plan to pass key
to functions explicitly, you could start as follows.
key <- Sys.getenv("EIA_KEY")
# or:
key <- eia_get_key()
In general, however, if your key is set globally such as in .Renviron
, you do not need to do anything regarding the key when you use the package. See the vignette on API details for more information about all the options you have for key storage.
Once you have your EIA registered API key and have it in place for your R session by whichever method you prefer, you are ready to begin accessing data from the EIA API.
It is helpful to be aware of various categories of data that are available. Each category has a unique ID number that is required to access associated data. The first call below does not include an ID. The result is a list of two data frames. The first is metadata associated with that position in the category hierarchy. The second is the child category information.
Here is the top-level category information.
eia_cats()
#> $category
#> # A tibble: 1 x 3
#> category_id name notes
#> <chr> <chr> <chr>
#> 1 371 EIA Data Sets ""
#>
#> $childcategories
#> # A tibble: 14 x 2
#> category_id name
#> <int> <chr>
#> 1 0 Electricity
#> 2 40203 State Energy Data System (SEDS)
#> 3 714755 Petroleum
#> 4 714804 Natural Gas
#> 5 711224 Total Energy
#> 6 717234 Coal
#> 7 829714 Short-Term Energy Outlook
#> 8 964164 Annual Energy Outlook
#> 9 1292190 Crude Oil Imports
#> 10 2123635 U.S. Electric System Operating Data
#> 11 2134384 International Energy Data
#> 12 2251604 CO2 Emissions
#> 13 2631064 International Energy Outlook
#> 14 2889994 U.S. Nuclear Outages
The child category IDs can be used to query results from that category.
eia_cats(0)
#> $category
#> # A tibble: 1 x 4
#> category_id parent_category_id name notes
#> <chr> <chr> <chr> <chr>
#> 1 0 371 Electricity ""
#>
#> $childcategories
#> # A tibble: 19 x 2
#> category_id name
#> <int> <chr>
#> 1 1 Net generation
#> 2 35 Total consumption
#> 3 32 Total consumption (Btu)
#> 4 36 Consumption for electricity generation
#> 5 33 Consumption for electricity generation (Btu)
#> 6 37 Consumption for useful thermal output
#> 7 34 Consumption for useful thermal output (Btu)
#> 8 1017 Plant level data
#> 9 38 Retail sales of electricity
#> 10 39 Revenue from retail sales of electricity
#> 11 40 Average retail price of electricity
#> 12 1718389 Number of customer accounts
#> 13 41137 Fossil-fuel stocks for electricity generation
#> 14 41138 Receipts of fossil fuels by electricity plants
#> 15 41139 Receipts of fossil fuels by electricity plants (Btu)
#> 16 41140 Average cost of fossil fuels for electricity generation
#> 17 41141 Average cost of fossil fuels for electricity generation (per Btu)
#> 18 41142 Quality of fossil fuels in electricity generation : sulfur content
#> 19 41143 Quality of fossil fuels in electricity generation : ash content
Time series data is obtained by series ID. Most columns contain metadata. The data
column contains the time series data.
library(dplyr)
library(tidyr)
library(ggplot2)
id <- "ELEC.GEN.ALL-AK-99.A"
(x <- eia_series(id, start = 2010, end = 2019))
#> # A tibble: 1 x 13
#> series_id name units f description copyright source iso3166 geography start end updated data
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <list>
#> 1 ELEC.GEN.ALL~ Net generation : all fu~ thousand m~ A "Summation of all fuels used for~ None EIA, U.S. Energy I~ USA-AK USA-AK 2001 2019 2020-10-27T~ <tibble ~
x$data[[1]]
#> # A tibble: 10 x 3
#> value date year
#> <dbl> <date> <int>
#> 1 6071. 2019-01-01 2019
#> 2 6247. 2018-01-01 2018
#> 3 6497. 2017-01-01 2017
#> 4 6335. 2016-01-01 2016
#> 5 6285. 2015-01-01 2015
#> 6 6043. 2014-01-01 2014
#> 7 6497. 2013-01-01 2013
#> 8 6946. 2012-01-01 2012
#> 9 6871. 2011-01-01 2011
#> 10 6760. 2010-01-01 2010
select(x, units, data) %>% unnest(cols = data) %>%
ggplot(aes(factor(year), value)) + geom_col() +
labs(x = "Year", y = x$units[1], title = "Net Alaska electricity generation",
subtitle = "From all fuels", caption = x$description[1])
You can provide arguments like the following:
eia_series(id) # max results
eia_series(id, n = 5) # most recent five
eia_series(id, end = 2016, n = 5) # ending in 2016
eia_series(id, start = 2000, end = 2016) # specific period
As with eia_cats
, the output format does not need to be tidy:
eia_series(id, n = 5, tidy = FALSE) # results of jsonlite::fromJSON
eia_series(id, n = 5, tidy = NA) # origina JSON as character string
This allows you to use the returned results with existing code you may have that requires data in one of these less processed structures.
Geosets are metadata structures organizing time series datasets that can be mapped. Arguments to eia_geoset
are the same as eia_series
with the addition of region
. Like id
, region
can be a vector. Most of the details are the same as before.
In the example below using total electricity generation, get the last two data points for each of and two US states. dplyr
and tidyr
are used here to clean up the result a bit for purposes of display. gpplot2
is used to graph the data after it has been unnested for each state.
id <- c("ELEC.GEN.ALL-99.M") # monthly
region <- c("USA-CA", "USA-NY")
(x <- eia_geoset(id, region, start = "201801", end = "201812"))
#> # A tibble: 2 x 11
#> geoset_id setname f units series_id name region latlon start end data
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <list>
#> 1 ELEC.GEN.ALL-9~ Net generation : all fuels : all s~ M thousand megawa~ ELEC.GEN.ALL-CA~ Net generation : all fuels : California :~ USA-CA <NA> 2001~ 2020~ <tibble [12~
#> 2 ELEC.GEN.ALL-9~ Net generation : all fuels : all s~ M thousand megawa~ ELEC.GEN.ALL-NY~ Net generation : all fuels : New York : a~ USA-NY <NA> 2001~ 2020~ <tibble [12~
select(x, region, data) %>% unnest(cols = data)
#> # A tibble: 24 x 5
#> region value date year month
#> <chr> <dbl> <date> <int> <int>
#> 1 USA-CA 14364. 2018-12-01 2018 12
#> 2 USA-CA 14605. 2018-11-01 2018 11
#> 3 USA-CA 16864. 2018-10-01 2018 10
#> 4 USA-CA 17592. 2018-09-01 2018 9
#> 5 USA-CA 20994. 2018-08-01 2018 8
#> 6 USA-CA 22356. 2018-07-01 2018 7
#> 7 USA-CA 17514. 2018-06-01 2018 6
#> 8 USA-CA 15932. 2018-05-01 2018 5
#> 9 USA-CA 14811. 2018-04-01 2018 4
#> 10 USA-CA 14039. 2018-03-01 2018 3
#> # ... with 14 more rows
unnest(x, cols = data) %>%
ggplot(aes(date, value, color = region)) + geom_line() +
labs(y = x$units[1], title = "Net electricity generation", subtitle = "From all fuels")
Another convenience of eia_geoset
is the ability to provide regions in the following forms.
These shortcuts make it easier to construct an API call involving several states.
region <- c("AK", "New England")
x <- eia_geoset(id, region, n = 2)
select(x, region, data) %>% unnest(cols = data)
#> # A tibble: 14 x 5
#> region value date year month
#> <chr> <dbl> <date> <int> <int>
#> 1 USA-AK 534. 2020-08-01 2020 8
#> 2 USA-AK 626. 2020-07-01 2020 7
#> 3 USA-CT 4001. 2020-08-01 2020 8
#> 4 USA-CT 4443. 2020-07-01 2020 7
#> 5 USA-MA 2200. 2020-08-01 2020 8
#> 6 USA-MA 2754. 2020-07-01 2020 7
#> 7 USA-ME 861. 2020-08-01 2020 8
#> 8 USA-ME 962. 2020-07-01 2020 7
#> 9 USA-NH 1632. 2020-08-01 2020 8
#> 10 USA-NH 1794. 2020-07-01 2020 7
#> 11 USA-RI 889. 2020-08-01 2020 8
#> 12 USA-RI 845. 2020-07-01 2020 7
#> 13 USA-VT 194. 2020-08-01 2020 8
#> 14 USA-VT 203. 2020-07-01 2020 7
region <- "Middle Atlantic"
x <- eia_geoset(id, region, n = 12)
select(x, region, data) %>% unnest(cols = data)
#> # A tibble: 36 x 5
#> region value date year month
#> <chr> <dbl> <date> <int> <int>
#> 1 USA-NJ 6639. 2020-08-01 2020 8
#> 2 USA-NJ 7385. 2020-07-01 2020 7
#> 3 USA-NJ 5721. 2020-06-01 2020 6
#> 4 USA-NJ 4169. 2020-05-01 2020 5
#> 5 USA-NJ 4334. 2020-04-01 2020 4
#> 6 USA-NJ 4469. 2020-03-01 2020 3
#> 7 USA-NJ 4912. 2020-02-01 2020 2
#> 8 USA-NJ 5488. 2020-01-01 2020 1
#> 9 USA-NJ 6193. 2019-12-01 2019 12
#> 10 USA-NJ 5510. 2019-11-01 2019 11
#> # ... with 26 more rows
unnest(x, cols = data) %>%
ggplot(aes(date, value, color = region)) + geom_line() +
labs(y = x$units[1], title = "Net electricity generation", subtitle = "From all fuels")
Even more convenient is that these names are available in R. See the datasets::state.*
functions and the geoset vignette.


Here is a great MSDN article on some Silverlight tips, tricks, and best practices: http://msdn.microsoft.com/msdnmag/issues/08/LA/WickedCode/default.aspx
--- layout: post title: "Silverlight Tips, Tricks and Best Practices" date: 2008-02-28T16:02:00-07:00 categories: - Web - New Technology - .NET - Silverlight - UI - Microsoft ---
Here is a great MSDN article on some Silverlight tips, tricks, and best practices: http://msdn.microsoft.com/msdnmag/issues/08/LA/WickedCode/default.aspx


Zamfara killings: APC condoles with victims’ families
by The Eagle OnlineThe Zamfara Chapter of the All Progressives Congress has condoled with families of victims of Sunday’s bandits’ attacks in Karaye village, Gummi Local Government Area of the state.
The state APC Chairman Alhaji Lawal Liman, in a statement issued in Gusau on Tuesday, described the attack as unfortunate and worrisome.
The News Agency of Nigeria reports that 14 persons were killed and 10 others injured in the attack.
“On behalf of the entire members of APC in the state, I am using this medium condole the families of those who lost their lives to the incident.
“I pray to almighty Allah to give the families of the victims the fortitude to bear the loss and make it easy for those who were injured”, he said.
Liman urged people of the state to continue to pray to God for sustainable peace and stability to the state.
Previous Post
Kogi, Bayelsa polls: PDP calls for investigation into violence
Next Post
ICPC recommends suspension of public officers under investigation


---
layout: post
title: Swipe zepto port
tags:
- Github
- JavaScript
- javascript
- jquery
- zepto
status: publish
type: post
published: true
meta:
aktt_notify_twitter: 'no'
_edit_last: '2'
---
After many moons and a series of Postalicious links, finally a blog post! Over Easter, I stumbled across a swipe library that allows you to create a swipe-able interface a la Path. Since I am working quite a bit with ZeptoJS these days I had a stab at porting it over. You can find my fork here.
Torkil has kindly merged some of the changes I have into his repo. Go check out Torkil's work, it's pretty awesome!


{% extends "console/console.html" %} {% block console_body %} {% include "console/components/notifications/breadcrumbs.html" with base_page="Settings" base_page_url="/settings" current_page="Notifications" %} Notification Settings Off On Notifications {% endblock console_body %}


Countries and States(Provinces): Canada | British Columbia; The United States | Idaho, Oregon, Washington, Montana, Nevada, Utah, and Wyoming
Coverage: 668,000 sq kilometer or 258,000 sq mile
Types of Environment: alpine and subalpine environments, montane forests, lava fields, semiarid grasslands, and low-elevation rainforests
Dams: 60 dams in the watershed with 14 on the main stream
Challenges: planning and management
Issues: hydroelectric dams, environment, and Native American culture
Major Events
Source:Columbia River Inter-Tribal Fish Commission
Contact Me
Yingqi Tang | Oregon State University
Geography M.S. Candidate
Email<EMAIL_ADDRESS>Location: Covallis, Oregon
River History
Map Source:USGS, StreamNet
Economic projects, such as dams for hydropower development, are a popular choice among countries with abundant water resources. When the United States faced the Great Depression at the 1930s, constructing dams on the Columbia River fulfilled the need for employment. The United States completed two dams, the Bonneville Dam and the Grand Coulee Dam. Later, more dams have been built in the basin.
In 1948, Vanport city was dramatically destroyed at 4:05 p.m. on May 30, 1948, when a 200-foot (61 m) section of the dike holding back the Columbia River collapsed during a flood, killing 15. The city was underwater by nightfall leaving its inhabitants homeless.
Canada agreed to build three dams with 15.5 million acre feet (maf) of storage and coordinate the operation of these new storage facilities with the U.S. hydroelectric power supply system in order to optimize hydroelectric power production and to provide flood control. The effect of these storage reservoirs is to move the annual flooding from the downriver areas to the upper Columbia Basin.
Canada guaranteed 8.45 maf (increased later to 8.95 maf) of flood control space in the three reservoirs to reduce flooding risks in the U.S. Additional storage space is “on call” in the Canadian reservoirs to help control large floods in the U.S.
Canada is entitled to 50% (Canadian Entitlement) of the additional power generated in the U.S. because of the new Canadian storage (additional power generated is “downstream benefits”).
-->
Canada sold the first 30 years of the Canadian Entitlement to a U.S. consortium for almost $254 million. The U.S. now delivers the Canadian Entitlement to BC in both energy (approximately 500 average megawatts) and peak capacity (approximately 1,200 megawatts). BC largely sells this power on the Westwide wholesale power market, annual value of $150 million to $300 million depending on power prices.
The U.S. was allowed to build Libby Dam, with 5 maf of storage, with 42 miles of the 90-mile long reservoir backing up into Canada. Each country keeps the downstream flood control and power benefits from Libby realized in their country. Termination of the Treaty does not affect the Libby authorization.
The U.S. paid Canada almost $65 million in the 1960s for the flood control benefits from the Canadian projects, representing 50% of the estimated value of the flood control losses avoided in the U.S. from 1968 through September 2024.
-->
After September 2024, if there are no changes to the Treaty, Canada’s obligation to guarantee 8.95 maf of flood control space to the U.S. expires. This is replaced in the Treaty by an obligation on the part of Canada to provide flood control when “called-upon” in years when the U.S. cannot effectively manage flood risk with the use of its own projects, with the U.S. paying the costs of the operation. In any event, the U.S. will incur additional costs and obligations in order to receive flood control benefits from Canada.
The construction and operation of the Treaty storage dams has had an adverse effect on the fish and wildlife, riparian, water quality, and cultural resources of the Columbia River, effects and values not recognized or addressed in any formal way in the Treaty. Effective Use and Called Upon operations are likely to result in even greater adverse effects on resident and anadromous fish populations, wildlife and cultural resources. If the Treaty is not modernized, there will be significant additional adverse effects on ecosystem function and the spring freshet available for resident and migratory fish and other species will be dramatically reduced.
Under the terms of the Treaty, in order to “call upon” Canada to provide flood control storage after September 2024, the U.S. will first have to operate its reservoirs for “effective use” for flood control. Under this scenario, federal projects, such as Grand Coulee, Dworshak, Brownlee, Libby, Hungry Horse, and other storage reservoirs in the Columbia Basin, may need to operate at much lower elevations in January through May to make room for the spring runoff.
If the Treaty is not terminated or modernized, the U.S. will remain obligated to return the Canadian Entitlement, the Canadian share of the downstream power benefits.
In developing this coordinated system operation under the Treaty with Canada, the U.S. did not consult with the tribes nor consider the effect of the Treaty on the tribes’ cultural and natural resources. Not only were the tribes not consulted during the Treaty’s negotiation, the tribes have also been excluded from its governance and implementation. The Treaty does not specifically allow for considerations of critical tribal cultural resources. The coordinated power and flood control system created under the Treaty degraded multiple ecosystem functions of rivers, First Foods, natural resources, and tribal customs and identities. The Treaty limits what can be accomplished with non-Treaty water agreements to address these issues and meet tribal resource priorities.
Neither the development nor the implementation of the Treaty have involved the people and communities of the Columbia River Basin in any significant degree. Yet river management decisions under the domestic law and policy of both nations include a high degree of public engagement and involvement. Developing and implementing a modernized Treaty will have to accommodate this change in some fashion.
(Text source from Columbia River Inter-Tribal Fish Commission)
Fifteen tribes are located in the Columbia River Basin. Tribal communities face problems of high unemployment and poverty. Salmon is a significant economic activity for Native Americans. Also, salmon are part of the tribes’ spiritual and culture identity. Many tribes’ members in the Basin area still prefer fishing for livelihood.
First Food -- Salmon are one of the traditional “First Foods” that are honored at tribal ceremonies. The other First Foods are wild game, roots, berries, and pure water.
A traditional salmon bake outside the Museum at Warm Springs
Source:Terry Richard/The Oregonian
1930s painting of Indians fishing at Celilo Falls, as they had for thousands of years prior to white settlement of the Oregon Country.
Source:WyEast Blog
Indians fishing Celilo Falls with dip nets in the early 1900s, prior to construction of dams at Bonneville and The Dalles.
Source:WyEast Blog
1930s rendering of Indian fisherman working the narrows below Celilo Falls
Source:WyEast Blog
Besides the impacts from the 1964 treaty, climate change is another significant threat to the river health and the tribal communities. In the treaty review section, a climate adaptation plan is a new factor to consider and a way to align with the tribal interests.
The Columbia River mainstream has fourteen dams in total. Between the deep gorges, the significant elevation gradient provides prime conditions for salmon survival and reproduction. The great slope also offers excellent conditions for hydropower projects. However, the construction of hydropower dams affects the salmon population in the mainstream and the Snake River tributary. Dams alter salmon’s migration routes and speeds. Even though fish ladders beside dams can provide a way back upstream, adult salmon need to navigate around to find the path.
A lonely fish
Source:Yingqi Tang
Four Dams in The Lower Snake River
--water security? food security? energy security? cultural spirit?
Bonneville Power Administration(BPA): Clean, flexible and reliable. The lower Snake River dams are part of a Northwest energy solution with the capability to generate over 3,000 megawatts of carbon-free power.
What if the lower Snake River dams were breached? BPA answer(2016 report):1)Cost to breach the dams: $1.3 billion to $2.6 billion. 2). Cost to replace lower Snake River dams’ capacity and energy while maintaining system reliability with natural gas: $274 million to $372 million per year 3).Increase in CO2
emissions: 2.0 to 2.6 million metric tons — every year. 4.Social cost of carbon: $98 million to $381 million — every year. 5).Cost to replace the winter critical energy with solar energy: $7.4 billion 6).Amount of solar capacity required to replace theenergy of the dams: 5,311 MW.13 (There is 25,000MW of solar generation installed in the U.S. today 7).“Given the difficulty of reducing CO2 emissions,
discarding existing CO2-free power sources has to be considered counterproductive.” —NW Power and Conservation Council.
Save Our Wild Salmon: In 1855, Natives Peoples of the Northwest signed a treaty with the United States government that ceded most of their lands - lands which currently make up much of Washington, Idaho, and Oregon - in return for the right to have and to fish for salmon and steelhead in their usual and accustomed places. The salmon were, and continue to be, so important to these peoples that their governments were willing to give up the rights they had to large tracks of land in order to ensure that salmon graced the waters of this region forever. The United States’ obligation was simply to ensure that it did not do anything to cause the decline of these fish or to stop the tribal nations from fishing.
The United States has largely failed in its obligation. Thirteen species of salmon and steelhead are listed for protection under the federal Endangered Species Act and many more have already been lost from this planet, many of which were extremely important to tribal cultures. The federal dams on the Columbia and Snake rivers in the Pacific Northwest are a major factor in the decline of these fish and yet the federal government continues to minimize the harm caused by these dams.
While Snake River dam removal would not completely solve the tribal treaty right issues to date, this action would go a long way in helping to restore Snake River salmon to levels necessary to meeting treaty right obligations. Without this action, it is difficult to fathom the suite of actions that would indeed meet these same obligations.
Map source:Transboundary Water Database from Dr. Aaron Wolf | Oregon State University
Cooperation on the Columbia River Basin from all stakeholders is necessary for climate change adaption, flood control, and sustainable economic growth. Since Native Americans have a long history understanding water, taking their opinion into the treaty review process opens an opportunity to indigenous people to develop their shared resources, and reduce conflicts for future water management.
If the treaty does not terminate, the U.S. will continue its obligation to pay Canada. Canada will continue its duty of flood control. Nonetheless, the treaty was signed 53 years ago, if we do not modernize the treaty with proper adjustments and consider new conditions of water management, there will be more significant negative impacts on the ecosystem, salmon population, and tribal economy and culture. Termination of the treaty would affect flood control on the massive river, hydropower dam operation, electricity rates, water flows, irrigation systems, and fishing.
Source:Columbia River Inter-Tribal Fish Commission
Graphic Recording Poster2
Source:Columbia River Inter-Tribal Fish Commission
Graphic Recording Poster3
Source:Columbia River Inter-Tribal Fish Commission
Graphic Recording Poster4
Source:Columbia River Inter-Tribal Fish Commission
--Take Away--
1). Indigenous people matter and should be provided an opportunity to speak up.
2). Water management plans should be adjusted based on changes of society and ecosystems.
3). Transboundary water management is a challenge but also a chance to develop a sustainable and healthy river system.
4). Treaties are a way to regulate stakeholders' obligations and provide benefits, but should consider long-term effects of any river channel modification.
5). Negative impacts from the dams are evident. Dams with small power capacity can be removed for river restoration.


?6
7
8
9
10
'
.
,,
The
New
York
copyright
reserved
botanical
Garden
BOTANICAL
GARDE**
NEW
YORK
BOTANICAL
PARPEN
01071737
FLORA
OF
PUERTO
RICO
UNIVERSIDAD
DE
PUERTO
RICO
-
RIO
PIEDRAS
(UPRRP)
Jasminum
multiflorum
(Burman
f.)
Andr
.
tlOCA:
Bo.
Cruz,
off
Rt
404,
km
3.8
on
coffee
farm.
Second-growth
forest.
Elev.
c.
100
m.
18¡21.?0ÕN
67¡05.75ÕW.
Shrub
(3
m).
white,
fragrant
fl.
Ornamental
hedge.
2
Oct
1994
0LEACEAE
F.
Axelrod
8310
11.
Nir
01071737
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


This is an automated email from Machine Learning for Kids.
You're receiving this email because you created a class account with Machine Learning for Kids.
A regular check of the Watson Assistant credentials that you provided for use by Machine Learning for Kids found a machine learning model (what Assistant calls a "workspace") that isn't known to Machine Learning for Kids.
The workspace ID is: {{{ workspace }}}
How could this happen?
Reason 1)
You're using your Watson Assistant credentials for other things as well as Machine Learning for Kids, and you intentionally created another workspace for another reason.
That's fine! Just ignore this email.
But be aware that they count towards the limits that IBM Cloud enforces for your credentials, so that will mean one fewer model that can be created by your students.
Reason 2)
Something went wrong when the workspace was being deleted and it was left behind accidentally.
It should be deleted as it counts towards the limits that IBM Cloud enforces for your credentials, and so will mean one fewer model that your students can create.
You can do that from machinelearningforkids.co.uk/#!/teacher/projects
You won't be notified about this workspace again.
Kind regards
--
machinelearningforkids.co.uk
PS - If you get these emails too often because of reason 1 (you're using your IBM Cloud credentials for other things, and frequently have Watson Assistant workspaces outside of Machine Learning for Kids) and would like to disable them, please let me know. These emails are intended to be helpful, and prevent any unexpected surprises when you're in front of your class. But if they're not helpful, I can turn them off for your class.


Neuro-Sim
A simulation of biological neurons
Some teaser screenshots
In this article I am presenting a neuron simulator and study tool. Typically, neuron simulation is either highly idealized, consisting of an input layer, one or more hidden layers, and an output layers. Signals propagate through the network based on weighting and summation thresholds. This diagram is a basic example:
(from http://www.scielo.br/scielo.php?pid=S0100-06832013000100010&script=sci_arttext)
Conversely, other neuron simulators will be very low level, simulating the sodium, potassium, and calcium channels. You can read more about that, but here's a start: http://www.ncbi.nlm.nih.gov/books/NBK26910/
What this article presents is a middle ground, where the electrical characteristics of input stimulus (either excitatory or inhibitory) affects the action potential. Also, neuron characteristics such as its refractory period (the time it takes to recover from an action potential) are simulated. An approximate plot of a typical action potential looks like this:
(from https://en.wikipedia.org/wiki/Action_potential)
In the software presented here, a typical plot looks like this (it's not nearly as nicely curvy):
Idealized Action Potential in Neuro-Sim of a "pacemaker" Neuron
Neuro-Sim let's you play around with specific neural configurations:
Simulating a reflex action
as well as playing around with full networks, which can be quite mesmerizing to watch:
Snapshot of a neural network in action
The reason for the excellent Yogi Berra quote at the beginning of this article is that, while there is much we know about neurons, there are also a lot of theories out there (and quite frankly, unknowns) as to how a cluster of neurons results in consciousness, the ability to think, and so forth. Also, keep in mind that most studies of neurons are invasive, requiring probes to measure membrane potential and/or electrically stimulate neurons. The practice of actually implementing is neural network capable of, well, thinking, is still, as far as I'm concerned, in the realm of theory.
I originally wrote a very similar simulator back (in C++) in the days of the 80286 processor (30 years ago, oh wow), running at 8 Mhz, and it was significant improvement to add in an 80287 math co-processor! At that time, I was only able to simulate a 20x20 grid of neurons, and at that, it chunked along. The simulator presented here easily handles over 8000 neurons, and that's running on a single thread, including UI updates, on my 2.3Ghz i7 laptop. So, this has been one of those back-burner projects I've been wanting to resurrect for years and I'm happy to have finally gotten around to it. What surprised me the most in implementing this on today's computer is that I had expected to have to implement the neuron "sum and fire" computations in threads, batching them across available CPU's. This was not the case! All the neuron calculations run in the application's main thread. For larger networks I would expect that I would need to balance the workload across multiple CPU's, but I haven't tested that implementation yet.
A variety of qualities of a neuron are not simulated. If the terms used here are unfamiliar, read the next section "Neurons: A Crash Course". Most notably, Neuro-Sim does not account for:
Propagation time along the axon.
Myelinated vs. un-myelinated axons (affects propagation time).
Location of receptor on the dendrite or soma (affects how the localized membrane potential change affects the axon hillock).

Pre-synaptic facilitation or inhibition -- rather than connecting directly to the dendrite or cell body, some synapses will connect to the pre-synaptic node of the pre-synaptic neuron, facilitating or inhibiting a specific synapse.
There is no specific time basis -- the program implements a measureless "tick" in which all summations occur, followed by any action potential "firing." The recovery rates are based on changes per "tick" with no regard to what unit of time a "tick" actually is.
Given these limitations, very interesting networks and studies can still be created.
This simulator does not implement any "learning" algorithms. The concept of neural network learning, from a biological perspective, is very complicated and poorly understood, and includes such concepts as:
synaptogenesis - the formation of synapses between neurons. This occurs through life but is most predominant in early brain development and also involves "synaptic pruning" -- eliminating synapses, which normally occurs between birth and puberty.
neurogenesis - the creation of neurons from neural stem cells or progenitor cells. Again, this is most active in pre-natal development but there's some evidence that it occurs in adults as part of learning and memory.
Hebbian theory2 (neuro-plasticity) - the effectiveness of a synapse can be increased or decreased depending on the temporal correlation of the action potential between the pre-synaptic and post-synaptic neuron. Meaning, if the pre-synaptic neuron fires and the post-synaptic also fires within a specific time span, then the synapse is strengthened. If the pre-synaptic neuron fires but the post-synaptic neuron does not (or the post-synaptic neuron fires while a pre-synaptic neuron doesn't) then the synapse strength is decreased.
changes in myelination -- some theories / studies indicate that learning also involves improving a neuron's efficacy through myelination, even in adults (sorry, no reference.)
There are other theories and studies as well, but these are the predominant ones. None of them adequately explain what "learning" is, and how the associated role of "memory" works, but they are interesting first-order concepts to play with. Perhaps a future implementation will address these ideas.
There's a few terms that one needs to know about with regards to neurons. This section is a crash course in neurons, and is by no means complete. I'm going to heavily reference wikipedia for various definitions here (yes, I've made a donation to them.) While I reference Wikipedia a lot here, the basis for Neuro-Sim comes from the book Principles of Neuroscience, now in its fifth edition (the book I'm using is the second edition!) This book is so seminal it has its own webpage.
"A neuron (/ˈnjʊərɒn/ nyewr-on or /ˈnʊərɒn/ newr-on; also known
as a neurone or nerve cell) is an electrically excitable cell that processes and
transmits information through electrical and chemical signals. These signals
between neurons occur via synapses, specialized connections with other cells.
Neurons can connect to each other to form neural networks. Neurons are the core
components of the brain and spinal cord of the central nervous system (CNS), and
of the ganglia of the peripheral nervous system (PNS). Specialized types of
neurons include: sensory neurons which respond to touch, sound, light and all
other stimuli affecting the cells of the sensory organs that then send signals
to the spinal cord and brain, motor neurons that receive signals from the brain
and spinal cord to cause muscle contractions and affect glandular outputs, and
interneurons which connect neurons to other neurons within the same region of
the brain, or spinal cord in neural networks.
A typical neuron consists of a cell body (soma), dendrites, and an axon."1
It's not entirely accurate to say a neuron is electrically excitable because the actual communication between neurons is usually chemical -- neurotransmitters are released in the pre-synaptic cleft of an excited neuron and are received at the post-synaptic cleft of a receiving neuron, which affects the local membrane potential of the receiving neuron. There are also many kinds of neurons, each with different behaviors, including neurons that do connect electrically rather than chemically.
"Dendrites (from Greek δένδρον déndron, "tree") (also dendron) are the branched projections of a neuron that act to propagate the electrochemical stimulation received from other neural cells to the cell body, or soma, of the neuron from which the dendrites project. Electrical stimulation is transmitted onto dendrites by upstream neurons (usually their axons) via synapses which are located at various points throughout the dendritic tree. Dendrites play a critical role in integrating these synaptic inputs and in determining the extent to which action potentials are produced by the neuron."3
A synaptic connection at a dendrite usually results in a local membrane potential change, either excitatory or inhibitory. This change propagates to the axon hillock (see below) for summation. Depending on the distance, the actual potential change at the axon hillock will be less than that at the location of the synapse. This affect is not simulated in Neuro-Sim.
"An axon (from Greek ἄξων áxōn, axis), also known as a nerve fibre, is a long, slender projection of a nerve cell, or neuron, that typically conducts electrical impulses away from the neuron's cell body. The function of the axon is to transmit information to different neurons, muscles and glands...Axons make contact with other cells—usually other neurons but sometimes muscle or gland cells—at junctions called synapses. At a synapse, the membrane of the axon closely adjoins the membrane of the target cell, and special molecular structures serve to transmit electrical or electrochemical signals across the gap...A single axon, with all its branches taken together, can innervate multiple parts of the brain and generate thousands of synaptic terminals."4
Some of the more bizarre behaviors of neurons, such as not having an axon where signals transmitting to dendrites, or axons ending in synapses on other axons, are two of many exceptions that are not simulated in Neuro-Sim.
"The axon hillock is the last site in the soma where membrane
potentials propagated from synaptic inputs are summated before being transmitted
to the axon...Both inhibitory postsynaptic potentials (IPSPs) and excitatory
postsynaptic potentials (EPSPs) are summed in the axon hillock and once a
triggering threshold is exceeded, an action potential propagates through the
rest of the axon (and "backwards" towards the dendrites as seen in neural
backpropagation). The triggering is due to positive feedback between highly
crowded voltage-gated sodium channels, which are present at the critical density
at the axon hillock (and nodes of ranvier) but not in the soma.
In its resting state, a neuron is polarized, with its inside at about -70 mV
relative to its surroundings. When an excitatory neurotransmitter is released by
the presynaptic neuron and binds to the postsynaptic dendritic spines, ligand-gated
ion channels open, allowing sodium ions to enter the cell. This may make the
postsynaptic membrane depolarized (less negative). This depolarization will
travel towards the axon hillock, diminishing exponentially with time and
distance. If several such events occur in a short time, the axon hillock may
become sufficiently depolarized for the voltage-gated sodium channels to open.
This initiates an action potential that then propagates down the axon."5
In other words, while of course more complicated, the axon hillock is where localized changes in membrane potential (usually from synapses along the dendrite but also on the cell body itself) are summed. If the membrane potential at the axon hillock (or at the first unmyelinated segment of the axon) exceeds a specific threshold, an action potential occurs -- the neuron fires.
"In the nervous system, a synapse[1] is a structure that permits a neuron (or nerve cell) to pass an electrical or chemical signal to another neuron...Synapses are essential to neuronal function: neurons are cells that are specialized to pass signals to individual target cells, and synapses are the means by which they do so. At a synapse, the plasma membrane of the signal-passing neuron (the presynaptic neuron) comes into close apposition with the membrane of the target (postsynaptic) cell. Both the presynaptic and postsynaptic sites contain extensive arrays of molecular machinery that link the two membranes together and carry out the signaling process. In many synapses, the presynaptic part is located on an axon, but some postsynaptic sites are located on a dendrite or soma."6
The modeling of a synapse is actually quite complex. The spatial location of a synapse is important as the depolarization that occurs locally on post-synaptic neuron diminishes over time and distance as it travels toward the axon hillock (this is not modeled by Neuro-Sim.) In addition, depending on the neurotransmitter and the type of synapse, the neurotransmitter might not be "cleaned up" right away, allowing for continuous depolarization (also not modeled by Neuro-Sim.) As mentioned earlier, pre-synaptic facilitation and inhibition, affecting the pre-synaptic cleft, not the post-synaptic neuron, is possible also (again not modeled by Neuro-Sim.) These are just a few of the interesting characteristics of synapses.
"The refractory periods are due to the inactivation property of voltage-gated sodium channels and the lag of potassium channels in closing. Voltage-gated sodium channels have two gating mechanisms, the activation mechanism that opens the channel with depolarization and the inactivation mechanism that closes the channel with repolarization. While the channel is in the inactive state, it will not open in response to depolarization. The period when the majority of sodium channels remain in the inactive state is the absolute refractory period. After this period, there are enough voltage-activated sodium channels in the closed (active) state to respond to depolarization. However, voltage-gated potassium channels that opened in response to repolarization do not close as quickly as voltage-gated sodium channels; to return to the active closed state. During this time, the extra potassium conductance means that the membrane is at a higher threshold and will require a greater stimulus to cause action potentials to fire. This period is the relative refractory period."7
The salient part here being that there is an absolute refractory period in which the neuron cannot fire again (usually about 1ms) and a relative refractory period in which the action potential threshold is higher. The latter is not modeled by Neuro-Sim.
"The relatively static membrane potential of quiescent cells is called the resting membrane potential (or resting voltage), as opposed to the specific dynamic electrochemical phenomena called action potential and graded membrane potential."8
The resting potential is configurable for specific neuron "studies" and is group assigned in "network" mode.
"The threshold potential is the critical level to which the membrane potential must be depolarized in order to initiate an action potential."9
Under certain conditions, the depolarization of a neuron can occur slowly enough that a higher than normal threshold is required to initiate an action potential. In fact, if the depolarization occurs slowly enough, no level of depolarization will achieve an action potential. This behavior is not modeled in Neuro-Sim. However, the threshold potential is configurable for specific neuron "studies" and is group assigned in "network" mode.
"In physiology, an action potential is a short-lasting event in which the electrical membrane potential of a cell rapidly rises and falls, following a consistent trajectory. Action potentials occur in several types of animal cells, called excitable cells, which include neurons, muscle cells, and endocrine cells, as well as in some plant cells. In neurons, they play a central role in cell-to-cell communication. In other types of cells, their main function is to activate intracellular processes. In muscle cells, for example, an action potential is the first step in the chain of events leading to contraction. In beta cells of the pancreas, they provoke release of insulin.[a] Action potentials in neurons are also known as "nerve impulses" or "spikes", and the temporal sequence of action potentials generated by a neuron is called its "spike train". A neuron that emits an action potential is often said to "fire".10
The action potential value is configurable for specific neuron "studies" and is group assigned in "network" mode.
A pacemaker neuron is a neuron that spontaneously fires at regular intervals. Neuro-Sim uses pacemaker neurons in the network simulations to kick-start (and maintain) network activity. The number of pacemaker neurons is configurable in "network" mode.
An interesting simple "study" network consists of two pacemaker neurons, where one neuron either inhibits or stimulates the other pacemaker neuron. Later on we will see a couple examples of this, achieving simple frequency division and frequency increases in the target pacemaker neuron.
"Myelin is a fatty white substance that surrounds the axon
dielectric (electrically insulating) material that forms a layer, the myelin
sheath, usually around only the axon of a neuron. It is essential for the proper
functioning of the nervous system. It is an outgrowth of a type of glial cell.
The production of the myelin sheath is called myelination. In humans,
myelination begins in the 14th week of fetal development, although little myelin
exists in the brain at the time of birth. During infancy, myelination occurs
quickly, leading to a child's fast development, including crawling and walking
in the first year. Myelination continues through the adolescent stage of life."11
Besides not being able to ever spell this word correctly, myelination is what allows an electrical signal to travel quickly and without degradation down the axon to the pre-synaptic terminals. Without myelination, our nervous system simply would not work.
This is a configurable option for how quickly a neuron returns to its resting potential from the hyperpolarization that occurs after an action potential or an inhibitory input.
This is the level that the membrane potential is set to after an action potential.
This is the rate at which a neuron returns from a depolarization event that did not result in an action potential, back to its resting potential.
There are two simulation modes implemented in Neuro-Sim: network and study.
Network Mode, showing an Action Potential Decay Plot
In network mode, all the neurons are configured the same, however you can control:
the number of connections
the maximum distance (or length of axon) between connections
the connection "radius" -- how dispersed the connections are from the axon endpoint
the number of pacemaker neurons -- the neurons that fire at regular intervals to kickstart the simulation.
There are also to ways of viewing the plot:
Action Potential Decay Plot -- this is illustrated above. When a neuron fires, the plotter will show the neuron as white and over 10 steps decay the neuron's plot through yellow, red, and finally black.
Membrane Potential Plot -- as illustrated below, this plot draws a neuron in:
white when it fires
red during its refractory period
and shades of green (fairly hard to see actually) representing the neuron's membrane potential
black for neurons at their resting potential.
Network Mode, showing a Membrane Potential Plot
Study Mode: A Reflex Simulation
In study mode, the user can create individual neurons with specific characteristics and connections. Each neuron has a "probe" that shows its activity on the scope. The above screenshot illustrates one of the demos, a "reflex" simulation. The configuration values and usage is described later.
Click here for a full-size screenshot of Neuro-Sim on startup.
Let's first deal with the UI. There are two displays: on the left we have either the neural network or the study network (shown below) and on the right we have an oscilloscope ("scope") display of neurons in the study network. Below, there are three tabs:
Neuron - the default neuron configuration
Study - for studying small networks whose state is displayed on the scope
Network - for configuring neuron connectivity and simulating large neural networks
Configuring the Default Neuron
The six values that can be configured for a neuron are:
Resting Potential -- by default, the resting potential is -65mv (millivolts). This represents the acquiescent state of the neuron.
AP Threshold -- this is the action potential threshold -- if the membrane potential at the summation site, the axon hillock, meets or exceeds this value, an action potential occurs (the neuron "fires")
AP Value -- this is the action potential value, by default 40mv.
Ref. Rec. Rate -- this value represents the return to the resting potential as a rate -- the change in membrane potential per "tick."
HP Overshoot -- this is the value subtracted from the resting potential to represent the hyperpolarization after an action potential. The default, 20mv, represents that the hyperpolarization value after an action potential will be -65 - 20, or -85mv.
RP Return Rate -- this value represents the return to the resting potential after depolarization -- the change in membrane potential per "tick." When the neuron is depolarized without achieving the action potential threshold, this value is subtracted from the depolarized membrane potential per "tick", eventually returning the neuron to its resting potential.
These values can be changed in realtime for the "network mode" of the simulation.
Network Mode Configuration Options
In network mode, the following can be configured:
the number of connections
the maximum distance (or length of axon) between connections
the connection "radius" -- how dispersed the connections are from the axon endpoint
the number of pacemaker neurons -- the neurons that fire at regular intervals to kickstart the simulation.
the plot type -- action potential decay plot or membrane potential plot (as described earlier.)
Study Mode Neuron Configuration
In study mode, individual neurons can be added and removed from the network. Each neuron's options can also have a specific configuration:
The six values that can be configured for a neuron are:
RP: Resting Potential -- by default, the resting potential is -65mv (millivolts). This represents the acquiescent state of the neuron.
APT: AP Threshold -- this is the action potential threshold -- if the membrane potential at the summation site, the axon hillock, meets or exceeds this value, an action potential occurs (the neuron "fires")
APV: AP Value -- this is the action potential value, by default 40mv.
RRR: Ref. Rec. Rate -- this value represents the return to the resting potential as a rate -- the change in membrane potential per "tick."
HPO: HP Overshoot -- this is the value subtracted from the resting potential to represent the hyperpolarization after an action potential. The default, 20mv, represents that the hyperpolarization value after an action potential will be -65 - 20, or -85mv.
RPRR: RP Return Rate -- this value represents the return to the resting potential after depolarization -- the change in membrane potential per "tick." When the neuron is depolarized without achieving the action potential threshold, this value is subtracted from the depolarized membrane potential per "tick", eventually returning the neuron to its resting potential.
LKG: Leakage -- this represents a depolarization rate (per "tick") and is used to create a pacemaker neuron
PCOLOR: the scope plot color -- this value is auto-assigned
Conn: the neuron's connections
The connections is a comma delimited list of "connect to" neuron and the post-synaptic membrane potential change in parenthesis. For example:
3(40),4(40),6(40)
indicates that the pre-synaptic neuron connects to neurons 3, 4, and 6 (the neuron number "n" in the screenshot above) and results in a post-synaptic depolarization of 40mv in each case. Excitatory synapses are represented by positive values and inhibitory synapses are represented by negative values. Here, for example, is an inhibitory synapse:
5(-40)
Study Mode Network Plot
In study mode, the network is plotted using an idealized representation of a neuron:
The cell body is represented by a circle.
Excitatory synapses are represented as white triangles.
Inhibitory synapses are represented as black triangles.
Also, when running the simulation, when a neuron fires, the "cell body" (the circle) turns red and goes through the decay as in an action potential decay plot.
After Moving Neurons in the Study Plot
The user can click and drag a neuron "body" (the circle) to create the desired visual plot. The above screenshot shows the same network but with the neurons in different positions. Also, when clicking on a neuron's "body", the corresponding entry in the neuron configuration grid will be selected, which makes it easier to figure out which neuron is what. (Granted, this UI could be improved a lot!)
You start a simulation by clicking on "Resume". You can also pause the simulation by clicking on Pause. When paused, the Step button is enabled. Step will run the simulator until a neuron fires.
I've put together several examples to play with.
A Pacemaker Neuron Example
This is very simple example illustrating the activity of a pacemaker neuron. A pacemaker neuron is useful for seeding a network or simulating external stimulus (as is used in the reflex example).
A Divider Neuron Example
In this example, a simple frequency divider neural "circuit" illustrates how a recurring action potential will result in the post-synaptic neuron summing the action potentials in a graded manner and eventually firing when the post-synaptic neuron's action potential threshold is met.
Decreasing Frequency Example
In this example, a baseline pacemaker neuron (the red trace) is used to illustrate how one pacemaker neuron (the cyan trace) can be used to decrease the firing rate of a second pacemaker neuron (the white trace). This is a nice example of the action of an inhibitory signal, as one can see the inhibitory action (polarization) on the target neuron whenever the pre-synaptic neuron (the cyan trace) fires.
Increasing Frequency Example
Similar to the previous example, a baseline neuron (the red trace) is used to show how a pre-synaptic pacemaker neuron (the cyan trace) increases the frequency of firing of the post-synaptic pacemaker neuron (the white trace.) Here, the pre-synaptic pacemaker neuron acts in an excitatory manner upon the post-synaptic neuron, increasing its firing rate by further depolarizing the neuron.
This is the most interesting example, as it models the knee jerk reflex:
Knee Jerk Reflex (courtesy of http://cbsetextbooks.weebly.com/21-neural-control-and-coordination.html)
In Neuro-Sim, this is modeled as:
Model of Reflex Action
In this example, the neuron attached to the "muscle spindle" (circled in red) has an afferent pathway, connecting to the neuron in the "muscle" that jerks in response to stimulus (green). A signal is also sent to the "brain" which tries to prevent the contraction by exciting a neuron that attempts to activate the muscles at the motor endplate. However, this is not possible because the afferent neuron, via an interneuron, creates an inhibitory reaction, prevent the "brain" from creating a muscle contraction on the nerve attached to the motor endplate.
Scope and Network Trace of the Reflex Action
The above diagram illustrates the scope trace and the neurons that fire. Note the bottom right neuron does not fire because the interneuron is inhibiting it, thus you, as a person, cannot prevent your leg from jerking up!
There really isn't that much to the simulator!
Neurons implement a state machine that determines whether the neuron is integrating (summing excitatory and inhibitory inputs), performing an action potential, or is in the refractory period:
public void Tick() { switch (actionState) { case State.Integrating: Integrate(); Fired = FireOnActionPotential(); if (!Fired) { // Incrementally return to resting potential. int dir = Math.Sign(config.RestingPotential - CurrentMembranePotential); // Get the min delta so that we return exactly to the resting potential on the last step. if (dir == -1) // current membrane potential > resting potential, so return at some rate to the resting potential. { CurrentMembranePotential += config.RestingPotentialReturnRate; } break; case State.Firing: Fired = false; ++actionState; // hold for one 1 tick break; case State.RefractoryStart: // refactory period start CurrentMembranePotential = config.RestingPotential - config.HyperPolarizationOvershoot; ++actionState; break; case State.AbsoluteRefractory: // refactory period, linear ramp back to the resting potential. CurrentMembranePotential += config.RefractoryRecoveryRate; if (CurrentMembranePotential >= config.RestingPotential) { // Done with absolute refractory period. inputs.Clear(); // The neuron doesn't integrate any inputs during the absolute refractory period. actionState = State.Integrating; } break; case State.RelativeRefractory: // Not implemented. break; } }
The math is all integer based. Whole number "potentials" are represented in the upper 24 bits of the integer, while the fractional component is represented in the lower 8 bits. This (theoretically) speeds up the processing of the integration, as we can stay completely within integer math. The concept is illustrated by seeing how the default neuron is configured:
public NeuronConfig() { RestingPotential = -65 << 8; ActionPotentialThreshold = -35 << 8; ActionPotentialValue = 40 << 8; RefractoryRecoveryRate = 1 << 8; HyperPolarizationOvershoot = 20 << 8; RestingPotentialReturnRate = -8; }
The performance of network plots is improved by using the FastPixel implementation that CPian "ratamoa" proved in, yes, 2006, in this article. This allows for fast pixel writes:
public void Plot(FastPixel fp, Point location, Color color) { fp.SetPixel(location, color); fp.SetPixel(location + new Size(1, 0), color); fp.SetPixel(location + new Size(0, 1), color); fp.SetPixel(location + new Size(1, 1), color); }
where each neuron is plotted as a 2x2 box.
The neurons in the study network are rendered using the standard
Graphics
functions. The most complicated code is here, in calculating how
to draw the connecting "axon" and "synapse":
protected void DrawSynapse(Pen pen, Graphics gr, Point start, Point end, Connection.CMode mode) { double t = Math.Atan2(end.Y - start.Y, end.X - start.X); double endt = Math.Atan2(start.Y - end.Y, start.X - end.X); // start at the circumference of the circle. Size offset = new Size((int)(5 * Math.Cos(t)), (int)(5 * Math.Sin(t))); // end at the circumference of the target neuron circle. Point endOffset = new Point((int)(15 * Math.Cos(endt)), (int)(15 * Math.Sin(endt))); end.Offset(endOffset); gr.DrawLine(pen, start + offset, end); // the synapse is a triangle whose base is opposite and perpendicular to the endpoint. double v1angle = t - 0.785398163; double v2angle = t + 0.785398163; Point v1 = new Point((int)(10 * Math.Cos(v1angle)), (int)((10 * Math.Sin(v1angle)))); v1.Offset(end); Point v2 = new Point((int)(10 * Math.Cos(v2angle)), (int)((10 * Math.Sin(v2angle)))); v2.Offset(end); switch (mode) { case Connection.CMode.Excitatory: // A white triangle. gr.DrawLine(pen, end, v1); gr.DrawLine(pen, end, v2); gr.DrawLine(pen, v1, v2); break; case Connection.CMode.Inhibitory: // A black triangle. gr.FillPolygon(brushBlack, new Point[] { end, v1, v2 }, System.Drawing.Drawing2D.FillMode.Winding); break; } }
This involves calculating the angle between the pre-synaptic body and the post-synaptic body, as well as keeping the connection offset by the width the of circle representing the neuron body.
Axons are "virtualized", in that multiple connections all extend in different directions from the pre-synaptic body source, so it appears as if the neuron has multiple axons:
Neuron has One Axon But Looks Like Three
As the above illustrates, it looks like the neuron on the left has three axons connecting to three other neurons -- this is a convenience for drawing the network.
As a preliminary simulation of a neuron's membrane potential through integration, action, and refractory periods, Neuro-Sim is a fun and interesting tool to use to play with simple neuron networks. In find the "network mode" is quite mesmerizing to watch but for the moment it doesn't represent anything concrete. Adding external stimuli (sound, images, etc) is perhaps a next logical step, as well as exploring learning and memory.
1 - Neuron:
https://en.wikipedia.org/wiki/Neuron
2 - Hebbian Theory:
https://en.wikipedia.org/wiki/Hebbian_theory
3 - Dendrite:
https://en.wikipedia.org/wiki/Dendrite
4 - Axon:
https://en.wikipedia.org/wiki/Axon
5 - Axon Hillock:
https://en.wikipedia.org/wiki/Axon_hillock
6 - Synapse:
https://en.wikipedia.org/wiki/Synapse
7 - Refractory Period: https://en.wikipedia.org/wiki/Refractory_period_(physiology)
8 - Resting Potential:
https://en.wikipedia.org/wiki/Resting_potential
9 - Threshold Potential:
https://en.wikipedia.org/wiki/Threshold_potential
10 - Action Potential:
https://en.wikipedia.org/wiki/Action_potential
11 - Myelination:
https://en.wikipedia.org/wiki/Myelin


Enter a URL for a DICOM P10 object below to view it using cornerstone.
This example illustrates how to use the cornerstoneWADOImageLoader to get a DICOM P10
SOP instance using HTTP and display it in your web browser using cornerstone.
Not all transfer syntaxes are currently supported,
click here for the full list.
For WADO-URI requests,
you can request that the server return the SOP Instance in explicit little endian by
appending the following query string to your URL:
&transferSyntax=1.2.840.10<IP_ADDRESS>
Use the query string parameter frame to specify which frame to display from a multiframe
object (defaults to the first frame if not specified). ?frame=2
--disable-web-security
to allow cross origin requests.
See the Enable CORS site for information about CORS.
Looking for a CORS proxy? Try CORSProxy
Use of this example require IE10+ or any other modern browser.


Uses of Package
org.drip.measure.dynamics
| Package | Description |
|---|---|
| org.drip.execution.latent |
Correlated Latent Market State Sequence
|
| org.drip.exposure.csadynamics |
CSA Numeraire Basis/Measure Dynamics
|
| org.drip.measure.dynamics |
Jump Diffusion Evolution Evaluator Variants
|
| org.drip.measure.joint |
Rd Vertex Edge Realization Evolution
|
| org.drip.measure.process |
Jump Diffusion Evolver Process Variants
|
-
Classes in org.drip.measure.dynamics used by org.drip.execution.latent Class Description DiffusionEvaluatorOrnsteinUhlenbeck DiffusionEvaluatorOrnsteinUhlenbeck evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Ornstein Uhlenbeck Process. -
Classes in org.drip.measure.dynamics used by org.drip.exposure.csadynamics Class Description DiffusionEvaluatorLogarithmic DiffusionEvaluatorLogarithmic evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Logarithmic Process.DiffusionEvaluatorMeanReversion DiffusionEvaluatorMeanReversion evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Mean Reversion Process. -
Classes in org.drip.measure.dynamics used by org.drip.measure.dynamics Class Description DiffusionEvaluator DiffusionEvaluator implements the Drift/Volatility Evaluators for R1 Random Diffusion Process.DiffusionEvaluatorLinear DiffusionEvaluatorLinear implements the Linear Drift and Volatility Evaluators for R1 Random Diffusion Process.DiffusionEvaluatorLogarithmic DiffusionEvaluatorLogarithmic evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Logarithmic Process.DiffusionEvaluatorMeanReversion DiffusionEvaluatorMeanReversion evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Mean Reversion Process.DiffusionEvaluatorOrnsteinUhlenbeck DiffusionEvaluatorOrnsteinUhlenbeck evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Ornstein Uhlenbeck Process.HazardJumpEvaluator HazardJumpEvaluator implements the Hazard Jump Process Point Event Indication Evaluator that guides the Single Factor Jump-Termination Random Process Variable Evolution.LocalEvaluator LocalEvaluator exposes the Random Evolution's Local/Deterministic Evaluators.SingleJumpEvaluator SingleJumpEvaluator implements the Single Point Jump Event Indication Evaluator that guides the One Factor Jump Random Process Variable Evolution. -
Classes in org.drip.measure.dynamics used by org.drip.measure.joint Class Description LocalEvaluator LocalEvaluator exposes the Random Evolution's Local/Deterministic Evaluators. -
Classes in org.drip.measure.dynamics used by org.drip.measure.process Class Description DiffusionEvaluator DiffusionEvaluator implements the Drift/Volatility Evaluators for R1 Random Diffusion Process.DiffusionEvaluatorOrnsteinUhlenbeck DiffusionEvaluatorOrnsteinUhlenbeck evaluates the Drift/Volatility of the Diffusion Random Variable Evolution according to R1 Ornstein Uhlenbeck Process.HazardJumpEvaluator HazardJumpEvaluator implements the Hazard Jump Process Point Event Indication Evaluator that guides the Single Factor Jump-Termination Random Process Variable Evolution.


Personal Info
ID:
Name:
Add Staff
Logout
Scan Product
This item is still empty. Try to scan or input the id product in to scan product section
Total
Rp 546546546
Pay
Clear all items
Scan Product
ID Product
Add Item
Confirmation Payment
0%
Confirm
Payment
Confirm
Payment
Total
Total Price
Amount
Rp
Changes
Rp 0
Your Items is empty
Try to add items first and then click pay after that.


At the Scheme Workshop held in Baltimore, Maryland, on September 26, 1998, the attendees considered a number of proposals for standardized feature sets for inclusion in Scheme implementations. (Here are the minutes.)
Alan Bawden proposed that there be a repository for library proposals. Shriram Krishnamurthi volunteered to host the library, and Dave Mason and Mike Sperber joined him as initial editors and coordinators of the library process. The term "Request for Implementation," a pun on the Internet "Requests for Comment," was coined at the workshop, and modified to "Scheme Request for Implementation" by the editors.
On November 1, 1998, the srfi minus discuss
mailing list
was established which had as subscribers many major implementors
of Scheme as well as other contributors to the language. An
archive of the discussion is split between
1998-1999 and 2002-present.
The SRFI web site along with the other SRFI procedures was established in late December 1998.
On January 27, 2002, Dave Mason and Shriram Krishnamurthi retired as SRFI editors. At the same time, David Rush and Francisco Solsona joined as new SRFI editors.
On March 14, 2004, David Van Horn joined as a new SRFI editor.
On September 2, 2005, David Rush retired as SRFI editor; at the same time, Donovan Kolbly joined as a new SRFI editor.
On April 21, 2015, Arthur A. Gleckler joined as an editor after Michael announced his coming retirement as editor.
On July 7, 2015, David Van Horn, Donovan Kolbly, Francisco Solona, and Mike Sperber retired.
On the same date, web and email hosting for SRFI was moved based on a new Hosting Plan.
The history of this document is here.


Airboat II: Cyber Boogaloo [Sci Fi VFX Short]
by ZachZachImFilms writes:
Over the past year I've been working on a soft sequel to an effects test I made in 2014, in an effort to push my technical skills. Filmed almost entirely on greenscreen and relying heavily on Blender for the sets, vehicles, and simulations, it took about a year and a half in between work and uni. At this rate, I'll have something really impressive for 2024!


Ten-year-old girl raped and murdered in Jhang | Pakistan - Geo.tv
by Web DeskA father of a ten-year-old girl has registered a case to the police after his ten-year-old daughter was raped and murdered in Jhang on Tuesday.
According to the police, the girl’s father Zafar informed them that his daughter did not return home after going to a local seminary.
The labourer told the police that the family started searching for the girl after she did not return home and later found her dead.
Earlier this month, a minor who was allegedly abducted on her way to Quran lesson at a local mosque near the city's Ali Park a day prior was, in fact, kidnapped by her own father to frame his opponents.


Sitting and Reading
Watching Television
Sitting, inactive in a public place
As a passanger in a car for an hour without a break
Lying down to rest in the afternoon when circumstances permit
Sitting and talking to someone
Sitting quietly after a lunch without alcohol
In a car, while stopped for a few minutes in traffic


{% include image.html align="right" width=275 url="/assets/real-bio-photo.jpg" %}
Fengjun Yang 杨逢君 [Scholar] [Linkedin]
Email: fengjun [att] seas.upenn.edu
Ph.D. Student
Department of Computer and Information Science
University of Pennsylvania


Taiwan - Profile
Facts
- Taiwan, officially called the Republic of China, is a large island straddling the Tropic of Cancer, about 120 miles off the Chinese mainland. Taiwan is a prosperous country, largely due to its exporting industry, and it is also one of unspoilt natural beauty.
- Known all over the world for its yacht-building industry, Taiwan was the first Asian country to mass produce fibreglass boats and its leading position is still unassailed in the Far East. Very few of those yachts return to Taiwan, although every year a number of owners come to take possession of their craft and sail them away. Unfortunately this beautiful island is not geared up for cruising so these new owners have to savour other cruising grounds.
- English is quite common, but a contact who can speak Chinese is a plus, especially when looking for parts, material, etc. People are very helpful and there’s usually someone around who can speak English well enough.
- Repairs can be arranged. But only slipways are usually available or crane. No travel-lift. Workers are usually working on fishing boats and are not accustomed to do fine yachtie finish. Finer work could be arranged via yacht building yards, such as Tayana.
- In most ports, berthing is at a fixed concrete quay (more suited to big ships) but there are floating docks at few places.
- Taiwan is a useful place to experience chinese culture without the heavy bureaucracy involved in visitng the mainland.
Weather
Main Ports


Dashboard
My Profile
My Profile
Profile Information
First Name
Last Name
Email
Mobile No
Eg, +19876543210 (Including + & country code)
Update Profile
Change Password
New Passsword
Update Password
Domain Information
Primary Domain
Set As Primary Domain


342 Sloane St, London, W1D 3NE
<EMAIL_ADDRESS>+44 0330 123 4567
Need help? Contact our support team on
0330 123 4567