Skip to content

Instantly share code, notes, and snippets.

View Dssdiego's full-sized avatar
🦄

Diego Santos Seabra Dssdiego

🦄
View GitHub Profile
svn merge -rREV1:REV2 BRANCH TRUNK
REV1 : Primeira Revisão
REV2 : Última Revisão
BRANCH : Diretório do Branch
TRUNK : Diretório do Trunk
@Dssdiego
Dssdiego / read_csv.py
Last active April 15, 2018 18:02
Read csv with pandas
df = pd.read_csv('data.csv')
# Deletes the Name Column
del df['name']
@Dssdiego
Dssdiego / replace.py
Last active April 24, 2018 11:18
Useful to replace text with boolean value for A.I. code
# Replaces Male -> 0
df['sex'] = df['sex'].replace('Male', 0)
# Replaces Female -> 1
df['sex'] = df['sex'].replace('Female', 1)
@Dssdiego
Dssdiego / SimpleTest.java
Created April 26, 2018 10:17
Simple functional test in java
import org.junit.Before;
import org.junit.Test;
import br.techhit.scanydrive.helpers.LoginHelper;
import static org.junit.Assert.*;
public class LoginHelperTest {
LoginHelper loginHelper;
@Dssdiego
Dssdiego / BeforeLoginActivityTest.java
Last active April 27, 2018 13:28 — forked from adavis/BeforeLoginActivityTest.java
Using Screen Robots with Android Espresso Tests
package <your_package>;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
Weight (Kg) Height (cm) Result Conclusion Correct Prediction?
94 182 -0.00157233 Male Yes
56 172 0.69436113 Female No
98 187 -0.07898268 Male Yes
65 172 0.59412349 Female Yes
87 175 0.02263017 Male Yes
50 160 0.80293757 Female Yes
@Dssdiego
Dssdiego / fab.html
Created April 16, 2019 12:49
FAB Angular
<div id="app-fab">
<div class="handle">
<button mat-fab color="primary" (click)="fabClick()">
<mat-icon>person_add</mat-icon>
</button>
</div>
</div>
@Dssdiego
Dssdiego / datatable.html
Created April 16, 2019 12:56
Datatable Angular
<ngx-datatable #table class="material ml-0 mr-0 mb-5" [rows]="rows" [columnMode]="'flex'" [headerHeight]="50" [footerHeight]="50"
[limit]="10" [rowHeight]="'auto'" [sorts]="[{prop: 'name', dir: 'desc'}]" [loadingIndicator]="loadingIndicator">
<ngx-datatable-column name="Avatar" prop="avatar" [flexGrow]="0.5">
<ng-template ngx-datatable-cell-template let-rowIndex="rowIndex" let-row="row">
<img src="{{row?.avatar}}" alt="" class="avatar-img">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Nome" prop="name" [flexGrow]="2">
<ng-template ngx-datatable-cell-template let-rowIndex="rowIndex" let-row="row">
{{ row?.name }}
<div fxLayout="row wrap">
<div fxFlex="100" fxFlex.gt-sm="25" fxFlex.sm="50">
<mat-card>
<mat-card-title>
<small class="text-muted">Despesas Fixas</small>
<span fxFlex></span>
<mat-chip class="icon-chip" color="accent" selected="true">
<mat-icon>trending_up</mat-icon>10%
</mat-chip>
</mat-card-title>