Verstappen victorious as Ferrari pair blame each other for collision in Brazil
World champion Lewis Hamilton took the flag in third but was handed a five-second penalty, dropping him to seventh.
Sebastian Vettel and Charles Leclerc pointed the finger of blame at each other following their late collision on yet another miserable afternoon for Ferrari as Max Verstappen roared to victory in Brazil.
Verstappen delivered a dominant performance at Interlagos to win for a second time this year, finishing ahead of Toro Rosso’s Pierre Gasly, with Lewis Hamilton taking the flag in third.
Hamilton, however, was handed a five-second penalty, dropping him to seventh and promoting McLaren’s Carlos Sainz to third, following a penultimate-lap coming together with Alex Albon.
The world champion’s collision with Albon encapsulated the frenetic nature of a race effectively deemed a dead-rubber after the Briton sewed up his sixth global title in Texas a fortnight ago.
The tension has been simmering between their two drivers – the four-time world champion Vettel and emerging talent Leclerc – since the opening round of the campaign in Melbourne eight months ago. Here, at one of the stand-out venues on the grand prix calendar, it sensationally boiled over.
Leclerc, having started 14th following a grid penalty, was battling Vettel for fourth with five laps to go. The young Monegasque dived underneath Vettel at the Senna Esses and made the pass stick. It was a perfect move.
Leclerc held off Vettel as they emerged from the third corner, but on the run down to the ensuing bend, Vettel latched on to Leclerc’s tow before drawing alongside his team-mate, and then subtly moving across him.

“What the hell,” yelled Leclerc in the sister Ferrari, before he delivered a number of bleeped-out expletives.
Later, the 22-year-old said: “I left the space Seb took, and then towards the end of the straight he started to squeeze me.
“Everything happened very quickly, and as soon he went to the side we touched and then I had a puncture. In the future, we will put it behind us and continue to work together.”
“The drivers need to feel sorry for the team because they were free to fight,” Binotto said. “I am disappointed. They know that silly mistakes are something we should avoid.
“When you have a crash, there are two drivers and both of them have got at least a small percentage, or a part percentage of responsibility. I don’t want to judge now.”
Binotto said Vettel and Leclerc will be summoned to the team’s Maranello headquarters to explain their actions. He ruled out disciplining either driver.
The stewards reviewed the accident, but took no further action, saying: “Both Vettel and Leclerc had the opportunity to avoid or mitigate the incident… neither driver is predominantly at fault.”


