Skip to content

Instantly share code, notes, and snippets.

@malexandersalazar
malexandersalazar / AddFace_Train.cs
Last active April 3, 2019 06:09
[Cognitive Services] Extendiendo Face API SDK para LargeFaceList
var added = await faceServiceClient.AddFaceToLargeFaceListAsync("myLargeFaceListId", "https://reachsos.com/images/myimage.jpg");
var requestSent = await faceServiceClient.TrainLargeFaceListAsync("myLargeFaceListId");
@malexandersalazar
malexandersalazar / jupyter-python-example.py
Last active January 30, 2019 04:08
[Azure Machine Learning] Resúmenes multivariados y visualización personalizada de distribución de datos
from azureml import Workspace
ws = Workspace()
experiment = ws.experiments['8d01cec3699a425d8d6b631743ed52b2.f-id.c59845529c724f298a759fdbd8261777']
ds = experiment.get_intermediate_dataset(
node_id='377c5ba5-78ee-4beb-80b6-91c621f7e2fb-7183',
port_name='Results dataset',
data_type_id='GenericCSV'
)
frame = ds.to_dataframe()
@malexandersalazar
malexandersalazar / datasets.adult_1.sql
Last active January 9, 2019 07:58
[Azure Machine Learning] Importar/Exportar datos con SQL Azure y bases de datos locales
create schema datasets
go
create table datasets.adult(
age varchar(max) null,
workclass varchar(max) null,
fnlwgt varchar(max) null,
education varchar(max) null,
education_num varchar(max) null,
marital_status varchar(max) null,
@malexandersalazar
malexandersalazar / MainWindow.xaml
Last active November 15, 2018 03:12
[Cognitive Services] Face API - ¿Qué héroe de MARVEL eres?
<Window x:Class="CharacterLikeness.Desktop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="850">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
@malexandersalazar
malexandersalazar / CNMAudioItem.cs
Last active September 15, 2018 04:16
Hoy se cumple exactamente un mes desde que empezó la difusión de conversaciones que revelarían presuntos delitos de corrupción. Probablemente existan más de 20 mil audios ¿Podría la Inteligencia Artificial ayudarnos a transcribirlos, clasificarlos y relacionarlos?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace ES.SpeechToText.CNMAudios.Classes
{
public class CNMAudioItem : INotifyPropertyChanged
{
public string Code { get; set; }
@malexandersalazar
malexandersalazar / FaceLandmarks.cs
Last active April 21, 2018 15:43
GAB2018 Faces Demo
public class FaceLandmarks
{
public FaceLandmarks();
public FeatureCoordinate UpperLipBottom { get; set; }
public FeatureCoordinate UpperLipTop { get; set; }
public FeatureCoordinate NoseRightAlarOutTip { get; set; }
public FeatureCoordinate NoseLeftAlarOutTip { get; set; }
public FeatureCoordinate NoseRightAlarTop { get; set; }
public FeatureCoordinate NoseLeftAlarTop { get; set; }
@malexandersalazar
malexandersalazar / MainActivity.cs
Last active March 30, 2018 04:45
[Xamarin] Usando Mapbox en Xamarin.Android
using Android.App;
using Android.OS;
using Com.Mapbox.Mapboxsdk;
using Com.Mapbox.Mapboxsdk.Maps;
namespace App3
{
[Activity(Label = "App3", MainLauncher = true)]
public class MainActivity : Activity, IOnMapReadyCallback
{
@malexandersalazar
malexandersalazar / III_IRepository.cs
Created March 29, 2018 21:36
[.NET] Entendiendo el Patrón de Repositorio
namespace RepPattern.Repository
{
public interface IRepository<T>
{
void Create(T entity);
List<T> ReadAll();
T Find(int id);
@malexandersalazar
malexandersalazar / EntitiesController_v1.cs
Created March 28, 2018 22:06
[.NET] ¿Cómo trabajar async con Enterprise Library?
using AEL.Api.Entities;
using AEL.Api.Repositories;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
namespace AEL.Api.Controllers
{
public class EntitiesController : ApiController
{
@malexandersalazar
malexandersalazar / Program1.cs
Last active March 26, 2018 01:21
[.NET] ¡No hagan Dispose() en HttpClient!
using System;
using System.Net.Http;
namespace HttpClientExample
{
internal class Program
{
private static void Main(string[] args)
{
UsingDisposable();