text:
Cowboys face change in 2020
by: Adam Bradshaw
(AP Photo/Michael Owen Baker)
FRISCO, Texas (AP) — With the future of coach Jason Garrett in limbo, the Dallas Cowboys have other reasons to believe there will be plenty of change in 2020 — 23 of them, to be exact.
The Cowboys have 23 unrestricted free agents-to-be, headlined by quarterback Dak Prescott and No. 1 receiver Amari Cooper, after finishing 8-8 and missing the playoffs in a season that started with lofty expectations.
There was no word by late afternoon Monday from owner Jerry Jones on whether Garrett would return for a 10th full season. Garrett has an expiring contract, and after missing the postseason in six of those nine years, his owner and general manager has a difficult sell for fans on keeping him.
"In reflection, I'm very fortunate to have spent the time that I did with coach Garrett," seven-year center Travis Frederick said Monday in a locker room dotted with large plastic bags holding players' belongings. "Whether he's here next year or somewhere else next year, the group of men that he's going to be in front of will be better men and better players because of it."
Prescott and Cooper almost certainly will be on the Dallas roster next season. Jones essentially said as much after Sunday's 47-16 win over Washington in the finale. The Cowboys were eliminated by Philadelphia's win over the New York Giants.
The question might come down to which of the two gets a long-term deal and which plays on the franchise tag. Either way, the cost will go up. In Prescott's case, it will be by at least $30 million after he played for $2 million in the final year of his rookie deal.
Prescott fell a yard shy of Tony Romo's franchise record of 4,903 passing yards in a season as the Cowboys finished with the NFL's No. 1 offense for the first time since 1977. But inconsistencies on both sides of the ball doomed Dallas.
"I didn't make the playoffs, and I deserve to be second," Prescott said. "As I've said, I don't play the game for stats. I play the game to win. So, I'm OK with being there, being one yard short of him. It's fine."
WINNING TEAM ON PAPER
The Cowboys finished with a point differential of plus-113, tied for the second-highest all-time for a team that didn't finish above .500, according to Sportradar.
They blew out the Eagles to take control of the division in midseason and did the same to the Los Angeles Rams when the defending NFC champions were hot in Week 15.
But with a chance to clinch the NFC East a week later, Dallas couldn't score a touchdown in a 17-9 loss to the Eagles that gave Philadelphia control of the playoff race. The Eagles finished it off with a 34-17 win over the Giants.
"I think the overarching explanation is we weren't consistent enough," Garrett said on his radio show Monday before an afternoon meeting with Jones and his son, executive vice president of personnel Stephen Jones.
"We weren't consistent enough throughout the year from game to game. We weren't consistent enough within games. We didn't do the things that winning football teams do."
WITTEN'S FINALE?
After coming out of retirement following a year in broadcasting to set the club record with a 16th season, tight end Jason Witten thought he was joining a team that could chase the one thing missing from his first 15 seasons — a trip to the Super Bowl.
Instead, the Cowboys fell into the "same old story" rut of 8-8 without a playoff spot. That was a memorable Witten one-liner during a stretch of three straight .500 seasons without trips to the postseason. Those were also Garrett's first three full seasons. Now the question becomes whether Witten will try again as a 38-year-old next season.
"I'll take a few days and figure out what's next," said Witten, who is one touchdown catch shy of Dez Bryant's club record of 73. "One of the best decisions I made was to listen to my gut and come back and play."
OTHER FREE AGENTS
After Prescott, the 2016 NFL Offensive Rookie of the Year, and Cooper, the next biggest names hitting free agency are cornerback Byron Jones, defensive end Robert Quinn and linebacker Sean Lee.
Jones missed the first game of his five-year career in the finale because of an ankle injury. The Cowboys might not be able to afford to keep him. Quinn led the team with 11 1/2 sacks in his first Dallas season following a trade with Miami. Lee, who will turn 34 just before training camp, was valuable late in the season because of injuries.
HOW TO GET IT RIGHT
For now, everything hinges on Jerry Jones' decision about a head coach. And that will lead to questions about the makeup of the staff.
The Cowboys might be inclined to keep the top of the offensive staff in place with young offensive coordinator Kellen Moore and QB coach Jon Kitna, a former NFL quarterback who got rave reviews from his star pupil. If so, it might be time for new leadership and a new scheme on defense after seven years under defensive coordinator Rod Marinelli.
Regardless of who's coaching the defense, Dallas needs a healthy Leighton Vander Esch at linebacker. His second season was cut short by a neck injury that will require surgery and could end up threatening his career. If Vander Esch can't come back healthy and productive, the Cowboys will be under a lot of pressure to hit on their defensive picks in the draft.
More Silver Star Nation Stories
Former Cowboy…former commissioner join H.O.F.
by Adam Bradshaw / Jan 15, 2020
Former NFL Commissioner Paul Tagliabue has made the Pro Football Hall of Fame in his fifth attempt.
Tagliabue and former New York Giants general manager George Young made it to the hall in Canton, Ohio, as contributors. Ex-Dallas Cowboys safety Cliff Harris and former Cleveland receiver Mac Speedie completed the centennial class announced Wednesday. The class of 10 senior candidates, three contributors and two coaches are part of the hall's celebration of the NFL's 100th season.
McCarthy Excited to Get to Work with Dallas Offensive Weapons
by Matt Roberts, Mandy Knight / Jan 8, 2020
FRISCO, Texas -- Mike McCarthy was introduced at the Ford Center, in Frisco, on Wednesday speaking to reporters for about 45 minutes.
Many of the questions revolved around McCarthy meshing his offensive ideals with roster cornerstones like Dak Prescott and Zeke Elliott.
McCarthy Excited to Back in The NFL
by Mandy Knight / Jan 8, 2020
FRISCO, Texas -- The Dallas Cowboys introduced their ninth head coach in team history on Sunday bringing Mike McCarthy on board to try and get them back to a super bowl.
McCarthy has reached the mountain-top once before winning Super Bowl 45 in Arlington, with the Packers. But after things ended on a sour note in Green Bay, McCarthy spent a year taking a big picture view of things and is excited to be back in the NFL.
Dave Aranda Wants to Build on Matt Rhule's Foundation
Local Sports / 16 hours ago
Trial date set in Rockdale child murder case
Killeen NAACP Celebrates Martin Luther King Jr.


The object to the left is a coffee bean grinder. The handle could be turned, and the ground coffee could be collected from the drawer at the bottom. Economy was the third settlement started by the Harmonist Society, and is now listed on the National Register of Historic Properties. The site is located in Ambridge, Pennsylvania. For more information about the Harmonist Society's settlement at "Oekonomie," visit the Old Economy Village website.


The membership in the Association is fully voluntary. Every candidate has to answer the requirements for admittance in the Association, mentioned in the present decrees, as well as to be approved by the Board of Managers as conscientious, with good reputation and having the necessary qualities for membership in the Association.
The members of the Association are regular, associated and honorary.
Regular – a proprietor of a registered trademark/s, valid on the territory of Republic of Bulgaria, as well as a registered user of registered geographical indications. Intellectual property representatives, lawyers and consulting agencies, working in the same sphere cannot be members of the Association.
Associated – lecturers and scientists in the intellectual property field, industrial property representatives, consulting companies and other experts, who work in the field of trademark theory and practice, public organizations, non-profit organizations, state authorities and international organizations which determine the politics in the field of trademarks and geographical indications.
Honorary – a physical person chosen by the Board of Managers or by the General Assembly, who has contributed essentially for achieving the Association's aims and subject and for the developing of the intellectual property.
The regular and the associated members pay affiliation fee by their acceptance and a member's fee.
for the constitutors – 300lv.
owning from 1 to 10 objects – 500lv.
owning from 10 to 30 objects – 1000lv.
owning over 30 objects – 1500lv.
for the associated members (including physical people, who are industrial property representatives) – 1000lv., except for the scientists, for who the affiliation fee is in the rate of one minimal salary by the moment of acceptance as members.
The honorary members do not pay affiliation fee and membership fee.
owning from 1 to 10 objects – 300lv.
owning from 10 to 30 objects – 700lv.
owning over 30 objects – 1000lv.
for the associated members – 500lv., except for the scientists, for who the affiliation fee is in the rate of ½ minimal salary by the moment of payment.


text:
Clinical Healthcare Analytics
Why Cha
Benefits & ROI
Innovating Together
CHA poised to expand its unique ability to deliver analytics integrated with clinical workflows to improve outcomes and decrease time spent in chart
Hiring of new President, Jerry Baker, marks significant milestone
BRAINTREE, MA — The promise of harnessing data for predictive, actionable analytics that assist doctors and nurses at the point of care has been in the air for a decade or more, but few hospitals have been able to make it practical. While the federally-mandated use of electronic medical record (EMR) systems has been largely completed, adapting these systems in a way that clinicians can actually access and leverage the data has been much more elusive—despite the efforts of some of the biggest players in the industry. Furthermore, a major complaint of caregivers is the amount of time they spend in EMRs inputting and searching for patient data, resulting in widespread physician burn-out.
One company in Massachusetts has been quietly working to change the tide on this trend and with the recent hiring of a new growth-focused president, they're poised to make a bigger impact nation-wide.
Clinical Healthcare Analytics/CHA has added veteran start-up leader Jerry Baker to their team as president, marking a transition from a "well-kept secret" phase to their next stage of growth.
"Bringing someone with Jerry's experience and network into CHA is a powerful statement about where we're now taking our company," explains CEO Andrew Splitz. "Over the past 2 years, we've been working to solidify our approach and build a portfolio of proven implementations among some demanding hospital clients. With Jerry's arrival, we are putting the healthcare IT world on notice that we're ready to make a much larger impact."
Baker joins CHA with a 25-year track record at a succession of angel, venture-backed and Fortune 100 companies. He held CEO and leadership roles at Info-X (acquired by 3M) and MRO Corporation, a medical records information management company. He was CEO at Halfpenny Technologies, a laboratory IT company where he led a Series-A Growth Capital Round of $6.7M. Baker has also had corporate positions with Baxter International, First Data Corporation and 3M.
Regarding his new role with CHA, Baker says, "I am very excited about the prospect of moving CHA's proven approach to clinical analytics and workflows to a much larger stage. For nearly two years now, this team has been demonstrating unprecedented success in bringing predictive analytics to the real world—serving about 40 hospitalists, case managers, and nursing managers—and demonstrating a significant impact on measures like preventing sepsis, diagnosing acute kidney injury and alcohol withdrawal—harnessing latent data that has tremendous potential for impacting both clinical and financial outcomes."
CHA's approach to frontline analytics uniquely delivers real-time visualization of critical data in a manner that time-stressed clinicians can easily incorporate into their workflow. At one site, physicians are reporting a 20% decrease in time spent in patient charts. The visualizations provide a tool for impacting perennially troubling issues for healthcare organizations and early users are reporting improvements in outcomes, revenue, and—importantly—physician satisfaction.
"This small-but-mighty team has done what many larger players in healthcare IT have yet to do," Baker says, "And I am looking forward to scaling this success by bringing in the financial resources and national leadership perspective they need to rollout the company's abilities to a much larger audience. Our industry is very eager to see this vision finally being implemented."
Over his career to-date, Baker raised over $14M in growth capital has been recognized by the Inc. 500, Deloitte and Touche Fast 500, and MidAtlantic Venture Summit Top 100. He has participated on the Boards of Directors of seven companies including Lifepoint Informatics, HSI Health, and as Chairman of Brandywine Airport in West Chester, PA. He has served as an advisor for Panasonic Corporation, Medivo, iWT Health, Spreo and others.
Prior to his private sector career, Baker was a Captain in the United States Marine Corps, serving 5 years active duty and 5 years reserves. In 2016, he was awarded the Semper Fidelis Award, which recognizes individuals whose service to our Nation exemplifies the Marine Corps motto to remain "Always Faithful." Past recipients include President Gerald Ford, Walter Cronkite, The Honorable Donald Rumsfeld, H. Ross Perot, George Steinbrenner and President George W. Bush.
About Clinical Healthcare Analytics/CHA
CHA is home to one of the only teams demonstrating real-world success in introducing
powerful analytics at the point of clinical care. The CHA Foundation Suite is a leap forward in leveraging an organization's EMR to deliver critical—and actionable—information at point-of-care. CHA is finally delivering on a long-promised vision for improved clinical care and optimized case management through timely analytics.
Clinical Healthcare Analytics/CHA
15 Braintree Hill Office Park, Suite 102
Braintree, MA 02184
info@clinicalha.com
The CHA Foundation Suite is a leap forward in leveraging the EMR to perform real-time analysis at point-of-care and in practical case management. Schedule a time to see what it can do for you:
PhysiciansNursesCase ManagersC-Suite
The CHA Foundation Suite is a leap forward in leveraging the EMR to perform real-time analysis at point-of-care - and in practical case management.
© Clinical Healthcare Analytics 2019
Design by Jackrabbit

redpajama_set_name: RedPajamaCommonCrawl


Tis the season…family time, food, and HOLIDAY PARTIES of course! Now that party season is upon us, I wanted to check in to share with you my top skirt looks that are to die for as making a statement is a must! But wait a second, have you even lined up your party wardrobe yet? OMG! Apparently, we should have had this chat a little sooner darlin'. This time, I'll keep it straight and to the point because I know that you want to get to your relaxation mode…light dinner, wine, and top off the night with a relaxing bubble bath.
To get the party skirt vibe started, one of my favorite skirts is the metallic pleated skirt. You can pair it with a cute graphic tee, and off the shoulder sweater, or even a tartan button-down. I know you are probably like, "Tartan"? Absolutely fabulous and unexpected. The tartan top is definitely a statement blouse and would definitely prep you to slay all living things around you. Next up is the sequins skirt in all of it's glory! Whether you rock a sequin pencil, midi, or maxi, all eyes will be on you! No doubt bombshell!
There are so many ways to slay in a sequins, but you can also pair this with a tartan button-down blouse. Oh, did I mention that I love the tartan print? Lol. Don't forget about the classic feather skirt and tulle skirt…tulle is ALWAYS a good idea. There are so many ways to make these skirts werrrkkk! Now that you have seen my top picks, what do you think? Let's chat about it in the comments!
Absolutely Jani! Hey ? thanks for checking out my blog!
very clean and excellent user genial design.
Yes, I try to keep the posts fun and friendly. I appreciate your feedback on the website theme. ?
Pingback: NYE Outfits | Battle Beauties - Battle by Day. Beauty by Night.
Pingback: Getting into the Christmas Spirit | Battle Beauties - Battle by Day. Beauty by Night.


The attorney general said passing the reform legislation would be a "grave error" and benefit a "highly dangerous cohort of criminals."
In a Feb. 14 letter to his former colleague Sen. Chuck Grassley (R-Iowa), who chairs the Senate Judiciary Committee, Sessions wrote that he "strongly" urged the Senate to consider the ramifications of the bill.
The Iowa senator said on Twitter Wednesday that he was "incensed" by Sessions' letter, saying it was not the proper role of the attorney general.
On Thursday, Grassley fumed at Sessions during a Senate Judiciary Committee markup hearing.
If Sessions wanted to be involved in the markup process for the legislation, "maybe he should have quit his job and run for the Republican Senate seat in Alabama," Grassley said.
Grassley said that both he and Sessions believe in being tough on crime. "But I also believe in being fair. This is a view shared by the last Republican attorney general, Michael Mukasey, who testified in support of this bill last Congress. So, we have one Republican attorney general who thinks this bill is good policy, and one who has some concerns," Grassley said.
Last week, Grassley said the bill was "stuck" without support from the Trump administration.
This article has been updated to include Grassley's remarks at Thursday's hearing.
Ryan Reilly is HuffPost's senior justice reporter, covering federal law enforcement, criminal justice and legal affairs. Have a tip? Reach him at ryan.reilly@huffpost.com or on Signal at 202-527-9261.


Renew your enthusiasm for sandwiches with an aromatic Vietnamese staple. Get the recipe!
Squeeze fresh lime over it just before eating for an extra burst of flavour. Get the recipe!
Fritters are the perfect dinner which also makes a yummy lunch the next day. Get the recipe!
This sandwich is basically a normal sandwich that's been squashed down for 6 hours. This one involve arugula and italian meats and cheeses. Get the recipe!
This is a teeny Swedish smörgåstårta; it layers cool refreshing goats cheese, pea and mint with nutritious rye bread for the perfect work lunch. Get the recipe!
Step 1. Acquire ingredients. Step 2. Throw them all into a bowl. It's that easy to make this sharp and bright salad. Get the recipe.
Bento's not just for sushi! This cute box contains a load of healthy fruit and veg and a wholesome and tasty wrap with beans, rice and spinach. Get the recipe!
As easy to make as it is envy-inducing, the fresh ingredients kick this staple pasta salad up a notch. Get the recipe.
This salad is so fresh and light it'll break the monotony of any gloomy working day. Get the recipe.
Pack the dipping sauce and peanut dressing separately and have an enviably elegant lunch break with this Vietnamese classic. Get the recipe!
If you like hummus you'll love this crunchy sandwich that's cheap and easy to make! Get the recipe!
Pair these with a tasty coleslaw for an amazing carb free lunch that's full of flavour. Get the recipe.
Croissants are a quirky substitute for bread in a sandwich; the classic turkey cranberry filling is given a new lease of life when paired with baby spinach. Get the recipe!
These pitta pockets are as colourful as they are nutritious. Get the recipe!
A Madder is an open facing sandwich on rye bread. This recipe combines cottage cheese with chives, tomato and cucumber to make a tasty Scandinavian favourite. Just keep the topping in a separate container and assemble when you're hungry! Get the recipe.
This recipe makes 8-10 servings and only takes 15 minutes! Perfect as a side or a main for any packed lunch. Get the recipe!
Tsukune are Japanese meatballs that are covered in a sweet soy based sauce. Team them with sticky rice and asparagus and you'll have the best lunch in the office! Get the recipe!
Greek salad is one of the classic flavour combinations: This recipe includes lentils for that extra burst of protein, and if you're feeling peckish you can add chicken or salmon to top it off. Get the recipe!
This bagel has to be one of the contenders for the official dish of New York; pastrami, emmental and mustard are a winning combination. Get the recipe!
This noodle dish is a popular breakfast in South India, but works perfectly as a lunch as well. Get the recipe!
21. Orzo Salad with Chicken, Corn And Tomatoes.
Replace the chicken with feta or chickpeas for a tasty vegetarian version of this unique pasta salad. Get the recipe!
These slices are so moreish it's just as well the recipe makes four servings. Get the recipe!
Pour into a thermos and grab a crusty roll and you've got a lunch that'll brighten up even the darkest day in the office. Get the recipe!


text:
Q: How to load different views in one div that situated in home page on button click using ajax,jquery,codeigniter I have a page like home now what I want is if I click a button or link like a menu a corresponding view must load in that div in the home page. On every button click the views are must change inside the div without refreshing the entire page.
I know this can be done with ajax and jquery.

A: on click event of button call a javascript method, collect information which affect different views, send ajax request in a controller with post data, according to data, load a view like
$res = $this->load->view('myview1')
Remember, ajax request should not be of "json" type.
Ajax request will send a string, take this string in a javascript var.
now in javascript
$('#div_id').html(res);

redpajama_set_name: RedPajamaStackExchange


As per one of the US mags, her friends said that she wrote the letter to heal the differences Meghan Markle and her father had since last year May.
Meghan Markle's father Thomas Markle is hitting the headlines as he has apparently threatened to reveal more extracts of his daughter's explosive letter to him. The Duchess of Sussex wrote a five-page-long letter and accused him of exploiting her relationship with Prince Harry. The former Suits actress also pleaded him to stop lying and let them live their lives happily.
Her letter was released by 74-year-old Thomas Markle and he is yet to release the full letter. His daughter Samantha, 53, told The Sun: "It was nasty. Dad is prepared to release more of it." Talking about Samantha, she is reportedly making as much as $10,000 off the nearing birth of the royal baby. She charges around 2,000 pounds an hour for interviews to tabloids. She tweeted a report by The Mirror claiming she's making $100,000 off the royal baby's arrival.
As per one of the US mags, her friends said that she wrote the letter to heal the differences Meghan and her father had since last year May. Samantha called it a PR move. "Your actions have broken my heart into a million pieces. You have manufactured such unnecessary and unwarranted pain, but by making the choice not to tell the truth as you are puppeteered in this. Something I will never understand.If you love me … allow us to live our lives in peace. Please stop lying, please stop creating so much pain, please stop exploiting my relationship with my husband," extract reads.
"We all rallied around to support and protect you from day 1, and this you know.So to hear about the attacks you've made at Harry in the press, who was nothing but patient, kind, and understanding with you, is perhaps the most painful of all. For some reason you choose to continue fabricating these stories, manufacturing this fictitious narrative, and entrenching yourself deeper into this web you've spun. The only thing that helps me sleep at night is the faith and knowing that a lie can't live forever." What are your views on the same? Let us know in the comments section below.
Well Megan played her cards poorly. Your family unit is dysfunctional, all you had to do was make it appear as if it wasnt. Harry should have been introduced to the old man. You chose not too do that, hes been acting out ever since. Call him. Writing long winded letters to someome who funded your childhood and first wedding is straight up pathetic.
No father would use the media to talk to their children. You would have to really hate your child, especially when you know she is pregnant and part of the Royal family where your image is literally everything. Her friends have spoken to the media(I think with her consent) saying that her father refuses to speak to her, she tried to get in touch thru phone many times. I guess that's why she wrote him a letter. He is just making up lies so that he creates headlines and makes money off it. Her family is trash, unfortunately. The British Royal family is also trashy with lots of money so they hide their problems better. Her family is typical white trash.
She's pregnant for God's sake. Crazy old man.
Why is she writing letters to her father instead of speaking to him directly. She should also taken Harry to him and introduced him way before the wedding. Markle had sent her to expensive private schools ,paid for drama lessons , paid for the 1st marriage . He also said that he didn't get any wedding invite unlike the mother, she refused to let him give the Father of the Bride speech saying there's no time.
If he did all that then she is just the big bad daughter for not inviting? I think you don't keep up with the news. He had a staged paparazzi photo-op weeks before the wedding and then she cancelled the invite and he suffered a heart-attack or something along those lines and then he refused to come after that. He has gone out of his way to criticize her in-laws and her husband. They just look like typical White trash! Why isn't she having any kind of problems with her Mom? Why is it just the Dad? He hasn't been a part of her life for a long time.
This is really disgusting. I come from a dysfunctional family and it really takes a lot out of you to even think that you will have a family of your own one day. Coming from that place, and then being able to move forward, is a huge step. Why do these cretins chose to behave in such an undignified manner.
What an embarrassment. He should leave her alone regardless of how he feels about her choices.
He's clearly milking this to the bank cause if I were him, I'd never release this letter, it makes me look like a total a-hole. Her whole family is demented.


text:
import json
import time
import logging
import signal
import redis
from celery.result import AsyncResult
from celery.utils.log import get_task_logger
from redash import redis_connection, models, statsd_client, settings, utils
from redash.utils import gen_query_hash
from redash.worker import celery
from redash.query_runner import InterruptException
from .base import BaseTask
from .alerts import check_alerts_for_query

logger = get_task_logger(__name__)

def _job_lock_id(query_hash, data_source_id):
    return "query_hash_job:%s:%s" % (data_source_id, query_hash)

def _unlock(query_hash, data_source_id):
    redis_connection.delete(_job_lock_id(query_hash, data_source_id))

# TODO:
# There is some duplication between this class and QueryTask, but I wanted to implement the monitoring features without
# much changes to the existing code, so ended up creating another object. In the future we can merge them.
class QueryTaskTracker(object):
    DONE_LIST = 'query_task_trackers:done'
    WAITING_LIST = 'query_task_trackers:waiting'
    IN_PROGRESS_LIST = 'query_task_trackers:in_progress'
    ALL_LISTS = (DONE_LIST, WAITING_LIST, IN_PROGRESS_LIST)

    def __init__(self, data):
        self.data = data

    @classmethod
    def create(cls, task_id, state, query_hash, data_source_id, scheduled, metadata):
        data = dict(task_id=task_id, state=state,
                    query_hash=query_hash, data_source_id=data_source_id,
                    scheduled=scheduled,
                    username=metadata.get('Username', 'unknown'),
                    query_id=metadata.get('Query ID', 'unknown'),
                    retries=0,
                    scheduled_retries=0,
                    created_at=time.time(),
                    started_at=None,
                    run_time=None)

        return cls(data)

    def save(self, connection=None):
        if connection is None:
            connection = redis_connection

        self.data['updated_at'] = time.time()
        key_name = self._key_name(self.data['task_id'])
        connection.set(key_name, utils.json_dumps(self.data))
        connection.zadd(self._get_list(), time.time(), key_name)

        for l in self.ALL_LISTS:
            if l != self._get_list():
                connection.zrem(l, key_name)

    # TOOD: this is not thread/concurrency safe. In current code this is not an issue, but better to fix this.
    def update(self, **kwargs):
        self.data.update(kwargs)
        self.save()

    @staticmethod
    def _key_name(task_id):
        return 'query_task_tracker:{}'.format(task_id)

    def _get_list(self):
        if self.state in ('finished', 'failed', 'cancelled'):
            return self.DONE_LIST

        if self.state in ('created'):
            return self.WAITING_LIST

        return self.IN_PROGRESS_LIST

    @classmethod
    def get_by_task_id(cls, task_id, connection=None):
        if connection is None:
            connection = redis_connection

        key_name = cls._key_name(task_id)
        data = connection.get(key_name)
        return cls.create_from_data(data)

    @classmethod
    def create_from_data(cls, data):
        if data:
            data = json.loads(data)
            return cls(data)

        return None

    @classmethod
    def all(cls, list_name, offset=0, limit=-1):
        if limit != -1:
            limit -= 1

        if offset != 0:
            offset -= 1

        ids = redis_connection.zrevrange(list_name, offset, limit)
        pipe = redis_connection.pipeline()
        for id in ids:
            pipe.get(id)

        tasks = [cls.create_from_data(data) for data in pipe.execute()]
        return tasks

    @classmethod
    def prune(cls, list_name, keep_count):
        count = redis_connection.zcard(list_name)
        if count <= keep_count:
            return 0

        remove_count = count - keep_count
        keys = redis_connection.zrange(list_name, 0, remove_count - 1)
        redis_connection.delete(*keys)
        redis_connection.zremrangebyrank(list_name, 0, remove_count - 1)

        return remove_count

    def __getattr__(self, item):
        return self.data[item]

    def __contains__(self, item):
        return item in self.data

class QueryTask(object):
    # TODO: this is mapping to the old Job class statuses. Need to update the client side and remove this
    STATUSES = {
        'PENDING': 1,
        'STARTED': 2,
        'SUCCESS': 3,
        'FAILURE': 4,
        'REVOKED': 4
    }

    def __init__(self, job_id=None, async_result=None):
        if async_result:
            self._async_result = async_result
        else:
            self._async_result = AsyncResult(job_id, app=celery)

    @property
    def id(self):
        return self._async_result.id

    def to_dict(self):
        if self._async_result.status == 'STARTED':
            updated_at = self._async_result.result.get('start_time', 0)
        else:
            updated_at = 0

        status = self.STATUSES[self._async_result.status]

        if isinstance(self._async_result.result, Exception):
            error = self._async_result.result.message
            status = 4
        elif self._async_result.status == 'REVOKED':
            error = 'Query execution cancelled.'
        else:
            error = ''

        if self._async_result.successful() and not error:
            query_result_id = self._async_result.result
        else:
            query_result_id = None

        return {
            'id': self._async_result.id,
            'updated_at': updated_at,
            'status': status,
            'error': error,
            'query_result_id': query_result_id,
        }

    @property
    def is_cancelled(self):
        return self._async_result.status == 'REVOKED'

    @property
    def celery_status(self):
        return self._async_result.status

    def ready(self):
        return self._async_result.ready()

    def cancel(self):
        return self._async_result.revoke(terminate=True, signal='SIGINT')

def enqueue_query(query, data_source, user_id, scheduled=False, metadata={}):
    query_hash = gen_query_hash(query)
    logging.info("Inserting job for %s with metadata=%s", query_hash, metadata)
    try_count = 0
    job = None

    while try_count < 5:
        try_count += 1

        pipe = redis_connection.pipeline()
        try:
            pipe.watch(_job_lock_id(query_hash, data_source.id))
            job_id = pipe.get(_job_lock_id(query_hash, data_source.id))
            if job_id:
                logging.info("[%s] Found existing job: %s", query_hash, job_id)

                job = QueryTask(job_id=job_id)

                if job.ready():
                    logging.info("[%s] job found is ready (%s), removing lock", query_hash, job.celery_status)
                    redis_connection.delete(_job_lock_id(query_hash, data_source.id))
                    job = None

            if not job:
                pipe.multi()

                if scheduled:
                    queue_name = data_source.scheduled_queue_name
                else:
                    queue_name = data_source.queue_name

                result = execute_query.apply_async(args=(query, data_source.id, metadata, user_id), queue=queue_name)
                job = QueryTask(async_result=result)
                tracker = QueryTaskTracker.create(result.id, 'created', query_hash, data_source.id, scheduled, metadata)
                tracker.save(connection=pipe)

                logging.info("[%s] Created new job: %s", query_hash, job.id)
                pipe.set(_job_lock_id(query_hash, data_source.id), job.id, settings.JOB_EXPIRY_TIME)
                pipe.execute()
            break

        except redis.WatchError:
            continue

    if not job:
        logging.error("[Manager][%s] Failed adding job for query.", query_hash)

    return job

@celery.task(name="redash.tasks.refresh_queries", base=BaseTask)
def refresh_queries():
    logger.info("Refreshing queries...")

    outdated_queries_count = 0
    query_ids = []

    with statsd_client.timer('manager.outdated_queries_lookup'):
        for query in models.Query.outdated_queries():
            if settings.FEATURE_DISABLE_REFRESH_QUERIES:
                logging.info("Disabled refresh queries.")
            elif query.data_source.paused:
                logging.info("Skipping refresh of %s because datasource - %s is paused (%s).", query.id, query.data_source.name, query.data_source.pause_reason)
            else:
                enqueue_query(query.query, query.data_source, query.user_id,
                              scheduled=True,
                              metadata={'Query ID': query.id, 'Username': 'Scheduled'})

            query_ids.append(query.id)
            outdated_queries_count += 1

    statsd_client.gauge('manager.outdated_queries', outdated_queries_count)

    logger.info("Done refreshing queries. Found %d outdated queries: %s" % (outdated_queries_count, query_ids))

    status = redis_connection.hgetall('redash:status')
    now = time.time()

    redis_connection.hmset('redash:status', {
        'outdated_queries_count': outdated_queries_count,
        'last_refresh_at': now,
        'query_ids': json.dumps(query_ids)
    })

    statsd_client.gauge('manager.seconds_since_refresh', now - float(status.get('last_refresh_at', now)))

