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
--- a/drivers/net/wireless/b43/leds.c | |
+++ b/drivers/net/wireless/b43/leds.c | |
@@ -199,7 +199,7 @@ void b43_leds_init(struct b43_wldev *dev | |
sprom[2] = bus->sprom.gpio2; | |
sprom[3] = bus->sprom.gpio3; | |
- for (i = 0; i < 4; i++) { | |
+ for (i = 0; i < 2; i++) { | |
if (sprom[i] == 0xFF) { | |
/* There is no LED information in the SPROM |
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
Index: Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | |
=================================================================== | |
--- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp (revision 6634) | |
+++ Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp (working copy) | |
@@ -25,6 +25,10 @@ | |
#include <algorithm> | |
#include <fstream> | |
+#include <sys/types.h> | |
+#include <sys/stat.h> |
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
#!/bin/sh | |
DEVICE='/dev/disk/by-label/NIELS' | |
WAIT=10 | |
MOUNTP='/tmp/cryptkey' | |
FSTYPE=vfat | |
FSOPTS='uid=0,gid=0,codepage=850,iocharset=iso8859-1,utf8' | |
FSPATH='niels' | |
rc=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
#!/usr/bin/env python | |
from __future__ import division | |
import sys | |
import math | |
OVERSAMPLING_FACTOR = 1 | |
SAMPLING_FREQUENCY = 48000 * OVERSAMPLING_FACTOR | |
PASSES = 100000 |
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
@handler('read', channel=channel_upstream) | |
def read(self, data): | |
offset = 0 | |
while True: | |
shift = 0 | |
size = 0 | |
while True | |
if offset >= len(data): |
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
#!/usr/bin/env python | |
import hashlib | |
def chunked_sha1sum(filelike, chunk_size=0x100000): | |
hasher = hashlib.new('sha1') | |
while True: | |
chunk = filelike.read(chunk_size) |
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
#!/usr/bin/env python | |
import itertools | |
lines = ['one', 'two', 'three'] | |
it, it_look_ahead = itertools.tee(lines) | |
next(it_look_ahead) | |
for line in it: |
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
#!/usr/bin/env python | |
import numpy as np | |
def np_find_1d(needle, haystack): | |
needle = np.asanyarray(needle) | |
haystack = np.ascontiguousarray(haystack) | |
assert needle.ndim == 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
//Previous code | |
a = list(map(int, raw_input().split())) | |
for i in a: | |
if a.count(i) == 1: | |
print i | |
break | |
// Current code | |
from collections import Counter |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import random | |
import sys | |
import time | |
for i in range(1000): |
OlderNewer