Skip to content

Instantly share code, notes, and snippets.

View ticua07's full-sized avatar

ticua07

View GitHub Profile
import os
import json
import base64
# pip install pywin32
from win32 import win32crypt
# pip install pycryptodome
from Crypto.Cipher import AES
import sqlite3
fn main() {
let vec = vec!["hola", "miau", "etesech", "elpepe", "ticua"];
let search = "ticua";
let idx = binary_search(vec.clone(), search);
assert_eq!(search, vec[idx as usize]);
}
/// If the value is found the `index` is returned. Otherwise `-1` is returned.
///
/// Example:
<script lang="ts">
import { currentUser, sp } from '$lib/supabase';
import { goto } from '$app/navigation';
let userInfo = { username: 'ticua07', email: 'ticua@ticua.ar', password: '123456789' };
let errorMessage = '';
let passwordInputType = 'password';
let inputField: HTMLInputElement;
const logIn = async () => {
:set number
:set relativenumber
:set autoindent
:set nowrap
:set tabstop=2
:set shiftwidth=2
:set smarttab
:set softtabstop=2
:set mouse=a
:set updatetime=300
@EventHandler
private void PlayerDeathEvent(PlayerDeathEvent event) {
// og chest has to look at left
System.out.println(event.getEntity().getName());
Block firstBlock = event.getEntity().getLocation().getBlock();
firstBlock.setType(Material.CHEST);
Chest firstChest = (Chest) firstBlock.getBlockData();
firstChest.setType(Chest.Type.LEFT);
firstBlock.setBlockData(firstChest, false);
const newItem = {..........}

const res = await fetch("http://localhost:8000/addTask", {
      method: "POST",
      body: JSON.stringify(newItem),
      headers: {
        "Content-Type": "application/json", // poner siempre content-type que fastapi te dice no sino, jajaj no sino
 },