A Plain Markdown Post
This is a post written in plain Markdown (*.md) instead of R Markdown (*.Rmd). The major differences are: You cannot run any R code in a plain Markdown document, whereas in an R Markdown document, you can embed R code chunks (```{r}); A plain Markdown post is rendered through Blackfriday, and an R Markdown document is compiled by rmarkdown and Pandoc. There are many differences in syntax between Blackfriday’s Markdown and Pandoc’s Markdown.


Ad Blocker Detected
To view Ads Components please disable Ad Blocker.
Banners
Ads are a very important part of mobile interfaces, they're a great source of revenue. We've integrated, the best, the most correct and widely approved ads in our item.
300 x 50 Mobile Banner Ad
300 x 250 Mobile Banner Ad
Scrolling Ads
Scrolling ads show and hide as you scroll through the page. Tap the button below to activate it and scroll up and down to see it in action.
PreviewFixed Ad
The classic fixed 300x50 ad that shows at the bottom of the screen. To enable it simply tap the below button.
PreviewTimed Ads
Timed ads are those little ads that show in gamaes where you have to wait a certain period before being able to close them. Although annoying they have a high conversion rate.
Automatic Ad
You can deploy full timed ads by timer, to show automatically after a certain period.
Auto Show in 60 SecondsTap or Programatic
Yes. Full screen and modal ads can be activated programatically.
menu('#your-ad-id', 'show', 250)
menu('#your-ad-id', 'hide', 250)


In the aerospace industry, airplanes and other aircrafts fly rapidly through the airspace at an apace that is both efficient and awe-inspiring. [G|D]
As the little mouse scurried through the crawlspace, it used its strong carapace to push against the walls, occasionally pressing its backspace to move in a different direction. [G|D]
The new technology allowed people to explore cyberspace and hyperspace at an incredible speed, out pacing even the most advanced super computers. [G|D]
In the modern workspace, people strive to keep up a consistent pace while utilizing subspace technology to increase productivity and efficiency. [G|D]


# -*- coding: utf-8 -*-
import json
from django.db import models
from django.http import HttpResponse
from django.views.generic import View
[docs]class AutocompleteView(View):
"""
Simple json response view as backend support to the autocomplete form.
>>> view = AutocompleteView.as_view(model=TestModel)
"""
model = None
http_method_names = ['get']
[docs] def get(self, request, *args, **kwargs):
"""
Returns the dict response that will be serialized and returned:
>>> view = AutocompleteView()
>>> view.model = TestModel
>>> request = request_factory.get('/')
>>> request.GET = {'term': 'blood'}
>>> response = view.get(request)
>>> response.status_code
200
>>> response.content
b'[]'
We can set permissions to ``True`` that the request user should be
authenticated.
>>> m = TestModel()
>>> m.autocomplete.permissions = True
>>> view.model = m
Create a user::
>>> user = User.objects.create_user('member', password='member')
>>> user.save()
Unauthenticated user::
>>> client = Client()
>>> response = client.get('/api/filter/silly/?term=c')
>>> response.status_code
401
Authenticate::
>>> client.login(username='member', password='member')
True
>>> response = client.get('/api/filter/silly/?term=c')
>>> response.status_code
200
Say we have a permission we want for our users::
>>> m.autocomplete.permissions = 'is_staff'
>>> view.model = m
>>> response = client.get('/api/filter/silly/?term=c')
>>> response.status_code
401
Create a staff user and try again::
>>> admin = User.objects.create_superuser('admin'<EMAIL_ADDRESS>password='admin')
>>> admin.save()
>>> client.login(username='admin', password='admin')
True
>>> response = client.get('/api/filter/silly/?term=c')
>>> response.status_code
200
Permissions can be a list too::
>>> m.autocomplete.permissions = ['is_staff', 'is_superuser']
>>> view.model = m
>>> response = client.get('/api/filter/silly/?term=c')
>>> response.status_code
200
"""
self.request = request
perms = self.model.autocomplete.permissions
if perms is not None:
if not request.user.is_authenticated():
return HttpResponse('Unauthorized', status=401)
if not isinstance(perms, bool):
if isinstance(perms, bytes):
perms = [perms]
if not request.user.has_perms(perms):
return HttpResponse('Unauthorized', status=401)
# passed permissions
context = self.get_context_data(**kwargs)
return self.render_to_response(context)
[docs] def get_context_data(self, **kwargs):
"""
Returns the dict response that will be serialized and returned:
>>> view = AutocompleteView()
>>> view.model = TestModel
>>> request = request_factory.get('/')
>>> request.GET = {'term': 'blood'}
>>> view.request = request
>>> context = view.get_context_data()
>>> print(context)
[]
With the appropiate object in db it finds something to return.
>>> m = TestModel(name='Silly model',
... description='Dumb description')
>>> m.save()
>>> request.GET = {'term': 'silly'}
>>> view.request = request
>>> context = view.get_context_data()
>>> len(context)
1
>>> context[0]['label']
'Silly model'
All searchable fields are searched, e.g. the description here:
>>> request.GET = {'term': 'dumb'}
>>> view.request = request
>>> context = view.get_context_data()
>>> len(context)
1
>>> context[0]['label']
'Silly model'
Clean up.
>>> m.delete()
"""
term = self.request.GET.get('term')
context = []
if not term:
return context
# the developer can implement own search method
if hasattr(self.model.objects, 'search'):
queryset = self.model.objects.search(
self.model.objects.all(),
self.request,
[term])
else:
queryset = self.search(
self.model.objects.all(),
[term])
# find the first field to use as a label
# def fields():
# for field in self.model._meta.fields:
# if self.is_searchable_field(field):
# yield field
# label = next(fields()).name
for item in queryset.all():
context.append(dict(
id=item.pk,
value=str(item),
label=str(item)
))
return context
[docs] def render_to_json_response(self, context, **response_kwargs):
"""
Does the work to convert context data and return json response.
>>> view = AutocompleteView()
>>> view.model = TestModel
>>> context = [{'id': 1, 'label': 'My marker', 'value': 'My marker'}]
>>> response = view.render_to_response(context)
>>> response.status_code
200
"""
return HttpResponse(
self.convert_context_to_json(context),
content_type='application/json',
**response_kwargs
)
[docs] def convert_context_to_json(self, context):
"""
Does the work to convert context data to json.
>>> view = AutocompleteView()
>>> context = [{'id': 1, 'label': 'My marker', 'value': 'My marker'}]
>>> keys = view.convert_context_to_json(context)
>>> keys = list(context[0].keys())
>>> keys.sort()
>>> print(keys)
['id', 'label', 'value']
Yes, looks the same, trust me, it is json.
"""
return json.dumps(context)
[docs] def render_to_response(self, context, **response_kwargs):
"""
Override :class:`django.views.generic.base.View` to return json response.
"""
return self.render_to_json_response(context, **response_kwargs)
[docs] def is_searchable_field(self, field):
"""
"""
if isinstance(field, models.TextField) or isinstance(field, models.CharField):
return True
return False
[docs] def search(self, queryset, terms):
"""
Search method. This can be overridden by giving the model manager a ``search`` method.
:arg queryset: :class:`django.db.models.QuerySet`
:arg terms: :list: of strings
:returns: the filtered :class:`django.db.modesls.QuerySet`
Searches all text fields
>>> m = TestModel(name='My silly model',
... description='a cool description')
>>> m.save()
>>> manager = TestModel.objects
>>> queryset = manager.all()
Verify that we have objects to search on::
>>> queryset
[<TestModel: TestModel object>]
Try a term that will fail::
>>> view = AutocompleteView()
>>> view.model = TestModel
>>> view.search(queryset, ['empty'])
[]
And a term that will return::
>>> view.search(queryset, ['cool'])
[<TestModel: TestModel object>]
The model has a ``autocomplete`` attribute that is an instance of
:class:`django_autocomplete.meta.AutocompleteMeta`. The test model
allows ForeignKey fields to be followed.
Try a term that will follow the foreign key field and search in the related object::
>>> fkm = TestFKModel(name='My nice company',
... description='a nice description')
>>> fkm.save()
>>> m.fkm = fkm
>>> m.save()
>>> view.search(queryset, ['nice'])
[<TestModel: TestModel object>]
Clean up.
>>> m.delete()
>>> fkm.delete()
"""
q = None
for term in terms:
if not isinstance(term, str):
raise TypeError("search terms must be a string or list of strings, "
"not '%s'." % term.__class__.__name__)
term = term.encode('utf-8')
# search all possible fields
if self.model.autocomplete.fields:
fields = self.model.autocomplete.fields
else:
fields = self.model._meta.fields
q = self._construct_q(
q, fields, term,
follow_fks=self.model.autocomplete.follow_fks
)
return queryset.filter(q)
def _construct_q(self, q, fields, term, follow_fks=True):
"""
Constructs a query following foreign key fields.
:arg q: :class:`django.db.models.Q` object
:arg fields: :list: django model fields
:arg term: :str: search term
:returns: :class:`django.db.models.Q` object
Get the object manaager for an object that has fk fields.
>>> view = AutocompleteView()
>>> view.model = TestModel
Get the fields and check:
>>> fields = TestModel._meta.fields
>>> [field.name for field in fields]
['id', 'name', 'description', 'fkm']
Construct a query that spans all three objects:
>>> q = view._construct_q(None, fields, 'silly_search', follow_fks=True)
The query is an *OR* query:
>>> print(q)
(OR: (...))
>>> print('\\n'.join([str(child) for child in q.children]))
('name__icontains', 'silly_search')
('description__icontains', 'silly_search')
('fkm__name__icontains', 'silly_search')
('fkm__description__icontains', 'silly_search')
The method will also accept a list of field names and will look up the field by name:
>>> fields = ['name']
>>> q = view._construct_q(None, fields, 'silly_search', follow_fks=False)
>>> print('\\n'.join([str(child) for child in q.children]))
('name__icontains', 'silly_search')
Unacceptable fields raise error:
>>> fields = ['nofield']
>>> q = view._construct_q(None, fields, 'silly_search', follow_fks=False)
Traceback (most recent call last):
...
django.db.models.fields.FieldDoesNotExist: TestModel has no field named 'nofield'
"""
for field in fields:
# may be passed a list of field names
if not isinstance(field, models.fields.Field):
field = self.model._meta.get_field_by_name(field)[0]
is_fk = isinstance(field, models.ForeignKey)
if self.is_searchable_field(field) and not is_fk:
kwargs = {'%s__icontains' % field.name: term}
q = self._start_query(q, **kwargs)
elif is_fk and follow_fks:
for ifield in field.rel.to._meta.fields:
if self.is_searchable_field(ifield):
kwargs = {'%s__%s__icontains' % (field.name, ifield.name): term}
q = self._start_query(q, **kwargs)
return q
def _start_query(self, q, **kwargs):
"""
Helper method to ensure the validity of the Q objects in the chain of ``OR`` queries
:arg q: :class:`django.db.models.Q` object or None
:arg kwargs: :dict: ``field name`` ``search term`` values
:returns: :class:`django.db.models.Q` object
Something like:
>>> view = AutocompleteView()
>>> q = view._start_query(None, filter="filter")
>>> q = view._start_query(q, name="name")
>>> print(q)
(OR: ('filter', 'filter'), ('name', 'name'))
"""
if not q:
q = models.Q(**kwargs)
else:
q = q | models.Q(**kwargs)
return q


|
Halide
|
#include <mini_d3d12.h>
Definition at line 2528 of file mini_d3d12.h.
| DXGI_FORMAT D3D12_SHADER_RESOURCE_VIEW_DESC::Format |
Definition at line 2530 of file mini_d3d12.h.
| D3D12_SRV_DIMENSION D3D12_SHADER_RESOURCE_VIEW_DESC::ViewDimension |
Definition at line 2531 of file mini_d3d12.h.
| UINT D3D12_SHADER_RESOURCE_VIEW_DESC::Shader4ComponentMapping |
Definition at line 2532 of file mini_d3d12.h.
| D3D12_BUFFER_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Buffer |
Definition at line 2535 of file mini_d3d12.h.
| D3D12_TEX1D_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture1D |
Definition at line 2536 of file mini_d3d12.h.
| D3D12_TEX1D_ARRAY_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture1DArray |
Definition at line 2537 of file mini_d3d12.h.
| D3D12_TEX2D_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture2D |
Definition at line 2538 of file mini_d3d12.h.
| D3D12_TEX2D_ARRAY_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture2DArray |
Definition at line 2539 of file mini_d3d12.h.
| D3D12_TEX2DMS_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture2DMS |
Definition at line 2540 of file mini_d3d12.h.
| D3D12_TEX2DMS_ARRAY_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture2DMSArray |
Definition at line 2541 of file mini_d3d12.h.
| D3D12_TEX3D_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::Texture3D |
Definition at line 2542 of file mini_d3d12.h.
| D3D12_TEXCUBE_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::TextureCube |
Definition at line 2543 of file mini_d3d12.h.
| D3D12_TEXCUBE_ARRAY_SRV D3D12_SHADER_RESOURCE_VIEW_DESC::TextureCubeArray |
Definition at line 2544 of file mini_d3d12.h.
| union { ... } |


/test.html
/
Tip: Using TAB to focus on links. (The text color will change to purple when links on focused)


Verify that PHP is configured to disable loading of scripts from URLs.
Preventing PHP from loading scripts from other web sites helps prevent remote file inclusion vulnerabilities.
Examine the php.ini file to make sure the allow_url_include is configured to "Off", like so:
allow_url_include = Off
Use the allow_url_include directive in php.ini to disable loading external scripts, like so:
allow_url_include = OffIf you application does not need to open URLs as files, it may be prudent to disable that functionality as well by using the allow_url_fopen directive in php.ini, like so:
allow_url_fopen = Off


Moving your software into the cloud is an obvious, cost-effective, and super reliable way to improve your software today. Whether you're looking to improve scalability, security, reliability, or cost, working with the right partner in the cloud can quickly improve your business.
Click here for a free consultation!We've been building applications and websites for nearly 2 decades. We're a security-first, cloud-native app development partner that can help you strategize, design, and build extremely effective software for your staff and your clients.
Click here for a free strategy sessionWhether you're looking to learn more about your customers, your product, or reach a bigger audience, let us put Aritifical Intelligence to work for you! We can help you classify customers and communicate to the most likely audience that will appreciate hearing your message.
Click here to get more customers


--- title: "Home" is_home_page: true section: home layout: default ---
Procdraw is a live programming environment for making procedurally generated graphics.
It's at a fairly early stage in development and you can find it on GitHub at github.com/simonbates/procdraw.


Package controller
Class SuperController
- java.lang.Object
-
- controller.SuperController
-
- Direct Known Subclasses:
MovieBookingController
,Moviegoersearchcontroller
,StaffController
,StaffListMovieController
public class SuperController extends java.lang.Object
This Controller class is the parent class for all the controllers in the package. This class manages all the reading and writing into the database (.txt files).
-
-
Constructor Summary
Constructors Constructor Description SuperController()
-
Method Summary
Modifier and Type Method Description void
insertObject(java.lang.String filePath, java.lang.Object o)
void
printObject(java.lang.Object o)
java.lang.String[][]
read_database(java.lang.String file_path)
void
writeData(java.lang.String filePath, java.lang.Object[] o)
void
writeData(java.lang.String filePath, java.lang.String[][] new_movie_info)
-
-
-
Method Detail
-
read_database
public java.lang.String[][] read_database(java.lang.String file_path) throws java.io.IOException
- Parameters:
file_path
- the file name that will be read- Returns:
- 2d String array
- Throws:
java.io.IOException
- This method is to read from the database. It returns the nested string array from database, whereby the columns represent the attributes and the rows represent the number of data.
-
writeData
public void writeData(java.lang.String filePath, java.lang.String[][] new_movie_info) throws java.io.IOException
- Parameters:
filePath
- the file name that will be written intonew_movie_info
- the updated movie information after any update- Throws:
java.io.IOException
- This method is to write into the database. It takes in the nested string array given and formats it such that each attribute is separated by "%", and writes it into the .txt file.
-
writeData
public void writeData(java.lang.String filePath, java.lang.Object[] o) throws java.io.IOException
- Parameters:
filePath
- the file name that will be written intoo
- the array of Object- Throws:
java.io.IOException
- This method is to write into the database. It takes in the array of Object given and writes it into the .txt file.
-
printObject
public void printObject(java.lang.Object o) throws java.io.IOException
- Parameters:
o
- the Object whose content is to be printed- Throws:
java.io.IOException
- This method is to print the contents of a single Object.
-
insertObject
public void insertObject(java.lang.String filePath, java.lang.Object o) throws java.io.IOException
- Parameters:
filePath
- the file name that will be written intoo
- Object to be written to file- Throws:
java.io.IOException
- This method is to insert a single object into the database.
-
-


Installation
Dependencies
Java 1.8+ (OpenJDK 8 or higher)
Docker 18.09.1+ (only for installation via docker)
Quick Install
(Applicable in Linux, Mac, and Windows)
Step 1: Download the latest version of geoweaver.jar and save it in any folder
Step 2: Navigate to the Jar file folder and Run the command:
java -jar geoweaver.jar
Step 3: Open browser and enter: http://localhost:8070/Geoweaver/ .That's it!
Build from source
Use maven to build. In the command line, go to the root folder and execute mvn install
. After a successful build, the Geoweaver jar package will be under the directory: Geoweaver/target/Geoweaver-<version>.jar
.
Install using Docker
Step 1: Install Docker Desktop if you haven't (please refer to Get Docker to download).
Step 2: Pull geoweaver image using command:
docker pull jensensun/geoweaver
Step 3: Run geoweaver using command:
docker run -t -i -v <YOUR_HOME_DIRECTORY>:/home/marsvegan/ -p 8070:8070 jensensun/geoweaver
What is going on? :
-v <YOUR_HOME_DIRECTORY>:/home/marsvegan/
is for mounting your current home directory into the docker containers.marsvegan
is the user name within geoweaver containers.-p 8070:8070
maps the port so you can access Geoweaver from your browser.jensensun/geoweaver
is the published docker image url in DockerHub.
Tip: You can create an alias, so next time, you won't copy and paste such a long command:
alias geoweaver="docker run -t -i -v <YOUR_HOME_DIRECTORY>:/home/marsvegan/ -p 8070:8070 jensensun/geoweaver"
Then start it by simply typing: geoweaver
Step 4: Open web browser and input http://localhost:8070/Geoweaver
. Geoweaver should show up in a sec. That is it!
Reset Password for Localhost
Geoweaver will automatically create a password for localhost. It will only show once at the first run of Geoweaver. It is recommended to copy and save it in a safe place. If you forget or miss that password, please run the following command to reset it:
java -jar geoweaver.jar resetpassword
If you used Docker
, use the following command:
docker run -t -i -v <YOUR_HOME_DIRECTORY>:/home/marsvegan/ -p 8070:8070 jensensun/geoweaver resetpassword
Set up HTTP Proxy
Click here to set up


How does JavaScript compare to HTML and CSS?
With HTML you mark-up or tag areas for the basic structure and content of a website, such as where the header , navigation and the many content areas will go. CSS is responsible for the design of the webpage - how every thing looks, and where it is on the page. Javascript is a programming language which can change or animate items after the website loaded, and change appearance o material in your broswer.
Everyday control flow loop
if (hours < 10){
say(“Good morning.”);
} else if {(hours >= 14 && hours <= 17);
document.write(“Good afternoon.”);
} else if { (hours >= 17) say(“Good evening.”);
The first statement checks the hours variable for a value less than 10—in other words, it checks whether the current time is before 10:00 a.m. If so, it displays the greeting “Good morning.” The second statement checks whether the time is between 2:00 p.m. and 5:00 p.m. and, if so, displays “Good afternoon.” This statement uses else if to indicate that this condition will only be tested if the previous one failed—if it’s morning, there’s no need to check whether it’s afternoon. Similarly, the third statement checks for times after 5:00 p.m. and displays “Good evening.” The final statement uses a simple else, meaning it will be executed if none of the previous conditions matched. This covers the times between 10:00 a.m. and 2:00 p.m. (which is neglected by the other statements) and displays “Good day.”
}
What is the difference between accessing data from arrays and object literals?
Arrays let you create and group together data in interesting ways. Arrays are not a new data type, but lists with data values. Each value has an index, which is the numbered poistion of that value in the array. The first value us at index ), the next value is at index 1 etc. An Array is a subclass, or sub-prototype, of an Object, and it can inherit features from an Object. In JavaScript, an object literal is a comma separated list of named values wrapped in curly braces. It is created and has properties and methods added to it.
What is a function?
It is a way to bundle code so it can be re-used. Functions allow us to run the same piece of code from multiple places in a programme without having to copy and paste the code repeatedly. Also, by hiding long bits of code in a function and giving it a name we will all recognise, will make it easier to able to plan the code and focus on organising the functions instead of multiples of coding detail.
< /p>


Image
Basics
Fixed square images
image is-16x16 |
16x16px | |
image is-24x24 |
24x24px | |
image is-32x32 |
32x32px | |
image is-48x48 |
48x48px | |
image is-64x64 |
64x64px | |
image is-96x96 |
96x96px | |
image is-128x128 |
128x128px |
Rounded images
Retina images
Responsive images with ratios
image is-square |
Square (or 1 by 1) | |
image is-1by1 |
1 by 1 | |
image is-5by4 |
5 by 4 | |
image is-4by3 |
4 by 3 | |
image is-3by2 |
3 by 2 | |
image is-5by3 |
5 by 3 | |
image is-16by9 |
16 by 9 | |
image is-2by1 |
2 by 1 | |
image is-3by1 |
3 by 1 | |
image is-4by5 |
4 by 5 | |
image is-3by4 |
3 by 4 | |
image is-2by3 |
2 by 3 | |
image is-3by5 |
3 by 5 | |
image is-9by16 |
9 by 16 | |
image is-1by2 |
1 by 2 | |
image is-1by3 |
1 by 3 |
Arbitrary ratios with any element


--- layout: page title: "Contact" description: "Have questions? I have answers (maybe)." header-img: "pages/contact-bg.jpg" ---
Want to get in touch with me? Fill out the form below to send me a message and I will try to get back to you within 24 hours!


You are taking an Implicit Association Test (IAT) that entails sorting words into categories as quickly as possible. You should be able to complete the IAT in less than 10 minutes total.


Paul Routledge: 'If two million new voters follow Unite oldies' wisdom Labour will win'
If they show half the gumption and wisdom of Unite’s oldies, the poll outcome is not in doubt.
by Paul Routledge, https://www.mirror.co.uk/authors/paul-routledge/The election is pretty much over, and Labour has won a resounding victory.
Well, it is if the retired members of Unite the union have anything to do with it.
Speaking at their conference in Brighton a couple of days ago, I conducted a straw poll on who was going to vote for which party come December 12.
Among almost a hundred there, none will vote nationalist – either SNP or Plaid Cymru – and none will do as they’re told by bossyboots Jo Swinson of the Lib Dems.
As for the Tories, all I got was a low growl. All the hands went up for Labour, except for one brave Brexit Party voter.
Of course, this proves nothing. It’s an unscientific, statistically unrepresentative expression of opinion by a roomful of elderly troublemakers. Like me.
But I like to think – indeed, I do think – that it’s a distillation of political wisdom from a generation that has seen everything from Hitler and Hiroshima to the rocky-horror show of contemporary capitalism.
They have seen right through Alexander de Pfeffel Johnson’s fake “blue Conservatism” that pretends to care about working-class people and their families.
And they’re still fighting the good fight under Unite’s banner “Retired From Work – But Not From The Fight”. An army of 60,000 volunteers in branches all around the country.
Whether it’s free TV licences for the over 75s, the social-care crisis, winter fuel allowance or the unfair treatment of the 1950s’ generation of women pensioners, they won’t – in Dylan Thomas’ immortal phrase – go gentle into that good night.
More than two million new voters have registered for the first time for this election, and most of them will be young people.
If they show half the gumption and wisdom of Unite’s oldies, the poll outcome is not in doubt.


--- layout: post title: '090916 l 아쿠아리움' date: 2009-09-16 20:47:35.000000000 +09:00 type: post parent_id: '0' published: true password: '' status: publish categories: [] tags: - q. meta: _original_post_id: '40025921' _original_import_author: sheepless_ original_post_id: '40025921' _wp_old_slug: '40025921' author: login: mouthless email<EMAIL_ADDRESS>display_name: mouthless first_name: '' last_name: '' ---
[youtube http://www.youtube.com/watch?v=u7deClndzQw&hl=ko&fs=1&]


| POST |
/api/register |
Creates a user using the information sent inside the body of the request. Hash the password before saving the user to the database. |
| POST |
/api/login |
Use the credentials sent inside the body to authenticate the user. On successful login, create a new session for the user and send back a ‘Logged in’ message and a cookie that contains the user id. If login fails, respond with the correct status code and the message: ‘You shall not pass!’ |
| GET |
/api/users |
If the user is logged in, respond with an array of all the users contained in the database. If the user is not logged in repond with the correct status code and the message: ‘You shall not pass!’. |


---
layout: default
title: Speakers and MC
permalink: /speakers/
color: '#a4b958'
modal: all
---
{% include hero-page.html %}
Speakers and MC
Most of NetHui will be made up of breakout sessions that are designed by the community in the programme development. But on top of this we will also have a high profile keynote speaker for the opening ceremony and a great panel session for the plenary room.
Once our speakers have been confirmed, we will pop them up here for you all to check out!
Our fabulous MC - Michele A’Court
We are so thrilled to announce we have secured the very funny and talented Michele A’Court to be our MC. Michele has blessed us with her witty MC’ing at a number of NetHuis and is always a huge hit with all attendees.
{% include social.html %}
{% include sponsors-page.html %}


C2 with twitter
C2 with DNS
C2 with Dropbox
C2 with https
C2 with webdav
C2 with gmail
[“Tasking” Office 365 for Cobalt Strike C2](
https://labs.mwrinfosecurity.com/blog/
JSBN
JSBN is a bot client which interprets commands through Twitter, requiring no hosting of servers or infected hosts from the command issuer. It is written purely in javascript as a Proof-of-Concept for javascript's botnet potentials.
C2 with browser
and
primer
canisrufus
A stealthy Python based Windows backdoor that uses Github as a command and control server
Gcat (no longer maintained) | G2 with gmail
Murdock | C2 with google spreadsheets


Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
{{currentRole.description}}


--- title: Title keywords: fastai sidebar: home_sidebar nb_path: "notebooks/keras_for_researchers.ipynb" ---
Everything you need to know to use Keras & TF 2.0 for deep learning research.
import tensorflow as tf
from tensorflow import keras
Are you a machine learning researcher? Do you publish at NeurIPS and push the state-of-the-art in CV and NLP? This guide will serve as your first introduction to core Keras API concepts.
In this guide, you will learn about:
Layer
classGradientTape
and writing low-level training loopsadd_loss()
methodtf.function
You will also see the Keras API in action in two end-to-end research examples: a Variational Autoencoder, an a Hypernetwork.
class Linear(keras.layers.Layer):
"""y = w.x + b"""
def __init__(self, units=32, input_dim=32):
super(Linear, self).__init__()
w_init = tf.random_normal_initializer()
self.w = tf.Variable(
initial_value=w_init(shape=(input_dim, units), dtype='float32'),
trainable=True)
b_init = tf.zeros_initializer()
self.b = tf.Variable(
initial_value=b_init(shape=(units,), dtype='float32'),
trainable=True)
def call(self, inputs):
return tf.matmul(inputs, self.w) + self.b
You would use a Layer
instance much like a Python function:
linear_layer = Linear(units=4, input_dim=2)
# The layer can be treated as a function.
# Here we call it on some data.
y = linear_layer(tf.ones((2, 2)))
assert y.shape == (2, 4)
The weight variables (created in __init__
) are automatically
tracked under the weights
property:
assert linear_layer.weights == [linear_layer.w, linear_layer.b]
You have many built-in layers available, from Dense
to Conv2D
to LSTM
to
fancier ones like Conv3DTranspose
or ConvLSTM2D
. Be smart about reusing
built-in functionality.
class Linear(keras.layers.Layer):
"""y = w.x + b"""
def __init__(self, units=32):
super(Linear, self).__init__()
self.units = units
def build(self, input_shape):
self.w = self.add_weight(shape=(input_shape[-1], self.units),
initializer='random_normal',
trainable=True)
self.b = self.add_weight(shape=(self.units,),
initializer='random_normal',
trainable=True)
def call(self, inputs):
return tf.matmul(inputs, self.w) + self.b
# Instantiate our lazy layer.
linear_layer = Linear(4)
# This will also call `build(input_shape)` and create the weights.
y = linear_layer(tf.ones((2, 2)))
You can automatically retrieve the gradients of the weights of a layer by
calling it inside a GradientTape
. Using these gradients, you can update the
weights of the layer, either manually, or using an optimizer object. Of course,
you can modify the gradients before using them, if you need to.
(x_train, y_train), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
(x_train.reshape(60000, 784).astype('float32') / 255, y_train))
dataset = dataset.shuffle(buffer_size=1024).batch(64)
# Instantiate our linear layer (defined above) with 10 units.
linear_layer = Linear(10)
# Instantiate a logistic loss function that expects integer targets.
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
# Instantiate an optimizer.
optimizer = tf.keras.optimizers.SGD(learning_rate=1e-3)
# Iterate over the batches of the dataset.
for step, (x, y) in enumerate(dataset):
# Open a GradientTape.
with tf.GradientTape() as tape:
# Forward pass.
logits = linear_layer(x)
# Loss value for this batch.
loss = loss_fn(y, logits)
# Get gradients of weights wrt the loss.
gradients = tape.gradient(loss, linear_layer.trainable_weights)
# Update the weights of our linear layer.
optimizer.apply_gradients(zip(gradients, linear_layer.trainable_weights))
# Logging.
if step % 100 == 0:
print('Step:', step, 'Loss:', float(loss))
class ComputeSum(keras.layers.Layer):
"""Returns the sum of the inputs."""
def __init__(self, input_dim):
super(ComputeSum, self).__init__()
# Create a non-trainable weight.
self.total = tf.Variable(initial_value=tf.zeros((input_dim,)),
trainable=False)
def call(self, inputs):
self.total.assign_add(tf.reduce_sum(inputs, axis=0))
return self.total
my_sum = ComputeSum(2)
x = tf.ones((2, 2))
y = my_sum(x)
print(y.numpy()) # [2. 2.]
y = my_sum(x)
print(y.numpy()) # [4. 4.]
assert my_sum.weights == [my_sum.total]
assert my_sum.non_trainable_weights == [my_sum.total]
assert my_sum.trainable_weights == []
# with a `build` method that we defined above.
class MLP(keras.layers.Layer):
"""Simple stack of Linear layers."""
def __init__(self):
super(MLP, self).__init__()
self.linear_1 = Linear(32)
self.linear_2 = Linear(32)
self.linear_3 = Linear(10)
def call(self, inputs):
x = self.linear_1(inputs)
x = tf.nn.relu(x)
x = self.linear_2(x)
x = tf.nn.relu(x)
return self.linear_3(x)
mlp = MLP()
# The first call to the `mlp` object will create the weights.
y = mlp(tf.ones(shape=(3, 64)))
# Weights are recursively tracked.
assert len(mlp.weights) == 6
Note that our manually-created MLP above is equivalent to the following built-in option:
mlp = keras.Sequential([keras.layers.Dense(32, activation=tf.nn.relu),
keras.layers.Dense(32, activation=tf.nn.relu),
keras.layers.Dense(10)])
Layers can create losses during the forward pass via the add_loss()
method.
This is especially useful for regularization losses.
The losses created by sublayers are recursively tracked by the parent layers.
Here's a layer that creates an activity regularization loss:
class ActivityRegularization(keras.layers.Layer):
"""Layer that creates an activity sparsity regularization loss."""
def __init__(self, rate=1e-2):
super(ActivityRegularization, self).__init__()
self.rate = rate
def call(self, inputs):
# We use `add_loss` to create a regularization loss
# that depends on the inputs.
self.add_loss(self.rate * tf.reduce_sum(inputs))
return inputs
Any model incorporating this layer will track this regularization loss:
class SparseMLP(keras.layers.Layer):
"""Stack of Linear layers with a sparsity regularization loss."""
def __init__(self):
super(SparseMLP, self).__init__()
self.linear_1 = Linear(32)
self.regularization = ActivityRegularization(1e-2)
self.linear_3 = Linear(10)
def call(self, inputs):
x = self.linear_1(inputs)
x = tf.nn.relu(x)
x = self.regularization(x)
return self.linear_3(x)
mlp = SparseMLP()
y = mlp(tf.ones((10, 10)))
print(mlp.losses) # List containing one float32 scalar
These losses are cleared by the top-level layer at the start of each forward
pass -- they don't accumulate. layer.losses
always contains only the losses
created during the last forward pass. You would typically use these losses by
summing them before computing your gradients when writing a training loop.
mlp = SparseMLP()
mlp(tf.ones((10, 10)))
assert len(mlp.losses) == 1
mlp(tf.ones((10, 10)))
assert len(mlp.losses) == 1 # No accumulation.
# Let's demonstrate how to use these losses in a training loop.
# Prepare a dataset.
(x_train, y_train), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
(x_train.reshape(60000, 784).astype('float32') / 255, y_train))
dataset = dataset.shuffle(buffer_size=1024).batch(64)
# A new MLP.
mlp = SparseMLP()
# Loss and optimizer.
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
optimizer = tf.keras.optimizers.SGD(learning_rate=1e-3)
for step, (x, y) in enumerate(dataset):
with tf.GradientTape() as tape:
# Forward pass.
logits = mlp(x)
# External loss value for this batch.
loss = loss_fn(y, logits)
# Add the losses created during the forward pass.
loss += sum(mlp.losses)
# Get gradients of weights wrt the loss.
gradients = tape.gradient(loss, mlp.trainable_weights)
# Update the weights of our linear layer.
optimizer.apply_gradients(zip(gradients, mlp.trainable_weights))
# Logging.
if step % 100 == 0:
print('Step:', step, 'Loss:', float(loss))
Keras offers a broad range of built-in metrics, like tf.keras.metrics.AUC
or tf.keras.metrics.PrecisionAtRecall
. It's also easy to create your
own metrics in a few lines of code.
To use a metric in a custom training loop, you would:
metric = tf.keras.metrics.AUC()
metric.udpate_state(targets, predictions)
method for each batch of datametric.result()
metric.reset_states()
Here's a simple example:
accuracy = tf.keras.metrics.SparseCategoricalAccuracy()
# Prepare our layer, loss, and optimizer.
model = keras.Sequential([keras.layers.Dense(32, activation='relu'),
keras.layers.Dense(32, activation='relu'),
keras.layers.Dense(10)])
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
optimizer = tf.keras.optimizers.Adam(learning_rate=1e-3)
for epoch in range(2):
# Iterate over the batches of a dataset.
for step, (x, y) in enumerate(dataset):
with tf.GradientTape() as tape:
logits = model(x)
# Compute the loss value for this batch.
loss_value = loss_fn(y, logits)
# Update the state of the `accuracy` metric.
accuracy.update_state(y, logits)
# Update the weights of the model to minimize the loss value.
gradients = tape.gradient(loss_value, model.trainable_weights)
optimizer.apply_gradients(zip(gradients, model.trainable_weights))
# Logging the current accuracy value so far.
if step % 200 == 0:
print('Epoch:', epoch, 'Step:', step)
print('Total running accuracy so far: %.3f' % accuracy.result())
# Result the metric's state at the end of an epoch
accuracy.reset_states()
In addition to this, similarly to the self.add_loss()
method, you have access
to an self.add_metric()
method on layers. It tracks the average of
whatever quantity you pass to it. You can reset the value of these metrics
by calling layer.reset_metrics()
on any layer or model.
model = keras.Sequential([keras.layers.Dense(32, activation='relu'),
keras.layers.Dense(32, activation='relu'),
keras.layers.Dense(10)])
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
optimizer = tf.keras.optimizers.Adam(learning_rate=1e-3)
# Create a training step function.
@tf.function # Make it fast.
def train_on_batch(x, y):
with tf.GradientTape() as tape:
logits = model(x)
loss = loss_fn(y, logits)
gradients = tape.gradient(loss, model.trainable_weights)
optimizer.apply_gradients(zip(gradients, model.trainable_weights))
return loss
# Prepare a dataset.
(x_train, y_train), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
(x_train.reshape(60000, 784).astype('float32') / 255, y_train))
dataset = dataset.shuffle(buffer_size=1024).batch(64)
for step, (x, y) in enumerate(dataset):
loss = train_on_batch(x, y)
if step % 100 == 0:
print('Step:', step, 'Loss:', float(loss))
Some layers, in particular the BatchNormalization
layer and the Dropout
layer, have different behaviors during training and inference. For such layers,
it is standard practice to expose a training
(boolean) argument in the call
method.
By exposing this argument in call
, you enable the built-in training and
evaluation loops (e.g. fit) to correctly use the layer in training and
inference modes.
class Dropout(keras.layers.Layer):
def __init__(self, rate):
super(Dropout, self).__init__()
self.rate = rate
def call(self, inputs, training=None):
if training:
return tf.nn.dropout(inputs, rate=self.rate)
return inputs
class MLPWithDropout(keras.layers.Layer):
def __init__(self):
super(MLPWithDropout, self).__init__()
self.linear_1 = Linear(32)
self.dropout = Dropout(0.5)
self.linear_3 = Linear(10)
def call(self, inputs, training=None):
x = self.linear_1(inputs)
x = tf.nn.relu(x)
x = self.dropout(x, training=training)
return self.linear_3(x)
mlp = MLPWithDropout()
y_train = mlp(tf.ones((2, 2)), training=True)
y_test = mlp(tf.ones((2, 2)), training=False)
# This is the deep learning equivalent of *declaring a type*.
# The shape argument is per-sample; it does not include the batch size.
# The functional API focused on defining per-sample transformations.
# The model we create will automatically batch the per-sample transformations,
# so that it can be called on batches of data.
inputs = tf.keras.Input(shape=(16,), dtype='float32')
# We call layers on these "type" objects
# and they return updated types (new shapes/dtypes).
x = Linear(32)(inputs) # We are reusing the Linear layer we defined earlier.
x = Dropout(0.5)(x) # We are reusing the Dropout layer we defined earlier.
outputs = Linear(10)(x)
# A functional `Model` can be defined by specifying inputs and outputs.
# A model is itself a layer like any other.
model = tf.keras.Model(inputs, outputs)
# A functional model already has weights, before being called on any data.
# That's because we defined its input shape in advance (in `Input`).
assert len(model.weights) == 4
# Let's call our model on some data, for fun.
y = model(tf.ones((2, 16)))
assert y.shape == (2, 10)
# You can pass a `training` argument in `__call__`
# (it will get passed down to the Dropout layer).
y = model(tf.ones((2, 16)), training=True)
The Functional API tends to be more concise than subclassing, and provides a few other advantages (generally the same advantages that functional, typed languages provide over untyped OO development). However, it can only be used to define DAGs of layers -- recursive networks should be defined as Layer subclasses instead.
Learn more about the Functional API here.
In your research workflows, you may often find yourself mix-and-matching OO models and Functional models.
Note that the Model
class also features built-in training & evaluation loops
(fit()
and evaluate()
). You can always subclass the Model
class
(it works exactly like subclassing Layer
) if you want to leverage these loops
for your OO models.
Here are some of things you've learned so far:
Layer
encapsulate a state (created in __init__
or build
) and some computation (defined in call
).GradientTape
, calling your model inside the tape's scope, then retrieving
gradients and applying them via an<EMAIL_ADDRESS>decorator.self.add_loss()
.Let's put all of these things together into an end-to-end example: we're going to implement a Variational AutoEncoder (VAE). We'll train it on MNIST digits.
Our VAE will be a subclass of Layer
, built as a nested composition of layers that subclass Layer
. It will feature a regularization loss (KL divergence).
Below is our model definition.
First, we have an Encoder
class, which uses a Sampling
layer to map a MNIST digit to a latent-space triplet (z_mean, z_log_var, z)
.
from tensorflow.keras import layers
class Sampling(layers.Layer):
"""Uses (z_mean, z_log_var) to sample z, the vector encoding a digit."""
def call(self, inputs):
z_mean, z_log_var = inputs
batch = tf.shape(z_mean)[0]
dim = tf.shape(z_mean)[1]
epsilon = tf.keras.backend.random_normal(shape=(batch, dim))
return z_mean + tf.exp(0.5 * z_log_var) * epsilon
class Encoder(layers.Layer):
"""Maps MNIST digits to a triplet (z_mean, z_log_var, z)."""
def __init__(self,
latent_dim=32,
intermediate_dim=64,
**kwargs):
super(Encoder, self).__init__(**kwargs)
self.dense_proj = layers.Dense(intermediate_dim, activation=tf.nn.relu)
self.dense_mean = layers.Dense(latent_dim)
self.dense_log_var = layers.Dense(latent_dim)
self.sampling = Sampling()
def call(self, inputs):
x = self.dense_proj(inputs)
z_mean = self.dense_mean(x)
z_log_var = self.dense_log_var(x)
z = self.sampling((z_mean, z_log_var))
return z_mean, z_log_var, z
Next, we have a Decoder
class, which maps the probabilistic latent space coordinates back to a MNIST digit.
class Decoder(layers.Layer):
"""Converts z, the encoded digit vector, back into a readable digit."""
def __init__(self,
original_dim,
intermediate_dim=64,
**kwargs):
super(Decoder, self).__init__(**kwargs)
self.dense_proj = layers.Dense(intermediate_dim, activation=tf.nn.relu)
self.dense_output = layers.Dense(original_dim, activation=tf.nn.sigmoid)
def call(self, inputs):
x = self.dense_proj(inputs)
return self.dense_output(x)
Finally, our VariationalAutoEncoder
composes together an encoder and a decoder, and creates a KL divergence regularization loss via add_loss()
.
class VariationalAutoEncoder(layers.Layer):
"""Combines the encoder and decoder into an end-to-end model for training."""
def __init__(self,
original_dim,
intermediate_dim=64,
latent_dim=32,
**kwargs):
super(VariationalAutoEncoder, self).__init__(**kwargs)
self.original_dim = original_dim
self.encoder = Encoder(latent_dim=latent_dim,
intermediate_dim=intermediate_dim)
self.decoder = Decoder(original_dim, intermediate_dim=intermediate_dim)
def call(self, inputs):
z_mean, z_log_var, z = self.encoder(inputs)
reconstructed = self.decoder(z)
# Add KL divergence regularization loss.
kl_loss = - 0.5 * tf.reduce_mean(
z_log_var - tf.square(z_mean) - tf.exp(z_log_var) + 1)
self.add_loss(kl_loss)
return reconstructed
Now, let's write a training loop. Our training step is decorated with a @tf.function
to compile into a super fast graph function.
vae = VariationalAutoEncoder(original_dim=784,
intermediate_dim=64,
latent_dim=32)
# Loss and optimizer.
loss_fn = tf.keras.losses.MeanSquaredError()
optimizer = tf.keras.optimizers.Adam(learning_rate=1e-3)
# Prepare a dataset.
(x_train, _), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
x_train.reshape(60000, 784).astype('float32') / 255)
dataset = dataset.shuffle(buffer_size=1024).batch(32)
@tf.function
def training_step(x):
with tf.GradientTape() as tape:
reconstructed = vae(x) # Compute input reconstruction.
# Compute loss.
loss = loss_fn(x, reconstructed)
loss += sum(vae.losses) # Add KLD term.
# Update the weights of the VAE.
grads = tape.gradient(loss, vae.trainable_weights)
optimizer.apply_gradients(zip(grads, vae.trainable_weights))
return loss
losses = [] # Keep track of the losses over time.
for step, x in enumerate(dataset):
loss = training_step(x)
# Logging.
losses.append(float(loss))
if step % 100 == 0:
print('Step:', step, 'Loss:', sum(losses) / len(losses))
# Stop after 1000 steps.
# Training the model to convergence is left
# as an exercise to the reader.
if step >= 1000:
break
As you can see, building and training this type of model in Keras is quick and painless.
Now, you may find that the code above is somewhat verbose: we handle every little detail on our own, by hand. This gives the most flexibility, but it's also a bit of work.
Let's take a look at what the Functional API version of our VAE looks like:
original_dim = 784
intermediate_dim = 64
latent_dim = 32
# Define encoder model.
original_inputs = tf.keras.Input(shape=(original_dim,), name='encoder_input')
x = layers.Dense(intermediate_dim, activation='relu')(original_inputs)
z_mean = layers.Dense(latent_dim, name='z_mean')(x)
z_log_var = layers.Dense(latent_dim, name='z_log_var')(x)
z = Sampling()((z_mean, z_log_var))
encoder = tf.keras.Model(inputs=original_inputs, outputs=z, name='encoder')
# Define decoder model.
latent_inputs = tf.keras.Input(shape=(latent_dim,), name='z_sampling')
x = layers.Dense(intermediate_dim, activation='relu')(latent_inputs)
outputs = layers.Dense(original_dim, activation='sigmoid')(x)
decoder = tf.keras.Model(inputs=latent_inputs, outputs=outputs, name='decoder')
# Define VAE model.
outputs = decoder(z)
vae = tf.keras.Model(inputs=original_inputs, outputs=outputs, name='vae')
# Add KL divergence regularization loss.
kl_loss = - 0.5 * tf.reduce_mean(
z_log_var - tf.square(z_mean) - tf.exp(z_log_var) + 1)
vae.add_loss(kl_loss)
Much more concise, right?
By the way, Keras also features built-in training & evaluation loops on its Model
class (fit()
and evaluate()
). Check it out:
loss_fn = tf.keras.losses.MeanSquaredError()
optimizer = tf.keras.optimizers.Adam(learning_rate=1e-3)
# Prepare a dataset.
(x_train, _), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
x_train.reshape(60000, 784).astype('float32') / 255)
dataset = dataset.map(lambda x: (x, x)) # Use x_train as both inputs & targets
dataset = dataset.shuffle(buffer_size=1024).batch(32)
# Configure the model for training.
vae.compile(optimizer, loss=loss_fn)
# Actually training the model.
vae.fit(dataset, epochs=1)
The use of the Functional API and fit
reduces our example from 65 lines to 25 lines (including model definition & training). The Keras philosophy is to offer you productivity-boosting features like
these, while simultaneously empowering you to write everything yourself to gain absolute control over every little detail. Like we did in the low-level training loop two paragraphs earlier.
Let's take a look at another kind of research experiment: hypernetworks.
A hypernetwork is a deep neural network whose weights are generated by another network (usually smaller).
Let's implement a really trivial hypernetwork: we'll use a small 2-layer network to generate the weights of a larger 3-layer network.
import numpy as np
input_dim = 784
classes = 10
# This is the model we'll actually use to predict labels (the hypernetwork).
outer_model = keras.Sequential([
keras.layers.Dense(64, activation=tf.nn.relu),
keras.layers.Dense(classes),
])
# It doesn't need to create its own weights, so let's mark its layers
# as already built. That way, calling `outer_model` won't create new variables.
for layer in outer_model.layers:
layer.built = True
# This is the number of weight coefficients to generate. Each layer in the
# hypernetwork requires output_dim * input_dim + output_dim coefficients.
num_weights_to_generate = (
classes * 64 + classes) + (64 * input_dim + 64)
# This is the model that generates the weights of the `outer_model` above.
inner_model = keras.Sequential([
keras.layers.Dense(16, activation=tf.nn.relu),
keras.layers.Dense(num_weights_to_generate, activation=tf.nn.sigmoid),
])
This is our training loop. For each batch of data:
inner_model
to generate an array of weight coefficients, weights_pred
outer_model
outer_model
to compute the actual MNIST predictionsinner_model
to minimize the
final classification lossloss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
optimizer = tf.keras.optimizers.Adam(learning_rate=1e-4)
# Prepare a dataset.
(x_train, y_train), _ = tf.keras.datasets.mnist.load_data()
dataset = tf.data.Dataset.from_tensor_slices(
(x_train.reshape(60000, 784).astype('float32') / 255, y_train))
# We'll use a batch size of 1 for this experiment.
dataset = dataset.shuffle(buffer_size=1024).batch(1)
@tf.function
def train_step(x, y):
with tf.GradientTape() as tape:
# Predict weights for the outer model.
weights_pred = inner_model(x)
# Reshape them to the expected shapes for w and b for the outer model.
# Layer 0 kernel.
start_index = 0
w0_shape = (input_dim, 64)
w0_coeffs = weights_pred[:, start_index : start_index + np.prod(w0_shape)]
w0 = tf.reshape(w0_coeffs, w0_shape)
start_index += np.prod(w0_shape)
# Layer 0 bias.
b0_shape = (64,)
b0_coeffs = weights_pred[:, start_index : start_index + np.prod(b0_shape)]
b0 = tf.reshape(b0_coeffs, b0_shape)
start_index += np.prod(b0_shape)
# Layer 1 kernel.
w1_shape = (64, classes)
w1_coeffs = weights_pred[:, start_index : start_index + np.prod(w1_shape)]
w1 = tf.reshape(w1_coeffs, w1_shape)
start_index += np.prod(w1_shape)
# Layer 1 bias.
b1_shape = (classes,)
b1_coeffs = weights_pred[:, start_index : start_index + np.prod(b1_shape)]
b1 = tf.reshape(b1_coeffs, b1_shape)
start_index += np.prod(b1_shape)
# Set the weight predictions as the weight variables on the outer model.
outer_model.layers[0].kernel = w0
outer_model.layers[0].bias = b0
outer_model.layers[1].kernel = w1
outer_model.layers[1].bias = b1
# Inference on the outer model.
preds = outer_model(x)
loss = loss_fn(y, preds)
# Train only inner model.
grads = tape.gradient(loss, inner_model.trainable_weights)
optimizer.apply_gradients(zip(grads, inner_model.trainable_weights))
return loss
losses = [] # Keep track of the losses over time.
for step, (x, y) in enumerate(dataset):
loss = train_step(x, y)
# Logging.
losses.append(float(loss))
if step % 100 == 0:
print('Step:', step, 'Loss:', sum(losses) / len(losses))
# Stop after 1000 steps.
# Training the model to convergence is left
# as an exercise to the reader.
if step >= 1000:
break


|
areaDetector
3-5-0
EPICS areaDetector framework
|
Files | |
| file | ADCameralink.cpp |
| file | ADCameralink.h [code] |
| file | camLinkSerial.cpp |
| file | camLinkSerial.h [code] |
| file | ccd_exception.cpp |
| file | ccd_exception.h [code] |
| file | cl_com_port2.cpp |
| file | cl_com_port2.h [code] |
| file | comportInterface.h [code] |
| file | coreco.cpp |
| file | coreco.h [code] |
| file | grabberInterface.h [code] |
| file | logfile.cpp |
| file | logfile.h [code] |
| file | siliconSoftware.cpp |
| file | siliconSoftware.h [code] |
| file | siswSerialPort.cpp |
| file | siswSerialPort.h [code] |
| file | softwareGrabber.cpp |
| file | softwareGrabber.h [code] |
| file | stopWatch.cpp |
| file | stopWatch.h [code] |
| file | sw_com_port.cpp |
| file | sw_com_port.h [code] |


Kolkata, India
The Black Hole of Calcutta
The site of an atrocity that would be used to justify Britain’s conquest of India.
by Andres SchiffinoSome historians consider the Black Hole of Calcutta to be a catalyst for Great Britain’s eventual conquest of the Indian subcontinent. One ruler’s overzealous attempt to end the foreign presence in India inadvertently contributed to Great Britain dominating the country for almost 200 years.
In 1613, the Mughal emperor and the East India Company signed a treaty to secure a trade deal. Although the East India Company was a commercial organization, it came to have a quasi-governmental role in the region, minting money, forging diplomatic relationships, building fortresses and commanding private armies, in addition to building factories and trading posts.
Siraj al-Dawlah, the nawab of Bengal, grew to resent the foreign influence in his province. In 1756, he sent forces to overtake Fort William in Calcutta (modern day Kolkata), and after three days of intense fighting, the British forces surrendered. All the prisoners were put into the fort’s small holding cell, known as the “black hole.” According to the account of chief magistrate John Zephaniah Holwell, 146 captives were placed into a cell measuring 18 by 14 feet (though modern scholars estimate that there were 65 captives).
Their only source of light and fresh air was a tiny window. Some prisoners passed out from dehydration, and were crushed under the weight of their fellow captives. When cell door was opened the next morning, Howell described the survivors as “the ghastliest forms,” and reported that only 23 survived.
When news of the incident reached Great Britain, it shocked the nation. Some within the British government and merchant class saw opportunity in the atrocity, and used the cruel event as propaganda to promote imperial control of the Indian subcontinent. They argued that the Mughal emperor couldn’t guarantee the safety of British subjects, so the British would have to do it themselves and bring India under the authority of the crown.
A monument commemorating the British officials who died was erected at the original site of the Black Hole within Fort William in 1901, and was eventually moved to the grounds of St. John’s Church in 1940.
Know Before You Go
The site of Black Hole is located within Fort William in the city of Kolkata, though only the footprint of the small jail cell remains. It can be found in an alleyway between the General Post Office and an adjacent building to the north, in the northwest corner of Benoy-Badal-Dinesh Bagh. A monument to the victims can be found on the grounds of the nearby St. John’s Church.
Community Discussion
-
No Comments Yet
Start the discussion. forum Visit our forums.
Sources
- https://www.nationalgeographic.com/culture/topics/reference/british-east-india-trading-company-most-powerful-business/
- https://www.britannica.com/topic/Black-Hole-of-Calcutta
- https://books.google.com/books?id=d0oOAAAAQAAJ&pg=PA251#v=onepage&q&f=false
- http://materiaislamica.com/index.php/The_Black_Hole_of_Calcutta_%26_The_End_of_Islamic_Power_in_India_(1756%E2%80%941757)


{% extends 'base.html' %} {% block title %} Collection Sets {% endblock %} {% block content_header %}
A collection set is a group of collections around a particular topic or theme. Collections sets are active when there is at least one active collection within them. Collection sets are inactive when all collections have been deactivated and are no longer harvesting.


Gather your friends, family, or classmates and learn some something new about them!  And remember to have fun :))
Click on your chosen map to continue
Map of OhioMore locations coming soon!!!


Insights into health and behavior using data from the CDC
Every year since 1984, the government has called around the country and asked people a series of probing questions about their health. As the largest and longest running health survey system in the world, the CDC’s Behavioral Risk Factor Surveillance System (BRFSS) provides a wealth of information about health and health-related behaviors in the United States. It covers hundreds of variables over 400,000 adult interviews from all 50 states, the District of Columbia, and three territories. For more information about the survey itself, you should check out the CDC BRFSS site.
The BRFSS is a rich source of information on how demographics, behaviors, and other risk factors can correlate with health. Many important population health studies and measures use the BRFSS as a key data source. For example, it is the source of the CDC’s “Healthy Days” measurement, a key performance metric for the healthcare and health insurance industries.
Unfortunately, BRFSS data isn’t exactly easy to deal with. Its breadth and structure have changed considerably over the years, and there are important sampling considerations that must be taken into account when using the data to draw conclusions. My goal is demonstrate how to use BRFSS data and some of the interesting correlations and associations that can be drawn from this data set using machine learning and statistical techniques.
The code for this project can be found on GitHub in my BRFSS repo.
Anyone can download BRFSS data from the BRFSS Annual Survey Data page. There are links to each year the survey has been conducted. The data is available in .XPT
(SAS Transport Format) or in .ASCII
files. These are pretty big files, especially in more recent years. All together, the raw data is somewhere around 10GB.
The codebooks are available from the CDC for 1990-2014. I was able to find the codebooks for 1987-1989 from the Washington State Department of Health. The codebooks are availabe in my repo.
Python is my language of choice, and it’s easiest to use the files in Python if they are converted into .csv
format. I haven’t been able to find a robust solution for translating .XPT
format data in Python, so I use an R script called sas2csv.R
to conveniently translate the raw .XPT
data to .csv
. By the way, if you know of a nice way to deal directly with this data in Python, I’d love to hear from you.
The .csv
files for the BRFSS are too big to host on GitHub, but I’ve made them publicly available on my Amazon Cloud Drive BRFSS folder to make it easier for everyone else to use them.
Since cleaning a given year is a complicated and arduous process, I have detailed my methods for cleaning up an example year (2014) in a blog post, which is also available as an iPython notebook.
A quick flip through the codebooks makes it clear that BRFSS data is not useful right out of the box. It takes some heavy-duty cleaning to get what you want. The codes and variable names can change subtly from year to year, so I had to check the codebook for every year of interest.
I started by grabbing and cleaning the basic demographic data available for each respondent. Not only did this process elucidate how to clean and use BRFSS data, but it’s also useful in showing how the demographics of the survey change over time. I ended up grabbing the income group, race, state, age group, sex, and BMI of each respondent.
Due to the differences in codes over time, the easiest way for me to clean the data was to make a separate script for each year’s data set. The scripts read in the entire data set for the year, grab the variables of interest, replace the codes with meaningful data, and save it back out in a standardized format as a .csv
. The scripts for each year are in my GitHub repo.
Since all of the years now have clean tables that behave the same way, when I want to do analysis across multiple years, it’s a much simpler exercise of reading back in the cleaned tables and easily examining my variables of interest.
© 2016. All rights reserved. "Then you will know the data, and the data will set you free." winstonlarson@gmail.com


Before Change
return objectref
def WaitObject(self, request, context=None) -> ray_client_pb2.WaitResponse:
object_refs = [cloudpickle.loads(o) for o in request.object_handles]
num_returns = request.num_returns
timeout = request.timeout
object_refs_ids = []
for object_ref in object_refs:
if object_ref.binary() not in self.object_refs:
return ray_client_pb2.WaitResponse(valid=False)
object_refs_ids.append(self.object_refs[object_ref.binary()])
try:
ready_object_refs, remaining_object_refs = ray.wait(
object_refs_ids,
num_returns=num_returns,
After Change
def WaitObject(self, request, context=None) -> ray_client_pb2.WaitResponse:
object_refs = []
for id in request.object_ids:
if id not in self.object_refs[request.client_id]:
raise Exception(
"Asking for a ref not associated with this client: %s" %
str(id))
object_refs.append(self.object_refs[request.client_id][id])
num_returns = request.num_returns
timeout = request.timeout
try:


--- layout: post status: publish published: true title: Podcast 2.02 - NL Central Preview - Pirates/Astros/Reds author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 2176 wordpress_url: http://ivyenvy.com/?p=2176 date: '2010-03-24 08:13:30 +0000' date_gmt: '2010-03-24 14:13:30 +0000' categories: - General Baseball - Podcast tags: - Houston - Pirates - Reds - NL Central Division - Chris Sabo's Goggles - Pittsburgh Post Gazette Pirates Blog - Scott Morschhauser - James Yasko - Brian Welch - Astros County comments: [] ---
Corey, Andy and Ryan preview the 2010 NL Central Division. We discuss the Pirates, Astros and Reds. To help us cover these teams, we welcome the following guests:
* Scott Morschhauser, a regular commenter on Pittsburgh Post Gazette Pirates Blog.
* James Yasko, who covers the Houston Astros at the blog, Astros County.
* Brian Welch of Chris Sabo's Goggles, covers the Cincinnati Reds.
Stay tuned for Part II of the 2010 NL Central Division Preview.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/refine_struct.html ---
@Patrick Massot I finally got around to writing a refine_struct
tactic to generalize and simplify the automation of the indexed_product
proofs.
You can see it in action here https://github.com/cipher1024/lean-differential-topology/blob/master/src/indexed_product.lean.
You can use it as:
refine_struct { some_field := foo, .. }, repeat { intro x, have_field, apply (field x) }
In short, refine_struct
acts a bit like refine
but tags every goal it produces with the name of the field that requires it. Then you can use tactics such as have_field
/ let_field
to add an assumption or a local definition that stands for the accessor of the current field. You can also use apply_field
if you just want to use it as a rule.
Does it look useful in this state? My next step would be to PR it into mathlib
.
Do you examples of using have_field
, let_field
and aply_field
? I can see in the indexed product that you don't need to provide any data, which is already really nice, but I don't understand how the other tactics can be used
I you were to write the proof of semigroup by hand, it would go like this:
instance semigroup [∀ i, semigroup $ f i] : semigroup (Π i : I, f i) := begin refine_struct { .. }, { intros x y i, apply_field, apply (x i), apply (y i) }, { have_field, intros, funext, simp!, apply field } end
The first proof constructs the semigroup operator and the second proves associativity. While the first proof only works for binary functions, the second one is pretty much what the tactic does.
In the second proof, apply_field
would work if funext
didn't discard the goal's tags
it seems have_field
already discards it
why simp!
rather than dsimp
?
Yeah, you're right. I'll fix that
No reasons, I hadn't thought of using dsimp
that way
just trying to say more precisely what Lean shoud do (I also tend to use exact
when it works, instead of apply
like you did)
anyway, it looks very nice
can you also do Kevin's instance : comm_monoid ℕ+
using it?
I see. I would only use one command in that case but I wanted to demonstrate apply_field
.
Can you send me a link?
Is it the transport problem?
no, building this instance on pnat, given we already have it on nat
It should be doable
Thanks, I'll have a look after dinner :)
Kevin complained about Lean not being smart enough to do it by itself
Is it already dinner time in Quebec?
Here's my first attempt:
instance : comm_monoid ℕ+ := begin refine_struct { mul := λ m n : ℕ+, (⟨m.1 * n.1, mul_pos m.2 n.2⟩ : ℕ+), one := succ_pnat 0, .. }, repeat { have_field, intros, refine subtype.eq _, apply field } end
It's a mistake to expect Lean to be smart. Lean is effective.
It is a bit early for dinner but my sister just had a baby so I'm giving her a hand
Ok, I gotta run now
thanks!
Ok, so obvisouly I can add
meta def derive_field' : tactic unit := do b ← target >>= is_prop, if b then do field ← get_current_field, intros, `[refine subtype.eq _], applyc field else do skip
And the instance becomes
instance : comm_monoid ℕ+ := begin refine_struct { mul := λ m n : ℕ+, (⟨m.1 * n.1, mul_pos m.2 n.2⟩ : ℕ+), one := succ_pnat 0, .. } ; derive_field' end
Question: can we start derive_field
by some testing whether the target type is a pi type of a sub-type?
@Kevin Buzzard did you see that?
It's a mistake to expect Lean to be smart. Expect Simon to be smart.
Haha! That was not quite my point ...
I think there is a good lesson in there though... "Computers don't prove theorems, people prove theorems"
Is this the slogan for the new National Reasoning Association?
the Bot Lobby
Are you trying to emphasize the "people prove theorems" or the "computers are innocent"?
In all seriousness, I would say it's important not to lose sight of the fact that computers do nothing more than what you tell them to
so if you want magical tactics, you need magical people to support them
Yeah, my point exactly
or just sufficiently advanced technology
No
that's the point
the sufficiently advanced tech has to come from us
The difference is that, from magic, you expect all your wildest dreams to be fulfilled while with effective technology, you expect a specific task to be handled. The technology is more useful because it's easier to know when it will work and when it won't
it's one thing to expect miracles of "the CS community" in general, but that seems much less reasonable when you restrict scope to the <=10 people who are actually involved in writing tactics that you will see
That's why I have to learn. But I have so many other things I want to do :-/
It's wonderful being busy isn't it
It sounds like a sarcastic comment but I have found that since my schedule has been filling up, I've been able to get things done quicker
Question: can we start
derive_field
by some testing whether the target type is a pi type of a sub-type?
What about this question?
Yes that can be done. Are those the only two situations where you'd like to use derive_field
?
I'm not sure what the best way to generalize derive_field
is. I'm thinking of breaking it into derive_method
and derive_proof_of_law
. You could use them as refine_struct { .. } ; try { derive_field <|> derive_proof_of_law
. Then, we can add a tactic argument to derive_proof_of_law
and use it as derive_proof_of_law { intro }
or derive_proof_of_law { refine subtype.eq _ }
. I don't know if that's simpler than having separate tactics for pi instances and for subtypes.
maybe two separate tactics make more sense actually (one for pi and one for subtypes)
The benefit over the previous automation is, even if you do need specialized code, the simplified code is much simpler than in the current version of pi_instance
I like this approach for exactly this reason. I wasn't a fan of pi_instance
originally because it was a lot of code for a specialized problem; this puts most of the code in an obviously general setting and now pi_instance
is both simpler and requires less input
Last updated: Apr 24 2020 at 19:02 UTC


{% extends "layout.html" %} {% block body %}
Attribute fields can be selected as data in queries. Filter fields can be used in query where clauses


:: com :: sun :: star :: beans ::
|
| interface XPropertyWithState |
|
- Description
- makes it possible to query information about the state of
this object, seen as a property contained in a property set.
This interface provides direct access to operations
that are available if the containing property set
implements XPropertyState.
The state contains the information if:
- a value is available or void
- the value is stored in the object itself, or if a default value is being used
- or if the value cannot be determined, due to ambiguity
(multi selection with multiple values).
Generally objects that implement this interface
also implement XProperty.
|
| Methods' Details |
getStateAsProperty
- Returns
- the state of this as a property.
|
|
setToDefaultAsProperty
- Description
- sets this to its default value.
The value depends on the implementation of this interface.
If this is a bound property, the value changes before
the change events are fired. If this is a constrained property,
the vetoable event is fired before the property value changes.
- Throws
- com::sun::star::lang::WrappedTargetException
if the implementation has an internal reason for the exception.
In this case the original exception is wrapped into that
::com::sun::star::lang::WrappedTargetException.
|
|
getDefaultAsProperty
- Returns
- an object representing the default state of this object (as a property).
If no default exists, is not known or is void,
then the return value is NULL.
- Throws
- com::sun::star::lang::WrappedTargetException
if the implementation has an internal reason for the exception.
In this case the original exception is wrapped into that
::com::sun::star::lang::WrappedTargetException.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Copyright © 1998-2019, Modelica Association and contributors
| Name | Description |
|---|---|
| Examples | Library of examples to demonstrate the usage of package Blocks |
| Continuous | Library of continuous control blocks with internal states |
| Discrete | Library of discrete input/output blocks with fixed sample period |
| Interaction | Library of user interaction blocks to input and to show variables in a diagram animation |
| Interfaces | Library of connectors and partial models for input/output blocks |
| Logical | Library of components with Boolean input and output signals |
| Math | Library of Real mathematical functions as input/output blocks |
| MathInteger | Library of Integer mathematical functions as input/output blocks |
| MathBoolean | Library of Boolean mathematical functions as input/output blocks |
| Nonlinear | Library of discontinuous or non-differentiable algebraic control blocks |
| Routing | Library of blocks to combine and extract signals |
| Noise | Library of noise blocks |
| Sources | Library of signal source blocks generating Real, Integer and Boolean signals |
| Tables | Library of blocks to interpolate in one and two-dimensional tables |
| Types | Library of constants, external objects and types with choices, especially to build menus |
| Icons | Icons for Blocks |
replaceable type SignalType = Realin order that the type of the signal of an input/output block can be changed to a physical type, for example:
Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque))


