Skip to content

Instantly share code, notes, and snippets.

View edgrcas's full-sized avatar
🎯
Focusing

Edgar Castañeda edgrcas

🎯
Focusing
View GitHub Profile
@edgrcas
edgrcas / azure-pipelines.yml
Created April 5, 2021 05:00
Azure Devops Docker Example
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- develop
- release/*
- main
resources:
@edgrcas
edgrcas / Email Signature Logos
Created November 13, 2018 04:43
Email Signature Logos
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Email Signature</TITLE>
<META content="text/html; charset=utf-8" http-equiv="Content-Type">
</HEAD>
<BODY style="font-size: 10pt; font-family: Arial, sans-serif;">
<table style="width: 515px; font-size: 10pt; font-family: Arial, sans-serif;" cellpadding="0" cellspacing="0">
@edgrcas
edgrcas / ssh.conf
Created October 26, 2018 17:09
Multiples Identities Git
# touch ~/.ssh/config
#therajanmaurya account
Host github.com-therajanmaurya
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
#example account
Host github-example
HostName github.com
@edgrcas
edgrcas / perceptron.py
Last active December 14, 2021 14:52
Simple Perceptron Python
import numpy as np
class Perceptron:
"""Clasificador Perceptron basado en la descripción del libro
"Python Machine Learning" de Sebastian Raschka.
Parametros
----------
eta: float
@edgrcas
edgrcas / store sentiment classifier.py
Last active August 4, 2020 17:57 — forked from Azure-rong/store sentiment classifier.py
Sentiment probability score feature (sentiment analysis)
#! /usr/bin/env python2.7
#coding=utf-8
"""
Use positive and negative review set as corpus to train a sentiment classifier.
This module use labeled positive and negative reviews as training set, then use nltk scikit-learn api to do classification task.
Aim to train a classifier automatically identifiy review's positive or negative sentiment, and use the probability as review helpfulness feature.
"""
@edgrcas
edgrcas / db.sh
Created December 23, 2015 20:02
Mysql Restore and Backup Database
#Backup
mysqldump --opt -u root -p acffaa > acffaa.sql
#Retore
mysql -u root -p acffaa < acffaa.sql
@edgrcas
edgrcas / console.php
Created December 9, 2015 21:44
Doctrine Console in Silex
<?php
set_time_limit(0);
require_once __DIR__ . '/../vendor/autoload.php';
use Knp\Provider\ConsoleServiceProvider;
use ORM\Provider\DoctrineORMServiceProvider;
$app = new Silex\Application();
@edgrcas
edgrcas / gist:9fdcf1d7c3c0c03b0704
Created November 17, 2015 19:38 — forked from jansanchez/gist:8531593
generar archivo comprimido .tar.gz incluyendo sus rutas de acceso

Comprimir archivos incluyendo sus rutas de acceso

Compress

tar -zcvf nombreDelArchivo.tar.gz public/js/modules/all.js frontend/js/application/yoson.js

UnCompress

#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
@edgrcas
edgrcas / .screenlayout
Created July 30, 2015 19:11
Forzar Dimension de Monitor Incluyendo Hertz
sudo xrandr --newmode "1280x1024_60.00" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync Vsync
xrandr --addmode DVI-0 "1280x1024_60.00"