I hereby claim:
- I am appplemac on github.
- I am alexey_ch (https://keybase.io/alexey_ch) on keybase.
- I have a public key whose fingerprint is 7F3A CFBB 4647 F569 A9B1 7F36 04BE 4BEB 964A 0267
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
`df`.split("\n").map {|line| line.split(" ")[3].to_i}[1...-1].inject(:+) / (1024*1024) |
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'forecast_io' | |
Forecast::IO.api_key = "your_forecast.io_api_key" | |
# Position for Campus Nord UPC | |
weather = Forecast::IO.forecast(41.387885, 2.112808, time: Time.now.to_i, params: { units: 'si' }) | |
current = weather[:currently] | |
temp = current[:temperature] | |
precip = current[:precipIntensity] |
#include <vector> | |
#include <iostream> | |
using namespace std; | |
void prepare(const vector<int>& x, int m, vector<int>& mpnext) { | |
int i = 0; | |
int j = -1; | |
mpnext[0] = -1; | |
while (i < m) { | |
while (j>-1 and x[i] != x[j]) j = mpnext[j]; |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include <pthread.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#define MAX 10000 | |
#define NTHREADS 10 |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int merge(vector<int>& v, int left, int delim, int right) { | |
int inv_counter = 0; | |
int i = left; | |
int j = delim; | |
int k = 0; | |
vector<int> aux(right-left+1); |
/* Imports de la classe */ | |
import java.sql.*; | |
import java.io.*; | |
/* Capa de Control de Dades */ | |
class CtrlDadesPublic extends CtrlDadesPrivat { | |
public ConjuntTuples consulta(Connection c, Tuple params) throws BDException { | |
try { | |
ConjuntTuples ct = new ConjuntTuples(); |
C = 100e-12 | |
R = 10e3 | |
T = 10e-9 | |
const = Math::E**(-T/(R*C)) | |
vc = 5*(1-const) | |
vc1 = vc * const | |
1000000.times do | |
vc = 5 - ((5-vc1)*const) | |
vc1 = vc*const | |
end |
void World::migrate_central(Region r, int h, int spec_id) { | |
} | |
void World::migrate_periferic(Region r, int h, int spec_id) { | |
} |
#include <vector> | |
... | |
vector v; | |
vector<vector> mat; | |
... |