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
# This Python 3 environment comes with many helpful analytics libraries installed | |
# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python | |
# For example, here's several helpful packages to load | |
import numpy as np # linear algebra | |
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) | |
import matplotlib.pyplot as plt # Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy | |
import matplotlib.patches as mpatches | |
import pprint # Pretty printer |
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
# Author: Vincenzo De Notaris (vdenotaris@google.com) | |
# aka a not so brilliant Python programmer! | |
# Reference: https://github.com/lemire/StarSchemaBenchmark | |
# Libs | |
import sys | |
import os | |
# Parsing function | |
def parseAndWrite(name, header): |
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 java.util.HashSet; | |
import java.util.Set; | |
class Solution { | |
private static int max(int[] A) { | |
int max = A[0]; | |
for (int i = 1; i < A.length; i++) | |
if (A[i] > max) | |
max = A[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
class Solution { | |
public int solution(int N) { | |
String binN = Integer.toBinaryString(N); | |
int counter = 0; | |
int maxCounter = 0; | |
for (int i = 1; i < binN.length() - 1; i++) { | |
if (binN.charAt(i) == '0' && binN.charAt(i-1) == '1') { | |
counter = 1; | |
for (int j = i+1; j < binN.length(); j++) { | |
if (binN.charAt(j) == '0') |
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
Param( | |
[string] $filePath, | |
[string] $thresold | |
) | |
if (-not ([System.IO.File]::Exists($filePath))) { | |
throw [System.IO.FileNotFoundException] "File not found." | |
} | |
Write-Host "Characters counter" -ForegroundColor Cyan |
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
https://www.linkedin.com/pulse/20140626153605-63176935-preparing-and-passing-the-cissp-exam |
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
/* | |
* Copyright 2014 Vincenzo De Notaris | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |