discretize.Rd
Discretize a Continuous Matrix to a Discrete Matrix
discretize(mat, rule, right_closed = FALSE)
| mat | A normalize matrix from |
|---|---|
| rule | A list of intervals which provide mapping between continuous values to discrete values. Note the order of intervals determines the order of corresponding discrete levels. |
| right_closed | Is the interval right closed? |
Assuming we have a normalized matrix with both positive values and negative values, we only want to see the enrichment of the windows/regions showing significant positive values and negative values and we are only interested in the direction of the values while not the value itself, then we can define the rule as:
rule = list( "positive" = c(0.5, Inf), "negative" = c(-Inf, -0.5) )
And we can convert the continuous matrix to a discrete matrix and visualize it:
mat2 = discretize(mat, rule) EnrichedHeatmap(mat2, col = c("positive" = "red", "negative" = "green"))
Another example is to discretize the signals to discrete levels according to the intensities:
rule = list( "very_high" = c(100, Inf), "high" = c(50, 100), "intermediate" = c(25, 50), "low" = c(1e-6, 25) )
# There is no example NULL#> NULL


--- layout: default --- {% include navigation.html active="download" %} {% assign strings = site.data.strings[page.lang] %}
Use the instructions below to verify Chia download integrity in a command line.
Run the following command:
certutil -hashfile [location of file] SHA256
For example:
certutil -hashfile C:\Users\%USERNAME%\Downloads\Setup-Win64.exe SHA256
Run the following command:
shasum -a 256 [location of file]
For example:
shasum -a 256 ~/Downloads/Setup-MacOS.dmg
Run the following command:
shasum -a 256 [location of file]
For example:
shasum -a 256 ~/Downloads/chia-blockchain_1.1.7_amd64.deb
Return to the Download page.


--- layout: default title: "GALLERY #1" gallery-name: gallery1 images: - image_path: /archive/gallery1/1.jpg - image_path: /archive/gallery1/2.jpg - image_path: /archive/gallery1/3.jpg note: I am a simple gallery description ---
{% include title.html %}


Under Review:
-
Bor, A., Osmundsen, M., Rasmussen, S. H. R., Bechmann, A., & Petersen, M. B. (2022). “Fact‐checking” videos reduce belief in, but not the sharing of ”fake news” on Twitter. Pre-print on PsyArXiv
-
Bor, A., Jørgensen, F.J., & Petersen, M.B. (2021). The COVID‐19 pandemic eroded system support but not social solidarity. Pre-print on PsyArXiv
-
Simonovits, G., & Bor, A. (2021). Stability and change in the opinion‐policy relationship: Evidence from state minimum wage laws. Pre-print on PsyArXiv
-
Jørgensen, F. J., Bor, A., & Petersen, M. B. (2021b). Increased pressure leads to decreased trust among the unvaccinated: Effects of the announcement of the re‐introduction of Covid passports in Denmark. Pre-print on PsyArXiv
-
Jørgensen, F. J., Bor, A. , & Petersen, M. B. (2021a). How the development, features and roll‐out of a SARS‐COV‐2 vaccine shape public acceptance: A conjoint experiment in a large representative sample of Danes. Pre-print on PsyArXiv
-
Laustsen, L., Sheng, X., … , Bor, A., et al. (2022). Cross‐cultural evidence that intergroup conflict heightens preferences for dominant leaders.


Submit a water saving tip to win a Super Wash from Hoppy’s – myGC.com.au
SEQ dam levels are dropping.
We can’t count on the rain to top them up, so Seqwater is counting on us to start saving water.
Share your best tip for saving water with us, and every week from next week for six weeks we’ll share the best tip we come across and the tipster will win a Super Wash from Hoppy’s Handwash Cafe!
Hoppy’s water usage rates are more economical than all other wash types. They also recycle and reuse water and harvest rainwater.
When it comes to our water, everyone and every drop counts!
Seqwater is counting on you to start saving water.
How? By taking shorter showers, not leaving the tap running and only using your toilet’s half-flush, when possible.
When it comes to our water, everyone and every drop counts. Check out www.seqwater.com.au/water-wise for more water-saving tips.
Competition opens Monday 25 November 2019 and closes Sunday 5 January 2020.
0Weeks0Days0Hours
6 x weekly prizes of a Super Wash at Hoppy’s Handwash Cafe.
Super Wash includes exterior wash & dry, interior and boot* vacuum, window clean inside & out, dashboard and door jamb wipe over, tire shine and Slipstream 30 for a standard sedan – RRP $45.
- What's your best tip for saving water?
- First Name*
- Last Name*
- Email Address*
Enter Email Confirm Email - Mobile Number*
- Alternative Daytime Contact Number
- DOB Month*
JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember - DOB Year*
2017201620152014201320122011201020092008200720062005200420032002200120001999199819971996199519941993199219911990198919881987198619851984198319821981198019791978197719761975197419731972197119701969196819671966196519641963196219611960195919581957195619551954195319521951195019491948194719461945194419431942194119401939193819371936193519341933193219311930192919281927192619251924192319221921192019191918191719161915191419131912191119101909190819071906190519041903190219011900 - Gender*
Please selectMaleFemalePrefer Not to Answer - Suburb*
- State*
Please selectQueenslandNew South WalesSouth AustraliaWestern AustraliaVictoriaNorthern TerritoryTasmaniaAustralian Capital Territory - Postcode*
-
- Sign up for the Loop - Daily (Weekdays) Newsletter from myGC.com.au
- Sign up for Club Tomato - Weekly Newsletter from Hot Tomato
- Comments
This field is for validation purposes and should be left unchanged.
The Hot Tomato Broadcasting Company’s Standard Competition Terms and Conditions apply to all 102.9 Hot Tomato and myGC contests.


How can I keep track of recent research in operations management?
AOR summarizes the latest research in operations management. By canvassing through recent publications, AOR saves your time in finding out new canonical research.
How can I advance my OM knowledge?
AOR provides mini-cases and introduces other articles in the related topics. This set of complementary knowledge helps you stay abreast of the latest developments in practice and academia.
Where should I start new research?
AOR suggests unanswered questions from the selected cutting-edge studies. In addition, AOR presents interviews with the authors, guiding and sparking research and management strategies.
Understanding, creating, and communicating knowledge … three pillars of scholarship. This publication, prepared by a small group of dedicated and developing scholars, illustrates a creative approach to reinforce learning and to disseminate knowledge. I believe it will serve as a valuable resource to both researchers and practitioners. Enjoy!
This book provides a pleasant guide to the evolving field of research in Operations Management. It is timely – it incorporates most advanced research from premier research outlets. It is actionable – it highlights real-world examples and practical implications. It is delightful - advanced mathematical models have been deciphered in a reader-friendly way. A must read!
The ASU Operations Management Review is an excellent compilation and summary of research publications covering emerging topics in operations management. I commend the group of doctoral students that initiated this excellent resource. Biannual updating of the book means that it stays relevant and topical. I highly recommend this book as a “go to” and “must have” resource for doctoral students, researchers and practitioners that require quick understanding of the status of research and future research opportunities in OM.
This is an excellent, interesting read. It’s a great idea on two levels: First, It helps the reader to quickly find and better understand relevant, cutting edge operations research articles, and second, the author interviews at the end are invaluable, allowing authors the rare opportunity to elaborate on what they have published, and help the reader to better understand what they have written. A great idea, flawlessly executed, and an excellent read. Bravo to the ASU Operations Management Review team!
Improve your knowledge in operations management
♦ ♦ ♦
AOR is updated biannually. Proceeds will be reinvested in publishing the next volume and supporting young scholars.


| University of Copenhagen |
- Implementing and adapting workflows for Ribo-seq data analysis.
- Adapting and implementing analsis pipelines for ChIP-seq and repeat element data analysis.
- Implementing visualization schemes for in-house sequencing data.
- Adapting and designing pipeline for mining and scoring CRISPR/Cas guide RNAs.
|
| EMBL Heidelberg |
- Designing meta-analysis methods for RNA-seq results from various experimental conditions to study genomics of plant (A. thaliana) developmental patterning
- Implementing expression based clustering method for profiling genes involved in plant developmental patterning.
- Implementing in-house web application for precomputed sequence similarity based clustering and gene annotation retrieval.
|
| University of Bonn |
- Implementing analysis pipelines for next generation sequencing (RNA-seq) data.
- Statistical analysis of gene expression profiles and polymorphisms from RNA-seq data.
- Integrating gene co-expression profiles from RNA-seq data with metabolic interaction networks.
- Profiling gene co-expression clusters through meta-analysis of multiple datasets.
- Implementing data enrichment analysis pipelines based on gene annotations.
- Designing variant filtering and annotation pipeline based on results from existing variant calling algorithms.
- Implementing pipelines for gene cross referencing from biological databases.
|


