Skip to content

Instantly share code, notes, and snippets.

@adl1995
adl1995 / fetch-google-maps.py
Last active May 30, 2024 23:34
A Python script for fetching a JSON list of points of interests using the Google Maps Places API and writing them to a CSV file. Example query "things to do split".
#!/usr/bin/env python
import csv
import json
import requests
import argparse
# Add parameter for the search query.
parser = argparse.ArgumentParser()
parser.add_argument('query', type=str, help='Search query for Google Maps API')
args = parser.parse_args()
@adl1995
adl1995 / Makefile
Created August 1, 2018 11:40
This Makefile is associated with running the benchmark tests for Boost Geometry.
all: karney1 karney2 karney3 karney4 karney5 karney6 karney7 karney8 vincenty thomas1 thomas2
run:
@ ./build/karney_direct_1
@ ./build/karney_direct_2
@ ./build/karney_direct_3
@ ./build/karney_direct_4
@ ./build/karney_direct_5
@ ./build/karney_direct_6
@ ./build/karney_direct_7
#include <iostream>
#include <fstream>
#include <numeric>
#include <boost/chrono.hpp>
#include <boost/geometry.hpp>
using namespace boost::chrono;
using namespace boost::geometry;
int main() {
/home/adeel/boost/libs/predef/check/../tools/check/predef.jam:46: Unescaped special character in argument $(language)::$(expression)
Performing configuration checks
- default address-model : 64-bit (cached)
- default architecture : x86 (cached)
- symlinks supported : yes (cached)
...patience...
...patience...
...found 4358 targets...
...updating 4 targets...
running test
running build
running build_py
creating build/lib.linux-x86_64-3.4
creating build/lib.linux-x86_64-3.4/hips
copying hips/conftest.py -> build/lib.linux-x86_64-3.4/hips
copying hips/version.py -> build/lib.linux-x86_64-3.4/hips
copying hips/_astropy_init.py -> build/lib.linux-x86_64-3.4/hips
copying hips/__init__.py -> build/lib.linux-x86_64-3.4/hips
creating build/lib.linux-x86_64-3.4/hips/draw
* Hostname was found in DNS cache
* Trying 34.204.165.116...
* Connected to api.smartling.com (34.204.165.116) port 443 (#4)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSL connection using ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: OU=Domain Control Validated; CN=*.smartling.com
* start date: 2016-05-04 20:06:40 GMT
* Hostname was found in DNS cache
* Trying 34.204.165.116...
* Connected to api.smartling.com (34.204.165.116) port 443 (#8)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSL connection using ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: OU=Domain Control Validated; CN=*.smartling.com
* start date: 2016-05-04 20:06:40 GMT
/*
* XPM image format
*
* Copyright (c) 2012 Paul B Mahol
*
* This file is part of FFmpeg.
*
* FFmpeg 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
diff --git a/libavcodec/xpmdec.c b/libavcodec/xpmdec.c
index f4a0e90..ccef24c 100644
--- a/libavcodec/xpmdec.c
+++ b/libavcodec/xpmdec.c
@@ -23,8 +23,10 @@
#include "libavutil/parseutils.h"
#include "avcodec.h"
+
typedef struct XPMContext {