Skip to content

Instantly share code, notes, and snippets.

View RoCampos's full-sized avatar

Romerito Campos RoCampos

View GitHub Profile
@RoCampos
RoCampos / SetupCommand.php
Created October 13, 2022 13:17
Simple setup command for laravel application. Set up sqlite as the database, apply migration, set .env file.
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
class SetupCommand extends Command
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:yyRmjov+aDaPj88S9RN0a3Vq6c36sVID7rFpbVOW7+k=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=sqlite
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Star Admin Free Bootstrap Admin Dashboard Template</title>
<!-- plugins:css -->
<link rel="stylesheet" href="vendors/iconfonts/mdi/css/materialdesignicons.min.css">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
@RoCampos
RoCampos / arquivo.txt
Created April 26, 2018 14:00
Atividade
O professor Romerito está desenvolvendo um projeto para a disciplina de Banco de Dados e Projeto Web. O projeto consiste em gerar atas digitais com as informações de uma reunião. A ata deve conter assunto, data de realização, responsável. Observe-se que uma ata pode ter muitos encaminhamentos. Cada encaminhamento consiste em um assunto, um responsável e uma tarefa. Observe que o responsável pela tarefa do encaminhamento é um aluno. Um professor precisa ter as seguintes informações: nome, matrícula, formação e titulação. Um aluno deve conter as seguintes informações: nome, cpf, matrícula e curso. Por fim, as atas estão associadas a um projeto. O projeto deve conter um nome, e responsável (orientador).
Considere que aluno e professor são pessoas. Crie uma classe Pessoa e use herança para criar as classes Aluno e Pessoa.
Escreva um teste para cada uma das classes
@RoCampos
RoCampos / jupyter.sh
Last active April 14, 2018 16:13
# Instaling Jupyter-php on MAC
# PROBLEM
# ext-zmq * -> the requested PHP extension zmq is missing from your system
#installing autoconf - in my case it was not installed
brew install autoconf
#installing zmq
,"cross0","cross1","cross2","cross3","gde","moead","nsga","plasmid0","plasmid1","plasmid2","plasmid3","sms","ssnsga"
1,0.125,0.1948934865,0.166666667,0.208333333,0.1319162975,0.25,0.25,0.1875,0.145833334,0.25,0.166666667,0.229166667,0.2350480725
2,0.1409527515,0.2633831055,0.147058824,0.2427810525,0.1926299415,0.285714286,0.285714286,0.148576541,0.2043056695,0.228706636,0.1791944705,0.254271522,0.262395643
3,0.1248762375,0.270866052,0.156862745,0.191726414,0.1628997385,0.25,0.235294117,0.1636367895,0.25,0.196078431,0.156862745,0.215686275,0.21728891
4,0.118937971,0.2750263705,0.142857143,0.2055494095,0.161851347,0.2142857145,0.2228253885,0.166666666,0.2256811345,0.226190476,0.142857143,0.190476191,0.1947824745
5,0.166092746,0.2861283285,0.195121951,0.195121951,0.214818641,0.25,0.219512195,0.1466326235,0.195121951,0.219512195,0.170731707,0.196496212,0.1967632255
6,0.1539432395,0.2444967485,0.136023559,0.2258721065,0.195842998,0.25,0.25,0.183290126,0.25,0.25,0.125,0.25,0.25
7,0.1814734395,0.250833359,0.15982140
@RoCampos
RoCampos / network020-median-A.csv
Last active March 12, 2018 14:51
csvfile example
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 14 columns, instead of 4 in line 7.
,"cross0","cross1","cross2","cross3","gde","moead","nsga","plasmid0","plasmid1","plasmid2","plasmid3","sms","ssnsga"
1,0.125,0.1948934865,0.166666667,0.208333333,0.1319162975,0.25,0.25,0.1875,0.145833334,0.25,0.166666667,0.229166667,0.2350480725
2,0.1409527515,0.2633831055,0.147058824,0.2427810525,0.1926299415,0.285714286,0.285714286,0.148576541,0.2043056695,0.228706636,0.1791944705,0.254271522,0.262395643
3,0.1248762375,0.270866052,0.156862745,0.191726414,0.1628997385,0.25,0.235294117,0.1636367895,0.25,0.196078431,0.156862745,0.215686275,0.21728891
4,0.118937971,0.2750263705,0.142857143,0.2055494095,0.161851347,0.2142857145,0.2228253885,0.166666666,0.2256811345,0.226190476,0.142857143,0.190476191,0.1947824745
5,0.166092746,0.2861283285,0.195121951,0.195121951,0.214818641,0.25,0.219512195,0.1466326235,0.195121951,0.219512195,0.170731707,0.196496212,0.1967632255
6,0.1539432395,0.2444967485,0.136023559,0.2258721065,0.195842998,0.25,0.25,0.183290126,0.25,0.25,0.125,0.25,0.25
7,0.1814734395,0.250833359,0.15982140
@RoCampos
RoCampos / instruments.md
Last active February 12, 2018 23:06
instruments on command line

Instruments Call on Command Line.

instruments -t <arguments...>

Example

instruments -t "Time Profiler" ./bin/main/MOTA_main MMRP multi_50_100_01.brite 90 300 5 6 0.5 0.5 0 - - cross

@RoCampos
RoCampos / chen.mod
Created April 26, 2017 19:39
Implementation of the model proposed by Chen, Radhakrishnan, Dhall and Karabuk
set V;
set A dimen 2;
set W;
# set of members, pairs (k, node) k=group node=member
set MEMBER dimen 2;
set SOURCE dimen 2;
# set of members, return a group of nodes where k is the index
set MGROUPS{k in W} := {i in V: (k,i) in MEMBER};