Usual nonsense content...
IBA Located at 116 Messina Avenue, London NW6 4LD UK
Selection test start here...


Our metadata:
http://localhost:8080/context/saml/metadata
The idp:
https://www.testshib.org
Welcome to this page. Please press this link for very secret secrets (members only):
secrets


Horse-Power Converter
Conversion Collection
Sources
Horse-Power Ratios
0
HP Count
Animal-Power
HP to Animal Ratio
HP Equivalent
Ox-Power
1.7361
0
Mule-Power
2.3148
0
Donkey-Power
4.63
0
Man-Power
11.1111
0
Squirrel-Power
1334.678
0
Duck-Power
300
0
Lion-Power
0.6636
0
Pause
Reset


ddalpha: Depth-Based Classification and Calculation of Data Depth
Contains procedures for depth-based supervised learning, which are entirely non-parametric, in particular the DDalpha-procedure (Lange, Mosler and Mozharovskyi, 2014 <doi:10.1007/s00362-012-0488-4>). The training data sample is transformed by a statistical depth function to a compact low-dimensional space, where the final classification is done. It also offers an extension to functional data and routines for calculating certain notions of statistical depth functions. 50 multivariate and 5 functional classification problems are included.
| Version: |
1.3.7 |
| Depends: |
R (≥ 2.10), stats, utils, graphics, grDevices, MASS, class, robustbase, sfsmisc, geometry |
| Imports: |
Rcpp (≥ 0.11.0) |
| LinkingTo: |
BH, Rcpp |
| Published: |
2018-12-10 |
| Author: |
Oleksii Pokotylo [aut, cre],
Pavlo Mozharovskyi [aut],
Rainer Dyckerhoff [aut],
Stanislav Nagy [aut] |
| Maintainer: |
Oleksii Pokotylo <alexey.pokotylo at gmail.com> |
| License: |
GPL-2 |
| NeedsCompilation: |
yes |
| SystemRequirements: |
C++11 |
| Citation: |
ddalpha citation info |
| In views: |
FunctionalData |
| CRAN checks: |
ddalpha results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=ddalpha
to link to this page.