{% extends "layout.html" %} {% block body %}
The steps below describe how to setup the Bravo API on your server or local machine.
bravo
command line tool for Linux and Mac OS X from here, or for Windows from here. Linux and Mac OS X users will need to set executable bits by running chmod +x bravo
. All code examples below are provided for Linux and Max OS X../bravo login
from your command line and go to the provided link in your browser.bravo
will receive your authorization and you may start using the Bravo API../bravo print-access-token
.Authorization
header with a valid Bearer access token. For example, to make an API call with curl
, execute:curl -H "Authorization: Bearer `./bravo print-access-token`" https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/
./bravo login
each time you access the Bravo API from within a different network.
The Bravo API sends a response as a JSON object with three mandatory keys data
, format
and next
.
The data
key points to the array of variants that satisfies your query, format
specifies the format in which the varints are stored in data
, and next
stores the link to the next results page.
{ "data": [ ... ], "format": "...", "next": "https://bravo.sph.umich.edu/..." }
By default, variants in the data
array are represented as JSON objects.
{ "data": [ { "allele_count": 2, "allele_freq": 1.59276e-05, "allele_num": 125568, "alt": "G", "chrom": "22", "filter": "PASS", "pos": 16387678, "ref": "C", "site_quality": 255.0, "variant_id": "22-16387678-C-G" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "T", "chrom": "22", "filter": "PASS", "pos": 16387678, "ref": "C", "site_quality": 157.0, "variant_id": "22-16387678-C-T" } ], "format": "json", "next": null }
To encode variants inside the data
array in VCF format, you must specify the vcf=1
(or vcf=True
) option as a parameter in your GET
query.
When using VCF format, additional header
and meta
keys in the response JSON object store the VCF header line and VCF meta-information lines, respectively.
{ "data": [ "22\t16387678\t22-16387678-C-G\tC\tG\t255.0\tPASS\tAN=125568;AC=2;AF=1.59276e-05", "22\t16387678\t22-16387678-C-T\tC\tT\t157.0\tPASS\tAN=125568;AC=1;AF=7.96381e-06" ], "format": "vcf", "header": "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO", "meta": [ "##fileformat=VCFv4.2", "##FILTER=<ID=PASS,Description=\"All filters passed\">", "##FILTER=<ID=CEN,Description=\"Variant located in centromeric region with inferred sequences\">", "##FILTER=<ID=SVM,Description=\"Variant failed SVM filter\">", "##FILTER=<ID=DISC,Description=\"Mendelian or duplicate genotype discordance is high (3/5% or more)\">", "##FILTER=<ID=CHRXHET,Description=\"Excess heterozygosity in chrX in males\">", "##FILTER=<ID=EXHET,Description=\"Excess heterozygosity with HWE p-value < 1e-6\">", "##INFO=<ID=AN,Number=1,Type=Integer,Description=\"Number of Alleles in Samples with Coverage\">", "##INFO=<ID=AC,Number=A,Type=Integer,Description=\"Alternate Allele Counts in Samples with Coverage\">", "##INFO=<ID=AF,Number=A,Type=Float,Description=\"Alternate Allele Frequencies\"" ], "next": null }
The Bravo API splits large query results into pages of up to 1,000 variants.
A link to the next page is stored in the next
key in the response JSON object.
If no more results are available, then next
will have null
value.
You may change the number of variants returned per page with the limit=N
query parameter, where N
is any integer between 1 and 1,000.
Upon success, the Bravo API sends the response with HTTP status code 200.
If client error, the response has HTTP status code 400, and the returned JSON object has only one key, error
, with error message.
The following table lists all Bravo API endpoints currently available at https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}
.
| API endpoint | Description |
|---|---|
/ |
Retrieve meta-information about dataset. |
/variant |
Query single variant by chromosomal position or identifier. |
/region |
Query all variants within a chromosomal region. |
/gene |
Query all variants within a gene. |
To query a single variant, the GET
request must be sent to https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/variant
.
The following table lists all supported parameters.
| Parameter | Required | Description |
|---|---|---|
variant_id |
Only if single parameter | Variant identifier CHROM-POS-REF-ALT. |
chrom |
Only with pos |
Chromosome name. |
pos |
Only with chrom |
Chromosomal position in base-pairs. |
vcf |
No | Format output as VCF entries. Default is 0 (False). |
curl -H "Authorization: Bearer `./bravo print-access-token`" "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/variant?variant_id=chr22-16389447-A-G"
.
{ "data": [ { "allele_count": 6261, "allele_freq": 0.0498614, "allele_num": 125568, "alt": "G", "chrom": "22", "filter": "PASS", "pos": 16389447, "ref": "A", "site_quality": 255.0, "variant_id": "22-16389447-A-G" } ], "format": "json", "next": null }
curl -H "Authorization: Bearer `./bravo print-access-token`" "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/variant?chrom=chr22&pos=16390137"
.
{ "data": [ { "allele_count": 2, "allele_freq": 1.59276e-05, "allele_num": 125568, "alt": "A", "chrom": "22", "filter": "PASS", "pos": 16390137, "ref": "T", "site_quality": 255.0, "variant_id": "22-16390137-T-A" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "PASS", "pos": 16390137, "ref": "T", "site_quality": 255.0, "variant_id": "22-16390137-T-C" } ], "format": "json", "next": null }
To query all variants within a region, the GET
request must be sent to https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/region
.
The following table lists all supported parameters.
| Parameter | Required | Description |
|---|---|---|
chrom |
Yes | Chromosome name. |
start |
Yes | Chromosomal start position in base-pairs. |
end |
Yes | Chromosomal end position in base-pairs. |
allele_count |
No | Filter variants by alternate allele count in samples with coverage. |
allele_freq |
No | Filter variants by alternate allele frequency. |
allele_num |
No | Filter variants by number of alleles in samples with coverage. |
site_quality |
No | Filter variants by phred-scaled quality score. |
filter |
No | Filter variants by their status, e.g. PASS. |
sort |
No |
Comma-separated list of fields on which to sort the results.
Sort directions asc (ascending) or desc (descending) can optionally be appended to each field separated by the : character.
The following fields can be sorted: pos , allele_count , allele_freq , allele_num , site_quality , filter .
By default, results are sorted by chromosome position in ascending order.
|
limit |
No | Number of variants per results page. Default is 1,000. |
vcf |
No | Format output as VCF entries. Default is 0 (False). |
Bravo API supports following comparison operators: eq
(equal), ne
(not equal), gt
(greater than), lt
(less than), gte
(greater than or equal to), lte
(less than or equal to).
Operators must be followed by the :
character, so the query allele_freq=gte:0.01
searches for variants with allele frequency less than or equal to 0.01.
Simple equality is the default operation, and is performed as filter=PASS
(same as filter=eq:PASS
).
If needed, you can escape operators with quotes, so the query filter="ne:"
searches for variants with "ne:" in the filter
field.
curl -H "Authorization: Bearer `./bravo print-access-token`" "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/region?chrom=chr22&end=16390908&start=16387675&filter=ne:PASS&sort=allele_freq:desc&limit=5
{ "data": [ { "allele_count": 3392, "allele_freq": 0.0270133, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "SVM;DISC;EXHET", "pos": 16390907, "ref": "T", "site_quality": 143.0, "variant_id": "22-16390907-T-C" }, { "allele_count": 2610, "allele_freq": 0.0207856, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "SVM;DISC;EXHET", "pos": 16390901, "ref": "A", "site_quality": 117.0, "variant_id": "22-16390901-A-C" }, { "allele_count": 150, "allele_freq": 0.00119457, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "SVM;DISC", "pos": 16389436, "ref": "G", "site_quality": 27.0, "variant_id": "22-16389436-G-C" }, { "allele_count": 21, "allele_freq": 0.00016724, "allele_num": 125568, "alt": "AAGCAGCGGCTGG", "chrom": "22", "filter": "SVM", "pos": 16390735, "ref": "A", "site_quality": 147.0, "variant_id": "22-16390735-A-AAGCAGCGGCTGG" }, { "allele_count": 11, "allele_freq": 8.76019e-05, "allele_num": 125568, "alt": "A", "chrom": "22", "filter": "SVM", "pos": 16390780, "ref": "C", "site_quality": 255.0, "variant_id": "22-16390780-C-A" } ], "format": "json", "next": "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/region?sort=allele_freq:desc&filter=ne:PASS&end=16390908&start=16387675&limit=5&chrom=chr22&last=59a8c9b38e3f1b1a035a5475:8.76019e-05" }
In addition to region query which allows extracting variants between explicitely specified start and end chromosomal positions, the Bravo API allows you to query variants within a specified gene.
Given a gene name or gene identifier, the Bravo API will lookup corresponding chromosome and gene boundaries for you.
To query all variants within a region, the GET
request must be sent to https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/gene
.
The following table lists all supported parameters.
| Parameter | Required | Description |
|---|---|---|
name |
Yes | Gene name or gene identifier. | allele_count |
No | Filter variants by alternate allele count in samples with coverage. |
allele_freq |
No | Filter variants by alternate allele frequency. |
allele_num |
No | Filter variants by number of alleles in samples with coverage. |
site_quality |
No | Filter variants by phred-scaled quality score. |
filter |
No | Filter variants by their status, e.g. PASS. |
sort |
No |
Comma-separated list of fields on which to sort the results.
Sort directions asc (ascending) or desc (descending) can optionally be appended to each field separated by the : character.
The following fields can be sorted: pos , allele_count , allele_freq , allele_num , site_quality , filter .
By default, results are sorted by chromosome position in ascending order.
|
limit |
No | Number of variants per results page. Default is 1,000. |
vcf |
No | Format output as VCF entries. Default is 0 (False). |
curl -H "Authorization: Bearer `./bravo print-access-token`" "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/gene?name=ABCD1P4&filter=ne:PASS&sort=allele_freq:asc&limit=5"
{ "data": [ { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "SVM", "pos": 16387844, "ref": "G", "site_quality": 50.0, "variant_id": "22-16387844-G-C" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "T", "chrom": "22", "filter": "SVM", "pos": 16388018, "ref": "C", "site_quality": 44.0, "variant_id": "22-16388018-C-T" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "A", "chrom": "22", "filter": "SVM", "pos": 16388182, "ref": "C", "site_quality": 32.0, "variant_id": "22-16388182-C-A" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "C", "chrom": "22", "filter": "SVM", "pos": 16388371, "ref": "T", "site_quality": 255.0, "variant_id": "22-16388371-T-C" }, { "allele_count": 1, "allele_freq": 7.96381e-06, "allele_num": 125568, "alt": "T", "chrom": "22", "filter": "SVM", "pos": 16388398, "ref": "G", "site_quality": 255.0, "variant_id": "22-16388398-G-T" } ], "format": "json", "gene": { "chrom": "22", "id": "ENSG00000225293", "name": "ABCD1P4", "start": 16387695, "stop": 16390888, "strand": "+" }, "next": "https://bravo.sph.umich.edu{{ config['URL_PREFIX'] }}{{ config['BRAVO_API_URL_PREFIX'] }}/gene?filter=ne:PASS&sort=allele_freq:asc&limit=5&name=ABCD1P4&last=59a8c9b38e3f1b1a035a516b:7.96381e-06" }
The Bravo API tutorial with step-by-step examples is available from here.


About
About This Blog
Roku development can be challenging. There is an entirely new language to learn, fewer tools, and a smaller ecosystem and community around it than other platforms. But there are lots of tips and tricks out there that folks have discovered/developed that can save lots of headaches and maybe even make Roku development a little fun. This blog hopes to collect and document those nuggets of wisdom and contribute to our overall collective knowledge.
Roku Developer Documentation: https://sdkdocs.roku.com
Roku Developers Slack: https://rokudevelopers.slack.com
Roku Developer Forums: https://forums.roku.com/
About Me
I have developed Roku apps for some of the biggest names on the platform, including HBO, Hulu, TBS/TNT, Dolby, iHeartRadio, and many more. Through trial-and-error, experimentation, research, and collaboration, I have built up a library of tools and patterns that have made my Roku development experience much better. You can find out more about me and some of my Roku-related projects at:


When a vertex Q is connected by an edge to a vertex K, what is the term for their relationship?
An edge connecting two vertices is incident on these vertices.
Two vertices connected by an edge are adjacent.


Pair programming is when two people work together on a project or some type of coding exercise at one computer. During this collaboration, one person takes on the role of a Driver, and the other, a Navigator. In this process, both sides learn to acknowledge and truly listen to each other as they bounce ideas back and forth. The Navigator guides the Driver as she/he codes, and provides suggestions on different ways to find a solution.
Pair Programming is important to DBC because it cultivates an essential habit of working with others and communicating effectively. This is hugely important in the workplace on a daily basis since developers continuously work with other developers. Knowing how to interact with others via patience, and understanding your own thought process will help you become a better collaborator.
The Driver and Navigator work together by throwing out suggestions and ways to design and execute the code, but the Driver is in control of the keyboard while the Navigator gives information for what they should be seeing as output. The Driver is a little more hands-on (the keyboard), but the Navigator has just as important of a role as they over-see the output and suggest different potential solutions.


{% extends app_template %} {% block pre_content %} Get Started Learn about all the things Primer does for you. {% endblock pre_content %} {% block feature_nav %}
Learn about all the things Primer does for you.


