Skip to content

Instantly share code, notes, and snippets.

View alculquicondor's full-sized avatar

Aldo Culquicondor alculquicondor

View GitHub Profile
@alculquicondor
alculquicondor / docker-compose.yml
Created September 23, 2017 03:15
Hadoop skeleton
version: '3'
services:
hdfs_namenode:
image: uhopper/hadoop-namenode:2.7.2
volumes:
- hdfs_name:/hadoop/dfs/name
ports:
- "50070:50070" # webui
local counter = {
['npc_dota_hero_abaddon'] = 'npc_dota_hero_axe',
['npc_dota_hero_alchemist'] = 'npc_dota_hero_clinkz',
['npc_dota_hero_ancient_apparition'] = 'npc_dota_hero_venomancer',
['npc_dota_hero_ancient_antimage'] = 'npc_dota_hero_riki',
['npc_dota_hero_axe'] = 'npc_dota_hero_necrolyte',
['npc_dota_hero_bane'] = 'npc_dota_hero_necrolyte',
['npc_dota_hero_batrider'] = 'npc_dota_hero_disruption',
['npc_dota_hero_beastmaster'] = 'npc_dota_hero_death_prophet',
['npc_dota_hero_bloodseeker'] = 'npc_dota_hero_lone_druid',
{
"schema": [
{
"name": "text_0",
"alias": "text 0",
"default": null,
"nullable": true,
"editable": true,
"visible": true,
"type": "string"
from amigocloud import AmigoCloud
amigocloud = AmigoCloud(
token='A:qPy3PfGAfWlV7lLPcIOQAZXauyr4WOG4t3sFyt',
base_url='http://localhost')
f = open('/home/alculquicondor/amigo/doc/desa.png', 'rb')
amigocloud.upload_file('', 'related_tables/20/chunked_upload', file_obj=f,
extra_data={'source_amigo_id': '19a781b5ec534171a1f73fc76e28a67f', 'filename': 'something.png'})
@alculquicondor
alculquicondor / Main.java
Created November 26, 2016 03:16
Solución del problema del CEP2016: "Chusky y el juego de las Murallas"
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
{
"dataset_89": {
"from": "3ada9beb942e10e9fb38775ad97752fd",
"to": null
},
"dataset_88": {
"from": "5a78e2ecfec79c401e6b03c43b5db4bf",
"to": null
},
"dataset_85": {
\documentclass[a4paper,openany,12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{ae}
\usepackage[headheight=27.2pt,left=2.5cm,right=2.5cm,top=3cm,bottom=2cm]{geometry}
\usepackage[printonlyused]{acronym}
\usepackage{xspace}
\usepackage{tesis}
\usepackage{setspace}
[
{
"name": "stored_value",
"alias": "stored value",
"nullable": false,
"editable": true,
"visible": true,
"type": "string",
"picklist": {
"id": 1235,
CREATE (Aldo:Person {name: "Aldo"}),
(Eileen:Person {name: "Eileen"}),
(Javier:Person {name: "Javier"}),
(Adolfo:Person {name: "Adolfo"}),
(Jose:Person {name: "Jose"}),
(Aldo)-[:follows]->(Adolfo),
(Eileen)-[:follows]->(Jose)-[:follows]->(Javier),
(Eileen)-[:follows]->(Javier),
(Adolfo)-[:follows]->(Jose)-[:follows]->(Adolfo),
@alculquicondor
alculquicondor / letter.py
Last active November 24, 2016 18:29
Scripts for converting to OPF format
fi = open('letter-recognition.data')
fo = open('letter.txt', 'w')
fo.write('20000 26 16\n')
for i, line in enumerate(fi):
line = line.strip().split(',')
line[0] = str(int(ord(line[0]) - 64))
line = [str(i)] + line
fo.write(' '.join(line) + '\n')