This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scrapy | |
from scrapy_splash import SplashRequest | |
script = """ | |
function main(splash) | |
splash:init_cookies(splash.args.cookies) | |
assert(splash:go{ | |
splash.args.url, | |
headers=splash.args.headers, | |
http_method=splash.args.http_method, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2019-06-14 23:44:26,825] ERROR [Process: MainProcess Id:55826] [Thread: MainThread Id: 140736302633920] [scrapy.core.scraper._itemproc_finished:234] Error processing {'case_json': {'aws_cache_link': 'https://s3.console.aws.amazon.com/s3/buckets/scrapy-appeal-spiders/staging/mn-appeals/parse_item_page/A19-0915/2019-06-14-23:43.html', | |
'case_number': 'A19-0915', | |
'case_type': 'Civil', | |
'external_source_link': 'http://macsnc.courts.state.mn.us/ctrack/view/publicCaseMaintenance.do?csNameID=94074&csInstanceID=106682', | |
'internal_sub_project': 'mn-appeals', | |
'start_date': '06/13/2019', | |
'status': 'Pre-Briefing', | |
'title': 'TMT Management Group, LLC, et al., Appellants, vs. ' | |
'U.S. Bank National Association, et al., Respondents, ' | |
'Wilbur Tate, Respondent, United Credit Recovery, LLC, ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2019-06-14 23:43:56,035] ERROR [Process: MainProcess Id:55826] [Thread: MainThread Id: 140736302633920] [scrapy.core.scraper._itemproc_finished:234] Error processing {'case_json': {'aws_cache_link': 'https://s3.console.aws.amazon.com/s3/buckets/scrapy-appeal-spiders/staging/mn-appeals/parse_item_page/A19-0914/2019-06-14-23:43.html', | |
'case_number': 'A19-0914', | |
'case_type': 'Civil', | |
'external_source_link': 'http://macsnc.courts.state.mn.us/ctrack/view/publicCaseMaintenance.do?csNameID=94073&csInstanceID=106681', | |
'internal_sub_project': 'mn-appeals', | |
'start_date': '06/13/2019', | |
'status': 'Pre-Briefing', | |
'title': 'In re the Matter of the Welfare of the Children of: ' | |
'R. L. W. and J. P. W., Parents.'}, | |
'parties_list': [{'attorneys': [], |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CaseCategory,CaseTypeDescription,CaseNumber,Title,FilingDate,PartyType,FirstName,MiddleName,LastName/CompanyName,PartyAddress,Attorney | |
"CV","Mortgage Foreclosure - Commercial -2- $50,001 - $249,999","19-CA-005467","Amirhouses.com, LLC vs Lewis, Henry","05/28/2019","Plaintiff","","","Amirhouses.com, LLC","1627 US Hwy 92 W, Auburndale, FL 33823","No Attorney" | |
"CV","Mortgage Foreclosure - Commercial -2- $50,001 - $249,999","19-CA-005467","Amirhouses.com, LLC vs Lewis, Henry","05/28/2019","Defendant","Henry","","Lewis","2620 E 33rd Ave, Tampa, FL 33610","No Attorney" | |
"CV","Mortgage Foreclosure - Commercial -2- $50,001 - $249,999","19-CA-005467","Amirhouses.com, LLC vs Lewis, Henry","05/28/2019","Defendant","Lyette","","Pate","9604 N Aster Ave, Tampa, FL 33612","No Attorney" | |
"CV","Mortgage Foreclosure - Commercial -2- $50,001 - $249,999","19-CA-005467","Amirhouses.com, LLC vs Lewis, Henry","05/28/2019","Defendant","Cornelius","","Pate","9604 N Aster Ave, Tampa, FL 33612","No Attorney" | |
"CV","Mortgage Foreclosure - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://www.long-memory.com/hurst/hurst.cpp | |
#The calculation requires at least 4 data points. | |
# https://en.wikipedia.org/wiki/Rescaled_range | |
data = [] | |
array1 = [] | |
array2 = [] | |
for n in range(len(data)): | |
totalR = 0 | |
totalS = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
def __init__(self,initdata): | |
self.data = initdata | |
self.next = None | |
def getData(self): | |
return self.data | |
def getNext(self): | |
return self.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
def __init__(self,initdata): | |
self.data = initdata | |
self.next = None | |
def getData(self): | |
return self.data | |
def getNext(self): | |
return self.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def orderedSequentialSearch(alist, item): | |
''' | |
O(n/2) in item is not present average case | |
''' | |
pos = 0 | |
found = False | |
stop = False | |
while pos < len(alist) and not found and not stop: | |
if alist[pos] == item: | |
found = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Queue: | |
def __init__(self): | |
self.items = [] | |
def isEmpty(self): | |
return self.items == [] | |
def enqueue(self, item): | |
self.items.insert(0,item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack: | |
def __init__(self): | |
self.items = [] | |
def isEmpty(self): | |
return self.items == [] | |
def push(self, item): | |
self.items.append(item) |