geocode in ggmap can't connect to google map API (R) - geocode

Hi geocode worked for me before but not now.
> install.packages("ggmap")
> library(ggmap)
> geocode('boston ma')
Information from URL : http://www.datasciencetoolkit.org/maps/api/geocode/json?address=boston%20ma&sensor=false
lon lat
1 NA NA
Warning messages:
1: In readLines(connect, warn = FALSE) :
InternetOpenUrl failed: 'The operation timed out'
2: In geocode("boston ma") : geocoding failed for "boston ma".
if accompanied by 500 Internal Server Error with using dsk, try google.
I updated R and ggmap... Can somebody help please... Thanks
(I'm not sure it was http://www.datasciencetoolkit.org before - did it change?)

Related

Unable to get Basic tbl_regression()

Planning to run the following code and get a simple univariate table
lang2 <- glm(
langr52 ~ r9racehisp,
data = test,
family = binomial(link = "logit")
)
summary(lang2)
lang_tbl_1 <-
tbl_regression(
lang2
)
Then get the following error
There were 18 warnings (use warnings() to see them)"
appreciate guidance

Powershell script : Service now

I have got the response from the service now api
enter code here
$geturl = $ParentURL + "/table/sc_req_item?
sysparm_query=number="+$RITMNumber+"&sysparm_display_value=all&sysparm_fields=number,short_description,requested_for.first_name,requested_for.last_name,requested_for.user_name"
number : #{display_value=RITM2519394; value=RITMXXXX}
short_description : #{display_value=Login As ABC xyz on 19 Feb. Creating ticket for tracking purposes.; value=Login As ABC xyz on 19 Feb. Creating ticket for tracking purposes.}
requested_for.first_name : #{display_value=abc; value=abc}
requested_for.user_name : #{display_value=Exxxx; value=Exxxx}
requested_for.last_name : #{display_value=xyz; value=xyz}
I am able to display get the short description using $ShortDescription = $($response.result.short_description.value)
Login As ABC xyz on 19 Feb. Creating ticket for tracking purposes.
But when I m trying to get the requested for first name and last name I m getting blank
$RequestFor = $($response.result.requested_for.first_name)
could you please help me in sorting out

WSAEWOULDBLOCK 10035

I'm trying to make client-server connection, I don't know much about sockets etc. so I used github example for luajitsocket and im getting error "A non-blocking socket operation could not be completed immediately."
So I dont even know how can I fix that, that's why Im asking here
My code:
local port = 8080
local address = socket.find_first_address("*", port)
do -- server
local server = assert(socket.create("inet", "dgram", "udp"))
assert(server:set_blocking(false))
assert(server:bind(address))
print("hosting at ", address:get_ip(), address:get_port())
function update_server()
local data, addr = server:receive_from()
if data then
print(data)
assert(server:send_to(addr, "hello from server " .. os.clock()))
elseif addr ~= "timeout" then
error(addr)-- here
end
end
end
do -- client
local client = assert(socket.create("inet", "dgram", "udp"))
assert(client:set_blocking(false))
local next_send = 0
function update_client()
if next_send < os.clock() then
assert(client:send_to(address, "hello from client " .. os.clock()))
next_send = os.clock() + math.random() + 0.5
end
local data, addr = client:receive_from(address)
if data then
print(data, addr:get_ip(), addr:get_port())
elseif addr ~= "timeout" then
error(addr)
end
end
end
while true do
update_server()
update_client()
end
taken from: https://github.com/CapsAdmin/luajitsocket/blob/master/examples/udp_client_server.lua
I was looking about this error on google but can't find any working solution. Thanks in advance!
After set_blocking(false) that return code should not be considered abnormal.
You're probably getting it from receive_from(), which you should not be calling constantly, you should do it when select() or poll() tells you the socket has data waiting.

GAE Socket API error - ApplicationError: 4 Unknown error

We have an app engine cron that checks the liveness of a number of DNS servers using dnspython. It has been working without issue until [12/Nov/2014:13:28:12 -0800] (about 12 hours ago) where it started failing 100% of the time with the following:
DNS Lookup failed: 'ApplicationError: 4 Unknown error.'. Traceback (most recent call last):
File ".../handlers/tasks.py", line 150, in _checkDNSServer
answers = resolver.query(domain, 'A', source='')
File "lib/dns/resolver.py", line 830, in query
source_port=source_port)
File "lib/dns/query.py", line 213, in udp
s.bind(source)
File "/base/data/home/runtimes/python27/python27_dist/lib/python2.7/socket.py", line 222, in meth
return getattr(self._sock,name)(*args)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 660, in bind
self._CreateSocket(bind_address=address)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/remote_socket/_remote_socket.py", line 611, in _CreateSocket
raise _SystemExceptionFromAppError(e)
ApplicationError: ApplicationError: 4 Unknown error.
The code in question is fairly simple ...
def _checkDNSServer(self, ip):
""" Return true if the server is up and responds within 1 second.
False the server is down or responded slowly
"""
domain = 'www.testdomain.com'
resolver = dns.resolver.Resolver()
resolver.nameservers = [ip]
starttime = datetime.now()
try:
answers = resolver.query(domain, 'A', source='')
duration = datetime.now() - starttime
logging.debug("DNS Lookup Time %s" % duration)
# Max delay of 1 second
if duration > timedelta(seconds=1):
return False
return True
except Exception as e:
tb = traceback.format_exc()
logging.error("DNS Lookup failed: '%s'. %s", e, tb)
return False
the code continues to work on the local development server
billing is enabled
quota is sufficient
no changes to app engine release version (1.9.16) before/after the error appearing
target servers are live and responding ok
Suggestions?
Seems it was a transient issue and is now resolved.

