Skip to content

Instantly share code, notes, and snippets.

View CarMoreno's full-sized avatar
🐍
Coding...

Carlos Moreno CarMoreno

🐍
Coding...
View GitHub Profile
@Klerith
Klerith / batman-quotes.js
Created June 16, 2021 23:02
Quotes de Batman
const quotes = [
{ quote: 'The night is darkest just before the dawn. And I promise you, the dawn is coming.', author: 'Harvey Dent, The Dark Knight' },
{ quote: 'I believe what doesn’t kill you simply makes you, stranger.', author: 'The Joker, The Dark Knight' },
{ quote: 'Your anger gives you great power. But if you let it, it will destroy you… As it almost did me', author: 'Henri Ducard, Batman Begins' },
{ quote: 'You either die a hero or live long enough to see yourself become the villain.', author: 'Harvey Dent, The Dark Knight' },
{ quote: 'If you’re good at something, never do it for free.', author: 'The Joker, The Dark Knight' },
{ quote: 'Yes, father. I shall become a bat.', author: 'Bruce Wayne/Batman, Batman: Year One' },
]
@Ogaday
Ogaday / README.md
Last active August 7, 2022 13:33
Prefect on Dask on Kubernetes
@adrenalinkin
adrenalinkin / docker-nfs-for-mac.md
Last active January 17, 2023 10:19
Docker NFS optimization for MAC

Install docker for mac.

  • Edit /etc/nfs.conf:

     nfs.server.mount.require_resv_port = 0 
    
  • Edit /etc/exports (create if not exist):

    Execute command and Put result of command execution into /etc/exports.:

@pyjavo
pyjavo / zen_python.md
Last active February 3, 2021 07:28
El zen de Python: Explicado y con ejemplos

El Zen de Python

============ Este post se encuentra publicado en https://pybaq.co/blog/el-zen-de-python-explicado/ ===========

Si alguna vez abren la consola de python y escriben import this verán que les aparecerán las líneas con el famoso Zen de Python:

  1. Beautiful is better than ugly.
  2. Explicit is better than implicit.
@lequanghuylc
lequanghuylc / pure-react.md
Last active January 17, 2023 14:13
[Using React & React Native without State management library] #article #react

It’s common these day when React & React Native developers use State management library (like Redux). I’ve been using React & React Native for a while now and found out that Pure React is actually not bad. In this article I will share my way of doing things with React & React Native purely, without State management library (represented by Redux). 

For those of you who are struggling learning Redux, because of the overwhelming of the whole React/JSX/Babel/Webpack/Native Component/Native Module/.. and have to add Redux to the list just to solve some of React problems, or because of the high learning curve of Redux, I hope you find this article helpful.

Some of React problems with State Management

Assuming you have some knowledge of React, I will jump right in the problems that most of us encoutered at the beginning of time learning React:

  • Flow pass data down, pass event up makes us to pass data & function via props and it's hard to manage when amount of props gets huge. (Comunication between component
@pietromarchesi
pietromarchesi / sciluigi_slurm.md
Last active April 17, 2023 09:24
Running SciLuigi on a Slurm cluster (draft)

In this example we show how to adapt the example workflow so that we can run it on a cluster using the Slurm Workload Manager (Slurm).

We will write a workflow composed of two tasks, one which creates a file called foo.txt and writes foo in it, and one which reads foo.txt and swaps every occurrence of foo with the name of the cluster node on which the workflow is running.

To do this, we have to slightly change the workflow definition. In particular, we set up a runmode parameter which will allow us to specify from the command line whether we want the workflow to be run locally or on the cluster.

When we define the tasks, we have to pass an additional SlurmInfo object, which contains the specification of the resources we want to allocate to our tasks and other Slurm parameters.

@taras-d
taras-d / react-native-on-vs-emulator-and-win10.md
Last active September 1, 2021 08:20
React native on VS Emulator and Windows 10
@canabady
canabady / Linking Parent-Component-FormGroup-with-Child-Component-FormControlName
Last active May 24, 2023 00:15
Connecting parent component 'formGroup' with child component 'formControlName'
Connecting parent component 'formGroup' with child component 'formControlName'
In the Parent component template
================================
<form [formGroup]="recipeForm">
<app-recipe-name [parent]="recipeForm"></app-recipe-name>
</form>
@tomsing1
tomsing1 / luigi_first_steps.md
Last active October 7, 2023 13:23
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,

@dlstadther
dlstadther / example_etl.py
Last active January 30, 2023 14:47
Example ETL Using Luigi
# import python core modules
import datetime
import logging
# import external modules
import pandas as pd
import requests
# import luigi modules
import luigi