## Dissatisfaction towards or with or to?

If I have some complains about someone, should I use “dissatisfaction towards/with/to”?
I look at the usage here http://sentence.yourdictionary.com/dissatisfaction and I see so many versions and am wondering if there’s any difference?

All topic

## Expanding a depth array with equal increments towards zero

I have various dataframes, each has a different depth range.

For a more complex computation (this is a fragment of a question posted here: Curve fitting for each column in Pandas + extrapolate values),
I need to write a function, so it would expand the depth column / array for equal increments `dz` (in this case 0.5) towards zero (surface).
Here the missing quotas are 0.15, 0.65 and 1.15

``````import numpy as np

depth = np.array([1.65, 2.15, 2.65, 3.15, 3.65, 4.15, 4.65, 5.15, 5.65, 6.15, 6.65, 7.15, 7.65, 8.15, 8.65])
``````

Any ideas how to write a function so it does it each time for a different depth range ( i.e. depending on the varying minimum value)?

For now I do something very basic such as:

``````depth_list = depth.tolist()
missing_vals = [0.15, 0.65, 1.15]
depth_tot = missing_vals + depth_list
``````

But I’d like to figure out how to get the code to read the minimum value of `depth` and then accordingly find the other missing values per `dz`.

Any ideas?

All topic

## What are the exact steps towards remapping the Japanese keys on a Japanese keyboard in xkb?

I am trying to remap the keys found on a Japanese keyboard to be Alt, Super, Return, and Shift. Here is a good description of the kind of keyboard I’m using. (I am actually using a Filco Majestouch 2 TKL Japanese keyboard). The idea is to have a perfectly normal English keyboard where the extra keys under the thumbs are remapped to Alt, Return, etc. I am doing this using xkb under Ubuntu.

The keyboard’s bottom row looks like this:

````        ````
``````

I’d like it to look like this:

````       ````
``````

Remapping `LWIN`, `LALT`, `RALT`, and `MENU` worked, but remapping `MUHE`, `HENK`, and `HKTG` hasn’t.

On top of this I tried remapping `AB11` to `Shift_R` and `AE13` to `BackSpace`. The result is that `AB11` does nothing just like `MUHE`, `HENK`, and `HKTG`, but `AE13` did get remapped to `BackSpace` and works as intended.

Until now I’ve been using the `basic` keycodes defined (as I understand) in `/usr/share/X11/xkb/keycodes/xfree86`. Because of this, my keyboard layout’s symbols file started like this:

``````default
xkb_symbols "basic" {
``````

Since `MUHE`, `HENK`, `HKTG`, `AB11`, and `AE13` are defined in `/usr/share/X11/xkb/keycodes/evdev`, I assumed I should change that to `evdev`, but that did not help:

``````default
xkb_symbols "evdev" {
``````

Is there anything else I need to do in order to use `MUHE` etc? Do I need to ensure some other part of the input system uses evdev? I am not sure how to do that. I am on Ubuntu 14.04 32-bit, but the same behavior happens on 18.04 64-bit.

Here is the full code I use to remap those keys (I omitted unrelated parts of the layout):
default
xkb_symbols “evdev” {
// Swap Caps Lock and Escape.
key { [ Escape ] };
// key { [ Caps_Lock ] };
key { type[Group1]=”TWO_LEVEL”, [ Multi_key, Multi_key ] };

``````    key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Alt_L ]
};

key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Super_L ]
};

key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Alt_L ]
};
// placeholder for

key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Alt_R ]
};

key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Return ]
};

key  {
type[Group1]="ONE_LEVEL",
};

key `````` {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Alt_R ]
};

// LSGT is the extra key in the European layout that is found between the
// left Shift and Z.
key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Super_L ]
};

// Japanese keyboard bottom row:
//         ``````
// Desired bottom row:
//        ``````

// Other extra Japanese keys:

// Between / and right shift:
key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        Shift_R ]
};

// Between = and Backspace:
key  {
type[Group1]="ONE_LEVEL",
symbols[Group1]=[        BackSpace ]
};

