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 | |
""" | |
Process some HTML files to add translation features. | |
The script replaces simple strings (avoiding parsing special chars, comments, Angular based variables, HTML entities) | |
and any other Angular related stuff with the same string followed by the 'translate' filter as stated in | |
https://angular-translate.github.io/ . | |
To be translated labels got memorized in the final json file, where translations values will be present. | |
File by file, processed content is stored in a new file letting the original one intact. | |
Install required deps |
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
# -*- coding: utf-8 -*- | |
""" | |
Get Paris attractions data scraping the BASE_URL site. | |
Wrap those data into a json structure. | |
Deps: | |
- BeautifulSoup | |
- requests | |
- fn |
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 rasterio | |
import geopyspark as gps | |
import numpy as np | |
import matplotlib | |
import matplotlib.cm as cm | |
from pyspark import SparkContext | |
conf = gps.geopyspark_conf(master="local[*]", appName="ingest-example", ) | |
conf.set(key='spark.kryoserializer.buffer.max', value='256m') |
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
from abc import abstractmethod | |
from signals_wave import WaveM | |
class Modulation: | |
@abstractmethod | |
def modulate(self, signal_wave: WaveM, carrier_wave: WaveM) -> WaveM: | |
raise NotImplementedError("You need to implement this method before calling it!") | |
@abstractmethod |