Skip to content

Instantly share code, notes, and snippets.

View cristianvasquez's full-sized avatar
♠️

Cristian Vasquez cristianvasquez

♠️
View GitHub Profile
{
"@context": "http://schema.org",
"@type": "Event",
"name": "Miami Heat at Philadelphia 76ers - Game 3 (Home Game 1)",
"location": {
"@type": "Place",
"address": {
"@type": "PostalAddress",
"addressLocality": "Philadelphia",
"addressRegion": "PA"
@cristianvasquez
cristianvasquez / kanban_test.dart
Created December 24, 2019 11:53
Example of a drag and drop Kanban in Flutter
import 'dart:collection';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@cristianvasquez
cristianvasquez / home_screen.dart
Last active January 7, 2020 16:59
Random Image
class RandomPhoto extends StatelessWidget {
final String topic;
Map<int, Uri> visitedUrls;
RandomPhoto({Key key, this.topic, this.visitedUrls}) : super(key: key);
Future<Response> fetchPhoto() async {
String url = 'https://source.unsplash.com/random/?$topic';
return Dio().get(url, options: Options(responseType: ResponseType.bytes));
}
@cristianvasquez
cristianvasquez / using-tensorboard-in-google-colab.ipynb
Created June 3, 2020 00:49
Using tensorboard in google colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections
from runner.koan import *
# Greed is a dice game where you roll up to five dice to accumulate
# points. The following "score" function will be used calculate the
# score of a single roll of the dice.
@cristianvasquez
cristianvasquez / descripcion-datos-proceso-constituyente-abierto-a-la-ciudadan-a-2016.ipynb
Created October 2, 2020 13:57
Descripcion datos proceso Constituyente Abierto a la Ciudadanía (2016).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cristianvasquez
cristianvasquez / main.py
Created April 28, 2021 10:04
Opl hello world example
from flask import Flask, request
from flask_cors import CORS
####################################################################################
# config
####################################################################################
PORT = 5000
HOST = '127.0.0.1'
app = Flask(__name__)
@cristianvasquez
cristianvasquez / file_explorer.css
Created May 26, 2021 07:21
Pretty file explorer in obsidian
/* condense line spacing on file explorer title list. also avoids character-level word breaks */
.nav-file-title-content,
.search-result-file-title,
.search-result-file-match {
padding-top: 0 !important;
padding-bottom: 0 !important;
line-height: normal !important;
word-break: keep-all;
}
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .
schema:Person a rdfs:Class, sh:NodeShape ;
sh:property [
sh:maxCount 1 ;
sh:minCount 1 ;
@cristianvasquez
cristianvasquez / notes.11tydata.js
Created November 15, 2021 05:39
Process notes in the garden
// This regex finds all wikilinks in a string
const wikilinkRegExp = /\[\[\s?([^\[\]\|\n\r]+)(\|[^\[\]\|\n\r]+)?\s?\]\]/g;
function caselessCompare(a, b) {
return a.toLowerCase() === b.toLowerCase();
}
var SMALL_WORDS =
/\b(?:an?d?|a[st]|because|but|by|en|for|i[fn]|neither|nor|o[fnr]|only|over|per|so|some|tha[tn]|the|to|up|upon|vs?\.?|versus|via|when|with|without|yet)\b/i;
var TOKENS = /[^\s:–—-]+|./g;