text:
Government help for Carlisle Lake District Airport is welcomed
By Tom Coleman @tomcoleman93 Local Democracy Reporter
FINANCIAL SUPPORT: Carlisle Lake District Airport, between Carlisle and Brampton, is to receive up to £8m in aid
Carlisle Lake District Airport has been promised up to £8m in Government funding to help its recovery in the face of the disruption caused by Covid-19.
As part of its efforts to support the ailing airline industry - one of the sectors particularly hard hit by the pandemic - the Government has pledged a fresh £100m to help airports find their feet in the wake of disruption caused by coronavirus.
Carlisle's airport will be one of the airports set to benefit from this, with a quoted top value of £8m.
The funding will be equivalent to the business rates that the airport would otherwise have to pay.
In total, the aviation and aerospace sectors have received more than £9bn in support from the Government since the pandemic began.
A spokeswoman for the Carlisle Lake District airport welcomed the Government support "during this challenging time.
"At this stage we await official confirmation and further detail, however it is anticipated any support would relate to business rates which are unlikely to amount to £8m.
"Nevertheless, we welcome any positive support for Carlisle Lake District Airport which recognises its value to the local and regional economy."
Carlisle City Council's portfolio holder for economy, enterprise and housing, Paul Nedved, said he was "delighted" that the Government had pledged to provide the airport with financial support, adding that it will "hopefully help to secure it's long term future".
"Carlisle Lake District Airport has a pivotal role to play in the economic and business growth of both the city and the wider hinterland. We look forward to a time when passenger flights can be restored, and the airport be a part of the commercial success of the region," he said.
The news comes just six weeks after the airport announced 16 job losses as a result of the impact Covid-19 had brought, something the owners said they were "reluctantly, but unavoidably" looking at.
Dr Neil Hudson, MP for Penrith and The Border, the constituency in which the airport sits, said that he hopes the new Government funding "marks a turning point for the airport – which is so important for our community.
"I will continue to work with stakeholders, colleagues and Government to support a viable future for our airport which has been hit so hard by this pandemic," he said.


text:
Judicial Watch • Bill de Blasio
N.Y. Mayor de Blasio Active Supporter of Brutal Communist Regime
Conservative group sues city, de Blasio over the mayor's interactions with South Africa ambassador
DECEMBER 22, 2016 | SOURCE: NEW YORK DAILY NEWS | SEE ALL IN THE NEWS »
From New York Daily News: Judicial Watch Inc. said it filed a formal request for "any and all records of communications" between the two men in June after the mayor said Gaspard was "an agent of the city" along with four other men who act as de Blasio's informal kitchen…
Sandinista Sympathizer Supports Iran Deal
JULY 16, 2015 | SOURCE: THE WASHINGTON FREE BEACON | SEE ALL IN THE NEWS »
The Iran nuclear agreement has one more supporter — liberal New York City Mayor Bill de Blasio. It's just one more poorly conceived statement of support by de Blasio for liberal policies.
'NYC aiding and abetting criminal activity'
JUNE 19, 2015 | SOURCE: WORLDNETDAILY | SEE ALL IN THE NEWS »
Judicial Watch President Tom Fitton was on Fox this week debating New York City's plan to provide official ID cards even to illegal immigrants that provide access to city services. Such a plan is rife with security and good government concerns.
DECEMBER 29, 2014 | SEE ALL CORRUPTION CHRONICLES »
With Bill de Blasio making headlines for fanning the flames of racial tension between police and protesters it's worth recalling newsworthy information about the New York City mayor's dark past; that he was an active supporter of a brutal communist regime well known as one of the worst human rights…
N.Y.'s New Mayor Active Supporter of Brutal Communist Regime
The new mayor of New York City (Bill de Blasio) was an active supporter of a brutal communist regime well known as one of the worst human rights abusers in Latin America, according to documents obtained by Judicial Watch. It's not information likely to be featured in the mainstream media,…
Jill Farrell
Director of Public Affairs
(202) 646-5172 (x305)
media/at/judicialwatch.org
development/at/judicialwatch.org

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Trasform a Dataframe 6x3 in a special array 9x2, choose the element of dataframe to store in an array from pandas import DataFrame
import numpy as np

Data={'First':[1,2,3,4,5,5],'Second':[6,7,8,9,10,4],'Third':[0,1,0,1,0,100]}
df=DataFrame(Data,columns=['First','Second','Third'])

Here there is an example of dataframe. The result that I want to store is:
array([[  1,   4],
       [  6,   9],
       [  0,   1],
       [  2,   5],
       [  7,  10],
       [  1,   0],
       [  3,   5],
       [  8,   4],
       [  0, 100]])

I'd like to choose the number of rows and columns of the array, using for example a for cycle. The script will be able to read each element of dataframe, for 2 or 3 rows, to store in a column of an array, then to restart from the last element +1 of dataframe, and to store in a second column of an array.
Thanks

