Welcome To Virus City!
Time:
People Infected:
×
Quarintine:
Close Schools
Work from Home
Close Stores
Close Gyms
AddPerson
Modifycity


| finalizeHtml {diffobj} | R Documentation |
Used as the finalizer
slot to StyleHtml
objects to wrap
character output prior to output to device. Used primarily by styles that
output to HTML to properly configure HTML page structure, including injecting
JS, CSS, etc..
finalizeHtml(x, ...) ## S4 method for signature 'ANY' finalizeHtml(x, x.chr, js, ...) ## S4 method for signature 'Diff' finalizeHtml(x, x.chr, ...) ## S4 method for signature 'DiffSummary' finalizeHtml(x, x.chr, ...)
x |
object to finalize |
... |
arguments to pass on to methods |
x.chr |
character text representation of |
js |
character javascript code to append to HTML representation |


the occurrence and development of events by chance in a happy or beneficial way.
the state of being happy. "she struggled to find happiness in her life"
the quality or state of being tranquil; calm. "passing cars are the only noise that disturbs the tranquility of rural life"
The quality or state of being positive. 2 : something that is positive.
1. strong and barely controllable emotion. "a man of impetuous passion" 2. The suffering and death of Jesus.


Multiple sclerosis, known as MS, is a long-lasting hazardous disease that can affect your brain as well as nerve tissues. In addition, MS disease can even damage your vision, balance muscle control, and other basic functions of the body. Being one of the most hazardous problems that affects the whole nerve system, MS disease has many types well defined by different doctors. However, in some ways, each person with multiple sclerosis lives with a different illness.
Although many doctors still don’t understand what causes multiple sclerosis, the ongoing research shows that the disease is genetic. The disease, often appears between 20 and 40 years old, causes many dangerous symptoms like fatigue, thinking problems, swelling (inflammation the optic nerve and depression. Even more, it can be a challenge for doctors to diagnose MS disease because there is not a clear test that proves you have the disease other than diagnosing the changes in your brain and nerve system.
Every day, people living with MS do whatever it takes to move their lives forward despite the challenges. By sharing their stories, we help people better understand life with MS and become inspired to do whatever it takes to change the world for people living with MS. You can make sure that more people understand what life with MS can be like and engage more people to do something about it, by sharing this article around and sharing the stories of those living with MS, who move life forward every day and don't let MS define them.
Quantum mechanics has been a mystery since its first theory. Actually, Niels Bohr once said, "Those who are not shocked when they first come across quantum theory cannot possibly have understood it." However, this mystery is believed to be the future of humanity...


DEAD MAN A film review by Steve Rhodes Copyright 1996 Steve Rhodes
RATING (0 TO ****): *** 1/2
"It is preferable not to travel with a dead man."
-Hemri Michaux
Jim Jarmusch's (STRANGER THAN PARADISE, DOWN BY LAW, and MYSTERY TRAIN) latest film is his best. The film is entitled DEAD MAN, not to be confused with the completely different DEAD MAN WALKING from last year. Although I have not been a Jarmusch fan before this picture, I am now. DEAD MAN features a great performance by the ever enthralling Johnny Depp (ED WOOD, DON JUAN DEMARCO and EDWARD SCISSORHANDS), impressive and moving black and white cinematography by Robby Mueller (TO LIVE AND DIE IN LA and REPO MAN), and a score by Neil Young so strong that it dominates, but never overpowers the picture. Although the show is quirky enough not to be everyone's cup of tea, I was blown away by it.
DEAD MAN is a mystical journey set in the old West in the later half of the nineteenth century. An accountant with the same name as the great English visionary poet, painter, and inventor William Blake (Johnny Depp) leaves on a train to travel deeper and deeper into the wilderness of the American West. He is going to the end of the line to the filthy town of Mechanic to accept a job offer.
Possibly the best scene is on the train to Mechanic. Blake keeps falling asleep and when he awakens his fellow passengers keep changing, getting scruffier and rougher (thanks to great costumes by Marit Allen), whereas he is wearing a fancy outfit described by others as a clown outfit. He shows his job offer to the train's ethereal fireman (Crispin Glover). The fireman prophetically advises him, "I wouldn't trust no words written on no piece of paper." The coal dust make-up (Neal Martz) on the fireman gives him a realistic but macabre appearance.
When Blake arrives, he finds the owner of the metalworks, John Dickenson (Robert Mitchum) has already given his job to someone else. Office manager John Scholfield (John Hurt) roars in laugher at city slicker Blake and thinks it fitting he lost his job.
Through even more bad luck, Blake hooks up with Thel Russel (Mili Avital). He is in bed with her when Dickenson's son and Thel's long gone fiance, Charlie (Gabriel Byrne) shows up. Thel and Charlie both get killed. This sets up the body of the movie, as Dickenson hires the three best gunslingers around, Cole Wilson (Lance Henriksen), Conway Twill (Michael Wincott), and Johnny Picket (Eugene Byrd), to bring Blake back - dead or alive. Along his spiritual journey, Blake teams up with a rotund Indian whose name means, "He who talks much and says nothing", but who goes by the nickname of Nobody (Gary Farmer). Also along his odyssey, he comes across a group of unusual animal skinners, Big George Drakulious (Billy Bob Thompson), Salvatore Jenko (Iggy Pop), and Benmont Tench (Jarred Harris), two marshals (Jimmie Ray Weeks and Mark Bringelson), and an anti-Christian Christian missionary (Alfred Molina).
The acting in the show is sharp and taut. There are two outstanding performances by Depp and Farmer. Depp can convey more through just expressions than most loquacious actors can with volumes of words. In a film whose strength lies in its bold imagery, the casting of Depp as the lead is brilliant. Farmer plays an assertive, fresh mouthed Indian with a natural gift for humor. Nobody has Blake wrapped around his fingers. I loved Farmer just as much as Depp in the picture.
The script by Jim Jarmusch is smart and biting.  When he replies "William Blake", Nobody is in rapture since William Blake is his favorite poet, and he decides this man must be he. Soon Nobody is off reciting his favorite Blake passages, "Some are born to sweet delight; some are born to endless night." When Blake is surprised that Nobody knows they are being followed, Nobody explains, "The evil stench of white man precedes him."
The director's pacing and the relaxed and smooth editing by Jay Rabinowitz make for a dreamy show. Most scenes have dramatic Neil Young electric guitar music, cinematography with sharp black and whites, but with highly gradational grays, and long blank places between words. This is a director who knows the value of a character's silence and how to use it to maximum effect. I do not remember a movie where the music worked better or where it was more central to the success of the film. I am not a Neil Young fan either, but I was mesmerized by his work here.
As the show was drawing to a close, I began to wonder how they would end it. To me the ending is perfect, and it provides a beautiful symmetry to the beginning. When the show was over and the house lights went up, I felt privileged to have seen a incredible piece of cinematic art. Totally unique. To be fair, I later got into a conversation with a local newspaper movie critic who found only the opening scene appealing, but I loved DEAD MAN from beginning to end.
DEAD MAN runs 2:07. It is rated R for some sex, brief nudity, and some very violent scenes like the one where they slice someone's skin and blood spurts out. I think it would be fine for any mature teenager. For some movies like ANNE FRANK REMEMBERED and THE JOY LUCK CLUB, a critic can recommend it knowing that almost everyone will love it, where in other films like DEAD MAN, it is not so clear. Nevertheless I recommend this show to you strongly if you are the last bit adventuresome in your cinematic tastes, and I award it *** 1/2.
**** = One of the top few films of this or any year. A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show.  Totally unbearable.
REVIEW WRITTEN ON: May 4, 1996
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Citing ‘competition of values’, Pompeo lays into Russia, China
BERLIN, Nov 8 — Russia slays political opponents and China’s tactics would be “horrifyingly familiar” to former East Germans, US Secretary of State Mike Pompeo said today, describing free nations as being in a “competition of values” with unfree nations.
In a speech in Berlin on the lessons of the fall of the Berlin Wall in 1989, Pompeo said “the West – all of us – lost our way in the afterglow of that proud moment.”
“We thought could divert our resources away from alliances, and our militaries. We were wrong,” he said.
“Today, Russia – led by a former KGB officer once stationed in Dresden ‒ invades its neighbours and slays political opponents,” he said. “In China, the Chinese Communist Party is shaping a new vision of authoritarianism.”
“Let’s stand together in unity,” he concluded. “Let’s stand together as allies.” — Reuters


Microsoft revises data privacy terms following EU probe
by EUobserverMicrosoft announced on Monday that it was updating the privacy terms of its commercial clouds - after the EU's data watchdog (EDPS) suggested in October that Microsoft's contracts with the European institutions fail to meet EU's data protection rules (GDPR). "We will increase our data protection responsibilities for a subset of processing that Microsoft engages in when we provide enterprise services," said the tech company in a statement.


Time for execution {{t}}.
Centroids locations are {{cen}}.
centroid points are {{ctr}}.
Distance between centriods are {% for i in ds: %}
{{i}} . {% endfor %}


HiGlass: A Multiscale Genomic Data Browser¶
HiGlass is a viewer for large-scale genomic data. It takes ideas introduced in genome browsers such as the UCSC Genome Browser and combines them with inspirations from more recent HiC data browsers such as Juicebox and implements them in a framework inspired by modern online maps (so-called slippy maps) to form a fast, extensible and responsive viewer for diverse types of genomic data.
The HiGlass application actually consists of four distinct components:
higlass-client - This is the Javascript library that displays heatmaps, tracks, etc. In a sense, this is the meat of the application. The vast majority of the updates are on this component.
higlass-website - This is the website that embeds the higlass-client. It can contain multiple higlass clients (as on the front page of higlass.io).
higlass-server - The server manages data and serves it to the client in small chunks that match the current zoom level and location. It is a python django application that exposes an API. For example, http://higlass.io/api/v1/tilesets lists the tilesets that the server knows about.
higlass-docker - This docker container contains all three of the above repositories and packages them so that they can be easily run without having to install and run each separately. An update in any of the above repositories will be reflected in an update in the docker container. The versions of all the components is accessible at http://higlass.io/version.txt
Track types¶
HiGlass supports both 1D and 2D track types that can be arranged in views to show desired combinations of data.
It can be used to display a variety of track types populated with data from different file formats.
Technology¶
HiGlass is built with a variety of different open source components. The most crucial are listed below.
- D3.js - an outstanding library for online data visualization. We make heavy use of D3’s scales, zoom behavior and brush behavior.
- Pixi.js - a fast, easy to use and most importantly, well-documented library for drawing scene graphs on html canvases. Oh, and it has WebGL support. We use Pixi to quickly render track data and perform updates on zooming and panning.
- React - a widely used library for managing state within web applications. We use React to manage the user-interface components and lay out the positions of the views and tracks.


TimeBook
JWT Spring Security Demo
Not logged in!
User Login
login
Try one of the following logins
admin & admin
user & password
disabled & password
CREATE USER
sign-in
Authenticated user
logout
移除token
call example service
call admin protected service
Response:
Token information
Article List:
ALL:
ADD Article
ADD
Article List Page:
PAGE:
Article Details:
Details:
×
Login unsuccessful


Fajri Abdillah
fajri @ [horangi.com, serverless.id, myedisi.com]
Road to DevOpsDay Jakarta 2020
About me
DevOps - What?
DevOps - Why?
DevOps - Pillars
Cloudformation Demo
Software Engineer at Horangi Cyber Security
Currently, build the 5th saltwater tank
I don't have any AWS certification (yet)
Learn AWS the hard way
DevOps is a set of practices that automates the processes between software development and IT teams, so that they can build, test, and release software faster and more reliably
A running well DevOps culture would result in a great product that is stable and increasing its value
At its essence, DevOps is a culture, a movement, a philosophy
Teams that practice DevOps deploy 30x more frequently, have 60x fewer failures and recover 160x faster. — Puppet Labs 2016 State of DevOps Report
You can innovate faster than your competitor because you release more frequent
Faster feedback from your customer
Continuous Integration
Continuous Delivery
Continuous Deployment
Infrastructure as a Code
Monitoring
Logging
Communication & Collaboration
Development practice where developers integrate code into a shared repository frequently
Each integration can then be verified by an automated build and automated tests
One of the key benefits of integrating regularly is that you can detect errors quickly and locate them more easily
Example: Jenkins, AWS CodeBuild
Development practice of keeping your codebase deployable at any point
Usually combined with CI and resulting in a build artifact
Example: Elastic Beanstalk deploy, serverless deploy
Development practice of keeping your codebase automatically deploy when it pass all test
When this practice applied on Dev environment, the developer can see their changes live
Example: AWS CodePipeline and AWS CodeDeploy
Practice in system architecture where resources is define in a code
Easily replicating the whole infrastructure
You can create the whole infra with 1 button push
You can destroy the whole infra with 1 button push
Example: AWS Cloudformation, AWS CDK, Terraform, Pulumi
A product / system must be monitored to understand itself
With this practice, you can react faster
Business is depends on this practice
Example: AWS Cloudwatch, Prometheus, Grafana
We don't really care when everything goes well
We really care when everything goes not well
Centralized logging is needed in microservice
Example: AWS Cloudwatch logs, ELK Stack
The result of good DevOps practice would increasing this aspect
Not only between developers, but also with marketing, operations and another team
Horangi use slack extensively
Example: Slack, Hipchat, JIRA, Trello, Pivotal Tracker
Join our Facebook Group : Serverless Indonesia
Our Medium Publications : Serverless Indonesia
Our u(n)pdated Blog : blog.serverless.id


All of these SVG images are unique in their own way. I made them knowing that I wanted them to be simple. I think that most of these could be used in some type of applictation. The heart SVG would work very well as a icon for a social medias "like system".


A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:
012 021 102 120 201 210
What is the millionth lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
Observation:
factorial(10) = 3628800
kinds, 9 digits permutation has factorial(9) = 362880
kinds0
and 1
could take up 2 * factorial(9)
permutations, remaining factorial(10) - 2 * factorial(9)
to fulfillATTENTION : used digits need to remove to avoid duplication, which conflicts with 'permutation'
from math import factorial
list(map(factorial, range(1, 11)))
def solve(ith):
digits = list(range(10))
permutation = []
for i in range(10):
d = ith // factorial(9-i)
ith %= factorial(9-i)
permutation.append(digits[d])
digits.pop(d)
return ''.join(map(str, permutation))
solve(int(1e6)-1)


Upon completion of this unit, you will be able to:
The following topics will be covered in this unit:
Build context sent to daemon as tar archive
A URL for a remote Git repo can contain a fragment, with a context and optional sub-directory for the build:
https://path/to/repo/repo.git#context:sub-dir
| URL | Commit | Sub-Directory |
|---|---|---|
repo.git |
refs/heads/master |
/ |
repo.git#tag |
refs/tags/tag |
/ |
repo.git#branch |
refs/heads/branch |
/ |
repo.git#232e26f |
SHA1 hash = 232e26f |
/ |
repo.git:sub-dir |
refs/heads/master |
/sub-dir |
repo.git#tag:sub-dir |
refs/tags/tag |
/sub-dir |
repo.git#branch:sub-dir |
refs/heads/branch |
/sub-dir |
repo.git#232e26f:sub-dir |
SHA1 hash = 232e26f |
/sub-dir |
The format of the docker build command is:
docker build [options] path|URL|-
The config options available for the docker build command are:
| Client Options | Description |
|---|---|
-f, --file=Path/Dockerfile |
File to use as Dockerfile for build |
--force-rm=false |
Force removal of intermediate build containers |
--no-cache=false |
Don't make use of the build cache |
--pull=false |
Pull newer version of base image if one exists |
-q, --quiet=false |
Build the image very quietly |
--rm=true |
Remove intermediate containers after successful build |
-t, --tag=[] |
Provide image name and tag(s) for newly built image |
--build-arg=[] |
Supply variables for the build process |
This Dockerfile shows the instructions for creating a simple implementation of the lighttpd http server:
FROM debian
RUN apt-get -qq update && \
DEBCONF_NOWARNINGS=yes apt-get install -y lighttpd > /dev/null && \
rm -rf /var/lib/apt/lists/*
EXPOSE 80
ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
The image can be built with the following command:
$ docker build -t lighttpd .
In this example, the build context is empty
The format of the FROM instruction is:
FROM repository[:tag|@digest]
FROM scratch
results in a no-op instruction with no new image layerThe format of the MAINTAINER instruction is:
MAINTAINER name
The formats of the RUN instruction are:
RUN command # Shell Form
RUN ["prog", "arg1", "arg2", ...] # Exec Form
The formats of the ENV instruction are:
ENV key value # Single key/value definition
ENV key=value ... # Multiple key/value definitions
The format of the ARG instruction is:
ARG key[=value]
The format of the EXPOSE instruction is:
EXPOSE port ...
The formats of the VOLUME instruction are:
VOLUME path ...
VOLUME ["path1", "path2", ...]
The format of the STOPSIGNAL instruction is:
STOPSIGNAL signal
The format of the LABEL instruction is:
LABEL key=value ...
The format of the WORKDIR instruction is:
WORKDIR path
The format of the USER instruction is:
USER username|uid
The formats of the COPY instruction are:
COPY src ... dest
COPY ["src"], ... ["dest"]
The formats of the ADD instruction are:
ADD src ... dest
ADD ["src"], ... ["dest"]
The formats of the CMD instruction are:
CMD [“arg1”, “arg2”, ...]
CMD [“prog”, “arg1”, ...]
CMD prog arg1 ...
The formats of the ENTRYPOINT instruction are:
ENTRYPOINT [“prog”, “arg1”, ...]
ENTRYPOINT prog arg1 ...
ENTRYPOINT ["/entrypoint.sh"]
CMD ["redis-server"]
#!/bin/bash
set -e
if [ "$1" = 'redis-server' ]; then
chown -R redis .
exec gosu redis "$@"
fi
exec "$@"
#!/bin/bash
set -e
if [ "$1" = 'redis-server' ]; then
chown -R redis .
exec gosu redis "$@"
fi
exec "$@"
Container Execution:
# Command executed -> entrypoint.sh redis-server
$ docker run -d redis
#!/bin/bash
set -e
if [ "$1" = 'redis-server' ]; then
chown -R redis .
exec gosu redis "$@"
fi
exec "$@"
Container Execution:
# Command executed -> entrypoint.sh redis-server --appendonly yes
$ docker run -d redis redis-server --appendonly yes
#!/bin/bash
set -e
if [ "$1" = 'redis-server' ]; then
chown -R redis .
exec gosu redis "$@"
fi
exec "$@"
Container Execution:
# Command executed -> entrypoint.sh /bin/bash
$ docker run -it --rm redis /bin/bash
The format of the ONBUILD instruction is:
ONBUILD instruction


Job Name:
{{ticketDetails.summary}}
Resolution:
{{ticketDetails.description }}
Age:
{{ticketDetails.CreationDate | issue_age}}
Group Summary:
{{ticketDetails.GroupSummary}}
Application
{{ ticketDetails.component }}
Business impact:
{{ticketDetails.business_impact}}
Priority:
{{ticketDetails.priority}}
Created by:
{{ticketDetails.assignee}}
Effort:
{{ticketDetails.original_estimate }}
Region:
{{ticketDetails.label_1}}
Location affected:
{{ticketDetails.label_2}}
Creation Date:
{{ticketDetails.CreationDate}}
Status:
{{ticketDetails.status}}


The /examples subdirectory of the top ACML installation directory (for example, possible default locations are /opt/acml5.3.1/pgi64/examples under Linux, or, under windows, c:\acml5.3.1\win64\examples), contains example programs showing how to call the ACML, along with a GNUmakefile to build and run them. Examples of calling both FORTRAN and C interfaces are included. They may be used as an ACML installation test.
Depending on where your copy of the ACML is installed, and which compiler and flags you wish to use, it may be necessary to modify some variables in the GNUmakefile before using it.
For 64-bit Windows versions of ACML it may be useful to have the Cygwin UNIX-like tools installed, so that you can use the make command that comes with them to build the examples. However, it is not necessary to have the Cygwin tools. The examples directory contains a bat script, acmlexample.bat, which can be used to run one of the example programs. Another bat script, acmlallexamples.bat, builds and runs all the examples in the directory. Alternatively, if you do have the Cygwin tools installed, you can use the GNUmakefile to build the examples.
If you need more example programs showing how to call LAPACK routines from Fortran, we refer you to this web page:
http://www.nag.com/lapack/
Here you will find examples for all double precision LAPACK driver routines, and all of these should work when linked with ACML. Note that as well as the example programs themselves, it is necessary to download and compile a small amount of utility code used by the programs. See the web page for detailed instructions.


Enter new size or choose different colour
Enter Size New ColourHover your mouse over the sketchbook and create pixelated images of your choice!
Enter new size or choose different colour
Enter Size New Colour


LoadAnimTexture ( file$,flags,frame_width,frame_height,first_frame,frame_count )
Parameters:
| file$ - name of file with animation frames laid out in left-right,
top-to-bottom order flags - texture flag: |
Description:
| Loads a sequence of animation frames into a texture. See also: CreateTexture, LoadTexture. |
| None. |


%pylab inline
import findspark
findspark.init()
import pyspark
import numpy as np
import datetime
import pandas as pd
import h5py
sc = pyspark.SparkContext(appName="CoeGSS_healthHabits")
We save a counter for each time step and infection status reading the steps of the simulation in teh output file.
We map the ((processor, time, status), 1)
and we reduce summing the values.
#################
# Configuration #
#################
# The abs or rel path to the output file...
resultsFileName = "../data/simulation_oneSeed_Out.h5"
#################
#################
# Load once and for all the steps<->datetime correspondence
with h5py.File(resultsFileName, "r") as f:
dataset = f["timeSteps"]
timeArra = np.empty(shape=dataset.shape, dtype=dataset.dtype)
dataset.read_direct(timeArra)
# Convert the array to a pandas series for dict-like access...
timedf = pd.DataFrame(timeArra)
timedf.set_index("stepNumber", drop=True, inplace=True)
timedf.date = pd.to_datetime(timedf.date)
timedf = pd.Series(index=timedf.index, data=timedf.date)
timedf.head()
def stepsIterator(filename):
'''
Here we simulate an iterator over the tables of the output file by reading them.
We have to skip the `timeSteps` dataset as it does not contains the tables we want.
For each level of the output file we iterate over all the group names found until our dataset is found.
'''
with h5py.File(filename, "r") as f:
for processor, processorGroup in f.iteritems():
if processor in ["timeSteps"]: continue
for run, runGroup in processorGroup.iteritems():
for step in runGroup.keys():
if step in ["parameters", "agent"]: continue
yield (filename, processor, run, step)
def flatMap_foo(vals):
'''
We flatten the dataset emitting the tuple containing the information we want.
In this case we export the
`(processRank, runRank, stepNumber, infectionStatus)`
Note that we filter out dead agents with `if row[aliveCol] == 0` (dead code > 0).
'''
filename, proc, run, step = vals
with h5py.File(filename, "r") as f:
dataset = f[proc][run][step]["agents/agent"]
data_arra = np.empty(dataset.shape, dtype=dataset.dtype)
dataset.read_direct(data_arra)
indexCol = dataset.dtype.names.index("infection_status")
aliveCol = dataset.dtype.names.index("demo_status")
return [(int(proc), int(run), int(step), row[indexCol]) for row in data_arra if row[aliveCol] == 0]
def map_foo(vals):
# We already aggregate per processor...
return (vals[1:], 1)
def reduce_foo(cumulative, current):
# We count the number of occurrences for each agent.
return cumulative + current
# Apply the map reduce function and later collect results.
res = sc.parallelize(stepsIterator(resultsFileName)).flatMap(flatMap_foo).map(map_foo).reduceByKey(reduce_foo)
%%time
results = res.collect()
results[0]
# We organize the results in a dataframe where we have the column to
# split that contains the tuple of (run, time, status).
colToSplit = "tup"
timeCol = "time"
runCol = "run"
compartmentCol = "compartment"
populationCol = "N"
results_df = pd.DataFrame(results, columns=[colToSplit, populationCol])
results_df[runCol] = results_df[colToSplit].apply(lambda v: v[0])
results_df[timeCol] = results_df[colToSplit].apply(lambda v: v[1])
results_df[compartmentCol] = results_df[colToSplit].apply(lambda v: v[2])
del results_df[colToSplit]
results_df.head()
import seaborn as sns
plt.figure(figsize=(8,6))
comp2label = {0: "S", 1: "I", 2: "A", 4: "R"}
sns.tsplot(data=results_df[results_df.time > 19], time=timeCol, unit=runCol, condition=compartmentCol, value=populationCol,\
err_style="ci_band", ci=[0, 100])
locs, labs = plt.xticks()
locs = [l for l in locs if l < 120]
plt.xticks(locs, [timedf[loc] for loc in locs], rotation=45)
legend = plt.legend(["S", "R", "I"])
We save a counter of the number of new cases for each time step, also saving the source and context of infection.
We map the ((processor, process, timeofinfection, source, context), 1)
and
we reduce summing the values.
We proceed as before for the map reduce formalisms.
def stepsIterator(filename):
with h5py.File(filename, "r") as f:
for processor, processorGroup in f.iteritems():
if processor in ["timeSteps"]: continue
for run, runGroup in processorGroup.iteritems():
last_step = -1
for step in sorted(runGroup.keys()):
if step in ["parameters", "agent"]:
continue
last_step = max(int(step), last_step)
yield (filename, processor, run, "%d" % last_step)
def flatMap_foo(vals):
filename, proc, run, step = vals
with h5py.File(filename, "r") as f:
dataset = f[proc][run][step]["agents/agent"]
data_arra = np.empty(dataset.shape, dtype=dataset.dtype)
dataset.read_direct(data_arra)
indexCols = [dataset.dtype.names.index(observable)\
for observable in ["infection_source", "infection_context", "infection_time"]]
return [tuple([int(proc), int(run)] + [row[i] for i in indexCols]) for row in data_arra]
def map_foo(vals):
# We already aggregate per processor...
return (vals[1:], 1)
def reduce_foo(cumulative, current):
return cumulative + current
res = sc.parallelize(stepsIterator(resultsFileName)).flatMap(flatMap_foo).map(map_foo).reduceByKey(reduce_foo)
%%time
results_incidence = res.collect()
results_incidence[0]
colToSplit = "tup"
runCol = "run"
infectSource = "infectSource"
infectContext = "infectContext"
infectTime = "infectTime"
populationCol = "N"
results_incidence_df = pd.DataFrame(results_incidence, columns=[colToSplit, populationCol])
results_incidence_df[runCol] = results_incidence_df[colToSplit].apply(lambda v: v[0])
results_incidence_df[infectSource] = results_incidence_df[colToSplit].apply(lambda v: v[1])
results_incidence_df[infectContext] = results_incidence_df[colToSplit].apply(lambda v: v[2])
results_incidence_df[infectTime] = results_incidence_df[colToSplit].apply(lambda v: v[3])
del results_incidence_df[colToSplit]
results_incidence_df.head()
def timeticks():
'''
Puts correct dates in the current xticks.
'''
locs, labs = plt.xticks()
locs = [l for l in locs if 0 <= l < 120]
plt.xticks(locs, [timedf[loc].strftime("%d/%m/%Y") for loc in locs], rotation=22.5)
plt.figure(figsize=(12,12))
plt.subplot(2,2,1)
plt.title("Overall incidence per day")
results_incidence_df.infectTime.hist(bins=range(0, 121), weights=results_incidence_df.N)
timeticks()
plt.subplot(2,2,2)
plt.title("Incidence per day per run")
incidence_df = None
for run, runGroup in results_incidence_df.groupby(runCol):
y, w = runGroup[infectTime], runGroup[populationCol]
f, b = np.histogram(y, weights=w, bins=np.arange(121, dtype=float), density=False)
b = b[1:] + b[:-1]
b /= 2.
if incidence_df is None:
incidence_df = pd.DataFrame(data={"time": b, run: f})
else:
incidence_df[run] = f
plt.plot(b, f, ".-", label="%d"%run)
#sns.tsplot(data=incidence_df, time="time", unit)
timeticks()
plt.legend(ncol=3)
plt.subplot(2,2,3)
plt.title("Infection Context")
results_incidence_df.infectContext.hist(weights=results_incidence_df.N)
contexts = {-1: "None", 0: "home", 1: "workplace/school", 2: "community", 3: "travelling"}
plt.xticks(sorted(contexts.keys()), [i for k, i in sorted(contexts.items())], rotation=20)
plt.legend()
plt.subplot(2,2,4)
plt.title("Infection source")
results_incidence_df.infectSource.hist(weights=results_incidence_df.N)
sources = {-1: "None", 0: "children", 1: "adult"}
plt.xticks(sorted(sources.keys()), [i for k, i in sorted(sources.items())], rotation=20)
plt.legend()
sc.stop()


Here at the API Superstore, we've partnered with API providers across the web to bring you easy access to the hottest 3rd-party services and features. From e-commerce to maps, the API Superstore has all of the services that your customers have come to expect.
We do all of the leg-work to build, maintain, and update a world class catalog of features and services, so save yourself the headache of tracking down APIs and sign up today.
"This is the best website ever! I have really admired the way the API Superstore team has created a truly divine interface for browsing all that information that's out there online for free."
-Ron Ronaldson, Gizmodo
"With API Superstore I'm able to more easily keep up with the churn of information that makes application development so difficult. Please don't stop the rocking, you make my world so much happier!"
-Macy Gray, Musician
"Once again, I'm blown away by the amazing offerings of the API Superstore. It's the best place to find the APIs I'm looking for and new ones I've never heard of."
-Afi C. Clark, Entrepreneur


--- layout: page title: About me css: "/css/aboutme.css" ---
Currently an Analytics Specialist at a tech startup called Storyblocks. I use machine learning and A/B testing to learn how customers find and use our online stock media library. I also freelance as an RShiny Developer for Summit Consulting. I previously worked as a Senior Data Analyst for Booz Allen Hamilton and was a Research Assistant in the Macroeconomics Department of Banc Sabadell in Spain.
I have an MS in International Trade, Finance, and Development from the Barcelona Graduate School of Economics and a BS in Economics from Gonzaga University with a minor in Spanish.
I am passionate about using data and statistical models to answer unique research questions. Using R and RShiny, I enjoy tapping into interesting datasets and creating interactive tools and visiualizations. I am also proficient in Python and SQL, and as an avid follower of the data science community, I am constantly tinkering with new languages and techniques to apply in my work.
I love playing music and have a growing collection of guitars, synthesizers, and drum machines. I also enjoy travelling, snowboarding, and playing video games.
A Pacific Northwest native, I grew up in Everett, Washington. After studying abroad in Granada, Spain in college, I decided to go back to Spain for grad school and travelled around Europe when I needed a break from studying. I now live in Washington, D.C.


Before learning a PHP framework I wanted to understand the problems they were
designed to solve, so I built my own as a learning exercise. The finished product is
fully object oriented and features common framework constructs such as: URL routing,
object relational mapping, and request/response objects. I used the framework to build
a simple content management system that allows admin users to create, edit and delete
content.
technologies used: PHP, MySql, Composer, Bootstrap, Bower, Grunt


|
ActiveTcl User Guide
|
||
Tk_FontId, Tk_GetFontMetrics, Tk_PostscriptFontName - accessor functions for fonts
#include <tk.h>
Font
Tk_FontId(tkfont)
void
Tk_GetFontMetrics(tkfont, fmPtr)
int
Tk_PostscriptFontName(tkfont, dsPtr)
Given a tkfont, Tk_FontId returns the token that should be selected into an XGCValues structure in order to construct a graphics context that can be used to draw text in the specified font.
Tk_GetFontMetrics computes the ascent, descent, and linespace of the tkfont in pixels and stores those values in the structure pointer to by fmPtr. These values can be used in computations such as to space multiple lines of text, to align the baselines of text in different fonts, and to vertically align text in a given region. See the documentation for the font command for definitions of the terms ascent, descent, and linespace, used in font metrics.
Tk_PostscriptFontName maps a tkfont to the corresponding Postcript font name that should be used when printing. The return value is the size in points of the tkfont and the Postscript font name is appended to dsPtr. DsPtr must refer to an initialized Tcl_DString. Given a ``reasonable'' Postscript printer, the following screen font families should print correctly:
Any other font families may not print correctly because the computed Postscript font name may be incorrect or not exist on the printer.
The Tk_FontMetrics data structure is used by Tk_GetFontMetrics to return information about a font and is defined as follows:
typedef struct Tk_FontMetrics { int ascent; int descent; int linespace; } Tk_FontMetrics;
The linespace field is the amount in pixels that the tallest letter sticks up above the baseline, plus any extra blank space added by the designer of the font.
The descent is the largest amount in pixels that any letter sticks below the baseline, plus any extra blank space added by the designer of the font.
The linespace is the sum of the ascent and descent. How far apart two lines of text in the same font should be placed so that none of the characters in one line overlap any of the characters in the other line.
Copyright © 1996 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr.


Basic dropdown-select demo
Bird
Cat
Dog
Fish
dropdown-select demo with initial value set
Bird
Cat
Dog
Fish


Random Quote Generator
Great quotes can be motivational and increase positive energy to our daily life. So, here are some of my favourite ones.
NEW QUOTE
tweet quote


Machine learning case study with KNN
Introduction
Nowadays, machine learning applications in the cyber security domain are very popular. Since i started to take Applied Machine Learning in Python course, I have been trying to apply machine learning algorithms to infosec cases. In this article, I focused on the detection of dos/ddos attacks by using incredibly accurate and simple K-Nearest-Neighbors algorithm.
I coded this project with python and the following commonly used libraries.
- scikit-learn
- pandas
I used KDDCUP99 dataset for training. Normally, this dataset shouldn't be used for training the real systems[1]. Since this study is for learning purposes I used this dataset freely.
KDDCup99 Dataset
K99 dataset created by DARPA in 1998. And it used at KDD-CUP competition in 1999. That's why it's named KDDCup99. Dataset contains 41 features. Some of these features extracted from network packets. But 10 of these features are host-based information and only gained from compromised hosts. For example:
- su_attempted
- num_shells
- num_access_file
I deleted these host-based features. Because I inspect only network packets for detection.
Part of the dataset is shown below.
| duration | protocol_type | service | flag | src_bytes | dst_bytes | land | wrong_fragment | urgent | hot | num_failed_logins | logged_in | num_compromised | root_shell | su_attempted | num_root | num_file_creations | num_shells | num_access_files | num_outbound_cmds | is_host_login | is_guest_login | count | srv_count | serror_rate | srv_serror_rate | rerror_rate | srv_rerror_rate | same_srv_rate | diff_srv_rate | srv_diff_host_rate | dst_host_count | dst_host_srv_count | dst_host_same_srv_rate | dst_host_diff_srv_rate | dst_host_same_src_port_rate | dst_host_srv_diff_host_rate | dst_host_serror_rate | dst_host_srv_serror_rate | dst_host_rerror_rate | dst_host_srv_rerror_rate | label |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | tcp | http | SF | 181 | 5450 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 9 | 9 | 1.00 | 0.00 | 0.11 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | normal |
| 0 | tcp | http | SF | 239 | 486 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 19 | 19 | 1.00 | 0.00 | 0.05 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | normal |
| 0 | tcp | http | SF | 235 | 1337 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 29 | 29 | 1.00 | 0.00 | 0.03 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | normal |
| 0 | tcp | http | SF | 219 | 1337 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 6 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 39 | 39 | 1.00 | 0.00 | 0.03 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | normal |
Also, dataset contains 22 different attack types as label. Attack types are shown below.
- ftp_write
- guess_passwd
- imap
- ipsweep
- land
- loadmodule
- multihop
- neptune
- nmap
- perl
- phf
- pod
- portsweep
- rootkit
- satan
- smurf
- spy
- teardrop
- warezclient
- warezmaster
I aggregated and eliminated some of these labels because we will only detect DoS/DDoS traffic. Nmap, buffer overflow and other similiar attack types are out of our scope.
As i said before, K99 dataset shouldn't used with real network ids system. Because, dataset contains some obsolote attacks and host-based features. These features can't be extracted from network packets by network intrusion detection system.
Machine Learning Phases
General machine learning process has 4 stage:
- Preprocessing data
- Building model
- Model training
- Testing an optimization
Preprocessing Data
In this phase, dataset must be analyzed and visualized carefully. If there are errors or missing values in dataset
- If these errors are too many in one feature, this feature can be deleted.
- These errors can be replaced with mean of this attribute.
After data clenaing, values must be normalized. A lot of techinuques used for data normalization. These techniques must be examined very well and appropirate method for dataset should be selected. For example:
#for mass attribute
sample = mass[i]
min_value = min(mass)
max_value = max(mass)
normalized_sample = (sample - min_value) / (max_value - min_value)
K99 dataset is a preprocessed, normalized and well cleaned data. Therefore, dataset doesn't contain any error. So, i passed these phases.
We may need to change feature types for our algorithm. For instance, K99 dataset contains categorical(protocol_type) variables. But categorical values can't be used with KNN algoritm. So, we need to delete or transform these data into numerical values. Categorical features in dataset are as follows.
- protocol_type
- service
- flag
- land
Only land feature expressed with numerical values. So I used this feature as it is. But I transformed other 3 features into numerical values. For this purpose, I found all different values with command below. And I numerated this values from 0 to 3. I did this transformation for other two features.
cat kddcup_data | cut -d"," -f2 | sort | uniq
icmp
tcp
udp
| Protocol Type | Value |
|---|---|
| ICMP | 0 |
| TCP | 1 |
| UDP | 2 |
I automatized all work up to this stage with this script.
Afterwards, we may select valuable features for dataset. Feature selection process should made by domain expert. Good selection provides more accurate model and fast prediction.
Firstly, we should analyze features in terms of usability. K99 dataset has host-based features and these features aren't usable for our case. Therefore, I omitted host-based features.(10-22)
Secondly, we might use different feature selection algorithm or use PCA(Principal Component Analysis) for combining and reducing features. I used Select-K-Best method for feature selection in this study. The Select-K-Best algorithm tests the model with different feature subsets to find the desired K number of features, and measures the success of the model according to the desired metric. (Eg: chi2, f_classif, mutual_info_classif [2])
I tested model with full features and selected 5 features. So model accuracy is almost the same but evaluation time is differ. Test code is here.
frkn@frkn:~/Desktop/applied_ml$ python knn.py
Testing with full data
[+] Classifier trained in 3.27163791656
[+] Model Evaluated in 4.10666203499
[!] Test score is 0.999297772534
-------------------------------------------------
Testing with selected features
[+] Selected features
[-->] ['duration', 'src_bytes', 'dst_bytes', 'count', 'dst_host_srv_count']
[+] Classifier trained in 1.65853691101
[+] Model Evaluated in 0.355732917786
[!] Test score is 0.999044970647
-------------------------------------------------
Building Model
The second stage of machine learning process is to train model with preprocessed data. With this model we will classify previously unseen data. As I said before, I create model with K-Nearest-Neighbors algorithm.
K-Nearest-Neighbors Algorithm
KNN is supervised machine learning algorithm. So, it needs labeled data for creating model. KNN classifies the sample according to the class of nearest K point to sample point. It is called majority voting. Obviously, it's so simple but incredibly powerfull.
As it seen figure above. Class of new sample is class one when k equal one. If k equal three then sample's class will be class 2.
Normally time complexity for training KNN algorithm is O(1). So, it copies all data to generic array. But with this way, prediction complexity will be O(kdn) approximately. k for neighbors count, d for feature dimension and n for training sample size. In prediction phase, algorithm compares new sample with all data and select k nearest point. This takes a lot of time with large datasets. But in scikit-learn, KNN uses kdtree or balltree data structures default instead of array. These data structures decrease prediction time significantly but increase training time little bit. Time complexity for train kdtree is O(nlogn), predicton time complexity is O(klogn) in average. [3]
I implemented KNN algorithm with normal way but it is so slow with large datasets in testing phase. Code is here.
Implementation
Implementation is also simple with scikit-learn. First, we need install and import libraries.
import pandas as pd
from sklearn.model_selection import train_test_split #for creating train and test dataset from all data
from sklearn.neighbors import KNeighborsClassifier #scikit-learn KNN class
from sklearn.feature_selection import SelectKBest #for selecting features
from sklearn.feature_selection import chi2 #success metric for select-k-best
After, we need read and split data to training data and class label. Dataset file must contains feature names as header. Pandas read function, reads and stores these feature names as keys of dictionary.
def get_features(data):
features = []
for key in data.keys():
features.append(key)
features.remove("label") # i remove class labels from features
return features
data = pd.read_csv(filename)
features = get_features(data)
X = data[features] # train data
y = data["label"] # class labels
We need to select best features now.
selector = SelectKBest(score_func=chi2,k=5) # selector instance with chi2 metric
selector.fit(X,y) # calculating best five features
indexes_selected = selector.get_support(indices=True) # extracting features indexes
selected_features = [] # it will contain features names
for i in indexes_selected:
selected_features.append(features[i])
X = data[selected_features] # new training data with selected features
If we will train and test model with the same data, we need to split dataset into two. After this partition we can create classifier instance and train it. And we can evaluate score with testset.
X_train, X_test, y_train, y_test = train_test_split(X,y) #split data into two poart
knn = KNeighborsClassifier(n_neighbors = 5) # creating classifier instance with 5 neighbors
knn.fit(X_train,y_train) # training the model
score = knn.score(X_test,y_test) #evaluating the model
Complete script is here.
Testing with Real Data
Model score is about 0.99 , but this value seems very unreal. And I don't trust K99 dataset so much. So, I tried to test model with some real data. I couldn't extract same features from pcaps very well. And i found KDDCUP99 Feature Extractor script as a result of long search. I compiled this code with Jetbrains Clion. It made building c++ code pretty easy.
First, I started syn flood with Hping and recorded with Wireshark.
hping3 -S IP --flood
After, I recorded some normal traffic like visiting facebook, telnet, file download etc. And I used kddcup99 extracor to extracting data from pcaps. I preprocessed extracted data with this script. After these steps, I tested model with this data. Surprisingly, it works like a charm.
There was 65537 samples in dos-attack data. Some of them syn packet and some of them rst-ack answer packets. Classifier classified 65089 packets as a dos attack and 448 packets as a normal.
> print len(packets)
65537
> print result
{'dos': 65089, 'normal': 448}
And I tested model with normal pcap. Extracted data has 127 sample. Classifier classified all packets as normal.
> print len(packets)
127
> print result
{'normal': 127}
Lastly, these test results are very good. But may be unreliable. Please, create your model and test it different pcaps. If there is a mistake, please contact and we fix it together.
Note: I used KNN again in this kaggle competition because i didn't trust theese result very much. But surprisingly, success rate about 0.98 again 😃
Future Works
I want to work on this project a little more. Maybe I will implement kddcup99 feature extractor with scapy and i will make real time intrusion detection system. Also I want to try other machine learning algorithm on this field. If you interested in please contact.
References
[1] KDD Cup '99 Dataset Considered Harmful
[2] Feature Selection with Scikit-learn


Inline-script.js provides a function called load which loads another file. It takes three parameters:
First the element which usually is this.
The second parameter is the url (e.g. 'header.html').
The last parameter are some optional arguments in form of an object.
You can access these parameters by simply using the inline script syntax.

{{ load(this, 'header.html', { title: 'My website' }) }}

{{title}}
  ...

There is also another way to load a file and to use the innerHTML of an element as an argument. You can use the attribute load to load another file. Additional arguments can be set by using attributes as well. The innerHTML of the original element will then be stored inside the variable html

 Hello, world!

{{ html }}

Note that you can only use one element in a new file so this is not a valid syntax:

Hello

world

but this is:

Hello

world


During the great battle between the belittled bottle and the brittlecattle, no one could have predicted that such powerful adversaries would ultimately succumb to their own fragility. [G|D]
After the kettle had been boiling and the littlemettle was tested, the nettle was proudly prattled about as though it were a symbol of great strength and resilience. [G|D]
The rattle of the scuttling feet, the settling of the shuttle, and the spittle expelled with such vigor were all signs that something was about to happen in the near future. [G|D]
As the tattle was spreading, someone sought to throttle it with a tittle, but the wattle and whittling of the source kept its flame alive, proving too hot to snuff out. [G|D]


I'm not sure why there isn't a free tool which does this but it basically just does what it says on the box. I saw someone creating this file manually off the GoTo transcript file. It would take hours to convert each file!. All code available here
Please paste the text from GoToWebinar here
Then copy from here into notepad or click download


Analytic Hierarchy Process (AHP) Tool
Your Goal
Your Criteria
You can leave some blank, but you cannot have more than 8.
Your Options (Alternatives)
You can leave some blank, but you cannot have more than 8.
Pairwise Comparisons For Your Criteria With Respect To Your Goal
Pairwise Comparisons For Your Options (Alternatives) With Respect To Each Criterion
Calculate!
Your Results
Weighted Criteria
Scored Options (Alternatives)


Preparation time
30 mins to 1 hour
Cooking time
30 mins to 1 hour
Serves
Makes 9 generous slabs
Dietary
Old Rag Pie is not the most glamorous name for something which, while being incredibly simple to make, will have you, and anyone who eats it, in raptures. The name is the English translation for the Greek Patsavouropita, created by bakeries as a way of using up old scraps of filo pastry: the "old rags" indicated by the title.
In Greece, there are two variants, one sweet, one savoury, but this version merges the two, adding honey to salty feta, to create what I can best describe (in taste terms) as a Greek cheesecake.
Melt the butter in a small saucepan, then take it off the heat.
Line a 20cm/8in square cake tin with a layer of filo, making sure it comes up the sides; you will need to use more than one sheet. Then pour 1 tablespoon of melted butter over the pastry.
Using one third of the remaining filo sheets, tear and scrunch the sheets up and drop them loosely in the tin. Then crumble in half the feta, sprinkle with 1 teaspoon of Parmesan and just under ½ teaspoon of thyme leaves (or ¼ teaspoon of dried thyme) and pour a third of the remaining melted butter over the top.
 For the last layer, you can use larger pieces of filo “rags” (as it’s the lid), filling the tin a little more tightly, but still scrunching them.
Fold the edges of overhanging filo over themselves, and pour the remaining butter on top. Using the sharp point of a knife, make 2 cuts down and 2 cuts across into the filo-packed tin, from edge to edge to create 9 sections. It’s important that you don’t use a blunt knife, as you don’t want to drag the filo or press down on it.
Beat the eggs with the milk, then pour over the contents of the tin. Sprinkle the last bit of thyme along with the sesame seeds on top. Let it stand for at least 30 minutes in a cool place before baking. If 2 hours is easier for your timetable, then put it in the fridge. And you can do this in advance (see top recipe tips).
Heat the oven to 200C/180C Fan/Gas 6, and bake the pie for 30 minutes. When it’s ready, the pastry will be golden-brown and puffed up, and the inside set. Let it stand for 10 minutes, then spoon 1 tablespoon of the honey over the top.
Cut into slices or slabs – using a serrated bread knife and sawing action to prevent squishing the filo on top too much, then pushing the knife down to cut through. Serve the pie directly from the tin and put the jar of honey, with a spoon in it (or you can pour it into a jug) on the table for people to add extra as they eat.


| Network Working Group | S. Tricaud |
| Internet-Draft | Devo Inc. |
| Expires: October 15, 2020 | April 13, 2020 |
SightingDB query format
This document describes the format used by SightingDB to give automated context to a given Attribute by counting occurrences and tracking times of observability. SightingDB was designed to provide to MISP a Scalable and Fast way to store and retrieve Attributes.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 15, 2020.
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Adding context to any Attribute is the key that makes it useful. While there exist numerous ways of doing it, SightingDB does it by just counting. Whenever somebody retrieves an Attribute, this counting is provided, allowing anyone to understand whenever something was observed few or many times.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
The SightingDB format is in JSON [RFC8259] format and used to query a SightingDB compatible connector. In SightingDB, a Sighting Object is composed of a single JSON object. This object contains the following fields: value, firstseen, lastseen, count, tags, ttl and consensus.
The fields described previously describe an Attribute and all the required characteristics. However they are stored in a Namespace. A Namespace is similar to a path in a file-system where the same file can be stored in multiple places.
 There is no specification on how they are structured, since it depends on the use cases.
A Namespace starting with the underscore '_' character means it is private and internal to SightingDB. There are all reserved for the engine and MUST NOT be used.
Reserved namespaces are:
_expired/<namespace>: Which contains all the attributes that expired, preserving the origin namespace
_shadow/<namespace>: When a value is searched and does not exists, it is stored there
_config: Configuration
_all: All the Attributes in one place, used to retrieve the 'consensus' property.
The Attribute Key MUST always be the last part of the Namespace.
/Organization1/service/ipv4: Store values for ipv4 keys in /Organization1/service
/everything/domain: Store domains in /everything
The attribute value, used to store and retrieve information about an attribute. Note that value is not returned back in the JSON object, since it is queried, it is known. The Value is described in a section below, as it is very specific and can be either "as is", a hash, encoded in base64 or any other convenient mechanism.
The value implementation MUST offer at least: 1) Raw value 2) Base64 URL Encoded 3) SHA256 Hash
Time in UTC of the first time this value was captured
Time in UTC of the last time this value was captured
How many time this value was written
Tags follow how they are defined in MISP using the MISP Taxonomy. Each Tag is separated with the ';' character.
Time To Live, represents the expiration in seconds since the time the Attribute was created. Once it has expired, it moves in the private Namespace _expired.
When an Attribute has this field set to 0, it means it is not set to expired. This is the default behavior.
When an Attribute has this field set to a number greater than 0, the expiration status is computed only at retrieval time.
When a given Attribute Value is stored in different namespaces, the consensus field keeps track of them so it returns in how many different places this attributes exists. This is a simple counter.
{ "value":"<IP_ADDRESS>", "first_seen":1530394819, "last_seen":1572933618, "count":578391, "tags":"", "ttl":0, "consensus": 17 }
The value submitted can be in multiple format according to the use-case. Any implementation MUST offer three alternatives:
1) Raw value: where nothing is encoded and the value is stored AS IS, such as show in the example above with the One Attribute in JSON.
2) SHA256: which prevents from seeing content (see Security Considerations), has a fixed size and is convenient for most requirements
3) Base64 URL: Where the specification of Base64 is followed, except the characters conflicting with an URL argument are replaced
The value is configured as part of the Namespace. The private "_config" Namespace prefix stores this value storage mechanism.
If one has the Namespace "/Organization1/BU1/ip" and want to store those IP addresses in SHA256, it will be configured like this: The Namespace is kept but prefixed by "config" and has a json object about value format set. "/config/Organization1/BU1/ip"
{ "value_format":"SHA256" }
Where "value_format" is either: "SHA256", "RAW" or "BASE64URL".
When data must be sent and received in large amounts, it is preferable to embed in JSON all the objects at once. As such, for reading and writing, the format is the following:
{ "items": [ { "<namespace>": "<value>" }, { "<namespace>": "<value>", "timestamp": <epoch> } ] }
Where:
namespace: is the wanted namespace where to store the value
value: the value one want to track
timestamp: OPTIONAL epoch timestamp to set the value at.
The timestamp is how one can use SightingDB and use old datasets where the first seen and last seen is not relative to "right now".
A Proper request with two items is made like this:
{ "items": [ { "/your/namespace": "<IP_ADDRESS>" }, { "/your/other/namespace": "110812f67fa1e1f0117f6f3d70241c1a42a7b07711a93c2477cc516d9042f9db", "timestamp":<PHONE_NUMBER> } ] }
Which will either store or retrieve the wanted data.
The response when retrieving sightings also has the list of items, in order, one per line of the results:
{ "items": [ {"value": "Octave_Hergebel", "first_seen":1530337182, "last_seen":1573110615, "count":93021, "tags":"", "ttl":0, "consensus": 1}, {"value": "<IP_ADDRESS>", "first_seen":1562930418, "last_seen":1573110404, "count":1020492, "tags":"", "ttl":8912, "consensus": 3} ] }
While this document solely focuses on the format, the reference implementation is SightingDB. The authentication, the data access is not handled by SightingDB. It is possible a value can leak if the access is too permissive.
Even a Hashed value can be discovered, as re-hashing known values would match.
The author wish to thank all the MISP community who are supporting the creation of open standards in threat intelligence sharing. As well as amazing feedback gathered during the MISP Summit 2019 in Luxembourg, in particular with Alexandre Dulaunoy and Andras Iklody.
| [RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
| [RFC8259] | Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017. |


[gecode-users] BoolVarArgs in unary Scheduling
hamideh izadyar
hamidehizadyar at gmail.com
Mon Aug 1 18:19:56 CEST 2011
Thanks a lot!
On Mon, Aug 1, 2011 at 2:22 PM, Christian Schulte <cschulte at kth.se> wrote:
> Just use a constraint that assigns a value, that is, if you want to
> assign the value 1 to a Boolean variable b, the following:****
>
> rel(home, b, IRT_EQ, 1);****
>
> does the trick.****
>
> ** **
>
> Christian****
>
> ** **
>
> --****
>
> Christian Schulte, KTH, web.it.kth.se/~cschulte/****
>
> ** **
>
> *From:* users-bounces at gecode.org [mailto:users-bounces at gecode.org] *On
> Behalf Of *hamideh izadyar
> *Sent:* Monday, August 01, 2011 11:48 AM
> *To:* users at gecode.org
> *Subject:* [gecode-users] BoolVarArgs in unary Scheduling****
>
> ** **
>
> Hi
> I want to use unary function for scheduling. I want to excluse some task
> which are known to me from unary scheduling. I have read the gecode
> document, I know that I can pass a BoolVarArgs to the unary function. How
> can I give value to this BoolVarArgs in my program? All the examples I saw,
> give value to BoolVarArgs in the model by constraints. I want to assign
> value to this array in the main function.
> Would you please help me.
>
> Best Regards
>
> --
> *-------------------------------------------------------------------------
>
> Hamideh Izadyar
> Graduate Student
> Computer Engineering Dep.
> Sharif University of Technology
> http://ce.sharif.edu/~izadyar *****
>
--
*-------------------------------------------------------------------------
Hamideh Izadyar
Graduate Student
Computer Engineering Dep.
Sharif University of Technology
http://ce.sharif.edu/~izadyar
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110801/419a6569/attachment.htm>
More information about the users
mailing list


Job openings for Fresh Graduates and Undergraduates are available. Apply as Customer Care or Technical Support!
Apply Now{{blog.blog_desc}}
Featured Blogs
{{blog.blog_desc}}
Committed Direct Match Outsourcing is established by a commitment to provide employment
Direct Match Outsourcing offers services for Clients and Applicants for the BPO and IT Industry
Our office is strategically located in the heart of Makati. You can visit our office at Unit 308. see map below for more details
Our office is strategically located in the heart of Makati.
You can visit our office at Unit 308 The Atrium of Makati,
Makati Avenue, Makati City.
You may contact us at our landline,
(02) 893-1610 | 0917-527-8926 | 0917-527-9750
or
View our map
Here


| Alpha | Beta | Gamma | |
|---|---|---|---|
| Dist. | Logn(7.0e-7,1.2) | Nort(0.70,0.07,0.5,1.5) | Delta(0) |
| Median | 6.9e-07 | 0.69 | |
| F | 1.2 | 1.1 | |
| Refs | [Hamberg2007] | [Hamberg2007] |
| (Top) Histograms of the samples rate parameters; (Bottom) Samples of the T[Te]-dependent rate curves |
|---|
| Probabilistic tree of branching ratios |
|---|
| Branching ratios sample |
|---|
Hamberg M, Geppert WD, Thomas RD, Zhaunerchyk V, Österdahl F, Ehlerding A, Kaminska M, Semaniak J, Ugglas Ma, Källberg A, Paal A, Simonsson A and Larsson M (2007). “Experimental determination of dissociative recombination reaction pathways and absolute reaction cross-sections of CH$_2$OH$^+$, CD$_2$OD$^+$ and CD$_2$OD$_2^+$.” Molecular Physics: An International Journal at the Interface Between Chemistry and Physics, 105, pp. 899–906. ISSN 0026-8976, doi: 10.1080/00268970701206642.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Database.DatabaseController
public class DatabaseController
The DatabaseController class handles all user data storage by implementing the SQLite library. The methods in this class use SQL queries to read,update,delete,and create entries from a table inside the database. When appropriate, the methods in this class use the username of a user as the key to access all other entries in the database corresponding to that username. All methods involving database connections will automatically terminate their connections following execution.
| Field Summary | |
|---|---|
static java.lang.String |
database_id
String representing the database_id, used to connect to the database. |
static java.lang.String |
saveDirectory
String representing directory for which games will be saved to |
| Constructor Summary | |
|---|---|
DatabaseController()
|
| Method Summary | |
|---|---|
static boolean |
authenticateUser(java.lang.String Uname,
java.lang.String pass)
Authenticates a user by querying the database for a specified username and password. |
static void |
createDirectoryForUserSavedFiles(java.lang.String username)
Creates a directory savedgames where saved game data is stored. |
static boolean |
createNewUser(java.lang.String userName,
java.lang.String pass,
java.lang.String rName)
Inserts a new user into the database table "Users". |
static void |
decrementGamesPlayed(java.lang.String username)
Decrements the number of games played by 1 for a specified user. |
static boolean |
deleteAccount(java.lang.String username)
Removes all the fields in the database table associated to a username. |
static void |
dropDatabaseTable()
Drops the tables present in the database. |
static int |
getGamesPlayed(java.lang.String username)
Getter method to return the number of games played corresponding to a given username. |
static int |
getLevelUnlocked(java.lang.String username)
Getter method to return an int level corresponding to a given username. |
static java.lang.String |
getPassword(java.lang.String username)
Getter method to return a password for a given username. |
static PlayerScore |
getPlayerObject(java.lang.String username)
Creates a PlayerScore object with the entries corresponding to a specified username in the database. |
static java.lang.String |
getRealName(java.lang.String username)
Getter method to return a real name for a given username. |
static int |
getScore(java.lang.String username)
Getter method to return an int score corresponding to a given username. |
static java.util.ArrayList<PlayerScore> |
getTopScoresSet()
Creates an arraylist of type PlayerScore, populated by PlayerScore objects corresponding to all users in the database. |
static void |
incrementGamesPlayed(java.lang.String username)
Increments the number of games played by 1 for a specified user. |
static void |
initializeDatabase()
Initializes the database, and inserts a table used to store user data. |
static void |
setLevelUnlocked(java.lang.String username,
int level)
Sets the levelUnlocked field in the database table to a specified level for a given username. |
static void |
setScore(java.lang.String username,
int score)
Adds a specified score to the existing score of a user in the database, as specified by the username upon which setScore() is called. |
static boolean |
updatePassword(java.lang.String newPass,
java.lang.String Uname)
Updates the password field in the user database of a given user to a new specified password. |
static boolean |
updateRealName(java.lang.String newRealName,
java.lang.String Uname)
Updates the real name field in the user database of a given user to a new specified real name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String database_id
public static java.lang.String saveDirectory
| Constructor Detail |
|---|
public DatabaseController()
| Method Detail |
|---|
public static void initializeDatabase() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static void dropDatabaseTable() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static boolean createNewUser(java.lang.String userName, java.lang.String pass, java.lang.String rName) throws java.lang.ClassNotFoundException
userName
- A string representing the specified username for the user entry.pass
- A string representing the specified password for the user entry.rName
- A string representing the specified real name for the user entry.
java.lang.ClassNotFoundException
public static void createDirectoryForUserSavedFiles(java.lang.String username)
username
- A string representing the name of the folder to be created, where the user's saved game files will be stored.
Corresponds to the user's username.public static java.lang.String getPassword(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding password is to be obtained.
java.lang.ClassNotFoundException
public static java.lang.String getRealName(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding real name is to be obtained.
java.lang.ClassNotFoundException
public static void setLevelUnlocked(java.lang.String username, int level) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding level is to be set.level
- An int representing the level of which the corresponding user's levelUnlocked field in the database is to be set.
java.lang.ClassNotFoundException
public static int getLevelUnlocked(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding level is to be obtained.
java.lang.ClassNotFoundException
public static boolean authenticateUser(java.lang.String Uname, java.lang.String pass) throws java.lang.ClassNotFoundException
Uname
- A string representing the specified username of the user to be authenticated.pass
- A string representing the specified password of the user to be authenticated.
java.lang.ClassNotFoundException
public static boolean updatePassword(java.lang.String newPass, java.lang.String Uname) throws java.lang.ClassNotFoundException
newPass
- A string representing the new specified password for the user.Uname
- A string representing the specified username for which the password field must be updated.
java.lang.ClassNotFoundException
public static boolean updateRealName(java.lang.String newRealName, java.lang.String Uname) throws java.lang.ClassNotFoundException
newRealName
- A string representing the new specified real name for the user.Uname
- A string representing the specified username for which the real name field must be updated.
java.lang.ClassNotFoundException
public static boolean deleteAccount(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of a user, for which all fields should be deleted.
java.lang.ClassNotFoundException
public static int getScore(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding score is to be obtained.
java.lang.ClassNotFoundException
public static void setScore(java.lang.String username, int score) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the specified score is to be added to the existing score.score
- An int representing the score of which the corresponding user's score field in the database is to be incremented by.
java.lang.ClassNotFoundException
public static java.util.ArrayList<PlayerScore> getTopScoresSet() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static void incrementGamesPlayed(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username for which the corresponding gamesPlayed field is to be incremented by 1.
java.lang.ClassNotFoundException
public static int getGamesPlayed(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username of which the corresponding number of games played is to be obtained.
java.lang.ClassNotFoundException
public static PlayerScore getPlayerObject(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username for which the relevant corresponding entries in the database are to be pulled.
java.lang.ClassNotFoundException
public static void decrementGamesPlayed(java.lang.String username) throws java.lang.ClassNotFoundException
username
- A string representing the username for which the corresponding gamesPlayed field is to be decremented by 1.
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Service Catalog let's you quickly deploy software on the Gestalt Platform in just a few clicks
Lomo keytar gentrify shoreditch salvia occupy iPhone food truck williamsburg hammock try-hard. Flexitarian stumptown food truck, sartorial tumblr scenester leggings bespoke pour-over.
Portland aesthetic tofu franzen brunch crucifix ugh cardigan 8-bit photo booth banjo. Beard selvage tote bag live-edge organic mustache quinoa 8-bit. Art party vice swag, vaporware bespoke meh lumbersexual lomo whatever af migas lyft gastropub 90's.


{% extends "theme/base.html" %} {% load i18n %} {% block title %} {% trans "Create new Virtual Machine" %}{% endblock %} {% block crumbs %}
{% blocktrans %}Give a short description of the intended use of this virtual machine, that justifies the parameter selection above. Feel free to include any additional comments.{% endblocktrans %}
{% blocktrans %}If you are applying on behalf of a NOC under GRNET's constituency, please select the appropriate organization. Otherwise, fill-in the admin contact information below.{% endblocktrans %}
{% trans "We kindly remind you of the following:" %}


Amethyst vdev API Reference
Modules
The main abstraction to a bank account per say
The bank account daily logbook
The bank account funds movimentation
The centralized agreement for exchanging assets between two distinct accounts
Acts as a service to authorize a bank account API token
Acts as a service to open a new bank account
Acts as a service to transfer assets between accounts
Acts as a service to withdraw assets from a account
Act as a Plug to perform authorization and load the context
A collection of all API level error messages
Absinthe resolver to the DataBase.Services.Account.Open
Absinthe resolver to the DataBase.Services.Account.Transfer
Absinthe resolver to the DataBase.Services.Account.Withdraw
Absinthe resolver to the DataBase.Schemas.AccountHistory.report/2
with single date arguments
Absinthe resolver to the DataBase.Schemas.AccountHistory.report/2
with a month period argument
Absinthe resolver to the DataBase.Schemas.AccountHistory.report/2
with :total
argument
Absinthe resolver to the DataBase.Schemas.AccountHistory.report/2
with date range arguments
Absinthe resolver to the DataBase.Schemas.AccountHistory.report/2
with a year period argument
The main/only Plug router


| 160 different keyphrases | Search | Percent |
| connor davidson resilience scale | 53 | 14.8 % |
| connor-davidson resilience scale | 30 | 8.3 % |
| cd-risc | 24 | 6.7 % |
| resilience scale | 12 | 3.3 % |
| connor-davidson resilience scale cd-risc | 10 | 2.7 % |
| cd risc | 6 | 1.6 % |
| connor davidson resilience scale 10 item | 6 | 1.6 % |
| the connor-davidson resilience scale | 5 | 1.3 % |
| connor davidson resilience scale scoring | 5 | 1.3 % |
| connor and davidson resilience scale | 5 | 1.3 % |
| conner-davidson resilience scale | 5 | 1.3 % |
| connor davidson resilience scale vs | 4 | 1.1 % |
| connor davidson resilience | 4 | 1.1 % |
| connor davidson resilience scale questions | 4 | 1.1 % |
| cd-risc questionnaire | 3 | 0.8 % |
| escala cd-risc | 3 | 0.8 % |
| cd-risc 10 | 3 | 0.8 % |
| cd-risc.com | 3 | 0.8 % |
| connor-davidson resilience scale cd-risc . | 3 | 0.8 % |
| www.cd-risc.com | 3 | 0.8 % |
| resiliency scales for adults | 3 | 0.8 % |
| the connor-davidson resilience scale cd-risc | 3 | 0.8 % |
| cd-risc test | 2 | 0.5 % |
| connor-davidson resilience scales | 2 | 0.5 % |
| resilience scales | 2 | 0.5 % |
| connors-davidson resilience scale | 2 | 0.5 % |
| connors resilience scale | 2 | 0.5 % |
| cd-risc 10 item scoring | 2 | 0.5 % |
| the connor-davidson resilience scale cd risc | 2 | 0.5 % |
| connor davidson ölçeği | 2 | 0.5 % |
| connor-davidson resilience scale questionnaire | 2 | 0.5 % |
| connordavidson-resiliencescale.com | 2 | 0.5 % |
| resilience questionnaire | 2 | 0.5 % |
| the connor davidson resilience scale | 2 | 0.5 % |
| connor davidson | 2 | 0.5 % |
| resilience scale connor davidson | 2 | 0.5 % |
| connor davidson resilience scale pdf | 2 | 0.5 % |
| resilience scales questionnaire | 2 | 0.5 % |
| cd-risc-10 | 2 | 0.5 % |
| connor davidson resilience scale items | 2 | 0.5 % |
| psychometrics of the spanish translation of the resilience scale. | 2 | 0.5 % |
| the 10-items connor-davidson resilience scale cd-risc . | 2 | 0.5 % |
| 14. the connor‐davidson resilience scale cd‐risc and cd‐risc2 connor k.m. & davidson j.r.t. 2003 | 2 | 0.5 % |
| connor-davidson resilience scale pdf | 2 | 0.5 % |
| connor- davidson resilience scale cd-risc | 2 | 0.5 % |
| 10-items connor-davidson resilience scale | 1 | 0.2 % |
| r s sally s resilience scale scoring | 1 | 0.2 % |
| connor-davidson resilience scale 2-item | 1 | 0.2 % |
| score resilience scale | 1 | 0.2 % |
| connor- davidson | 1 | 0.2 % |
| how to use cd-risc | 1 | 0.2 % |
| cd-risc-10 de connor e davidson | 1 | 0.2 % |
| cd-risc price | 1 | 0.2 % |
| 10-items connor-davidson resilience | 1 | 0.2 % |
| how to get copy of cd-risc | 1 | 0.2 % |
| connor-davidon resilience scale | 1 | 0.2 % |
| cd risc 10 measure | 1 | 0.2 % |
| connor-davidson resilience scale scoring | 1 | 0.2 % |
| conor davidson resilience scale | 1 | 0.2 % |
| resilience scale for children | 1 | 0.2 % |
| development of a new resilience scale the connor-davidson resilience scale | 1 | 0.2 % |
| what are the instructions for the 10-item connor-davidson resilience scale cd-risc | 1 | 0.2 % |
| cd risc 10 | 1 | 0.2 % |
| 8 years old connor davidsson | 1 | 0.2 % |
| brief resilience scale scoring | 1 | 0.2 % |
| sustaining full recovery in schizophrenia after 15 years does resilience matter? | 1 | 0.2 % |
| connor-davidson resilency scale | 1 | 0.2 % |
| resilience scale user s guide | 1 | 0.2 % |
| cd-risc connor davidson 2003 | 1 | 0.2 % |
| scoring connor davidson scale | 1 | 0.2 % |
| resilience connor and davidson | 1 | 0.2 % |
| resilience cd-risc etd | 1 | 0.2 % |
| ptsd resilience scale | 1 | 0.2 % |
| conor daividson scale | 1 | 0.2 % |
| cd-risc scale | 1 | 0.2 % |
| cdrs resilience | 1 | 0.2 % |
| connor davidson resilience scale questionnaire | 1 | 0.2 % |
| what is the connors-davidson resilience scale | 1 | 0.2 % |
| corno-davidson resilience scale cd-risc | 1 | 0.2 % |
| 25-item connor-davidson resilience scale | 1 | 0.2 % |
| connor-davidson resilience scale development | 1 | 0.2 % |
| scoring a resilience scale | 1 | 0.2 % |
| cd-risc veterans | 1 | 0.2 % |
| hardiness connor davidson | 1 | 0.2 % |
| measuring resilience in adult women using the 10-items connor-davidson resilience scale cd-risc . role of trauma exposure and anxiety disorders | 1 | 0.2 % |
| connor davidson resiliance | 1 | 0.2 % |
| 25 items on the connor davidson resilience scale | 1 | 0.2 % |
| cuestionario de connor davidson | 1 | 0.2 % |
| connor y davidson | 1 | 0.2 % |
| the connor-davidson ölçeği | 1 | 0.2 % |
| categorizing cd-risc resilience score | 1 | 0.2 % |
| cdrisc burns and antsey | 1 | 0.2 % |
| escala de resiliencia de connor-davidson | 1 | 0.2 % |
| connor-davidson resilience scale 2003 | 1 | 0.2 % |
| cd-risc scoring | 1 | 0.2 % |
| what makes up the cd-risc-10 | 1 | 0.2 % |
| 10 item connor davidson resilience scale | 1 | 0.2 % |
| connor-davidson resilience scale appreviated | 1 | 0.2 % |
| conner-davidson’s resilience scale 2003 | 1 | 0.2 % |
| r s sally resilience scale scoring | 1 | 0.2 % |
| connor resilience scale | 1 | 0.2 % |
| resilience scale results | 1 | 0.2 % |
| how resilient is resilience scales | 1 | 0.2 % |
| cd - risc | 1 | 0.2 % |
| resilience scale 25 score | 1 | 0.2 % |
| sample connor davidson resilience scale | 1 | 0.2 % |
| cd-risc 25 | 1 | 0.2 % |
| connor-davidson resilience scale cd-risc 2003 | 1 | 0.2 % |
| resilience cd | 1 | 0.2 % |
| reliability of conor davidson scale | 1 | 0.2 % |
| scoring a psychological resilience scale | 1 | 0.2 % |
| resiliencescale | 1 | 0.2 % |
| connor davidson resilience questionnaire | 1 | 0.2 % |
| cd-risc fee | 1 | 0.2 % |
| connor-davidson resilience scale 10 scoring | 1 | 0.2 % |
| connor davidson resilience scale connor and davidson 2003 | 1 | 0.2 % |
| resiliency scale connor | 1 | 0.2 % |
| conor davidson scale | 1 | 0.2 % |
| connor-davidson resilience scale cd-risc2 | 1 | 0.2 % |
| korean resilience scale | 1 | 0.2 % |
| cd risc subscales | 1 | 0.2 % |
| web | 1 | 0.2 % |
| cd risc domains | 1 | 0.2 % |
| cd-risc-10 questionnaire pdf | 1 | 0.2 % |
| sample of connor-davidson 25-item resilience scale | 1 | 0.2 % |
| connor–davidson resilience scale | 1 | 0.2 % |
| cd- risk resilience | 1 | 0.2 % |
| cd risc questions | 1 | 0.2 % |
| brief resilience scale | 1 | 0.2 % |
| low medium high resilience connor davidson | 1 | 0.2 % |
| manual of connor-davidson resilience scale | 1 | 0.2 % |
| score connor davidson resilience scale | 1 | 0.2 % |
| how to improve resilience in adolescents with cancer in japan | 1 | 0.2 % |
| 2 item resilience scale | 1 | 0.2 % |
| scale privacy and security rights | 1 | 0.2 % |
| cd-risc 10 scoring | 1 | 0.2 % |
| connor-davidson resilience scale wikipedia | 1 | 0.2 % |
| snapcrab_i | 1 | 0.2 % |
| connor davidson resilience scale norms | 1 | 0.2 % |
| connor resilience measures | 1 | 0.2 % |
| sample of connors-davidson resilience scale | 1 | 0.2 % |
| connor-davidson resilience scale sub scales | 1 | 0.2 % |
| cd-risc domains | 1 | 0.2 % |
| resiliency scale for adults cd-risc | 1 | 0.2 % |
| resilience scale in french version | 1 | 0.2 % |
| examples of resilience scales | 1 | 0.2 % |
| connors and scoring | 1 | 0.2 % |
| connor davidson resilience scale depression | 1 | 0.2 % |
| resiliency scale for adults cd | 1 | 0.2 % |
| risk-resilience scale | 1 | 0.2 % |
| chinese version of the 10-item cd-risc | 1 | 0.2 % |
| cd-risc scale age range | 1 | 0.2 % |
| connor-davidson resilience | 1 | 0.2 % |
| david connor resilience chinese score | 1 | 0.2 % |
| connor davidson resilience scale spss | 1 | 0.2 % |
| low medium high cd risc | 1 | 0.2 % |
| connor davidson resilience scale short 10 item | 1 | 0.2 % |
| resilience scale scoring | 1 | 0.2 % |
| notario-pacheco et al 2011 | 1 | 0.2 % |
| connor-davidson resilience resilience scale for adults | 1 | 0.2 % |


Student Grievance Redressal Portal
Home
Download
Tutorial
Portfolio
About
Contact
Home
Download
More
Portfolio
About
Contact
Home
Download
More
Portfolio
About
Contact


API Standard for Fiscal Service
1. Overview
This guide documents the framework used to develop APIs for Fiscal Service. The framework should be used by the Bureau of the Fiscal Service for all public-facing APIs. This provides consistency to the public user and allows APIs to be consolidated into a common portal. This version (v.1) contains elements that are still under development and may be subject to change as Fiscal Service continues to evaluate use of APIs.
2. API Framework
The API framework is used to define the layout of the URL, input parameters, and the response. The framework defined within this document provides a consistent experience for the Fiscal Service API user.
2.1 URL Layout and Taxonomy
The URLs should be formatted with all characters in lower case and separated by underscores (e.g. fiscal_service). All endpoints will be singular case. All requests will be HTTP GET requests. The URL of an API is broken down into the following components:
Organization: The organization component of the API URL reflects the bureau that is creating the API.
(e.g. https://api.transparency.treasury.gov/services/api/fiscal_service)
Version: Integer version number for the release of the API. This is only changed when a revision will affect the underlying behavior of the request/response.Backward compatible changes will not result in a new version number. APIs may incorporate a ‘default version’ that automatically uses the newest version of the API if none is specified.
(e.g. https://api.transparency.treasury.gov/services/api/fiscal_service/v1)
Subject Area: The subject area represents the business area within the organization for the API. The subject areas, as defined for the API, for the Fiscal Service are:
- debt
- payments
- collections
- accounting
- securities
(e.g. https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt)
Topic/Sub Topic: After the subject area the API endpoint can end with a topic or have a number of sub topics. The topic references the specific set of data within the hierarchy that the user is looking to query.
(e.g. https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror)
or
https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror/analytics_collection_delinquent_debt)
2.2 Input Parameters
API input parameters are designed with the end user in mind. They are structured for consistency across APIs. The parameters are separated into the following: fields, filter, sorting, query (future release), pretty print (future release), format, and pagination.
2.2.1 Fields
- Definition: Field parameter accepts a comma separated list of field names that the user wants to be returned in the response.
- Parameter: fields=
- Accepts: Valid field name
- Required: No
- Default Value: Default to all fields if not provided
- Example: https://api.transparency.treasury.gov/services/api/…/delinquent_debt?fields=funding_type_id,delinquency_rate_amount,debt_by_category_count.
2.2.2 Filters
- Definition: Filter is used to apply logic criteria to each field if necessary.
- Parameter: fields=
- Accepts: Valid comma separated list of fields and filter criteria.
- Filter criteria is as follows:
- lt = less than
- gt = greater than:
- lte = less than or equal to
- gte = greater than or equal to
- eq = equal to
- in = in
- Usage
- filter=reporting_fiscal_year:in:(2007,2008,2009,2010)
- Usage
- Required: No
- Default Value: Default to all fields and all data if not provided
- Example of Request including Filter Properties: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror/delinquent_debt?filter=funding_type_id:eq:202.
- Filter criteria is as follows:
2.2.3 Sorting
- Definition: Field parameter accepts a comma separated list of field names for how the user wants to sort the response.
- Parameter: sort=
- – will be used to do descending sort.
- Accepts: Valid fields name
- Required: No
- Default Value: Default sort will be controlled by the API
- Example: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror?sort=funding_type_id.
2.2.4 Pretty Print (Planned for Future Release)
- Definition: Pretty print will put carriage returns in the json response so that it can be easily read by a human.
- Parameter: pretty_print
- Accepts: yes/no
- Required: No
- Default Value: Default to no response is not pretty print
- Example: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror?pretty_print=yes.
2.2.5 Format
- Definition: Format is used to define the output method for the response.
- Parameter: format=
- Accepts: xml, json, csv
- Required: No
- Default Value: Default to json
- Example: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror?format=json.
2.2.6 Pagination (limit/offset)
- Definition: Limit will set the number of rows that are returned in a request and offset will set the starting point of the pagination.
- Parameter: offset=0,limit=100
- Accepts: Both accept an integer
- Required: No
- Default Value: Default to offset of 0 and limit of 100
- Example: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror?limit=100&offset=100.
2.2.7 Query (Planned for Future Release)
- Definition: Query parameter is a free form text search in all of the fields of the response.
- Parameter: q=
- Required: No
- Accepts: Text
- Default Value: Default to no query, all rows will be returned.
- Example: https://api.transparency.treasury.gov/services/api/fiscal_service/v1/debt/tror?q=tror
2.3 Response
The response will be formatted according to the format input parameter specified above and will be json, xml or csv. The response will be utf-8 and will have gzip support.
Response Example:
{ "data": [{ "field": "value", "field": "value", "field": "value", "field": "value", "field": "value" }], "meta": { "count": "1", "labels": { "field": "Field Name In Title Case", "field": "Field Name In Title Case", "field": "Field Name In Title Case", "field": "Field Name In Title Case", "field": "Field Name In Title Case" } } }
2.3.1 Granularity
Response will be constructed to include a single granularity that can be rolled up using a data grouping (i.e. sum, avg, max, min).
2.3.2 Datatypes
All fields in a response will be treated as strings and enclosed in double quotes.
2.3.3 Response Codes
The following response codes may be returned:
- 200 OK: Response to a successful GET.
- 304 Not Modified: Cached response.
- 400 Bad Request: Request was malformed.
- 403 Forbidden: API Key is not valid.
- 404 Not Found: When a non-existent resource is requested.
- 405 Method Not Allowed: Attempting anything other than a GET.
- 429 Too Many Requests: Failed due to rate limiting.
2.3.4 Envelope
The response will default to json and will include an envelope by default.
Example:
{ … response data … }
2.3.5 Meta Object
The meta object provides metadata around the result payload. The object will contain the following:
- count: Record count for the response.
- labels: Mapping from result field to logical field names.
2.3.6 Data Object
It is the section of the response where the actual data will be returned.
2.3.7 Error Object
If something goes wrong during the process of creating the API response, an error object will be returned to the user. The object will contain the following information:
- title: The error message
- detail: The error description
Example response:
{ "error": "Error Name", "message": "Explanation – if available" }
2.3.8 Pagination Header
The pagination header will contain the Link: header
- Definition: The pagination header will contain a link header that, as specified in RFC 5988, 6585, allowing user to navigate pagination just using the API
- Header:
- Link:
<url first>
; rel=”first”,<url prev>
; rel=”prev”;<url next>
;rel=”next”;<url last>
;rel=”last”
- Link:
2.4 API Documentation (RAML)
Summary listing of all available API endpoints:
- services/api/docs/api.raml
Detail endpoint documentation with json schema (works for any endpoint with .raml):
- services/api/fiscal_service/v1/debt/top/state_programs.raml
Treasury Securities:
Debt Information:
Appendices - Glossary
Included is a list of acronyms, design patterns and developer tools commonly referred to in this document.
API: Application Program Interface. Programming Interfaces that enable software to interact with other software through exposed functionality.
API Key: An authorization code passed into an API request using a parameter to identify the requester.
Authentication: Identifying the user of the API.
Cache: A collection of responses that are reused by the client to improve performance.
CSV: comma-separated values. A file type that stores tabular data (numbers and text) in plain text. Each line of the file is a data record. Each record consists of one or more fields, separated by commas.
GET: The HTTP method for getting resources from a RESTful API
GZIP: GNU Zip. A file format and a software application used for file compression and decompression.
HTTP: Hypertext Transfer Protocol is how websites and APIs communicate over the internet.
JSON: Javascript Object Notation is a data format commonly used for APIs requests parameters and responses.
Meta: An underlying definition or description.
Metadata: Summarizes basic information about data, which can make finding and working with particular instances of data easier.
Parameter: An argument sent to the API which helps define the request and expected response.
Python: A high-level general-purpose programming language.
RAML: RESTful API Modeling Language. Used to describe RESTful APIs
REST: Representational state transfer is an architectural pattern for interacting with resources via HTTP methods.
URL: Uniform Resource Locator. Used to reference an address to a resource on the Internet.
Web service: Web Service is used to describe an API that is accessible over the internet through HTTP.
XML: Extensible markup language is a format that is used to describe documents and data.
YAML: Human-readable data serialization format designed for human readability and interaction with scripting language such as Perl and Python.


Click the button (again and again) to sort the array in random order.
The lowest number is .
The highest number is .
The highest number is .
The lowest number is .
This function "miPropioMetodo_ArrayMax" loops through an array comparing each value with the highest value found:
The highest number is .
This function "miPropioMetodo_ArrayMin" loops through an array comparing each value with the lowest value found:
The lowest number is .
Click the buttons to sort car objects on age.
Click the buttons to sort car objects on type.


Create your own content with us.
Please enter your contact details, so we can give you proper credit to this blog post.
Please keep it bellow 300 characters
Please submit your guest blog by using the fields below.
Author:
"One’s destination is never a place, but a new way of seeing things."


Use tab, shift-tab, or the arrow keys to move the focus between two characters.
To connect characters into multi-character tokens, press the 'x' key
or double-click the space between characters.
Please select the Communication that you want to manually tokenize: