text stringlengths 1 1.04M | language stringclasses 25 values |
|---|---|
The Mumbai Indians (MI) will take on the Delhi Capitals (DC) in a top-of-the-table clash in the WPL 2023 season at the Dy Patil Stadium in Mumbai on Monday, March 20. Harmanpreet Kaur and Co. have a golden opportunity to secure the top spot if they win the game tonight and directly qualify for the final of the tournament.
However, both teams are coming off losses in their previous games and will know the importance of winning this game.
If DC beat MI tonight, both teams will be level on 10 points and with an almost equal chance of qualifying directly to the final. Mumbai will take confidence from the fact that they had beaten their opponents by eight wickets the last time these teams met at the DY Patil Stadium.
On that note, let's take a look at the three big match-ups that could potentially decide if the Mumbai Indians can secure a place in the WPL 2023 final tonight:
Hayley Matthews will once again take on the responsibility of providing MI with a rollicking start. She has been sensational with the ball in the tournament but hasn't been able to perform consistently with the bat. Matthews will want to sort this out before entering the playoffs but will face a stern test against star all-rounder Marizanne Kapp.
Kapp has simply been sensational with the new ball, having already picked a five-wicket haul in the WPL 2023 against the Gujarat Giants. She has dismissed Matthews thrice, but the batter has also scored 104 runs off 97 balls in all T20s. This makes it quite an interesting match-up.
Meg Lanning is enjoying a stellar WPL 2023 season with the bat, scoring 239 runs in just six games at a fantastic average of 47.80 and an impressive strike rate of 137.38. However, she was dismissed cheaply in the last game and that triggered a collapse that led to DC losing by 11 runs.
Lanning will know that her wicket is crucial for DC to get to a good score or chase down the target needed. Mumbai, on the other hand, will also believe that they have a match-up for Lanning in left-arm spinner Saika Ishaque. She began the WPL 2023 season really well but has failed to pick up wickets in two games.
Ishaque will be keen to get back to the top of the Purple Cap rankings and will want to get Lanning's wicket early. She had dismissed the DC skipper in the reverse fixture.
Mumbai's loss against the UP Warriorz proved that their lower-middle-order is a bit inexperienced. DC could use this to their advantage and try and rock their opposition early with quick wickets.
Harmanpreet Kaur has been the fulcrum of the MI middle order in WPL 2023 and she will once again be a crucial player for her side. Jess Jonassen has dismissed Harmanpreet five times in all T20s. However, the Mumbai Indian skipper has also scored 110 runs off the 97 balls that she faced from Jonassen.
This could prove to be a crucial player battle as Harmanpreet losing her wicket at the wrong time could put Mumbai on the back foot.
| english |
Pakistan Prime Minister Imran Khan on Wednesday vowed to steer the country out of a looming balance-of-payments crisis, days after his young government announced it would seek a fresh IMF bailout deal.
The cricketer-turned-premier said Pakistan needs $10-12 billion, which he dismissed as "not a major issue" in televised comments.
"We will get out of this. I will take (the country) out of this," he added.
"We have two options: one, we can go to friendly countries and ask them to bridge this gap; and second, that we go to the IMF," he said, adding that the government has decided to do "both".
Mr Khan's new administration took office in August vowing to weigh up whether to seek an IMF bailout to stabilise the shaky economy as it sought other avenues of financing.
He has sought loans from friendly countries, promised to recover funds stolen by corrupt officials, and embarked on a series of populist austerity measures such as auctioning buffalo and luxury cars owned by the prime minister's house, and crowdfunding to build a dam in the country's north.
But help has been in short supply and economists' warnings have grown increasingly urgent.
Finance minister Asad Umar, who is attending the fund's annual meeting in Bali this week, announced late Monday that the government had decided to begin talks with the IMF for a "stabilisation recovery programme".
Pakistan has gone to the IMF multiple times since the late 1980s. The last time was in 2013, when Islamabad got a $6. 6 billion loan to tackle a similar crisis.
Mr Khan, who came to power on an anti-corruption agenda and promises of building an Islamic welfare state, encouraged citizens not to get frustrated.
"This is a very small period (of crisis). Our country is a rich country, it is blessed by Allah. This country will come out of crisis," he said.
Khan also announced that his government will begin a massive low-cost housing scheme with the aim of building five million homes in five years.
He did not announce a price tag for the scheme, but promised it would "bring prosperity". | english |
Following Roma's loss to Sevilla in the Europa League final, Mourinho was critical of the refereeing after the game which resulted in Taylor and his family being harassed at Budapest Airport by supporters of the Italian club.
Sevilla has still never lost a final it has contested in the Europa League or its precursor, the UEFA Cup — the team also won the competition in 2006, ’07, ’14, ’15, ’16 and ’20 — and secured a place in next season’s Champions League.
Own goals from Tyrell Malacia and Harry Maguire in the 84th and 92nd minutes on Thursday left the quarterfinals in the balance at 2-2 ahead of next week’s second leg in Spain.
"Subsequent assessment of the injury suggested that Marcus will be unavailable for a few games, but is expected to be back for the season run-in," United said in a statement.
Mendilibar coached SD Eibar for six seasons (2015-2021) during their seven-season stay in Spain’s top flight and to an all-time high finish of 9th in 2017/18.
The 63-year-old Sampaoli was in charge of Sevilla in a total of 31 matches since taking over from Julen Lopetegui last year, with 13 wins, six draws and 12 losses.
Atletico Madrid rout Sevilla 6-1 on Simeone's historical night; Bayern Munich beat Stuttgart 2-1; Luka Jovic's brace ends AC Milan's four-game winning run.
The match was halted in the closing stages after a supporter ran onto the pitch and assaulted Dmitrovic, punching him in the face before being wrestled to the ground by the Serbian.
The incident happened late in the Europa League match at the PSV Stadium in Eindhoven and goalkeeper Marko Dmitrović carried on playing, apparently unhurt. | english |
<reponame>sluyters/Gester
{"name":"circle_left","subject":3,"date":"512010-022613","paths":{"Pen":{"strokes":[{"x":-5,"y":-135,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":-4,"y":-155,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":5,"y":-173,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":16,"y":-194,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":35,"y":-219,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":61,"y":-234,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":92,"y":-249,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":134,"y":-256,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":178,"y":-258,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":228,"y":-248,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":276,"y":-223,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":322,"y":-178,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":359,"y":-117,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":389,"y":-40,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":404,"y":50,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":409,"y":149,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":400,"y":250,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":379,"y":355,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":340,"y":450,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":293,"y":536,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":231,"y":607,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":160,"y":666,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":76,"y":708,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":-18,"y":737,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":-126,"y":748,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":-239,"y":742,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":-354,"y":718,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":-460,"y":679,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":-554,"y":622,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":-629,"y":548,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":-680,"y":455,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":-702,"y":352,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":-686,"y":240,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":-637,"y":129,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0},{"x":-559,"y":28,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":34,"stroke_id":0},{"x":-464,"y":-70,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":35,"stroke_id":0},{"x":-354,"y":-154,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":36,"stroke_id":0},{"x":-234,"y":-225,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":37,"stroke_id":0},{"x":-119,"y":-274,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":38,"stroke_id":0},{"x":-12,"y":-302,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":39,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Stylistic ST5022 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}} | json |
CPM state secretary Kodiyeri Balakrishnan on Saturday voiced his dissatisfaction over the opposition’s criticism against the Silverline project. He alleged that the opposition groups are trying to stop the Silverline project similar to the way they tried to sabotage the Life Mission project and free food kit distribution in the state.
With the advent of the semi-high speed train, people will be able to reach from one end of the state to the other easily. This was made possible during the rule of LDF government. VD Satheesan and the opposition are trying to raise objections out of fear that it will affect the vote bank of the UDF and BJP in the state, Kodiyeri wrote in an article published in the party mouthpiece.
He also vehemently criticized the central government for trying to object development projects in Kerala put forward by the LDF. That is why the Center, which initially supported the Silverline project, has now stepped backed from its previous stand. | english |
{
"id": 4713,
"title": [
"[Gyldemar Road]"
],
"description": [
"The taller members of the coniferous forest back away from the road slightly, allowing younger specimens to take root near the cobblestones. The treetops sway in a soft breeze that gently filters down to brush the lower tree branches and bring a welcome coolness to the area. A well-trodden path winds through the ferns, disappearing in the undergrowth to the northwest. It appears to be somewhat more than simply a game trail."
],
"paths": [
"Obvious paths: northeast, south"
],
"location": "Gyldemar Road",
"wayto": {
"4712": "south",
"4714": "go path",
"4715": "northeast"
},
"timeto": {
"4712": 0.2,
"4714": 0.2,
"4715": 0.2
},
"image": "en-gyldemar-1264234799.png",
"image_coords": [
196,
921,
206,
931
],
"tags": [
"handful of pinenuts",
"stick",
"some brostheras grass",
"some acantha leaf",
"tkaro root",
"blue trafel mushroom",
"blue whortleberry"
]
} | json |
Aside from the most awaited new characters in Genshin Impact version 2. 1, the live stream also revealed new bosses from Inazuma.
Currently, in Genshin Impact version 2. 0, players can fight three bosses in Inazuma to obtain ascension materials. They are Perpetual Mechanical Array, Pyro Hypostasis, and Maguu Kenki. These enemies drop the materials for Kamisato Ayaka, Yoimiya, and Sayu.
For the following 2. 1 updates, Genshin Impact will add another two bosses and one weekly boss. Most importantly, these new enemies may drop the ascension and talent materials needed for the upcoming characters Raiden Shogun, Sangonomiya Kokomi, Kujou Sara, and Aloy.
Signora is the infamous eighth of the Fatui Harbingers. She first appeared at the end of 'Prologue: Act 3' in Genshin Impact when her master ordered her to steal Venti's Gnosis.
Travelers greatly anticipated her to return in the future version, and Genshin Impact did not disappoint.
Signora made a comeback in Genshin Impact version 2. 1 with a crucial role in Inazuma as the new weekly boss. While no leakers disclosed her specific location, players speculate that she may have resided in Tenshukaku or the purple castle in Inazuma.
As a weekly boss, Signora is bound to drop talent materials. According to leaks, her materials are needed for all four upcoming characters in Genshin Impact version 2. 1.
This is, in fact, quite disheartening for some Travelers as they can't farm the talent materials for Raiden Shogun and Kujou Sara early on.
Thunder Manifestation, commonly known as Electro Oceanid, will be added as a new boss in Genshin Impact version 2. 1. It is located at Amakumo Peak in Seirai Island, a new isle also added in the 2. 1 update.
The ascension materials dropped by this boss can be used to upgrade the upcoming characters, Kujou Sara and Raiden Shogun.
Unfortunately, during the 2. 1 EN live stream yesterday, the presenters did not mention anything about Thunder Manifestation. Thus, Genshin Impact players are still in the dark about the enemy's skill.
Like Thunder Manifestation, Hydro Hypostasis can only be glimpsed in the 2. 1 Genshin Impact trailer for a few seconds. Although for a brief moment, this Hypostasis still manages to catch the attention of fans because of how eye-catching it looks.
Travelers also guessed that Hydro Hypostasis would drop the ascension materials needed for the new 5-star Hydro character, Sangonomiya Kokomi. Their theory was further proved by the location of Hydro Hypostasis, near the Sangonomiya Shrine in Watatsumi Island. | english |
Nike just unveiled a brand new version of their iconic Nike Cortez silhouette, this time donning a crisp "University Blue" color.
For more than 50 years, the Cortez has been one of the most recognizable Swoosh silhouettes. The sneakers were famously featured on Forrest Gump's feet as he jogged across America.
This silhouette will now arrive in a “University Blue” makeup for the latest makeover. The entire shoe is wrapped up in a White/University Blue-Sail-Team Orange color palette.
The Nike Cortez University Blue is a versatile pair of sneakers that can be worn with any outfit, from casual to formal. It is also a great way to show off your love for Nike and its classic silhouettes. The shoe is expected to drop in the coming months at select Nike Sportswear retailers and Nike. com for $100 per pair.
If you are a fan of Cortez or are looking for new sneakers to add to your collection, you don't want to miss this release.
The Nike Cortez is one of the most iconic sneakers in history. Designed by Nike co-founders Bill Bowerman and Phil Knight in 1972, the Cortez was originally created as a running shoe that combines comfort, durability and style.
The shoe has become a cultural phenomenon, worn by athletes, celebrities and everyday people alike. It has also been the subject of collaboration between Nike and various brands and artists, such as Sacai and CLOT.
For Spring 2023, Nike is releasing a new colorway for Cortez that pays homage to its heritage and adds a touch of modern flair. The Nike Cortez University Blue is a clean and crisp pair of sneakers that features a white leather upper with mesh tongues and lining. The shoe is contrasted by university blue accents on the Swooshes, heels and insoles, giving it a vibrant pop of color.
A light blue stripe along the sail midsole adds some retro charm, while the "Nike" branding on the tongue and heel nods to the original design. The shoe is completed by a rubber outsole that provides traction and durability.
The Nike Cortez University Blue is part of a larger lineup of Cortez colorways that Nike is releasing for Spring 2023. Some of the other options include a white/black version with light photo blue details, a velvet brown version with suede overlays, and a light orewood brown version with tan hues. Whether you prefer a classic or a contemporary look, Cortez is there for you.
The Nike Cortez University Blue is more than just a sneaker. It is a piece of history that celebrates Nike's legacy and innovation. It is also a statement of style that showcases your personality and taste. Don't miss this opportunity to own a pair of these sneakers and join the Cortez family.
Keep an eye out for the Nike Cortez "University Blue" release in 2023. If you are certain you must have these shoes, download the main SNKRS app from the Swoosh label or sign up on the website for immediate notification when the release dates for these sneakers are announced. | english |
"""
Скрипт, выводящий информацию о таблице экспорта PE-файла.
Для каждой экспортируемой функции выводит имя функции и ее RVA. Также выводит
общее количество экспортируемых функций.
Пример использования:
python get_export_info.py d:/file.exe
"""
import sys
import pefile
try:
file_path = sys.argv[1]
except IndexError:
print('Не указан файл.')
sys.exit(0)
try:
pe = pefile.PE(file_path)
except FileNotFoundError:
print('Не удается найти указанный файл:', sys.argv[1])
sys.exit(0)
except pefile.PEFormatError:
print('Файл', sys.argv[1], 'не является PE файлом Windows.')
sys.exit(0)
print('Библиотека:', pe.DIRECTORY_ENTRY_EXPORT.name.decode('utf-8'))
if hasattr(pe, 'DIRECTORY_ENTRY_EXPORT'):
for export_entry in pe.DIRECTORY_ENTRY_EXPORT.symbols:
print('\t' + export_entry.name.decode('utf-8'))
print('\t\tОрдинал:', str(hex(export_entry.ordinal)))
print('\t\tRVA функции:', str(hex(export_entry.address)))
else:
print('Файл', sys.argv[1], 'не содержит секцию экспорта.')
print('Всего экспортируется', len(pe.DIRECTORY_ENTRY_EXPORT.symbols), 'функций.')
| python |
<gh_stars>1-10
.header__container {
height: 50px;
background-color: #5682A3;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 .5rem;
}
.header__arrowleft__container {
/* flex: 1; */
}
.header__arrowleft {
color: white;
cursor: pointer;
}
.header__signout__right {
color: white;
cursor: pointer;
}
.header__fake__item {
/* flex: 1; */
}
.header__title__container {
display: flex;
align-items: center;
}
.header__title__container__click {
cursor: pointer;
}
.header__title {
color: white;
display: inline-block;
margin: 0;
}
.header__sub__title {
margin-left: 1rem;
margin-top: 3px;
}
| css |
<filename>stock_price_alert/alerts/forms.py
import random
from django.contrib.auth import get_user_model
from django.forms import ModelForm, CharField, BooleanField, FloatField, Form
from django.forms.widgets import TextInput
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Button, Field
from crispy_forms.bootstrap import Accordion, AccordionGroup, Tab, TabHolder, FormActions
User = get_user_model()
class AlertFormSetHelper(FormHelper):
def __init__(self, *args, **kwargs):
super(AlertFormSetHelper, self).__init__(*args, **kwargs)
self.form_method = 'post'
self.render_required_fields = True
r = random.randint(1, 100)
self.layout = Layout(
Accordion(
Fieldset('Alert Data', 'scrip_symbol', 'exchange_name', 'price', 'percentage',
'intraday_alert')
)
)
class AlertForm(Form):
scrip_symbol = CharField(max_length=50,
widget=TextInput(attrs={'placeholder': 'Scrip symbol like GOOGL'}))
exchange_name = CharField(max_length=10,
widget=TextInput(attrs={'placeholder': 'Exchange names like NSE or NASDAQ'}))
price = FloatField(widget=TextInput(attrs={'placeholder': 'Price of the scrip at which you want alert'}))
percentage = FloatField(required=False,
widget=TextInput(attrs={'placeholder': 'Notify on what % drop after alert price'}))
intraday_alert = BooleanField(required=False)
| python |
<filename>styles/bottomsection.css<gh_stars>0
.bottom-section {
background-color: black;
box-sizing: border-box;
line-height: 2.5rem;
padding: 3rem 5rem;
max-width: 100%;
min-width: 480px;
}
.sorting-bar p,.sorting-bar div {
display: inline-flex;
}
.sorting-bar p{
font-size: 2rem;
}
.sorting-bar img {
cursor: pointer;
width: 1rem;
}
.sorting-bar span{
vertical-align: middle;
}
.sorting {
position: absolute;
right: 5rem;
font-size: 1.5rem;
}
.continent-sorting > *{
margin:0 0.5rem;
}
.temperature-sorting > *{
margin:0 0.5rem;
}
.continent-city-list{
display: grid;
gap:2rem 5rem;
grid-template-columns: repeat(3,1fr);
grid-template-rows: repeat(4,1fr);
margin:2rem 0.2rem;
width: 100%;
}
.continent-city{
background-color: rgb(54, 54, 54);
border-radius: 0.5rem;
box-shadow: 5px 5px 10px #c7c7c7;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding:0.2rem 0.5rem;
}
.continent-city:hover {
background:rgb(61, 48, 48) no-repeat 100%;
cursor: pointer;
transform:scale(1.2);
}
.continent-name{
color:var(--bright-yellow-text);
font-size: 1.2rem;
}
.continent-city-name{
font-size: 1.2rem;
}
.current-city-time{
display: flex;
flex-wrap: wrap;
}
.continent-city-temperature{
font-size: 1.5rem;
}
.humidity{
font-size: 1.2rem;
}
.continent-sorting img:hover{
transform:scale(1.5);
}
.temperature-sorting img:hover{
transform:scale(1.5);
} | css |
The Premier League relegation zone is currently too tight to call, but I will make an attempt at deciphering it. With just nine points separating 10th from bottom, it is set to be the closest relegation battle in Premier League history. Here’s a run down of the teams struggling near the bottom.
Despite the fact they play nice football under Gus Poyet. Sunderland are littered with too many mistakes to stay in the Premier League. Lee Cattermole’s sloppy back-pass to Gabriel Agbonlahor for the only goal in the defeat to Aston Villa on New Years Day showed that well.
Furthermore, their form against teams at the bottom has been pretty poor. They haven’t beaten any of the other four sides currently occupying the bottom half of the league. If they are to stay up, this month will be critical. They have some winnable games against Fulham, Southampton and Stoke City. If they fail to win the maximum points from the month. It is difficult to see them staying in the Premier League.
The League Cup could also pose to be a hindrance. Now that they are in Semi-Finals, Poyet may gamble like Alex McLeish at Birmingham City a few years and go all out for a chance at silverware.
Injuries are ultimately costing West Ham currently, on New Years Day they were forced to play with four full-backs in defence. Also, they only have two fit strikers in Carlton Cole and Madibo Maiga, both of which are far from the quality needed to score them goals to keep them in the Premier League.
Johnny Hetinga’s recent rejection of the club may be points to a lack of appeal in the club. Which could be problematic when looking for players to fill the void in the January transfer market. With one player already rejecting them outright, Allardyce may panic buy in the market.
Like Sunderland, the League Cup could take it out of them. Without a trophy since 1980 and Sam Allardyce without a major honor in his managerial career. A League Cup win could prove too tantilising for West Ham.
Before the start of the season, everybody had written Crystal Palace off. So to be talking about them staying up is credit to Tony Pulis for the job he has done so far at Selhurst Park.
Palace have become more gritty under Pulis, since the start of December they have only conceded seven goals. However, they also have only scored seven goals.
What has been said about Palace is that they may get away with winning against the teams around them. They have only lost to one of the other bottom four sides as they went down 4-1 to Fulham at home.
Currently it’s hard to judge Cardiff City. If Ole Gunnar Solkjaer is given the backing that Vincent Tan has promised, it’s hard to see them being in much trouble come May. But, if Tan is constantly putting the pressure on him to deliver instant success as he did with Mackay. It’s difficult to see Cardiff City being able to progress under the iron-fist of the owner.
Over the course of the season, there has been flashes that Cardiff can compete with the very best such as their results against both Manchester clubs. However, it has been games like the 2-2 draw with Sunderland that have suggested that Cardiff will pay the price for some shoddy defending at times.
February is the month they need to get it right. They play Norwich, Swansea, Aston Villa and Hull, all games could be must-win on the day. In late January, they travel to both Manchester clubs in the space of two weeks. So winning may be the only alternative if they want to close the gap on the teams in the top half of the league.
Fulham seem like an accident waiting to happen. Against Hull City they completely capitulated as they lost 6-0, however against West Ham they managed to grind out a 2-1 win. That was perhaps because West Ham are one of the only sides more broken than Fulham.
The January transfer market will be key to their survival, if Berbatov leaves like papers have suggested Fulham don’t have a prayer. Despite all the negatives comments surronding the Bulgarian, he has delivered a fair few times this season for the London club.
Fulham probably have the kindest end to the season. In their final three games they face Hull, Stoke and Crystal Palace. All games that they will go into believing they can win. If they take some of the spirit shown in 2007-08, they will comfortably stay up. Whether they still have that battling spirit is questionable.
Norwich for all their star signings have been one of the most uninspiring teams in the Premier League. Injuries to Ricky Van Wolfswinkel and Gary Hooper earlier in the season has dragged them into a relegation battle that they could easily lose.
The Christmas period provided an excellent chance for them to get points on to the board, but they failed to pick up a single win. Two draws and a defeat to Fulham, Sunderland and Crystal Palace may seem like an absolute failure come May if they get relegated.
If they haven’t picked up around 40 points by mid April it is easy to see Norwich as goners in the relegation battle if they are in the bottom three. In their final four games of the season they play Liverpool, Manchester United, Chelsea and Arsenal. All games were it is conceivable to see them picking up a total of zero points. | english |
{"limit":1000,"name":"Powerburst of acceleration (2)","value":200,"highalch":120,"id":49059,"lowalch":80,"name_pt":"Furor de aceleração (2)","price":2352,"last":2352}
| json |
<gh_stars>1-10
"""
WARNING:
Using this script outside any server except one with IP 127.0.0.1 means risking getting
an instant and permanent ban, anywhere you use it.
The script was created *ONLY FOR LOCAL* testing purposes.
NEVER, NEVER, *NEVER* run it in an online multiplayer server.
At least unless you're a dumb freak.
"""
import multiprocessing
import time
from scripts import play
if __name__ == '__main__':
for i in range(1, 33):
process = multiprocessing.Process(
target=play,
kwargs=dict(nick=f'Player {i}', connect=['127.0.0.1'], new_sgip=False),
)
process.start()
time.sleep(0.09)
| python |
Shivam Mavi is one of the uncapped players who has been picked in the India squad for the T20I series against Sri Lanka. The IND vs SL T20I series starts on January 3. The series will witness three matches.
Hardik Pandya is the skipper of India in the IND vs SL T20I series. As some key players are rested for the series, some uncapped players have been picked for the series. Shivam Mavi is one of them. Here we take a glance at 3 reasons why Shivam Mavi didn’t deserve a place in India’s T20 squad vs Sri Lanka.
Shivam Mavi has no international experience in his kitty. The right-arm medium pacer has never played any international game. As a result, he might be benched in all three games too. Some other all-rounders with less international experience should have been part of the IND vs SL T20I series instead of Mavi.
| english |
<reponame>mimo31/fluid-sim<filename>src/app/preset-window.hpp
/**
* preset-window.hpp
*
* Author: <NAME>
* Created on 2021/03/07
*/
#ifndef PRESET_WINDOW_HPP
#define PRESET_WINDOW_HPP
#include "gtkmm/button.h"
#include "gtkmm/comboboxtext.h"
#include "gtkmm/grid.h"
#include "gtkmm/label.h"
#include "brandy-window.hpp"
#include "config-state-abstr.hpp"
namespace brandy0
{
/**
* Class representing the window offering a selection of simulation parameters presets
*/
class PresetWindow : public BrandyWindow
{
private:
/// Pointer to the parent (abstract) configuration state
ConfigStateAbstr *parent;
/// Window's main widget grid
Gtk::Grid grid;
/// Label explaining that the combo box shows presets
Gtk::Label presetLabel;
/// Combo box with all the presets
Gtk::ComboBoxText presetSelector;
/// Label with a warning that selecting (confirming) a presets overwrites all current paramters
Gtk::Label warnLabel;
/// Button for confirming preset currently selected in the combo box
Gtk::Button confirmButton;
public:
/**
* Constructs the preset window object
* @param parent pointer to the parent (abstract) configuration state
*/
PresetWindow(ConfigStateAbstr *parent);
};
}
#endif // PRESET_WINDOW_HPP | cpp |
{
"MonstrousHumanoid": [
"Wendigo",
"WasOnceAMan",
"BishonenLine",
"TransformationHorror",
"EvilMakesYouMonstrous",
"GameFace",
"LovecraftianSuperpower",
"HumanoidAbomination",
"EldritchAbomination",
"RedRightHand",
"UncannyValley",
"UncannyValley",
"LiminalBeing",
"MostWritersAreHuman",
"UncannyValley",
"OurVampiresAreDifferent",
"OurSpiritsAreDifferent",
"HumanoidAbomination",
"AllTrollsAreDifferent",
"BeastMan",
"Cthulhumanoid",
"CuteMonsterGirl",
"DraconicHumanoid",
"FaunsAndSatyrs",
"HarpingOnAboutHarpies",
"HornedHumanoid",
"OurDemonsAreDifferent",
"OurGhoulsAreCreepier",
"OurGiantsAreBigger",
"OurGoblinsAreDifferent",
"OurOgresAreHungrier",
"OurOrcsAreDifferent",
"WingedHumanoid",
"GodOfEvil",
"CapeWings",
"OneWingedAngel",
"HellishPupils",
"AmazonBrigade",
"OneWingedAngel",
"LovecraftianSuperpower",
"HumanoidAbomination",
"BigBad",
"HumanoidAbomination",
"HumanoidAbomination",
"BodyHorror",
"HellishPupils",
"HellishPupils",
"SealedEvilInACan",
"AnimalisticAbomination",
"BattleAura",
"Youkai",
"AnimalisticAbomination",
"UncannyValley",
"UncannyValley",
"MultiArmedAndDangerous",
"MonstrousMandibles",
"ToxicPhlebotinum",
"Shapeshifting",
"RealityWarper",
"TheSymbiote",
"MoreTeethThanTheOsmondFamily",
"AbsurdlySharpClaws",
"OverlyLongTongue",
"LovecraftianSuperpower",
"TheFairFolk",
"EyesDoNotBelongThere",
"FoodChains",
"OurOrcsAreDifferent",
"UncannyValley",
"HumanoidAbomination",
"WhenTreesAttack",
"EyelessFace",
"HumanoidAbomination",
"MoreTeethThanTheOsmondFamily",
"OurGiantsAreBigger",
"MultiArmedAndDangerous",
"MultipleHeadCase",
"SpiritualSuccessor",
"ALoadOfBull",
"WitchSpecies",
"OurCentaursAreDifferent",
"TheMorlocks",
"HarpingOnAboutHarpies",
"SharkMan",
"Medusa",
"SnakePeople",
"BeastMan",
"OurGoblinsAreDifferent",
"HumanoidAbomination",
"Cthulhumanoid",
"WasOnceAMan",
"BigBad",
"OurVampiresAreDifferent",
"BigBad",
"EldritchAbomination",
"HellishPupils",
"HumanoidAbomination",
"EvilKnockoff",
"NoBiologicalSex",
"ToxicPhlebotinum",
"PlanetEater",
"HumanoidAbomination",
"TheVirus",
"LovecraftianSuperpower",
"HumanoidAbomination",
"OurZombiesAreDifferent",
"BodyHorror",
"BigBad",
"AnimatedArmor",
"GlowingEyesOfDoom",
"RedEyesTakeWarning",
"RedRightHand",
"BFS",
"LooksLikeCesare",
"DependingOnTheWriter",
"TheFairFolk",
"EeriePaleSkinnedBrunette",
"CreepyShadowedUndereyes",
"FangsAreEvil",
"PrimalFear",
"TheReveal",
"EldritchAbomination",
"ArtifactOfDoom"
]
} | json |
Hotel Shahana Guest House is located in Andheri East of Mumbai. This hotel specialises in providing the most durable and comfortable stay to the guests at the most budgeted price. The hotel offers one of the finest services in the stay for business as well as vacation with friends, family and groups. The hotel staffs are professional and friendly and the services they offer make your stay in the hotel, peaceful and homely. The hotel also has a restaurant which serves you the best taste cuisines at the best prices. The hotel makes sure to offer you luxurious as well as tempted comfortable stay in the best budgeted constants. The hotel has been renowned for serving hospitality and comfy stay in the best way possible. The hotel also has 24 hours services available to make sure, anything you need in emergency is provided. The hotel also has rooms which are perfectly designed and have been equipped with all the modern day amenities that you need on your stay. The hotel services also offer you the services which are of full worth for the value paid. Since the hotel is situated closer to the commercial complexes and business hubs, it is very well suited for business as well as leisure stay.
The hotel offers their guests, 7 rooms, which are not just spacious and comfortable, but also well furnished with needed equipments.
The rooms are classified into dormitory, deluxe and super deluxe categories. All of the rooms have the private bathroom, which are clean and maintained. The rooms are also best suited to support you comfort and privacy, which you need.
The Shahana Hotel is situated closer to the nearby travel options. The Metro station is at a distance of just 1 km from the hotel. The hotel also stands 4km away from Chhatrapati Shivaji International Airport. You also need just 10 minute drive from the hotel to Andheri railway station.
| english |
<filename>src/main/resources/assets/bewitchment/patchouli_books/codex_infernalis/en_us/entries/demonic_gear/stew_of_the_grotesque.json
{
"name": "<NAME>",
"category": "demonic_gear",
"icon": "bewitchment:stew_of_the_grotesque",
"pages": [
{
"type": "text",
"text": "A vile mixture of a burning, sulfuric broth, certain plants with unique properties, as well as several hearty chunks of… its best not to ask. Drinking this foul brew in the presence of powerful demons proves your loyalty to them, and they shall deem you as worthy in order to share some of their power with."
},
{
"type": "bewitchment:cauldron_recipe",
"recipe": "bewitchment:stew_of_the_grotesque",
"text": "When in a coven, only one member of the coven must ingest this concoction in order to allow their whole coven to access the powers of the demon."
}
]
}
| json |
IslamTimes - Çempionlar Liqası pley-off mərhələsinin cavab oyunları keçirilib.
Apasport.az saytı xəbər verir ki, öz meydanında qələbə qazanan “Qalatasaray” qrup mərhələsində oynamaq hüququ qazanıb.
Türkiyə çempionu səfərdə olduğu kimi, doğma azarkeşlər qarşısında da qələbə qazanıb. “Sarı-qırmızılar” “Molde”ni məğlubiyyətə uğradıblar. Hesabı İkardi penalti zərbəsi ilə açıb. Qonaqlar bərabərlik qolunu vurmağa nail olsalar da, son dəqiqələrdə “Qalatasaray” qələbə topunu rəqin qapısından keçirib.
“Braqa” da hər iki oyunda qələbə qazanıb. Öz meydanında “Panatinaikos”a qalib gələn Portuqaliya təmsilçisi səfərdə də eyni uğuru təkrarlaya bilib.
“Yanq Boyz” İsveçrədə “Makkabi”yə qalib gəlib. 3:0 hesablı qələbə isveçrəlilərə turnirin qrup mərhələsində oynamaq hüququ verib.
| english |
It's time to move on to vBulletin 4.
I'm still not able to login and post properly.
I'm still not able to login and post properly.
^replace postnumber with the actual post number. For example this post's number is "1407242".
If you don't know the post number, you can find it out in the url of the #Postcount.
You'll be surprised to see this:
| english |
<gh_stars>1-10
{"ast":null,"code":"'use strict';\n\nconst KeytransformDatastore = require('./keytransform');\n\nconst ShardingDatastore = require('./sharding');\n\nconst MountDatastore = require('./mount');\n\nconst TieredDatastore = require('./tiered');\n\nconst NamespaceDatastore = require('./namespace');\n\nconst shard = require('./shard');\n/**\n * @typedef {import(\"./types\").Shard } Shard\n * @typedef {import(\"./types\").KeyTransform } KeyTransform\n */\n\n\nmodule.exports = {\n KeytransformDatastore,\n ShardingDatastore,\n MountDatastore,\n TieredDatastore,\n NamespaceDatastore,\n shard\n};","map":null,"metadata":{},"sourceType":"script"} | json |
Who is the ex-wife of Dwight Howard? The famous NBA athlete Dwight Howard married professional WNBA star Te’a Cooper in 2019. Dwight David Howard is a professional American basketball player who plays centre for the Taoyuan Leopards in the T1 League. Born on December 8, 1985, Howard also played in the National Basketball Association for many teams from 2004 to 2022. Before that, the professional player attended Southwest Atlanta Christian Academy in Georgia.
The Orlando Magic drafted Dwight Howard in the 2004 NBA draft. Then the NBA champion joined the Lakers in 2012, the Houston Rockets in 2013, the Atlanta Hawks in 2016, the Hornets in 2017, the Wizardsin 2018, the Lakers in 2019, the 76ers in 2020, the Lakers in 2021 and the Taoyuan Leopards in 2022. He is also an 8-time NBA All-Star and 8-time All-NBA Team member.
- Who is Dwight Howard’s Ex-Wife, Te’a Cooper?
- What is the age, height, and weight of Te’a Cooper?
- Where is Te'a Cooper now?
- When did Dwight Howard meet Te’a Cooper?
- When did Dwight Howard marry Te’a Cooper?
- How many children do Dwight and Cooper have together?
Who is Dwight Howard’s Ex-Wife, Te’a Cooper?
Te’a Cooper, is a professional American basketball player. She was born on April 16, 1997, and played point guard in the Women's National Basketball Association (WNBA) for the Los Angeles Sparks. Currently, she is a free agent. The 5ft-8 athlete also attended McEachern High School to play high school basketball before playing in the college basketball team from 2015 to 2020. She is one of the rising stars and popular players in the WNBA.
Initially, Cooper was drafted by the Phoenix Mercury in the 2020 WNBA draft. But the team had to withdraw some players following the pandemic of COVID-19 and Cooper was one of them. Meanwhile, the Los Angeles Sparks took this opportunity to hire some of the Pheonix Mercury players and traded Te’a Cooper as a point guard in the same year.
|5 feet and 8 inches (1.73m)
|Basketball (WNBA)
|Dwight Howard (Ex)
What is the age, height, and weight of Te’a Cooper?
Te’a Omari Cooper is currently 26 years old. She was born on 16 April 1997 in Newark, New Jersey. The gorgeous girl’s father’s name is Omar Cooper, and her mother’s name is Kindell Cooper. She is one of four children. Her siblings include Sharife, Omar, and Mia Cooper. In terms of height and weight, Te’a Cooper measures 5 feet and 8 inches (1.73m) and weighs 73kg (160lb), respectively.
By profession, Dwight Howard’s ex-wife, Te'a Cooper, is a professional basketball player. She played for the Los Angeles Sparks as a point guard in the Women's National Basketball Association. Before entering the WNBA, she also played high school and college basketball. McEachern High School finished 33-0 during her freshman year. Also, Cooper acquired three Georgia 6A State titles in 2012, 2014, and 2015, alongside becoming the co-MVP of the McDonald’s All-America game in 2015.
When it comes to the WNBA, she was originally traded to the Phoenix Mercury in the 2020 WNBA draft. But things went off the plan for the team due to the quick spread of the COVID-19 pandemic. In May 2020, they were forced to drop some players, and Te’a Cooper was one of them. The Los Angeles Sparks snatched this opportunity immediately and included these dropped players in the team, including Cooper. Against the Washington Mystics on August 13, 2020, she played one of her best games of the season with 10 points and 3 assists within a 19-minute playing time.
In terms of net worth, Cooper has just started his professional career in basketball, and she has a long way to go. However, Te’a has already started earning a handsome fortune from her career as a rookie. Her current net worth is approximately USD 2-4 million.
In addition to her professional WNBA career, we are unaware of her other wealth-generating sources and endeavors. However, she has done some commercials for some leading sports brands. We can expect her to grow exponentially in her career in the coming years.
Where is Te'a Cooper now?
The former Los Angeles Sparks point guard is currently a free agent. She last played for the franchise and in the WNBA in 2021. At present Cooper is active with brand deals.
Recently, Cooper revealed on Instagram Live on July 24 that she plans to return to the game of baskeball very soon. In 2024, she plans to play in the Athletes Unlimited which is a professional basketball league for women in Las Vegas. This league gives opportunities for players who are not playing in the WNBA to showcase their skills and to earn the chance to get an offer from the WNBA franchises.
When did Dwight Howard meet Te’a Cooper?
There is no confirmed information about how long the two basketball professionals have known each other. It is speculated that Dwight may have met Cooper when she was still in high school. Cooper was a well-focused and disciplined girl since her early years of life. She was a brilliant student and was well-liked by her teachers.
Dwight and Cooper were successful in keeping their relationship under cover until 2019. After that, they started posting their photos together on their social media handles. In the meantime, Dwight posted a photo in which he was hugging Cooper, and she was showing a diamond ring. It is deleted now, however.
When did Dwight Howard marry Te’a Cooper?
As mentioned above, both professional American basketballers kept their love affair under cover until 2019. Dwight Howard and Te’a Cooper got engaged in 2019. After a year, in 2020, the couple married each other in a super-secret ceremony. They didn’t reveal much about their marriage and only shared a few pictures.
Dwight Howard is around 12 years older than the former Los Angeles Sparks point guard. Once in a sports conversation, Dwight said that he is delighted and had feelings he had never experienced before. He also admitted that his marriage changed his life to be a better person. He further said that they will try to push each other to help achieve new heights in their career. The couple could also be seen cooking, exercising, and praying together in some social media posts. They ideally share the same interests and belong to the same profession.
How many children do Dwight and Cooper have together?
Dwight Howard and Te’a Cooper don’t have any kids together. But the surprising thing is that Dwight has five kids who are from five different women. It has been one of the highlighting sources of controversy throughout his career. The professional player has been heavily criticized due to his multiple paternity issues.
In 2007, Dwight Howard’s first son, Braylon Howard was born from former Orlando Magic cheerleader Royce Reed. Jayde, Layla, David, and Dwight II are the other four children from four different relationships.
Dwight Howard and Cooper shared rings (engagement) in 2019 and got married in 2020. However, they separated in 2021, only a year after the marriage. The couple managed to keep their love story and marriage a secret. But the news of their breakup went viral like wildfire on social media. They were a fabulous combination of basketball and love, and their separation was quite shocking for their fans and followers.
After departing from Dwight Howard in April 2021, Cooper came into a relationship with Alvin Kamara, a professional football player. They kept their connection under covers initially and made it public in September 2021.
Born on July 25, 1995, Kamara plays for the New Orleans Saints in the National Football League. As of 2022, Alvin Kamara’s net worth is estimated to be USD 8 million. Cooper extended warm and lovely congratulations on Instagram on the birthday of her new boyfriend in July. She wrote a lengthy caption to express openly what she feels about Kamara.
Q. Who is Dwight Howard’s ex- wife?
A. Te’a Cooper was the ex-wife of former NBA center, Dwight Howard. She is also a professional WNBA player who is currently a free agent.
A. Te’a Cooper was the ex-wife of former NBA center, Dwight Howard. She is also a professional WNBA player who is currently a free agent.
Q. How long were Dwight and Cooper dating each other before marriage?
A. Dwight Howard dated Cooper for several months before marrying her in 2020.
Q. How tall are Dwight Howard and Te’a Cooper?
A. Dwight Howard is 6 feet and 10 inches tall, while her ex-wife is 5 feet and 8 inches tall.
Q. Is Dwight Howard an NBA champion?
A. Yes, Dwight Howard won an NBA championship in 2020 while serving the Los Angeles Lakers.
Q. How many kids do Dwight Howard and Te'a Cooper have together?
A. Howard and Cooper don’t have any children together.
A. Howard and Cooper don’t have any children together.
| english |
- 2 hrs ago 5 Best Microwave Ovens For Your Kitchen: Deals To Consider As Amazon Sale 2023 Is Nearing!
- Movies Sivakarthikeyan's Son Gugan Doss Turns 2: Beautiful Family PICS Go Viral; Fans Call Him 'Kutti Maaveeran'
- Travel Have you been to Vishveshwaraya Falls in Mandya yet? If not, this is the best time!
Planning to go veg and skip those yummy meaty dishes? Well, then here are some of the things you should consider before you make up your mind of going green. Though being a vegetarian isn't a bad idea, there are certain health problems one would face from being a regular meat eater and turning into a completely vegetarian.
Gradually through the process, you're body will begin to lack iron, protein and even calcium. To keep yourself fit, healthy and away from these problems, you need to substitute healthy vegetarian foods to keep the balance of proteins and nutrients intact.
Here are some of the tips to get you started with. Take a look at some of the these things before you turn veg. Plan in advance to keep your vitals up and healthy.
Being a vegetarian, you need to be more concerned about your iron intake. Non-vegetarian food contain a lot of iron when compared to simply veg.
When you convert to a vegetarian, focus on foods that are high in vitamin D& B12. You should also pay close attention to foods that have calcium.
To keep your body balanced with fibre, opt for smoothies and not fruit juice. The former contains fibre which is good for the digestive system.
It is safe to opt for natural sources of protein in your smoothie other than chemically treated powders. You should also know that the amount of protein you need strongly depends on how active you are.
Going vegetarian means cutting out, all kind of dairy products which are non-vegetarian. If you strictly skip dairy, there are other sources of calcium you can consume. So, make the best of it.
One of the things to know before turning vegetarian is to steam your veggies instead of boiling or frying it. When steamed, you are consuming more nutrients which is good for the body when you don't eat meat.
Get creative with hummus as it is one of the ways or ingredients which adds protein and iron to your diet.
- yoga spiritualityChanting Surya Mantra on Sunday: Benefits and Significance!
- healthMyths vs Fact: Can Rubbing Your Nails Really Make Your Hair Grow?
- healthDental Implants After Cancer Treatment: How It Helps!
- healthTim McGraw Keto Gummies Reviews: Is Lainey Wilson Safe & Where To Buy? | english |
<gh_stars>1-10
{
"id": 4433,
"cites": 10,
"cited_by": 0,
"reference": [
"<NAME> (1986), Increasing Returns and Long Run Growth, Journal of Political Economy, Vol. 94, October.",
"<NAME> (1988), Analytics of Development: Dualism, in H. Chenery and T.N. Srinivasan (Eds.) Handbook of Development Economics. Volume I, Elsevier Science Publishers B.V.",
"<NAME>. (1968), A `Diffusion Model of International Productivity Differences in Manufacturing Industries, American Economic Review, Vol. 58, December.",
"<NAME> (1976), Efficiency Frontiers for Industrial Establishments of Different Sizes, Explorations in Economic Research, Vol. 3, No. 3, Summer.",
"<NAME> (1970), Dualism and the International Integration of the Underdeveloped Economies, Banca Nazionale del Lavoro Ouarterly Review, No. 93, June.",
"<NAME> and <NAME> (1992), A Sensitivity Analysis of Cross-Country Growth Regressions, American Economic Review, Vol. 82, September.",
"<NAME> (1993), Technology, Market Characteristics, and Spillovers, Journal of Development Economics, forthcoming.",
"Blomstr\u00c3\u0083\u00c2\u00b6m, Magnus (1989), Forehin Investment and Spillovers. A study of Mexico, London: Routledge.",
"<NAME>. (Ed.) (1992), Trade Policy. Industrialization, and Development: New Perspectives, Oxford and New York: Clarendon Press.",
"<NAME>, <NAME>, and <NAME> (1989), Productivity and American Leadership: The Lone View, Cambridge, MA: MIT Press."
]
} | json |
11 Awo Mukama n’agamba Musa nti, “Ekyaliyo ekibonoobono kimu kye nzija okuleetera Falaawo n’ensi y’e Misiri. Oluvannyuma lwakyo ajja kubaleka mugende; ate bw’anaabakkiriza okugenda, ajja kubeegoberako ddala bwegobi abasindiikirize. 2 (A)Kale, tegeeza abantu, buli musajja asabanga muliraanwa we, ne buli mukazi asabanga muliraanwa we, ebintu eby’omuwendo ebya ffeeza n’ebya zaabu.” 3 (B)Mukama n’aleetera Abamisiri okukwanagana n’abaana ba Isirayiri; ne Musa n’aweebwa nnyo ekitiibwa mu nsi y’e Misiri. Abakungu ba Falaawo n’abantu bonna ne bamugulumiza nnyo.
4 (C)Awo Musa n’agamba Falaawo nti, “Mukama agambye bw’ati nti, ‘Nga wakati mu ttumbi, nzija kuyita mu Misiri yonna. 5 (D)Ebibereberye mu nsi y’e Misiri bijja kufa, okutandikira ku mubereberye wa Falaawo agenda okumusikira, okutuukira ddala ku mubereberye[a] w’omuwala omuzaana asa ku lubengo; era n’ebibereberye byonna eby’ebisolo. 6 (E)Wajja kubaawo okukungubaga okunene mu nsi yonna eya Misiri, okutabangawo era nga tewagenda kubaawo kukwenkana. 7 (F)Naye mu baana ba Isirayiri n’embwa teribaayo gw’eboggolera wadde ebisolo byabwe; mulyoke mutegeere nga Mukama Abamisiri n’Abayisirayiri tabayisa bumu.’ 8 (G)Era bano abakungu bo bonna balijja gye ndi nga babundabunda, ne banvuunamira nga banneegayirira nti, ‘Genda, ggwe n’abantu bo bonna abakugoberera.’ Oluvannyuma lw’ebyo nange ndigenda.” N’ava awali Falaawo n’obusungu bungi nnyo.
9 (H)Mukama yali agambye Musa nti, “Falaawo tagenda kuwuliriza by’omugamba, bwe ntyo ndyoke nkolere ebyamagero byange bingi mu Misiri.” 10 (I)Musa ne Alooni baakolera ebyamagero ebyo byonna awali Falaawo; naye Mukama yakakanyaza omutima gwa Falaawo, n’atakkiriza baana ba Isirayiri kuva mu nsi ye.
- 11:5 Mu bitundu ebyo, omwana owoobulenzi nga ye mubereberye yali wa muwendo nnyo eri ennyumba gy’avaamu.
Bayibuli Entukuvu, Endagaano Enkadde nʼEndagaano Empya Copyright © 1984, 1986, 1993, 2014 by Biblica, Inc.® Tuweereddwa olukusa okuva mu Biblica, Inc.® Olukusa lwonna mu nsi yonna lusigalidde mu Biblica, Inc. Luganda Contemporary Bible Copyright © 1984, 1986, 1993, 2014 by Biblica, Inc.® Used by permission of Biblica, Inc.® All rights reserved worldwide.
| english |
from django.contrib import admin
from first_app.models import Topic, Webpage, AccessRecord
# Register your models here.
admin.site.register(Topic)
admin.site.register(Webpage)
admin.site.register(AccessRecord)
| python |
<gh_stars>0
export * from './update-params';
| typescript |
<reponame>Portfolio-Projects42/gatsby-advanced-blog<gh_stars>0
{"componentChunkName":"component---src-templates-resume-jsx","path":"/resume/","result":{"data":{"site":{"siteMetadata":{"title":"Gatsby Advanced Blog","author":"wonism","homepage":"https://gatsby-advanced-blog.vercel.app"}},"resume":{"id":"2ce9d8ca-8b09-503a-8917-928f53c4bd5a","html":"<h2>Experience</h2>\n<p><strong>Product Development Engineer |</strong> <a href=\"https://www.cembre.com/\"><em><strong>Cembre</strong></em></a><em><strong>, Edison, NJ</strong>\\</em>_|_<strong>Oct 2019 - Mar 2020</strong></p>\n<ul>\n<li>Converted client’s product needs into <a href=\"https://www.cembre.com/family/details/5202\">technical specs</a> to be sent to the development team in Italy.</li>\n<li>Reorganized internal file server structure and conducted system integration and product demonstrations.</li>\n<li>Presided over internal and end user software trainings in addition to producing customer facing documentation.</li>\n<li>Conducted <a href=\"https://drive.google.com/drive/folders/1USAQtiQ3jLm3fiRCxIm4TEkWGlq4fO6j?usp=sharing\">electrical conductivity & tensile testing of electrical components</a> and presided over troubleshooting railroad hardware and software in North America.</li>\n</ul>\n<p><a href=\"https://familypromise.org/\"><strong>Family Promise</strong></a> <strong>Service Tracker</strong></p>\n<p><strong>Full Stack Web Development Intern | Remote | Sept 2021 - Present</strong> <strong><a href=\"https://a.familypromiseservicetracker.dev/\">Live Site |</a><a href=\"https://github.com/Lambda-School-Labs/family-promise-service-tracker-fe-a\">GitHub</a></strong></p>\n<p><strong>Stack:</strong> <em>React | Redux | ExpressJS | Figma | Okta | AWS</em></p>\n<p><em><strong>An</strong></em><a href=\"https://bryan-guner.gitbook.io/lambda-labs/navigation/roadmap\"><em><strong>app</strong></em></a><em><strong>built to helps local communities provide services to address the root causes of family homelessness</strong></em></p>\n<ul>\n<li>Collaborated on state management using Redux to handle application state and middleware using redux-promise & redux-thunk.</li>\n<li>Built two graphic visuals of the user hierarchy and the scope of their permissions as well as maintained the team’s <a href=\"https://bryan-guner.gitbook.io/my-docs/v/lambda-labs/\">docs</a>.</li>\n<li>Created Figma UI mockups for possible future developments, such as displaying metrics data and map pinpoint functionality.</li>\n</ul>\n<h2>Education</h2>\n<ul>\n<li>\n<p>B.S. in Computer Science Engineering at OOO</p>\n<ul>\n<li>\n<ol start=\"2000\">\n<li>01 ~ 2000. 01</li>\n</ol>\n</li>\n</ul>\n</li>\n</ul>\n<h2>Projects</h2>\n<ul>\n<li>\n<p>Gatsby Advanced Blog (<a href=\"https://github.com/wonism/gatsby-advanced-blog\">https://github.com/wonism/gatsby-advanced-blog</a>) ∙ 2000. 01 ~ Present</p>\n<ul>\n<li>Integrate Redux</li>\n<li>Use Redux, Redux Saga, Reselect…</li>\n</ul>\n</li>\n</ul>\n<h2>Skills</h2>\n<ul>\n<li>\n<p>JavaScript</p>\n<ul>\n<li>ES2015+</li>\n<li>ReactJS</li>\n<li>Lodash</li>\n</ul>\n</li>\n<li>\n<p>CSS</p>\n<ul>\n<li>SASS</li>\n<li>Less</li>\n</ul>\n</li>\n</ul>","frontmatter":{"title":"Resume","date":"2000-01-01T00:00:00.000Z"}}},"pageContext":{}},"staticQueryHashes":["3020484120"]} | json |
Pride Parade attendees assumed the noise of firecrackers to be gunfire, which sent crowds running during two of the country’s largest Pride Parades in New York City and San Francisco this weekend despite law enforcement confirming false alarms. There were no injuries, reported the NYPD.
Thousands of people attended this Sunday's LGBTQIA+ Pride parade in New York, which sprawled across lower Manhattan.
New York's Pride Parade is considered the second-largest in the United States after San Francisco. It was also the first time people had gathered in significant numbers since the COVID-19 pandemic began.
Tweeting about the incident and clarifying that the situation was nothing but a false alarm, NYPD wrote:
"There were NO shots fired in Washington Square Park. After an investigation, it was determined that the sound was fireworks set off at the location. "
Meanwhile, the panic caused by the confusion was described as "chaotic" because it led to a stampede. People reportedly started running and screaming after hearing shots being fired.
After paradegoers ran frantically due to the alleged sounds of gunfire, NYPD Chief of Patrol Jeffrey Maddrey confirmed that there had been no shots fired in Washington Square Park. Further investigations by the NYPD revealed that it was fireworks that were set off at the 9. 75-acre public park in Greenwich Village.
Authorities confirmed that even though a stampede took place, there were "no serious injuries. "
Meanwhile, police officers in San Francisco, posted in the Civic Center area for the city's Pride Festival, responded to the shooting near 7th and Market Streets in the evening.
However, officers could not find any victims or witnesses of the alleged shooting. Even then, the cops continued to monitor activity on the scene to ensure the safety and security of Pride events.
Citizens are on edge due to the recent rise in gun-related violence in the country, especially the infamous mass shootings in Uvalde, Texas, and Buffalo, New York.
Some social media users pointed out the recent shooting at a gay bar in Oslo, Norway. The shooting incident killed two people and injured more than a dozen in a case of possible terrorism.
When asked about their opinions on the Supreme Court's recent ruling on abortion, organizers called the decision "devastating. " At the New York City Pride Parade, Planned Parenthood was the first contingent.
The organizers said:
"This dangerous decision puts millions in harm's way, gives government control over our individual freedom to choose, and sets a disturbing precedent that puts many other constitutional rights and freedoms in jeopardy. "
Several rights groups believe that the verdict on abortion could spell trouble, given that a conservative majority dominates the Supreme Court. It could restrict the freedoms experienced in recent areas of contraception and same-sex marriage. | english |
{
"title": "Summarise what happened to you",
"h1": "Summarise what happened to you (optional) (to do)",
"p1": "This is your opportunity to explain why you are making a claim to an employment tribunal.",
"p2": "It’s important you focus on setting out what happened to you and explain, as far as you can, why you think what happened was unlawful.",
"p3": "Your claim will be sent to the respondents who will have a chance to reply through the tribunal.",
"p4": "The Tribunal will then decide (usually via a hearing) whether the respondents have acted unlawfully.",
"insetText": "We do not need detailed supporting evidence, such as copies of emails, letters or other documents, at this stage. Keep hold of these documents in case they are needed. You may need to bring them to a hearing.",
"subTitle1": "What to include in your claim",
"p5": "Use the guidelines in the following links to help you stick to the facts and order your description.",
"collapsableSection1": {
"linkText": "What to write for discrimination claims",
"p1": "Describe the events you are complaining about.",
"p2": "Try to give the dates of the events (and set them out in date order) and the names of other people involved. Explain, as best as you can, why you consider that these events mean that you have been unlawfully discriminated against, by reference to the protected characteristics you rely on."
},
"collapsableSection2": {
"linkText": "What to write for dismissal claims",
"p1": "Describe the circumstances of your dismissal.",
"p2": "Try to give the dates of the events (like dismissal meetings) and the names of others involved (such as the person who dismissed you). You should explain, as best you can, why you consider that your dismissal was unfair."
},
"collapsableSection3": {
"linkText": "What to write for whistleblower claims",
"p1": "Give the dates of each time you say you \"blew the whistle\" by making a protected disclosure. For each disclosure summarise the information you disclosed, whether it was done verbally or in writing, the person to whom you made the disclosure, what kind of wrongdoing you were disclosing, and why the disclosure was in the public interest.",
"li1": "Explain how you were treated detrimentally (which can include being dismissed) because of the disclosure(s), giving dates and summarising the incidents.",
"li2": "Give the names of the people involved in and witness to these events and incidents.",
"li3": "Describe how you've been affected by the detrimental treatment."
},
"collapsableSection4": {
"linkText": "What to write for 'other' claims",
"li1": "The tribunal can only hear cases where legislation gives it power to do so. Explain briefly, if you can, what legislation you say covers this claim.",
"li2": "Even if you cannot, the most important thing is to explain what was done and, so far as you can, why you say it was unlawful. Give dates and brief details of each incident, including the name of the person responsible."
},
"textInputHint": "Use this box to describe the events around your dispute, or add to your claim by uploading a document",
"fileUpload": {
"linkText": "Upload a document to support your claim (optional)",
"hint": "<p>You can only upload 1 document.</p><p>Upload a file</p>"
}
}
| json |
Chirag Paswan met Lok Sabha Speaker Om Birla to present his case against the decision to accept the claim of the other faction declaring Paras as the leader of the party in the Lok Sabha.
The Lok Janshakti Party (LJP) faction, headed by Pashupati Kumar Paras, on Saturday disbanded all bodies and state units affiliated with the party and announced a new national executive, while Jamui MP Chirag Paswan, along with his aides, called on Lok Sabha Speaker Om Birla in New Delhi. The decision comes a day ahead of the national executive meeting called by the Paswan faction.
With Paras as its president, all four other MPs figure in the executive – Chowdhary Mehbob Ali Kaiser and Veena Devi have been made the national vice-president while Chandan Singh and Prince Raj have been appointed as national general secretaries. In a letter, Paras said the other state committees and cells would be formed in due course.
Later in the evening, Paswan met Lok Sabha Speaker Om Birla to present his case against the decision to accept the claim of the other faction declaring Paras as the leader of the party in the Lok Sabha.
“I told the Speaker why he needs to review the decision. Our party’s constitution says the central parliamentary board has to clear all decisions. I am sure the Speaker was not aware of this party constitutional requirement. He can give them the status of a separate party, but Paras cannot be appointed as the party chief in the Lok Sabha,” Paswan said after the meeting.
Earlier this week, Paras and four other MPs ostensibly ousted Paswan from the posts of party president and leader of the party in the Lok Sabha.
On Friday, Paswan told the EC that the rebels had no locus standi to make the decisions that they had. He asked that they be barred from using the party symbol. “Only nine members elected Paras as the president of the party,” he had said and demanded a ban on the use of the party’s symbol and flag.
During the meeting with EC officials, while the Paswan faction submitted the names of 77 members, the Paras faction is yet to submit its list. | english |
Shiv Sena (UBT) MP Sanjay Raut on Thursday claimed that the unrest witnessed in Kolhapur over the past two days did not involve people from the city. Raut, instead, claimed the involvement of outsiders in Kolhapur violence, hinting at a deliberate bid to disturb the situation in the district.
Speaking to reporters, Raut denied the participation of people of Kolhapur in the communal violence over the alleged circulation of pictures of the Aurangzeb on a WhatsApp status.
“As per my knowledge, people of Kolhapur were not involved in this clash. People from outside Kolhapur were brought in to disturb the situation…Why is this happening again and again ever since your (BJP) government came to power?” Raut asked.
The violent protest in Kolhapur began on Wednesday over a social media post glorifying 18th century Mughal ruler Aurangzeb and Mysore ruler Tipu Sultan.
The Kolhapur police initiated a probe on Tuesday on social media messages with the images of Aurangzeb and Tipu Sultan accompanied by an audio message.
In the turn of events, Maharashtra government on Wednesday announced curfew and suspension of Internet till June 19 and June 8, respectively.
Deputy CM of Maharashtra Devendra Fadnavis strongly condemned the incidents of violence in Kolhapur.“There is no forgiveness in Maharashtra for those who praise Aurangzeb. Police are also taking action”, said deputy CM.
Previously, Maharashtra CM Eknath Shinde claimed the investigations are in progress over Kolhapur mob violence on Wednesday.
“It’s the government’s responsibility to maintain law and order in the state. I also appeal to the public for peace and calm. Police investigation is underway and action will be taken against those found guilty,” he said.
| english |
Judgement Time!!
Guys, anyone here who has his phone delivered, Any issues with yellow tint or so. Also i have a query regarding the camera. Why does it take a 4:3 aspect photo in its higher resolution. Even my Sony xperia SL took higher aspects than this. LG G3 with higher pixels manages 16:9. Then why OPO?
| english |
<reponame>SimonbJohnson/hdx_info<gh_stars>0
{"title": "Djibouti - Aid Effectiveness", "downloads": 81, "tags": ["aid effectiveness", "hxl", "indicators", "Djibouti"], "hxl": 1, "org": "World Bank Group", "id": "21080e1d-d77f-408f-a4bb-7cec2c0a2597", "resources": [{"bites": {"maps": {"bites": []}, "charts": {"bites": [{"title": "Top 10 of Value by Indicator Name", "bite": [["Indicator Name", "Value"], ["Net official development assistance and official aid received (constant 2018 US$)", 7462310035.705569], ["Net official development assistance received (constant 2018 US$)", 7462310035.705569], ["Net official development assistance and official aid received (current US$)", 4972560033.321381], ["Net official development assistance received (current US$)", 4972560033.321381], ["Net bilateral aid flows from DAC donors, Total (current US$)", 3298789991.315454], ["Grants, excluding technical cooperation (BoP, current US$)", 2842250000], ["Net bilateral aid flows from DAC donors, France (current US$)", 1899129992.9618833], ["Technical cooperation grants (BoP, current US$)", 1291550000], ["Net bilateral aid flows from DAC donors, Japan (current US$)", 436349999.7835606], ["Net bilateral aid flows from DAC donors, European Union institutions (current US$)", 341900001.2390316]], "priority": 8, "subtype": "row", "uniqueID": "chart0014/#indicator+name/3/#indicator+num+value/5", "type": "chart", "id": "chart0014"}, {"title": "Top 10 of Value by Indicator Code", "bite": [["Indicator Code", "Value"], ["DT.ODA.ALLD.KD", 7462310035.705569], ["DT.ODA.ODAT.KD", 7462310035.705569], ["DT.ODA.ALLD.CD", 4972560033.321381], ["DT.ODA.ODAT.CD", 4972560033.321381], ["DC.DAC.TOTL.CD", 3298789991.315454], ["BX.GRT.EXTA.CD.WD", 2842250000], ["DC.DAC.FRAL.CD", 1899129992.9618833], ["BX.GRT.TECH.CD.WD", 1291550000], ["DC.DAC.JPNL.CD", 436349999.7835606], ["DC.DAC.CECL.CD", 341900001.2390316]], "priority": 8, "subtype": "row", "uniqueID": "chart0014/#indicator+code/4/#indicator+num+value/5", "type": "chart", "id": "chart0014"}]}, "text": {"bites": [{"bite": "<span class=\"hbheader\">Value</span>: <span class=\"hbvalue\">35915115124.29159</span>", "priority": 8, "subtype": "topline figure", "uniqueID": "text0017/#indicator+num+value/5", "type": "text", "id": "text0017"}]}}, "update_date": "2021-01-28T06:02:39.389513", "link": "https://data.humdata.org/dataset/21080e1d-d77f-408f-a4bb-7cec2c0a2597/resource/fa26a420-1273-4095-a27a-b3b7eaf0a312/download/aid-effectiveness_dji.csv", "hxl": 1}, {"bites": {"maps": {"bites": []}, "charts": {"bites": [{"title": "Value by Indicator Code for 2019", "bite": [["Indicator Code", "Value"], ["SH.DYN.MORT", 57.5], ["SH.TBS.INCD", 234]], "priority": 8, "subtype": "row", "uniqueID": "chart0007/#indicator+code/2/#indicator+num+value/3/timefilter", "type": "chart", "id": "chart0007"}, {"title": "Value by Indicator Code", "bite": [["Indicator Code", "Value"], ["SH.DYN.MORT", 4697], ["SH.TBS.INCD", 9468], ["SH.STA.MMRT", 6120]], "priority": 8, "subtype": "row", "uniqueID": "chart0007/#indicator+code/2/#indicator+num+value/3", "type": "chart", "id": "chart0007"}]}, "text": {"bites": [{"priority": 10, "subtype": "datefilter", "bite": "Data filtered on Year for 2019", "type": "text", "id": "text0000"}, {"bite": "<span class=\"hbheader\">Value</span>: <span class=\"hbvalue\">291.5</span>", "priority": 8, "subtype": "topline figure", "uniqueID": "text0017/#indicator+num+value/3/timefilter", "type": "text", "id": "text0017"}, {"priority": 10, "subtype": "datefilter", "bite": "Data filtered on Year for 2019", "type": "text", "id": "text0000"}, {"bite": "<span class=\"hbheader\">Value</span>: <span class=\"hbvalue\">20285</span>", "priority": 8, "subtype": "topline figure", "uniqueID": "text0017/#indicator+num+value/3", "type": "text", "id": "text0017"}]}}, "update_date": "2021-01-28T06:02:39.389513", "link": "https://data.humdata.org/dataset/21080e1d-d77f-408f-a4bb-7cec2c0a2597/resource/48666d36-740c-412b-aa8e-17eb9ff89413/download/qc_aid-effectiveness_dji.csv", "hxl": 1}]} | json |
<reponame>nathanfaucett/component
var tape = require("tape"),
createComponentFunction = require("..");
function stringChecker(props, propName /*, displayName, locale */ ) {
if (typeof(props[propName]) !== "string") {
return new TypeError("Invalid String");
} else {
return null;
}
}
tape("createComponentFunction(options: Object, func: Function) should create new function with prop type checker", function(assert) {
var signIn = createComponentFunction({
name: "signIn",
propTypes: {
username: stringChecker,
password: stringChecker
}
},
function signIn(props, callback) {
var username = props.username,
password = props.password;
callback(undefined, {
username: username,
password: password
});
}
);
signIn({}, "en", function onSignIn(errors) {
assert.equal(errors[0].message, "Invalid String");
assert.equal(errors[1].message, "Invalid String");
});
signIn({
username: "username",
password: "<PASSWORD>"
}, "en", function onSignIn(errors, user) {
assert.deepEqual(user, {
username: "username",
password: "<PASSWORD>"
});
});
assert.end();
});
| javascript |
Office of the Investment Board. (File Photo)
KATHMANDU: The Investment Board has approved foreign direct investment worth Rs 38. 68 billion for the three mega hydropower projects (hydel).
The 45th meeting of the board on Tuesday that was chaired by the Board’s chair and Prime Minister KP Sharma Oli approved the foreign investment for the hydel projects to be constructed as per the public private partnership.
For the 77. 5 megawatt-Ghunsa Hydel, Rs 17. 63 billion has been accepted, informed Board’s spokesperson Dharmendra Kumar Mishra.
Likewise, Rs 10. 61 billion has been approved for 57 megawatt Himchuli Dordi Hydel and Rs 10. 43 billion for 65-megawatt- Dudhkhola Hydel.
During the meeting, the attendants had discussed capacity enhancement of the Board and formulating the Board’s strategy in consultations with various stakeholders.
The meeting also dwelt on making the ‘One-stop Service Centre’ autonomous to facilitate the investors and setting up the ‘Knowledge Management Portal’ and optimizing it, according to Mishra.
Board Chair and PM Oli underscored the need to leverage ICT to tide over the impediment and delays in the mega project occurring due to COVID-19 pandemic.
Board’s CEO Sushil Bhatta on the occasion had briefed the attendants in the meeting about the implementation status of the projects facilitated and promoted by the Board. This is the first ever meeting held since Bhatta took up the Board’s meeting as its CEO. | english |
/*
Copyright (C) 2015 MeiZhaorui(Mason) <<EMAIL>>
The File is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The File is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the Library; if not, see
<http://www.gnu.org/licenses/>.
*/
#include <QString>
#include <QtTest>
#include <QCoreApplication>
#include "../src/pyscript.h"
USR_NAMESPACE_KUPLAYER
class kuplayerTest : public QObject
{
Q_OBJECT
public:
kuplayerTest();
private Q_SLOTS:
void testgetShowList();
};
kuplayerTest::kuplayerTest()
{
}
void kuplayerTest::testgetShowList()
{
PyScript p;
QCOMPARE(true,p.getShowList());
}
QTEST_MAIN(kuplayerTest)
#include "tst_kuplayertest.moc"
| cpp |
Since the beginning of 2021, Finn Wolfhard has been dating Elsie Richter. A few months later, they announced their romance with a sweet, now-deleted photo.
The couple ignited dating speculation as soon as they were first photographed together in March 2021, and the two appeared to enjoy each other's company up until recently. That was when breakup rumours started to circulate after Elsie was noticeably absent from the Stranger Things Season 4 premiere. The couple haven't been blogging about one another or been seen together in public for a while, save for Finn's lone red-carpet stroll.
While it's unclear if the young actors are still dating, Millie Bobby Brown, Finn's on-screen sweetheart, recently introduced him to Jake Bongiovi, who she's been seeing since June 2021. In a funny Instagram post, the actress who portrays Eleven in the science fiction series posed beside Finn and Jake. She captioned the picture, "When two worlds collide. "
Who is Elsie Richter?
According to IMDB, Richter played a part in the television series Doll & Em from 2013 to 2015 and also made an appearance in the television short Di Bibl. Nothing else is listed in the public domain besides those two projects.
According to The Sun, Elsie comes from a family of actors; her father is Mischa Richter and her mother is English actress Dolly Wells. A younger brother named Ezra Richter is also said to be a family member. Despite not being verified, @elsiepearls has an impressive 162,000 followers and frequently shares images of herself and other things and moments in her life. But it doesn't seem like she ever posts pictures of Finn. In one of her most recent photos, which can be seen above, she looked to be posing next to a pool table and added a slot machine emoji to the comment.
The young artist frequently posts images of her male and female friends, to whom she occasionally makes odd postings with shout-outs. She's quite discreet about her life, so it's unknown if some of the individuals she hangs out with are actually relatives. Whether they're sitting out and reading in an apartment or going to a truck show, their lives seem to be filled with kind people and fun experiences.
Was Finn blackmailed?
In an interview with the Washington Post, the actor admitted that while most of his fans are wonderful, there are those strangers who want to go a little too far into his personal life.
When he didn't publicly acknowledge their relationship, one of these people allegedly threatened to divulge Elsie's address online, which prompted him to share a social media photo of the two of them. He said that these individuals often threaten to reveal his personal information.
Why are there rumours of Finn being single?
Many fans have hypothesised that Elsie and Finn split up since they haven't been discussing each other on social media or been spotted together in public for some time. Several of the cast members' significant others attended the Stranger Things season 4 premiere, but she notably skipped it.
But Finn is a fairly private person who has been open about his problems with social media. He confessed to the interviewer that he was "terrified" of it throughout their interview. He described Instagram as "distracting and anxiety-inducing. " According to the actor, he just uses the sites to advertise his acting career. He might not want to write about his girlfriend for that reason.
Q. Who is Finn Wolfhard?
A. A well-known actor and musician from Canada, Finn Wolfhard is best known for his role as Mike Wheeler in the Netflix series Stranger Things.
Q. Why is Finn Wolfhard known by all?
A. In the second season of the post-apocalyptic science fiction series The 100, he made his acting and television debut in 2014. His character was named Zoran. He had a guest appearance as Jordie Pinsky on the television programme Supernatural the following year. Mike Wheeler, played by Wolfhard, first appeared in the Netflix series Stranger Things in 2016.
Q. What is the Net Worth of Finn Wolfhard?
A. In 2022, Finn Wolfhard will have a $4 million net worth. Numerous reliable sources, such as Celebrity Net Worth, support this.
Q. What is the age and height of Elsie Richter?
A. Elsie Richter is predicted to stand at 5 feet 7 inches or so. There are rumors that Elsie Richter, Finn Wolfhard's girlfriend in 2022, was born on May 12, 2002. This would make Elsie Richter around 20 years old. | english |
<filename>app/javascript/controllers/select_controller.js
import { Controller } from "stimulus"
import $ from 'jquery'
import Select2 from "select2"
export default class extends Controller {
connect() {
$('select').select2();
$('.select').removeClass('select');
}
}
| javascript |
import React, { FC } from "react";
import styled from "styled-components";
import { Constants } from "../constants";
import { BreakOutImage } from "./preview-compatible";
type BannerImageProps = {
color?: string;
image: NestedImage;
imageHeadline: string;
title: string;
};
const BannerImageWrapper = styled.div`
display: flex;
flex-flow: row wrap;
margin-top: 0;
margin-bottom: 1rem;
@media (max-width: ${Constants.mobileWidth}) {
flex-flow: column wrap;
}
`;
export const ImageHeadlineContainer = styled.h1<{
color: string;
height?: string;
}>`
align-self: center;
background-color: ${({ color }) => color};
border-radius: 1rem;
color: #fff;
flex-grow: 1;
line-height: 1;
padding: 1rem;
text-align: center;
z-index: 1;
@media (max-width: ${Constants.mobileWidth}) {
font-size: 1rem;
}
`;
export const BannerImage: FC<BannerImageProps> = ({ color, image, imageHeadline, title }) => {
const headlineColor = !!color ? color : Constants.Colors.theGroveLightGreen;
return (
<BannerImageWrapper>
<BreakOutImage imageAlt={title} imageInfo={{ image, alt: title }} title={title} />
<ImageHeadlineContainer color={headlineColor}>{imageHeadline}</ImageHeadlineContainer>
</BannerImageWrapper>
);
};
| typescript |
Virat Kohli's record of most runs in a single Indian Premier League season remains unmatched. Kohli scored 973 runs back in 2016, and still remains to be the only player to gather 900+ runs in a single season of the tournament.
Discussing the feat on Star Sports, Shastri said that it would be incredibly difficult to break the record and only an opener would be capable of doing it. Asked about who could potentially break the tally of runs, Shastri took the name of Gujarat Titans opener Shubman Gill, who has come into the IPL with a riveting run of form in 2023.
England and Rajasthan Royals batter Jos Buttler came in touching distance of the 900-mark in 2022 season, hitting 863 runs. Buttler hit 4 centuries to match Kohli's tally and also hit 4 fifties in the 2022 season.
opportunities to score runs. I feel, it is Subhman Gill because he is in good form and also because he plays top of the order. So he will get good number of opportunities to score runs. The pitches are good, so if he can score 80-100 runs consecutively in two or three innings, then at that point of time only he will already have 300-400 runs," Shastri broke down the mechanics to achieve the record.
"According to me, it is very difficult to break the record, because 900 plus runs is huge but one thing is opening batsmen will get two extra matches and two extra innings, so opening batsmen can only break this record if it is possible,” he further added.
Shubman Gill started off his IPL 2023 with a half century vs Chennai Super Kings. The batter fizzled out a little in the next two matches and hit 14, 39 against Delhi Capitals and Kolkata Knight Riders respectively. | english |
<reponame>nicholasyoannou/genshin-data
{
"id": "estate_courtyard_wall_stoneguard",
"originalId": 371223,
"rarity": 4,
"name": "Estate Courtyard Wall: Stoneguard",
"description": "These are the walls of the Refined Estate. The wood on the lower half section has had a layer of glue produced by boiling Amur Maple bark painted on it, which makes it exceedingly resistant to wind, rain, and insect infestation. Its load-bearing capacities are also quite impressive, resisting collapse even when large stones roll down from the mountains and strike them. However, the worst that your Serenitea Pot could throw at them is probably a Forest Boar charge...",
"load": 94,
"energy": 90,
"exp": 90,
"category": [
{
"id": 6002,
"category": "Courtyard Wall",
"type": "Exterior"
}
],
"recipe": [
{
"id": "maple_wood",
"name": "Maple Wood",
"amount": 8
},
{
"id": "white_iron_chunk",
"name": "White Iron Chunk",
"amount": 4
}
]
}
| json |
Actress Pooja Hegde shares her excitement over doing Kollywood films!
Pan India star Pooja Hegde is busy juggling between different cities for various projects. She rose to prominence after giving back to back hits in the Hindi and Telugu film industries. She is all set to make her Tamil debut through Thalapathy Vijay's Beast'
She is an active social media user and often interacts with her fans. In one such conversation, she shared her excitement about working in a Tamil film. A fan page on social media poured their heart out sharing, "when Pooja revealed that she's acting in 'Beast', I was just stunned! "
The actress gave out a lovely reply to thank the admin of the page. Taking to her social media story, Pooja Hegde wrote, "I'm happy that YOU are happy that I'm doing #BEAST @pooja_slays! Excited to be doing a Tamil film again and I hope to make you proud in ur own native language this time round! ? ? Happy 1 year to your fan club! Thank you for motivating me? ? "
On the professional front, Pooja recently wrapped up her Pan-India film, 'Radhe Shyam' opposite Prabhas and also has 'Bhaijaan' with Salman Khan. Her interesting lineup also includes 'Acharyaa' with Chiranjeevi and Ram Charan, 'Most Eligible Bachelor' along with 'Beast' opposite Thalapathy Vijay.
Follow us on Google News and stay updated with the latest! | english |
#!/usr/bin/env python
# coding: utf-8
import sys
sys.path.append("../")
import pandas as pd
import numpy as np
import pathlib
import pickle
import os
import itertools
import argparse
import logging
import helpers.feature_helpers as fh
from collections import Counter
OUTPUT_DF_TR = 'df_steps_tr.csv'
OUTPUT_DF_VAL = 'df_steps_val.csv'
OUTPUT_DF_TRAIN = 'df_steps_train.csv'
OUTPUT_DF_TEST = 'df_steps_test.csv'
OUTPUT_DF_SESSIONS = 'df_sessions.csv'
OUTPUT_ENCODING_DICT = 'enc_dicts_v02.pkl'
OUTPUT_CONFIG = 'config.pkl'
OUTPUT_NORMLIZATIONS_VAL = 'Dwell_normalizations_val.pkl'
OUTPUT_NORMLIZATIONS_SUBM = 'Dwell_normalizations_submission.pkl'
DEFAULT_FEATURES_DIR_NAME = 'nn_vnormal'
DEFAULT_PREPROC_DIR_NAME = 'data_processed_vnormal'
def setup_args_parser():
parser = argparse.ArgumentParser(description='Create cv features')
parser.add_argument('--processed_data_dir_name', help='path to preprocessed data', default=DEFAULT_PREPROC_DIR_NAME)
parser.add_argument('--features_dir_name', help='features directory name', default=DEFAULT_FEATURES_DIR_NAME)
#parser.add_argument('--split_option', help='split type. Options: normal, future', default=DEFAULT_SPLIT)
parser.add_argument('--debug', help='debug mode (verbose output and no saving)', action='store_true')
return parser
def setup_logger(debug):
logger = logging.getLogger()
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO)
if debug:
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)
return logger
def main():
parser = setup_args_parser()
args = parser.parse_args()
logger = setup_logger(args.debug)
#logger.info('split option: %s' % args.split_option)
logger.info(100*'-')
logger.info('Running 013_Features_Dwell.py')
logger.info(100*'-')
logger.info('processed data directory name: %s' % args.processed_data_dir_name)
logger.info('features directory name: %s' % args.features_dir_name)
#Set up arguments
# # split_option
# if args.split_option=='normal':
# SPLIT_OPTION = 'normal'
# elif args.split_option=='future':
# SPLIT_OPTION = 'leave_out_only_clickout_with_nans'
# processed data path
DATA_PATH = '../data/' + args.processed_data_dir_name + '/'
#os.makedirs(DATA_PATH) if not os.path.exists(DATA_PATH) else None
logger.info('processed data path: %s' % DATA_PATH)
# features data path
FEATURES_PATH = '../features/' + args.features_dir_name + '/'
#os.makedirs(FEATURES_PATH) if not os.path.exists(FEATURES_PATH) else None
logger.info('features path: %s' % FEATURES_PATH)
# End of set up arguments
config = pickle.load(open(DATA_PATH+OUTPUT_CONFIG, "rb" ))
config
# ### read data
df_steps_tr = pd.read_csv(DATA_PATH+OUTPUT_DF_TR)
df_steps_val = pd.read_csv(DATA_PATH+OUTPUT_DF_VAL)
df_steps_train = pd.read_csv(DATA_PATH+OUTPUT_DF_TRAIN)
df_steps_test = pd.read_csv(DATA_PATH+OUTPUT_DF_TEST)
df_sessions = pd.read_csv(DATA_PATH+OUTPUT_DF_SESSIONS)
enc_dict = pickle.load(open(DATA_PATH+OUTPUT_ENCODING_DICT, "rb" ))
# ## Concatenate all data
# #### validation
df_tr = df_steps_tr.merge(df_sessions, on='session_id')
df_val = df_steps_val.merge(df_sessions, on='session_id')
df_all_cv = pd.concat([df_tr, df_val], axis=0).reset_index(drop=True)
del df_tr, df_val, df_steps_tr, df_steps_val
# #### all
df_test_new = df_steps_test.merge(df_sessions, on='session_id')
df_train_new = df_steps_train.merge(df_sessions, on='session_id')
df_all = pd.concat([df_train_new, df_test_new], axis=0).reset_index(drop=True)
del df_train_new, df_test_new, df_steps_train, df_steps_test
del df_sessions
# ### create a dataframe with impressions list¶
idx = df_all.action_type=='clickout item'
df_all_imp_list = df_all.loc[idx,['session_id', 'step', 'impressions']].reset_index(drop=True)
df_all_imp_list['impressions_list_enc'] = df_all_imp_list.impressions.fillna('').str.split('|') \
.apply(lambda s: [enc_dict['reference'].get(i) for i in s])
df_all_imp_list.drop('impressions', axis=1, inplace=True)
# # Get Dwell
VAR_GROUPBY = 'session_id'
FEATURE_NAME = 'past_dwell_with_items_%s' % VAR_GROUPBY
print (FEATURE_NAME)
df_all_cv = df_all_cv.sort_values(['user_id', 'day','session_id', 'step', 'timestamp']).reset_index(drop=True)
df_all = df_all.sort_values(['user_id', 'day','session_id', 'step', 'timestamp']).reset_index(drop=True)
# ### validation
VARS_ = ['session_id', 'step', 'timestamp', 'action_type', 'reference']
df = df_all_cv[VARS_].copy()
FILE_NAME = 'Dcv_%s.gz' % FEATURE_NAME
print (FILE_NAME)
df['reference_enc'] = df.reference.apply(lambda s: str(enc_dict['reference'].get(s)))
df = df.drop('reference', axis=1)
df['next_timestamp'] = df.groupby('session_id').timestamp.shift(-1)
df['duration'] = df.next_timestamp-df.timestamp
df['duration'] = df['duration'].fillna(0)
df = df.drop(['timestamp', 'next_timestamp'], axis=1)
df['ref_dwell_dict'] = df.apply(lambda row: dict([(row.reference_enc, row.duration)]), axis=1).apply(Counter)
df = df.drop(['reference_enc', 'duration'], axis=1)
df['cumsum_dwell_dict'] = df.groupby('session_id').ref_dwell_dict.transform(pd.Series.cumsum)
df['cumsum_dwell_dict_shift'] = df.groupby('session_id').cumsum_dwell_dict.shift()
df = df.drop(['ref_dwell_dict', 'cumsum_dwell_dict'], axis=1)
df_feat = df.merge(df_all_imp_list, on=['session_id', 'step'])
df_feat[FEATURE_NAME] = df_feat.apply(lambda row: [row.cumsum_dwell_dict_shift.get(str(s), -1) for s in row.impressions_list_enc] \
if pd.notnull(row.cumsum_dwell_dict_shift) else [-1 for s in row.impressions_list_enc], axis=1)
df_feat = df_feat[['session_id', 'step', FEATURE_NAME]]
df_feat.to_csv(FEATURES_PATH+FILE_NAME, index=False, compression='gzip')
print (FEATURES_PATH+FILE_NAME)
def get_imp_means_and_stds(df_tr_=None, var_group = 'seq_num_new'):
aux = df_tr_[[var_group]].reset_index(drop=True)[var_group]
lista=list(itertools.chain.from_iterable(aux))
listasemnan = [s for s in lista if s!=-1]
means = np.mean(listasemnan)
stds = np.std(listasemnan)
maxv = np.max(listasemnan)
return means, stds, maxv
def get_log_imp_means_and_stds(df_tr_=None, var_group = 'seq_num_new'):
aux = df_tr_[[var_group]].reset_index(drop=True)[var_group]
lista=list(itertools.chain.from_iterable(aux))
listasemnan = np.log(np.array([s for s in lista if s!=-1])+1.9)
means = np.mean(listasemnan)
stds = np.std(listasemnan)
maxv = np.max(listasemnan)
return means, stds,maxv
normalizations_dict = {}
normalizations_dict['dwell_times'] = {}
means, stds, maxv = get_imp_means_and_stds(df_tr_=df_feat, var_group = 'past_dwell_with_items_session_id')
normalizations_dict['dwell_times']['means'] = means
normalizations_dict['dwell_times']['stds'] = stds
normalizations_dict['dwell_times']['max'] = maxv
normalizations_dict['dwell_times_log'] = {}
means, stds, maxv = get_log_imp_means_and_stds(df_tr_=df_feat, var_group = 'past_dwell_with_items_session_id')
normalizations_dict['dwell_times_log']['means'] = means
normalizations_dict['dwell_times_log']['stds'] = stds
normalizations_dict['dwell_times_log']['max'] = maxv
with open(FEATURES_PATH+OUTPUT_NORMLIZATIONS_VAL, 'wb') as handle:
pickle.dump(normalizations_dict, handle, protocol=pickle.HIGHEST_PROTOCOL)
# ### all
VARS_ = ['session_id', 'step', 'timestamp', 'action_type', 'reference']
df = df_all[VARS_].copy()
FILE_NAME = 'D_%s.gz' % FEATURE_NAME
print (FILE_NAME)
df['reference_enc'] = df.reference.apply(lambda s: str(enc_dict['reference'].get(s)))
df = df.drop('reference', axis=1)
df['next_timestamp'] = df.groupby('session_id').timestamp.shift(-1)
df['duration'] = df.next_timestamp-df.timestamp
df['duration'] = df['duration'].fillna(0)
df = df.drop(['timestamp', 'next_timestamp'], axis=1)
df['ref_dwell_dict'] = df.apply(lambda row: dict([(row.reference_enc, row.duration)]), axis=1).apply(Counter)
df = df.drop(['reference_enc', 'duration'], axis=1)
df['cumsum_dwell_dict'] = df.groupby('session_id').ref_dwell_dict.transform(pd.Series.cumsum)
df['cumsum_dwell_dict_shift'] = df.groupby('session_id').cumsum_dwell_dict.shift()
df = df.drop(['ref_dwell_dict', 'cumsum_dwell_dict'], axis=1)
df_feat = df.merge(df_all_imp_list, on=['session_id', 'step'])
df_feat[FEATURE_NAME] = df_feat.apply(lambda row: [row.cumsum_dwell_dict_shift.get(str(s), -1) for s in row.impressions_list_enc] \
if pd.notnull(row.cumsum_dwell_dict_shift) else [-1 for s in row.impressions_list_enc], axis=1)
df_feat = df_feat[['session_id', 'step', FEATURE_NAME]]
df_feat.to_csv(FEATURES_PATH+FILE_NAME, index=False, compression='gzip')
print (FEATURES_PATH+FILE_NAME)
normalizations_dict = {}
normalizations_dict['dwell_times'] = {}
means, stds, maxv = get_imp_means_and_stds(df_tr_=df_feat, var_group = 'past_dwell_with_items_session_id')
normalizations_dict['dwell_times']['means'] = means
normalizations_dict['dwell_times']['stds'] = stds
normalizations_dict['dwell_times']['max'] = maxv
normalizations_dict['dwell_times_log'] = {}
means, stds, maxv = get_log_imp_means_and_stds(df_tr_=df_feat, var_group = 'past_dwell_with_items_session_id')
normalizations_dict['dwell_times_log']['means'] = means
normalizations_dict['dwell_times_log']['stds'] = stds
normalizations_dict['dwell_times_log']['max'] = maxv
with open(FEATURES_PATH+OUTPUT_NORMLIZATIONS_SUBM, 'wb') as handle:
pickle.dump(normalizations_dict, handle, protocol=pickle.HIGHEST_PROTOCOL)
if __name__ == "__main__":
main()
| python |
<reponame>xformation/xformation-compliancemanager-service
/*
* Copyright (C) 2020 Graylog, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
import * as React from 'react';
import { SyntheticEvent } from 'react';
import PropTypes from 'prop-types';
import { Field, useFormikContext } from 'formik';
import { Input } from 'components/bootstrap';
type Props = {
autoComplete?: string,
buttonAfter?: React.ReactElement | string,
id: string,
label?: React.ReactElement | string,
name: string,
type?: string,
help?: React.ReactElement | string,
minLength?: number,
maxLength?: number,
labelClassName?: string,
onChange?: (event: SyntheticEvent<Input>) => void,
wrapperClassName?: string,
validate?: (string) => string | undefined | null,
error?: React.ReactElement | string,
placeholder?: string,
required?: boolean,
formGroupClassName?: string,
};
const checkboxProps = (value) => {
return { defaultChecked: value ?? false };
};
const inputProps = (value) => {
return { value: value ?? '' };
};
/** Wraps the common Input component with a formik Field */
const FormikInput = ({ name, type, help, validate, onChange: propagateOnChange, error: errorProp, ...rest }: Props) => {
const { validateOnChange } = useFormikContext();
return (
<Field name={name} validate={validate}>
{({ field: { value, onChange, onBlur }, meta: { error: validationError, touched } }) => {
const typeSpecificProps = type === 'checkbox' ? checkboxProps(value) : inputProps(value);
const displayValidationError = validateOnChange ? !!(validationError && touched) : !!validationError;
const error = displayValidationError ? validationError : errorProp;
const _handleChange = (e) => {
if (typeof propagateOnChange === 'function') {
propagateOnChange(e);
}
onChange(e);
};
return (
<Input {...rest}
{...typeSpecificProps}
onBlur={onBlur}
help={help}
id={name}
error={error}
onChange={_handleChange}
type={type} />
);
}}
</Field>
);
};
FormikInput.propTypes = {
help: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
labelClassName: PropTypes.string,
type: PropTypes.string,
name: PropTypes.string.isRequired,
wrapperClassName: PropTypes.string,
validate: PropTypes.func,
};
FormikInput.defaultProps = {
buttonAfter: undefined,
autoComplete: undefined,
label: undefined,
help: undefined,
labelClassName: undefined,
onChange: undefined,
type: 'text',
validate: () => undefined,
wrapperClassName: undefined,
error: undefined,
minLength: undefined,
maxLength: undefined,
placeholder: undefined,
required: false,
formGroupClassName: undefined,
};
export default FormikInput;
| typescript |
{
"id": "d836-112",
"text": "-10-\nJanuary 76 - Recent studio supervisor for U.S. Army in Tokyo, Japan,\ndesires news director (on-camera work), producer-director or program\nmanager position in educational radio-TV. Has been with Radio Free\nEurope as producer. Radio Free Asia as assistant program director. Six\nyears experience in educational communications. Male, 33, single, M.S.\nPrefers New England or Modwest location. $5-6000.\nJanuary 77 - Young man, 2S, single, seeks writer-producer position with\npublic service department of educational radio or TV. Experienced as\nwriter, director and producer in commercial and ETV. Some film writing\nand production experience. B.A., M.A. and all course work for Ph.D.\nHave taught radio-TV and Speech on college level and have secondary\nschool certificate. Prefer Northeast location. $6000.\nJanuary 78 - Young man, 28, M.S. in Education, wishes position in\neducational broadcasting in programming or production. Is now announcer\nfor commercial TV station. Has taught college-level and would like to\nteach in connection with any position. Three years TV experience, 2\nyears in radio. Single. Location open. $4500.\nJanuary 79 - Producer-writer with 3 years experie nee on commercial\nnetworks desires switch to ETV. Worked on commercial production for\n“Stop the Music/* etc.; program assistant on “Double or Nothing,”\namong other activities. Male, 25, B.A. (Syracuse), single. Location\nopen. $7500.\nJanuary 80 - Experienced cameraman desires position on production staff\nof educational station. Five years stage managing and directing in\ntheater. Studio cameraman with commercial channel in New York last\nsummer. Male, B.A., 3 6, married. Go anywhere but deep South. $65/wk*\nJanuary 81 - Director with commercial station desires ETV position as\nproducer-director. Interested in teaching. Male, 23, M.S. (Syracuse),\nmarried. Location open. $85/wk.\nJanuary 82 - Male, 44, married, M.A., desires position as producer,\nstation manager, program director, or writer in ETV station. Now teaching\nTV writing in university. Has been writer-producer-announcer in ETV.\nSeventeen years broadcasting experience. Location open. $7200.\nJanuary 83 - Man with over 5 years TV experience as lighting director in\na New York network station seeks position as production manager, program\ndirector, producer-director in ETV. 31, B.A and M.F.A., married.\nLocation open. $8000."
} | json |
<reponame>DEVESHTARASIA/tensorflow
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/compiler/tf2xla/type_util.h"
#include "tensorflow/compiler/tf2xla/xla_compiler.h"
#include "tensorflow/compiler/tf2xla/xla_helpers.h"
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
#include "tensorflow/core/framework/kernel_def_builder.h"
namespace tensorflow {
namespace {
// This OpKernel implements the _Arg Op for XLA JIT devices. It
// associates its output with one of the arguments to a
// subcomputation.
class ArgOp : public XlaOpKernel {
public:
explicit ArgOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("T", &dtype_));
OP_REQUIRES_OK(ctx, ctx->GetAttr("index", &index_));
}
void Compile(XlaOpKernelContext* ctx) override {
// If 'frame' is non-null, this is a function call inside an outer JIT
// compilation. Use the usual implementation of _Arg.
auto frame = ctx->call_frame();
if (frame != nullptr) {
Tensor val;
OP_REQUIRES_OK(ctx, frame->GetArg(index_, &val));
OP_REQUIRES(ctx, val.dtype() == dtype_,
errors::InvalidArgument(
"Type mismatch: actual ", DataTypeString(val.dtype()),
" vs. expect ", DataTypeString(dtype_)));
// Forwards the argument from the frame.
ctx->op_kernel_context()->set_output(0, val);
return;
}
XlaContext& xc = XlaContext::Get(ctx);
const XlaContext::Argument& arg = xc.args()[index_];
if (arg.is_resource) {
XlaResource::Kind kind;
switch (arg.kind) {
case XlaCompiler::Argument::kVariable:
kind = XlaResource::kVariable;
break;
case XlaCompiler::Argument::kTensorArray:
kind = XlaResource::kTensorArray;
break;
case XlaCompiler::Argument::kStack:
kind = XlaResource::kStack;
break;
default:
CHECK(false);
}
// TODO(phawkins): this code assumes that variables do not alias.
XlaResource* resource;
OP_REQUIRES_OK(ctx,
xc.CreateResource(kind, index_, arg.name, arg.value.type,
arg.value.handle, &resource));
resource->tensor_array_size = arg.tensor_array_size;
ctx->SetResourceOutput(0, resource);
} else if (arg.value.is_constant) {
ctx->SetConstantOutput(0, arg.value.constant_value);
} else {
ctx->SetOutput(0, arg.value.handle);
}
}
private:
int index_;
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(ArgOp);
};
REGISTER_XLA_OP(Name("_Arg").AllowResourceTypes(), ArgOp);
} // namespace
} // namespace tensorflow
| cpp |
<filename>spec/log.spec.ts
import * as os from 'os';
jest.mock('../src/common/utils.ts', () => {
return {
getCommandLineArgs: jest.fn(() => os.tmpdir()),
};
});
jest.mock('../src/common/env', () => {
return {
isElectronQA: false,
};
});
jest.mock('electron-log');
describe('logger', () => {
let instance;
beforeEach(() => {
// I did it for reset module imported between tests
const { logger } = require('../src/common/logger');
instance = logger;
jest.resetModules();
});
it('when no logger registered then queue items', () => {
instance.debug('test');
instance.debug('test2');
const queue = instance.getLogQueue();
expect(queue.length).toBe(2);
});
it('should call send when logger get registered', () => {
instance.debug('test');
instance.debug('test2');
const mock = jest.fn<Electron.WebContents>(() => ({
send: jest.fn(),
}));
const mockWin = new mock();
instance.setLoggerWindow(mockWin);
expect(mockWin.send).toHaveBeenCalled();
});
it('should call `logger.error` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.error('test error', { error: 'test error' });
expect(spy).toBeCalledWith('error', 'test error', [
{ error: 'test error' },
]);
});
it('should call `logger.warn` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.warn('test warn', { warn: 'test warn' });
expect(spy).toBeCalledWith('warn', 'test warn', [{ warn: 'test warn' }]);
});
it('should call `logger.debug` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.debug('test debug', { debug: 'test debug' });
expect(spy).toBeCalledWith('debug', 'test debug', [
{ debug: 'test debug' },
]);
});
it('should call `logger.info` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.info('test info', { info: 'test info' });
expect(spy).toBeCalledWith('info', 'test info', [{ info: 'test info' }]);
});
it('should call `logger.verbose` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.verbose('test verbose', { verbose: 'test verbose' });
expect(spy).toBeCalledWith('verbose', 'test verbose', [
{ verbose: 'test verbose' },
]);
});
it('should call `logger.silly` correctly', () => {
const spy = jest.spyOn(instance, 'log');
instance.silly('test silly', { silly: 'test silly' });
expect(spy).toBeCalledWith('silly', 'test silly', [
{ silly: 'test silly' },
]);
});
it('should call `logger.sendToCloud` when `logger.debug` is called', () => {
const spyLog = jest.spyOn(instance, 'log');
const spySendToCloud = jest.spyOn(instance, 'sendToCloud');
instance.debug('test');
expect(spyLog).toBeCalled();
expect(spySendToCloud).toBeCalled();
});
it('should cap at 100 queued log messages', () => {
for (let i = 0; i < 110; i++) {
instance.debug('test' + i);
}
const queue = instance.getLogQueue();
expect(queue.length).toBe(100);
});
});
| typescript |
<gh_stars>1-10
{
"contacts": [],
"guideStarURL": "http://www.guidestarindia.org/Summary.aspx?CCReg=6418",
"name": "<NAME>",
"primaryEmail": "<EMAIL>",
"website": "www.yogarshjankalyan.org",
"organisationType": [
"Advocacy & Campaigning",
"Direct Service",
"Grant-making",
"Network",
"Support"
],
"telephone": [
"919219852141",
"911332266161"
],
"mainAddrress": {
"state": "Uttarakhand",
"address": [
"356, Avas Vikas Roorkee",
"uttrakhand",
"Roorkee",
"Haridwar",
"Uttarakhand",
"247667"
]
},
"briefDescription": "Arsh Yog Avam Jankalyan Trust has been active in upliftment of women,children,youth,elderly,persons with disablities,Ayurvedic Medicines to needy people. Achievements:-1.Imparted Free Ayurvedic medicines to the needy people in various villages2.Working for Health Programmes3.Women Empowerment4.Working in Rural areas5.Yoga camps in rural and urban areas6.Making Youth Skilled7.Helping women in distress,against domestic violence8.Making Green India - Planting plants9.Imparting Free Education to Weaker Section of society10.Free Coaching to SC/ST11.Free Coaching to Backward Class12.Free Beauty Parlour Courses13.Free Computer Classes14.Imparting Personality Development ClassThousands of people have been served in various categories",
"yearOfEstablishment": "2011"
} | json |
<reponame>TonyRice/hexopod
{
"name": "hexopod",
"version": "0.0.1",
"description": "A simple microservice allowing you to deploy, and build a static Hexo blog",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/TonyRice/hexo-service.git"
},
"author": "<NAME>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/TonyRice/hexoservice/issues"
},
"homepage": "https://github.com/TonyRice/hexoservice#readme",
"keywords": [
"microservice",
"omg"
],
"dependencies": {
"koa": "^2.7.0",
"koa-json-body": "^5.3.0",
"koa-mount": "^4.0.0",
"koa-router": "^7.4.0",
"koa-static": "^5.0.0",
"mime-types": "^2.1.24",
"nodegit": "^0.25.1",
"npm": "^6.11.3"
}
}
| json |
My money was well spent on the Hyundai i20 N Line. An intriguing innovation is a voice-activated sunroof that opens and closes with rapid acceleration. The audio quality is just awesome and the features are good at this price range. If you are looking for a budget-friendly sporty hatchback, this is a great option.
- Mileage (14)
- Performance (25)
- Comfort (15)
- Engine (16)
- Interior (17)
| english |
<gh_stars>10-100
[
{
"DeniedAlternatives": [],
"Files": {
"tiles/materials/fugirder.material": [
"/novakidDescription"
]
},
"Texts": {
"Chs": "一个看起来很强力的金属梁。",
"Eng": "A strong lookin' metal girder."
}
},
{
"DeniedAlternatives": [],
"Files": {
"tiles/materials/fugirder.material": [
"/floranDescription"
]
},
"Texts": {
"Chs": "冰冷的金属梁。",
"Eng": "Cold metal girdersss."
}
},
{
"DeniedAlternatives": [],
"Files": {
"tiles/materials/fugirder.material": [
"/glitchDescription/glitchEmotedText"
]
},
"Texts": {
"Chs": "这个加强过的金属梁非常强韧。",
"Eng": "This reinforced metal girder is very strong."
}
}
] | json |
<gh_stars>1-10
#!/usr/bin/env python
__author__ = '<NAME>'
from unittest import SkipTest
from mock import Mock, patch, ANY, sentinel, call
from nose.plugins.attrib import attr
from gevent.event import AsyncResult, Event
import gevent
from ion.agent.agent import ResourceAgent
from pyon.container.procs import ProcManager
from pyon.core.exception import BadRequest, NotFound
from pyon.ion.endpoint import ProcessRPCServer
from pyon.ion.process import IonProcessError
from pyon.net.transport import NameTrio, TransportError
from pyon.public import PRED, CCAP, IonObject
from pyon.ion.service import BaseService
from pyon.util.int_test import IonIntegrationTestCase
from pyon.util.unit_test import PyonTestCase
from interface.objects import ProcessStateEnum
class FakeContainer(object):
def __init__(self):
self.id = "containerid"
self.node = None
self.name = "containername"
self.CCAP = CCAP
def has_capability(self, cap):
return True
class SampleProcess(BaseService):
name = 'sample'
dependencies = []
def call_process(self, *args, **kwargs):
pass
class BadProcess(BaseService):
name = 'bad'
dependencies = []
def on_quit(self):
bad = 3 / 0 # boom
return bad
def sleep_target(self, *args, **kwargs):
self.sleep_event = Event()
gevent.sleep(0.2)
self.sleep_event.set()
def fail_target(self, *args, **kwargs):
raise Exception("Blow up to test failure chain")
class SampleAgent(ResourceAgent):
dependencies = []
class TestRPCServer(ProcessRPCServer):
pass
@attr('UNIT')
class TestProcManager(PyonTestCase):
def setUp(self):
self.container = Mock()
self.pm = ProcManager(self.container)
self.container.resource_registry.create.return_value = (sentinel.rid, sentinel.rev)
self.container.resource_registry.find_resources.return_value = ([sentinel.oid], [sentinel.orev])
def test_start(self):
self.pm.start()
self.assertEquals(self.pm.cc_id, sentinel.rid)
def test_start_with_org(self):
self.patch_cfg('pyon.container.procs.CFG', {'container':{'org_name':'NOT_DEFAULT'}})
self.pm.start()
self.container.resource_registry.create_association.assert_called_once_with(sentinel.oid, PRED.hasResource, sentinel.rid)
@patch('pyon.container.procs.log')
def test_stop_with_error(self, mocklog):
self.pm.start()
self.pm.terminate_process = Mock(side_effect=BadRequest)
procmock = Mock()
procmock._proc_start_time = 0
procmock.id = sentinel.pid
self.pm.procs[sentinel.pid] = procmock
self.pm.procs_by_name['dummy'] = procmock
self.pm.stop()
self.pm.terminate_process.assert_called_once_with(sentinel.pid)
mocklog.warn.assert_has_calls([call("Failed to terminate process (%s): %s", sentinel.pid, ANY),
call("ProcManager procs not empty: %s", self.pm.procs),
call("ProcManager procs_by_name not empty: %s", self.pm.procs_by_name)])
def test_list_local_processes(self):
pmock = Mock()
pmock.process_type = sentinel.ptype
pmock2 = Mock()
pmock2.process_type = sentinel.ptype2
self.pm.procs = {'one':pmock,
'two':pmock2,
'three':pmock}
self.assertEquals(self.pm.list_local_processes(),
[pmock, pmock2, pmock])
def test_list_local_processes_proc_type_filter(self):
pmock = Mock()
pmock.process_type = sentinel.ptype
pmock2 = Mock()
pmock2.process_type = sentinel.ptype2
self.pm.procs = {'one':pmock,
'two':pmock2,
'three':pmock}
self.assertEquals(self.pm.list_local_processes(sentinel.ptype2),
[pmock2])
def test_get_a_local_process(self):
pmock = Mock()
pmock.name = sentinel.name
pmock2 = Mock()
pmock2.name = sentinel.name2
self.pm.procs = {'one':pmock,
'two':pmock2}
self.assertEquals(self.pm.get_a_local_process(sentinel.name2),
pmock2)
def test_get_a_local_process_for_agent_res_id(self):
pmock = Mock()
pmock.process_type = 'agent'
pmock.resource_type = sentinel.rtype
pmock2 = Mock()
pmock2.process_type = 'agent'
pmock2.resource_type = sentinel.rtype2
self.pm.procs = {'one':pmock,
'two':pmock2}
self.assertEquals(self.pm.get_a_local_process(sentinel.rtype2),
pmock2)
def test_get_a_local_process_no_match(self):
self.assertIsNone(self.pm.get_a_local_process())
def test_is_local_service_process(self):
pmock = Mock()
pmock.name = sentinel.name
pmock.process_type = 'simple'
pmock2 = Mock()
pmock2.name = sentinel.name2
pmock2.process_type = 'service'
pmock3 = Mock()
pmock3.name = sentinel.name3
pmock3.process_type = 'service'
self.pm.procs = {'one':pmock,
'two':pmock2,
'three':pmock3}
self.assertTrue(self.pm.is_local_service_process(sentinel.name3))
def test_is_local_service_process_name_matches_but_type_doesnt(self):
pmock = Mock()
pmock.name = sentinel.name
pmock.process_type = 'simple'
pmock2 = Mock()
pmock2.name = sentinel.name2
pmock2.process_type = 'notservice'
pmock3 = Mock()
pmock3.name = sentinel.name3
pmock3.process_type = 'notservice'
self.pm.procs = {'one':pmock,
'two':pmock2,
'three':pmock3}
self.assertFalse(self.pm.is_local_service_process(sentinel.name3))
def test_is_local_agent_process(self):
# agent is similar to above, but checks resource_type instead
pmock = Mock()
pmock.name = sentinel.name
pmock.process_type = 'simple'
pmock2 = Mock()
pmock2.resource_type = sentinel.name2
pmock2.process_type = 'agent'
pmock3 = Mock()
pmock3.name = sentinel.name3
pmock3.process_type = 'notservice'
self.pm.procs = {'one':pmock,
'two':pmock2,
'three':pmock3}
self.assertTrue(self.pm.is_local_agent_process(sentinel.name2))
def test_is_local_agent_process_not_found(self):
self.assertFalse(self.pm.is_local_agent_process(sentinel.one))
def test__unregister_process_errors(self):
pmock = Mock()
pmock._proc_name = '1'
pmock._proc_type = 'service'
pmock._proc_res_id = sentinel.presid
pmock._proc_svc_id = sentinel.psvcid
self.container.resource_registry.delete.side_effect = NotFound
self.pm.procs[sentinel.pid] = pmock
self.pm.procs_by_name['1'] = pmock
self.container.resource_registry.find_objects.reset_mock()
self.container.resource_registry.find_objects.side_effect = None
self.container.resource_registry.find_objects.return_value = ([],[])
self.pm._unregister_process(sentinel.pid, pmock)
# show we tried to interact with the RR
self.container.resource_registry.delete.assert_call(sentinel.presid, del_associations=True)
self.container.resource_registry.find_objects.assert_called_once_with(sentinel.psvcid, "hasProcess", "Process", id_only=True)
self.assertEquals(self.pm.procs, {})
self.assertEquals(self.pm.procs_by_name, {})
# NEXT: find_objects works fine and gives us an error deletion
self.container.resource_registry.delete.reset_mock()
self.container.resource_registry.find_objects.reset_mock()
self.container.resource_registry.find_objects.side_effect = None
self.container.resource_registry.find_objects.return_value = ([sentinel.svcid],[None])
self.pm.procs[sentinel.pid] = pmock
self.pm.procs_by_name['1'] = pmock
self.pm._unregister_process(sentinel.pid, pmock)
self.container.resource_registry.delete.assert_calls([call(sentinel.presid, del_associations=True),
call(sentinel.psvcid, del_associations=True)])
# NEXT: agent
pmock = Mock()
pmock.id = sentinel.pid
pmock._proc_name = '1'
pmock._proc_type = 'agent'
self.pm.procs[sentinel.pid] = pmock
self.pm.procs_by_name['1'] = pmock
self.pm._unregister_process(sentinel.pid, pmock)
self.container.directory.unregister_safe.assert_called_once_with("/Agents", sentinel.pid)
def test__create_listening_endpoint_with_cfg(self):
self.patch_cfg('pyon.container.procs.CFG', container=dict(messaging=dict(endpoint=dict(proc_listening_type='pyon.container.test.test_procs.TestRPCServer'))))
ep = self.pm._create_listening_endpoint(process=sentinel.process)
self.assertIsInstance(ep, TestRPCServer)
def test__create_listening_endpoint_without_cfg_and_no_conv(self):
self.patch_cfg('pyon.container.procs.CFG', container=dict(messaging=dict(endpoint=dict(proc_listening_type=None))))
ep = self.pm._create_listening_endpoint(process=sentinel.process)
self.assertIsInstance(ep, ProcessRPCServer)
def test_failed_process(self):
self.pm.start()
self.container.fail_fast = Mock()
self.pm.procs['pid1'] = Mock()
proc2 = BadProcess()
self.pm.proc_sup.spawn(name="bad", service=proc2, target=proc2.fail_target)
gevent.sleep(0) # Allow the new thread to fail and trigger the chain
self.assertFalse(self.container.fail_fast.called)
del self.pm.procs['pid1']
proc3 = BadProcess()
self.pm.proc_sup.spawn(name="bad", service=proc3, target=proc3.fail_target)
gevent.sleep(0) # Allow the new thread to fail and trigger the chain
self.assertTrue(self.container.fail_fast.called)
@attr('INT')
class TestProcManagerInt(IonIntegrationTestCase):
class ExpectedFailure(Exception):
pass
def test_proc_fails(self):
raise SkipTest("Fails with gevent 1.0, leaves bad container. Investigate")
self._start_container()
pm = self.container.proc_manager
ar = AsyncResult()
def failedhandler(proc, state, container):
if state == ProcessStateEnum.FAILED:
ar.set()
pm.add_proc_state_changed_callback(failedhandler)
pid = self._spawnproc(pm, 'service')
# cause a failure
pm.procs[pid]._process._ctrl_thread.proc.kill(exception=self.ExpectedFailure, block=False)
# wait for proc state changed notification
ar.get(timeout=5)
# make sure removed
self.assertNotIn(pid, pm.procs)
def test_procmanager_iso(self):
fakecc = FakeContainer()
fakecc.resource_registry = Mock()
fakecc.resource_registry.create.return_value=["ID","rev"]
fakecc.start_time = Mock()
fakecc.version = Mock()
pm = ProcManager(fakecc)
self.assertTrue(hasattr(fakecc, "spawn_process"))
pm.start()
pm.stop()
def test_procmanager(self):
self._start_container()
pm = self.container.proc_manager
pid1 = self._spawnproc(pm, 'service')
pid2 = self._spawnproc(pm, 'stream_process')
pid3 = self._spawnproc(pm, 'agent', 'SampleAgent')
pid4 = self._spawnproc(pm, 'standalone')
pid5 = self._spawnproc(pm, 'simple')
pid6 = self._spawnproc(pm, 'immediate')
with self.assertRaises(Exception) as ex:
config = {'process':{'type':'unknown_type'}}
pid = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertEqual(ex.exception, 'Unknown process type: BAMM')
self.assertEquals(len(pm.procs), 5) # service, stream_proc, (no agent), standalone, simple. NO IMMEDIATE
pm.terminate_process(pid1)
pm.terminate_process(pid2)
pm.terminate_process(pid3)
pm.terminate_process(pid4)
pm.terminate_process(pid5)
self.assertEquals(len(pm.procs), 0)
def _spawnproc(self, pm, ptype, pcls=None):
pcls = pcls or 'SampleProcess'
config = {'process':{'type':ptype}}
pid = pm.spawn_process('sample1', 'pyon.container.test.test_procs', pcls, config)
self.assertTrue(pid)
return pid
def test_proc_org(self):
self._start_container()
pm = self.container.proc_manager
config = {'process':{'type':'standalone'}}
pid1 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertTrue(pid1)
config = {'process':{'type':'standalone'}, 'org_governance_name': 'Org2'}
pid2 = pm.spawn_process('sample2', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertTrue(pid2)
proc = pm.procs_by_name['sample1']
self.assertEqual(proc.org_governance_name,'ION')
proc = pm.procs_by_name['sample2']
self.assertEqual(proc.org_governance_name,'Org2')
def test_procmanager_shutdown(self):
self.test_procmanager()
pm = self.container.proc_manager
pm.stop()
self.assertEquals(len(pm.procs), 0)
def test_procmanager_badquit_shutdown(self):
self._start_container()
pm = self.container.proc_manager
pid = pm.spawn_process('badprocess', 'pyon.container.test.test_procs', 'BadProcess', {'process':{'type':'service'}})
with patch('pyon.ion.service.log') as m:
pm.stop()
self.assertEquals(len(pm.procs), 0)
self.assertEquals(m.exception.call_count, 1)
def test_immediate_terminate(self):
self._start_container()
self._spawnproc(self.container.proc_manager, 'immediate')
self.assertEquals(len(self.container.proc_manager.procs), 0)
def test_terminate_process(self):
self._start_container()
pid = self._spawnproc(self.container.proc_manager, 'service')
self.container.terminate_process(pid)
self.assertEquals(len(self.container.proc_manager.procs), 0)
# now try to terminate it again, it shouldn't exist
self.assertRaises(BadRequest, self.container.terminate_process, pid)
def test_proc_state_change_callback(self):
self._start_container()
m = Mock()
pm = self.container.proc_manager
pm.add_proc_state_changed_callback(m)
pid = self._spawnproc(pm, 'service')
m.assert_called_with(ANY, ProcessStateEnum.RUNNING, self.container)
self.assertIsInstance(m.call_args[0][0], SampleProcess)
self.container.terminate_process(pid)
m.assert_called_with(ANY, ProcessStateEnum.TERMINATED, self.container)
self.assertIsInstance(m.call_args[0][0], SampleProcess)
pm.remove_proc_state_changed_callback(m)
cur_call_count = m.call_count
pid = self._spawnproc(pm, 'service')
self.assertEquals(m.call_count, cur_call_count) # should not have been touched
self.container.terminate_process(pid)
self.assertEquals(m.call_count, cur_call_count) # should not have been touched
def test_create_listening_endpoint(self):
self.patch_cfg('pyon.container.procs.CFG', {'container':{'messaging':{'endpoint':{'proc_listening_type':'pyon.container.test.test_procs.TestRPCServer'}}}})
fakecc = FakeContainer()
fakecc.resource_registry = Mock()
fakecc.resource_registry.create.return_value=["ID","rev"]
with patch('pyon.container.procs.ProcManager._get_execution_engine_config', Mock(return_value={})):
pm = ProcManager(fakecc)
pm._get_execution_engine_config = Mock()
ep = pm._create_listening_endpoint(node=sentinel.node,
service=sentinel.service,
process=sentinel.process)
self.assertIsInstance(ep, TestRPCServer)
def test_error_on_start_listeners_of_proc(self):
self._start_container()
m = Mock()
pm = self.container.proc_manager
pm.add_proc_state_changed_callback(m)
with patch('pyon.ion.process.IonProcessThread.start_listeners', Mock(side_effect=IonProcessError)):
pid = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', {'process':{'type':'service'}})
self.assertIsNone(pid)
pid = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', {'process':{'type':'stream_process'}})
self.assertIsNone(pid)
pid = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', {'process':{'type':'standalone'}})
self.assertIsNone(pid)
m.assert_calls([call(ANY, ProcessStateEnum.FAILED),
call(ANY, ProcessStateEnum.FAILED),
call(ANY, ProcessStateEnum.FAILED)])
def test_process_config_reg(self):
self._start_container()
pm = self.container.proc_manager
# Test OK case
res_config = {'special':{'more':'exists'}}
res_obj = IonObject("AgentInstance", driver_config=res_config)
res_id, _ = self.container.resource_registry.create(res_obj)
config_ref = "resources:%s/driver_config" % res_id
config = {'process':{'config_ref':config_ref}}
pid1 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertTrue(pid1)
proc = pm.procs_by_name['sample1']
self.assertTrue(proc)
self.assertIn('special', proc.CFG)
self.assertTrue(proc.CFG.get_safe("special.more"), 'exists')
pm.terminate_process(pid1)
# Test failure cases
config_ref = "XXXXX:%s/driver_config" % res_id
config = {'process':{'config_ref':config_ref}}
with self.assertRaises(BadRequest) as ex:
pid2 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
config_ref = "resources:badbadbad/driver_config"
config = {'process':{'config_ref':config_ref}}
with self.assertRaises(NotFound) as ex:
pid3 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
config_ref = "resources:%s/not_existing" % res_id
config = {'process':{'config_ref':config_ref}}
with self.assertRaises(BadRequest) as ex:
pid4 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
config_ref = "resources:%s/name" % res_id
config = {'process':{'config_ref':config_ref}}
with self.assertRaises(BadRequest) as ex:
pid4 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
# Test for objects method
obj_id = "test_" + res_id
self.container.object_store.create_doc(res_config, object_id=obj_id)
obj2 = self.container.object_store.read_doc(obj_id)
self.assertEquals(obj2, res_config)
config_ref = "objects:%s/" % obj_id
config = {'process':{'config_ref':config_ref}}
pid1 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertTrue(pid1)
proc = pm.procs_by_name['sample1']
self.assertTrue(proc)
self.assertIn('special', proc.CFG)
self.assertTrue(proc.CFG.get_safe("special.more"), 'exists')
pm.terminate_process(pid1)
config_ref = "objects:%s/special" % obj_id
config = {'process':{'config_ref':config_ref}}
pid1 = pm.spawn_process('sample1', 'pyon.container.test.test_procs', 'SampleProcess', config)
self.assertTrue(pid1)
proc = pm.procs_by_name['sample1']
self.assertTrue(proc)
self.assertIn('more', proc.CFG)
self.assertTrue(proc.CFG.more, 'exists')
pm.terminate_process(pid1)
| python |
<gh_stars>100-1000
{
"id": 118431,
"name": "Cleaner reblog text",
"description": "Make the new reblog text easier to read by reducing the amount of distracting elements.",
"user": {
"id": 17874,
"name": "KWierso",
"email": "<PASSWORD>acted",
"paypal_email": null,
"homepage": null,
"about": null,
"license": null
},
"updated": "2015-09-04T06:39:33.000Z",
"weekly_install_count": 0,
"total_install_count": 86,
"rating": null,
"after_screenshot_name": "https://userstyles.org/auto_style_screenshots/118431-after.png?r=1587110642",
"obsoleting_style_id": null,
"obsoleting_style_name": null,
"obsolete": 0,
"admin_delete_reason_id": null,
"obsoletion_message": null,
"screenshots": null,
"license": "publicdomain",
"created": "2015-09-04T06:13:02.000Z",
"category": "site",
"raw_subcategory": "tumblr",
"subcategory": "tumblr",
"additional_info": null,
"style_tags": [],
"css": "@namespace url(http://www.w3.org/1999/xhtml);\r\n\r\n@-moz-document domain(\"tumblr.com\") {\r\n .reblog-tumblelog-name {\r\n font-weight: lighter!important;\r\n font-size: 10px!important;\r\n }\r\n \r\n .reblog-tumblelog-name:after {\r\n content: ':';\r\n }\r\n \r\n .reblog-avatar {\r\n display:none!important;\r\n }\r\n \r\n .reblog-header {\r\n padding-left:unset!important;\r\n }\r\n \r\n .reblog-list-item--text-post-original .reblog-tumblelog-name {\r\n display:none!important;\r\n }\r\n \r\n div:not(.original-reblog-content):not(.reblog-list-item--text-post-original) > .reblog-content {\r\n padding-left:15px!important;\r\n }\r\n \r\n .reblog-list-item {\r\n border-bottom:3px solid #e7e7e7;\r\n }\r\n .reblog-list-item.contributed-content {\r\n border-top: 3px solid #e7e7e7;\r\n }\r\n .reblog-list {\r\n border-top: unset!important;\r\n }\r\n}",
"discussions": [],
"discussionsCount": 0,
"commentsCount": 0,
"userjs_url": "/styles/userjs/118431/cleaner-reblog-text.user.js",
"style_settings": []
} | json |
For the first time since the formation of the Internet and Mobile Association of India (IAMAI), no big tech members have secured a position in the governing body, allowing Indian digital entrepreneurs to assume full control of the newly formed 24-member council for 2023-25.
The chairperson of the newly elected governing council is Harsh Jain, co-founder and CEO of Dream Sports. Rajesh Magow, co-founder and group CEO of MakeMyTrip, and Satyan Ganjwani, vice chairman of Times Internet, have been elected vice chairman and treasurer of IAMAI. They join IAMAI president Subho Ray to form the association's executive council.
Big Tech firms like Google, Meta (formerly Facebook), Amazon, and Microsoft were not included in the council following recent elections for new office bearers. This development signifies a significant shift in the association's leadership, as big tech firms previously had substantial influence.
According to a report by Money Control, start-ups had accused IAMAI of aligning with Big Tech's interests and acting as their mouthpiece. The domestic digital players strongly opposed the policy stance taken by Big Tech firms on issues such as digital competition policy and regulations for digital firms.
Despite this news reporting a positive outlook for Indian start-ups, industry analysts believe that Big Tech firms will continue to exert influence through their presence in other associations like the US-India Chamber of Commerce and the US-India Business Council, reports the Financial Times. Additionally, the report claims that IAMAI may struggle to present a unified voice on policy matters without the consent of Big Tech firms. If IAMAI fails to maintain a united front, the government may engage with multiple associations on digital matters.
According to media reports, Meta's public policy director Shivnath Thukral made an unsuccessful bid for council membership. At the same time, Google Cloud India's managing director, Bikram Bedi, contested the election in place of the country head & vice president of Google India, Sanjay Gupta.
Indian start-ups distance themselves from IAMAI, call it 'pro-Big Tech'
The new council will assume responsibility at the next annual general meeting. The new governing council includes representatives from various digital companies such as PhonePe, Infibeam Avenues, Shaadi. com, Indian Express, IndMoney, Ixigo, Nazara Technologies, Innov8, MapmyIndia, and Matrimony. com, among others.
What is the IAMAI?
The IAMAI, or Internet and Mobile Association of India, is a not-for-profit industry body that represents the interests of online and digital services companies in India. It was established in 2004 and serves as a platform for internet and mobile companies to come together, discuss common issues, and work towards developing and growing the digital ecosystem in India.
The IAMAI plays a crucial role in advocating for favourable policies and regulations that promote the growth of the digital industry. It works closely with the government, regulatory bodies, and other stakeholders to provide inputs on policy matters, industry standards, and best practices. The association also organises conferences, seminars, and events to facilitate knowledge sharing and networking among its members. The website boasts of being the "only platform solely focused on the internet sector, run by and for the internet companies in India. "
Who are the members?
The IAMAI has a diverse membership base comprising various segments of the digital industry, including e-commerce companies, digital content providers, social media platforms, mobile app developers, payment service providers, and online advertising agencies, among others. It has more than 500 Indian and multinational corporations, including major start-ups such as Paytm, Ola, Unacademy and many more.
By representing the interests of its members, the IAMAI aims to foster the growth of the digital economy in India and promote the benefits of the internet and mobile technologies.
Any internet company can apply for membership through the official IAMAI website. They have a 24-member governing council with elections held every two years. | english |
New Delhi: The marketing for Samantha Ruth Prabhu’s upcoming movie, Shaakuntalam, is keeping her very busy. The actress recently travelled to Mumbai for back-to-back interviews. The actress posted some amazing black-and-white images of herself wearing a stunning gown with cut-out features to her Instagram feed on March 21.
Pallavi, her stylist, described her as a “glorious Roman snack. ” The actress saw her stylist’s caption and couldn’t help but laugh out loud.
On April 14, 2023, Samantha’s Shaakuntalam will be released in theatres. The movie will have a major global release in several languages. The actress is currently getting better after having myositis.
Samantha posted images from Shaakuntalam’s promotional events on Instagram on March 21. She wrote, “Let’s talk all things #Shaakuntalam (sic),” with a white heart emoji.
Samantha was described by her stylist Pallavi Singh as “A glorious roman snack! ” in some previously unreleased photos. Samantha posted a laughing-out-loud emoji in the comment box.
Gunasekhar wrote and directed the historical period drama Shaakuntalam. Shakuntala is played by Samantha in the movie. The drama by Kalidasa serves as the inspiration for the movie. The Puru dynasty’s King Dushyanta will be played by Dev Mohan. Supporting actors include Mohan Bau, Jisshu Sengupta, Madhoo, Gautami, Aditi Balan, and Ananya Nagalla.
The movie is distributed by Sri Venkateswara Creations and was produced by Neelima Guna under the Gunaa Teamworks banner. | english |
{
"botname": "Ayam BOT",
"ownername": "Manusia",
"myweb" :"https://bit.ly/AyamGoyengX",
"pesan_gua" : "TqTo Jangan Diubah Ya Hargai Juga Creator SC Nya",
"youtube" : "https://chat.whatsapp.com/KzpdPRvgIDw99rLn7YfG7f",
"github" : "https://chat.whatsapp.com/KzpdPRvgIDw99rLn7YfG7f",
"ownernomer": "6285792890353",
"ownernomerr": "+6285792890353",
"thumbnail": "./image/lol.jpg",
"donasi": "./image/donasi.jpg"
}
| json |
<reponame>bbranquinho/clinica-vita<gh_stars>0
package org.fpu.test.clinica.utils;
import org.fpu.clinica.utils.AppContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import(AppContext.class)
public class AppContextTest {
}
| java |
{
"name": "Succinum",
"relationship": "Compare: Do not confound with Ambergris (Ambra). SUCCINIC ACID. (Hay-fever. Paroxysmal sneezing, dropping of watery mucus from nostrils; asthma. Inflammation through respiratory tract; causing asthma, chest pains, etc.; itching of eyelids and canthi and nose worse drafts. Use 6 to 30th potency). Compare: ARUNDO, WYETHIA, SABADILLA, SINAPIS.",
"common_names": "(Electron. Amber) - (A Fossil Resin)",
"symptoms": {
"Head": [
"Fear of trains and close places",
"Headache, lachrymation, sneezing"
],
"Respiratory": [
"Whooping-cough",
"Asthma, incipient phthisis, chronic bronchitis, pains in chest"
]
},
"details": "Nervous and hysterical symptoms. Asthma. Affections of spleen.",
"dosage": "Third trituration. Five drop doses of the oil."
} | json |
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { element, by, Key, ElementFinder } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
export class StartTaskDialogPage {
name: ElementFinder = element(by.css('input[id="name_id"]'));
dueDate: ElementFinder = element(by.css('input[id="date_id"]'));
description: ElementFinder = element(by.css('textarea[id="description_id"]'));
assignee: ElementFinder = element(by.css('div#people-widget-content input'));
startButton: ElementFinder = element(by.css('button[id="button-start"]'));
startButtonEnabled: ElementFinder = element(by.css('button[id="button-start"]:not(disabled)'));
cancelButton: ElementFinder = element(by.css('button[id="button-cancel"]'));
selectFormDropdown = new DropdownPage(element(by.css('mat-select[id="form_id"]')));
selectAssigneeDropdown = new DropdownPage();
async addName(userName: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.name);
await this.name.clear();
await this.name.sendKeys(userName);
}
async addDescription(userDescription: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.description);
await this.description.sendKeys(userDescription);
}
async addDueDate(date: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.dueDate);
await this.dueDate.sendKeys(date);
}
async addAssignee(name: string): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.assignee);
await this.assignee.sendKeys(name);
await this.selectAssigneeFromList(name);
}
async selectAssigneeFromList(name: string): Promise<void> {
await this.selectAssigneeDropdown.selectOption(name);
}
async getAssignee(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.assignee);
return this.assignee.getAttribute('placeholder');
}
async selectForm(form): Promise<void> {
await this.selectFormDropdown.selectDropdownOption(form);
}
async clickStartButton(): Promise<void> {
return BrowserActions.click(this.startButton);
}
async checkStartButtonIsEnabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.startButtonEnabled);
}
async checkStartButtonIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('button[id="button-start"]:disabled')));
}
async clickCancelButton(): Promise<void> {
await BrowserActions.click(this.cancelButton);
}
async blur(locator: ElementFinder): Promise<void> {
await BrowserActions.click(locator);
await locator.sendKeys(Key.TAB);
}
async checkValidationErrorIsDisplayed(error: string, elementRef = 'mat-error'): Promise<void> {
const errorElement: ElementFinder = element(by.cssContainingText(elementRef, error));
await BrowserVisibility.waitUntilElementIsVisible(errorElement);
}
}
| typescript |
<!DOCTYPE html>
<html ng-app="todoapp">
<head>
<title></title>
<meta charset="utf-8" />
<link href="Content/bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="Content/bootstrap-theme.css" />
</head>
<body>
<div class="container">
<div class="page-header">
To-Do Task Listing
</div>
<div class="panel-body">
<div class="row">
<div ng-controller="todoController as ctrl">
<div class="col-lg-12">
<div class="input-group input-group-lg">
<input type="text" ng-model="task" class="form-control input-lg" id="search-church" placeholder="Enter the task description...">
<span class="input-group-btn">
<button class="btn btn-default btn-lg" type="submit" ng-click="ctrl.addTask(task)">Add Task</button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<br/>
<br />
<br />
<div>
<table class="table table-striped">
<th>
Task ID
</th>
<th>
Task Description
</th>
<tr ng-repeat="tks in ctrl.Tasks track by $index">
<td>
{{$index + 1 }}
</td>
<td>
{{tks}}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="panel-footer">
© 2016
</div>
</div>
<script src="scripts/angular.js"></script>
<script src="scripts/app/todoapp.js"></script>
</body>
</html>
| html |
There are thousands of women in Assam who are driven out of their matrimonial home due to domestic violence.
There are thousands of women in Assam who are driven out of their matrimonial home due to domestic violence. Most of them latter approached the court for maintenance and the court, after hearing the wife and husband, normally grants monthly maintenance. This provision is inserted in the statute with the sole object to protect the right of the weaker section of society. If any person visits the district or sub-divisional court in any working day he will find fifty to sixty women with melancholy mood sitting under the shed of tree or in witness resting shed waiting to receive their maintenance from the court. The total number of such women in Assam will be around fifteen to twenty thousand and these women with paltry amount of maintenance somehow lead a wretched life. But these ill fated women have not received their monthly maintenance due to the lockdown and suspension of court works. The normal court work was suspended from 17/3/20 and it will continue till 26/5/20. The subordinate court of Assam only takes up the urgent matter and it appears that the payment of monthly maintenance is not treated as an urgent matter. Thus long suspension of normal court activity has increased the agony of this section of the weaker section of the society manifold. Nobody sheds tears for them. Will the Woman Commission of Assam take step to ameliorate the wretched condition of such women?
Jayanta Deka, | english |
Emenemen kumwail pahn kin wauneki eh nohno oh eh pahpa, oh pil kapwaiada rahnen Sapad, duwen me I koasoanedier. Ngehi me KAUN-O, amwail Koht.
“Kumwail dehr keseiehla oh pwongih dikedik en eni kan, pil dehr wiahda oh pwongih koht kan me wiawihkihda mete. Ngehi me KAUN-O, amwail Koht.
5 “Ni amwail pahn kemehla mahn emen pwehn wia meirong en kaminimin, kumwail kapwaiada kosonned akan me I kihong kumwail; eri, I ahpw pahn perenki meirongo. 6 Kumwail pahn kang uduko ni rahn me kumwail kemehla mahno, de mandahn rahno. Ma mie uduk me luhwehdi lel ni kesiluhn rahn e pahn isihsla, 7 pwehki eh saminlahr ong kaudok. Eri, ma mehmen pahn tungoale, I sohte pahn perenki meirongo. 8 Mehmen me pahn tungoale pahn kamwahlihala mehkot me kasarawihongieier, oh e solahr pahn wia kisehn nei aramas akan.
Kumwail dehr dolung sapahlih amwail mwetin wain kan, wain me kumwail sohte kilang oh dauliher, de rikada wahn wain me pwupwudi kan; kumwail mweidohng kenen me semwehmwe kan oh mehn liki kan. Ngehi me KAUN-O, amwail Koht.
Kumwail dehr wiahda inou ni mwarei ma kumwail sohte lemeleme en kapwaiada; pwe met kin kahdsuwedihala mwarei. Ngehi me KAUN-O, amwail Koht.
Kumwail dehr lahlahwe aramas salengepon, de kihdiong mehkot mwohn me maskun men pwe en dipekelekelki, ahpw kumwail lemmwikin ie. Ngehi me KAUN-O, amwail Koht.
Dehr karaunmwahlih aramas, oh ni emen eh pahn wia kopwung en eh mour, kasalehda omw kadehde ma e kak sewese ih. Ngehi me KAUN-O.
Dehr dupungki me suwed ong emen eh wia suwed ong uhk, de kadakadaur omw kailongki, ahpw ke en poakohng mehn mpomw duwehte omw kin poakohng pein uhk. Ngehi me KAUN-O.
“Kumwail peikiong ei kosonned akan. Kumwail sohte pahn kowarakiheki noumwail mahn mahnd akan ong ehu soangen mahn tohrohr. Dehr padokedi soangen werentuhke riau nan mwetuwelteieu. Kumwail sohte pahn likawih likou me wiawihkihda soangen likou riau.
20 “Ma e sansal me ohl emen wiahki eh pekehi serepein lidu men, ahpw serepeino saikinte pweipweida oh kasaledekla, oh ma emen ohl tohrohr pahn kapwaiada nsenen pwopwoud rehn serepeino, eri, ira pahn kalokolok, ahpw ira sohte pahn kamakamala, pwehki serepeino wia lidu men. 21 Ohlo pahn wahla sihpw wol men ni wenihmwen Impwalo, mehn wia meirong en kapwungala, 22 eri, samworo ahpw pahn wia sarawien kamwakel pwe en kamwakele sang dipen ohlo, Koht ahpw pahn ketin mahkikihong dipeo.
23 “Ni amwail pahn pedolong nan sapwen inowo oh padokedi soangen wahntuhke sohte lipilipil, kumwail pahn wiahki me wahntuhke ko mehkot samin ong kaudok erein sounpar siluh. Kumwail dehr tungoale erein ahnsowo. 24 Ni kapahieun sounpar wahntuhke koaros pahn kasarawihla nin duwen kisakis ehu mehn kasapahlkalahngan ong ie, KAUN-O. 25 Ahpw ni kelimaun pahr, kumwail kakehr tungoale wahntuhke ko. Eri, ma kumwail pahn kin wia met, amwail tuhke kan pahn kin pweida oh wa mwahu. Ngehi me KAUN-O, amwail Koht.
kumwail sohte pil pahn palih kilimwail kan, de leke paliwaramwail pwe kumwail en kasalehda amwail nsensuwedkilahr me melahhr emen. Ngehi me KAUN-O.
Kumwail kapwaiada rahnen Sapad oh wauneki tehnpesei. Ngehi me KAUN-O.
“Kumwail dehr kohla rehn me kin ketieni kan. Ma kumwail pahn wia met, kumwail pahn saminla ong kaudok. Ngehi me KAUN-O, amwail Koht.
32 “Kahkahki oh wauneki me mah kan. Kumwail lemmwikin ie oh peikiong ie. Ngehi me KAUN-O.
Kumwail nsenohkin irail duwehte amwail kin nsenohki riamwail mehn Israel kan, oh poakohng irail duwehte amwail kin poakohng pein kumwail. Kumwail en tamataman me kumwail wia mehn liki kei nan wehin Isip mahso. Ngehi me KAUN-O, amwail Koht.
| english |
<filename>week9/css3-1.html
<!DOCTYPE html>
<html>
<head>
<title>Membuat sudut melengkung dengan css3</title>
<link rel="stylesheet" type="text/css" href="css1.css">
</head>
<body>
<h1>Membuat sudut melengkung dengan css3 </h1>
<div class="ketengah">
<div class="kotak kotak1">kotak 1</div>
<div class="kotak kotak2">kotak 2</div>
<div class="kotak kotak3">kotak 3</div>
<div class="kotak kotak4">kotak 4</div>
<div class="kotak kotak5">kotak 5</div>
<div class="kotak kotak6">kotak 6</div>
<div class="kotak kotak7">kotak 7</div>
<div class="kotak kotak8">kotak 8</div>
</div>
</body>
</html>
| html |
{
"element" : "pippo rolls 4, 5. pippo moves from 0 to 9, The Goose. pippo moves again and goes to 18, The Goose. pippo moves again and goes to 27, The Goose. pippo moves again and goes to 36. "
}
| json |
<gh_stars>1-10
{"categories":["Engineering","Hardware","Manual"],"desc":"\n","details":{"authors":"<NAME>","format":"pdf","isbn-10":"1138297321","isbn-13":"978-1138297326","pages":"205 pages","publication date":"November 10, 2017","publisher":"CRC Press","size":"18.55Mb"},"img":"http://2172.16.17.32/covers/41/41bf7fad9c2a369ba96973155b1f371d.jpg","link":"https://rapidhosting.info/files/djq","title":"Circuits and Electronics: Hands-on Learning with Analog Discovery"} | json |
<gh_stars>0
'''
olympics.py
A command line interface for querying the olympics database.
Written by <NAME> for cs257
'''
import psycopg2
import argparse
from config import user, password, database
def connect_to_database():
try:
connection = psycopg2.connect(database = database, user = user, password = password)
return connection
except Exception as e:
print(e)
exit()
def get_parsed_arguments():
'''Obtains and parses the command line arguments'''
parser = argparse.ArgumentParser()
parser.add_argument("-n", "--noc", help="A 3-letter NOC to list the athletes for")
parser.add_argument("-l", "--list", action = 'store_true', help="Lists the number of gold medals won by each NOC in descending order")
parser.add_argument("-y", "--year", help="Lists all athletes who won a medal for a given year, including what event they won their medal in and the type of medal won.")
parser.add_argument('-v','--version', action='version', version='olympics.py 1.0')
parsed_arguments = parser.parse_args()
return parsed_arguments
################# Query functions ######################
def query_noc_athletes(noc, cursor):
try:
query_string = noc
query = '''SELECT DISTINCT athlete_name FROM athletes JOIN results ON athletes.id = results.athlete_id JOIN nocs ON results.noc_id = nocs.id WHERE nocs.noc = %s'''
cursor.execute(query, (query_string,))
return cursor
except Exception as e:
print(e)
exit()
def query_noc_gold_medals(cursor):
try:
query = '''SELECT noc, count(medal) FROM results JOIN nocs ON results.noc_id = nocs.id WHERE medal = 'Gold' GROUP BY nocs.noc ORDER BY COUNT(Medal) DESC;'''
cursor.execute(query)
return cursor
except Exception as e:
print(e)
exit()
def query_year_medalists(year, cursor):
try:
query_int = int(year)
query = '''SELECT athlete_name, event_name, medal FROM athletes LEFT JOIN results ON athletes.id = results.athlete_id JOIN games ON games_id = games.id JOIN events ON results.event_id = events.id WHERE games.year = %s AND results.medal IS NOT NULL;'''
cursor.execute(query, (query_int,))
return cursor
except Exception as e:
print(e)
exit()
########################################################
################# Print Functions ######################
def print_noc_athletes(noc, cursor):
print('===== All Athletes from ' + noc + ' =====')
for row in cursor:
print(row[0])
print()
def print_noc_gold_medals(cursor):
print('===== NOCS and their total gold medals =====')
for row in cursor:
print(row[0], row[1])
print()
def print_year_medalists(year, cursor):
print('===== All medalists in the year ' + year + ' =====')
for row in cursor:
print(row[0] + ',' + row[1] + ',' + row[2])
print()
########################################################
def main():
arguments = get_parsed_arguments()
connection = connect_to_database()
cursor = connection.cursor()
if arguments.noc:
noc_athletes = query_noc_athletes(arguments.noc, cursor)
print_noc_athletes(arguments.noc, noc_athletes)
if arguments.list:
noc_gold_medals = query_noc_gold_medals(cursor)
print_noc_gold_medals(noc_gold_medals)
if arguments.year:
year_medalists = query_year_medalists(arguments.year, cursor)
print_year_medalists(arguments.year, year_medalists)
connection.close()
if __name__ == '__main__':
main()
| python |
package org.nd4j.examples;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.indexing.INDArrayIndex;
import org.nd4j.linalg.indexing.NDArrayIndex;
import java.util.Arrays;
/**
* --- Nd4j Example 3: Getting and setting parts of INDArrays ---
*
* 이번 예제는, INDArray의 부분을 얻고 다루는 방법에 대해 알아보자.
*
* @author <NAME>
*/
public class Nd4jEx3_GettingAndSettingSubsets {
public static void main(String[] args) {
// 수기로 값을 입력하여 3X5 INDArray를 작성해 보자.
// 이것을 위해서, 1X15 행렬로 시작해보자, 그리고 'reshape'를 사용하여 3X5 INDArray를 만들자.
INDArray originalArray = Nd4j.linspace(1, 15, 15).reshape('c', 3, 5);
System.out.println("Original Array:");
System.out.println(originalArray);
// getRow, getColumn을 이용하여 행 혹은 열 각각을 얻을 수 있다.
INDArray firstRow = originalArray.getRow(0);
INDArray lastColumn = originalArray.getColumn(4);
System.out.println();
System.out.println("First row:\n" + firstRow);
System.out.println("Last column:\n" + lastColumn);
// 아래내용을 출력할 때 주의사항: lastColumn은 출력될 때는 행 벡터처럼 보이지만 실제로 열 벡터이다.
System.out.println(
"Shapes: " + Arrays.toString(firstRow.shape()) + "\t" + Arrays.toString(lastColumn.shape()));
// ND4J의 핵심 개념은 뷰(view)이다 : 하나의 INDArray는 다른 행렬과 같은 메모리 위치를 가리킬 수 있다.
// 예를들어, getRow, getColumn은 originalArray의 뷰이다.
// 따라서, 하나를 변경하면 다른 하나도 변경된다.
firstRow.addi(1.0); // 해당 자리에 추가하는 기능: firstRow와 originalArray 양쪽 값을 모두 바꾼다.
System.out.println("\n\n");
System.out.println("firstRow, after addi operation:");
System.out.println(firstRow);
System.out.println(
"originalArray, after firstRow.addi(1.0) operation: (note it is modified, as firstRow is a view of originalArray)");
System.out.println(originalArray);
// 다음 섹션을 위해 기본 행렬을 다시 만들어보자.
originalArray = Nd4j.linspace(1, 15, 15).reshape('c', 3, 5);
// INDArray의 인덱싱을 이용해 임의의 부분을 선택할 수 있다.
// 모든 행들중에 처음 세개의 행
INDArray first3Columns = originalArray.get(NDArrayIndex.all(), NDArrayIndex.interval(0, 3));
System.out.println("first 3 columns:\n" + first3Columns);
// 다시한번, 이것 또한 뷰이다.
first3Columns.addi(100);
System.out.println("originalArray, after first3Columns.addi(100)");
System.out.println(originalArray);
// 다음 섹션을 위해 기본 행렬을 다시 만들어보자.
originalArray = Nd4j.linspace(1, 15, 15).reshape('c', 3, 5);
// 임의의 부분을 설정할 수 있다.
// 2번째 인덱스의 세번째 컬럼에 0을 설정하자.
INDArray zerosColumn = Nd4j.zeros(3, 1);
originalArray.put(new INDArrayIndex[] { NDArrayIndex.all(), NDArrayIndex.point(2) }, zerosColumn); // 모든행, 두번째
// 인덱스의 열들
System.out.println("\n\n\nOriginal array, after put operation:\n" + originalArray);
// 다음 섹션을 위해 기본 행렬을 다시 만들어보자.
originalArray = Nd4j.linspace(1, 15, 15).reshape('c', 3, 5);
// 가끔, 우리는 이러한 in-place 행위를 원치않는다. 이러한 경우, 끝에 .dup() 메서드를 추가하면 된다.
// .dup() 메서드 - 'duplicate'를 의미함 - 새롭고 분리된 행렬을 만든다.
INDArray firstRowDup = originalArray.getRow(0).dup(); // 첫번째 행을 복사한다. firstRowDup은 originalArray의 뷰가 아니다.
firstRowDup.addi(100);
System.out.println("\n\n\n");
System.out.println("firstRowDup, after .addi(100):\n" + firstRowDup);
System.out.println("originalArray, after firstRowDup.addi(100): (note it is unmodified)\n" + originalArray);
}
}
| java |
import { BaseWatchAction, nodeApiV1, podApiV1, V1Pod } from '@tenlastic/kubernetes';
import * as requestPromiseNative from 'request-promise-native';
const accessToken = process.env.ACCESS_TOKEN;
const container = process.env.GAME_SERVER_CONTAINER;
const endpoint = process.env.GAME_SERVER_ENDPOINT;
const persistent = process.env.GAME_SERVER_PERSISTENT === 'true';
const podLabelSelector = process.env.GAME_SERVER_POD_LABEL_SELECTOR;
let isUpdateRequired = false;
let isUpdatingStatus = false;
const pods: { [key: string]: V1Pod } = {};
/**
* Checks the status of the pod and saves it to the Game Server's database.
*/
export async function status() {
podApiV1.watch(
'dynamic',
{ labelSelector: podLabelSelector },
async (type, pod: V1Pod) => {
console.log(`Event - ${type}: ${pod.metadata.name}.`);
if (type === 'ADDED' || type === 'MODIFIED') {
pods[pod.metadata.name] = pod;
} else if (type === 'DELETED') {
delete pods[pod.metadata.name];
}
try {
if (
!persistent &&
pod.metadata.labels['tenlastic.com/role'] === 'application' &&
(pod.status?.phase === 'Failed' || pod.status?.phase === 'Succeeded')
) {
await deleteGameServer();
} else {
await updateGameServer();
}
} catch (e) {
console.error(e?.message);
process.exit(1);
}
},
err => {
console.error(err?.message);
process.exit(err ? 1 : 0);
},
);
}
async function deleteGameServer() {
console.log(`Deleting Game Server...`);
await requestPromiseNative.delete({
headers: { Authorization: `Bearer ${accessToken}` },
url: endpoint,
});
console.log('Game Server deleted successfully.');
}
async function getEndpoints(pod: V1Pod) {
if (!pod || !pod.spec.nodeName) {
return null;
}
const response = await nodeApiV1.read(pod.spec.nodeName);
const address = response.body.status.addresses.find(a => a.type === 'ExternalIP');
const ip = address ? address.address : '127.0.0.1';
const ports = pod.spec.containers.find(cs => cs.name === container).ports;
const tcp = ports.find(p => p.protocol === 'TCP').hostPort;
const udp = ports.find(p => p.protocol === 'UDP').hostPort;
return {
tcp: `tcp://${ip}:${tcp}`,
udp: `udp://${ip}:${udp}`,
websocket: `ws://${ip}:${tcp}`,
};
}
function getPodStatus(pod: V1Pod) {
const isReady = pod.status.conditions?.find(
c => c.status === 'True' && c.type === 'ContainersReady',
);
let phase = pod.status.phase;
if (phase === 'Running' && !isReady) {
phase = 'Pending';
}
return { _id: pod.metadata.name, phase };
}
async function updateGameServer() {
if (isUpdatingStatus) {
isUpdateRequired = true;
return;
}
console.log(`Updating Game Server status...`);
isUpdatingStatus = true;
// Endpoints.
const pod = Object.values(pods).find(
p => !p.metadata.deletionTimestamp && p.metadata.labels['tenlastic.com/role'] === 'application',
);
const endpoints = await getEndpoints(pod);
// Nodes.
const nodes = Object.values(pods)
.filter(p => !p.metadata.deletionTimestamp)
.map(getPodStatus);
// Phase.
let phase = 'Pending';
if (nodes.every(n => n.phase === 'Running')) {
phase = 'Running';
} else if (nodes.some(n => n.phase === 'Error')) {
phase = 'Error';
} else if (nodes.some(n => n.phase === 'Failed')) {
phase = 'Failed';
}
// Version
const { version } = require('../../package.json');
await requestPromiseNative.put({
headers: { Authorization: `Bearer ${accessToken}` },
json: { status: { endpoints, nodes, phase, version } },
url: endpoint,
});
console.log('Game Server updated successfully.');
isUpdatingStatus = false;
if (isUpdateRequired) {
isUpdateRequired = false;
return updateGameServer();
}
}
| typescript |
/*
* Nortal TechDay React Native App
* <NAME>
* @mikkoj
* http://github.com/mikkoj/NortalTechDay
*/
'use strict';
var React = require('react-native')
var {
AppRegistry,
StyleSheet,
NavigatorIOS,
Text,
View,
ScrollView
} = React
var Icon = require('FAKIconImage')
var SMXTabBarIOS = require('SMXTabBarIOS')
var SMXTabBarItemIOS = SMXTabBarIOS.Item
var InitialTab = "schedule";
var Tabs = [
{
name: "schedule",
iconName: "fontawesome|calendar",
iconSize: 26,
content: require('./components/TracksView')
},
{
name: "info",
iconName: "foundation|info",
iconSize: 30,
content: require('./components/InfoView')
},
{
name: "rooms",
iconName: "ion|ios-navigate",
iconSize: 29,
content: require('./components/RoomsView')
},
{
name: "social",
iconName: "ion|chatboxes",
iconSize: 30,
content: require('./components/SocialView')
}
]
var NortalTechDay = React.createClass({
getInitialState: function() {
return {
selectedTab: InitialTab,
}
},
renderTab: function(tab) {
var TabContent = tab.content
return (
<SMXTabBarItemIOS
name={tab.name}
iconName={tab.iconName}
title={''}
iconSize={tab.iconSize}
selected={this.state.selectedTab === tab.name}
onPress={() => {
this.setState({
selectedTab: tab.name,
});
}}>
<TabContent />
</SMXTabBarItemIOS>
)
},
render: function() {
var self = this;
return (
<SMXTabBarIOS
selectedTab={self.state.selectedTab}
tintColor={'green'}
barTintColor={'#fff'}>
{Tabs.map(this.renderTab)}
</SMXTabBarIOS>
)
},
})
module.exports = NortalTechDay | javascript |
21 The land enjoyed its sabbath rests;(A) all the time of its desolation it rested,(B) until the seventy years(C) were completed in fulfillment of the word of the Lord spoken by Jeremiah.
2 in the first year of his reign, I, Daniel, understood from the Scriptures, according to the word of the Lord given to Jeremiah the prophet, that the desolation of Jerusalem would last seventy(A) years.
New International Version (NIV)
Holy Bible, New International Version®, NIV® Copyright ©1973, 1978, 1984, 2011 by Biblica, Inc.® Used by permission. All rights reserved worldwide.
NIV Reverse Interlinear Bible: English to Hebrew and English to Greek. Copyright © 2019 by Zondervan.
| english |
<gh_stars>0
{"date":20200326,"state":"AL","positive":506,"negative":3593,"pending":null,"hospitalizedCurrently":106,"hospitalizedCumulative":null,"inIcuCurrently":null,"inIcuCumulative":null,"onVentilatorCurrently":null,"onVentilatorCumulative":null,"recovered":null,"dataQualityGrade":"C","lastUpdateEt":"3/26/2020 00:00","dateModified":"2020-03-26T00:00:00Z","checkTimeEt":"03/25 20:00","death":1,"hospitalized":null,"dateChecked":"2020-03-26T00:00:00Z","totalTestsViral":4099,"positiveTestsViral":null,"negativeTestsViral":null,"positiveCasesViral":506,"deathConfirmed":null,"deathProbable":null,"totalTestEncountersViral":null,"totalTestsPeopleViral":null,"totalTestsAntibody":null,"positiveTestsAntibody":null,"negativeTestsAntibody":null,"totalTestsPeopleAntibody":null,"positiveTestsPeopleAntibody":null,"negativeTestsPeopleAntibody":null,"totalTestsPeopleAntigen":null,"positiveTestsPeopleAntigen":null,"totalTestsAntigen":null,"positiveTestsAntigen":null,"fips":"01","positiveIncrease":223,"negativeIncrease":1064,"total":4099,"totalTestResultsSource":"posNeg","totalTestResults":4099,"totalTestResultsIncrease":1287,"posNeg":4099,"deathIncrease":1,"hospitalizedIncrease":0,"hash":"e3a11648216a69ee4d62f3e2dbabb56349c5cd31","commercialScore":0,"negativeRegularScore":0,"negativeScore":0,"positiveScore":0,"score":0,"grade":""}
| json |
The West Bengal government on Tuesday (November 3) appealed to the people of the state to avoid bursting firecrackers during the upcoming Kali Puja and Diwali festivals in order to check air pollution and prevent the spread of COVID-19 infection.
The West Bengal government on Tuesday (November 3) urged the people of the state to avoid bursting firecrackers during the upcoming Kali Puja and Diwali festivals this year in view of the COVID-19 pandemic.
“No procession will be allowed during the immersion of the Kali idols,” he added after holding a meeting with Chief Minister Mamata Banerjee in this regard.
Alapan Bandyopadhyay said that Kali puja pandals should be open, following COVID-19 safety protocols.
A case has also been filed in Calcutta High Court against allowing the bursting of firecrackers this year during Kali Puja. The case will be heard on November 5 by Justice Sanjib Banerjee.
Meanwhile, the Joint Platform of doctors has already appealed to West Bengal Chief Minister Mamata Banerjee to ensure that firecrackers are not allowed during festivals.
The doctor’s forum also said that the pollution will be extremely harmful amidst the COVID-19 pandemic. | english |
The key drivers of European Jewish population decline are the Holocaust, forcible assimilation, and the exodus of USSR/Iron Curtain Jewry. What we see is the results of those state-sponsored policies.
I grew up Jewish. There was much anti-queer sentiment in the texts we studied and homophobia and transphobia in the stuff I was taught. No one has ever been like,
| english |
Nargis Fakhiri might have taken a long sabbatical after starring in films like Rockstar, Main Tera Hero, Madras Café, Housefull 3 and Azhar, but the actress is ready to bounce back with some interesting scripts in her kitty, including her OTT debut with the series Tatlubaaz alongside Divya Agarwal and Dheeraj Dhoopar. While Nargis is open to exploring this new space through unique characters, the actress however revealed in her recent interview that she won’t go nude and that’s where she draws the line.
In an interview with Hindustan Times, when she was asked about some of the boundaries that she has in place in the context of OTT platforms, she promptly said, “I would never be naked for a project. I have a problem with nudity. ” Even though nudity might be out of the picture for her, Nagis wouldn’t mind tackling challenging roles that might belong to a different sexual orientation or unconventional scripts.
“I wouldn’t mind that because playing a homosexual or being shown as a woman married to another woman doesn’t bother me. Playing any character for me is part of my job. You’re acting and I think that’s totally fine,” she explained.
Nagis also gave her two cents on the backlash that the OTT platforms have been receiving owing to it content. She told the portal, “The audience has a choice to watch it or not. They can choose to switch it off or watch something else. That’s the beauty of OTT platform. There are so many options out there. "
On the work front, Nargis Fakhri will also be seen in the Telugu action-adventure film Hari Hara Veera Mallu. Helmed by Krish Jagarlamudi, the movie also stars Pawan Kalyan, Nidhi Agerwal, and Bobby Deol in key roles. Set against the backdrop of the 17th century Mughal Era, the movie chronicles how the titular character, an outlaw, receives the task of stealing back Koh-i-Noor diamond from the Mughals. | english |
<reponame>nveskovic/indy-sdk<gh_stars>1-10
package org.hyperledger.indy.sdk.wallet;
import org.hyperledger.indy.sdk.ErrorCode;
import org.hyperledger.indy.sdk.IndyException;
/**
* Exception thrown when requesting a value from a wallet that does not contain the specified key.
*/
public class WalletItemNotFoundException extends IndyException
{
private static final long serialVersionUID = 667964860056778208L;
private final static String message = "No value with the specified key exists in the wallet from which it was requested.";
/**
* Initializes a new WalletItemNotFoundException.
*/
public WalletItemNotFoundException()
{
super(message, ErrorCode.WalletItemNotFound.value());
}
}
| java |
{"contributors":null,"truncated":false,"text":"\"Fanaticism is a monster that pretends to be the child of religion\" Voltaire #JeSuisCharlie","in_reply_to_status_id":null,"id":552829129356496896,"favorite_count":1045,"source":"<a href=\"http:\/\/twitter.com\" rel=\"nofollow\">Twitter Web Client<\/a>","retweeted":false,"coordinates":null,"entities":{"symbols":[],"user_mentions":[],"hashtags":[{"indices":[77,91],"text":"JeSuisCharlie"}],"urls":[]},"in_reply_to_screen_name":null,"id_str":"552829129356496896","retweet_count":2135,"in_reply_to_user_id":null,"favorited":false,"user":{"follow_request_sent":false,"profile_use_background_image":true,"profile_text_color":"333333","default_profile_image":false,"id":13496142,"profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/466897747996454912\/IgBlGGVb.jpeg","verified":true,"profile_location":null,"profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/432882718708215809\/GRo-Mkr6_normal.jpeg","profile_sidebar_fill_color":"F3F3F3","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NworglxFEe","indices":[0,22],"expanded_url":"http:\/\/www.billybragg.co.uk","display_url":"billybragg.co.uk"}]},"description":{"urls":[]}},"followers_count":200471,"profile_sidebar_border_color":"000000","id_str":"13496142","profile_background_color":"735D45","listed_count":3932,"is_translation_enabled":false,"utc_offset":0,"statuses_count":9049,"description":"A progressive is someone who wants to see society re-organised so that everyone has access to the means by which to reach their full potential","friends_count":27,"location":"England","profile_link_color":"990000","profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/432882718708215809\/GRo-Mkr6_normal.jpeg","following":false,"geo_enabled":false,"profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/13496142\/1418233298","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/466897747996454912\/IgBlGGVb.jpeg","name":"<NAME>","lang":"en","profile_background_tile":false,"favourites_count":6,"screen_name":"billybragg","notifications":false,"url":"http:\/\/t.co\/NworglxFEe","created_at":"Fri Feb 15 00:05:10 +0000 2008","contributors_enabled":false,"time_zone":"London","protected":false,"default_profile":false,"is_translator":false},"geo":null,"in_reply_to_user_id_str":null,"lang":"en","created_at":"Wed Jan 07 14:08:30 +0000 2015","in_reply_to_status_id_str":null,"place":null} | json |
use super::{ModuleInfo, ModuleOut};
use colorful::Color;
use std::{env, path::Path, process::Command};
const ORANGE: Color = Color::DarkOrange3b; // 166
pub(super) fn get(wd: &Path) -> ModuleOut {
let cargo_toml = wd.join("Cargo.toml");
let _ = cargo_toml.metadata().ok().filter(|f| f.is_file())?;
let rustc_version = env::var("RUSTC")
.map_or_else(|_| Command::new("rustc"), Command::new)
.arg("--version")
.output()
.ok()
.filter(|c| c.status.success())?;
let rustc_version = String::from_utf8_lossy(&rustc_version.stdout);
let rustc_version = rustc_version.split_whitespace().nth(1);
rustc_version.map(|v| ModuleInfo::of().icon("🦀").text(v).color(ORANGE))
}
| rust |
Do you have problems with your skin? Most people do! For example, sometimes your Skin can be too dry or too oily. Either one can cause irritation to the skin, such as flakiness or acne. On the other hand, uneven skin tones and early onset wrinkles affect millions. Whether you suffer from minor skin irritations or major ones, such as eczema or psoriasis, there are treatments that can save your skin!
You can buy creams, face masks, and other expensive treatments that may or may not work. Often, these skin ointments irritate the skin with their harsh chemicals. Natural remedies, therefore, are great options for people with sensitive skin. Soap Lake in Washington is one of those natural remedies that can rejuvenate the skin with its mineral-rich waters, and can even aid in major and minor skin irritations. Keep reading to see how the lake can save your skin! Transform and rejuvenate your skin at your next vacation at Soap Lake Resort!
How Does Soap Lake Save Your Skin?
Historically, the lake actually got its name from the Native American word, Smokiam, which means “healing waters” in English. Therefore, Soap Lake’s highly concentrated mineral waters have been in use for over a hundred years.
People travel from all over the world to relax at Soap Lake’s luxury spa and enjoy the natural healing effects of the water.
There are more than twenty different types of minerals present in the lake, some of which include magnesium, carbonate, and potassium. Magnesium, for example, aids in replenishing the skin and can help create a more youthful appearance by smoothing out wrinkles. Magnesium is also known to have a number of other health benefits, such as improving your immune system, bone health, and sleep patterns.
On the other hand, carbonate is a mineral that aids in more serious skin conditions. For example, carbonate can help heal nail and skin infections, reactions from poison ivy or poison oak, and soothe skin discomfort from conditions such as psoriasis and eczema. Lastly, potassium can help clear bacterial and fungal infections.
Mud baths help the skin by using the above-mentioned minerals to increase blood circulation, which can help heal many different skin conditions and help with joint and muscle pain.
However, many mud bath experiences you might pay for may not always contain enough minerals aid particular skin discomforts. Soap Lake, on the other hand, has such a high mineral content that you will be able to enjoy a relaxing, natural mud bath that could save your skin!
Not only does the water and mud in the lake benefit your skin, but Soap Lake is also part of a resort! That’s right; your next vacation could help clear skin irritations, conditions, infections, and more! By the end of your trip, you could have smoother skin and an even skin tone. Transform and rejuvenate your skin on your next vacation by visiting Soap Lake Resort!
The post This Vacation Could Save Your Skin| Luxury Mud Bath appeared first on KHADIJA BEAUTY.
| english |
Finance Minister Nirmala Sitharaman met with Brazil's Minister of Economy Fernando Haddad and UK Chancellor of Exchequer Jeremy Hunt to discuss various issues, including the strengthening of Multilateral Development Banks (MDBs). Brazil will take over the G20 presidency from India on December 1, and Sitharaman wished Brazil success and assured full support.
The fourth Financial Management Group (FWG) meeting, held under India's G20 presidency, discussed supply chain resilience and its macroeconomic implications. Delegates engaged in extensive discussions on the challenges and opportunities of ensuring supply chain resilience in a global economy. The meeting also focused on the role of international cooperation in addressing external imbalances and associated risks.
MDBs are being encouraged by the G20 to submit an update on the recommendations of the G20’s independent CAF review in Spring 2023 on the sidelines of annual MDB meetings. This will be a key opportunity for India’s G20 presidency to drive climate-smart MDB reforms and ensure MDBs are willing to accept the recommendations, which include redefining risk appetite, revising the approach to callable capital and innovative techniques to create lending headroom.
G20 comprises 19 nations (Argentina, Australia, Brazil, Canada, China, France, Germany, India, Indonesia, Italy, Japan, Republic of Korea, Mexico, Russia, Saudi Arabia, South Africa, Turkey, UK and US) plus the EU. Its influence emanates from three vital statistics — it contributes 85% to the global GDP and 75% to world trade, and houses 64% of the world’s population.
| english |
{
"706478f-a": {
"width": 600,
"thumb_url": "http://oldnyc-assets.nypl.org/thumb/706478f-a.jpg",
"image_url": "http://oldnyc-assets.nypl.org/600px/706478f-a.jpg",
"title": "",
"date": "1930?",
"text": "Richmond Street, west side, between Fulton Street and Ridgewood\nAvenue, showing Public School No. 65.\n\nBoard of Education of the City of New York Early 1930's\n\nNegative available in LH&G Neg. No. 176",
"folder": "Richmond Street & Fulton Street, Brooklyn, NY",
"height": 486,
"original_title": "Brooklyn: Richmond Street - Fulton Street",
"years": [
"1930"
]
}
} | json |
Test cricket will once again return after a one week break when hosts England lock horns with Pakistan in what should be a mouth-watering three-match series between the two countries. The first Test of the three-match #raisethebat series will take place at the Emirates Old Trafford in Manchester and England will hope to continue from where they had left against the West Indies last week.
After having dropped the opening Test of the summer at the Ageas Bowl, England, on the back of dodged performances from the likes of Rory Burns, Dom Sibley, and all-round display from Ben Stokes, Stuart Broad and Chris Woakes came roaring to clinch the last two games and the series.
They could be in for a stiff challenge though against a Pakistan side that has performed relatively well in English conditions in the past decade. Pakistan is the only team to have drawn two back-to-back Test series in England- 2-2 in 2016 and 1-1 in 2018- in the last decade. But the issue for Pakistan is that all three wins that they have registered in England since 2010 have come in London- Lord’s and Oval.
They wouldn’t play a Test in London this time around and considering the fact that they lost by 330 runs in their last Test at Old Trafford and England’s brilliant record at the venue, the home side should start as overwhelming favorites. The key for Pakistan in this series will be their batting-unit. While they have the bowling firepower fo challenge English batting but can their batsmen counter the likes of Broad, Anderson, and Woakes and post in excess of 300 in their first innings? We’ll have to wait and see. It will also be interesting to see what bowling combination does Pakistan play. Bowling coach Waqar Younis said that they might consider playing two spinners. In that case, the likes of Shadab Khan and Kashif Bhatti may come into contention.
England vs Pakistan, 2020, 1st Test Match Details:
The 1st Test between England and Pakistan will be played on Wednesday (August 05) at the Emirates Old Trafford in Manchester. The match will start at 11:00 AM local time [03:30 PM IST].
The pitch at Old Trafford usually assists fast bowlers, as was evident from the last two Tests against the West Indies. What was also evident in that Test was that the pitch is pretty good for batting on the first couple of days.
Jason Holder made the cardinal mistake of winning the toss and opting to field in both the Tests and then saw England batsmen pile up a huge first innings score, something both Joe Root and Azhar Ali should have in mind when they walk out for toss tomorrow.
- Azhar Ali enjoyed a great outing in England back in 2016- 295 runs at 42.14- but he didn’t have the same success in 2018 where he managed just 67 runs across four innings. The Pakistani captain hasn’t had a particularly good last 12-15 months, something he would be looking to address in this series.
- Shan Masood scored 49 in the most recent practice match. Can he emulate his exploits in the Test series?
- Rory Burns [226 runs at 45.8] and Dom Sibley [234 runs at 46.80] were brilliant against the West Indies. The opening pair will once again be the key to their fortunes.
- Babar Azam has had a brilliant run in Test cricket in the past 12-15 months. The right-hander was the best Pakistani batsman during the tour of South Africa [202 runs at 36.8] and Australia [210 runs at 52.5]. Can he repeat the same against the Dukes in England?
- Joe Root loves batting against Pakistan. The English captain has 916 runs to his name in 9 Tests against Pakistan. He also has a brilliant record at Old Trafford: 725 runs in 7 Test at 72.5.
- Ben Stokes was the MVP for England against the West Indies. But can the all-rounder improve on his batting numbers against Pakistan [average of 18.78 in five Tests].
- Ollie Pope made a sumptuous 91 against the West Indies in the last Test.
- Mohammad Abbas- 10 wickets at 14.80 in 2 Tests- was brilliant on the 2018 tour. Can he repeat the same? Also, can Shaheen Shah Afridi and Naseem Shah deliver the goods?
- Of-course the English pace bowling unit of Stuart Broad, James Anderson, and Chris Woakes will be the ones to watch out, considering the way they dismantled the West Indies batting unit in the last two Tests.
- England have named an unchanged 14-man squad for the 1st Test.
- Pakistan have named a 16-man squad for the 1st Test.
Captain and Vice-Captain Selection:
Suggested Playing XI No.1 for Fantasy Cricket:
Expert Advice:
The pitch at Old Trafford normally aids fast bowlers. Hence, it wouldn’t be a bad idea for to you make seamers as captain/vice-captain of your Dream11 team.
The 1st Test of the three-match series between England and Pakistan can be watched live on the Sony Ten network. You can also live stream it on the Sony Liv app.
| english |
{"css/doony.min.css":"<KEY>,"js/doony.min.js":"<KEY>} | json |
<reponame>porimol705/appinventor-extensions
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright © 2017 Massachusetts Institute of Technology, All rights reserved.
package edu.mit.appinventor.iot.arduino101;
import com.google.appinventor.components.annotations.DesignerComponent;
import com.google.appinventor.components.annotations.SimpleEvent;
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.annotations.SimpleObject;
import com.google.appinventor.components.common.ComponentCategory;
import com.google.appinventor.components.runtime.EventDispatcher;
import com.google.appinventor.components.runtime.Form;
import edu.mit.appinventor.ble.BluetoothLE;
import java.util.List;
/**
* An extension for the Arduino 101 to interact with buttons attached to digital pins.
*
* @author <EMAIL> (<NAME>)
*/
@DesignerComponent(version = 1,
description = "The Arduino101Button component lets users listen to events triggered by a " +
"button connected to a digital pin on the Arduino. The extension responds to voltage " +
"changes on the specified digital <code>Pin</code> and so can be used to respond to any " +
"hardware component that signals high/low based on some external phenomenon, such as a " +
"motion detector.<br>\n\n<strong>More links:</strong><ul><li>Download a <a " +
"href='http://iot.appinventor.mit.edu/assets/samples/Arduino101Button.aia' " +
"target='_blank'>sample project</a> for the Arduino 101 Button.</li><li>View the <a " +
"href='http://iot.appinventor.mit.edu/assets/howtos/MIT_App_Inventor_IoT_Button.pdf' " +
"target='_blank'>how to instructions</a> for the Arduino 101 Button.</li></ul>",
category = ComponentCategory.EXTENSION,
nonVisible = true,
iconName = "aiwebres/arduino.png")
@SimpleObject(external = true)
public class Arduino101Button extends Arduino101ExtensionWithPin<Arduino101Button> {
private static final String BUTTON_SERVICE_UUID = "E95D0200-251D-470A-A062-FA1922DFA9A7";
private static final String BUTTON_PIN_CHARACTERISTIC_UUID = "E95D0201-251D-470A-A062-FA1922DFA9A7";
private static final String BUTTON_DATA_CHARACTERISTIC_UUID = "E95D0202-251D-470A-A062-FA1922DFA9A7";
private static final byte[] BITS = new byte[] {
-128, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01
};
private final BluetoothLE.BLEResponseHandler<Integer> buttonDataHandler =
new BluetoothLE.BLEResponseHandler<Integer>() {
private boolean lastKnownState = false;
@Override
public void onReceive(String serviceUuid, String characteristicUuid, List<Integer> values) {
ButtonStateReceived(values.get(0));
int pin = Pin();
int i = pin / 8, j = pin % 8;
if ((values.get(i).intValue() & BITS[j]) == BITS[j]) {
if (!lastKnownState) {
lastKnownState = true;
Pressed();
}
} else if (lastKnownState) {
lastKnownState = false;
Released();
}
}
};
public Arduino101Button(Form form) {
super(form, DIGITAL);
}
/**
* Read the current state of the button as reported by the Arduino. On success, the
* <a href="#ButtonStateReceived"><code>ButtonStateReceived</code></a> event will be run. If the
* state of the button has changed, the <a href="#Pressed"><code>Pressed</code></a> or
* <a href="#Released"><code>Released</code></a> events will be run as well.
*/
@SimpleFunction
public void ReadButtonState() {
bleConnection.ExReadByteValues(BUTTON_SERVICE_UUID, BUTTON_DATA_CHARACTERISTIC_UUID, false,
buttonDataHandler);
}
/**
* Request notifications from the Arduino for changes in the button state. The <a
* href="#ButtonStateReceived"><code>ButtonStateReceived</code></a> event will be run after
* every sample is received, even if no change occurs. If a change in the state occurs, either
* the <a href="#Pressed"><code>Pressed</code></a> or the <a
* href="#Released"><code>Released</code></a> event will be run.
*/
@SimpleFunction
public void RequestButtonStateUpdates() {
bleConnection.ExRegisterForByteValues(BUTTON_SERVICE_UUID, BUTTON_DATA_CHARACTERISTIC_UUID,
false, buttonDataHandler);
}
/**
* Stop listening for notifications of button states from the Arduino. This only has an effect
* if there was a previous call to <a
* href="#RequestButtonStateUpdates"><code>RequestButtonStateUpdates</code></a>. There may be
* additional pending messages that will be processed after this call, so if accuracy in the
* data delivery are important an additional variable should be used to track the state of
* event processing.
*/
@SimpleFunction
public void StopButtonStateUpdates() {
bleConnection.ExUnregisterForValues(BUTTON_SERVICE_UUID, BUTTON_DATA_CHARACTERISTIC_UUID,
buttonDataHandler);
}
/**
* The <code>Pressed</code> event is run when a button state is observed to go from a low signal
* to a high signal, indicating that the button switch has been pressed and the circuit is closed.
*/
@SimpleEvent
public void Pressed() {
EventDispatcher.dispatchEvent(this, "Pressed");
}
/**
* The <code>Released</code> event is run when a button state is observed to go from a high signal
* to a low signal, indicating that the button switch has been released and the circuit is open.
*/
@SimpleEvent
public void Released() {
EventDispatcher.dispatchEvent(this, "Released");
}
/**
* The <code>ButtonStateReceived</code> event is run when any button state is received by the
* Bluetooth low energy component from the Arduino. This state value may be the same for
* extended periods of time if the button switch is left in an open or closed state.
*
* __Parameter__:
*
* * <code>Button_State</code> (<a href="http://appinventor.mit.edu/explore/ai2/support/blocks/math.html#number">_number_</a>) — The button state: 0 if released, 1 if pressed.
*
* @param Button_State The button state: 0 if released, 1 if pressed.
*/
@SimpleEvent
public void ButtonStateReceived(int Button_State) {
EventDispatcher.dispatchEvent(this, "ButtonStateReceived", Button_State);
}
// Arduino101ExtensionWithPin implementation
public String getPinServiceUuid() {
return BUTTON_SERVICE_UUID;
}
public String getPinCharacteristicUuid() {
return BUTTON_PIN_CHARACTERISTIC_UUID;
}
}
| java |
Aftab Hussain, professor of the Indian Institute of Information Technology, Hyderabad (IIIT-H), has published a manual that is being labelled as the world’s first mainstream handbook on flexible electronics.
Hussain’s book titled ‘Introduction to Flexible Electronics’ seeks to enable and encourage students to further study the topic of flexible electronics. He has been teaching a full-semester course on flexible electronics at IIIT-H since 2018.
Flexible electronics constitute circuits that are mounted on flexible substrates. They can be vital for designing electronic circuitry that can conform to a required shape, which gives engineers more flexibility to build a wide form factor of consumer gadgets. Such circuits are in use for quite some time, in making printed circuit boards (PCBs) for devices such as cameras.
In more recent parlance, flexible electronics have taken on more importance due to the advent of flexible or foldable smartphones.
With more manufacturers looking at flexible smartphones and even those where the display stretches to switch from a phone form factor to a tablet, the field of flexible electronics should see more demand from both existing engineers, as well as students in this field.
On this note, Hussain claims that while the field of engineering is an undoubtedly interesting one, the amount of available material is still limited.
He further claimed that his work on collating the flexible electronics reckoner is among the world’s first full body of work on this subject.
The same can help further institutes adopt flexible electronics as a dedicated subject of study, leading to more innovative work on the same from students.
The nascent field of flexible electronics can be crucial in enabling future categories of consumer gadgets, which can feature bendable, stretchable or flexible displays – as well as transparent ones.
| english |
<filename>package.json
{
"name": "random-access-http-server",
"version": "1.2.0",
"description": "Server and middleware to serve read only random access storages over HTTP.",
"main": "index.js",
"scripts": {
"test": "nyc tape test.js",
"start": "node server.js"
},
"keywords": [
"random",
"access",
"storage",
"http",
"server"
],
"author": "<NAME> <<EMAIL>>",
"license": "MIT",
"dependencies": {
"debug": "^4.1.1",
"mime": "^2.4.4",
"random-access-memory": "^3.1.1",
"random-access-storage-from": "^0.1.0",
"range-parser": "^1.2.1"
},
"devDependencies": {
"nyc": "^14.1.1",
"random-access-file": "^2.1.3",
"random-access-http": "^2.0.2",
"tape": "^4.13.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/little-core-labs/random-access-http-server.git"
},
"bugs": {
"url": "https://github.com/little-core-labs/random-access-http-server/issues"
},
"homepage": "https://github.com/little-core-labs/random-access-http-server#readme"
}
| json |
<filename>control_flow/src/main.rs<gh_stars>0
fn main() {
let number = 8;
if number < 5 {
println!("Expression was true");
} else {
println!("Expression was false");
}
let condition = false;
let num = if condition { 5 } else { 6 };
println!("num = {}", num);
}
| rust |
# include <cstdlib> //std::rand()
# include <vector> //std::vector<>
# include <list> //std::list<>
# include <iostream> //std::cout
# include <iterator> //std::ostream_iterator<>
# include <algorithm> //std::reverse, std::generate
# include <set>
# include <map>
int main(){
std::list<unsigned int> mylist(100); // creating a new list called l1 with the same size as the v0
for (auto& i : mylist){ // an iteration that starts refering to the beginning of the v0 Vector
i = std::rand() % 101; // placing random numbers into the 10 places that we have created v0-v9
}
std::vector<unsigned int> myVector(mylist.size());
std::copy(std::begin(mylist),
std::end(mylist),
std::begin(myVector));
//using set to get the different numbers from 1 to 100
std::cout <<" " <<std::endl;
std::cout <<" -------------------------------------Aufgabe 3.3 Set-----------------------------------------" <<std::endl;
std::set<unsigned int> setlist(std::begin(mylist), std::end(mylist));
for (auto& i : setlist){
setlist.insert(i);
std::cout<< i <<" ";
}
std::cout <<" " <<std::endl;
std::cout <<"There are : " << setlist.size() << " different numbers in the List" <<std::endl;
std::cout <<" " <<std::endl;
//using set to get the missing number by checking with a counter
std::cout <<" ----------------------3.3 Zahlen von 0 bis 100 die nicht in der Liste sind--------------------" <<std::endl;
for(unsigned int missingNumber = 0; missingNumber <= setlist.size(); missingNumber++){
if(setlist.find(missingNumber) == setlist.end()){
std::cout<< missingNumber <<" ";
}
}
std::cout <<" " <<std::endl;
std::cout <<" " <<std::endl;
//using map to count the number of repeated Number from 1 to 100 in our List using an iterator counter
std::cout <<" ----------------------3.4 Häufigkeit jeder Zahl nicht in der Liste--------------------" <<std::endl;
std::map<unsigned int, unsigned int>listMap;
for (auto& i : mylist){
listMap[i]++;
}
for (auto& i : listMap){
std::cout<< i.first<<" => : "<< i.second <<std::endl;
}
return 0;
} | cpp |
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
/* height: 100vh; */
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 16px;
font-family: Arial;
background: #f1f1f1;
}
.overley {
background: rgba(0, 0, 0, 0.8);
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
visibility: hidden;
transition: 1.2s ease-in;
}
.overley.active {
opacity: 1;
visibility: visible;
}
.modal {
width: 500px;
background: #f1f1f1;
padding: 2em;
border-radius: 0.5em;
text-align: center;
/* animation: name time estado */
animation: animationIn 1s forwards;
}
.btn {
text-align: center;
background: lightgray;
padding: 0.6em 0.8em 0.8em;
border: none;
color: white;
margin: 5px;
border-radius: 5px;
cursor: pointer;
box-shadow: inset 0 -0.2em rgba(0, 0, 0, 0.2);
outline: 0;
transition: 0.2s;
/* will-change: transform; */
}
.btn.primary {
background: #7dc800;
}
.btn.btn-warning {
background: #ff463b;
}
.btn:active {
transform: scale(0.8);
}
@keyframes animationIn {
0% {
transform: translateY(-3000px);
}
60% {
transform: translateY(25px);
}
75% {
transform: translateY(-10px);
}
90% {
transform: translateY(5px);
}
100% {
transform: translateY(0px);
}
}
@keyframes animationOut {
0% {
transform: translateY(5px);
}
60% {
transform: translateY(-10px);
}
75% {
transform: translateY(-25px);
}
100% {
transform: translateY(-3000px);
}
}
| css |
The political leaders have said the alliance candidates must ensure victory for the implementation of the election manifesto of Nepali Congress.
They said it while speaking at a programme organized by the Chitwan-Kathmandu contact committee on Monday. Central member of the Nepali Congress, Dr Minendra Rijal, viewed NC does not sell cheap dreams. "NC is the party that moves together with people," he asserted.
Socialism is NC's programme, another central member Dr Govinda Pokhrel said, making it clear that NC had envisioned the socialism of the European model. Also the member of the election manifesto preparation committee of the party, Dr Pokhrel viewed NC was ready to prepare the foreign policy keeping in center the country's interest.
Moreover, former Vice-Chairperson of the National Planning Commission, Dr Swarnim Wagle, argued that NC's resolution paper was the best one it ever had. "The resolution paper has incorporated the issues ranging from BP's thoughts to youths' concern," he informed.
NC central member and election candidate Umesh Shrestha said the constitution would be protected with the ruling alliance.
READ ALSO: | english |
Elections in Kerala have always been like the Mad Hatter’s tea party. Political aspirants deliver their indecipherable speeches, their loyal supporters like the March Hare explain their meaning to the people and in the manner of the Dormouse, people go home to sleep over things. So election after election, the Left parties would more or less retain their base as would the Congress and its allies. The vote would swing ever so marginally and one or the other would gain the upper hand.
The communal vs secular issue has never been far from the surface, though today the CPM has forced the issue into the open. No, not by putting communal forces in their place but by joining hands with rabid parties like the People’s Democratic Party (PDP) led by the incendiary Abdul Nasser Madani, believed to be prime mover of the Coimbatore bomb blasts. How does the CPM, notably the faction led by state chief Pinarayi Vijayan, explain how he has cosied up to the likes of Madani when the chief minister V. S. Achuthanandan has openly come out against this?
E. Ahamed, minister of state for external affairs, the IUML candidate for the Malappuram seat and the party’s state president, echoes these views. “The PDP will not even get a bronze medal, leave alone gold or silver, so why even talk about these parties? The Marxists are grasping at straw ropes, we will never entertain communal parties and their retrogressive agendas,” he says.
The fact that two so-called jihadis from this area were shot dead trying to sneak across the Line of Control has embarrassed and shocked people. There is great resentment at any talk of a pan-Islamic identity. The majority of Kerala’s Muslims are clear that they have no interest in Pakistan, jihad or any form of terror. They pride themselves on the fact that the parties that represent them stand for secularism and harmony.
The CPM’s suicidal alignments with parties like the PDP will bring it neither glory nor votes. In fact, the rank and file are startled at this open espousal of an anti-national party and communal elements. Is this what we have fought for all these years, seems to be the puzzling question on party workers’ lips. This seems to be a problem with the party line being dictated from the distant confines of AKG Bhavan in New Delhi.
Local Muslims leader like Ahamed who fight elections know that any hint of communalism on their agenda will be counterproductive. And the heartening development is that neither they nor their followers are the silent majority. They have spoken up vocally about their opposition to Muslim fundamentalism to approving audiences.
To lend weight to their voice, support comes in the form of Pannakad Mohammed Ali Shihab Thangal, a revered hereditary spiritual Muslim leader. When I went to meet him, he was taking a rest cure at a riverside resort to deal with his galloping diabetes. He looked more like a genial Santa Claus with his twinkling eyes than the spiritual leader whose name is uttered in hushed tones. “Parties like the PDP have no popular support, Madani is a communal creature and has done nothing for the state,” he says. The Thangal’s feelings find echo among the majority of Muslims here. He says that such formations come up like mushrooms after a monsoon but cannot survive all-weather conditions.
Religion has always been a tricky issue in any election. But here the Muslims and their leaders have shown exceptional courage in taking on those bent on polarising Kerala society. The silent majority syndrome has vanished. And everyone but the CPM has seen the writing on the wall. By this electorally and socially regressive policy, the CPM appears hell-bent on writing its own epitaph in Kerala. This makes no sense since it is not exactly thriving elsewhere except West Bengal.
Perhaps Karat and Vijayan could explain to the uncomprehending electorate how their fervent promotion of secularism and their oft-repeated disdain for communal politics squares with what they are doing in Kerala. For Madani, this is a win-win situation. He gets to come on television, one main channel is run by the comrades, and notch up publicity for his party. He is able to try and buy legitimacy for his anti-national views by sharing a platform with the chief of the state’s ruling party. And he is in the driver’s seat with the CPM following him like a breathless suitor.
The message to the CPM in Kerala is loud and clear. There is no need for self-appointed messiahs to take up the ‘Muslim’ cause. The aspirations and needs of the Muslims are no different from those of other communities. What they seek is someone with a vision, a rare thing these days, and someone who will deliver on promises like better educational facilities, rehabilitation of Gulf workers and more job opportunities. As things stand, the CPM and its oddball allies don’t seem to fit the bill. For the volatile Malayali, Manmohan Singh may seem a distant figure. But they are willing to opt for him and the parties which endorse what he stands for than Kerala’s homegrown leaders who are trying spread divisiveness for a few votes. | english |
package main
import (
"flag"
"fmt"
"github.com/liamg/tml"
"github.com/sparetimecoders/build-tools/pkg/ci"
"github.com/sparetimecoders/build-tools/pkg/config"
"github.com/sparetimecoders/build-tools/pkg/deploy"
"github.com/sparetimecoders/build-tools/pkg/kubectl"
ver "github.com/sparetimecoders/build-tools/pkg/version"
"io"
"os"
"time"
)
var (
version = "dev"
commit = "none"
date = "unknown"
exitFunc = os.Exit
out io.Writer = os.Stdout
)
func main() {
if ver.PrintVersionOnly(version, commit, date, out) {
exitFunc(0)
} else {
exitFunc(doDeploy())
}
}
func doDeploy() int {
var context, namespace string
const (
contextUsage = "override the context for default environment deployment target"
namespaceUsage = "override the namespace for default environment deployment target"
)
set := flag.NewFlagSet("deploy", flag.ExitOnError)
set.Usage = func() {
fmt.Printf("Usage: deploy [options] <environment>\n\nFor example `deploy --context test-cluster --namespace test prod` would deploy to namsepace `test` in the `test-cluster` but assuming to use the `prod` configuration files (if present)\n\nOptions:\n")
set.PrintDefaults()
}
set.StringVar(&context, "context", "", contextUsage)
set.StringVar(&context, "c", "", contextUsage+" (shorthand)")
set.StringVar(&namespace, "namespace", "", namespaceUsage)
set.StringVar(&namespace, "n", "", namespaceUsage+" (shorthand)")
_ = set.Parse(os.Args[1:])
if set.NArg() < 1 {
set.Usage()
} else {
environment := set.Args()[0]
dir, _ := os.Getwd()
if cfg, err := config.Load(dir, os.Stdout); err != nil {
fmt.Println(err.Error())
return -1
} else {
if env, err := cfg.CurrentEnvironment(environment); err != nil {
fmt.Println(err.Error())
} else {
if context != "" {
env.Context = context
}
if namespace != "" {
env.Namespace = namespace
}
currentCI := cfg.CurrentCI()
if !ci.IsValid(currentCI) {
_, _ = fmt.Println(tml.Sprintf("Commit and/or branch information is <red>missing</red>. Perhaps your not in a Git repository or forgot to set environment variables?"))
return -2
}
tstamp := time.Now().Format(time.RFC3339)
client := kubectl.New(env, os.Stdout, os.Stderr)
defer client.Cleanup()
if err := deploy.Deploy(dir, currentCI.Commit(), currentCI.BuildName(), tstamp, environment, client, os.Stdout, os.Stderr); err != nil {
fmt.Println(err.Error())
return -3
}
}
}
}
return 0
}
| go |
<gh_stars>10-100
# Copyright (C) 2014 <NAME> <iv at altlinux dot org>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import glob
import os
def find_files(paths, extensions, ignored_paths):
extensions = set(extensions)
ignored_absolute_paths = set()
for path in ignored_paths:
for expanded_path in glob.iglob(path):
expanded_path = os.path.abspath(expanded_path)
ignored_absolute_paths.add(expanded_path)
def extension_matches(path):
_base, ext = os.path.splitext(path)
return ext in extensions
def path_ignorable(path):
path = os.path.abspath(path)
if path in ignored_absolute_paths:
return True
last_path = None
while path != last_path:
# If we hit the root, this loop will stop since the resolution
# of "/../" is still "/" when ran through the abspath function...
last_path = path
path = os.path.abspath(os.path.join(path, os.path.pardir))
if path in ignored_absolute_paths:
return True
return False
for path in paths:
if os.path.isfile(path):
if extension_matches(path):
yield (path, path_ignorable(path))
elif os.path.isdir(path):
for root, dirnames, filenames in os.walk(path):
for filename in filenames:
path = os.path.join(root, filename)
if extension_matches(path):
yield (path, path_ignorable(path))
else:
raise IOError("Invalid path: %s" % path)
def filtered_traverse(document, filter_func):
for n in document.traverse(include_self=True):
if filter_func(n):
yield n
def contains_url(line):
return "http://" in line or "https://" in line
def has_any_node_type(node, node_types):
n = node
while n is not None:
if isinstance(n, node_types):
return True
n = n.parent
return False
| python |
{"title": "Intelligent SDN based traffic (de)Aggregation and Measurement Paradigm (iSTAMP).", "fields": ["traffic generation model", "openflow", "content addressable memory", "flow network", "network management"], "abstract": "Fine-grained traffic flow measurement, which provides useful information for network management tasks and security analysis, can be challenging to obtain due to monitoring resource constraints. The alternate approach of inferring flow statistics from partial measurement data has to be robust against dynamic temporal/spatial fluctuations of network traffic. In this paper, we propose an intelligent Traffic (de)Aggregation and Measurement Paradigm (iSTAMP), which partitions TCAM entries of switches/routers into two parts to: 1) optimally aggregate part of incoming flows for aggregate measurements, and 2) de-aggregate and directly measure the most informative flows for per-flow measurements. iSTAMP then processes these aggregate and per-flow measurements to effectively estimate network flows using a variety of optimization techniques. With the advent of Software-Defined-Networking (SDN), such real-time rule (re)configuration can be achieved via OpenFlow or other similar SDN APIs. We first show how to design the optimal aggregation matrix for minimizing the flow-size estimation error. Moreover, we propose a method for designing an efficient-compressive flow aggregation matrix under hard resource constraints of limited TCAM sizes. In addition, we propose an intelligent Multi-Armed Bandit based algorithm to adaptively sample the most 'rewarding' flows, whose accurate measurements have the highest impact on the overall flow measurement and estimation performance. We evaluate the performance of iSTAMP using real traffic traces from a variety of network environments and by considering two applications: traffic matrix estimation and heavy hitter detection. Also, we have implemented a prototype of iSTAMP and demonstrated its feasibility and effectiveness in Mininet environment. \u00a9 2014 IEEE.", "citation": "Citations (64)", "departments": ["University of California, Davis", "University of California, Davis", "University of California, Davis", "Hewlett-Packard"], "authors": ["<NAME>.....http://dblp.org/pers/hd/m/Malboubi:Mehdi", "<NAME>.....http://dblp.org/pers/hd/w/Wang:Liyuan", "Chen-Nee Chuah.....http://dblp.org/pers/hd/c/Chuah:Chen=Nee", "Puneet Sharma.....http://dblp.org/pers/hd/s/Sharma:Puneet"], "conf": "infocom", "year": "2014", "pages": 9} | json |
<reponame>Yulyalu/yes-cart<filename>web/support/src/main/java/org/yes/cart/web/support/service/impl/ProductServiceFacadeImpl.java
/*
* Copyright 2009 Inspire-Software.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.yes.cart.web.support.service.impl;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.cache.annotation.Cacheable;
import org.yes.cart.constants.Constants;
import org.yes.cart.domain.dto.ProductSearchResultDTO;
import org.yes.cart.domain.dto.ProductSearchResultPageDTO;
import org.yes.cart.domain.dto.ProductSkuSearchResultDTO;
import org.yes.cart.domain.dto.ProductSkuSearchResultPageDTO;
import org.yes.cart.domain.entity.*;
import org.yes.cart.domain.entity.impl.PriceModelImpl;
import org.yes.cart.domain.entity.impl.PromotionModelImpl;
import org.yes.cart.domain.i18n.impl.FailoverStringI18NModel;
import org.yes.cart.domain.i18n.impl.StringI18NModel;
import org.yes.cart.domain.misc.Pair;
import org.yes.cart.search.SearchQueryFactory;
import org.yes.cart.search.dto.NavigationContext;
import org.yes.cart.search.query.ProductSearchQueryBuilder;
import org.yes.cart.service.domain.*;
import org.yes.cart.shoppingcart.*;
import org.yes.cart.utils.MoneyUtils;
import org.yes.cart.web.support.service.CategoryServiceFacade;
import org.yes.cart.web.support.service.ProductServiceFacade;
import java.math.BigDecimal;
import java.util.*;
/**
* User: denispavlov
* Date: 20/11/2014
* Time: 19:59
*/
public class ProductServiceFacadeImpl implements ProductServiceFacade {
private final ProductService productService;
private final ProductSkuService productSkuService;
private final ProductAssociationService productAssociationService;
private final SearchQueryFactory searchQueryFactory;
private final ProductAvailabilityStrategy productAvailabilityStrategy;
private final ProductQuantityStrategy productQuantityStrategy;
private final PricingPolicyProvider pricingPolicyProvider;
private final PriceResolver priceResolver;
private final ShoppingCartCalculator shoppingCartCalculator;
private final PromotionService promotionService;
private final CategoryServiceFacade categoryServiceFacade;
private final ShopService shopService;
private final BrandService brandService;
public ProductServiceFacadeImpl(final ProductService productService,
final ProductSkuService productSkuService,
final ProductAssociationService productAssociationService,
final SearchQueryFactory searchQueryFactory,
final ProductAvailabilityStrategy productAvailabilityStrategy,
final ProductQuantityStrategy productQuantityStrategy,
final PricingPolicyProvider pricingPolicyProvider,
final PriceResolver priceResolver,
final ShoppingCartCalculator shoppingCartCalculator,
final PromotionService promotionService,
final CategoryServiceFacade categoryServiceFacade,
final ShopService shopService,
final BrandService brandService) {
this.productService = productService;
this.productSkuService = productSkuService;
this.productAssociationService = productAssociationService;
this.searchQueryFactory = searchQueryFactory;
this.productAvailabilityStrategy = productAvailabilityStrategy;
this.productQuantityStrategy = productQuantityStrategy;
this.pricingPolicyProvider = pricingPolicyProvider;
this.priceResolver = priceResolver;
this.shoppingCartCalculator = shoppingCartCalculator;
this.categoryServiceFacade = categoryServiceFacade;
this.promotionService = promotionService;
this.shopService = shopService;
this.brandService = brandService;
}
/**
* {@inheritDoc}
*/
@Override
public ProductSku getSkuById(final Long skuId) {
return productService.getSkuById(skuId, true);
}
/**
* {@inheritDoc}
*/
@Override
public Product getProductById(final Long productId) {
return productService.getProductById(productId, true);
}
/**
* {@inheritDoc}
*/
@Override
public ProductSku getProductSkuBySkuCode(final String skuCode) {
return productSkuService.getProductSkuBySkuCode(skuCode);
}
/**
* {@inheritDoc}
*/
@Override
public ProductAttributesModel getProductAttributes(final long productId,
final long skuId,
final long productTypeId) {
return productService.getProductAttributes(productId, skuId, productTypeId);
}
/**
* {@inheritDoc}
*/
@Override
public ProductCompareModel getCompareAttributes(final List<Long> productId,
final List<Long> skuId) {
return productService.getCompareAttributes(productId, skuId);
}
/**
* {@inheritDoc}
*/
@Override
@Cacheable(value = "productService-productAssociations")
public List<ProductSearchResultDTO> getProductAssociations(final long productId,
final long shopId,
final long customerShopId,
final String associationType) {
final List<String> productIds = productAssociationService.getProductAssociationsProductCodes(
productId,
associationType
);
if (productIds != null && !productIds.isEmpty()) {
final List<String> search = new ArrayList<>(productIds.size() > 50 ? productIds.subList(0, 50) : productIds);
final NavigationContext assoc = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, null,
false, Collections.singletonMap(ProductSearchQueryBuilder.PRODUCT_CODE_FIELD,
search));
return Collections.unmodifiableList(getListProducts(
assoc, 0, search.size(), null, false).getResults());
}
return Collections.emptyList();
}
/**
* {@inheritDoc}
*/
@Override
@Cacheable(value = "productService-featuredProducts")
public List<ProductSearchResultDTO> getFeaturedProducts(final long categoryId,
final long shopId,
final long customerShopId) {
final List<Long> categories;
if (categoryId == 0) {
categories = null;
} else {
categories = Collections.singletonList(categoryId);
}
final int limit = categoryServiceFacade.getFeaturedListSizeConfig(categoryId, customerShopId);
final NavigationContext featured = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, categories,
false, Collections.singletonMap(ProductSearchQueryBuilder.PRODUCT_FEATURED_FIELD,
Collections.singletonList("true")));
return Collections.unmodifiableList(getListProducts(
featured, 0, limit, null, false).getResults());
}
/**
* {@inheritDoc}
*/
@Override
@Cacheable(value = "productService-newProducts")
public List<ProductSearchResultDTO> getNewProducts(final long categoryId,
final long shopId,
final long customerShopId) {
final List<Long> newArrivalCats;
if (categoryId > 0L) {
newArrivalCats = Collections.singletonList(categoryId);
} else {
newArrivalCats = null;
}
final int limit = categoryServiceFacade.getNewArrivalListSizeConfig(categoryId, customerShopId);
final NavigationContext newarrival = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, newArrivalCats,
false, Collections.singletonMap(ProductSearchQueryBuilder.PRODUCT_TAG_FIELD,
Collections.singletonList(ProductSearchQueryBuilder.TAG_NEWARRIVAL)));
return Collections.unmodifiableList(getListProducts(
newarrival, 0, limit, null, true).getResults());
}
/**
* {@inheritDoc}
*/
@Override
@Cacheable(value = "productService-taggedProducts")
public List<ProductSearchResultDTO> getTaggedProducts(final long categoryId,
final long shopId,
final long customerShopId,
final String tag) {
final List<Long> categories;
if (categoryId == 0) {
categories = null;
} else {
categories = Collections.singletonList(categoryId);
}
final int limit = categoryServiceFacade.getFeaturedListSizeConfig(categoryId, customerShopId);
final NavigationContext tagged = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, categories,
false, Collections.singletonMap(ProductSearchQueryBuilder.PRODUCT_TAG_FIELD,
Collections.singletonList(tag)));
return Collections.unmodifiableList(getListProducts(
tagged, 0, limit, null, false).getResults());
}
@Override
public List<ProductSearchResultDTO> getListProductSKUs(final List<String> SKUs,
final long categoryId,
final long shopId,
final long customerShopId) {
if (CollectionUtils.isNotEmpty(SKUs)) {
final List<String> SKUsForCategory = new ArrayList<>(SKUs);
final NavigationContext recent = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, null,
false, Collections.singletonMap(ProductSearchQueryBuilder.SKU_PRODUCT_CODE_FIELD,
SKUsForCategory));
return Collections.unmodifiableList(getListProducts(
recent, 0, -1, null, false).getResults());
}
return Collections.emptyList();
}
/**
* {@inheritDoc}
*/
@Override
public List<ProductSearchResultDTO> getListProducts(final List<String> productIds,
final long categoryId,
final long shopId,
final long customerShopId) {
if (CollectionUtils.isNotEmpty(productIds)) {
final List<String> productIdsForCategory = new ArrayList<>(productIds);
final NavigationContext recent = searchQueryFactory.getFilteredNavigationQueryChain(shopId, customerShopId, null, null,
false, Collections.singletonMap(ProductSearchQueryBuilder.PRODUCT_ID_FIELD,
productIdsForCategory));
return Collections.unmodifiableList(getListProducts(
recent, 0, -1, null, false).getResults());
}
return Collections.emptyList();
}
/**
* {@inheritDoc}
*/
@Override
public ProductSearchResultPageDTO getListProducts(final NavigationContext context,
final int firstResult,
final int maxResults,
final String sortFieldName,
final boolean descendingSort) {
final ProductSearchResultPageDTO result = productService.getProductSearchResultDTOByQuery(
context, firstResult, maxResults, sortFieldName, descendingSort
).copy(); // MUST BE COPY for each search as we are setting relevant SKU list
if (!result.getResults().isEmpty()) {
final NavigationContext skuContext = searchQueryFactory.getSkuSnowBallQuery(context, result.getResults());
final ProductSkuSearchResultPageDTO skus = productSkuService.getProductSkuSearchResultDTOByQuery(
skuContext
).copy(); // MUST BE COPY
// Need list of skus to maintain priority order
final Map<Long, List<ProductSkuSearchResultDTO>> skuMap = new HashMap<>();
for (ProductSkuSearchResultDTO sku : skus.getResults()) {
List<ProductSkuSearchResultDTO> skuForProduct = skuMap.computeIfAbsent(sku.getProductId(), k -> new ArrayList<>());
skuForProduct.add(sku);
}
for (final ProductSearchResultDTO product : result.getResults()) {
final List<ProductSkuSearchResultDTO> relevantSKUs = skuMap.get(product.getId());
final List<ProductSkuSearchResultDTO> sortedSKUs = new ArrayList<>();
if (relevantSKUs != null) {
for (final ProductSkuSearchResultDTO relevantSKU : relevantSKUs) {
if (relevantSKU.getFulfilmentCentreCode().equals(product.getFulfilmentCentreCode())) {
final ProductSkuSearchResultDTO baseSKU = product.getBaseSku(relevantSKU.getId());
if (baseSKU != null) {
sortedSKUs.add(baseSKU);
}
}
}
} // else this is most likely SKU reindexing not been done
product.setSearchSkus(sortedSKUs);
}
}
return result;
}
/**
* {@inheritDoc}
*/
@Override
public ProductAvailabilityModel getProductAvailability(final ProductSearchResultDTO product,
final long customerShopId) {
return productAvailabilityStrategy.getAvailabilityModel(customerShopId, product);
}
/**
* {@inheritDoc}
*/
@Override
public ProductAvailabilityModel getProductAvailability(final ProductSkuSearchResultDTO sku,
final long customerShopId) {
return productAvailabilityStrategy.getAvailabilityModel(customerShopId, sku);
}
/**
* {@inheritDoc}
*/
@Override
public ProductAvailabilityModel getProductAvailability(final Product product,
final long customerShopId,
final String supplier) {
return productAvailabilityStrategy.getAvailabilityModel(customerShopId, product, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public ProductAvailabilityModel getProductAvailability(final ProductSku product,
final long customerShopId,
final String supplier) {
return productAvailabilityStrategy.getAvailabilityModel(customerShopId, product, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public ProductAvailabilityModel getProductAvailability(final String skuCode,
final long customerShopId,
final String supplier) {
return productAvailabilityStrategy.getAvailabilityModel(customerShopId, skuCode, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final Product product,
final long customerShopId,
final String supplier) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, product, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final ProductSku product,
final long customerShopId,
final String supplier) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, product, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final ProductSearchResultDTO product,
final long customerShopId) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, product);
}
/**
* {@inheritDoc}
*/
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final ProductSkuSearchResultDTO sku,
final long customerShopId) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, sku);
}
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final String sku,
final String supplier,
final long customerShopId) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, sku, supplier);
}
/**
* {@inheritDoc}
*/
@Override
public QuantityModel getProductQuantity(final BigDecimal cartQty,
final String sku,
final String supplier,
final BigDecimal min,
final BigDecimal max,
final BigDecimal step,
final long customerShopId) {
return productQuantityStrategy.getQuantityModel(customerShopId, cartQty, sku, min, max, step, supplier);
}
private boolean isPriceValid(final SkuPrice price) {
return price != null && price.getRegularPrice() != null && !price.isPriceUponRequest();
}
/**
* We resolve prices from current customer shop first. In simple setup this would be the same as the master.
* In case current and master differs we are in B2B mode, so we check if we are not in strict profile and
* attempt to resolve price from master.
*
* @param cart cart
* @param productId productId (in case no specific sku is selected)
* @param sku sku to resolve price for
* @param qty quantity
* @param supplier supplier
*
* @return resolved SKU price
*/
protected SkuPrice resolveMinimalPrice(final ShoppingCart cart,
final Long productId,
final String sku,
final BigDecimal qty,
final String supplier) {
final long customerShopId = cart.getShoppingContext().getCustomerShopId();
final long masterShopId = cart.getShoppingContext().getShopId();
// Fallback only if we have a B2B non-strict mode
final Long fallbackShopId = masterShopId == customerShopId || shopService.getById(customerShopId).isB2BStrictPriceActive() ? null : masterShopId;
final String shopCode = cart.getShoppingContext().getShopCode();
final String currency = cart.getCurrencyCode();
// Policy is setup on master
final PricingPolicyProvider.PricingPolicy policy = pricingPolicyProvider.determinePricingPolicy(
shopCode, currency, cart.getCustomerLogin(),
cart.getShoppingContext().getCountryCode(),
cart.getShoppingContext().getStateCode()
);
return priceResolver.getMinimalPrice(
productId,
sku,
customerShopId,
fallbackShopId,
currency,
qty,
false,
policy.getID(),
supplier
);
}
/**
* We resolve prices from current customer shop first. In simple setup this would be the same as the master.
* In case current and master differs we are in B2B mode, so we check if we are not in strict profile and
* attempt to resolve price from master.
*
* @param cart cart
* @param productId productId (in case no specific sku is selected)
* @param sku sku to resolve price for
* @param supplier supplier
*
* @return resolved SKU price
*/
protected Collection<SkuPrice> resolvePrices(final ShoppingCart cart,
final Long productId,
final String sku,
final String supplier) {
final long customerShopId = cart.getShoppingContext().getCustomerShopId();
final long masterShopId = cart.getShoppingContext().getShopId();
// Fallback only if we have a B2B non-strict mode
final Long fallbackShopId = masterShopId == customerShopId || shopService.getById(customerShopId).isB2BStrictPriceActive() ? null : masterShopId;
final String shopCode = cart.getShoppingContext().getShopCode();
final String currency = cart.getCurrencyCode();
// Policy is setup on master
final PricingPolicyProvider.PricingPolicy policy = pricingPolicyProvider.determinePricingPolicy(
shopCode, currency, cart.getCustomerLogin(),
cart.getShoppingContext().getCountryCode(),
cart.getShoppingContext().getStateCode()
);
return priceResolver.getAllCurrentPrices(
productId,
sku,
customerShopId,
fallbackShopId,
currency,
policy.getID(),
supplier
);
}
/**
* Model that does not show any details, NULL object.
*
* @param currency currency
*
* @return null price model
*/
protected PriceModelImpl getNullProductPriceModel(final String currency) {
return new PriceModelImpl(
null,
currency,
null,
false,
false,
null,
null
);
}
/**
* {@inheritDoc}
*/
@Override
public Pair<PriceModel, CustomerWishList.PriceChange> getSkuPrice(final ShoppingCart cart,
final CustomerWishList item) {
if (cart.getShoppingContext().isHidePrices()) {
return new Pair<>(
getNullProductPriceModel(cart.getCurrencyCode()),
new CustomerWishList.PriceChange(CustomerWishList.PriceChangeType.NOCHANGE, null)
);
}
final String sku = item.getSkuCode();
final String supplier = item.getSupplierCode();
final BigDecimal qty = item.getQuantity();
final SkuPrice priceNow = resolveMinimalPrice(cart, null, sku, qty, supplier);
final String addedPriceCurr = item.getRegularPriceCurrencyWhenAdded();
final Pair<BigDecimal, BigDecimal> price;
final CustomerWishList.PriceChange priceInfo;
if (isPriceValid(priceNow)) {
if (cart.getCurrencyCode().equals(addedPriceCurr)) {
final BigDecimal addedPrice = item.getRegularPriceWhenAdded();
final Pair<BigDecimal, BigDecimal> listAndSale = priceNow.getSalePriceForCalculation();
final BigDecimal saleNow = MoneyUtils.secondOrFirst(listAndSale);
if (MoneyUtils.isFirstEqualToSecond(addedPrice, saleNow)) {
// no change
if (MoneyUtils.isFirstBiggerThanSecond(listAndSale.getFirst(), addedPrice)) {
price = new Pair<>(listAndSale.getFirst(), addedPrice);
priceInfo = new CustomerWishList.PriceChange(
CustomerWishList.PriceChangeType.ONSALE,
MoneyUtils.getDiscountDisplayValue(listAndSale.getFirst(), addedPrice)
);
} else {
// not on sale
price = new Pair<>(addedPrice, null);
priceInfo = new CustomerWishList.PriceChange(CustomerWishList.PriceChangeType.NOCHANGE, null);
}
} else if (MoneyUtils.isFirstBiggerThanSecond(addedPrice, saleNow)) {
// price dropped since added
price = new Pair<>(addedPrice, saleNow);
priceInfo = new CustomerWishList.PriceChange(
CustomerWishList.PriceChangeType.DECREASED,
MoneyUtils.getDiscountDisplayValue(addedPrice, saleNow)
);
} else if (MoneyUtils.isPositive(addedPrice)) {
// price gone up
price = listAndSale;
priceInfo = new CustomerWishList.PriceChange(
CustomerWishList.PriceChangeType.INCRSEASED,
MoneyUtils.getDiscountDisplayValue(addedPrice, saleNow).negate()
);
} else {
// invalid config - old price is zero or negative
price = listAndSale;
priceInfo = new CustomerWishList.PriceChange(CustomerWishList.PriceChangeType.NOCHANGE, null);
}
} else {
// no comparative price - different currency
price = priceNow.getSalePriceForCalculation();
priceInfo = new CustomerWishList.PriceChange(CustomerWishList.PriceChangeType.DIFFCURRENCY, null);
}
} else {
// Item is not priced now so it cannot be bought
price = new Pair<>(null, null);
priceInfo = new CustomerWishList.PriceChange(CustomerWishList.PriceChangeType.OFFLINE, null);
}
final PriceModel model = getSkuPrice(
cart,
sku,
BigDecimal.ONE,
priceNow.isPriceUponRequest(),
priceNow.isPriceOnOffer(),
price.getFirst(),
price.getSecond(),
supplier
);
return new Pair<>(model, priceInfo);
}
/**
* {@inheritDoc}
*/
@Override
public PriceModel getSkuPrice(final ShoppingCart cart,
final Long productId,
final String skuCode,
final BigDecimal quantity,
final String supplier) {
final String currency = cart.getCurrencyCode();
if (!cart.getShoppingContext().isHidePrices()) {
final SkuPrice resolved = resolveMinimalPrice(cart, productId, skuCode, quantity, supplier);
if (resolved != null) {
final Pair<BigDecimal, BigDecimal> listAndSale = resolved.getSalePriceForCalculation();
return getSkuPrice(
cart,
resolved.getSkuCode(),
resolved.getQuantity(),
resolved.isPriceUponRequest(),
resolved.isPriceOnOffer(),
listAndSale.getFirst(),
listAndSale.getSecond(),
supplier
);
}
}
return getNullProductPriceModel(currency);
}
/**
* {@inheritDoc}
*/
@Override
public PriceModel getSkuPrice(final ShoppingCart cart,
final String ref,
final BigDecimal quantity,
final BigDecimal listPrice,
final BigDecimal salePrice,
final String supplier) {
return getSkuPrice(
cart,
ref,
quantity,
false,
false,
listPrice,
salePrice,
supplier
);
}
protected PriceModel getSkuPrice(final ShoppingCart cart,
final String ref,
final BigDecimal quantity,
final boolean priceUponRequest,
final boolean priceOnOffer,
final BigDecimal listPrice,
final BigDecimal salePrice,
final String supplier) {
final String currency = cart.getCurrencyCode();
if (cart.getShoppingContext().isHidePrices()) {
return getNullProductPriceModel(currency);
}
final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled();
final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet();
final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount();
final BigDecimal sale = salePrice;
final BigDecimal list = listPrice;
if (showTax) {
// prices with tax
if (sale != null) {
// if sale price exists use it as primary target as this one will be shown
ShoppingCartCalculator.PriceModel saleModel = shoppingCartCalculator.calculatePrice(cart, supplier, ref, sale);
final BigDecimal saleAdjusted, listAdjusted;
if (showTaxNet) {
saleAdjusted = saleModel.getNetPrice();
// recalculate list price so that discounts are correct
listAdjusted = list != null ? MoneyUtils.getNetAmount(list, saleModel.getTaxRate(), !saleModel.isTaxExclusive()) : null;
} else {
saleAdjusted = saleModel.getGrossPrice();
// recalculate list price so that discounts are correct
listAdjusted = list != null ? MoneyUtils.getGrossAmount(list, saleModel.getTaxRate(), !saleModel.isTaxExclusive()) : null;
}
return new PriceModelImpl(
ref,
currency,
quantity,
priceUponRequest,
priceOnOffer,
listAdjusted, saleAdjusted,
showTax, showTaxNet, showTaxAmount,
saleModel.getTaxCode(),
saleModel.getTaxRate(),
saleModel.isTaxExclusive(),
saleModel.getTaxAmount()
);
} else if (list != null) {
// use list price to calculate taxes
ShoppingCartCalculator.PriceModel listModel = shoppingCartCalculator.calculatePrice(cart, supplier, ref, list);
final BigDecimal listAdjusted = showTaxNet ? listModel.getNetPrice() : listModel.getGrossPrice();
return new PriceModelImpl(
ref,
currency,
quantity,
priceUponRequest,
priceOnOffer,
listAdjusted, null,
showTax, showTaxNet, showTaxAmount,
listModel.getTaxCode(),
listModel.getTaxRate(),
listModel.isTaxExclusive(),
listModel.getTaxAmount()
);
}
}
// standard "as is" prices
return new PriceModelImpl(
ref,
currency,
quantity,
priceUponRequest,
priceOnOffer,
list, sale
);
}
/**
* {@inheritDoc}
*/
@Override
public PriceModel getSkuPrice(final ShoppingCart cart,
final CartItem item,
final boolean total) {
if (cart.getShoppingContext().isHidePrices()) {
return getNullProductPriceModel(cart.getCurrencyCode());
}
final boolean enabled = cart.getShoppingContext().isTaxInfoEnabled();
return getSkuPrice(
cart.getCurrencyCode(),
enabled,
enabled && cart.getShoppingContext().isTaxInfoUseNet(),
enabled && cart.getShoppingContext().isTaxInfoShowAmount(),
item, total, false);
}
/**
* {@inheritDoc}
*/
@Override
public PriceModel getSkuPrice(final String currency,
final boolean showTax,
final boolean showTaxNet,
final boolean showTaxAmount,
final CartItem item,
final boolean total,
final boolean hide) {
if (hide) {
return getNullProductPriceModel(currency);
}
if (showTax) {
if (item.getSalePrice() != null && MoneyUtils.isFirstBiggerThanSecond(item.getListPrice(), item.getPrice())) {
if (total) {
// if sale price exists use it as primary target as this one will be shown
final BigDecimal saleAdjusted, listAdjusted;
if (showTaxNet) {
saleAdjusted = item.getNetPrice().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP);
// recalculate list price so that discounts are correct
listAdjusted = item.getListPrice() != null ?
MoneyUtils.getMoney(item.getListPrice(), item.getTaxRate(), !item.isTaxExclusiveOfPrice()).getNet().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP) : null;
} else {
saleAdjusted = item.getGrossPrice().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP);
// recalculate list price so that discounts are correct
listAdjusted = item.getListPrice() != null ?
MoneyUtils.getMoney(item.getListPrice(), item.getTaxRate(), !item.isTaxExclusiveOfPrice()).getGross().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP) : null;
}
return new PriceModelImpl(
item.getProductSkuCode(),
currency,
item.getQty(),
false,
false,
listAdjusted, saleAdjusted,
showTax, showTaxNet, showTaxAmount,
item.getTaxCode(),
item.getTaxRate(),
item.isTaxExclusiveOfPrice(),
item.getGrossPrice().subtract(item.getNetPrice()).multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP)
);
}
final BigDecimal list = item.getListPrice();
// if sale price exists use it as primary target as this one will be shown
final BigDecimal saleAdjusted, listAdjusted;
if (showTaxNet) {
saleAdjusted = item.getNetPrice();
// recalculate list price so that discounts are correct
listAdjusted = list != null ? MoneyUtils.getNetAmount(list, item.getTaxRate(), !item.isTaxExclusiveOfPrice()) : null;
} else {
saleAdjusted = item.getGrossPrice();
// recalculate list price so that discounts are correct
listAdjusted = list != null ? MoneyUtils.getGrossAmount(list, item.getTaxRate(), !item.isTaxExclusiveOfPrice()) : null;
}
return new PriceModelImpl(
item.getProductSkuCode(),
currency,
item.getQty(),
false,
false,
listAdjusted, saleAdjusted,
showTax, showTaxNet, showTaxAmount,
item.getTaxCode(),
item.getTaxRate(),
item.isTaxExclusiveOfPrice(),
item.getGrossPrice().subtract(item.getNetPrice())
);
} else if (item.getListPrice() != null) {
if (total) {
// use list price to calculate taxes
final BigDecimal listAdjusted = showTaxNet ? item.getNetPrice().multiply(item.getQty()) : item.getGrossPrice().multiply(item.getQty());
return new PriceModelImpl(
item.getProductSkuCode(),
currency,
item.getQty(),
false,
false,
listAdjusted.setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP), null,
showTax, showTaxNet, showTaxAmount,
item.getTaxCode(),
item.getTaxRate(),
item.isTaxExclusiveOfPrice(),
item.getGrossPrice().subtract(item.getNetPrice()).multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP)
);
}
// use list price to calculate taxes
final BigDecimal listAdjusted = showTaxNet ? item.getNetPrice() : item.getGrossPrice();
return new PriceModelImpl(
item.getProductSkuCode(),
currency,
item.getQty(),
false,
false,
listAdjusted, null,
showTax, showTaxNet, showTaxAmount,
item.getTaxCode(),
item.getTaxRate(),
item.isTaxExclusiveOfPrice(),
item.getGrossPrice().subtract(item.getNetPrice())
);
}
}
final BigDecimal sale = total ?
(item.getPrice() != null && !MoneyUtils.isFirstEqualToSecond(item.getPrice(), item.getListPrice()) ?
item.getPrice().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP) :
null) :
(item.getPrice() != null && !MoneyUtils.isFirstEqualToSecond(item.getPrice(), item.getListPrice()) ?
item.getPrice() :
null);
final BigDecimal list = total ?
(item.getListPrice() != null ?
item.getListPrice().multiply(item.getQty()).setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP) :
null) :
item.getListPrice();
// standard "as is" prices
return new PriceModelImpl(
item.getProductSkuCode(),
currency,
item.getQty(),
false,
false,
list, sale
);
}
/**
* {@inheritDoc}
*/
@Override
public List<PriceModel> getSkuPrices(final ShoppingCart cart,
final Long productId,
final String skuCode,
final String supplier) {
if (!cart.getShoppingContext().isHidePrices()) {
final Collection<SkuPrice> prices = resolvePrices(cart, productId, skuCode, supplier);
if (CollectionUtils.isNotEmpty(prices)) {
final List<PriceModel> models = new ArrayList<>(prices.size());
for (final SkuPrice price : prices) {
final Pair<BigDecimal, BigDecimal> listAndSale = price.getSalePriceForCalculation();
models.add(getSkuPrice(
cart,
price.getSkuCode(),
price.getQuantity(),
price.isPriceUponRequest(),
price.isPriceOnOffer(),
listAndSale.getFirst(),
listAndSale.getSecond(),
supplier
));
}
return models;
}
}
return Collections.emptyList();
}
static final String CART_ITEMS_TOTAL_REF = "cart-items-total";
/**
* {@inheritDoc}
*/
@Override
public PriceModel getCartItemsTotal(final ShoppingCart cart) {
final String currency = cart.getCurrencyCode();
if (cart.getShoppingContext().isHidePrices()) {
return getNullProductPriceModel(currency);
}
final BigDecimal list = cart.getTotal().getListSubTotal();
final BigDecimal sale = cart.getTotal().getSubTotal();
final boolean showTax = cart.getShoppingContext().isTaxInfoEnabled();
final boolean showTaxNet = showTax && cart.getShoppingContext().isTaxInfoUseNet();
final boolean showTaxAmount = showTax && cart.getShoppingContext().isTaxInfoShowAmount();
if (showTax) {
final BigDecimal totalInclTax = cart.getTotal().getSubTotalAmount();
if (MoneyUtils.isPositive(totalInclTax)) {
final BigDecimal totalTax = cart.getTotal().getSubTotalTax();
final BigDecimal net = totalInclTax.subtract(totalTax);
final BigDecimal gross = totalInclTax;
final BigDecimal totalAdjusted = showTaxNet ? net : gross;
final Set<String> taxes = new TreeSet<>(); // sorts and de-duplicate
final Set<BigDecimal> rates = new TreeSet<>();
for (final CartItem item : cart.getCartItemList()) {
if (StringUtils.isNotBlank(item.getTaxCode())) {
taxes.add(item.getTaxCode());
}
rates.add(item.getTaxRate());
}
final BigDecimal taxRate;
if (MoneyUtils.isPositive(totalTax) && rates.size() > 1) {
// mixed rates in cart we use average with round up so that tax is not reduced by rounding
taxRate = totalTax.multiply(MoneyUtils.HUNDRED)
.divide(net, 1, BigDecimal.ROUND_HALF_UP)
.setScale(Constants.MONEY_SCALE, BigDecimal.ROUND_HALF_UP);
} else {
// single rate for all items, use it to prevent rounding errors
taxRate = rates.iterator().next();
}
final String tax = StringUtils.join(taxes, ',');
final boolean exclusiveTax = totalInclTax.compareTo(sale) > 0;
if (MoneyUtils.isFirstBiggerThanSecond(list, sale)) {
// if we have discounts
final MoneyUtils.Money listMoney = MoneyUtils.getMoney(list, taxRate, !exclusiveTax);
final BigDecimal listAdjusted = showTaxNet ? listMoney.getNet() : listMoney.getGross();
return new PriceModelImpl(
CART_ITEMS_TOTAL_REF,
currency,
BigDecimal.ONE,
false,
false,
listAdjusted, totalAdjusted,
showTax, showTaxNet, showTaxAmount,
tax,
taxRate,
exclusiveTax,
totalTax
);
}
// no discounts
return new PriceModelImpl(
CART_ITEMS_TOTAL_REF,
currency,
BigDecimal.ONE,
false,
false,
totalAdjusted, null,
showTax, showTaxNet, showTaxAmount,
tax,
taxRate,
exclusiveTax,
totalTax
);
}
}
// standard "as is" prices
if (MoneyUtils.isPositive(sale)
&& MoneyUtils.isFirstBiggerThanSecond(list, sale)) {
// if we have discounts
return new PriceModelImpl(
CART_ITEMS_TOTAL_REF,
currency,
BigDecimal.ONE,
false,
false,
list, sale
);
}
// no discounts
return new PriceModelImpl(
CART_ITEMS_TOTAL_REF,
currency,
BigDecimal.ONE,
false,
false,
sale, null
);
}
/**
* {@inheritDoc}
*/
@Override
public Map<String, PromotionModel> getPromotionModel(final String appliedPromo) {
return getPromotionModel(appliedPromo, false);
}
/**
* {@inheritDoc}
*/
@Override
public Map<String, PromotionModel> getPromotionModel(final String appliedPromo, final boolean includeOffline) {
if (StringUtils.isBlank(appliedPromo)) {
return Collections.emptyMap();
}
final String[] promoCodes = StringUtils.split(appliedPromo, ',');
final Map<String, PromotionModel> result = new LinkedHashMap<>(promoCodes.length * 2);
for (final String code : promoCodes) {
final int pos = code.indexOf(':');
if (pos == -1) {
// simple promo
if ("#OFFLINE#".equals(code)) {
if (includeOffline) {
result.put(code, new PromotionModelImpl(
code,
null,
null,
null,
null,
new StringI18NModel("#OFFLINE#"),
new StringI18NModel(),
null,
null
));
}
} else {
final Promotion promotion = promotionService.findPromotionByCode(code, true);
if (promotion != null) {
final Promotion data = promotion;
result.put(code, new PromotionModelImpl(
code,
null,
data.getPromoType(),
data.getPromoAction(),
data.getPromoActionContext(),
new FailoverStringI18NModel(data.getDisplayName(), data.getName()),
new FailoverStringI18NModel(data.getDisplayDescription(), data.getDescription()),
data.getEnabledFrom(),
data.getEnabledTo()
));
}
}
} else {
// coupon triggered
final String realCode = code.substring(0, pos);
final String coupon = code.substring(pos + 1);
final Promotion promotion = promotionService.findPromotionByCode(realCode, true);
if (promotion != null) {
final Promotion data = promotion;
result.put(code, new PromotionModelImpl(
realCode,
coupon,
data.getPromoType(),
data.getPromoAction(),
data.getPromoActionContext(),
new FailoverStringI18NModel(data.getDisplayName(), data.getName()),
new FailoverStringI18NModel(data.getDisplayDescription(), data.getDescription()),
data.getEnabledFrom(),
data.getEnabledTo()
));
}
}
}
return result;
}
/**
* {@inheritDoc}
*/
@Override
public Brand getBrandById(final long brandId) {
return brandService.getById(brandId);
}
}
| java |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- moved --><head>
<title>b2 - a classy weblog tool</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="TRUE" name="MSSmartTagsPreventParsing" />
<link rel="stylesheet" href="/blogb2.css" type="text/css" />
<link rel="alternate" type="text/xml" title="RSS 0.92" href="http://cafelog.com/b2rss.php" />
<link rel="pingback" href="http://cafelog.com/xmlrpc.php" />
</head>
<body>
<div align="center">
<table bgcolor="#ffffff" width="600" border="0" cellspacing="0" cellpadding="0">
<tbody><tr style="height: 294px" align="left">
<td style="height: 294px; background-image: url(/witch1.jpg);" width="300" valign="top">
</td>
<td width="300" valign="top" style="background-image: url(/witch2.jpg); background-repeat:none"> </td>
</tr>
<tr style="height: 390px" align="left">
<td valign="top" style="height: 195px; background-repeat:none" rowspan="2">
<table width="300" cellpadding="0" cellspacing="0">
<tbody><tr>
<td height="50" width="50" valign="bottom"><img src="/b2-img/b2minilogo.png" border="0" alt="b2" /></td>
<td valign="bottom" align="right" width="250"> <span class="chti">[project page / test blog] [<a href="/b2login.php" class="chti">login</a>] [<a href="/b2register.php" class="chti">register</a>]</span>
</td>
</tr>
<tr>
<td colspan="2">
<table width="300" style="/*height: 100%; */width: 300px" class="loginbox" cellpadding="15">
<tbody><tr>
<td class="blog">
<p>[ This is a test blog, with posts about the development of b2, and comments ]</p>
<p>[ Bugs/suggestions ? Check the <a href="http://tidakada.com/board/">Forums</a> ! ]</p>
</td>
</tr>
</tbody></table>
<p class="chti" align="right">[powered by <b>b2</b>.]<br />
<br />
archives<br />
<a href="http://cafelog.com/index.php?m=200403">march 2004</a><br />
<a href="http://cafelog.com/index.php?m=200401">january 2004</a><br />
<a href="http://cafelog.com/index.php?m=200312">december 2003</a><br />
<a href="http://cafelog.com/index.php?m=200311">november 2003</a><br />
<a href="http://cafelog.com/index.php?m=200310">october 2003</a><br />
<a href="http://cafelog.com/index.php?m=200307">july 2003</a><br />
<a href="http://cafelog.com/index.php?m=200306">june 2003</a><br />
<a href="http://cafelog.com/index.php?m=200305">may 2003</a><br />
<a href="http://cafelog.com/index.php?m=200303">march 2003</a><br />
<a href="http://cafelog.com/index.php?m=200211">november 2002</a><br />
<a href="http://cafelog.com/index.php?m=200210">october 2002</a><br />
<a href="http://cafelog.com/index.php?m=200209">september 2002</a><br />
<a href="http://cafelog.com/index.php?m=200208">august 2002</a><br />
<a href="http://cafelog.com/index.php?m=200207">july 2002</a><br />
<a href="http://cafelog.com/index.php?m=200206">june 2002</a><br />
<a href="http://cafelog.com/index.php?m=200205">may 2002</a><br />
<a href="http://cafelog.com/index.php?m=200204">april 2002</a><br />
<a href="http://cafelog.com/index.php?m=200203">march 2002</a><br />
<a href="http://cafelog.com/index.php?m=200202">february 2002</a><br />
<a href="http://cafelog.com/index.php?m=200201">january 2002</a><br />
<a href="http://cafelog.com/index.php?m=200112">december 2001</a><br />
<a href="http://cafelog.com/index.php?m=200111">november 2001</a><br />
<a href="http://cafelog.com/index.php?m=200110">october 2001</a><br />
<a href="http://cafelog.com/index.php?m=200109">september 2001</a><br />
<a href="http://cafelog.com/index.php?m=200108">august 2001</a><br />
<a href="http://cafelog.com/index.php?m=200107">july 2001</a><br />
<a href="http://cafelog.com/index.php?m=200106">june 2001</a><br />
</p>
</td>
</tr>
</tbody></table>
</td>
<td height="97" valign="top" style="background-repeat:none"><img src="/witch3.jpg" width="300" height="104" alt="" />
<div style="position:relative;left:30px; right:30px; width:240px;">
<p><span class="chti" style="color:#000000"><b>What is b2 ?</b> <br />
A classy news/weblog tool (aka logware).</span></p>
<p><span class="chti" style="color:#000000"><b>How does it work ?</b><br />
You type something and hit "blog this" and in the next second it's on your page(s). You can write extended entries, or even entries that span multiple pages. You can also use BloggerAPI clients to post to your b2 weblog.<br />What's original in b2 ? Pages are generated dynamically from the MySQL database, so no clumsy 'rebuilding' is involved. It also means faster search/display capabilities, and the ability to serve your news in different 'templates' without any hassle.</span></p>
<p><span class="chti" style="color:#000000"><b>Requirements ?</b><br />
A server that can run PHP4, and a MySQL database (you can install b2 in an already existing database, and you can put several b2's in one database).</span></p>
<p><span class="chti" style="color:#000000"><b>Where can I download it ?</b><br />
<a href="http://sourceforge.net/project/showfiles.php?group_id=51422&release_id=113582">b2 0.6</a> is the latest public release.<br />
You can also visit the <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cafelog/">CVS</a> server for the latest code, at your own risks.<br />
See the <a href="/readme.html">ReadMe</a> file for requirements and installation instructions.</span></p>
<p><span class="chti" style="color:#000000"><b>Contact info ?</b><br />
E-mail: <a href="mailto:<EMAIL>"><EMAIL></a><br />
Forums: <a href="http://tidakada.com/board/">over there</a>. :)
</span></p>
<ul style="list-style: none; width: 100%; padding: 0; margin: 0; overflow: hidden; border: 1px solid #eeeeee; border-spacing: 0px; background-color: #F0F0F0;">
</ul>
<p><span class="chti" style="color:#000000"><b>Post categories:</b></span></p>
<form name="cats" action="" method="get">
<div><select name="cat" class="postform">
<option value="all">All</option>
<option value="1">General</option>
<option value="2">Development</option>
<option value="3">Off-topic</option>
<option value="4">bugs</option>
<option value="5">Cool b2 stuff</option>
</select>
<input type="submit" name="submit" value="view" /></div>
</form>
<p><span class="chti" style="color:#000000"><b>Search:</b></span></p>
<form name="searchbox" action="" method="get">
<input type="text" name="s" />
<input type="submit" name="submit" value="search" />
</form>
<p> </p>
<p><span class="chti" style="color:#000000"><b>They are powered by b2:</b><br /><br />
<br />
<a href="mailto:<EMAIL>?subject=got b2">e-mail</a> me when you install b2 on your site, include your URL to be linked here.</span></p>
<p> </p>
<p><span class="chti" style="color:#000000"><b>Recently updated b2 weblogs:</b><br /><br />
<br />
To be included in that list whenever you post to your weblog, please use b2 v0.6 or later, and then e-mail <a href="mailto:<EMAIL>"><EMAIL></a> with: your site's name, URL, e-mail, and a password. You will then receive an e-mail with an ID string that you'll have to paste in your b2config.php file. And then you'll be linked there :)</span></p>
<p> </p>
<p><!-- Begin b2 ring code -->
<a href="http://www.ringsurf.com/netring?ring=b2blog;id=5;action=prev" onmouseover="window.status='previous';return true" onmouseout="window.status='';return true" target="_blank"><< </a><a href="http://www.ringsurf.com/netring?ring=b2blog;id=5;action=list" onmouseover="window.status='list';return true" onmouseout="window.status='';return true" target="_blank">#</a> <a href="http://www.ringsurf.com/netring?ring=b2blog;action=home" onmouseover="window.status='[powered by b2]';return true" onmouseout="window.status='';return true" target="_blank">[powered
by b2] </a><a href="http://www.ringsurf.com/netring?ring=b2blog;id=5;action=rand" onmouseover="window.status='random';return true" onmouseout="window.status='';return true" target="_blank">?</a>
<a href="http://www.ringsurf.com/netring?ring=b2blog;id=5;action=next" onmouseover="window.status='next';return true" onmouseout="window.status='';return true" target="_blank"> >></a> <!-- End b2 ring code --></p>
<p> </p>
<form action="http://www.hotscripts.com/cgi-bin/rate.cgi" method="post">
<input type="hidden" name="ID" value="11486" />
<table border="0" cellspacing="0">
<tbody><tr>
<td align="center" style="font-family: arial,verdana; font-size: 12px;">
<b>If you like b2, please rate it at <i><a href="http://www.hotscripts.com">HotScripts.com</a></i></b>
</td>
</tr>
<tr>
<td align="center">
<table border="0" cellspacing="2" align="center">
<tbody><tr>
<td align="center">
<select name="ex_rate" size="1">
<option value="5" selected="selected">Excellent!</option>
<option value="4">Very Good</option>
<option value="3">Good</option>
<option value="2">Fair</option>
<option value="1">Poor</option>
</select>
</td>
<td align="center">
<input type="submit" value="Cast My Vote!" />
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</form>
</div>
</td>
</tr>
<tr align="left">
<td valign="top" style="height: 48px; background-repeat:none">
<div style="position:relative;left:30px;right:30px;">
<p> </p>
</div>
</td>
</tr>
</tbody></table>
</div></body></html> | html |
The Super 12 stage of ICC T20 World Cup 2021 culminated earlier tonight with a one-sided match between India and Namibia. The Indian cricket team ended their campaign with a comfortable nine-wicket win over Namibia at the Dubai International Cricket Stadium.
It was a historic occasion in Dubai because India and Namibia battled in a T20I match for the first time ever. It was also Virat Kohli's last match as the captain of the Indian T20I team and Ravi Shastri's last game as the head coach of the Indian cricket team.
As expected, India registered an easy win, but it was not enough to take them through to the T20 World Cup 2021 semifinals. India finished third in the Group 2 standings with six points from five matches. They were behind Pakistan and New Zealand on the points table.
Talking about the India vs Namibia T20 World Cup game, Virat Kohli called the toss right in his last T20I game as the Indian skipper and invited Namibia to bat first. A disciplined bowling performance from India restricted Namibia to 132/8 in 20 overs.
All-rounder David Wiese was the only batter to score more than 25 runs for Namibia. Ravindra Jadeja and Ravichandran Ashwin scalped three wickets each for India, while Jasprit Bumrah picked up two wickets.
Chasing 133 to win, India got off to a great start as they did not lose a single wicket in the powerplay overs. Both Rohit Sharma and KL Rahul scored a fifty in their last T20 World Cup 2021 innings. Sharma lost his wicket to Jan Frylinck after scoring 56 runs. Rahul remained unbeaten until the end and completed the formalities with Suryakumar Yadav in the 16th over.
Fans enjoyed the first-ever India vs Namibia T20 World Cup match tonight. Here are the best memes from the game:
Poll : Can India win the ICC T20 World Cup 2022 trophy? | english |
<filename>src/main/java/hybridsystem/Gp.java
package hybridsystem;
import edu.ucsc.cross.hse.core.modeling.JumpMap;
/**
* A jump map
*/
public class Gp implements JumpMap<State> {
/**
* Parameters
*/
public Parameters parameters;
/**
* Constructor for jump map
*/
public Gp(Parameters parameters) {
this.parameters = parameters;
}
/**
* Jump map
*
* @param x
* current state
* @param x_plus
* state update values
*/
@Override
public void G(State x, State x_plus) {
// compute x_plus values here
}
}
| java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.