Skip to content

Instantly share code, notes, and snippets.

@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");
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]);
}
=====================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
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
-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
-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
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]
#unpythonic code in idiom_tests_copy.py:
result = []
for i in range(10):
s = i ** 2
result.append(s)
print(sum(result))
/* 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');
latencyAvg = getLatencyAvg();
loadAvg = getLoadAvg();
uptimeAvg = getUptimeAvg();
IOWaitAvg = getIOWaitAvg();
latencyAvg = ((latencyAvg) / (500));
loadAvg = ((loadAvg) / (10));
uptimeAvg = uptimeAvg/1000;
uptimeAvg = ((uptimeAvg) / (3600));