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
# Case 1 | |
val = function( | |
arga, | |
argb, | |
.... | |
) | |
# Case 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
# coding=utf-8 | |
""" | |
Little example using netfdf-python to store Monte Carlo time-series data. | |
""" | |
from netCDF4 import Dataset | |
from numpy.random import uniform | |
from numpy.lib.npyio import savetxt |
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
#include <cstdlib> | |
#include <iostream> | |
#include <chrono> | |
#include <random> | |
#include<gsl/gsl_rng.h> | |
class Timer | |
{ | |
private: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import functools | |
import contextlib | |
@contextlib.contextmanager | |
def database(): | |
print("creo una conexion") | |
db = {} | |
yield db | |
print ("cierro la conexion") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/// One of the posts of the tower of Hanoi | |
#[derive(Debug, Clone, Copy)] | |
enum Post { | |
Left, Middle, Right, | |
} | |
/// Helper function to recursively resolve a Tower of Hanoi | |
fn recursive_hanoi(n: u64, from: Post, to: Post, auxiliar: Post) { | |
if n > 0 { | |
recursive_hanoi(n - 1, from, auxiliar, tp); |