## Best way to divide CPU along all sql instances on 1 server

I have a physical server with 40 CPU’s (hyperthreaded) with 2 numa nodes. On this server i have 20 sql instances installed and i need to make sure each sql instance have some dedicated cpu assigned into. The problem is that sometimes one or more of the instances are using all of the cpu’s and then about 4 or 5 instances are out of CPU resources and failing. What is the best way to spread cpu along all of the instances so each instance have some at the minimum?

Thank you

## print order attachment along with the invoie

can you tell me how I can print all custom attributes an order has programatically? and the file to edit the code, i have tried object manager, sales

## Batch retrieve formatted address along with geometry (lat/long) and output to csv

I have a csv file with 3 fields, two of which are of my interest, Merchant_Name and City.
My goal was to output multiple csv files each with 6 fields, Merchant_Name, City, name, formatted_address, latitude, longitude.

For example, if one entry of the csv is Starbucks, Chicago, I want the output csv to contain all the information in the 6 fields (as mentioned above) like so-
Starbucks, Chicago, Starbucks, "200 S Michigan Ave, Chicago, IL 60604, USA", 41.8164613, -87.8127855,
Starbucks, Chicago, Starbucks, "8 N Michigan Ave, Chicago, IL 60602, USA", 41.8164613, -87.8127855
and so on for the rest of the results.

For this, I used Text Search request of Google Maps Places API. Here is what I wrote.

import pandas as pd # import googlemaps import requests # import csv # import pprint as pp from time import sleep import random   def search_output(search):     if len(data['results']) == 0:         print('No results found for {}.'.format(search))      else:          # Create csv file         filename = search + '.csv'         f = open(filename, "w")          size_of_json = len(data['results'])          # Get next page token         # if size_of_json = 20:             # next_page = data['next_page_token']          for i in range(size_of_json):             name = data['results'][i]['name']             address = data['results'][i]['formatted_address']             latitude = data['results'][i]['geometry']['location']['lat']             longitude = data['results'][i]['geometry']['location']['lng']              f.write(name.replace(',', '') + ',' + address.replace(',', '') + ',' + str(latitude) + ',' + str(longitude) + '\n')          f.close()          print('File successfully saved for "{}".'.format(search))          sleep(random.randint(120, 150))   API_KEY = 'your_key_here'  PLACES_URL = 'https://maps.googleapis.com/maps/api/place/textsearch/json?'   # Make dataframe df = pd.read_csv('merchant.csv', usecols=[0, 1])  # Construct search query search_query = df['Merchant_Name'].astype(str) + ' ' + df['City'] search_query = search_query.str.replace(' ', '+')  random.seed()  for search in search_query:     search_req = 'query={}&key={}'.format(search, API_KEY)     request = PLACES_URL + search_req      # Place request and store data in 'data'     result = requests.get(request)     data = result.json()      status = data['status']      if status == 'OK':         search_output(search)     elif status == 'ZERO_RESULTS':         print('Zero results for "{}". Moving on..'.format(search))         sleep(random.randint(120, 150))     elif status == 'OVER_QUERY_LIMIT':         print('Hit query limit! Try after a while. Could not complete "{}".'.format(search))         break     else:         print(status)         print('^ Status not okay, try again. Failed to complete "{}".'.format(search))         break 

I want to implement next page token but cannot think of a way which woudn’t make it all a mess. Another thing I wish to improve is my csv writing block. And dealing with redundancy.
I further plan to concatenate all the csv files into one(but still keeping the original separate files).

Please note that I’m new to programming, in fact this is actually one of my first programs to achieve something. So please elaborate a bit more when need be. Thanks!

## “A.I.” controlling left paddle makes it teleport along the y axis. (Python)

