This file contains hidden or 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
#ifdef MRMPI_SDC_AsyncHash | |
/** | |
* Verifies the integrity of messages between replicas using a delayed hash. | |
* May be called repeatedly on the same request. | |
* @param req The request type struct to veryify (IN). | |
* @return MPI_SUCCESS for success (including inconclusive situations | |
* where the procedure should be called again), or MPI_ERR_OTHER | |
* for error. | |
*/ | |
int MRMPI_Reqs_verifyintegrity_AsyncHash(MRMPI_ReqTypePtr req) { |
This file contains hidden or 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
#!/bin/sh | |
# adapted from: http://superuser.com/a/827803/94698 | |
if /sbin/ifconfig -a | grep -q 'inet 129\.65\.'; then | |
exec nc $1 $2 | |
else | |
exec ssh -xaqW $1:$2 csc | |
fi |
This file contains hidden or 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
Section "InputClass" | |
Identifier "Kensington Expert Mouse" | |
MatchIsPointer "on" | |
MatchVendor "Kensington" | |
MatchProduct "Expert" | |
Option "ButtonMapping" "1 8 2 4 5 6 7 3 9 10 11 12" | |
Option "ConstantDeceleration" "1.6" | |
EndSection |
This file contains hidden or 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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document regexp("http://users\.csc\.calpoly\.edu/~grade_cstaley/.*/Transcript.*") { | |
body { | |
max-width: 30em; | |
margin: 2em auto; | |
font-size: 18px; | |
} | |
p, h5 { | |
font-size: 1em !important; |
This file contains hidden or 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
class Player | |
def play_turn(warrior) | |
if warrior.feel.wall? | |
warrior.pivot! | |
elsif warrior.feel.captive? | |
warrior.rescue! | |
elsif warrior.feel.enemy? | |
warrior.attack! | |
@attacking = true |
This file contains hidden or 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
SELECT repository_url, repository_language | |
FROM [publicdata:samples.github_timeline] AS t1 | |
WHERE repository_language IN | |
(SELECT repository_language FROM | |
(SELECT repository_language, COUNT(repository_url) AS count | |
FROM [publicdata:samples.github_timeline] AS t2 | |
WHERE t2.repository_url = t1.repository_url AND t2.repository_url IS NOT NULL AND repository_language IS NOT NULL | |
GROUP EACH BY repository_language | |
ORDER BY count DESC) | |
LIMIT 1) |
This file contains hidden or 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
SELECT user, top_repos.repository_url, repository_language, SUM(weight) as weight FROM | |
(SELECT repository_url, MAX(repository_watchers) | |
FROM [publicdata:samples.github_timeline] | |
GROUP BY repository_url | |
HAVING MAX(repository_watchers) > 1000) AS top_repos | |
JOIN EACH | |
(SELECT user, repository_url, repository_language, weight FROM | |
(SELECT actor AS user, repository_url, repository_language, | |
INTEGER(COUNT(repository_url)) AS weight | |
FROM [publicdata:samples.github_timeline] |
This file contains hidden or 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
SELECT actor, repository_owner, repository_name, repository_language, count(repository_name) AS pushes | |
FROM [publicdata:samples.github_timeline] | |
WHERE type='PushEvent' | |
AND repository_url IN | |
(SELECT repository_url FROM | |
(SELECT repository_url, MAX(repository_watchers) | |
FROM [publicdata:samples.github_timeline] | |
GROUP BY repository_url | |
HAVING MAX(repository_watchers) > 1000)) | |
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-01-01 00:00:00') |
This file contains hidden or 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
/* Fetch data from GitHub Archive using Google's BigQuery */ | |
select actor, repository_language, count(repository_language) as pushes | |
from [githubarchive:github.timeline] | |
where type='PushEvent' | |
and repository_language != '' | |
and PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2012-01-01 00:00:00') | |
and PARSE_UTC_USEC(created_at) < PARSE_UTC_USEC('2013-01-01 00:00:00') | |
group by actor, repository_language; |
This file contains hidden or 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/python | |
def incnums(mx, amt, nums): | |
if len(nums) == 0: | |
nums.append(-1) | |
(q, r) = divmod(nums[-1] + amt, mx + 1) | |
nums.pop() | |
if q > 0: | |
incnums(mx, q, nums) | |
nums.append(r) |
NewerOlder