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
var brain = require('brain.js') | |
var fs = require('fs') | |
// configuration to be used in the brain | |
const config = { | |
binaryThresh: 0.5, // arbitary value | |
hiddenLayers: [3], // the size of the hidden layers in the network | |
activation: 'sigmoid' // activation function | |
} |
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 concurrent.futures import ThreadPoolExecutor | |
from http.client import HTTPException | |
from urllib import request | |
from typing import Union, Dict, Any, List | |
def get_request_task(url: str) -> Union[List[Dict[str, Any]], None]: | |
try: | |
contents = None | |
with request.urlopen(url) as response: |
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
// Create a WriterInterceptor, | |
// see: https://jersey.java.net/documentation/latest/user-guide.html#d0e9728 | |
import ... | |
@Provider | |
public class GZIPWriterInterceptor implements WriterInterceptor { | |
private final Logger logger = LoggerFactory.getLogger(getClass()); | |
private HttpHeaders httpHeaders; |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.conf.Configured; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.LongWritable; | |
import org.apache.hadoop.io.Text; | |
import org.apache.hadoop.mapreduce.Job; | |
import org.apache.hadoop.mapreduce.Mapper; | |
import org.apache.hadoop.mapreduce.Reducer; | |
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; |