inf2cat 22.9.10 error

I'm trying to sign old Hitachi driver that makes USB flash drive appear as fixed disk
(Quite useful when you have fast, large thumb drives)
Driver itself works fine but I constantly get same error when try to get it signed:
Errors:
22.9.10: cfadisk.sys in [cfadisk_copyfiles] is missing from [SourceDisksFiles] section in
\cfadisk.inf; driver may not sign correctly until this is resolved.
22.9.10: disk.sys in [gendisk_copyfiles] is missing from [SourceDisksFiles] section in
cfadisk.inf; driver may not sign correctly until this is resolved.
This is my .inf file:
[Version]
Signature="$Windows NT$"
Class=DiskDrive
ClassGuid={4D36E967-E325-11CE-BFC1-08002BE10318}
Provider=%HGST%
DriverVer=10/14/2012,9.9.9.9
CatalogFile=cfadisk.cat
[Manufacturer]
%HGST% = cfadisk_device,ntAMD64
[DestinationDirs]
cfadisk_copyfiles=12 ; %SystemRoot%\system32\drivers
gendisk_copyfiles=12 ; %SystemRoot%\system32\drivers
[cfadisk_copyfiles]
cfadisk.sys
[gendisk_copyfiles]
disk.sys
[cfadisk_device]
%Microdrive_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_SanDisk&Prod_Extreme&Rev_0001
[cfadisk_device.NTamd64]
%Microdrive_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_SanDisk&Prod_Extreme&Rev_0001
[cfadisk_addreg]
HKR,,"LowerFilters",0x00010008,"cfadisk"
[cfadisk_install]
CopyFiles=cfadisk_copyfiles,gendisk_copyfiles
[cfadisk_install.HW]
AddReg=cfadisk_addreg
[cfadisk_install.Services]
AddService=disk,2,gendisk_ServiceInstallSection
AddService=cfadisk,,cfadisk_ServiceInstallSection
[gendisk_ServiceInstallSection]
DisplayName = "Disk Driver"
ServiceType = 1
StartType = 0
ErrorControl = 1
ServiceBinary = %12%\disk.sys
LoadOrderGroup = SCSI Class
[cfadisk_ServiceInstallSection]
DisplayName = "CompactFlash Filter Driver"
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\cfadisk.sys
LoadOrderGroup = Pnp Filter
; -----------------------
[Strings]
HGST = "Hitachi"
Microdrive_devdesc = "SanDisk Extreme"
I was using this tutorial as reference point:
http://www.deploymentresearch.com/Blog/tabid/62/EntryId/63/Sign-your-unsigned-drivers-Damn-It.aspx
cfadisk.inf and sys can be downloaded here:
link is at the beginning of first post
http://hardforum.com/showthread.php?t=1655684
Any help would be greatly appreciated
EDIT:
I just used chkinf utility on this .inf file
Here is the output:
C:\DriversCert\SanDisk\cfadisk.inf: FAILED
NTLOG REPORT--------------
Total Lines: 62 |
Total Errors: 1 |
Total Warnings: 4 |
--------------------------
Line 0: ERROR: (E22.1.1003) Section [SourceDisksNames] not defined.
Line 0: WARNING: (W22.1.2212) No Copyright information found.
Line 0: WARNING: (W22.1.2111) [SourceDisksFiles] section not defined - full CopyFiles checking not done.
Line 17: WARNING: (W22.1.2112) File "cfadisk.sys" is not listed in the [SourceDisksFiles].
Line 20: WARNING: (W22.1.2112) File "disk.sys" is not listed in the [SourceDisksFiles].
I'm really no programer so I really don't understand what does all this mean.
Strange thing is that driver does work, I just can't get i signed.
Thank you!
Best regards,
Walter
It means that some sections are missed. In your case they are [SourceDisksFiles] and [SourceDisksNames]
In this specific situation you just should add:
[SourceDisksFiles]
cfadisk.sys = 1
disk.sys = 1
[SourceDisksNames]
1 = %DiskName%, ,
and also add a record to [String] section in the bottom:
DiskName="Disk Drive"