text:
Q: Can't capture href tag content with regex first time I want to scrape a website for external links and paths by using regex on href html tag.
But I don't know if there is simpler way than my code:
import requests
import re

target_url = ("http://testphp.vulnweb.com/")

response = requests.get(target_url)
res = re.findall('href\=\"[\w.:/]+\"', response.content.decode("utf-8"))

for i in res:
    patt = re.compile("\"[.:/\w]+\"")
    not_raw = re.findall(patt, i)
    raw = re.findall("[.:/\w]+", not_raw[0])
    print(raw)

Is there a way, instead of using regex 3 times, to pick the path and links from an href tag without capturing it?
I mean the res variable output is like this:
href="https://www.acunetix.com/vulnerability-scanner/"

Can I use regex in a way to pick up the URL in the res variable like the following?
https://www.acunetix.com/vulnerability-scanner/

A: Yes, you can use "caputuring" and "non-capturing" matches. Example:
re.findall(r'(?:href=")([^\"]+)(?:")', response.content.decode("utf-8"))

The ?: in (?:href=") means that this part will not be returned as part of the matched string.
From https://docs.python.org/3/library/re.html:

(?:...)
A non-capturing version of regular parentheses. Matches whatever regular expression is inside the parentheses, but the substring matched by the group cannot be retrieved after performing a match or referenced later in the pattern.

A: Parsing HTML with regex is a poor choice. See this to learn why.
To get all the href attributes usa a HTML library like BeautifulSoup and try this:
import requests
from bs4 import BeautifulSoup

response = requests.get("http://testphp.vulnweb.com/").content
soup = BeautifulSoup(response, "html.parser").find_all("a", href=True)
href_ = [a["href"] for a in soup if "http" in a["href"]]
print("\n".join(href_))

Output:
https://www.acunetix.com/
https://www.acunetix.com/vulnerability-scanner/
http://www.acunetix.com
https://www.acunetix.com/vulnerability-scanner/php-security-scanner/
https://www.acunetix.com/blog/articles/prevent-sql-injection-vulnerabilities-in-php-applications/
http://www.eclectasy.com/Fractal-Explorer/index.html
http://www.acunetix.com


text:
Q: Is is possible to use a CTE combined with a UDT to delete data? I have a stored procedure that takes in a UDT. I would like to sanitize this data before inserting into the database to prevent any duplicate data from getting inserted. (Primary Key is still allowing duplicate data just the PK is different).
So I am using shorthand with a cte to get remove all of the possible duplicate rows and then use the clean data to insert into my table
The problem is I am getting an error that "@UDT_MyTable is READONLY and cannot be modified". Is there someway around this without going the temp table route?
Create Procedure InsertIntoMyTable
(
@UDT_MyTable dbo.MyUDT readonly
)

as
Begin
declare @TodaysDate datetime = CURRENT_TIMESTAMP
begin transaction

;with cte as
(
Select Row_Number() Over
(
PARTITION BY
Column1,
Column2,
Column3,
Column4,
Column5,
Column6
)
as sequence from
@UDT_MyTable

Errors Here
**Delete from cte Where sequence > 1**

insert into my table(
Column1,
    Column2,
    Column3,
    Column4,
    Column5,
    Column6,
    DateCreated
)
select
Column1,
    Column2,
    Column3,
    Column4,
    Column5,
    Column6,
    @TodaysDate
from cte

redpajama_set_name: RedPajamaStackExchange


"Usually my paintings are in scribbled or scribbling style that's why others find them unique and contemporary. As an artist, I want to have a different style in painting and be known by it."
Bench - Watercolor 22 x 30 in.
Marjorie Sanchez graduated as a Fine Arts major in Advertising Design at College of The Holy Spirit, Mendiola Manila. She is an active member of two art groups in the Philippines, the AAP or Art Association of the Philippines and the IWS or International Watercolor Society Philippines and participates in the annual group exhibit.
Life in Province - Watercolor 36 x 48 in.
At the Park - Watercolor 18 × 24 in.
Pasig-Green City - Watercolor 9 x 12 in.


PowerBoost 500C is the perfect power supply for your portable project!
With a built-in battery charger circuit, you'll be able to keep your project running even while recharging the battery!
output tweaked to be 5.2V instead of a straight-up 5.0V so that there's a little bit of 'headroom' for long cables, high draw, the addition of a diode on the output if you wish, etc.
The 5.2V is safe for all 5V-powered electronics like Arduino, Raspberry Pi, or Beagle Bone while preventing icky brown-outs during high current draw because of USB cable resistance.
To make this even more useful, Adafruit stuck a MicroLipo charger on the other side. The charger circuitry is powered from a microUSB jack, and will recharge any 3.7V/4.2V LiIon or LiPoly battery at 500mA max rate. There's two LEDs for monitoring the charge rate, a yellow one tells you its working, a green one lights up when its done. You can charge and boost at the same time no problem, without any interruption on the output so its fine for use as a "UPS" (un-interruptable power supply). Just be aware that the charge rate is 500mA max, so if you're drawing more than ~300mA continuously from the 5V output side, the battery will slowly drain since the charge rate is less than the dis-charge rate. You do have to always have a LiPo plugged into manage the load spikes, it's not optional!
Each order comes with one fully assembled and tested PCB and a loose USB A jack. If you are powering your project from USB, solder the USB A jack in (a 3-minute soldering task). If you would like to use a terminal block, you'll need to solder a 3.5mm 2pin block (not included) to the output spot where the USB jack would go. Or don't solder anything in for a more compact power pack.
You can also solder a switch in to create an output on/off switch!
Each order comes with a fully assembled and tested PowerBoost 500C + USB jack. Does not come with a Lipoly or LiIon battery, just pick one with more than 500mAh of capacity. Also doesn't come with the nice iPhone or charger cable. Be sure to read Adafruits lovely tutorial for details, schematics, and more!
Great bit of kit, loving this modular gig!
The first 500C that arrived didn't work. Having never seen one it took quite a while to work out if it was the charger or me that was to blame. Now I have seen one working, thanks to the outstanding customer services of Pimoroni who dispatched a replacement the same day, it is easy to spot the fault, no blue light, no output. I am using it to power Audio FX Sound Board and it makes it possible to fit all the bits that are needed within a small space (smaller battery etc). Again, huge thanks to Matt at Pimoroni who helped with the design of the circuit and all that was needed afterwards to make it all work!
Really handy - can easily set of a Lipo power device. Excellent.
It's from Adafruit...I could stop there, as that already says it's great quality! A very useful little board, with a range of uses. Great if, like me, you're new to LiPo, as this takes away any worries about charging it properly. I've got 2 uses in mind for mine; as power for a Pi Zero in a small 'bot instead of a cumbersome USB pack, and as a UPS (again with a Zero) for a data collection project. The soldering takes all of 30 seconds if you want the USB socket. I will definitely be getting more of these!


Help your hands stay nice and clean with this practical, germ-fighting machine! Banishing bacteria like nobody's business, your guests will appreciate this useful wedding favor that is personalized with your choice of color and one of our exclusive design themes.
Materials: Plastic bottle with paper label.


text:
Die Liste der Städte in Thüringen beinhaltet alle Orte mit Stadtrecht im deutschen Land Thüringen.

Derzeit besitzen 118 Kommunen in Thüringen das Stadtrecht. Bis 1718 erhielten 107 Orte das Stadtrecht. Danach erhielt erst 1847 wieder ein Ort die Stadtrechte; insgesamt folgten 28 neue Städte bis 1999. Gleichzeitig werden seit dem 20. Jahrhundert Städte zusammengeschlossen oder eingemeindet, sodass sich die Zahl wieder leicht reduziert.

Erläuterungen

 Die ersten Spalten der Tabelle zeigen das Stadtwappen, den Namen der Stadt und den zugehörigen Landkreis. Städte, die heute nicht mehr selbstständig sind, sind kursiv dargestellt und mit einem Hinweis zur heutigen kommunalen Zugehörigkeit versehen.
 Die folgenden beiden Spalten enthalten Daten zur ersten urkundlich nachgewiesenen Erwähnung des Ortes und zur urkundlich nachgewiesenen Bezeichnung als Stadt oder zur (nicht immer dokumentierten) Stadtrechtsverleihung. Hauptquellen hierfür waren die im Literaturverzeichnis aufgeführten Werke von Dehio, Kahl und Patze.
 Die sechste Spalte enthält die Fläche der Stadt mit Gebietsstand zum  nach dem Thüringer Landesamt für Statistik.
 Die siebte Spalte enthält die Fläche der Altstadt in Hektar gemäß einer Flächenberechnung mit Google Earth. Dieser Wert ist nur für die Städte angegeben, die bereits vor der napoleonischen Zeit (um 1800) über Stadtrechte verfügten. Damals war die rechtliche Gleichstellung zwischen Stadtgemeinden und Landgemeinden noch nicht erfolgt und die Städte nutzten physische Grenzen zur Markierung des Geltungsbereichs ihres Rechts. Meist war dies die Stadtmauer, in kleineren Städten konnten es auch Gräben, Zäune, Hecken oder Gatter sein, während gänzlich offene Städte kaum vorkamen. Im Regelfall war diese Abgrenzung über Jahrhunderte konstant und blieb bis heute im Stadtgrundriss ablesbar. Die Größe des umgrenzten Raumes und seine Bebauungsdichte variierten sehr stark, so waren einige Städte im Thüringer Becken sehr groß in Bezug auf die Fläche, jedoch nur relativ dünn bebaut. In manchen Fällen wurde sogar nie die ganze Fläche bebaut (etwa in Thamsbrück oder Neumark). Südlich des Thüringer Waldes waren die Flächen kleiner, dafür jedoch wesentlich dichter bebaut.
 Die achte Spalte enthält die Einwohnerzahl der Stadt zum  nach Angaben des Thüringer Landesamtes für Statistik.
 Die neunte Spalte enthält die Einwohnerzahl der Stadt im Jahr 1843, also beim Beginn der Industrialisierung und vor der Urbanisierung des 19./20. Jahrhunderts in Thüringen. Die Datenquelle für die Kleinstaaten ist das Werk von Johann Friedrich Kratzsch: Lexicon der sämmtlichen Ortschaften der Deutschen Bundesstaaten. Naumburg, 1843. Online abrufbar bei Google Books. Für die preußischen Gebiete: Handbuch der Provinz Sachsen. Magdeburg, 1843. Online abrufbar bei Google Books.
 Die letzten beiden Spalten zeigen ein Bild vom Rathaus als Sitz und Symbol städtischer Selbstverwaltung sowie von der (Haupt-)Stadtpfarrkirche als Sitz und Symbol des geistlichen Lebens als den beiden konstitutiven Elementen der mitteleuropäischen Stadt.
 Um die Sortierbarkeit der Tabelle zu gewährleisten sind die Nummern eventueller Anmerkungen zum Tabelleninhalt hinter dem jeweiligen Stadtnamen vermerkt.
 Nicht in der Tabelle enthalten sind Orte, die nur über partielle oder temporäre Stadtrechte verfügten, da für diese umfassende Gruppe noch keine wissenschaftliche Gesamtdarstellung für Thüringen vorliegt. Maßgeblich für die Aufnahme in die Liste ist die Charakterisierung als vollwertige Stadt seit dem 19. Jahrhundert.

Tabelle

Ehemalige Städte

Anmerkungen

Literatur

 Wolfgang Kahl: Ersterwähnung Thüringer Städte und Dörfer. Ein Handbuch. Verlag Rockstuhl, Bad Langensalza, 2010, ISBN 978-3-86777-202-0.
 Hans Patze, Peter Aufgebauer (Hrsg.): Handbuch der historischen Stätten Deutschlands. Band 9: Thüringen (= Kröners Taschenausgabe. Band 313). 2., verbesserte und ergänzte Auflage. Kröner, Stuttgart 1989, ISBN 3-520-31302-2.

Siehe auch
 Liste der größten Gemeinden in Thüringen nach Einwohnerzahl
 Liste der Rathäuser in Thüringen
 Liste der Städte und Gemeinden in Thüringen
 Liste der Wappen in Thüringen
 Landgemeinde (Thüringen)

Thuringen
!

redpajama_set_name: RedPajamaWikipedia


With the Cash accounting method, the taxpayer reports all items of income in the year he or she actually or constructively receive them. A taxpayer constructively receive income when it is credited to his or her account or in any way becomes available to him or her. With the cash accounting method, the taxpayer deducts expenses in the year he or she pays them.
John completes a construction job in November 2007 and is paid in 2007. He must report that income on his 2007 tax return. If John were paid for the November job in January 2008, then the income would be reported until John files is tax return for the 2008 year because he received his pay in 2008.
Jill receives a valid paycheck on December 31, 2007. This is part of her 2007 gross income even if she cashes the check in January 2008.
Mike receives a bill from the hospital in December 2007. He does not pay the bill until January 2008. He cannot include this bill in his itemized deduction because he did not pay the expenses in that tax year.
The accrual accounting method, on the other hand, reports income in the year the taxpayer earns it and deduct expenses in the year the taxpayer incurs them.
If John in the above example used the accrual accounting method instead of the cash accounting method, then he would report the income from the job completed in November on his 2007 tax return even if he was not paid until January 2008.


The Emmaus Farmers Market is the premier producer-only market in the Lehigh Valley. We are committed to providing locally produced, safe, and highly nutritious farm products. Your support of the Emmaus Farmers Market preserves surrounding farmland.
The Emmaus Market has brought life back to the borough's downtown on Sundays. With its family-friendly and pet-friendly atmosphere, it has become the social gathering place for the community, featuring live entertainment, cooking demonstrations, and exhibits by nonprofit groups. Vendors are always ready to educate customers about creative ways to use their produce. And it's within walking distance for much of the town.


Monday, Sept. 24 the Niagara region held the first of two public hearings regarding a proposed bylaw that would see smoking banned inside public places, with no allowances for designated smoking areas. Regional council chambers were packed as more than 100 people crowded in. This was the public's first opportunity to formally address the council members who will eventually decide whether or not to pass the proposed bylaw. Originally scheduled as the only public meeting on the issue, Debbie Zimmerman, Niagara region chair, announced that the large number of people who wished to address council could not be accommodated in one meeting, and another was scheduled for Oct. 11.
Many of those opposed to the proposed bylaw included employees and partons of various bingo halls. Decked out in T-shirts reading "Support choice, Support bingo," they argued that many of the people who participate in bingo are smokers and if they are no longer allowed to smoke while they play, they will either go where smoking is allo or simply stop playing. They also pointed out that without money from bingo, many of the charities that bingo halls support would suffer a severe loss of revenue.
Supporters of the proposed bylaw, which made up the majority of the night's speakers, included members of the health community as well as officials from other regions, such as Waterloo, that have already adopted similar non-smoking bylaws. Michael Perley, director of the Ontario Campaign for Action on Tobacco, told councilors that although four lawsuits had been filed in other regions adopting a similar bylaw, all had failed. As such, he said, they should not let the potential legal ramifications have an impact on their decision.
Although, the proposed bylaw is evoking strong reactions from both sides, it is by no means a new issue. On Nov. 6, 1997 Niagara Regional Council passed Bylaw 8901-97, which severely limited the places where smoking would be allowed within the region. Should the proposed bylaw go through, it would be the third time in just under four years that it has been amended from its original form. The original bylaw prohibited people from smoking or holding a lighted tobacco product and prohibited the placement of ashtrays in an enclosed public place. Exceptions were made for restaurants, bingo hall, bowling centres, as well as recreational and/or sports facilities, which were allowed to have designated smoking areas. Within seven months of the bylaw being passed, it was amended to allow shopping malls to also operate designated smoking areas. Now, less then three and a half years later, the region's medical health officer has put forward a proposal to further amend the bylaw.
Rather than weakening the bylaw, however, the proposal is calling council to eliminate all existing exemptions. This means all public facilities in the region would become 100 per cent smoke-free zones, with no allowances for designated smoking areas.
If all goes as planned, the regions medical health officer would like to see the bylaw approved by council and made law by May 2002. Concerns have been raised with regard to people driving just outside the region to a municipality such the amalgamated Hamilton-Wentworth County, where they can smoke while enjoying dinner.
Cathy Brewster of the Community Gaming Development Corporation, addressed council and said that statistics showed a large percentage of people would be willing to drive up to an hour away to go to a bingo hall where they can smoke. Fears of losses are not lost on the business owners and councillors of Hamilton-Wentworth County.
Although the region was officially amalgamated into one large city at the beginning of the year, each of the former municipalities that amalgamated have retained their individual smoking bylaws.
According to Andrea Kita of the Healthy Lifestyle and Disease Prevention branch of Hamilton's tobacco hotline, a unified bylaw for the entire region has been proposed to council and at this time. A subcommittee has been established to study the bylaws in Waterloo.
Due to the number of people who were unable to speak at the Sept. 24 meeting, another has been scheduled for Oct. 11, also to be held in the Niagara Regional council chambers.
The issue should be brought to vote by council next spring.


text:
Permanent Secretary of the Ministry of Defence Ambassador Danjuma Sheni and the Pakistan Air Force's Chief of Air Staff ACM Sohail Aman. Photo credit: Associated Press of Pakistan
Dec 6, 2016	Bilal Khan	-
Nigeria receives four Super Mushshak trainers
The Pakistan Air Force (PAF) and Pakistan Aeronautical Complex (PAC) have delivered four Super Mushshak trainers to the Nigerian Air Force (NAF).
The aircraft were handed over in a ceremony held at Kaduna Air Base in Nigeria. Kaduna is the home of the NAF's Training Command and Air Force Institute of Technology.
As per Flight Global, these four aircraft are from existing PAF/PAC stocks and are being loaned to the NAF as an interim measure until the NAF's new-build Super Mushshak aircraft are delivered.
A total of eight surplus units will be loaned to the NAF.
Nigeria ordered 10 Super Mushshak in June as part of a comprehensive effort to modernize its air force.
As part of the program, the PAF will also provide instructors for the NAF's 310 Flying School to help train future NAF pilots. A local support facility for training and technical support will also be raised in Nigeria (Associated Press of Pakistan).
The NAF Chief of Air Staff also confirmed that three JF-17 multi-role fighters will also join the fighter fleet.
In 2016, PAC has seen renewed traction with the Super Mushshak, a heavily upgraded variant of the Saab MFI-17 Safari with, among other improvements, a glass cockpit and uprated engine.
Qatar ordered eight Super Mushshak, while Turkey recently signed a memorandum-of-understanding for 52 units, amounting to PAC's largest single order for the aircraft to date.
The Super Mushshak is marketed as a basic trainer suitable providing basic flying-competency and for screening novice pilots ahead of intensive flight training programs.

redpajama_set_name: RedPajamaCommonCrawl


Every week brings new projects, emails, files, and task lists. Just how much of this is different from the work you have done before? Odds are, not much. A number of our tasks are variations on something we've done countless times before.
Don't reinvent the wheel every single time you start something new. Instead, use templates–as starting point for 17, standardized documents with formatting and text. Once you save another variant of the template, simply add, remove, or alter any info for that document, and you are going to have the job completed in a fraction of the time.
Templates work anywhere: in word processors, spreadsheets, project management programs, survey platforms, and also email. Here is the way to automatically create documents from a template — and the way to use templates from your favorite programs –so you can get your tasks done quicker.
That is only one benefit: Using a template means you are not as likely to leave out key info, also. For instance, if you need to send freelance authors a contributor agreement, changing a standard contract template (rather than composing a new contract every time) guarantees you won't depart out the crucial clause about possessing the content once you've paid for it.
Templates also guarantee consistency. Maybe you send regular job updates to customers or investors. Using a template, you understand the update will have the exact same formatting, layout, and structure.
Imagine you're developing a template of your resume. You'd want to list details and that means you are going to have all the info you want to apply for any job.
Some tools will automatically fill in these variables for you (more on that in a bit). But should you have to fill in the information by yourself, include some text that is obvious and easy to look for so you can find text that needs to be altered without a lot of work.