I hereby claim:
- I am anderssonfilip on github.
- I am anderssonfilip36 (https://keybase.io/anderssonfilip36) on keybase.
- I have a public key ASAWTqp_PI84Z5J-yY7zM3hesdK4GicLCgOQniSgQjt6BQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| CREATE (p:Person { name: 'Alice' }) | |
| CREATE (p:Person { name: 'Bob' }) | |
| CREATE (c:City { name: 'London' }) | |
| CREATE (c:City { name: 'Portsmouth' }) | |
| CREATE (s:StreetName { name: 'High Street' }) | |
| MATCH (s:StreetName), (c:City) CREATE (s)-[:IS_IN]->(c) | |
| MATCH (p:Person{name:'Alice'}), (c:City{name:'London'}) CREATE (p)-[:LIVES_IN]->(c) | |
| MATCH (p:Person{name:'Bob'}), (c:City{name:'Portsmouth'}) CREATE (p)-[:LIVES_IN]->(c) |
| var rotate = function(x, y){ | |
| var rx = 0; | |
| var ry = 0; | |
| var quarter = end/(Math.PI/2) | |
| console.log("rotation: " + end) | |
| if(end === 0) |
| var ts: List[Long] = List.empty | |
| def time[R](block: => R): R = { | |
| val t0 = System.nanoTime() | |
| val result = block | |
| val t1 = System.nanoTime() | |
| val t = t1 - t0 | |
| ts = ts ++ List(t) | |
| result | |
| } |
| class Coffees(tag: Tag) extends Table[(String, Int, Double, Int, Int)] | |
| (tag, "COFFEES") { | |
| def name = column[String]("NAME", O.PrimaryKey) | |
| def price = column[Double]("PRICE") | |
| } |
| @table(name="COFFEES") | |
| case class Coffee( | |
| @column(name="NAME") | |
| name : String, | |
| @column(name="PRICE") | |
| price : Double | |
| ) |
| // Akka Actor system | |
| import akka.actor.ActorSystem | |
| // HTTP related imports | |
| import spray.http.{ HttpRequest, HttpResponse } | |
| import spray.client.pipelining.{ Get, sendReceive } | |
| // Futures related imports | |
| import scala.concurrent.Future | |
| import scala.util.{ Success, Failure } |
| class PairOfShoes(var leftSize: Int, var rightSize: Int) { | |
| def mix(newLeftSize: Int, newRightSize: Int) = | |
| { | |
| leftSize = newLeftSize | |
| rightSize = newRightSize | |
| } | |
| override def hashCode(): Int = leftSize + 31 * rightSize | |
| def canEqual(that: Any): Boolean = that match { |
| import os | |
| cap = 1 # cap in Megabytes | |
| from datetime import date, timedelta | |
| from time import gmtime | |
| cutoffDate = date.today()-timedelta(days=1) # does not delete files newer than this (exclusive of the date) | |
| def GetFolderSize(start_path = '.'): #get disk space in Megabytes | |
| return sum(os.path.getsize(f) for f in os.listdir('.') if os.path.isfile(f)) / (1024*1024) |
| import os | |
| import glob | |
| from datetime import date, timedelta | |
| import re | |
| from time import gmtime, strftime | |
| folder = '<Insert folder name here>' | |
| files = ['FileA.txt', 'FileB.txt'] | |
| archivePeriod = 5 # archive period in days |