Is there any way to make the paddle on the left not jump? My “A.I.” on the left makes the y coordinate of the left paddle change at every horizontal impact, so it makes the paddle jump. Is there any way to make the paddle move towards the point, and not jump to it? Here it is:

 import turtle import time import random  sc = turtle.Screen() sc.bgcolor("black") sc.reset()  sc.screensize(1000,560) sc.tracer(0)  # Creation des mannettes  mannette1 = turtle.Turtle() mannette1.pu() mannette1.shape("square") mannette1.shapesize(10,1) mannette1.color("white") mannette1.setx(940)  mannette2 = turtle.Turtle() mannette2.pu() mannette2.shape("square") mannette2.shapesize(10,1) mannette2.color("white") mannette2.setx(-947)  # Creation de la balle  balle = turtle.Turtle() balle.pu() balle.shape("circle") balle.color("white")  # Fonctions et definitions  movx = 2 movy = 0  # Jeu  while True:      sc.update()      # Ordinateur #1      rand1 = random.randrange(-14,14)     rand3 = random.uniform(-10,10)     mannette1_velocity = rand1/80      mannette1.sety(balle.ycor())      if mannette1.ycor() > 405:         mannette1.sety(404)      if mannette1.ycor() < -395:         mannette1.sety(-394)      # Ordinateur #2      rand2 = random.randrange(-14,14)     mannette2_velocity = rand2/80      dist = (balle.xcor()+940)/rand3      mannette2.sety(balle.ycor()-dist)      if mannette2.ycor() > 405:         mannette2.sety(404)      if mannette2.ycor() < -395:         mannette2.sety(-394)      # Mouvement de la balle      yvel = balle.ycor()+movy     xvel = balle.xcor()+movx     balle.sety(yvel)     balle.setx(xvel)      # Rebondissement de la balle: Plafond et Plancher      if balle.ycor() > 495:         balle.sety(495)         movy = movy*-1      if balle.ycor() < -490:         balle.sety(-490)         movy = movy*-1      # Mannette out of bounds verification      if mannette1.xcor() != 940:         mannette1.setx(940)     if mannette2.xcor() != -947:         mannette2.setx(-947)      # Courbure de la balle: Mannette1      if mannette1_velocity != 0:         if balle.xcor() > 920 and balle.xcor() < 935 and balle.ycor() < mannette1.ycor()+110 and balle.ycor() > mannette1.ycor()-110:             balle.setx(920)             movx = movx * -1             rand3 = random.uniform(-10,10)             # Pour que la balle va dans la direction du "velocity" de la mannette.              if mannette1_velocity < 0:                 movy = -1             if mannette1_velocity > 0:                 movy = 1              while not (balle.xcor() < -927 and balle.xcor() > -935 and balle.ycor() < mannette2.ycor()+1100 and balle.ycor() > mannette2.ycor()-1100):                 time.sleep(0.00000005)                 sc.update()                  # Ordinateur                  dist = (balle.xcor()+940)/rand3                  mannette2.sety(balle.ycor()-dist)                  if mannette2.ycor() > 405:                     mannette2.sety(404)                  if mannette2.ycor() < -395:                     mannette2.sety(-394)                  if mannette1.ycor() < 405 and mannette2.ycor() > -395:                     mannette1.sety(balle.ycor())                  if mannette1.ycor() > 405:                     mannette1.sety(404)                  if mannette1.ycor() < -395:                     mannette1.sety(-394)                  # Mouvement de la balle                  movy = movy-mannette1_velocity/100                  yvel = balle.ycor()+movy                 xvel = balle.xcor()+movx                 balle.sety(yvel)                 balle.setx(xvel)                  # Rebondissement de la balle: Plafond et Plancher                  if balle.ycor() > 495:                     balle.sety(495)                     movy = movy*-1                  if balle.ycor() < -490:                     balle.sety(-490)                     movy = movy*-1                  # Pour que les mannettes restes dans leurs axe                    if mannette1.xcor() != 940:                     mannette1.setx(940)                 if mannette2.xcor() != -947:                     mannette2.setx(-947)                  # Mannette out of bounds check                  if mannette1.ycor() > 405:                     mannette1.sety(404)                  if mannette1.ycor() < -395:                     mannette1.sety(-394)                  if mannette2.ycor() > 405:                     mannette2.sety(404)                  if mannette2.ycor() < -395:                     mannette2.sety(-394)                  # Rebondissement de la balle: Ouest et Est                  if balle.xcor() > 999 or balle.xcor() < -999:                     mannette1.sety(0)                     break      # Courbure de la balle: Mannette2      if mannette2_velocity != 0:         if balle.xcor() < -927 and balle.xcor() > -935 and balle.ycor() < mannette2.ycor()+1100 and balle.ycor() > mannette2.ycor()-1100:             balle.setx(-927)             movx = movx * -1             rand3 = random.uniform(-10,10)             # Pour que la balle va dans la direction du "velocity" de la mannette.              if mannette2_velocity < 0:                 movy = -1             if mannette2_velocity > 0:                 movy = 1              while not (balle.xcor() > 920 and balle.xcor() < 935 and balle.ycor() < mannette1.ycor()+110 and balle.ycor() > mannette1.ycor()-110):                 time.sleep(0.00000005)                 sc.update()                  # Ordinateur                  dist = (balle.xcor()+940)/rand3                  mannette2.sety(balle.ycor()-dist)                  if mannette2.ycor() > 405:                     mannette2.sety(404)                  if mannette2.ycor() < -395:                     mannette2.sety(-394)                  if mannette1.ycor() < 405 and mannette2.ycor() > -395:                     mannette1.sety(balle.ycor())                  if mannette1.ycor() > 405:                     mannette1.sety(404)                  if mannette1.ycor() < -395:                     mannette1.sety(-394)                  # Mouvement de la balle                  movy = movy-mannette2_velocity/100                  yvel = balle.ycor()+movy                 xvel = balle.xcor()+movx                 balle.sety(yvel)                 balle.setx(xvel)                  # Rebondissement de la balle: Plafond et Plancher                  if balle.ycor() > 495:                     balle.sety(495)                     movy = movy*-1                  if balle.ycor() < -490:                     balle.sety(-490)                     movy = movy*-1                  # Pour que les mannettes restes dans leurs axe                    if mannette1.xcor() != 940:                     mannette1.setx(940)                 if mannette2.xcor() != -947:                     mannette2.setx(-947)                  # Mannette out of bounds check                  if mannette1.ycor() > 405:                     mannette1.sety(404)                  if mannette1.ycor() < -395:                     mannette1.sety(-394)                  if mannette2.ycor() > 405:                     mannette2.sety(404)                  if mannette2.ycor() < -395:                     mannette2.sety(-394)                  # Rebondissement de la balle: Ouest et Est                  if balle.xcor() > 999 or balle.xcor() < -999:                     mannette1.sety(0)                     break  $$$$  

