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
package me.panavtec.scalacheck | |
import org.scalacheck.Arbitrary | |
import org.scalacheck.Gen | |
import scala.compiletime.{erasedValue, summonInline} | |
import scala.deriving.* | |
object ArbitraryDeriving: |
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
// Original imp: https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin | |
// Adapted to phaser 3 By Christian Panadero | |
export default class KineticScroll { | |
private pointerId | |
private startX | |
private startY | |
private screenX | |
private screenY |
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
### Keybase proof | |
I hereby claim: | |
* I am panavtec on github. | |
* I am panavtec (https://keybase.io/panavtec) on keybase. | |
* I have a public key whose fingerprint is 293C 58BE C820 CD5E 3166 D681 88EF 58F8 8BE6 19F6 | |
To claim this, I am signing this object: |
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
package me.panavtec | |
import cats.free.Free | |
import cats.{Id, ~>} | |
import scala.io.StdIn | |
object UserInteractionApplication { | |
sealed trait UserInteraction[A] |
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
package me.panavtec | |
import cats.free.Free | |
import cats.{Id, ~>} | |
import scala.io.StdIn | |
object GuessTheSecretNumber { | |
sealed trait UserInteraction[A] |
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 org.scalatest._ | |
class CellTest extends FlatSpec with Matchers { | |
"a cell" should "die when has less than 2 neighbours" in { | |
val cell = Cell(1, true) | |
val isAliveNextGeneration = cell.nextGeneration() | |
isAliveNextGeneration shouldBe false |
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 requests | |
import re | |
import unicodedata | |
REGEX_LOS40 = "datos_cancion_\d+\['(titulo_cancion|nombre_artista)'\]\s*=\s*'([^\']*)'" | |
def removeAccents(data): | |
return unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore').decode() | |
def sanitize(artist): |
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.Arrays; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.TreeSet; | |
public class Coordinator { | |
private List<String> actions; | |
private Set<String> completedActions = new TreeSet<>(); | |
private CoordinatorCompleteAction coordinatorCompleteAction; |
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
# Add project specific ProGuard rules here. | |
# By default, the flags in this file are appended to flags specified | |
# in /Users/panavtec/Documents/android-sdk-macosx/tools/proguard/proguard-android.txt | |
# You can edit the include path and order by changing the ProGuard | |
# include property in project.properties. | |
# | |
# For more details, see | |
# http://developer.android.com/guide/developing/tools/proguard.html | |
# Add any project specific keep options here: |
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
How to use, | |
You need a organized iTunes library :) | |
1. Create manually a playlist called "_Popular" in iTunes | |
2. Replace "YOUR_API" in script with a valid last.fm api key | |
3. Execute script, if you send a parameter it will auto launch, else will show a window to input artist |
NewerOlder