Skip to content

Instantly share code, notes, and snippets.

View albertogiunta's full-sized avatar

Alberto Giunta albertogiunta

View GitHub Profile

Install node

brew install node on a Mac.

Clone angular-seed from here

git clone --depth=1 https://github.com/angular/angular-seed.git <your-project-name>.

There you can also find startup commands such as npm install, npm start etc.

[
{
"priority": 0,
"category": "",
"title": "DAJE",
"body": "Oh regaz daje eh che ci siamo"
}
]
{
"tipoTreno": "PG",
"orientamento": null,
"codiceCliente": 2,
"fermateSoppresse": null,
"dataPartenza": null,
"fermate": [
{
"orientamento": null,
"kcNumTreno": null,
@albertogiunta
albertogiunta / Hackerrank Twitter University Challenge - Scala
Last active February 18, 2018 16:32
This code was used for the Hackerrank Twitter challenge. The code works well on 6 of the 9 test cases, but they don't tell you what's wrong in the wrong test cases, hence it's quite difficult to know what's wrong.
import java.text.SimpleDateFormat
import java.util.{Calendar, Date}
import scala.collection.mutable
object Solution {
def main(args: Array[String]) {
val rawLogs = mutable.MutableList[String](
@albertogiunta
albertogiunta / Extensions.kt
Created March 20, 2018 10:30
Extension functions (Kotlin) & build.gradle files for Android projects
/**
* ANY
*/
fun Any.toJson(): String = GsonInitializer.toJson(this)
/**
* VIEW
*/
fun View.toggleVisibility(setAsVisible: Boolean) = if (setAsVisible) this.visible() else this.gone()
def get_bpcer(self, feature_vectors, classes):
# apcer - attack presentation classification error rate: proportion of morphed presentations incorrectly classified as bona fide
# bpcer - bonafide presentation classification error rate: proportion of bona fide presentations incorrectly classified as morphed face attacks
apcer = [0.001, 0.003, 0.005, 0.01, 0.02, 0.03, 0.05, 0.1]
# apcer = [0.05, 0.1]
bpcer = []
X_test = feature_vectors
y_test = classes
self._load_classifier()

Privacy Policy

Alberto Giunta built the JustInTrain app as an Ad Supported app. This SERVICE is provided by Alberto Giunta at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at JustInTrain unless otherwise defined in this Privacy Policy.

def do_aut_distance(data, sse, aut):
rec_do_aut_distance(sse.coauthor_network(aut), sse, [aut])
def rec_do_aut_distance(graph, sse, already_expanded_list):
for co_aut in graph.nodes():
if co_aut not in already_expanded_list:

Privacy Policy

built the ReadIT 🔥 Never forget to read a link again app as an Ad Supported app. This SERVICE is provided by at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at ReadIT 🔥 Never forget to read a link again unless otherwise defined in this Privacy Policy.