A better way to play retro games
RetriX is the first Libretro front end that is optimized for multiple input methods: gamepad, mouse + keyboard and touch are all first class citizens. RetriX is also built from the ground up to take advantage of Windows 10's gaming and security features.
One app. Many consoles
Over 13 game systems supported - including NES, SNES, Mega Drive, Game Boy, GBA, DS and PlayStation - with more to come.
Scalable
RetriX is a fully universal app with a scalable UI supporting PCs, Phones, Tablets and Xbox using Mouse/Keyboard, gamepad and touch.
Libretro based
RetriX uses native Libretro cores for maximum emulation performance.
Save states
RetriX supports save states: record and restore your game progress at any time!
Free and libre
RetriX is free to use and open source. No spying, no annoying ads like most "free" apps where *you* are the product. Don't like something? The code is on Github: you can change it!
Secure
RetriX is fully sandboxed and requires no permissions. It only opens files you select, installs and uninstalls cleanly and does not send data to the internet


open fun removeCommand(command: ICommand<*>): Boolean
(source)
Overrides ICommandBank.removeCommand
Removes the command from the registry, but does not destroy subcommand references for garbage collection.
command
- The command to remove.
Return
Boolean Whether the removal was successful.
See Also


{% extends 'base.html' %} {% load staticfiles %} {% block main_content_block %}
An error has occurred while processing your file '{{ file }}'. Please try again later.


