import pandas as pd
import numpy as np
from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print("foo")
return(tabulate(df, headers="keys", tablefmt="orgtbl"))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Scheme] | |
Name=Monokai (dark) | |
TabActivityColor=#a6a6e2e22e2e | |
ColorCursor=#f8f8f8f8f2f2 | |
ColorForeground=#f8f8f8f8f2f2 | |
ColorBackground=#272728282222 | |
ColorPalette=#272728282222;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f8f8f8f8f2f2;#757571715e5e;#f9f926267272;#a6a6e2e22e2e;#f4f4bfbf7575;#6666d9d9efef;#aeae8181ffff;#a1a1efefe4e4;#f9f9f8f8f5f5 |
- If you can't test the code efficiently, refactor the code.
- Don't hardcode URLs in views, templates and tests. (Use
revert
instead?) - Use named views and reverse URL resolution, instead.
- Never refactor against failing UNIT tests.
- Don't forget the REFACTOR on 'Red, Green, Refactor'.
- Tests makes possible using the application state as a save-points for refactors. Once you get to them again, you'll know your refactoring is done.
- Every single FT doesn't need to test every single part of your application, but use caution when de-duplicating your FTs. (FTs exist to catch unpredictable interactions between different parts of your application, after all)
- Use loggers named after the module you're in. Follow the
logging.getLogger(__filename__)
pattern to get a logger that's unique to your module, but that inherits from a top-level configuration you control.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias c='docker-compose' | |
alias cb='docker-compose build' | |
alias cup='docker-compose up' | |
alias cr='docker-compose run --service-ports --rm' | |
alias crl='docker-compose run --service-ports --rm local' | |
alias crd='docker-compose run --service-ports --rm develop' | |
alias crt='docker-compose run --rm test' | |
alias crp='docker-compose run --rm provision' | |
alias crci='docker-compose run --rm ci' | |
alias crwt='docker-compose run --rm watchtest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! `xev` and `showkey` to see which keycode is pressed | |
!old keys | |
!xmodmap -pke |grep Something | |
!keycode 50 = Shift_L ISO_Prev_Group Shift_L ISO_Prev_Group | |
!keycode 62 = Shift_R ISO_Next_Group Shift_R ISO_Next_Group | |
!keycode 66 = Caps_Lock NoSymbol Caps_Lock | |
!keycode 22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server | |
!keycode 37 = Control_L NoSymbol Control_L |
Esse documento tem como objetivo montar a campanha para organizarmos as finanças e recompensas do evento Python Sudeste 2016, no modelo de crowdfunding, utilizando a ferramenta do Catarse
TODO
Edit: This list is now maintained in the rust-anthology repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate rocket; | |
use rocket::{Request, Data, Outcome}; | |
use rocket::data::{self, FromData}; | |
use rocket::Outcome::*; | |
use std::collections::HashMap; | |
pub struct WhereStructResult { | |
sql: String, values: Vec<String>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(unused_imports)] | |
#[macro_use] | |
extern crate lazy_static; | |
#[cfg(test)] | |
mod tests { | |
use std::sync::{Mutex, MutexGuard, Once, ONCE_INIT}; | |
/// Substitua String pelo tipo da sua conexão. | |
lazy_static! { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait AsRecord { | |
fn as_record(&self) -> String; | |
} | |
#[derive(Debug)] | |
struct MyRecord(u32); | |
impl AsRecord for MyRecord { | |
fn as_record(&self) -> String { | |
format!("hey, I've got {}", self.0) | |
} |