// Modifier numbers:
// Mod1 = Alt
// Mod2 = Num_Lock
// Mod4 = Super
// Mod5 = ISO Level3 Shift
// Shift = Shift

//  is Shift
modifier_map Shift { Shift_L, Shift_R };
//  is Super,  is Super too
modifier_map Mod4 { Super_L, Super_R };
// `````` is Alt,  is Alt too
modifier_map Mod1 { Alt_L, Alt_R };
// we map a bunch of keys to ISO Level3 Shift
modifier_map Mod5 { ISO_Level3_Shift };
};
``````

All topic

## MCMC combined with numerical integration towards more efficient Bayesian inference

I am quite new to Bayesian statistics so the question can be a bit naive.

My question is on how to deal with a model with individual coefficients. Simple versions of a task and a model I deal with is bellow.

Let there are customers that visit our company from time to time. We are interested in modeling the inter-visit time intervals.

The intervals follow the gamma distribution:
$$t_{ij} sim mathtt{gamma}(k,theta),$$
where $$i$$ is the customer number and $$j$$ the time interval number for the customer $$i$$ with $$k sim N(0,10)$$.

However we also assume that customers are heterogeneous, which means that every customer has its own individual parameter $$theta_i$$ and, in fact, we have the following model:
$$t_{ij} sim mathtt{gamma}(k,theta_i),$$
where $$theta_i$$ comes from the inverse gamma distribution:
$$frac{1}{theta_i} sim mathtt{gamma}(nu,sigma),$$ with $$nu,sigma sim N(0,10)$$. Thus, the model has 3 parameters: $$k,nu, sigma$$.

The question is how to encode this model (in particular in stan) for efficient inference? The number of observations is high, e.g. 10000+.

The first option is to encode it straightforward and allow MCMC sample a large space including $$theta_i$$ for every customer. However, it is at least slow and looks like the number of iteration in MCMC should be high.

Would it be correct to remove $$theta_i$$ from the sampling space and substitute it with numerical integration for computing the target log likelihood as follows:
$$t_{ij} sim int mathtt{gamma}(k,theta)mathtt{gamma}left(frac{1}{theta} | nu,sigmaright)d{theta},$$
where the integral can be computed by taken for example just 1000 (instead of 10000+) points of $$theta^{(i)}$$ (given $$nu$$ and $$sigma$$) that are not included into the MCMC sampling space.

PS: If “model with individual coefficients” is an incorrect term, I would be grateful to know the correct one, since the correct terms dramatically increase the search possibilities.

All topic

## Work for bringing a charge towards an infinite charged plane

I came through a text which reads that

work done to bring a positive charge q from infinity to a distance d
in presence of an infinite plane of surface charge density sigma
varies and depends whether the infinite plane is conducting or non –
conducting

So the answer depends on the conductivity of the infinite plane. Why is this so?

All topic

## Book trilogy where adults walk towards towers involuntarily at a certain age

The books contain such plots:

• All adults above a certain age succumb to some static they hear and their eyes turn fully black and walk towards these ‘towers’; there are adults who are immune to the call, they are called ‘immunes’ I think.

• The male protagonist is one such person.

• In the world exists aliens and artefacts, which come from an area that is separated into different tiers (depending on how close the ring is to the centre of the ‘shattered tower’), different items matched together can create different metaphysical properties.

• The protagonist saves a girl who can manifest superhuman powers under stress. In the third book it is revealed she is the culmination of the souls of the people in a city who died when an alien ship crashed into it and the ‘shattered tower’ is the remains of the ship whose ‘quantum drive or something like that’ as an engine exploded, causing the area to defy the laws of physics.

• The second book is named after a city in the trilogy where hunters gather and trade black market ‘artifacts’.

• The ‘towers’ consist of aliens who are trying to ascend into some golden light form thing, they are using the enslaved humans to merge with their mind and to ascend, the spaceship which became the ‘shattered tower’ is one of many which brings these aliens here.