Most gyrokinetic simulation codes use ﬁeld-line-following coordinates in constructing spatial mesh. The mesh is conceptually generated by the following three steps: (1) selecting some initial points; (2) tracing out magnetic-ﬁeld-lines passing through these points; (3) choose the intersecting points of these ﬁeld-lines with a series of chosen surfaces as the ﬁnal grid-points. The initial points and the chosen surfaces used to obtain the intersecting points diﬀer among various codes and thus the resulting grid diﬀers. Next, let us discuss some examples.
Given the deﬁnition of (ψ,𝜃) coordinates, choose toroidally symmetrical points (can be a toroidal wedge) in 𝜃 = 0 plane (𝜃 = 0 plane is usually chosen to be the low-ﬁeld-side midplane). Then trace out the magnetic-ﬁeld-lines passing through these points for one poloidal circuit (usually chosen in the range 𝜃 ∈ [−π,π]) and record the intersection points of these ﬁeld-lines with various 𝜃 = const planes. Note that the gridpoints in 𝜃 = −π plane usually do not coincide those in 𝜃 = +π plane due to the toroidal shift arising when the safety factor is irrational. Interpolation can be used to map physical variables deﬁned on gridpoints in 𝜃 = −π plane to those in 𝜃 = +π plane.
Given the deﬁnition of (ψ,𝜃) coordinates, 2D grid-points can be chosen on ϕ = 0 plane based on (ψ,𝜃) coordinates. Then trace out the magnetic-ﬁeld-lines starting from these points for one toroidal circuit and record the intersection points of these ﬁeld-lines with ϕj = jΔϕ planes, where j = 1,2,…,Nt − 1, Δϕ = 2π∕(Nt − 1). It is obvious that the resulting mesh are not toroidally symmetrical. And also the grids on ϕ = 0 plane diﬀer from those on ϕ = 2π plane. Interpolation can be used to mapping physical variables deﬁned on grid-points of ϕ = 0 to those of ϕ = 2π plane. In this case, the number of “toroidal grid-points” Nt (i.e., the number of poloidal planes) is actually the number of grid-points in the parallel direction within one toroidal circuit.
XGC1 can handle the region outside of the LCFS. Here we only discuss the region inside the LCFS. On each radial location on ϕ = 0 plane, select one arbitary point and trace out the magnetic ﬁeld line starting form this point for one poloidal circuit and record the intersection points of this ﬁeld-line with ϕj = jΔϕ planes, where j = 1,2,…,Nt, Δϕ = 2π∕Nt. For the case q > 1, one magnetic-ﬁeld-line will have more than one intersection points on some poloidal planes. Repeat tracing the ﬁeld line for each radial location. Then project (toroidally) all the intersection points on diﬀerent poloidal planes to a single poloidal plane and rotate (toroidally) these 2D grids to deﬁne a 3D grid that are toroidally symmetrical.


