Skip to content

Instantly share code, notes, and snippets.

View noemk2's full-sized avatar
🎯
Focusing

Noe noemk2

🎯
Focusing
View GitHub Profile
{"name":"noemi","settings":"{\"settings\":\"{\\n \\\"[python]\\\": {\\n \\\"editor.formatOnType\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"ms-python.python\\\"\\n },\\n \\\"window.menuBarVisibility\\\": \\\"toggle\\\",\\n \\\"editor.fontFamily\\\": \\\"'Lekton Nerd Font', 'FiraCode Nerd Font','Droid Sans Mono', 'monospace', monospace\\\",\\n \\\"editor.fontLigatures\\\": true,\\n \\\"editor.fontSize\\\": 16,\\n \\\"vim.useSystemClipboard\\\": true,\\n \\\"terminal.integrated.commandsToSkipShell\\\": [\\n \\\"terminal.integrated.commandsToSkipShell\\\"\\n ],\\n \\\"workbench.colorTheme\\\": \\\"Visual Studio Dark\\\",\\n \\\"editor.unicodeHighlight.invisibleCharacters\\\": false,\\n \\\"editor.unicodeHighlight.ambiguousCharacters\\\": false,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"editor.wordWrap\\\": \\\"on\\\"\\n}\"}","keybindings":"{\"keybindings\":\"// Place your key bindings in this file to override the defaults\\n[\\n // T
# Below are quick example
# keep first duplicate row
df2 = df.drop_duplicates()
# Using DataFrame.drop_duplicates() to keep first duplicate row
df2 = df.drop_duplicates(keep='first')
# keep last duplicate row
df2 = df.drop_duplicates( keep='last')
@noemk2
noemk2 / group_by_pandas.py
Created December 24, 2022 21:04
pandas group by query group by search if repeat id
import pandas as pd
import datetime as dt
ventas = pd.read_csv("../tablas_cp/venta.csv")
# print(ventas)
ventas["Fecha"] = pd.to_datetime(ventas["Fecha"])
@noemk2
noemk2 / pop.rs
Created December 22, 2022 20:16
pop in rust
#![allow(unused)]
fn main() {
let rust = "Rust";
let popped = &rust[..rust.len() - 1];
println!("{}", popped);
let poo = {
let mut chars = rust.chars();
chars.next_back();
@noemk2
noemk2 / up
Last active December 19, 2022 05:53
#!/bin/sh
git add -A
git commit -m "$1"
git push origin --all
mkdir src
cd src
mkdir components data pages validationSchemas
touch theme.js
touch ./components/Main.jsx
yarn add @react-navigation/native
expo install react-native-screens react-native-safe-area-context
yarn add @react-navigation/native-stack
@noemk2
noemk2 / eslint
Created July 11, 2022 19:14
eslint
npm install --save-dev babel-eslint eslint-config-standard eslit-config-standard-jsx eslint-config-standard-react eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react
@noemk2
noemk2 / giti
Created July 5, 2022 17:52
gitinore
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Developer note: near.gitignore will be renamed to .gitignore upon project creation
# dependencies
node_modules
/.pnp
.pnp.js
.parcel-cache
# build
/out
use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize};
use near_sdk::{log, near_bindgen};
// Define the default message
const DEFAULT_MESSAGE: &str = "Hello";
// Define the contract structure
#[near_bindgen]
#[derive(BorshDeserialize, BorshSerialize)]
pub struct Contract {