• The protagonist built and hid an artefact which would accelerate the rate at which a person succumbs to the static and can even affect an immune person. The girl is able to cure people suffering from the static.

• A group of rebel aliens split from the main faction and aid the girl (and the main characters) in their quest.

• The aliens’ true form is light/crystals, they travel in mechanoids.

All topic

## Man awaken from suspended animation to stop an asteroid heading towards Earth, which turns out to be a space craft from the past

This story was from a Sci Fi TV episode in the 1980’s or 90’s, but I cannot remember exactly when or from where.

A man is awaken from suspended animation to a post-apocalyptic society facing an inbound asteroid threatening the world. He was awakened by the leaders of this world because he has knowledge of a long past space defense system (still in orbit) that could destroy the inbound asteroid and is asked to help them.

The man learns that the new society has emerged from a post-nuclear war and has resorted to an environmental friendly technology shunning the pasts use of destructive technology; the new environmental technology includes embryonic animals who “choose” to become computer-like intelligence. One of these embryonic computers shows the man the inbound asteroid.

Anyway, when the time comes to destroy the asteroid, the man activates the relic defense system, but telemetry data of the asteroid shows its slowing down and is taking an orbital path around Earth.

The man is dismayed to realize the asteroid is a space ship and that the embryonic computers concealed this fact from him so that he would destroy what is actually a ship from his past. He watches in horror as the orbital defense system activates on the ship obliterating it before it could land (once activated it could not be stopped).

The new leaders explains to him that the ship had people from his past who originally were responsible for the nuclear holocaust, and who had escaped its devastation by leaving Earth on a ship traveling at relativistic speeds. It had politicians, military generals, top CEO’s and other elitists on board. It even had nuclear weapons with them, and the new leaders were fearful had they landed it would end their new society.

The story ends with the man feeling remorseful that humans never ascended the stars but the embryonic computers shows him this new society actually had explored the many wonders of the universe he thought were unreachable.

This was an episode featured on a show like “Amazing Stories,” but I could not find a match to the plot description. Anyone have any idea on what show this story had appeared in?

All topic

## How to make an object “move towards” another object

I have my camera tracking an empty and copying its movements. i want the empty to move to a button when it is clicked on, but i dont want the empty to turn at all while moving. just move straight at the other object. I had some basic java “training” with Alice and there it would have been as easy as saying move towards object for some duration or move to an object, but looking up the right command in python is something im still struggling in. i can make the empty move in coordinates or face the object and then move, but thats not what im looking for. This is in the Game Engine and i was looking in game logic. (bge.logic)

All topic

## Is it possible to have hair particles [people] face towards a target

I have set up a particle system based on a group of people that I would like to face towards a target.

I know I can play with the rotation of the whole system and randomize, but global rotation doesn’t quite work if the target were to be in the center of the particle system.

Also, I know that I can bake the particles and add a track-to-constraint, but baking thousands of high poly meshes would make the file unusable. So, looking to see if there is a way to keep the particle system and orient towards a target.

Here are the particle settings that I am using

All topic

## Proving some iterated function converge towards any power of two

I need to learn how to prove that any initial number $$n$$ converge towards a power of two number $$2^x$$ with simple examples. $$x$$ can be anything (so any pow$$2$$ suffice).

Example 1

Say $$f(n) = 2n+1$$

$$n=1,$$ $$f(n)=3rightarrow7rightarrow15rightarrow31rightarrow63rightarrow127$$

$$n=1$$ does not seem to converge so for $$2n+1$$ this conjecture seem to be false.

Example 2

What if $$f(n) = 3n+1$$ ?

$$n=1,$$ $$f(n)=4rightarrow13rightarrow40rightarrow121rightarrow364rightarrow1093rightarrow3280rightarrow9841rightarrow29524rightarrow88573rightarrow265720rightarrow797161rightarrow2391484rightarrow7174453rightarrow etc…$$ not sure how to go further the numbers will get quite big.

Example 3

If $$f(n)=n+1$$ it will of course converge to a pow2 number, but how do we prove it in math?

All topic