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
def reduce_mem_usage(df): | |
start_mem_usg = df.memory_usage().sum() / 1024**2 | |
print("Memory usage of properties dataframe is :",start_mem_usg," MB") | |
NAlist = [] # Keeps track of columns that have missing values filled in. | |
for col in df.columns: | |
if df[col].dtype != object and df[col].dtype != 'datetime64[ns]': # Exclude strings and dates | |
# Print current column type | |
print("******************************") | |
print("Column: ",col) |
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
const int latchPin = 12;//Pin connected to ST_CP of 74HC595 | |
const int clockPin = 8;//Pin connected to SH_CP of 74HC595 | |
const int dataPin = 11; //Pin connected to DS of 74HC595 | |
//display 0,1,2,3,4,5,6,7,8,9,A,b,C,d,E,F | |
int datArray[16] = {252, 96, 218, 242, 102, 182, 190, 224, 254, 246, 238, 62, 156, 122, 158, 142}; | |
void setup () | |
{ | |
//set pins to output | |
pinMode(latchPin,OUTPUT); | |
pinMode(clockPin,OUTPUT); |
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 com.mjtoolbox.wsclient; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.List; | |
import java.util.Properties; | |
import javax.ws.rs.client.Client; | |
import javax.ws.rs.client.ClientBuilder; | |
import javax.ws.rs.client.Entity; |
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 com.mjtoolbox.ws; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.HeaderParam; | |
import javax.ws.rs.PUT; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; |
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
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> | |
<display-name>RestWebServiceTest</display-name> | |
<welcome-file-list> | |
<welcome-file>index.html</welcome-file> | |
<welcome-file>index.htm</welcome-file> | |
<welcome-file>index.jsp</welcome-file> | |
<welcome-file>default.html</welcome-file> | |
<welcome-file>default.htm</welcome-file> | |
<welcome-file>default.jsp</welcome-file> | |
</welcome-file-list> |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mjtoolbox.ws.test</groupId> | |
<artifactId>RestWebServiceTest</artifactId> | |
<packaging>war</packaging> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>RestWebServiceTest</name> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
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
msjo@msjo-PC ~ | |
$ pwd | |
/home/msjo | |
msjo@msjo-PC ~ | |
$ ls | |
demo.txt genome index.html market-research.js out1.txt subset.ptt.00 subset.ptt.03 | |
errs.txt genome.tar locs market-research-wrapper.js out2.txt subset.ptt.01 subset.ptt.04 | |
genes grader.js market-research.csv mjtoolbox-aws-ubuntu-startup-eng.pem out3.txt subset.ptt.02 test.txt |
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
<?xml version="1.0" encoding="ISO-8859-1" ?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:f="http://java.sun.com/jsf/core" | |
xmlns:h="http://java.sun.com/jsf/html" | |
xmlns:ui="http://java.sun.com/jsf/facelets" | |
xmlns:shiro="http://xproject.flightCenter/tag"> | |
<h:head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | |
<link rel="stylesheet" type="text/css" href="../css/flight.css" |
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 mypackage; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
import javax.json.Json; | |
import javax.json.JsonObject; | |
import javax.json.JsonObjectBuilder; | |
import javax.json.JsonWriter; |
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 tree; | |
public class TreeTraversal | |
{ | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) | |
{ |