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
def a(): | |
try: | |
return True | |
finally: | |
return False | |
print "The result of the function is: %s" % a() | |
print "The disassembly is:" | |
import dis |
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
define(['jquery', | |
'underscore', | |
'balanced', | |
'lib/forge/cipher', | |
'lib/forge/aes', | |
'lib/forge/md5', | |
'lib/forge/util'], function ($, _, balanced, _Cipher, _CipherAES, _CipherMD5, _CipherUtil) { | |
var forge = {}, | |
Cipher = _Cipher(forge), |
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
define(['jquery', | |
'underscore', | |
'lib/forge/cipher', | |
'lib/forge/aes', | |
'lib/forge/md5', | |
'lib/forge/util'], function ($, _, _Cipher, _CipherAES, _CipherMD5, _CipherUtil) { | |
var forge = {}, | |
Cipher = _Cipher(forge), | |
CipherAES = _CipherAES(forge), |
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
import base64 | |
import urllib | |
import codecs | |
from Crypto.Cipher import AES | |
from Crypto.Hash import MD5 | |
temp_token = "value from propay" | |
temp_token = codecs.encode(temp_token, 'utf-8') | |
settings = { |
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
from sqlalchemy import Column, Integer, String, create_engine, func | |
from sqlalchemy.ext.declarative import declarative_base, DeclarativeMeta | |
from sqlalchemy.orm.descriptor_props import CompositeProperty | |
from sqlalchemy.sql.functions import GenericFunction | |
from sqlalchemy.orm import composite, sessionmaker | |
from sqlalchemy.sql.expression import case | |
import sqlalchemy.types as types | |
class Money(object): | |
def __init__(self, amount, currency): |
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
let mut guard_stats: HashMap<u16, (u16, [u16; 60])> = HashMap::new(); | |
let mut current_guard_id: u16 = 0; | |
let mut current_sleep_start_time: NaiveDateTime = NaiveDateTime::from_timestamp(0, 0); | |
for entry in log_entries { | |
match entry.entry_type { | |
EntryType::StartedShift(guard_id) => current_guard_id = guard_id, | |
EntryType::StartedSleeping => current_sleep_start_time = entry.date_time, | |
EntryType::WokeUp => { | |
let _entry = guard_stats.entry(current_guard_id); | |
let mut _temp0 = 0; |
OlderNewer