A: breaking the array into two, using np.flatten to convert the 2D arrays into 1D, np.newaxis to increase the dimension and then using np.hstackto stack them horizontally
np.hstack((df[:3].values.flatten()[np.newaxis].T,df[3:].values.flatten()[np.newaxis].T))

Output
array([[  1,   4],
       [  6,   9],
       [  0,   1],
       [  2,   5],
       [  7,  10],
       [  1,   0],
       [  3,   5],
       [  8,   4],
       [  0, 100]], dtype=int64)

A: You can just reshape and transpose the values:
np.transpose(df.values.reshape(2,9))

or with a nicer syntax (thanks to @AndyL. for noticing):
df.values.reshape(2,-1).T

gives:
array([[  1,   4],
       [  6,   9],
       [  0,   1],
       [  2,   5],
       [  7,  10],
       [  1,   0],
       [  3,   5],
       [  8,   4],
       [  0, 100]], dtype=int64)

redpajama_set_name: RedPajamaStackExchange


text:
Q: Is there a way to make a circle cover up another circle inside when I shrink the outer circle I'm trying to make an eye because why not, so I am trying to make a blinking animation.
Instead of closing the "eyelid" circle, I have chosen to shrink sclera (white bit) along the y-axis so it looks like the eye is closing.
Now I am adding the colored cornea in the center, but when I try to shrink the cornea when the yvalues of the sclera and cornea meet, the cornea looks weird like it is being squished.
Is the any method that would make it so that when I shrink the sclera-circle, the cornea circle would disappear when the bounds of the outer circle are smaller than the inner circle?
Basically like what happens when you resize a JPanel to be smaller than the components. They just disappear under the border of the frame rather than appear outside it.
Code:
class for panel:
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.Timer;

public class EyePanel extends JPanel implements ActionListener{

    private int width;
    private int height;

    private int timeStep = 10;

    private Timer timer;
    private Random random;

    Eye eye;

    EyePanel(int width, int height){
        this.width = width;
        this.height = height;

        eye = new Eye(width, height, timeStep);

        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        this.setPreferredSize(new Dimension(width, height));

        frame.add(this);
        frame.pack();
        frame.setResizable(false);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);

        timer = new Timer(timeStep, this);
        random = new Random();

        timer.start();
    }

    public void paintComponent(Graphics g) {
        super.paintComponent(g);

        this.setBackground(new Color(255,255,255));

        draw(g);
    }

    public void draw(Graphics g) {
        eye.draw(g);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        repaint();
    }
}

class for eye:
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.*;
import javax.swing.*;

public class Eye {

    private int width;
    private int height;
    private int timeStep;
    private int lidDiameter;
    private int sclDiameter;
    private int corDiameter;

    //lid coordinates
    private int lidX;
    private int lidY;

    //sclera coordinates
    private int sclX;
    private int sclY;
    private int sclU;           //upper level
    private int sclB;           //bottom level
    private int sclC;           //y-level at which eyes are closed

    //cornea coordinates
    private int corX;
    private int corY;
    private int corU;           //upper level
    private int corB;           //bottom level
    private int corC;           //y-level at which eyes are closed

    private int blinkDelay = 3; //delay in seconds preset
    private int blinkTime;      //time till next blink
    private int rate = 20;          //rate of eye close&open

    private boolean closed = false;

    Eye(int width, int height, int timeStep){
        this.width = width;
        this.height = height;
        this.timeStep = timeStep;

        blinkTime = blinkDelay*(1000/timeStep);

        //setup eye variables
        if(width>height)        lidDiameter = height - (height/10);
        else if(height>width)   lidDiameter = width - (width/10);
        else                    lidDiameter = width - (height/10);

        sclDiameter = lidDiameter-(lidDiameter/10);
        corDiameter = sclDiameter/3;

        //lid location
        lidX = (int)((width-lidDiameter)/2);
        lidY = (int)((height-lidDiameter)/2);
        //lid location

        //sclera location
        sclX = (int)(lidX + (lidDiameter-sclDiameter)/2);
        sclY = (int)(lidY + (lidDiameter-sclDiameter)/2);
        sclU = sclY;
        sclB = sclDiameter;
        sclC = (int)(sclY+sclDiameter/2);
        //sclera location

        //cornea location
        corX = (int)(sclX + (sclDiameter-corDiameter)/10);
        corY = (int)(sclY + (sclDiameter-corDiameter)/10);
        corU = corY;
        corB = corDiameter;
        corC = (int)(corY+corDiameter/2);
        //cornea location

        //setup eye variables
    }

    public void close() {
        if(sclU != sclC)
            sclU+= rate;

        if(sclB != sclC)
            sclB-= rate*2;          //bottom limit must rise by (required amt + rate of upper limit fall)

        if(sclU >= sclC && sclB <= sclC)
            closed = true;
    }

    public void open() {
        if(sclU != sclY)
            sclU+= -rate;

        if(sclB != sclDiameter)
            sclB-= -rate*2;         //bottom limit must rise by (required amt + rate of upper limit fall)

        if(sclU == sclY && sclB == sclDiameter) {
            closed = false;
            blinkTime = blinkDelay*(1000/timeStep);
        }
    }

    public void blink() {
        if(blinkTime == 0) {
            if(!closed)
                close();
            if(closed)
                open();
        }
        else
            blinkTime--;
    }

    public void draw (Graphics g) {
        Graphics2D g2d = (Graphics2D) g;

        //eyelid
        g2d.setColor(Color.pink);
        g2d.fillOval(lidX, lidY, lidDiameter, lidDiameter);

        //sclera
        g2d.setColor(Color.white);
        g2d.fillOval(sclX, sclU, sclDiameter, sclB);

        g2d.setColor(Color.black);
        g2d.drawLine(sclX, sclC, sclX + sclDiameter, sclC);

        //cornea
        g2d.setColor(Color.cyan);
        g2d.fillOval(corX, corU, corDiameter, corB);

        g2d.setColor(Color.red);
        g2d.drawLine(corX, corC, corX + corDiameter, corC);

        //trigger blink
        blink();
    }
}

Main class that starts everything:
public class Main {

    public static void main(String[] args) {
        new EyePanel(600, 600);
    }
}

A: Under no circumstances should a painting method call any form of logic that alters object state.  Painting is triggered by system events and you have very little control over its timing.  (Examples of such events are a user moving the window, lowering or raising the window, deiconifying the window, unlocking the screen, and even moving the mouse over the window.)
So, the first thing you want to do is remove this from the Eye class:
//trigger blink
blink();

…and add it to your actionPerformed method:
@Override
public void actionPerformed(ActionEvent e) {
    eye.blink();
    repaint();
}

Nearly all Swing methods and constructors must be run on the AWT event dispatch thread, so change your main method to do that:
public static void main(String[] args) {
    EventQueue.invokeLater(() -> new EyePanel(600, 600));
}

Your code doesn't do exactly what you claim (the cornea/iris is not in the center), but I think your question is answerable.  The Area class can be used to check whether shapes intersect:
public void draw (Graphics g) {
    Graphics2D g2d = (Graphics2D) g;

    //eyelid
    g2d.setColor(Color.pink);
    g2d.fillOval(lidX, lidY, lidDiameter, lidDiameter);

    //sclera
    Area sclera = new Area(
        new Ellipse2D.Float(sclX, sclU, sclDiameter, sclB));
    g2d.setColor(Color.white);
    g2d.fill(sclera);

    g2d.setColor(Color.black);
    g2d.drawLine(sclX, sclC, sclX + sclDiameter, sclC);

    //cornea
    Area cornea = new Area(
        new Ellipse2D.Float(corX, corU, corDiameter, corB));
    Area hiddenCornea = (Area) cornea.clone();
    hiddenCornea.subtract(sclera);
    if (hiddenCornea.isEmpty()) {
        g2d.setColor(Color.cyan);
        g2d.fill(cornea);

        g2d.setColor(Color.red);
        g2d.drawLine(corX, corC, corX + corDiameter, corC);
    }
}

This will skip drawing the cornea if any part of the cornea is hidden (does not intersect the sclera).


The DNS feature included in Danube Cloud enables a simple management of DNS domains and records.
In the upper right corner is a button labeled Show All, which can be used to display all domains, including domains that are not associated with the current working virtual data center.
Name - DNS domain name.
Public - DNS domain is usable by all users in this virtual data center.
Private - DNS domain is usable by SuperAdmins, DCAdmins, and owners of this domain.
MASTER - PowerDNS will use DNS protocol messages to communicate changes with slaves.
NATIVE - PowerDNS will use database replication between master DNS server and slave DNS servers.
Owner - DNS domain owner.
DC-bound? - Whether a DNS domain is bound to a specific virtual data center.
Records - Number of DNS records within a DNS domain and a link to DNS record management (read-only).
A DNS domain can be created, updated and deleted only by a SuperAdmin.
The default DNS domain (VMS_VM_DOMAIN_DEFAULT) cannot be deleted.
Used for associating an existing domain with a virtual data center. Can be performed only by a SuperAdmin.
A DNS domain can be only used when attached to a virtual data center.
Used for removing an association of a domain with a virtual data center. Can be performed only by a SuperAdmin.
Name - The name of the DNS record - the full URI the DNS server should pick up on.
Type - DNS record type. One of: A, AAAA, CERT, CNAME, HINFO, KEY, LOC, MX, NAPTR, NS, PTR, RP, SOA, SPF, SSHFP, SRV, TLSA, TXT.
Content - DNS record content - the answer to the DNS query.
TTL - How long (seconds) the DNS client is allowed to remember this record.
Enabled - If set to false, this record is hidden from DNS clients.
Changed - The date and time when the record was last changed (read-only).
Custom DNS records can be created, updated or removed by a SuperAdmin or by a DnsAdmin (DC-bound domain only).