| HOME | DOWNLOAD | DOCUMENTATION | FORUM | FAQ |
> Home > Documentation > Modules
PLANETSCONSTANTS(1) SHTOOLS 2.6 PLANETSCONSTANTS(1)
PlanetsConstants
PlanetsConstants - Module containing planetary constants.
SYNOPSIS
USE PlanetsConstants
DESCRIPTION
PlanetsConstants defines several constants that are useful when working with gravity and topography data of the Earth, Mars, Venus, and Moon. All units are SI. Confer with the source file for exact values and references.
CONSTANTS
Fundamental Constants Grav_constant Gravitational Constant. pi_constant PI. mu0_constant Magnetic constant. The Moon R_Moon Radius of the Moon. GM_Moon Gravitational constant times the mass of the Moon. Mass_Moon Mass of the Moon. rho_bar_Moon Average density of the Moon. a_Moon Semi-major axis of the lunar orbit. g0_Moon Gravitational acceleration at R_Moon, not including rotation. R0_pot_Moon Reference radius of the gravitational-potential model. Omega_Moon Angular rotation rate of the Moon. C_MOI Polar moment of inertia, using R=1738 km. I_MOI Average moment of inertia, using R=1738 km. Gamma_MOI Gamma = (B-A)/C. Beta_MOI Beta = (C-A)/B. Mars R_Mars Average radius of Mars GM_Mars Gravitational constant times the mass of the Mars. Mass_Mars Mass of Mars. rho_bar_Mars Average density of Mars g0_Mars Gravitational acceleration at R_Mars, not including rotation. R0_pot_Mars Reference radius of the gravitational-potential model. Omega_Mars Angular rotation rate of Mars. f_Mars Topographic flattening of Mars. a_Mars Mean equatorial radius of Mars. Venus R_Venus Average radius of Venus. R0_pot_Venus Reference radius of the gravitational-potential model. GM_Venus Gravitational constant times the mass of the Venus. Mass_Venus Mass of Venus. Omega_Venus Angular rotation rate of Venus. rho_bar_Venus Average density of Venus. g0_Venus Gravitational acceleration at R_Mars, not including rotation. Earth GM_Earth Gravitational constant times the mass of the Earth. R0_pot_Earth Reference radius of the gravitational-potential model. Mass_Earth The mass of the Earth. WGS84_a The semi-major axis of the WGS84 ellipsoid. WGS84_b The semi-minor axis of the WGS84 ellipsoid. WGS84_r3 The radius of a sphere of Earth's volume. WGS84_f The flattening of the WGS84 ellipsoid. WGS84_gm The adopted GM of the WGS84 model, which includes the atmosphere. WGS84_gma The GM of the atmosphere adopted by the WGS84 model. WGS84_omega The adopted angular rotation rate of the Earth of the WGS84 model. = item WGS84_U0 The theoretical normal potential associated with the WGS84 model. Mercury R_Mercury Average radius of Mercury. GM_Mercury Gravitational constant times the mass of the Mercury. Mass_Mercury Mass of Mercury. Omega_Mercury_orbit Angular rotation rate of Mercury about the Sun. Omega_Mercury_spin Angular rotation rate of Mercury. rho_bar_Mercury Average density of Mercury. g0_Mercury Gravitational acceleration at R_Mercury, not including rotation.
SEE ALSO
<http://www.ipgp.jussieu.fr/~wieczor/SHTOOLS/SHTOOLS.html>
COPYRIGHT AND LICENSE
Copyright 2005-2011 by Mark Wieczorek<EMAIL_ADDRESS>This is free software; you can distribute and modify it under the terms of the revised BSD license. SHTOOLS 2.6 2011-11-21 PLANETSCONSTANTS(1)
> Home > Documentation > Modules
| Centre National de la Recherche Scientifique | Institut de Physique du Globe de Paris | © 2011 Mark Wieczorek |


