Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Francis Gonzales FraGoTe

🏠
Working from home
View GitHub Profile
@FraGoTe
FraGoTe / mysql-docker.sh
Created Aug 18, 2020 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
View Dockerfile
FROM php:7.2-apache
RUN apt-get update \
&& apt-get install -y vim \
&& apt-get install -y git zlib1g-dev \
&& apt-get install -y libxml2-dev \
&& apt-get install -y libpng-dev
# Getting
WORKDIR /var/www/
View docker-compose.yml
# Use root/example as user/password credentials
# docker-compose up
version: '3.1'
services:
adminer:
image: adminer
restart: always
ports:
- 8099:8080
View TrabajoMineria.R
install.packages("readxl")
library("readxl")
data <- read_excel("BASE_ALERTAS_2.xlsx",sheet=2)
table(data$TARGET)
#Se elimina la columna del codigo del cliente
data$ID_CLIENTE <- NULL
#Se eliminan las columnas que contienen valores en 0
View test
<?php
/**
* Generar nuevo documentos
*
* @param serviceLocator $serviceLocator
* @param string $preDocumento
* @param string $nroDocumento
* @param string $rucEmpresa
* @param string $razEmpresa
View RestClient.php
<?php
$technorati = new Zend_Rest_Client('http://api.technorati.com/bloginfo');
$technorati->key($key);
$technorati->url('http://pixelated-dreams.com');
$result = $technorati->get();
echo $result->firstname() .' '. $result->lastname();
$technorati->getHttpClient()->setHeaders(
array('user' => 'uewirydjfhkjds22VVhdhZhd',
View restClient.php
<?php
$client = new Zend_Http_Client();
$client->setMethod(Zend_Http_Client::POST);
$client->setUri('http://www.example.com/api/type/');
$client->setParameterPost(array(
'useremail' => '******@*****.***',
'apikey' => 'secretkey',
'description' => 'TEST WEB API',
'amount' => '5000.00'
View demourp.cpp
#include <iostream>
using std::cout;
using std::endl;
class Increment {
public:
Increment( int c = 0, int i = 1 ); // default constructor
View polimorfismo.cpp
#include <iostream>
#include <string>
using namespace std;
class Mascota
{
public:
Mascota(string nombre, int patas);
string hablar();
View polimorfismo.cpp
#include<iostream>
#include <math.h>
using namespace std;
class Figura {
private:
float base;
float altura;
public:
void captura();