Skip to content

Instantly share code, notes, and snippets.

View gabidavila's full-sized avatar
💁‍♀️
I try to solve all my problems with a single SQL query.

Gabriela Ferrara gabidavila

💁‍♀️
I try to solve all my problems with a single SQL query.
View GitHub Profile

All about database

Because you know I am all about database
database, database, but no trigger (4x)

I am about database, base, base

Yeah it ain't clear
This font is size 2
@gabidavila
gabidavila / _introduction.md
Last active April 11, 2019 17:32
Determines if a positive integer is a palindrome mathematically

Using Math to find palindromes

For an instance, forget that arrays and strings exists. Your challenge, is to say if a number is a palindrome or not using mostly mathematical approach.

The string you will receive (because it is an user input), it always positive. You can assume that every 0 <= n < 10 is a palindrome.

Connection string for JDBC driver on DataGrip

jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId={project:param};OAuthType=0;OAuthServiceAcctEmail={email:param};OAuthPvtKeyPath={secret:param}
@gabidavila
gabidavila / git_file_permission.sh
Created November 3, 2013 21:13
Ignorar alteração de permissões de arquivos no GIT Ignore file permissions change on GIT
git config core.fileMode false
/**
* Responds to any HTTP request that can provide a "message" field in the body.
*
* @param {!Object} req Cloud Function request context.
* @param {!Object} res Cloud Function response context.
*/
const options = {
host: "your ip address",
port: 33060,
password: "your password",
const mysqlx = require('@mysql/xdevapi');
const options = require('./config')
mysqlx.getSession(options)
.then((session) => {
const db = session.getSchema("worldcup");
let teamsCollection = db.getCollection("teams_2018");
return teamsCollection.find("name = :country1 OR name = :country2")
.bind("country1", "Brazil")
.bind("country2", "England")
const mysqlx = require('@mysql/xdevapi');
const options = require('./config')
mysqlx.getSession(options)
.then((session) => {
const db = session.getSchema("worldcup");
const tableTeams = db.getTable("teams");
return tableTeams;
})
[
4,
"Brazil ",
{
"players": [{
"id": 70,
"dob": "05.03.1993",
"club": "FC Shakhtar Donetsk (UKR)",
"name": "FRED",
"height": 169,
DESCRIBE `users`;
-- +-------------+--------------+------+-----+-------------------+-----------------------------+
-- | Field | Type | Null | Key | Default | Extra |
-- +-------------+--------------+------+-----+-------------------+-----------------------------+
-- | id | int(11) | NO | PRI | NULL | auto_increment |
-- | id_str | varchar(255) | NO | UNI | NULL | |
-- | screen_name | varchar(255) | NO | MUL | NULL | |
-- | response | json | NO | | NULL | |
-- | created_at | datetime | NO | | CURRENT_TIMESTAMP | |

Machine Learning APIs by example: an API call to rule them all

Think your business could make use of Google's machine learning expertise when it comes to powering and improving your business applications, but do you get stuck on building and training your own custom model? While a few cloud providers offer pre-trained models, Google Cloud Platform (GCP) offers five APIs: Google Cloud Vision API, Cloud Speech API, Cloud Natural Language API, Cloud Translation API and Cloud Video API. In this session you will see how with a single API call you can enrich your application through code and live demo.