less/base/typography.less
provides a number of styles, which are documented below, for most use cases.Our body
node has a font-size
property value of @font-size
, a line-height
property value of @line-height
, and a color
property value of @shuttle-gray
.
Our code
node has a padding
property value of 2px 4px
, a color
property value of @torch-red
, a background-color
property value of rgba(@torch-red, 0.1)
, and a border-radius
property value of @border-radius-level-2
.
All headings have a line-height
property value of normal
and a color
property value of @outer-space
.
h1
, h2
, and h3
nodes have a margin
property value of 0 0 32px 0
and a font-weight
property value of 300
.
h1
nodes have a font-size
property value of 48px
and a line-height
property value of 72px
.
h2
nodes have a font-size
property value of 40px
and a line-height
property value of 60px
.
h3
nodes have a font-size
property value of 24px
and a line-height
property value of 36px
.
h4
, h5
, and h6
nodes have a margin
property value of 0 0 16px 0
, a font-size
property value of @font-size
, and a line-height
property value of @line-height
.
All a
nodes have a text-decoration
property value of none
and their :hover
state has a text-decoration
property value of underline
.
All ol
and ul
nodes have a margin
property value of 2px 16px 32px 34px
and their children li
nodes have a margin-bottom
property value of 8px
.
Use this modifier to set an ordered or unordered lists list-style
property value to none
.
Use this modifier to set an ordered or unordered lists margin-bottom
property value to 0
.
All p
nodes have a margin
property value of 16px 0
.
Use this modifier to set a paragraphs margin-top
property value to 0
.
Use this modifier to set a paragraphs margin-bottom
property value to 0
.


