Skip to content

Instantly share code, notes, and snippets.

@vdavez
Created April 28, 2019 23:00
Show Gist options
  • Save vdavez/1f563b775dc065853d20aeff6fb3480a to your computer and use it in GitHub Desktop.
Save vdavez/1f563b775dc065853d20aeff6fb3480a to your computer and use it in GitHub Desktop.
FedBizOpps Parser
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import re\n",
"\n",
"def parseFBO(filename):\n",
" opener = re.compile('<([A-Z]+)>')\n",
" closer = re.compile('</([A-Z]+)>')\n",
" currKey = \"\"\n",
"\n",
" opportunities = [{\"type\":None}]\n",
" idx = 0\n",
"\n",
" with open (filename,'r', encoding='mac-roman') as fp:\n",
" for line in fp:\n",
" m = opener.match(line)\n",
" if not opportunities[idx][\"type\"]:\n",
" if m:\n",
" opportunities[idx][\"type\"] = m.group(1)\n",
" else:\n",
" if closer.match(line):\n",
" idx = idx + 1\n",
" opportunities.append({\"type\":None})\n",
" else:\n",
" if m:\n",
" currKey = m.group(1)\n",
" if currKey in opportunities[idx]:\n",
" opportunities[idx][currKey] += opener.sub('|',line).strip()\n",
" else:\n",
" opportunities[idx][currKey] = opener.sub('',line).strip()\n",
" else:\n",
" opportunities[idx][currKey] += '|' + line.strip()\n",
" return opportunities"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"def get_fbo(datestamp):\n",
" import requests\n",
" fbourl = 'https://s3.amazonaws.com/falextracts/Contract Opportunities/daily/historical/FBOFeed%s' % datestamp\n",
" response = requests.get(fbourl, stream=True)\n",
"\n",
" # Throw an error for bad status codes\n",
" response.raise_for_status()\n",
"\n",
" with open(datestamp, 'wb') as handle:\n",
" for block in response.iter_content(1024):\n",
" handle.write(block)\n",
" return parseFBO(datestamp)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"{'type': 'PRESOL',\n",
" 'DATE': '0424',\n",
" 'YEAR': '19',\n",
" 'AGENCY': 'Department of Veterans Affairs',\n",
" 'OFFICE': '263 Network Contracting Office 23 (NCO 23)',\n",
" 'LOCATION': 'Department of Veterans Affairs Medical Center',\n",
" 'ZIP': '55101',\n",
" 'CLASSCOD': 'Z',\n",
" 'NAICS': '236220',\n",
" 'OFFADD': 'Department of Veterans Affairs;NETWORK 23 CONTRACTING OFFICE;Atth: Lucas Dahlman;316 Robert Street N. STE. 506;St. Paul MN 55101',\n",
" 'SUBJECT': 'Z--656-341 Expand/Construct Outpatient Mental Health Clinic - STC 36C263-19-AP-1762',\n",
" 'SOLNBR': '36C26319R0068',\n",
" 'RESPDATE': '053019',\n",
" 'ARCHDATE': '09062019',\n",
" 'CONTACT': 'Lucas Dahlman|651-293-3047|[email protected]|This is a Pre-Solicitation Notice only and the|Solicitation will NOT be posted for at least|15 days from the date of this Notice||<a href=\"mailto:[email protected]\">Contract Specialists Email</a>',\n",
" 'DESC': \"|PROJECT: 656-341 PROJECT TITLE: Expand/Construct Outpatient Mental Health Clinic|||SCOPE/BASE BID ITEM:||This project will add approximately 13,500 square feet by adding a second floor to building 111. This project will mitigate Minnesota Market utilization gaps for select Ambulatory Mental Health programs, including mental health clinic, psychology, and aftercare/screening/outreach programs.||Contractor shall furnish all labor, materials, tools and equipment required to expand/construct an outpatient mental health clinic. The contractor shall completely prepare site for building operations, including demolition and removal of existing structures, and furnish labor and materials and perform work for Expand/Construct Outpatient Mental Health Clinic as required by drawings and specifications.||Work includes general construction not all inclusive to: abatement, demolition, removal or relocation of existing structures, relocation of existing utilities, alterations, grading, drainage, site utilities, curbs, walks, pavement, storm water management systems, architectural, structural, mechanical and electrical work.||The existing Building 111 will be vacated during construction of this project. Adjacent buildings will remain occupied by the VA throughout construction of this project. Adjacent buildings will remain occupied by the VA throughout construction. Work in occupied areas may need to be accomplished outside of normal working hours, 8:00|a.m. 4:30 p.m., if noise, dust and other hazards cannot be mitigated. Coordination with other construction projects may be required during the course of construction.||DEDUCT ALTERNATES, The list of alternates is provided below:||NOTE: Alternates if accepted, will be accepted in the numerical order of their listing below. (Example: To consider Alternate No. 5, deduct alternates No. 1 through No. 4 would have to be accepted first.)||ALTERNATE NO.1: (Base Bid less Alternate Nos. 1; deduct 7 calendar days from the contract completion time)|Delete Carpet Tile, and Substitute Broadloom carpet: State the amount to be deducted from Base Bid, to provide broadloom Carpet type C-1a in lieu of type C-1 carpet tile, as shown on the drawings, and as herein specified in SECTION 09 68 00 CARPETING. Note: Ground floor carpet is not affected by this alternate.||ALTERNATE NO. 2: (Base Bid less Alternate Nos. 1, 2; deduct 3 calendar days from the contract completion time)|Heat Exchanger Redundancy: State the amount to be deducted from the Base Bid, to provide a single steam-to-hot water heat exchanger for the heating system, in lieu of two heat exchangers, including all control valves, supports, and||associated piping as indicated on the mechanical drawings.||ALTERNATE NO. 3: (Base Bid less Alternate Nos. 1, 2, & 3; deduct 2 calendar days from the contract completion time)|Alternative Roof Framing and Detailing: State the amount to be deducted from Base Bid, to provide alternative roof framing system as detailed on Sheet AS A502, in lieu of the roof detailing as shown on Sheet AS 501, and affects roof framing, sheathing, roof insulation, etc. as specified herein.||ALTERNATE NO. 4: (Base Bid less Alternate Nos. 1,2, 3, and 4; deduct 3 calendar days from the contract completion time)|Lawns - Substitute Seeding in lieu of Sod: State the amount to be deducted from Base Bid, to provide seeding of all disturbed areas, in lieu of Sod, as specified SECTION 32 90 00 PLANTINGS, and as indicated on Civil Drawings.||ALTERNATE NO. 5: (Base Bid less Alt. Nos.1,2,3,4,and 5; deduct 0 calendar days from the contract completion time)|Prefinished Steel Gutters in lieu of Copper Gutters: State the amount to be deducted from Base Bid, to delete the copper gutters, downspouts, and to replace with prefinished steel gutters and downspouts, as herein specified (See Section 076000, Sheet metal).||ALTERNATE NO. 6: (Base Bid less Alt. No. 1,2,3,4,5, and 6; deduct 2 calendar days from the contract completion time)|Eliminate Fire/Smoke Damper Position Monitoring: State the amount to be deducted from Base Bid, to delete position monitoring on Fire/Smoke Dampers, as shown by Detail 5 on drawing 111-HS18.||ALTERNATE NO. 7: (Base Bid less Alt. Nos.1,2,3,4,5,6, and 7; deduct 3 calendar days from the contract completion time)|Deduct Modular Furniture and Kiosks, as specified Section 12 5900, OFFICE SYSTEMS FURNITURE, and as indicated on the drawings.||ALTERNATE NO. 8: (Base Bid less Alt. Nos.1,2,3,4,5,6,7 and 8; deduct 0 calendar days from the contract completion time)|Deduct Cable trays and substitute J hooks: as specified in Division 26-28, and as indicated on the drawings.||ALTERNATE NO. 9: (Base Bid less Alt. Nos.1,2,3,4,5,6,7,8 and 8; deduct 1 calendar days from the contract completion time)|Delete 3rd Stop at Elevator: State the amount to be deducted from Base Bid, to delete one stop (top floor stop) from the Elevator, As specified herein in Section 14 2400, and as indicated on drawings. Section 09 2113 and 09 2900 (Framing and gypsum board) as well as smoke doors/frames, Section 08 1100 Hollow Metal Doors and Frames, would be affected by this alternate, as the smoke door and wall recess would not have to be built on the top level. NOTE: The Cylinders, tank/pump unit, controller would not change under this alternate. Only removing the Elevator hoistway door/frame, top level call stations, etc., and eliminating the hoistway smoke door/frame at the top level.||ALTERNATE NO. 10: (Base Bid less Alt. Nos. 1,2,3,4,5,6, 7, 8, 9 and 10; deduct|30 calendar days from the contract completion time)|Group Office Spaces: State the amount to be deducted from Base Bid, to change groups of individual offices, and turn into larger work areas, (group office space) This would not affect Corridors C1-10 or C1-11. This deduct would group the following rooms into groups:|a. Group 1: Rooms 135, 136, 137|Group 2: Rooms 138 and 139|Group 3: Rooms 140, 142 and 144|Group 4: Rooms 141, 143 and 145|Group 5: Rooms 147, 149 and 151|f. Group 6: Rooms 146,148,150 and 152|||ALTERNATE NO.11: (Base Bid less Alt. No. 1,2,3,4,5,6,7,8,9, 10 and 11; deduct 10 calendar days from the contract completion time)|Undesignated Space (Shell Space): State the amount to be deleted from Base bid, and accepted Alternate No. 9, (grouped spaces) to combine the following into one space. Undesignated Room 190 as shown on 111-AS102D. Spaces and rooms affected are:|Groups 2,3,4,5 and 6|Corridors C1-10 and C1-11|Toilet 153|Office 155|Wheelchair 156|(Chase 154 and the duct chase south of Rm. 156 shall remain as configured in||base bid.)|Alternate NO. 11 requires the following clarifications and additions:|-Room 190 is to have minimal finishes as shown on 111-AS901. In addition to the finishes listed on this drawing, the GWB walls shall be finished to a Level 2.|-Install electrical outlets on the interior perimeter walls and wire to circuits as shown on 111-ES302. Surface-mount lighting to be installed as shown on 111-ES700.|-The mechanical contractor shall provide and install an Air Terminal Unit TU-2-21A for Storage Room 190. All valves, dampers and accessories for TU-2-23 shall match the requirements in the base bid documents. The Controls contractor shall provide and install a thermostat for TU-2-23 and provide all programming and sequencing as stated in base bid for VAV unit control. Thermostat shall be centrally located in the room on an interior wall.|-Install fire protection header as shown on 111-FPS4. Provide ordinary hazard sprinkler head coverage in lieu of light hazard as shown on sheet 111-FPS4. Install 8 smoke detectors in the open space 190 for proper coverage based on NFPA 72 guidelines.|-Sheet 111-GI102; Detail 2; Extend the smoke partition wall west across wall/door 108A & south across wall/door C1-11. Stop at the 1- hour fire wall near the mid- point of the south wall in Storage Room 157.|-Sheet 111-AS801; Door Schedule: Door C1-11 shall be rated 20 minutes; Hardware group shall change to HW Set #20 on door schedule. Door 108A shall be rated 20 minutes, Door Type change to Type E (not D ) on door schedule. Hardware group HW set #3 shall add one set seals 188S ZER (Section 087100).||12. ALTERNATE NO. 12: (Base Bid less Alt. Nos. 1,2,3,4,5,6,7,8,9,10,11 and 12:|deduct 30 calendar days from the contract completion time)|Group Office Spaces: State the amount to be deducted from Base Bid, to change groups of individual offices, and turn into larger work areas, (group office space) This would not affect Corridors C1-10 or C1-11. This deduct would group the following rooms into groups:|a. Group 7: Rooms 113, 115, 117, 119, 120 and 122|Group 8: Rooms 114, 116 and 118|Group 9: Rooms 121, 123 and 125|Group 10: Rooms 130 and 131||CONTRACTOR TRADE: General|||LIQUIDATED DAMAGES: N/A ASBESTOS: No|||EQUIPMENT: Contractor Furnished: None|VA Furnished: None||CONTRACTING OFFICER'S REPRESENTATIVE: William Rosendahl Cost Range|The anticipated cost range for this project is between $5,000,000 and $10,000,000.||TECHNICAL SPECIFICATIONS AND LIST OF DRAWINGS: Will be released upon Solicitation||TENTATIVE SCHEDULE:|Contract award*|D|Pre-construction conference|D+7|Notice to Proceed|D+14|Construction completion|D+730||Schedule Objectives - The anticipated substantial completion of this project is 730 days after Notice to Proceed (NTP).|||- - - E N D - - -|Link To Document|Contract Specialists Email\",\n",
" 'LINK': '',\n",
" 'URL': 'https://www.fbo.gov/spg/VA/MiVAMC618/MiVAMC618/36C26319R0068/listing.html',\n",
" 'EMAIL': '|[email protected]',\n",
" 'SETASIDE': 'Service-Disabled Veteran-Owned Small Business',\n",
" 'POPCOUNTRY': 'USA',\n",
" 'POPZIP': '56303',\n",
" 'POPADDRESS': 'Building 111;St Cloud. MN'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"opps = get_fbo(\"20190424\")\n",
"opps[0]"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment