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
Requirements | |
============ | |
1. A laptop with Python 3.10 installed - https://www.python.org/ | |
2. Install JupyterLab - https://jupyter.org/install | |
3. Open a free account in HuggingFace to be able to use the latest models - https://huggingface.co/ |
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
public class MySampleClient extends TextWebSocketHandler { | |
@Getter | |
private WebSocketSession clientSession; | |
public MySampleClient () throws ExecutionException, InterruptedException { | |
var webSocketClient = new StandardWebSocketClient(); | |
this.clientSession = webSocketClient.doHandshake(this, new WebSocketHttpHeaders(), URI.create("wss://echo.websocket.org")).get(); | |
} |
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 datetime | |
from bs4 import BeautifulSoup | |
wiki_url = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies" | |
def getConstituents(): | |
urlContent = requests.get(wiki_url).text | |
soup = BeautifulSoup(urlContent, "html.parser") |
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 processing.core._ | |
class ScalaProcessingExample extends PApplet | |
{ | |
override def settings () | |
{ | |
size(200, 200) | |
} | |
override def setup() { |
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 processing.core.PApplet; | |
public class SimpleDrawSketch extends PApplet { | |
@Override | |
public void settings () { | |
size(200,200); | |
} | |
@Override |
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
#!/usr/bin/env python | |
# | |
# Script to run yfinanceMongo (see http://www.github.com/figurebelow) inside a OpenShift cartdrige | |
# | |
import sys | |
import os | |
from yfinanceCli import * |
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
{ "date": "13/08/2013", | |
"symbols": [ {"id": "ABE.MC", "desc": "Abertis Infraestructuras SA"}, | |
{"id": "ACS.MC", "desc": "ACS Actividades de Construccion y Servicios SA"}, | |
{"id": "ACX.MC", "desc": "Acerinox, S.A"}, | |
{"id": "AMS.MC", "desc": "Amadeus IT Holding SA"}, | |
{"id": "ANA.MC", "desc": "Acciona,S.A"}, | |
{"id": "BBVA.MC", "desc": "Banco Bilbao Vizcaya Argentaria SA"}, | |
{"id": "BKT.MC", "desc": "Bankinter SA"}, | |
{"id": "BME.MC", "desc": "Bolsas y Mercados Espanoles"}, | |
{"id": "CABK.MC", "desc": "CAIXABANK"}, |
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
#!/bin/bash | |
# example: ./checkTicker.sh san.mc tef.mc | |
for ticker in "$@"; do | |
echo -n $ticker " " | |
curl -s 'http://es.finance.yahoo.com/q?s='$ticker | grep -o "<span id=\"yfs_l.*"$ticker"\">.*</span>" | grep -oEi '>[0-9,]+<' | sed s/'[<>]'//g | |
done |
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
#!/bin/bash | |
for myfile in `find $1 | grep MF$`; do | |
source=`echo $myfile | awk -F/ '{ print $(NF-2) }'` | |
for dep in `cat $myfile | tr '\n' ' ' | grep -o "Require-Bundle:[[:print:]]*Bundle-RequiredExecutionEnvironment" | grep -iEo '[a-z]+[0-9]*[a-z]+.[a-z.|0-9]*' | grep '\.' | tr '\n' ' '`; do | |
echo $source,$dep | |
done | |
done |