@celery.task(name="redash.tasks.cleanup_tasks", base=BaseTask)
def cleanup_tasks():
    in_progress = QueryTaskTracker.all(QueryTaskTracker.IN_PROGRESS_LIST)
    for tracker in in_progress:
        result = AsyncResult(tracker.task_id)

        # If the AsyncResult status is PENDING it means there is no celery task object for this tracker, and we can
        # mark it as "dead":
        if result.status == 'PENDING':
            logging.info("In progress tracker for %s is no longer enqueued, cancelling (task: %s).",
                         tracker.query_hash, tracker.task_id)
            _unlock(tracker.query_hash, tracker.data_source_id)
            tracker.update(state='cancelled')

        if result.ready():
            logging.info("in progress tracker %s finished", tracker.query_hash)
            _unlock(tracker.query_hash, tracker.data_source_id)
            tracker.update(state='finished')

    waiting = QueryTaskTracker.all(QueryTaskTracker.WAITING_LIST)
    for tracker in waiting:
        result = AsyncResult(tracker.task_id)

        if result.ready():
            logging.info("waiting tracker %s finished", tracker.query_hash)
            _unlock(tracker.query_hash, tracker.data_source_id)
            tracker.update(state='finished')

    # Maintain constant size of the finished tasks list:
    QueryTaskTracker.prune(QueryTaskTracker.DONE_LIST, 1000)

@celery.task(name="redash.tasks.cleanup_query_results", base=BaseTask)
def cleanup_query_results():
    """
    Job to cleanup unused query results -- such that no query links to them anymore, and older than
    settings.QUERY_RESULTS_MAX_AGE (a week by default, so it's less likely to be open in someone's browser and be used).

    Each time the job deletes only settings.QUERY_RESULTS_CLEANUP_COUNT (100 by default) query results so it won't choke
    the database in case of many such results.
    """

    logging.info("Running query results clean up (removing maximum of %d unused results, that are %d days old or more)",
                 settings.QUERY_RESULTS_CLEANUP_COUNT, settings.QUERY_RESULTS_CLEANUP_MAX_AGE)

    unused_query_results = models.QueryResult.unused(settings.QUERY_RESULTS_CLEANUP_MAX_AGE).limit(settings.QUERY_RESULTS_CLEANUP_COUNT)
    total_unused_query_results = models.QueryResult.unused().count()
    deleted_count = models.QueryResult.delete().where(models.QueryResult.id << unused_query_results).execute()

    logger.info("Deleted %d unused query results out of total of %d." % (deleted_count, total_unused_query_results))

@celery.task(name="redash.tasks.refresh_schemas", base=BaseTask)
def refresh_schemas():
    """
    Refreshes the data sources schemas.
    """

    blacklist = [int(ds_id) for ds_id in redis_connection.smembers('data_sources:schema:blacklist') if ds_id]

    global_start_time = time.time()

    logger.info(u"task=refresh_schemas state=start")

    for ds in models.DataSource.select():
        if ds.paused:
            logger.info(u"task=refresh_schema state=skip ds_id=%s reason=paused(%s)", ds.id, ds.pause_reason)
        elif ds.id in blacklist:
            logger.info(u"task=refresh_schema state=skip ds_id=%s reason=blacklist", ds.id)
        else:
            logger.info(u"task=refresh_schema state=start ds_id=%s", ds.id)
            start_time = time.time()
            try:
                ds.get_schema(refresh=True)
                logger.info(u"task=refresh_schema state=finished ds_id=%s runtime=%.2f", ds.id, time.time() - start_time)
            except Exception:
                logger.exception(u"Failed refreshing schema for the data source: %s", ds.name)
                logger.info(u"task=refresh_schema state=failed ds_id=%s runtime=%.2f", ds.id, time.time() - start_time)

    logger.info(u"task=refresh_schemas state=finish total_runtime=%.2f", time.time() - global_start_time)

def signal_handler(*args):
    raise InterruptException

class QueryExecutionError(Exception):
    pass

# We could have created this as a celery.Task derived class, and act as the task itself. But this might result in weird
# issues as the task class created once per process, so decided to have a plain object instead.
class QueryExecutor(object):
    def __init__(self, task, query, data_source_id, user_id, metadata):
        self.task = task
        self.query = query
        self.data_source_id = data_source_id
        self.metadata = metadata
        self.data_source = self._load_data_source()
        if user_id is not None:
            self.user = models.User.get_by_id(user_id)
        else:
            self.user = None
        self.query_hash = gen_query_hash(self.query)
        # Load existing tracker or create a new one if the job was created before code update:
        self.tracker = QueryTaskTracker.get_by_task_id(task.request.id) or QueryTaskTracker.create(task.request.id,
                                                                                'created',
                                                                                self.query_hash,
                                                                                self.data_source_id,
                                                                                False, metadata)

    def run(self):
        signal.signal(signal.SIGINT, signal_handler)
        self.tracker.update(started_at=time.time(), state='started')

        logger.debug("Executing query:\n%s", self.query)
        self._log_progress('executing_query')

        query_runner = self.data_source.query_runner
        annotated_query = self._annotate_query(query_runner)

        try:
            data, error = query_runner.run_query(annotated_query, self.user)
        except Exception as e:
            error = unicode(e)
            data = None
            logging.warning('Unexpected error while running query:', exc_info=1)

        run_time = time.time() - self.tracker.started_at
        self.tracker.update(error=error, run_time=run_time, state='saving_results')

        logger.info(u"task=execute_query query_hash=%s data_length=%s error=[%s]", self.query_hash, data and len(data), error)

        _unlock(self.query_hash, self.data_source.id)

        if error:
            self.tracker.update(state='failed')
            result = QueryExecutionError(error)
        else:
            query_result, updated_query_ids = models.QueryResult.store_result(self.data_source.org_id, self.data_source.id,
                                                                              self.query_hash, self.query, data,
                                                                              run_time, utils.utcnow())
            self._log_progress('checking_alerts')
            for query_id in updated_query_ids:
                check_alerts_for_query.delay(query_id)
            self._log_progress('finished')

            result = query_result.id

        return result

    def _annotate_query(self, query_runner):
        if query_runner.annotate_query():
            self.metadata['Task ID'] = self.task.request.id
            self.metadata['Query Hash'] = self.query_hash
            self.metadata['Queue'] = self.task.request.delivery_info['routing_key']

            annotation = u", ".join([u"{}: {}".format(k, v) for k, v in self.metadata.iteritems()])
            annotated_query = u"/* {} */ {}".format(annotation, self.query)
        else:
            annotated_query = self.query
        return annotated_query

    def _log_progress(self, state):
        logger.info(u"task=execute_query state=%s query_hash=%s type=%s ds_id=%d task_id=%s queue=%s query_id=%s username=%s",
                    state,
                    self.query_hash, self.data_source.type, self.data_source.id, self.task.request.id, self.task.request.delivery_info['routing_key'],
                    self.metadata.get('Query ID', 'unknown'), self.metadata.get('Username', 'unknown'))
        self.tracker.update(state=state)

    def _load_data_source(self):
        logger.info("task=execute_query state=load_ds ds_id=%d", self.data_source_id)
        return models.DataSource.get_by_id(self.data_source_id)

# user_id is added last as a keyword argument for backward compatability -- to support executing previously submitted
# jobs before the upgrade to this version.
@celery.task(name="redash.tasks.execute_query", bind=True, base=BaseTask, track_started=True)
def execute_query(self, query, data_source_id, metadata, user_id=None):
    return QueryExecutor(self, query, data_source_id, user_id, metadata).run()

redpajama_set_name: RedPajamaGithub


text:
Summary: Basic data
Displaying article 1 of 1 articles
162,155 sq km
11.8m (2020, IMF)
Main towns
Population in '000s, excluding suburbs (2014)
Tunis (capital): 1,056
Sfax: 955
Sousse: 674
Kairouan: 570
Bizerte: 568
Mediterranean on the northern and north-eastern coasts, semi-arid inland and in the south
Weather in Tunis
Hottest month, August, 21-33°C (average daily minimum and maximum); coldest month, January, 6-14°C; driest month, July, 3 mm average rainfall; wettest month, January, 563 mm average rainfall
Arabic and French
Metric system. The quintal (100 kg) is used to measure crop weights
The Tunisian dinar (TD) is made up of 1,000 millimes. The average exchange rate in 2021 was TD2.79:US$1
1 hour ahead of GMT
All Muslim holidays are observed in accordance with the lunar calendar, and the dates are, therefore, variable
Public holidays: New Year's Day (January 1st); Revolution Day (January 14th); Independence Day (March 20th); Martyrs' Day (April 9th); Eid al-Fitr (April 21st 2023); Labour Day (May 1st); Eid al-Adha (June 28th 2023); Islamic New Year (July 19th 2023); Republic Day (July 25th); Women's Day (August 13th); Prophet Mohammed's birthday (September 27th 2023); Evacuation Day (October 15th)
Economy | January 6th 2023
Tunisia's 2023 budget faces resistance from trade unions
Fiscal consolidation is needed to secure IMF and donor support but will be unpopular and raise political tensions.


A romantic addition to Dkoko's signature style. Triangle top with flirty frill detail for a flattering feminine look.
Features bust support and adjustable elastic straps.
In-seam pockets for optional padded cup inserts.
Made in our premium fabric with UPF protection and double ultra-soft 'gel" lining specially designed to repel sand.


Hello hello, surprised to see me aren't you!
With the tumultous last push of school I've found myself plum out of time to update the ol' blog - but no longer! I am currently on my first trip of the summer, one of Las Vegas, and a tour of California from Fresno to Carmel and San Fran. I am currently in Las Vegas, waiting for my climbing stuff to arrive from FedEx. However I worry at this point that I will not have a lot of time to climb. I am leaving Thursday early afternoon for Fresno to visit my aunt. Alas, I must "go with the flow". I have been having a fantastic time mountain biking with a riding partner that contacted me online. It has taken me some work to acclimate to the torrid 105 degree daytime temperature, but otherwise everything is in order!
I'm assuming you will be going to Yosemite while in Fresno since it is so close and you are a climber.