Skip to content

Instantly share code, notes, and snippets.

View cmarchena's full-sized avatar
🏢
Working from office

Carlos Marchena cmarchena

🏢
Working from office
View GitHub Profile
@cmarchena
cmarchena / fizzBuzz.js
Last active April 8, 2024 18:40
FizzBuzz: UMPIRE, code flow control, debugging
// FLOW CONTROL
// Sequence
const num1 = 1
const num2 = 2
const num3 = 3
// num1 = 23
console.log(23)
function sum(a, b) {
return a - b
@cmarchena
cmarchena / jsEssentialsForReact.js
Created April 8, 2024 14:47
12 Javascript essentials for React
// 12 Javascript essentials for React
// 1. Template literals
const firstName = 'John';
const lastName = 'Doe';
const greeting = "Hello, my name is " + firstName + " " +lastName;
const greetingTemplate = `Hello, my name is ${firstName} ${lastName}.`;
console.log('Template literals:', greeting);
console.log('Template literals:', greetingTemplate);
@cmarchena
cmarchena / info.md
Created August 30, 2023 18:59
Lab SQL
  • Artículo que he usado como base para explicar los tipos de joins Link
  • Comandos SQL para replicar lo que se ve en el artículo
— crea tabla EmpDetails
CREATE TABLE EmpDetails (
  EmployeeID INT PRIMARY KEY,
  EmployeeName VARCHAR(50) NOT NULL
);

INSERT INTO EmpDetails (EmployeeID, EmployeeName) VALUES
""" Framework UMPIRE: Framework para resolución de problemas complejos. son 6 pasos:
1. Understand
2. Match
3. Plan
4. Implement
5. Review
6. Evaluate
Más info en este artículo https://guides.codepath.com/compsci/UMPIRE-Interview-Strategy
1. Understand: entender bien el problema. Definir de forma clara. Es clave saber cuál es el resultado esperado.
- Generar lista de números primos entre 1 y 250, luego grabar en archivo.txt
@cmarchena
cmarchena / index.md
Last active April 16, 2023 17:46
Consideraciones sobre inteligencia artificial
@cmarchena
cmarchena / text.txt
Last active March 23, 2023 10:21
#Transcript of Business Made Simple Podcast. Episode 115: How to Turbocharge Your Marketing Engine and Generate More Cash Flow Author: Don Miller
I want you to actively pursue the goal of doubling the revenue of your small business. Now, why would you want to double the revenue of your small business? Your business is doing okay. Why get greedy? Well, let me tell you why you want to actually make an aggressive plan to grow your business. The reason is 65% of small businesses die within the first 10 years. So the idea of doubling your business is not just about doubling the amount of revenue that you bring, it's also about staying alive. Because if you aren't actively, actively trying to grow your business, there's a good chance you're not going to have a business for much longer. You need a clear message because without a clear message, your marketing just isn't going to work. And there's two things that you need to do in order to optimize your small business marketing. And that's exactly what we're going to talk about today. With that, I want to welcome you to the Business Made Simple Podcast, brought to you by the Hubsbot Podcast Network. This is th
@cmarchena
cmarchena / excel102.md
Created March 15, 2023 13:56
Excel 102

Excel 102

  • Pivot tables: what are pivot tables and why they are useful for data analysis, how to create a pivot table from a table or a range of data, how to arrange fields in rows, columns, values and filters areas , how to apply different calculations and formats to pivot table data , how to use pivot charts and slicers, etc.
  • Data analysis and visualization: how to use various tools and techniques in Excel to analyze and visualize data, such as what-if analysis, goal seek, solver, scenarios, data tables, histograms, box plots, trendlines, etc.
  • Macros and VBA: what are macros and VBA and how they can automate tasks in Excel, how to record and run a macro, how to edit and debug a macro code in the Visual Basic Editor (VBE), how to create user-defined functions (UDFs) and user forms in VBA, etc.
  • Power Query and Power Pivot: what are Power Query and Power Pivot and how they can enhance data processing and modeling in Excel, how to import and transform data from various sources using Power Query Editor
@cmarchena
cmarchena / excel101.md
Created March 15, 2023 13:55
Excel 101

Excel 101

  • Introduction to Excel: what is Excel, how to open and save a workbook, how to navigate the ribbon and the worksheet, how to enter and edit data, etc.
  • Formatting and styling: how to apply different formats and styles to cells, rows, columns, and ranges, how to use conditional formatting and data validation, how to create custom formats and styles, etc.
  • Formulas and functions: how to use basic arithmetic operators and built-in functions in Excel, how to create simple formulas and copy them across cells or worksheets, how to use absolute and relative references, how to troubleshoot errors in formulas, etc.
  • Tables and charts: how to create and format tables in Excel, how to sort and filter data in tables, how to use slicers and timelines, how to create and customize different types of charts in Excel, how to insert sparklines and icons sets, etc.
@cmarchena
cmarchena / decorator_case.py
Created February 15, 2023 01:06
decorator_case.py
def retry(func):
def wrapper(*args, **kwargs):
try:
result = func(*args, **kwargs)
wrapper.return_value = result
return result
except TypeError as e:
print("Error: Provide valid argument(s) to the function and retry")
except ValueError as e:
print(e)