Skip to content

Instantly share code, notes, and snippets.

View martimatix's full-sized avatar

Mario Martinez martimatix

View GitHub Profile
import pandas as pd
import matplotlib.pyplot as plt
import json
from io import StringIO
# Read the JSON file
with open('your_file.json', 'r') as file:
data = file.read()
# Convert the JSON data to a pandas DataFrame
@martimatix
martimatix / .vimrc
Last active May 6, 2020 14:43
.vimrc
syntax on
set hidden
set noerrorbells
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set nu
set nowrap
@martimatix
martimatix / Elm_Syd_May_2019.md
Last active March 24, 2020 10:52
Elm Presentation - Compiler Error Messages

Elm Syd May 2019


News


@martimatix
martimatix / updated_at.sql
Created March 25, 2019 12:01
Hasura Gists
-- This will automatically update the `updated_at` column on the table `category`
CREATE OR REPLACE FUNCTION update_modified_column()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = now();
RETURN NEW;
END;
$$ language 'plpgsql';
@martimatix
martimatix / cargo.toml
Last active March 16, 2019 11:22
Rust SIG
[package]
name = "webservice"
version = "0.1.0"
authors = ["Mario Martinez <[email protected]>"]
edition = "2018"
[dependencies]
rocket = "0.4.0"
perfect_numbers = { path = "../perfect-numbers" }
@martimatix
martimatix / Main.elm
Last active August 2, 2018 21:46
Optional arguments with Graphqelm
module Main exposing (main)
import Graphqelm.Operation exposing (RootQuery)
import Graphqelm.Http
import Graphqelm.SelectionSet exposing (SelectionSet, with)
import Html exposing (Html, a, div, h1, h2, p, pre, text, img)
import Html.Attributes exposing (src)
import RemoteData exposing (RemoteData)
import Github.Object
import Github.Object.User as User
@martimatix
martimatix / atom.cson
Created June 4, 2018 11:12
atom shortcuts
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
#!/bin/bash
echo "determining branch"
branch=`git branch | sed -e s/^\.\ // | grep $1`
echo "checking out $branch"
git checkout $branch
@martimatix
martimatix / Main.elm
Last active November 23, 2018 08:35
A beginner's guide to Graphqelm
module Main exposing (main)
import Graphqelm.Operation exposing (RootQuery)
import Graphqelm.Http
import Graphqelm.SelectionSet exposing (SelectionSet, with)
import Html exposing (Html, a, div, h1, h2, p, pre, text)
import RemoteData exposing (RemoteData)
import Github.Object
import Github.Object.User as User
import Github.Query as Query
# Path to your oh-my-zsh installation.
export ZSH=/Users/martimatix/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
plugins=(git)