## Applying UK visa along with my husband and my husband sponsoring my trip

We have already filled the UK visa application form and done with our biometrics. I wanted to know if we can send documents together? In the above thread i read we need to menton GWF numbers of dependents in the remarks where exactly is that to be done ? What if we havent added anything like that in the remarks is there any alternative option to that?

## Projection of a polytope along 4 orthogonal axes

Consider the following problem:

Given an $$\mathcal{H}$$-polytope $$P$$ in $$\mathbb{R}^d$$ and $$4$$ orthogonal vectors $$v_1, …, v_4 \in \mathbb{R}^d$$, compute the projection of $$P$$ to the subspace generated by $$v_1, …, v_4$$ (and ouput it as an $$\mathcal{H}$$-polytope).

I know that the problem of computing projections along $$k$$ orthogonal vectors in NP-hard (if $$k$$ and $$d$$ are part of the input), as shown in this paper. But does it help if $$k$$ is a constant? Specifically, does it help if $$k \leq 4$$? Do we have a polynomial algorithm in this case?

## How to auto update linux-modules-extra along with latest version of kernel

Our servers are updated to latest kernel version using ubuntu auto updates(unattended-upgrades).

However, linux-modules-extra is not upgraded along with the new kernel package.

Is there any way to update linux-modules-extra along with the kernel package?

## How to do permutation of characters and print it horizontally along that row in Google Sheets?

I am stuck here in printing permutation of two or more characters horizontally along that row in which the characters are. Is it possible? Because I searched it all over and only found vertical output along the column.

I have to make permutations of different people from different community and create their user names. The below is what I get after entering my formula

Here is the code:

function permuteEmails(a,b,c) {   var ssheet = SpreadsheetApp.getActive();   var sheet = ssheet.getSheetByName('Person Details');   var array = [];    var aVal = sheet.getRange(a).getDisplayValue();   var bVal = sheet.getRange(b).getDisplayValue();   var cVal = sheet.getRange(c).getDisplayValue();    var aVal_first = aVal.slice(0,1);   var bVal_first = bVal.slice(0,1);    array.push(aVal + "." + bVal + "@" + cVal);   array.push(bVal + "." + aVal + "@" + cVal);   array.push(aVal + "@" + cVal);   array.push(aVal + "." + bVal_first + "@" + cVal);   array.push(aVal + bVal_first + "@" + cVal);   array.push(aVal_first + bVal + "@" + cVal);    return array; } `

But I want it to look like, that after entering the details and applying the formula, all the combinations should print along the same row in which we entered the details.

## Leafwise de Rham cohomology(A true definition of Differential forms along leaves)

For a foliated space $$(M, \mathcal{F})$$, one associate a leafwise de Rham cohomology. This cohomology and trace class operators on this cohomology and trace interpretations for closed orbits of certain flow on $$M$$ is the main object of this paper”Number theory and dynamical system of foliated manifolds.

But in the later paper, I did not find a very precise definition of “Differential forms along leaf”.

So I try to find other papers or talk to find a precise definition for this concept. Then I found a definition at page 8 of this talk “Lefschetz trace formula for flow on foliated manifolds” which give a local representation for such forms. But my problem is the following:

I think that such representation, which is quoted below, is NOT invariant under foliation charts:

$$\omega\sum_{\alpha_1<\alpha_2<\ldots<\alpha_k} a_{\alpha}(x,y) dx_{\alpha_1}\wedge dx_{\alpha_2}\wedge \ldots\wedge dx_{\alpha_k}$$

Am I mistaken?

What is a precise definition and precise local representations of “Differential forms along leaves”?