Skip to content

Instantly share code, notes, and snippets.

View xyos's full-sized avatar

xyos xyos

  • AWS
  • Utrecht
  • 14:06 (UTC +02:00)
  • X @xyos
View GitHub Profile
package pf;
import java.util.ArrayList;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class Boat {
private static final PersonType Adult = PersonType.Adult;
@xyos
xyos / sqroot.js
Last active December 27, 2015 15:19
ejemplo aproximacion de raices cuadradas con el metodo de newton
//recogemos el numero de la linea de comandos y lo guardamos en number
var args = process.argv.splice(2);
number = args[0];
//la funcion recursiva
function r_sqroot(number, guess) {
// nuestra primera aproximacion, se usa cuando aun no tenemos aproximación(1ra pasada por la función).
if (guess == undefined) {
guess = number/2;
}
import sys
cases = 0
average = []
def isortSteps(a):
v = []
for i in range(len(a)):
v.append(a[i])
steps = 0
t = int(raw_input())
def find_set(a,graph):
s = set([a])
for st in graph:
if a in st:
s = st
return s
def add_to_graph(a,b,graph):
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@xyos
xyos / designer.html
Created July 9, 2014 17:18
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
@xyos
xyos / eaaaz.css
Last active August 29, 2015 14:04
/**
* General styles
*/
.readon, .layout-slideshow .readon {
margin-left: auto;
margin-right: auto;
}
#rt-content-top{
/*General styles*/
/*responsive slide*/
.da-slider{
position: relative;
width: 100%;
padding-bottom: 25%;
float: left;
height: 0;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xyos
xyos / matriz.cpp
Created December 9, 2014 01:48
./a.out test.txt
#include <iterator>
#include <sstream>
#include <iostream>
#include <fstream>
#include <cctype>
#include <algorithm>
int * size_of_matrix(std::istream& str) {
static int size[2];
int rows = 0;