--- date: 2010-02-15T00:00:00Z published: true title: Waves that injured surf audience were sneaky, but not 'rogue' - CNN.com url: /2010/02/15/waves-that-injured-surf-audience-were-sneaky-but-not-rogue-cnn-com/ ---
Spectators at the Mavericks Surfing Contest were standing on the beach at Princeton-by-the Sea, California, on Saturday morning when large waves knocked them down. More than 12 people were injured, according to local reports; video of one of the waves was recorded by CNN affiliate KRON of San Francisco.
They were "sneaker waves," waves near the shore that are unexpectedly and significantly larger than others occurring at the time
Sneaker waves are not fun - trust me.


:: com :: sun :: star :: ui ::
|
| unpublished |
interface XModuleUIConfigurationManager |
|
|
|
- Usage Restrictions
- not published
- Description
- specifies specific functions of a module based user interface
configuration manager interface.
A module user interface configuration manager supports, unlike a
document based ui configration manager, two layers of configuration
settings data:
1. Layer: A module default user interface configuration which
describe all user interface elements settings that are
used by OpenOffice. It is not possible to insert, remove
or changeelements settings in this layer through the
interfaces.
2. Layer: A module user interface configuration which only contains
customized user interface elements and user-defined ones.
All changes on user interface element settings are done on
this layer. This layer is the same as the document ui
configuration manager uses.
- Since
- OOo 2.0
|
| Methods' Summary |
| isDefaultSettings |
determine if the settings of a user interface element is part
of the default layer of the user interface configuration manager.
|
| getDefaultSettings |
retrieves the settings from the default layer of the user interface
configuration manager if it has a default layer.
|
| Methods' Details |
isDefaultSettings
- Description
- determine if the settings of a user interface element is part
of the default layer of the user interface configuration manager.
- Parameter ResourceURL
- a resource URL which identifies the user interface element. A
resourcce URL must meet the following syntax:
"private:resource/$type/$name. It is only allowed to use ascii
characters for type and name.
- Returns
- true if settings have been found in the default layer,
otherwise false.
|
|
getDefaultSettings
- Description
- retrieves the settings from the default layer of the user interface
configuration manager if it has a default layer.
- Parameter ResourceURL
- a resource URL which identifies the user interface element. A
resourcce URL must meet the following syntax:
"private:resource/$type/$name. It is only allowed to use ascii
characters for type and name.
- Returns
- true if default settings have been found in the default layer,
otherwise false.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


M.M. is supported by the AXA Research Fund Postdoctoral Fellowship Programme. J.R. received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 642147 (CD-LINKS) and grant agreement No. 641816 (CRESCENDO) and acknowledges support by the Oxford Martin School Visiting Fellowship Programme. C.-F.S. acknowledges support by the German Federal Ministry for the Environment, Nature Conservation and Nuclear Safety (16_II_148_Global_A_IMPACT).


Wave of polar air threatens Europe-wide cold snap
by Rafael CerecedaA fresh wave of cold polar air is set to hit Europe in early December, according to projections from the latest meteorological models.
It is caused by a sudden stratospheric warming that pushes cold air from the North Pole further south towards Europe — and could even reach parts of North Africa.
This sudden warming of the stratosphere around Siberia could also potentially destabilise the so-called polar vortex, a phenomenon that keeps cold air close to the Arctic Circle.
According to the above forecasts, the episode would be relatively fast-paced and would be followed by higher than normal temperatures for the wintry season in Europe.
In the meantime, another storm travelling in from the Atlantic can be expected this weekend.
Nicknamed Cecilia, the storm is expected to bring heavy rain, strong winds and waves to the Cantabrian and the Mediterranean in France and Spain.


Running aslprep via Docker containers¶
For every new version of aslprep that is released, a corresponding Docker image is generated. The Docker image becomes a container when the execution engine loads the image and adds an extra layer that makes it runnable. In order to run aslprep Docker images, the Docker Engine must be installed (see installation_docker).
If you used aslprep via Docker in the past, you might need to pull down a more recent version of the image:
$ docker pull pennlinc/aslprep:<latest-version>
You can run aslprep interacting directly with the Docker Engine via the docker run command line, or you can use a lightweight wrapper we created for convenience.
ref:usage), automatically translating directories into Docker mount points.
Running aslprep directly interacting with the Docker Engine¶
If you need a finer control over the container execution, or you feel comfortable with the Docker Engine, avoiding the extra software layer of the wrapper might be a good decision.
Accessing filesystems in the host within the container.
Containers are confined in a sandbox, so they can’t access the host in any ways unless
you explicitly prescribe acceptable accesses to the host.
The Docker Engine provides mounting filesystems into the container with the -v
argument
and the following syntax: -v some/path/in/host:/absolute/path/within/container:ro
,
where the trailing :ro
specifies that the mount is read-only.
The mount permissions modifiers can be omitted, which means the mount will have read-write
permissions.
In general, you’ll want to at least provide two mount-points: one set in read-only mode
for the input data and one read/write to store the outputs.
Potentially, you’ll want to provide one or two more mount-points: one for the working
directory, in case you need to debug some issue or reuse pre-cached results; and
a TemplateFlow folder to preempt the download of your favorite templates in every
run.
Running containers as a user.
By default, Docker will run the container as root.
Some share systems my limit this feature and only allow running containers as a user.
When the container is run as root, files written out to filesystems mounted from the
host will have the user id 1000
by default.
In other words, you’ll need to be able to run as root in the host to change permissions
or manage these files.
Alternatively, running as a user allows preempting these permissions issues.
It is possible to run as a user with the -u
argument.
In general, we will want to use the same user ID as the running user in the host to
ensure the ownership of files written during the container execution.
Therefore, you will generally run the container with -u $( id -u )
.

In other words, the first section of the command line is all equivalent to the aslprep
executable in a bare-metal installation:
$ docker run -ti --rm \ | These lines
-v $HOME/ds005:/data:ro \ | are equivalent
-v $HOME/ds005/derivatives:/out \ | to the aslprep
-v $HOME/tmp/ds005-workdir:/work \ | executable.
pennlinc/aslprep:<latest-version> \ |
\
/data /out/aslprep-<latest-version> \ | These lines
participant \ | correspond to
-w /work | aslprep arguments.


Import captcha module into your application
import { CaptchaModule } from '@sbb-esta/angular-public';
and you can use captcha component as see below.
Provides a query to make sure that a webpage interacts with a real user.
For forms that are accessible without login.

Basic example

<sbb-captcha (resolved)="resolved($event)"></sbb-captcha>
The captcha element has two states:
The captcha component also supports the following options:
response
parameter to send to the server for verification. If the captcha has expired prior to submitting its value to the server, the component will reset the captcha, and trigger the resolved event with response === null.reset() : Performs a manual captcha reset. This method might be useful if your form validation failed, and you need the user to re-enter the captcha.
execute() : Executes the invisible recaptcha. Does nothing if component's size is not set to "invisible".
Some properties as siteKey
, size
and others are globals. You can provide them at the module-level using the RECAPTCHA_SETTINGS provider as see below:
const globalSetting : RecaptchaSettings = { siteKey: '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI' }
and set it in the providers section of your module:
providers: [{provide: RECAPTCHA_SETTINGS, useValue: globalSetting }]
Captcha supports various languages. By default recaptcha will guess the user's language itself. But you can override this behavior and provide a specific language to use. You can set a specific language in your module in the providers section:
providers: [{provide: RECAPTCHA_LANGUAGE, useValue: 'fr',}]
[(ngModel)]
directive <form #captchaProtectedForm="ngForm">
<sbb-captcha [(ngModel)]="formModel.captcha"
name="captcha"
required
[siteKey]="testSiteKey"
#captchaControl="ngModel">
</sbb-captcha>
</form>
reactiveForm
<form [formGroup]="formCaptcha">
<sbb-captcha formControlName="captcha"
name="captcha"
[siteKey]="testSiteKey">
</sbb-captcha>
</form>