Skip to content

Instantly share code, notes, and snippets.

View ADCDS's full-sized avatar
🥒
afiando a mandioca

Adriel Santos ADCDS

🥒
afiando a mandioca
View GitHub Profile
@ADCDS
ADCDS / designer.html
Created April 17, 2015 14:51
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
group: Exercicio1
PACIENTE = {
idPaciente:number, nomePaciente:string, cidade:string
1,"João da Silva","Alfenas"
2,"Rita Duarte","Lavras"
3,"Marcos Costa","Belo Horizonte"
4,"Lara Campos","São Paulo"
}
group: exericicios_slide2
agencia = {
nome_agencia:string, cidade_agencia:string, ativo:number
}
cliente = {
nome_cliente:string, rua_cliente:string, cidade_cliente:string
}
@ADCDS
ADCDS / jquery-datatables-webpack
Created March 25, 2017 17:28 — forked from obonyojimmy/jquery-datatables-webpack
DataTables.net with webpack
Here's how to make jQuery DataTables work with npm and webpack. This is the simplest way I found to do it.
See the previous revision of this gist for a way to do it with forcing AMD to be disabled if you need that.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-dt
Then to initialize DT in your app, do this in your main entry point:
// you can use import or require
import dt from 'datatables.net';
@ADCDS
ADCDS / multiProcessingGraph.py
Last active April 25, 2017 12:56
Dijkstar python package: Shared memory graph
# https://pypi.python.org/pypi/Dijkstar
from dijkstar import Graph, find_path
from multiprocessing import Process, Manager
import collections
manager = Manager()
class GraphProxy(Graph):
def __init__(self, data=None):
# replaces default _data and _incoming attributes to a equivalent object (dict), but in shared memory
@ADCDS
ADCDS / convert_to_string_map.cpp
Created April 26, 2017 17:19
Generic Map to String Map (convert_to_string_map) c++
#include <stdio.h>
#include <stdlib.h>
#include <map>
#include <functional>
#include <string>
#include <iostream>
template <typename T1, typename T2>
static std::map<std::string, std::string> convert_to_string_map(std::map<T1, T2> _map_in,
std::function<std::pair<std::string, std::string>(T1, T2) > converter) {
@ADCDS
ADCDS / kmeansExample.py
Created May 29, 2017 14:17 — forked from iandanforth/kmeansExample.py
A pure python implementation of K-Means clustering. Optional cluster visualization using plot.ly.
#############################################################################
# Full Imports
import math
import random
"""
This is a pure Python implementation of the K-Means Clustering algorithmn. The
original can be found here:
http://pandoricweb.tumblr.com/post/8646701677/python-implementation-of-the-k-means-clustering
@ADCDS
ADCDS / kmeans.py
Created May 29, 2017 14:17 — forked from mblondel/kmeans.py
Fuzzy K-means and K-medians
# Copyright Mathieu Blondel December 2011
# License: BSD 3 clause
import numpy as np
import pylab as pl
from sklearn.base import BaseEstimator
from sklearn.utils import check_random_state
from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import KMeans as KMeansGood
@ADCDS
ADCDS / index.html
Created July 10, 2017 15:13
Simple client
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<button id="login">Login</button>
<div id="fb-root"></div>
<script type="text/javascript" src="main.js"></script>
@ADCDS
ADCDS / data.php
Created August 2, 2017 23:17 — forked from jjb3rd/data.php
An updated server-side processing script for DataTables
<?php
/*
* Script: DataTables server-side script for PHP and MySQL
* Copyright: 2012 - John Becker, Beckersoft, Inc.
* Copyright: 2010 - Allan Jardine
* License: GPL v2 or BSD (3-point)
*/
class TableData {