public class MlpUtility
extends java.lang.Object
| Constructor and Description |
|---|
MlpUtility() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
collectionToString(java.util.Collection<java.lang.String> col,
java.lang.String separator)
Concatenates the String elements of the specified input collection,
separating them with the specified separator.
|
static java.util.Map<java.lang.String,java.lang.String> |
csv2Map(java.util.List<java.lang.String> lines)
Converts a List of comma-separated key-value pairs, one pair per line,
into a map with the corresponding keys and values.
|
static boolean |
endsComment(java.lang.String line)
Indicates whether the specified input line ends a multi-line comment
that is assumed to have started at an earlier line.
|
static java.util.List<java.lang.String> |
fileToLines(java.io.File infile)
Reads the specified file and returns a list of its lines, one String
element per line.
|
static java.util.List<java.lang.String> |
fileToLines(java.nio.file.Path infile)
Reads the specified file and returns a list of its lines, one String
element per line.
|
static java.util.List<java.lang.String> |
fileToLines(java.lang.String infile)
Reads the specified file and returns a list of its lines, one String
element per line.
|
static boolean |
isComment(java.lang.String str)
Indicates if the specied input is a Java-style comment, i.e., starts
with // possibly preceded by leading spaces.
|
static boolean |
isComment(java.lang.String line,
boolean runningMultilineComment)
Indicates if the specified input line is Java-style comment or is inside
a multi-line comment.
|
static boolean |
linesToFile(java.lang.Iterable<? extends java.lang.CharSequence> lines,
java.lang.String outfile)
Writes the specified lines into the specified file.
|
static boolean |
mapToFile(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.CharSequence> map,
java.lang.String outfile,
java.lang.String key_value_Sep)
Writes out the specified map, one entry per line, separating the key
from the value by the specified key_value_Sep, so each line is
in the form of:
key key_value_Sep value
|
static void |
print(char c)
prints the specified input character
|
static void |
print(java.lang.String s)
prints the specified input string
|
static boolean |
startsComment(java.lang.String line)
indicates if the specified input line starts a comment (signaled
by "/*") that extends beyond the specified input line.
|
static boolean |
startsComment(java.lang.String line,
boolean runningMultilineComment)
indiactes if the specified input line starts a comment (signaled
by "/*") that extends beyond the specified input line.
|
static java.lang.String |
stripComment(java.lang.String line)
Deletes any embedded inline comments (which start with /* and end in
the same line), any portion of a multi-line comment that starts
or ends in the specified line, and any end-of-line comment signaled by
"//".
|
static java.lang.String |
stripComment(java.lang.String line,
boolean runningMultilineComment)
Deletes any embedded inline comments (which start with /* and end in
he same line), any portion of a multi-line comment that starts
or ends in the specified line, and any end-of-line comment signaled by
"//"..
|
static java.util.List<java.lang.String> |
stripCommentsFromLines(java.util.List<java.lang.String> lines)
Removes Java-style comments, returning the remaining non-empty lines.
|
public static java.util.Map<java.lang.String,java.lang.String> csv2Map(java.util.List<java.lang.String> lines)
lines
- a List of text lines, where every line is either a comment
with possibly leading spaces, or a comma-separated pair of strings,
with possibly leading and/or trailing spaces, and possibly trailing
end-of-line comments. Any line that is not of the latter type is ignored.public static java.util.List<java.lang.String> stripCommentsFromLines(java.util.List<java.lang.String> lines)
lines
- a List of text lines, where every line is either a comment
with possibly leading spaces, or a non-comment string
with possibly leading and/or trailing spaces, and possibly trailing
end-of-line comments. Any line that is not of the latter type is ignored.public static boolean isComment(java.lang.String str)
str
- a String that represents a line of textpublic static boolean isComment(java.lang.String line, boolean runningMultilineComment)
line
- a String that represents a line of textrunningMultilineComment
- a Boolean indicator that is true if the
specified input line is inside a multi-line commentpublic static boolean startsComment(java.lang.String line)
line
- a String that represents a line of textpublic static boolean startsComment(java.lang.String line, boolean runningMultilineComment)
line
- a String that represents a line of textrunningMultilineComment
- an indicator whether the specified
input line comes as part of a running multi-line comment, fully or
partially. If this parameter's value is true, then it is assumed
that the characters (including "//") in the specified line that occurs
before an asterisk followed by a forward slash are part of the
multi-line comment. If the parameter's value is false, this method
treats any unmatched asterisk slash as regular text not part of a comment.public static boolean endsComment(java.lang.String line)
line
- a String that represents a line of textpublic static java.lang.String stripComment(java.lang.String line)
line
- an input line, i.e., a Stringpublic static java.lang.String stripComment(java.lang.String line, boolean runningMultilineComment)
line
- an input line, i.e., a StringrunningMultilineComment
- an indicator whether the specified
input line comes as part of a running multi-line comment, fully or
partially. If this parameter's value is true, then it is assumed
that the characters (including "//") in the specified line that occurs
before an asterisk followed by a forward slash are part of the
multi-line comment and will
be stripped away. If the parameter's value is false, this method
treats any unmatched asterisk slash as regular text not part of a comment.public static java.lang.String collectionToString(java.util.Collection<java.lang.String> col, java.lang.String separator)
col
- the input collection of Strings to be concatenatedseparator
- the separator separating between the collection's
Strings in the final resultpublic static java.util.List<java.lang.String> fileToLines(java.lang.String infile)
infile
- the full name of a file to be readpublic static java.util.List<java.lang.String> fileToLines(java.nio.file.Path infile)
infile
- the Path of a file to be readpublic static java.util.List<java.lang.String> fileToLines(java.io.File infile)
infile
- the File of a file to be readpublic static boolean linesToFile(java.lang.Iterable<? extends java.lang.CharSequence> lines, java.lang.String outfile)
lines
- the list of lines to be printed to the specified fileoutfile
- the file to which the specified list of lines is to
be printedpublic static boolean mapToFile(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.CharSequence> map, java.lang.String outfile, java.lang.String key_value_Sep)
map
- the map to be written outoutfile
- the file where the map will be writtenkey_value_Sep
- the String that separates the key from the value.
Typical values for this parameter include ":", ",", "-", etc.public static void print(java.lang.String s)
s
- the string to be printedpublic static void print(char c)
c
- the character to be printed


MagicPost Methods
The MagicPost type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
| AddChild |
Adds a child to a Post.
|
|
| CloneChildrenFrom |
Clones the children from another post.
|
|
| ConnectTo(Int32) |
Connects a child to single parent MagicPost object.
|
|
| ConnectTo(array<Int32>[]()[][]) |
Connects a child to many parent MagicPost objects.
|
|
| CountChildren(Int32) |
Counts the children by type.
|
|
| CountChildren(array<Int32>[]()[][]) |
Counts the children by type.
|
|
| Delete |
Put this post in trash can or, if already in, remove it from MagicCMS Database.
|
|
| GetAnswers(String) |
Gets the answers to messages.
|
|
| GetAnswers()()()() |
Gets the answers to messages by default order.
|
|
| GetAnswersByType |
Get answers or comments to a posts or messages (MagicPostCollection )
|
|
| GetByType(array<Int32>[]()[][], String, Boolean, Int32) |
Gets a collection of MagicPost by type.
|
|
| GetByType(array<Int32>[]()[][], array<String>[]()[][], String, Boolean, Int32) |
Gets a collection of MagicPost filtered by type and tags.
|
|
| GetByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean, MagicSearchActive) |
Gets a collection of MagicPost filtered by type.
|
|
| GetByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean, MagicSearchActive, Boolean) |
Gets a collection of MagicPost filtered by type.
|
|
| GetByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean) |
Gets a collection of MagicPost filtered by type.
|
|
| GetByType(Int32, String) |
Gets a collection of MagicPost filtered by type.
|
|
| GetByType(Int32) |
Gets a collection of MagicPost filtered by type.
|
|
| GetByType(array<Int32>[]()[][]) |
Gets a collection of MagicPost filtered by type.
|
|
| GetChildren()()()() |
Gets a MagicPostCollection containing the post children.
|
|
| GetChildren(String, Int32) |
Gets a MagicPostCollection containing the post children.
|
|
| GetChildren(String, Int32, Boolean) |
Gets the MagicPostCollection of children of the Post.
|
|
| GetChildrenByDate |
Gets the MagicPostCollection of children of the Post filtered by publication date (DataPubblicazione).
|
|
| GetChildrenByType(array<Int32>[]()[][], String, Boolean, Int32) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean, MagicSearchActive) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean, MagicSearchActive, Boolean) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(Int32, String) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(Int32) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetChildrenByType(array<Int32>[]()[][]) |
Gets the children of the post filtered by post type (Tipo).
|
|
| GetGrandSons(String, Int32) |
Gets the grand sons (children of children) of a post.
|
|
| GetGrandSons(String, Int32, Boolean) |
Gets the grand sons (children of children) of a post.
|
|
| GetGrandSonsByType(array<Int32>[]()[][], String, Boolean, Int32, Boolean) |
Gets the grand sons (children of children) of a post.
|
|
| GetGrandSonsByType(array<Int32>[]()[][], String, Boolean, Int32) |
Gets the grand sons (children of children) of a post.
|
|
| GetGrandSonsByType(Int32) |
Gets the grand sons (children of children) of a post.
|
|
| GetMediatVoti |
Retrieve the average rating assigned to the post.
|
|
| GetMiniaturePk(Int32, Int32, MagicPostWhichUrl) |
Gets the miniature of a post. Create miniature if it doesn't exist.
|
|
| GetMiniaturePk(Int32, Int32) |
Gets the miniature of a post. Create miniature if it doesn't exist.
|
|
| GetParents()()()() |
Gets parents of this post.
|
|
| GetParents(array<Int32>[]()[][]) |
Gets the parents of this Post Filtered by type.
|
|
| GetParents(array<Int32>[]()[][], String) |
Gets the parents of this Post Filtered by type.
|
|
| GetPostByParentType |
Gets MagicPost filtered by post type of its parents.
|
|
| GetRandomChild |
Gets a random child of the post.
|
|
| GetSiblings(String, array<Int32>[]()[][]) |
Gets the siblings posts (same parent) of current post.
|
|
| GetSiblings()()()() |
Gets the siblings posts (same parent) of current post.
|
|
| GetSiblings(String) |
Gets the siblings posts (same parent) of current post.
|
|
| GetSiblings(String, Int32) |
Gets the siblings posts (same parent) of current post.
|
|
| GetTestoBreveCustom |
Gets truncated and translated short text or description extracted from TestoBreve (if not empty)
or from TestoLungo
|
|
| GetVoti |
Retrieves the sum of the votes received by the post.
|
|
| HomePanel |
Returns a formatted panel (div) with an image and links to the post.
|
|
| Insert |
Inserts a new created MagicPost instance in MagicCMS database.
|
|
| IsLocalLink |
Determines whether the post is part of a monopage site (chile of an Home page Section).
|
|
| MergeContext | ||
| SearchByKeyword(String, String) |
Get a collection of MagicPost by keyword.
|
|
| SearchByKeyword(array<String>[]()[][], String, Int32, Boolean, WhereClauseCollection) |
Get a collection of MagicPost by keyword.
|
|
| SetAnswerTo |
Set the post as un answer or a comment to an other post.
|
|
| UnDelete |
Undelete this post removing it from trash can.
|
|
| Update |
Save modified MagicPost instance in MagicCMS database.
|


--- layout: post title: ServiceAPI file upload with date created categories: [] tags: serviceapi status: publish type: post published: true meta: {} ---
Today's question was how to upload a file including the date created. One way to do it would be to transfer the file using some other process to the ServiceAPI server and then use the RecordFilePath property attach it to the record. The other way is to send the RecordDateCreated property with the form post.
This sample can be installed by copying it into the ServiceAPI examples folder and then opening it like this: http://localhost/HPRMServiceAPI/examples/CreateWithDateCreated.
The sample contains more detailed description but in short it:


var onDateSet: (view: DatePicker, date: LocalDate) -> Unit
Function for extra actions that can be invoked after the user chooses (or changed) a date.


--- layout: post title: "My Week in Review" date: 2016-11-27 05:05:00 +0000 tags: image: https://s3.amazonaws.com/audreywatters/2016-11-27-turkey.jpg imagecredits: https://www.flickr.com/photos/jim68000/6883015881 ---
Icon credits: The Noun Project


skip_previous
pause
play_arrow
redo
skip_next
add
Choose algorithm:
close
- Bubble Sort
- Bubble Sort (bidirectional)
- Comb Sort
- Heap Sort
- Insertion Sort
- Insertion Sort (binary search)
- Merge Sort
- Quick Sort (Hoare)
- Quick Sort (Lomuto)
- Selection Sort
- Selection Sort (double)
- Shell Sort


| struct ISeconds.Time |
|
Structure to hold a time value in seconds plus nanoseconds
struct Time {
UInt32 secs;
// Seconds
UInt32 nsecs;
// Nanoseconds
};
| metaonly config ISeconds.common$ // module-wide |
|
Common module configuration parameters
DETAILS
All modules have this configuration parameter. Its name contains the '$'
character to ensure it does not conflict with configuration parameters
declared by the module. This allows new configuration parameters to be
added in the future without any chance of breaking existing modules.
| ISeconds.get() // module-wide |
|
Returns number of seconds since 1970 (the Unix epoch)
DETAILS
The user must call Seconds_set() before making any calls to Seconds_get(),
otherwise the value returned by Seconds_get() will be meaningless.
| ISeconds.getTime() // module-wide |
|
Fills in a Seconds_Time structure with seconds and nanoseconds
elapsed since 1970 (the Unix epoch)
DETAILS
Seconds_set() must have been called before making any calls to
Seconds_getTime(), otherwise the value returned by Seconds_getTime()
will be meaningless.
| ISeconds.set() // module-wide |
|
Update the real time clock with number of seconds since 1970
Void set(UInt32 seconds);
DETAILS
Note: This function is non-reentrant.
| ISeconds.setTime() // module-wide |
|
Update the real time clock with the number of seconds and nanoseconds
that have elapsed since 1970 (the Unix epoch). The Seconds_Time
structure passed to setTime() contains the seconds and nanoseconds
to set the real time clock to. This API can be called instead
of Seconds_set(), if finer granularity of the time is required


Portfolio
This is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio this is some of my portfolio


Next: Exception handler, Up: GDB [Contents]
The standard remote protocol is a simple, packet based scheme. A debug packet whose contents are <data> is encapsulated for transmission in the form:
$ <data> # CSUM1 CSUM2
<data> must be ASCII alphanumeric and cannot include characters
$
or #
. If <data> starts with two characters
followed by :
, then the existing stubs interpret this as a
sequence number. For example, the command g
is used to read the
values of the registers. So, a packet to do this would look like
$g#67
CSUM1 and CSUM2 are an ascii representation in hex of an 8-bit checksum of <data>, the most significant nibble is sent first. the hex digits 0-9,a-f are used.
A simple protocol is used when communicating with the target. This is
mainly to give a degree of error handling over the serial cable. For
each packet transmitted successfully, the target responds with a
+
(ACK
). If there was a transmission error, then the target
responds with a -
(NAK
). An error is determined when the
checksum doesn’t match the calculated checksum for that data record.
Upon reciept of the ACK
, GDB
can then transmit the next
packet.
Here is a list of the main functions that need to be supported. Each data
packet is a command with a set number of bytes in the command packet.
Most commands either return data, or respond with a NAK
. Commands
that don’t return data respond with an ACK
. All data values are
ascii hex digits. Every byte needs two hex digits to represent t. This
means that a byte with the value ‘7’ becomes ‘07’. On a 32 bit
machine this works out to 8 characters per word. All of the bytes in a
word are stored in the target byte order. When writing the host side of
the GDB protocol, be careful of byte order, and make sure that the code
will run on both big and little endian hosts and produce the same answers.
These functions are the minimum required to make a GDB backend work. All other commands are optional, and not supported by all GDB backends.
g
’returns XXXXXXXX...
Registers are in the internal order for GDB, and the bytes in a register
are in the same order the machine uses. All values are in sequence
starting with register 0. All registers are listed in the same packet. A
sample packet would look like $g#
.
GXXXXXXXX...
’XXXXXXXX
is the value to set the register to. Registers are in
the internal order for GDB, and the bytes in a register are in the same
order the machine uses. All values are in sequence starting with
register 0. All registers values are listed in the same packet. A sample
packet would look like $G000000001111111122222222...#
returns ACK
or NAK
mAAAAAAAA,LLLL
’AAAAAAAA
is address, LLLL
is length. A sample packet would
look like $m00005556,0024#
. This would request 24 bytes starting
at address 00005556
returns XXXXXXXX...
XXXXXXXX
is the memory contents. Fewer bytes than requested will
be returned if only part of the data can be read. This can be determined
by counting the values till the end of packet #
is seen and
comparing that with the total count of bytes that was requested.
MAAAAAAAA,LLLL:XXXXXXXX
’AAAAAAAA
is the starting address, LLLL
is the number of
bytes to be written, and XXXXXXXX
is value to be written. A
sample packet would look like
$M00005556,0024:101010101111111100000000...#
returns ACK
or NAK
for an error. NAK
is also
returned when only part of the data is written.
cAAAAAAAAA
’AAAAAAAA
is address to resume execution at. If AAAAAAAA
is
omitted, resume at the curent address of the pc
register.
returns the same replay as last signal
. There is no immediate
replay to cont
until the next breakpoint is reached, and the
program stops executing.
AA..AA
is address to resume
If AA..AA
is omitted, resume at same address.
returns the same replay as last signal
. There is no immediate
replay to step
until the next breakpoint is reached, and the
program stops executing.
?
’This returns one of the following:
SAA
Where AA
is the number of the last signal.
Exceptions on the target are converted to the most similar Unix style
signal number, like SIGSEGV
. A sample response of this type would
look like $S05#
.
AA
is the signal number.
nn
is the register number.
XXXXXXXX
is the register value.
AA
is the exit status. This is only
applicable for certains sorts of targets.
These are used in some GDB backends, but not all.
Pnn=XXXXXXXX
’Write register nn
with value XXXXXXXX
.
returns ACK
or NAK
toggle debug flag (see 386 & 68k stubs)
reset – see sparc stub.
other
’On other requests, the stub should ignore the request and send an empty
response $#<checksum>
. This way we can extend the protocol and GDB
can tell whether the stub it is talking to uses the old or the new.
tAA:PP,MM
’Search backwards starting at address AA
for a match with pattern
PP and mask MM
. PP
and MM
are 4 bytes.
qXXXX
’Request info about XXXX.
QXXXX=yyyy
’Set value of XXXX
to yyyy
.
qOffsets
’Get section offsets. Reply is Text=xxx;Data=yyy;Bss=zzz
Send text to stdout. The text gets display from the target side of the serial connection.
Responses can be run-length encoded to save space. A *
means that
the next character is an ASCII encoding giving a repeat count which
stands for that many repetitions of the character preceding the *
.
The encoding is n+29, yielding a printable character where n >=3
(which is where run length encoding starts to win). You can’t use a
value of where n >126 because it’s only a two byte value. An example
would be a 0*03
means the same thing as 0000
.
Next: Exception handler, Up: GDB [Contents]


Release 1.5.0
The Data library has been available since the 1.2 release. For the 1.5.0 release, a few things have been changed in an incompatible way that requires changes to existing code.
Summary of Changes
- Poco::Data::RowFormatter class for convenient output formatting.
- Stored procedures support (for databases and ODBC drivers that support it).
- Improved transaction support (for databases that support it).
- Bulk execution (for ODBC drivers that support it).
- Batch queries and multiple results (for databases and ODBC drivers that support it).
- Stored procedures/functions support (for databases that support it)
- New Poco::Data::SessionPoolContainer class.
Incompatible Changes and Possible Transition Issues
Keywords (use, into, limit, etc) now reside in Poco::Data::Keywords namespace.
 While old way of passing pointers to TypeHandler may still work, it is strongly recommended to pass SharedPtr to handler functions, e.g. :
template <> class TypeHandler<Person> { public:
static std::size_t size() {
return 3;
}
static void bind(std::size_t pos, const Person& person, AbstractBinder::Ptr pBinder, AbstractBinder::Direction dir) {
TypeHandler<std::string>::bind(pos++, person.name, pBinder, dir); // ...
}
static void extract(std::size_t pos, Person& person, const Person& deflt, AbstractExtractor::Ptr pExtr) {
TypeHandler<std::string>::extract(pos++, person.name, deflt.name, pExtr); // ...
}
static void prepare(std::size_t pos, const Person& person, AbstractPreparator::Ptr pPrep) {
TypeHandler<std::string>::prepare(pos++, person.name, pPrep); // ...
}
};


{% extends "base.html" %} {% block title %}
Medieval catalogues > REGISTRUM ANGLIE > Union catalogue by author and title, early 14th cent.
{% endif %}81 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


Toggle navigation
Treasurer Rises
John Smith
Yesterday at 4:32 PM
Lorem ipsum dolor sit amet, consectetur...
John Smith
Yesterday at 4:32 PM
Lorem ipsum dolor sit amet, consectetur...
John Smith
Yesterday at 4:32 PM
Lorem ipsum dolor sit amet, consectetur...
Read All New Messages
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
Alert Name
Alert Badge
View All
John Smith
Profile
Inbox
Settings
Log Out
Dashboard
Charts
Currency Pairs
Debitors & Creditors
Statements
Fund Manager
Dashboard
Accounts Overview
Dashboard
GBP
INR
EUR
USD
Current Accounts
Deposit Accounts
Credit Card Accounts


{% extends "admin_template.html" %} {% from "components/textbox.html" import textbox %} {% from "components/page-header.html" import page_header %} {% from "components/page-footer.html" import page_footer %} {% from "components/form.html" import form_wrapper %} {% block service_page_title %} {{ _('Reply-to email address') }} {% endblock %} {% block maincolumn_content %} {{ page_header( _('Reply-to email address'), back_link=url_for('.service_settings', service_id=current_service.id) ) }}
Your emails will be sent from {{ current_service.email_from<EMAIL_ADDRESS>This is so they have the best chance of being delivered. This email address cannot receive replies.
Set up a separate email address to receive replies from your users, then enter it here.
{% if current_service.trial_mode %}Your service cannot go live until you’ve done this.
{% endif %} {% call form () %} {{ textbox( form.email_address, width='w-full md:w-2/3', safe_error_message=True ) }} {{ page_footer(_('Save')) }} {% endcall %} {% endblock %}


This project aimed to build a prototype IoT beehive, whose key metrics (temperature, weight, population, humidity) could be monitored remotely.
I designed a base for the hive, which would also hold the Raspberry Pi, weight sensors, and support circuits.
The base and hive were laser-cut out of acryllic and assembled with integrated population counters, temperature and humidity sensors.
An Android app was designed for remotely monitoring multiple hives. Once upon a time, I made a silly video about the build process.
Clicking on any blue text in this system diagram will take you to its corresponding code.


Learn to Surf
This april I will travel to the Caribbean and take surfing lessons.
Dreaming Aloud. 30 days at a time.
This april I will travel to the Caribbean and take surfing lessons.
This month I will read at least 50 pages everyday, including weekends.
I will take a meditation class and practice meditating at least 20 minutes everyday for the month. Hopefully I won't fall asleep every time I meditate.


torchelastic on Kubernetes¶
This directory contains kubernetes resources that help users run torchelastic jobs on Kubernetes. We use Amazon EKS as an example here, the steps would also work for all other cloud providers (You need to find alternative storage options in your environment)
Prerequisites¶
Setup AWS credentials on your machine.
eksctl to manage Kubernetes cluster.
Network file storage which supports ReadWriteMany mode. EFS, FSx for Lustrue are good examples.
S3 bucket to host training scripts.
Quickstart¶
This guide shows how to get a torchelastic job running on EKS.
Create Kubernetes cluster¶
We highly recommend to use eksctl to create Amazon EKS cluster. This process will take 10~15 minutes.
$ eksctl create cluster \
--name=torchelastic \
--node-type=p3.2xlarge \
--region=us-west-2 \
--version=1.14 \
--ssh-access \
--ssh-public-key=~/.ssh/id_rsa.pub \
--nodes=2
Install Nvidia Device Plugin¶
In order to enable GPU support in your EKS cluster, deploy the following Daemonset:
$ kubectl create -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/1.0.0-beta4/nvidia-device-plugin.yml
Prepare storage¶
Create EFS and mount targets¶
Create an EFS volume in AWS console. eksctl
will create a new VPC
for the cluster, please select the VPC to make sure EKS cluster nodes
can access EFS. Select Public
subnets when you create mount targets.
Please use security group *ClusterSharedNodeSecurityGroup*
created
by eksctl
to associate with the mount targets.
Install EFS CSI Driver¶
EFS CSI Driver manages the lifecycle of Amazon EFS filesystems in Kubernetes.
kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=master"
Note: If you use kubernetes cluster < 1.14, please follow instructions to install older CSI versions.
Create PersistentVolume and PersistentVolumeClaim¶
Once the file system is statically provisioned and CSI driver is ready. EFS can be mounted inside a container as a volume using the driver.
export EFS_ID=your_efs_id
sed -i '' 's/<EFS_ID>/'"$EFS_ID"'/' storage.yaml
kubectl apply -f storage.yaml
Download imagenet dataset¶
In this example, we use tiny imagenet dataset instead of full dataset because dataset is small and easy to download. It only has 200 classes. Each class has 500 training images, 50 validation images, and 50 test images.
Note: You can download full imagenet dataset here.
Run following scripts to create a pods to prefetch dataset on NFS.
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
name: download-dataset-task
spec:
restartPolicy: OnFailure
containers:
- name: app
image: centos:latest
command:
- /bin/sh
- "-c"
- |
/bin/bash <<'EOF'
yum update
yum install -y wget unzip
wget http://cs231n.stanford.edu/tiny-imagenet-200.zip
unzip tiny-imagenet-200.zip -d /data
EOF
volumeMounts:
- name: persistent-storage
mountPath: /data
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: efs-claim
EOF
Note: Job running time may vary from 10 mins to 30 mins depending on the throughput and performance mode you configure for your EFS.
Lauch etcd instance¶
This will give you a single etcd instance, your training workers later can talk to this etcd instance for peer discovery and distributed synchronization.
$ kubectl apply -f etcd.yaml
Launch torchelastic job¶
Update training scripts location¶
In this example, we’d like to reuse container image
torchelastic/examples:0.1.0rc1
, then we need to upload training
scripts main.py to a S3 bucket. In
addition, args in imagenet.yaml
needs to be updated as well. Please
update s3://<BUCKET>/petctl/<USER>/<JOB_ID>/main.py
to the your file
location.
containers:
- name: elastic-trainer-worker
image: torchelastic/examples:0.1.0rc1
args:
- "s3://<BUCKET>/petctl/<USER>/<JOB_ID>/main.py"
- "--input_path"
....
....
Note: You can export env
BUCKET
,USER
,JOB_ID
and replace values in the file.
sed -i '' 's/<BUCKET>/'"$BUCKET"'/; s/<USER>/'"$USER"'/; s/<JOB_ID>/'"$JOB_ID"'/;' imagenet.yaml
Note: If you don’t like to use S3 or use a different cloud provider, please modify Dockerfile and create your own container image.
Attach S3 access to EKS worker nodes¶
In order to make trainining container to successfully download
main.py
from S3 to local, you need to grant S3 access to your worker
nodes. Go to AWS IAM console, attach AmazonS3ReadOnlyAccess
policy
to the role. The worker nodegroup role created by eksctl
will looks
like eksctl-torchelastic-nodegroup-***-NodeInstanceRole-***
Create workers¶
Kubernetes will create two pods and two headless services. The headless services is created for pod to pod communication using hostname.
$ kubectl apply -f imagenet.yaml
pod/imagenet-worker-1 created
service/imagenet-worker-1 created
pod/imagenet-worker-2 created
service/imagenet-worker-2 created
Check worker logs¶
$ kubectl logs -f imagenet-worker-1
download: s3://torchelastic-shjiaxin-1h71m-s3bucket-m1b9b9pjldqw/petctl/shjiaxin/imagenet-job/main.py to ../tmp/fetch_and_run_ee5yh8qm/s3_file_x8ure7if
[INFO] 2020-01-03 23:08:49,297 main: rdzv init method=etcd://etcd:2379/imagenet?min_workers=1&max_workers=3&last_call_timeout=5
[INFO] 2020-01-03 23:08:49,298 main: Loading data from: /data/tiny-imagenet-200/train
[INFO] 2020-01-03 23:09:16,761 main: Loading model: resnet101
[INFO] 2020-01-03 23:09:20,231 main: Rank [0] running on GPU [0]
INFO 2020-01-03 23:09:20,234 Etcd machines: ['http://<IP_ADDRESS>:2379']
[INFO] 2020-01-03 23:09:20,241 main: Entering torchelastic train_loop
INFO 2020-01-03 23:09:20,242 Attempting to join next rendezvous
INFO 2020-01-03 23:09:20,244 Observed existing rendezvous state: {'status': 'joinable', 'version': '1', 'participants': [0]}
INFO 2020-01-03 23:09:20,255 Joined rendezvous version 1 as rank 1. Full state: {'status': 'joinable', 'version': '1', 'participants': [0, 1]}
INFO 2020-01-03 23:09:20,255 Waiting for remaining peers.
INFO 2020-01-03 23:09:25,265 All peers arrived. Confirming membership.
INFO 2020-01-03 23:09:25,363 Waiting for confirmations from all peers.
INFO 2020-01-03 23:09:25,367 Rendezvous version 1 is complete. Final state: {'status': 'final', 'version': '1', 'participants': [0, 1], 'keep_alives': ['/torchelastic/p2p/run_imagenet/rdzv/v_1/rank_1', '/torchelastic/p2p/run_imagenet/rdzv/v_1/rank_0'], 'num_workers_waiting': 0}
INFO 2020-01-03 23:09:25,367 Using TCPStore for c10d::Store implementation
INFO 2020-01-03 23:09:25,371 Rank 1 will conenct to TCPStore server at imagenet-worker-2:51903
[INFO] 2020-01-03 23:09:25,372 coordinator_p2p: Got next rendezvous: rank 1, world size 2
[INFO] 2020-01-03 23:09:25,383 coordinator_p2p: Initialized process group rank 1, world size 2
[INFO] 2020-01-03 23:09:25,385 main: Rank 1: Model state synced from rank: 0
batch_size=32
num_data_workers=0
data_start_index=0
iteration=0
epoch=0/10
[INFO] 2020-01-03 23:09:25,629 train_loop: Rank 1 synced state with other nodes
[INFO] 2020-01-03 23:09:27,288 main: epoch: 0, iteration: 0, data_idx: 0
[INFO] 2020-01-03 23:09:28,856 main: epoch: 0, iteration: 1, data_idx: 96
[INFO] 2020-01-03 23:09:30,434 main: epoch: 0, iteration: 2, data_idx: 192
[INFO] 2020-01-03 23:09:31,992 main: epoch: 0, iteration: 3, data_idx: 288
[INFO] 2020-01-03 23:09:33,543 main: epoch: 0, iteration: 4, data_idx: 384
[INFO] 2020-01-03 23:09:35,120 main: epoch: 0, iteration: 5, data_idx: 480
[INFO] 2020-01-03 23:09:36,685 main: epoch: 0, iteration: 6, data_idx: 576
[INFO] 2020-01-03 23:09:38,256 main: epoch: 0, iteration: 7, data_idx: 672
[INFO] 2020-01-03 23:09:39,835 main: epoch: 0, iteration: 8, data_idx: 768
[INFO] 2020-01-03 23:09:41,420 main: epoch: 0, iteration: 9, data_idx: 864
[INFO] 2020-01-03 23:09:42,981 main: epoch: 0, iteration: 10, data_idx: 960
Clean up job¶
$ kubectl delete -f imagenet.yaml
Elasticity¶
You can launch new pods with same configuration to join the training or delete individual pod to check
torchelastic operator¶
Above example is a hard way to launch torchelastic job on Kubernetes. User needs to launch etcd, write pods and headless services and manage pod lifecycle. A kubernetes operator can be introduced here to simplify the torchelastic job setups. Underneath etcd and workers creation and destroy can be handled by controller. Dynamic resource allocation and preemption can be added later at this layer as well.


6.1 How many solutions are there for the map-coloring problem in Figure australia-figure? How many solutions if four colors are allowed? Two colors?
6.2 Consider the problem of placing $k$ knights on an $n\times n$ chessboard such that no two knights are attacking each other, where $k$ is given and $k\leq n^2$.
Choose a CSP formulation. In your formulation, what are the variables?
What are the possible values of each variable?
What sets of variables are constrained, and how?
Now consider the problem of putting as many knights as possible on the board without any attacks. Explain how to solve this with local search by defining appropriate ACTIONS and RESULT functions and a sensible objective function.
6.3 [crossword-exercise]Consider the problem of constructing (not solving) crossword puzzles fitting words into a rectangular grid. The grid, which is given as part of the problem, specifies which squares are blank and which are shaded. Assume that a list of words (i.e., a dictionary) is provided and that the task is to fill in the blank squares by using any subset of the list. Formulate this problem precisely in two ways:
As a general search problem. Choose an appropriate search algorithm and specify a heuristic function. Is it better to fill in blanks one letter at a time or one word at a time?
As a constraint satisfaction problem. Should the variables be words or letters?
Which formulation do you think will be better? Why?
6.4 [csp-definition-exercise]Give precise formulations for each of the following as constraint satisfaction problems:
Rectilinear floor-planning: find non-overlapping places in a large rectangle for a number of smaller rectangles.
Class scheduling: There is a fixed number of professors and classrooms, a list of classes to be offered, and a list of possible time slots for classes. Each professor has a set of classes that he or she can teach.
Hamiltonian tour: given a network of cities connected by roads, choose an order to visit all cities in a country without repeating any.
6.5 Solve the cryptarithmetic problem in Figure cryptarithmetic-figure by hand, using the strategy of backtracking with forward checking and the MRV and least-constraining-value heuristics.
6.6 [nary-csp-exercise] Show how a single ternary constraint such as “$A + B = C$” can be turned into three binary constraints by using an auxiliary variable. You may assume finite domains. (Hint: Consider a new variable that takes on values that are pairs of other values, and consider constraints such as “$X$ is the first element of the pair $Y$.”) Next, show how constraints with more than three variables can be treated similarly. Finally, show how unary constraints can be eliminated by altering the domains of variables. This completes the demonstration that any CSP can be transformed into a CSP with only binary constraints.
6.7 [zebra-exercise] Consider the following logic puzzle: In five houses, each with a different color, live five persons of different nationalities, each of whom prefers a different brand of candy, a different drink, and a different pet. Given the following facts, the questions to answer are “Where does the zebra live, and in which house do they drink water?”
The Englishman lives in the red house.
The Spaniard owns the dog.
The Norwegian lives in the first house on the left.
The green house is immediately to the right of the ivory house.
The man who eats Hershey bars lives in the house next to the man with the fox.
Kit Kats are eaten in the yellow house.
The Norwegian lives next to the blue house.
The Smarties eater owns snails.
The Snickers eater drinks orange juice.
The Ukrainian drinks tea.
The Japanese eats Milky Ways.
Kit Kats are eaten in a house next to the house where the horse is kept.
Coffee is drunk in the green house.
Milk is drunk in the middle house.
Discuss different representations of this problem as a CSP. Why would one prefer one representation over another?
6.8 Consider the graph with 8 nodes $A_1$, $A_2$, $A_3$, $A_4$, $H$, $T$, $F_1$, $F_2$. $A_i$ is connected to $A_{i+1}$ for all $i$, each $A_i$ is connected to $H$, $H$ is connected to $T$, and $T$ is connected to each $F_i$. Find a 3-coloring of this graph by hand using the following strategy: backtracking with conflict-directed backjumping, the variable order $A_1$, $H$, $A_4$, $F_1$, $A_2$, $F_2$, $A_3$, $T$, and the value order $R$, $G$, $B$.
6.9 Explain why it is a good heuristic to choose the variable that is most constrained but the value that is least constraining in a CSP search.
6.10 Generate random instances of map-coloring problems as follows: scatter $n$ points on the unit square; select a point $X$ at random, connect $X$ by a straight line to the nearest point $Y$ such that $X$ is not already connected to $Y$ and the line crosses no other line; repeat the previous step until no more connections are possible. The points represent regions on the map and the lines connect neighbors. Now try to find $k$-colorings of each map, for both $k{{,=,}}3$ and $k {{,=,}}4$, using min-conflicts, backtracking, backtracking with forward checking, and backtracking with MAC. Construct a table of average run times for each algorithm for values of $n$ up to the largest you can manage. Comment on your results.
6.11 Use the AC-3 algorithm to show that arc consistency can detect the inconsistency of the partial assignment {WA=green,V=red} for the problem shown in Figure australia-figure.
6.12 Use the AC-3 algorithm to show that arc consistency can detect the inconsistency of the partial assignment {WA=red,V=blue} for the problem shown in Figure australia-figure.
6.13 What is the worst-case complexity of running AC-3 on a tree-structured CSP?
6.14 [ac4-exercise] AC-3 puts back on the queue every arc ($X_{k}, X_{i}$) whenever any value is deleted from the domain of $X_{i}$, even if each value of $X_{k}$ is consistent with several remaining values of $X_{i}$. Suppose that, for every arc ($X_{k}, X_{i}$), we keep track of the number of remaining values of $X_{i}$ that are consistent with each value of $X_{k}$. Explain how to update these numbers efficiently and hence show that arc consistency can be enforced in total time $O(n^2d^2)$.
6.15 The Tree-CSP-Solver (Figure tree-csp-figure) makes arcs consistent starting at the leaves and working backwards towards the root. Why does it do that? What would happen if it went in the opposite direction?
6.16 We introduced Sudoku as a CSP to be solved by search over partial assignments because that is the way people generally undertake solving Sudoku problems. It is also possible, of course, to attack these problems with local search over complete assignments. How well would a local solver using the min-conflicts heuristic do on Sudoku problems?
6.17 Define in your own words the terms constraint, backtracking search, arc consistency, backjumping, min-conflicts, and cycle cutset.
6.18 Define in your own words the terms constraint, commutativity, arc consistency, backjumping, min-conflicts, and cycle cutset.
6.19 Suppose that a graph is known to have a cycle cutset of no more than $k$ nodes. Describe a simple algorithm for finding a minimal cycle cutset whose run time is not much more than $O(n^k)$ for a CSP with $n$ variables. Search the literature for methods for finding approximately minimal cycle cutsets in time that is polynomial in the size of the cutset. Does the existence of such algorithms make the cycle cutset method practical?
6.20 Consider the problem of tiling a surface (completely and exactly covering it) with $n$ dominoes ($2\times 1$ rectangles). The surface is an arbitrary edge-connected (i.e., adjacent along an edge, not just a corner) collection of $2n$ $1\times 1$ squares (e.g., a checkerboard, a checkerboard with some squares missing, a $10\times 1$ row of squares, etc.).
Formulate this problem precisely as a CSP where the dominoes are the variables.
Formulate this problem precisely as a CSP where the squares are the variables, keeping the state space as small as possible. (Hint: does it matter which particular domino goes on a given pair of squares?)
Construct a surface consisting of 6 squares such that your CSP formulation from part (b) has a tree-structured constraint graph.
Describe exactly the set of solvable instances that have a tree-structured constraint graph.


--- layout: post title: jGoogleAnalytics - Google Analytics integration for jQuery date: 2008-06-18 10:43:17.000000000 +01:00 type: post published: true status: publish categories: - analytics tags: - google analytics - jQuery - university of nottingham - web analytics meta: aktt_notify_twitter: 'no' _topsy_cache_timestamp: '1299700384' _edit_last: '1' _syntaxhighlighter_encoded: '1' tmac_last_id: '618797421066215424' author: David Simpson excerpt_separator: ---
Since I last added Google Analytics to a website, Google have changed from the old urchin.js file to the shiny new ga.js file. This means that I really ought to start using ga.js now.
The University of Nottingham uses Sungard's Luminis portal system which produces some rather nasty looking URLs. Web analytics for this is rather a handful - bad URLs, multiple features per page (each of which we'd like to track) and often tracking would be nice across sub-domains.
With that in mind, and Google's Tracking Code Migration Guide close at hand, I've written jGoogleAnalytics.js to allow me to track:
Download jGoogleAnalytics.js
Usage:
[source language="javascript"]// At it's simplest
$.jGoogleAnalytics( 'UA-XXXXXX-X');
// More advanced version
$.jGoogleAnalytics(
'UA-XXXXXX-X', // Your GA tracker code
{
anchorClick: false, // adds click tracking to *all* anchors
clickEvents: null, // e.g. {'.popup': '/popup/nasty'}
crossDomainSelector: false, // e.g. 'a.crossDomain'
domainName: false, // e.g. 'nottingham.ac.uk'
evalClickEvents: null, // e.g. {'#menu li a': "'/tabs/'+ $(this).text()"}
evalSubmitEvents: null, // e.g. {'#menu li a': "'/tabs/'+ $(this).text()"}
extensions: [
'pdf','doc','xls','csv','jpg','gif', 'mp3',
'swf','txt','ppt','zip','gz','dmg','xml'
], // download extensions to track
external: '/external/', // prefix to add to external links
mailto: '/mailto/', // prefix to add to email addresses
download: '/download/', // prefix to add to downloads
organicSearch: null, // e.g. {'search-engine': 'query-term', 'google.nottingham.ac.uk': 'q'}
pageViewsEnabled: true, // can be disabled e.g. if only tracking e.g. click events
sampleRate: null, // e.g. 50 - set the sample rate at 50%
submitEvents: {'#personUK': '/personsearch/uk'}
}
);[/source]
I've not added any eCommerce tracking to this release as we simply don't have the need for it.
If you use this script, pplease leave a comment!


LUFA Library
111009
Related Pages
Here is a list of all related documentation pages:
[detail level
1
2
3
]
▼
About LUFA
▼
Device and Hardware Support
Atmel 8-Bit AVR (AVR8) Support
Atmel 32-Bit UC3 AVR (UC3)
Atmel USB XMEGA AVR (XMEGA)
Library Resources
Project Changelog
Future Changes
User Projects Powered by LUFA
▼
Developing With LUFA
Summary of Compile Tokens
Migrating from Older Versions
VID and PID values
Building as a Linkable Library
Writing LUFA Board Drivers
Entering the Bootloader via Software
▼
Getting Started
Configuring the Demos, Bootloaders and Projects
Compiling the Demos, Bootloaders and Projects
Programming an Application into a USB AVR
Deprecated List


--- layout: default title: A Node Operator's blog ---
These coins generally have their own installation scripts and guides. However, these are not always easy to use for everybody, or are sometimes written by people with more experience in software developpement than in system administration. This eventually leads to systems installed with poor security concerns, most often error being made is installing as root ... This is a major security breach for a decent server, and should NOT be done this way. Another common mistake is to publish unoptimized binaries (unstriped), wich would consume unecessary RAM on the VPS.
A lot of work has yet to be done to make this page usefull. As i have been pretty busy lately, and am starting a new job position this week, i may not spend a lot of time on this work these next couple of days ... but it is just a matter of time till i come back here and write the promised installation scripts and tutorials. Patience is the key ;-)
Over time, i'll improve this documentation, and try to give more in depth explanation of how and why some things are done one way or another.
Have fun with crypto ! tof


Module arrayutil
Various utility functions for working with arrays.
An array is sub-form of a array, the array is simply indexed with numbers like this:
local array = { 1 = "a", 2 = "b", 3 = "c" } local array = { "a", "b", "c" }
Functions
| contains (array, item, equals, offset_step) | Gets if the given array contains the given item. |
| create2d (start_x, start_y, end_x, end_y, default_value) | Creates a 2D array with the given bounds and sets it to the given default value. |
| create3d (start_x, start_y, start_z, end_x, end_y, end_z, default_value) | Creates a 3D array with the given bounds and sets it to the given default value. |
| index (array, item, equals, offset_step) | Gets the index of the item in the given array. |
| next_matching_column (array, start_index, matcher, reverse) | Finds the next matching column. |
| next_matching_row (array, start_index, matcher, reverse) | Finds the next matching row. |
| previous_matching_column (array, start_index, matcher) | Finds the previous matching column. |
| previous_matching_row (array, start_index, matcher) | Finds the previous matching row. |
| reduce2d (array, is_empty) | Removes empty rows and columns at the beginning and the end of the given array. |
| swapped_reindex2d (data, new_x, new_y) | Reindexes the given 2D array, swapping the two dimensions. |
| swapped_reindex3d (data, new_x, new_y, new_z) | Reindexes the given 3d array, swapping the two dimensions. |
Functions
- contains (array, item, equals, offset_step)
-
Gets if the given array contains the given item.
Parameters:
- array The array to search in.
- item The item to search for, can either be an item or another array.
- equals Optional. The function to determine if items equal each other, defaults to tableutil.equals.
- offset_step Optional. If the given item is an array, this determines how much of the array is skipped before it is tried to match.
Returns:
-
true if the array contains the given item.
- create2d (start_x, start_y, end_x, end_y, default_value)
-
Creates a 2D array with the given bounds and sets it to the given default
value.
Parameters:
- start_x The start of the first dimension, inclusive.
- start_y The start of the second dimension, inclusive.
- end_x The end of the first dimension, inclusive.
- end_y The end of the second dimension, inclusive.
- default_value The default value that will be set, it will be cloned for every entry.
Returns:
-
The created 2D array.
- create3d (start_x, start_y, start_z, end_x, end_y, end_z, default_value)
-
Creates a 3D array with the given bounds and sets it to the given default
value.
Parameters:
- start_x The start of the first dimension, inclusive.
- start_y The start of the second dimension, inclusive.
- start_z The start of the third dimension, inclusive.
- end_x The end of the first dimension, inclusive.
- end_y The end of the second dimension, inclusive.
- end_z The end of the third dimension, inclusive.
- default_value The default value that will be set, it will be cloned for every entry.
Returns:
-
The created 3D array.
- index (array, item, equals, offset_step)
-
Gets the index of the item in the given array.
Parameters:
- array The array to search in.
- item The item to search for, can either be an item or another array.
- equals Optional. The function to determine if items equal each other, defaults to tableutil.equals.
- offset_step Optional. If the given item is an array, this determines how much of the array is skipped before it is tried to match.
Returns:
-
The index of the given item or array, -1 if it was not found.
- next_matching_column (array, start_index, matcher, reverse)
-
Finds the next matching column.
Parameters:
- array The 2D array to search.
- start_index Optional. The index at which to start. Defaults to 1, or if the direction is reversed, the number of columns in the array.
- matcher Optional. The function that is used to determine if the column matches or not. Is expected to take one argument, the item, and return a boolean. The column matches if any of its items matches this condition. Defaults to not nil and not empty string.
- reverse Optional. If the array should be serched backwards. Defaults to false.
Returns:
-
The index of the matching column. -1 if none was found.
- next_matching_row (array, start_index, matcher, reverse)
-
Finds the next matching row.
Parameters:
- array The 2D array to search.
- start_index Optional. The index at which to start. Defaults to 1, or if the direction is reversed, the number of rows in the array.
- matcher Optional. The function that is used to determine if the row matches or not. Is expected to take one argument, the item, and return a boolean. The row matches if any of its items matches this condition. Defaults to not nil and not empty string.
- reverse Optional. If the array should be serched backwards. Defaults to false.
Returns:
-
The index of the matching row. -1 if none was found.
- previous_matching_column (array, start_index, matcher)
-
Finds the previous matching column.
Parameters:
- array The 2D array to search.
- start_index Optional. The index at which to start. Defaults to the number columns in the array.
- matcher Optional. The function that is used to determine if the column matches or not. Is expected to take one argument, the item, and return a boolean. The column matches if any of its items matches this condition. Defaults to not nil and not empty string.
Returns:
-
The index of the matching column. -1 if none was found.
- previous_matching_row (array, start_index, matcher)
-
Finds the previous matching row.
Parameters:
- array The 2D array to search.
- start_index Optional. The index at which to start. Defaults to the number rows in the array.
- matcher Optional. The function that is used to determine if the row matches or not. Is expected to take one argument, the item, and return a boolean. The row matches if any of its items matches this condition. Defaults to not nil and not empty string.
Returns:
-
The index of the matching row. -1 if none was found.
- reduce2d (array, is_empty)
-
Removes empty rows and columns at the beginning and the end of the given
array.
Parameters:
- array The array.
- is_empty Optional. The function used for determining if the item is empty. By default nil and an empty string is considered empty. Expected is a function that takes one item and returns a boolean.
- swapped_reindex2d (data, new_x, new_y)
-
Reindexes the given 2D array, swapping the two dimensions.
Parameters:
- data The array to reindex.
- new_x The new startpoint for the first dimension.
- new_y The new startpoint for the second dimension.
Returns:
-
The reindexed array.
- swapped_reindex3d (data, new_x, new_y, new_z)
-
Reindexes the given 3d array, swapping the two dimensions.
Parameters:
- data The array to reindex.
- new_x The new startpoint for the first dimension.
- new_y The new startpoint for the second dimension.
- new_z The new startpoint for the third dimension.
Returns:
-
The reindexed array.


FROM THE DESK OF: MR.JEFF VILAGAZI MANAGER BILLS/EXCHANGE. ABSA BANK, JOHANNESBURG SOUTH AFRICA. Dear Sir/ Madam, Firstly, I would like to introduce myself. My name is Jeff Vilagazi. I am the Manager of Bills/Exchange at the Foreign Remittance Department of one of the leading banks in South Africa. In my department, we discovered an abandoned sum of US$14,700,000.00 (fourteen million seven hundred thousand united state dollars) in an account that belonged to one of our foreign customers who died along with his wife in a plane crash. Since we received the news about his death, we have been expecting a next-of-kin to contact us and claim the money because we cannot release the money unless an application for release is made by such person(s) or by someone authorised by the deceased as indicated in our banking guidelines and inheritance laws of South Africa. Unfortunately, nobody has come forward to claim this money up till the present time of writing. It is based on this background that some officials in my department and I have decided to make an initial contact with you to establish a business relationship to claim the money. In essence, we will like to form a partnership with you where you can then present yourself as the next of kin through your relation with the deceased so that the funds can be remitted into your account. This is because unless the money is claimed now, it will go into the government accounts as unclaimed funds. The banking law and guidelines here stipulates that any account which is abandoned or dormant for a certain period of years is deemed closed and all money contained therein forfeited to the government treasury account. Now, it is being speculated that the above sum will be transferred into the government account as an unclaimed funds. The mode of sharing after a successful transfer of the money into your account shall be determine by me and you during the cause of your Phone call, to know how much you will like to take. But you should know that we have already set outside 5% of the total sum for any miscellaneous expenses we may encounter in the course of this transaction. We therefore expect you to reply to this letter through this email address to discuss the transaction further with you. After receiving your reply, we will contact you and furnish you with more details and the exact steps to take in completing this transfer. We have full access to the deceased biological data, which we will furnish you and then use to present yourself as the rightful next of kin, which give you a claim to the funds. I also will not fail to bring to your notice that this transaction is hitch-free and that you should not entertain any atom of fear as all required arrangements have been made for the movement of the money. You should contact me immediately as soon as you receive this letter. Please kindly indicate the following in your response: 1.Your full name 2.Your direct telephone and fax number for easy communication 3.Your company's name and address 4.Your Country of Origin 5.Your Residential Address 6.Your Age. Best regard, Mr. Jeff Vilagazi.


DECIPHER
Menu
Welcome To Text Translator
Because Language should not be Barrier for you!!
Input your text below


private val listener: WebSocketListener
The WebSocketListener which every open WebSocketChannel uses to handle incoming requests.
listener - The WebSocketListener which every open WebSocketChannel uses to handle incoming requests.
listener


Neighbours raging as fireworks let off at 5am in Derbyshire town
The loud bangs woke a lot of people up
by Paul WhyattPeople living in a Derbyshire neighbourhood have vented their fury after being woken by fireworks in the early hours of this morning.
Residents in the Petersham area of Long Eaton say loud bangs went off between 4.30am and 6am.
Posting on the Spotted: Long Eaton Facebook page , one person wrote: "Anyone else hear the fireworks at 5am this morning around the College Street area?"
A number of people replied, including Lindsey Danielle who said: "Yes, I did. Quite a few went off too."
Several complained that the fireworks had woken them up.
Another person posted: "Some people have got no respect at all. I do not live in that area but I feel sorry for the other people, especially on a Sunday morning."
It is against the law to set off fireworks between 11pm and 7am, except on certain occasions:
- On Bonfire Night, adults are allowed to set off fireworks until midnight
- On New Year's Eve, Diwali and the Chinese New Year, fireworks are allowed up until 1am
Anyone caught breaking the rules can be fined up to £5,000.
If deemed serious, culprits could be imprisoned for up to six months for selling or using fireworks illegally.
An on the spot fine of £90 can also be issued.


$KMD charging #developers $7,500 USD to list their coins on a closed source GUI, that are already coded into the backend MM2 DEX code....

#ENEMY #DUMPIT #CENTRALIZED #POSERS #FAKES #SCAM #GREED #CORRUPT #komodo #atomicdex


Cute Video Of Taiwanese Dad and Daughter Who Fell Asleep on The Subway After A Tiring Day Out
by Roxanne TaiTap to listen to this article instead: 🔊 Listen to Post
Taking care of kids is taxing for sure, especially when one parent is on duty to be responsible for the little human(s), it could easily lead to a big nap party. Moms and dads are known to care for their children differently, and this Taiwanese dad became viral because he was too exhausted (possibly because of a day out with his daughter).
A video was uploaded onto a Taiwanese Facebook page called “三小” (What The Three Small), and netizens were enjoying how adorable this father-daughter duo was. Both the young dad and toddler lost their battle with the sleepy bug and fell asleep on the subway.
We’re also cracking up at caption of this video: “The dad is tired of taking care of his daughter, but she is even more exhausted from being taken care of by her dad.”
It seems like the father didn’t give a sh*t about how he looked like as he slept through the subway journey. Even when his daughter lost balance and her entire upper body slid all the way down to the seat cushion, none of them budged a single bit.
Since the netizens were well-entertained by this video, they had flooded the comments section exclaiming how adorable this duo was. Some of them had also imagined how furious the mom would’ve reacted if she saw this video.
“This is why I wouldn’t dare to let you take care of the kids…”
“I guess you won’t see this happening to moms.”
“His wife must be really furious right now. 😂”
Aww, it seems like both the dad and daughter had a lot of fun that day. Our hearts definitely melted!
Also read: Watch: M’sian Dad & Daughter Try to ‘Blow Back’ the Haze in the Most Adorable Way


While there are a LOT of things I really like about the Go language, the bottom line is that I don’t use it (mostly because when I studied it the libraries were kind of scarce, something that’s apparently changed a lot). It attracted me, but not enough for me to change over from Python.
Go has made some brilliant design decisions. I especially like the built-in features that in most other languages you must go figure out for yourself — like the build tool, standard formatting (enforced with go fmt) a test framework (which you run with go test), and natively-supported concurrency/parallelism. Other languages (especially new ones) should take note and follow this example. Like Ruby on Rails, make the standard decisions and allow the user to trap-door out if they want, but don’t just force everyone to go through the same basic decision exercises when they pick up the language. (One thing that really bugs me, though, is the use of tabs. I thought we had finally shaken that ancient artifact from mechanical typewriters.)
If Go had come out much earlier, I think it might have blown C++ out of the water. But the programming culture has evolved since then, and now things like classes and generics are understood and expected. And perhaps that’s one of the issues: Go seems to be competing with C++ for the C crowd. Java already tried to move on from C++ (Gosling made it clear that their only choice for the never-built set-top box was C++ and that was such a heinous thought that they ended up creating a new language instead).
The article Everyday Hassles in Go drills down into what’s lacking in the language, in particular the need for generics.
I asked my favorite client (So far — I hope for even better ones in the future) for an update in the year+ since he told me they were moving to Go:
Well, a lot of interesting things have happened along that path. Almost nothing I thought would happen has come to pass. About the time everyone hit maximum frustration with Pythons (plural intentional) we decided to have extended weekend retreat to figure out where everything fit. And try as many different types of tequila and chile con quesos as we could. We wanted two paths: a great platform for prototyping that everyone could use and love, a high-performance platform for the few things that really needed to evolve beyond prototype, and a C-something library that could be used by both. If you’re going to fantasize it might as well be no-holds-barred, right?
The problem with Go is that it didn’t really fit either one of those well. The prototypers (engineers and scientists) are into R, Mathematica, and Python. It might be fair to say that they were moving from R to the other two. Then along came Hadley Wickham on a one-man crusade to drag R into the 21st century. Things like dplyr, ggplot2, data.table, and a few other new packages have completely changed the face of R, much to the chagrin of the old guard and delight of users. So momentum has now swung back towards R, although there is considerable excitement about Mathematica and the new Wolfram language.
On the high-performance side we’ve used a combination of C++ and Qt to build apps, although C#’s multicore stuff and new Microsoft approach to open source parts of it have changed perceptions. Younger programmers are more excited about C# than C++, so maybe there is something there. I thought that a language that supported concurrency natively like Go would appeal to the crowd, but the lack of scientific library support has turned them off. There seems to be consensus that native concurrency is highly desired, but that sustained investment and momentum are equally important. Google seems unable or unwilling to put resources into Go to compete with other frameworks. Or at least that’s the perception.
We probably talked about other stuff as well, but by that time we were largely incoherent, so I’m not sure what else was decided. Since then we’ve started moving slowly to C# for heavy stuff. But with each passing year we leave more and more things in prototypes, in large part because they do everything we need with acceptable performance, so C# is becoming less and less relevant. Some people still play with Go, but not enough converts to sustain interest in it. My sense is that in a decade we’ll all be using Wolfram, but it’s a big enough change that old-timers like me can best facilitate it by retiring and making way for those who truly get it. To me it [Wolfram] seems so vast that I’m having a hard time getting my head around the core essentials.
I’m in same boat as you are: I like Go, yet there is nothing particularly compelling about it. It seemed to better fit as replacement for the OO platforms we were using, and we liked the apparent efficiency of the language. And minimal is great as a design philosophy. But most of us felt that it was minimal because only a few zealots were working on it and they could only accomplish so much that way, making it more of an excuse than a bold statement. I wish it would succeed, but if it is going to elbow out the OO big dogs it needs more momentum than it has right now.
I guess another factor that I forgot about was data frames. We use them in R, and Python has them as well (via pandas, which seems like a godsend compared to PyTables for the stuff we do). There was little enthusiasm for building comparable functionality in Go, or even looking into adapting pandas for it (as I had suggested). When we broached the topic with the Go dev team they offered embedded SQL as the answer for working with dynamic tables.
Maybe it will succeed, maybe won’t. But we’ll be watching from the sidelines rather than middle of the pack, which is where our initial enthusiasm led us to believe we’d be by now.
 The biggest draw would be a really simple & transparent interface between Python and Go, so that if I need to do low-level hardware things or parallel programming (for more than can be accomplished with the multiprocessing library), I could easily drop into Go for that. The next-most-compelling factor would be a library that I couldn’t find anywhere else — an excellent example of this in Python is the BeautifulSoup library for manipulating HTML, the likes of which I’ve never seen anywhere.


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 8
Dietary
Chocolate custard, cake and booze. What's not to like?
First make the custard as this will need to chill before you make up the trifle. Melt the chocolate - either in the microwave or very carefully in a bain marie (a heatproof bowl placed over a pan of simmering water). Leave to cool.
Put the milk and cream into a saucepan with the vanilla pod and bring to just-below boiling point. Remove from the heat and leave to infuse until cooled slightly.
Put the egg yolks, caster sugar, cocoa powder and cornflour into a bowl and whisk, preferably with electric beaters, until the mixture is very well aerated, pale and stiff enough so that it keeps shape when you trail the beaters through it.
Pour the slightly cooled milk and cream mixture over the eggs, mixing as you go, then stir in the melted chocolate. Mix thoroughly, then rinse out the saucepan and return the custard to it. Cook, stirring constantly until the custard thickens – this can take anything between 10 and 20 minutes depending on how high you dare have the heat. Do not have it on too low a heat as it will not thicken, but make sure you do not let the mixture boil and keep stirring.
When the custard has thickened to the point of thick double cream, transfer to a jug and cover with clingfilm to stop a skin from forming. When cool, transfer to the fridge – the custard will continue to thicken while it chills.
To make the trifle, cut the brownies or chocolate cake into fairly thin slices and spread with the jam. Sandwich together and arrange in the bottom of a large trifle bowl. Pour over the kirsch or cherry brandy, then sprinkle over the cherries.
Put a layer of the amaretti biscuits over the cherries, then pour over the custard in a thick, even layer. If you have time, place in the fridge until almost ready to serve, again covered in cling film.
Whisk the double cream in a bowl until it forms soft peaks, then smooth this over the custard. Decorate with chocolate curls.


Thien's Page I like: going to the state parks spending time with my children being in the coir but not sing :) Jennifer Aniston coz I like Friends Being at Intuit More than 2 years


Package slogo.compiler
Class Workspace
java.lang.Object
slogo.compiler.Workspace
- All Implemented Interfaces:
Observable<WorkspaceObserver>
public class Workspace extends java.lang.Object implements Observable<WorkspaceObserver>
Keeps track of all objects that extend
WorkspaceEntry
.
Will notify the WorkspaceViewController
of any changes. Internally keeps
the WorkspaceEntry
objects in Collection
s.
SLogoCommand
objects have direct access to this class because they frequently create or
use objects in the workspace. For example, a MakeUserInstructionCommand
,
once performed, would place all the function's required parameters as variables in the workspace,
as well as the Function
object it creates.
When Function
is running through its Token
objects, if it comes across
a generic Token
type with no specific subclass, it will search through the workspace
for a Variable
or Function
that matches its toString()
.
At most one Workspace
instance should be created per session of SLogo, and the
instance should be created at startup.-
Field Summary
Fields Modifier and Type Field Description private java.util.List<WorkspaceObserver>
myObservers
private java.util.Map<java.lang.String,WorkspaceEntry>
workspaceEntryMap
-
Constructor Summary
Constructors Constructor Description Workspace()
-
Method Summary
Modifier and Type Method Description void
add(WorkspaceEntry entry)
Adds the passedWorkspaceEntry
to the workspace.void
addObserver(WorkspaceObserver observer)
boolean
isObserver(WorkspaceObserver observer)
void
removeObserver(WorkspaceObserver observer)
WorkspaceEntry
search(java.lang.String name)
Returns theWorkspaceEntry
with the matching name identifier.WorkspaceEntry
searchAndAddIfAbsent(java.lang.String entryType, java.lang.String name)
Returns theWorkspaceEntry
with the matching name identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
workspaceEntryMap
-
myObservers
-
-
Constructor Details
-
Workspace
public Workspace()
-
-
Method Details
-
add
Adds the passedWorkspaceEntry
to the workspace. This also notifies theWorkspaceViewController
of the addition. In the case that aWorkspaceEntry
with the same name already exists, this operation will replace it with the most recently passed object.- Parameters:
entry
- theWorkspaceEntry
to add to the workspace.
-
search
Returns theWorkspaceEntry
with the matching name identifier. If not found, return null.- Parameters:
name
- searchString
.- Returns:
- the
WorkspaceEntry
matching the search name, ornull
.
-
searchAndAddIfAbsent
Returns theWorkspaceEntry
with the matching name identifier. If not found, creates a new entry of the correct type, adds it to theWorkspace
, and returns the newly created object.- Parameters:
name
-String
name of the entryentryType
-String
description of the entry type- Returns:
- a
WorkspaceEntry
object that is found in the workspace or newly created.
-
isObserver
- Specified by:
isObserver
in interfaceObservable<WorkspaceObserver>
-
addObserver
- Specified by:
addObserver
in interfaceObservable<WorkspaceObserver>
-
removeObserver
- Specified by:
removeObserver
in interfaceObservable<WorkspaceObserver>
-


Updated:
Welcome to the blog!
My name is Andrew Burns I am currently 16 at the time of this post and I’m an aspiring entrepreneur and programmer. I don’t want to bore you so I’ll try to make things on here short.
I decided I wanted to become an entrepreneur when I was 11 years old. I would spend all day during school jotting down inventions and ideas. Some of them are silly but some I still think about. I was blessed to meet a woman by the name of Mrs. Reilly. Other than teaching me 8th grade English, she changed my outlook on life. For about a year and a half before meeting her, I had been writing down ideas and sketches. I had no idea what I was doing or if any of it was good but I loved it. Mrs. Reilly is too an entrepreneur but ran into troubles which forced her to find a new way to support her family. She became my entrepreneurial mentor and made me believe in myself and my future.
 It was at a family party where I was talking to my cousin Avi who happened to be a programmer and entrepreneur. I told him about my pitiful attempts to learn to program on my own and he offered to teach me. It was around this time that I was become intrigued by technology and the modern gold rush it was becoming. Without his help I would never have been able to come so close to making many of my sketches of technology ideas into reality.
A year and a half later, I learned Ruby, Sinatra, and I am well into learning Ruby on Rails.This blog will have updates on my process of learning to program and possibly my entrepreneurial endeavors.