Skip to content

Instantly share code, notes, and snippets.

View FernandoCutire's full-sized avatar
🙌
Just do it !

Fernando Cutire FernandoCutire

🙌
Just do it !
View GitHub Profile
@FernandoCutire
FernandoCutire / Readme.md
Last active July 18, 2024 18:55
Repositorio del Proyecto del Sistema Instucional de Investigación Científica (SIIC)

Plataforma SIIC

Repositorio del Proyecto del Sistema Instucional de Investigación Científica (SIIC)

SIC inicial

@FernandoCutire
FernandoCutire / CreateUser.sql
Last active July 18, 2024 19:22
Drop user and create a new one
drop user admin@localhost;
flush privileges;
create user admin@localhost identified by 'admins_password'
@FernandoCutire
FernandoCutire / SIC_DBDB
Last active March 7, 2022 16:33
El código presentado por Francisco en mi reunión de team para la plataforma SIC. Se recomienda correrlo en un entorno SQLServer y poder visualizar las tablas
This file has been truncated, but you can view the full file.
-- phpMyAdmin SQL Dump
-- version 5.1.2
-- https://www.phpmyadmin.net/
--
-- Host: mysql.investigadores.utp.ac.pa
-- Generation Time: Mar 03, 2022 at 07:27 PM
-- Server version: 8.0.26-0ubuntu0.20.04.3
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
Run the XAMPP or any server on your system, open PHPMYADMIN or database, create the database named with homestead type utf8_general_ci.
Pull or download the Laravel project from Git.
On the Laravel project package, you can see the .enc.example file which is inside your root directory. Rename .env.example file to. .envSo, open a command prompt and write the following command mv .env.example .env.
Open the console and cd to the root directory of your project.
Run composer install or php composer.phar install.
Run php artisan key:generate
Run php artisan migrate
Run php artisan db:seed run seeders, if any.
Run php artisan serve.

terminator keyboard shortcuts

When connecting to multiple (i.e. > 4) servers to dive into logfiles or do security updates, terminator is what you want. There are several keyboard shortcuts available:

Ctrl-Shift-E: Split the view vertically.
Ctrl-Shift-O: Split the view horizontally.
Ctrl-Shift-P: Focus be active on the previous view.
Ctrl-Shift-N: Focus be active on the next view.
Ctrl-Shift-W: Close the view where the focus is on.
import weka.core.converters.ConverterUtils.DataSource;
...
DataSource source = new DataSource("/some/where/data.arff");
Instances data = source.getDataSet();
// setting class attribute if the data format does not provide this information
// For example, the XRFF format saves the class attribute information as well
if (data.classIndex() == -1)
data.setClassIndex(data.numAttributes() - 1);
Try to disable the branch protection in the settings/repository page. Check the sections Default Branch and Protected Branches
After that:
Checkout the branch locally.
$ git checkout branch
Rename it locally
$ git checkout -b branch_old
delete remote branch
$ git push --delete origin branch

Search your lost commits

$ git fsck --lost-found [... some blobs omitted ...] dangling commit 7c61179cbe51c050c5520b4399f7b14eec943754

Get back the commits

git reflog

def solution(A):
#Get rid of all zero and negative #'s
A = [i for i in A if i > 0]
#At this point, if there were only zero, negative, or combination of both, the answer is 1
if (len(A) == 0): return 1
count = 1
#Get rid of repeating values
A = set(A)
#At this point, we may have only had the same # repeated.
#If repeated 1's answer is 2

Run a docker container

Run the container with volume and network

Remember to create the network first

docker network create db