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
@Override | |
public void changeFragment(String fragment_name) { | |
Fragment fragment; | |
Class fragmentClass = null; | |
if(fragment_name.equals(TeamFragment.TAG_TEAM_FRAGMENT)){ | |
fragmentClass = TeamFragment.class; | |
Log.d("HW2", "team fragment selected"); |
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 Solution { | |
public List<String> findWords(char[][] board, String[] words) { | |
//insert all words into trie | |
//for each cell, depth first search from that cell in all directions checking each growing string against the trie | |
//if eventually a word is found (all neighbors dont continue making a valid word in trie), then add that word to soln list | |
//if at any added character the string no longer is in trie, stop traversing, just return null | |
Trie trie = new Trie(); | |
for(int i = 0; i < words.length; i++){ | |
trie.insert(words[i]); | |
} |
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
=====================DIFF T, THRESHOLD VALUE======================= | |
./kmeans -n 4 -t .01 -i ./data/204800.txt | |
I/O completed | |
num of threads = 4 | |
# iterations = 18 | |
kmeans_clustering call from cluster.c took 0.428064 |
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
echo -e "\n\n\n\n=====================DIFF T, THRESHOLD VALUE=======================\n\n\n\n" | |
echo -e "./kmeans -n 4 -t .01 -i ./data/204800.txt" | |
./kmeans -n 4 -t .01 -i ./data/204800.txt | |
echo -e "\n\n\n\n===================================================================\n\n\n\n" | |
echo -e "./kmeans -n 4 -t .001 -i ./data/204800.txt" | |
./kmeans -n 4 -t .001 -i ./data/204800.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
-bash-4.2$ ./pf -x 32 -y 32 -z 100 -np 10000 | |
VIDEO SEQUENCE TOOK 0.028908 | |
XE: 16.549820 | |
YE: 16.463238 | |
0.718951 | |
XE: 14.455943 | |
YE: 17.535434 | |
2.177538 | |
XE: 12.490030 | |
YE: 18.503280 |
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
-bash-4.2$ ./pf -x 1024 -y 1024 -z 100 -np 10000 | |
VIDEO SEQUENCE TOOK 12.033136 | |
XE: 512.549820 | |
YE: 512.463238 | |
0.718951 | |
XE: 510.455943 | |
YE: 513.535434 | |
2.177538 | |
XE: 508.490030 | |
YE: 514.503280 |
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 redbaron import RedBaron | |
import json | |
with open("the_unidiomatic_python_file.py", "r") as source_code: | |
red = RedBaron(source_code.read()) | |
red | |
del red[1] |
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
#unpythonic code in idiom_tests_copy.py: | |
result = [] | |
for i in range(10): | |
s = i ** 2 | |
result.append(s) | |
print(sum(result)) | |
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
/* globals React */ | |
const shallow = require('enzyme').shallow; | |
const expect = require('chai').expect; | |
const setup = require('static/bundles/test/componentSetup'); | |
const courseViewGradeData = require('static/bundles/ondemand/components/__fixtures__/CourseViewGrade.mock'); | |
const courseMaterialData = require('static/bundles/author-grade/stores/__tests__/fixtures/courseMaterialData.newGradeWeights.js'); | |
const beforeEachLoadPromisedObject = require('static/bundles/phoenix/test/lib/beforeEachLoadPromisedObject'); | |
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
latencyAvg = getLatencyAvg(); | |
loadAvg = getLoadAvg(); | |
uptimeAvg = getUptimeAvg(); | |
IOWaitAvg = getIOWaitAvg(); | |
latencyAvg = ((latencyAvg) / (500)); | |
loadAvg = ((loadAvg) / (10)); | |
uptimeAvg = uptimeAvg/1000; | |
uptimeAvg = ((uptimeAvg) / (3600)); |
NewerOlder