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 can_we_go_to_bar(people_in_group): | |
able_to_drink = [] | |
underage = [] | |
for i in range(len(people_in_group)): | |
#Add to list if can drink and likes to | |
if people_in_group[i]['age'] >= 21 and people_in_group[i]['drinks'] == True: | |
able_to_drink.append(people_in_group[i]) | |
else: | |
underage.append(people_in_group[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
function encrypt(mess, key){ | |
var i = (mess.length)/(key.length); | |
while (i>0){ | |
key +=key; | |
i--; | |
} | |
key = key.substring(0, mess.length); | |
console.log('message is',mess) | |
console.log('key is',key.length); |
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
Fatal error: Uncaught exception 'DB_Exception' with message 'Error performing MySQL query. Error message: "Table 'beluga.SongTimeSeries_Day_Streams_SongIDMod10Equals5' doesn't exist," error number: 1146, query: "SELECT value, TSDate date | |
FROM SongTimeSeries_Day_Streams_SongIDMod10Equals5 | |
WHERE SongID = 32112155 | |
AND TSDate BETWEEN '2011-07-01' AND '2011-12-16'."' in /opt/lib/weblib/DB.php:300 | |
Stack trace: | |
#0 /opt/lib/weblib/DB.php(496): DB->query('SELECT value, T...') | |
#1 /home/marco/code/beluga/lib/TimeseriesHelper.php(100): DB->getAllAssoc('SELECT value, T...') | |
#2 /home/marco/code/beluga/lib/Song/ActivityReport.php(23): TimeseriesHelper::getDailyTimeSeries('SongTimeSeries_...', 'SongID', 32112155, '2011-07-01', '2011-12-16') | |
#3 [internal function]: Song_ActivityReport::getDailyStreams(32112155, '2011-07-01', '2011-12-16') | |
#4 /home/marco/code/beluga/lib/RPCizzle.php(43): call_user_func_array('Song_ActivityRe...', Array) |
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
*** proof-of-concept.c | |
/* | |
* Linux vmsplice Local Root Exploit | |
* By qaaz | |
* | |
* Linux 2.6.17 - 2.6.24.1 | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.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
#include <iostream> | |
#include <string> | |
#include <limits> | |
int INPUT_MESSAGE = 1; | |
int ENCRYPT = 2; | |
int DECRYPT = 3; | |
int ANALYZE = 4; |
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
#include <iostream> | |
#include <string> | |
#include <limits> | |
int INPUT_MESSAGE = 1; | |
int ENCRYPT = 2; | |
int DECRYPT = 3; | |
int ANALYZE = 4; |
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
-- file = "mux45.vhd" , VHDL Representation of 4:1 Mux | |
-- note: these two dashes are used to creat a comment line in VHDL | |
-- VHDL is very syntax specific; Pay close attention to the details below. | |
library ieee; -- Specific VHDL library we will use that has definitions | |
-- of the variable types shown in the PORT statement below. | |
-- This library also supports the functions (and, OR & not) | |
-- we will use in the ARCHITECTURE section. | |
use ieee.std_logic_1164.all; -- The package that containing several libraries (including ieee). | |
-- This is like an include statement in 'C'. |
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
/** | |
* Move in a circle without wrapper elements | |
* Idea by Aryeh Gregor, simplified by Lea Verou | |
*/ | |
@keyframes rot { | |
from{ | |
transform: translate3d(450px,0,0); | |
} |
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
/** | |
* Move in a circle without wrapper elements | |
* Idea by Aryeh Gregor, simplified by Lea Verou | |
*/ | |
@keyframes rot { | |
from { | |
transform: rotate(0deg) | |
translate(-150px) | |
rotate(0deg); |
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 org.myorg; | |
import java.io.IOException; | |
import java.util.*; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.io.*; | |
import org.apache.hadoop.mapred.*; | |
import org.apache.hadoop.util.*; |
OlderNewer