Skip to content

Instantly share code, notes, and snippets.

View cameronwlewis's full-sized avatar

Cameron Lewis cameronwlewis

View GitHub Profile
@codeas
codeas / gas-google-nlp.js
Created March 6, 2018 21:51
GAS Google NLP
/*
* Get sentiment from Google Cloud Natural Language API
*/
var getSentiment = function(text) {
var apiKey = PropertiesService.getScriptProperties().getProperty("apiKey")
var url = "https://language.googleapis.com/v1/documents:analyzeSentiment?key=%KEY".replace("%KEY", apiKey)
var data = {
document: {
language: "en-us",
@simoncos
simoncos / miniconda_on_rpi.md
Last active October 7, 2024 11:50
Install Miniconda 3 on Raspberry Pi
@dschep
dschep / raspbian-python3.6.rst
Last active November 14, 2024 11:22 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@giorgiofellipe
giorgiofellipe / install_psql_php.sh
Last active October 10, 2021 05:58 — forked from doole/install_psql_php.sh
Install PHP PGSQL extensions on Mac OS X Yosemite (change PHP_VER with your PHP version)
PHP_VER="5.5.14"
# Check if extension exists first
php -m | grep pgsql
# Update brew and install requirements
brew update
brew install autoconf
# Download PHP source and extract
@niksumeiko
niksumeiko / gslint.conf
Created April 7, 2014 10:53
Sample Closure Linter configuration file used within WebStorm IDE
--strict
--jsdoc
--summary
--beep
--check_html
--nomultiprocess
--debug_indentation
--time
@doole
doole / install_psql_php.sh
Last active September 21, 2023 19:12
Install PostgreSQL PHP extensions on Mac OS X
#!/bin/bash
# Install Xcode Command Line Tools first (required)
xcode-select --install
# Check PHP version `php --version`
PHP_VER=$(php -v | head -1 | awk '{ print $2 }')
# Extensions directory (default: empty string)
EXT_DIR=""
@twolfson
twolfson / README.md
Last active January 22, 2024 07:33
How Python modules are resolved

Python modules have 2 syntaxes for importing.

import x
from x import y

import x

Absolute imports are used for importing top-level modules and only top level modules. These are ones that are globally installed, either inside of Python core or via a package manager (e.g. pip).