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
braulio@hal:~/oss/tokio/tokio$ cargo tree --no-default-features --features fs -e features -i tokio | |
tokio v1.15.0 (/home/braulio/oss/tokio/tokio) | |
├── tokio feature "default" | |
│ ├── tokio-stream v0.1.8 (/home/braulio/oss/tokio/tokio-stream) | |
│ │ ├── tokio-stream feature "default" | |
│ │ │ └── tokio-test v0.4.2 (/home/braulio/oss/tokio/tokio-test) | |
│ │ │ └── tokio-test feature "default" | |
│ │ │ [dev-dependencies] | |
│ │ │ └── tokio v1.15.0 (/home/braulio/oss/tokio/tokio) (*) | |
│ │ │ [dev-dependencies] |
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
2 | |
9 | |
5 | |
2 | |
3 | |
3 | |
7 | |
2 | |
2 | |
2 |
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
class Solution: | |
def twoSum(self, nums: List[int], target: int) -> List[int]: | |
seen_numbers_to_indices = {} | |
for i, number in enumerate(nums): | |
candidate_index = seen_numbers_to_indices.get(target - number) | |
if candidate_index is not None: | |
return [candidate_index, i] | |
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
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} |
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
module Screen (Screen, | |
ScreenPosition, | |
moveCursor, | |
writePixel, | |
putPixel | |
) where | |
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
vector<int> swap(int first_index, int second_index, vector<int> el_vector){ | |
int auxiliar = el_vector[first_index]; | |
el_vector[first_index] = el_vector[second_index]; | |
el_vector[second_index] = auxiliar; | |
return el_vector; | |
} | |
class GeneradorPermutaciones { | |
private: |
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
class Natural: | |
def __init__(self, predecesor = None): | |
self.predecesor = predecesor | |
def __eq__(self, otro): | |
# 0 = 0 | |
# if n' = m', n = m | |
if self.isZero() or otro.isZero(): | |
return self.isZero() == otro.isZero() | |
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
antecesor a = a - 1 | |
sucesor a = a + 1 | |
suma a 0 = a | |
suma a (n) = sucesor( suma a (antecesor n) ) |
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
def modificador(f): | |
def nueva_funcion(): | |
return "Braulio es un " + f() | |
return nueva_funcion | |
@modificador | |
def crack(): | |
return "crack" | |
crack() # Devuelve "Braulio es un crack" |
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
def crack(): | |
return "crack" | |
def modificador(f): | |
def nueva_funcion(): | |
return "Braulio es un " + f() | |
return nueva_funcion | |
crack = modificador(crack) |
NewerOlder