Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/h/e/helios-HEAD/models/modelsbase.py   helios(Download)
    election_obj = self.election.toElection()
    vote_dict = utils.from_json(votes_json_string)
    enc_vote = electionalgs.EncryptedVote.fromJSONDict(vote_dict, pk)
 
    # verify
      return None
 
    return electionalgs.EncryptedVote.fromJSONDict(vote_dict)
 
  def toJSONDict(self, with_vote = False, with_vote_hash = True):

src/h/e/helios-HEAD/helios/models.py   helios(Download)
      return None
 
    return electionalgs.EncryptedVote.fromJSONDict(vote_dict)
 
  def toJSONDict(self, with_vote = False, with_vote_hash = True):

src/h/e/helios-server-HEAD/helios/views.py   helios-server(Download)
def post_audited_ballot(request, election):
  if request.method == "POST":
    raw_vote = request.POST['audited_ballot']
    encrypted_vote = electionalgs.EncryptedVote.fromJSONDict(utils.from_json(raw_vote))
    vote_hash = encrypted_vote.get_hash()

src/h/e/helios-HEAD/tests/electionalgs.py   helios(Download)
 
# ballot #1 - 6nGjE9hDIJh+gJLbBs+V8gCnqwM, ice-cream
ballot_1 = electionalgs.EncryptedVote.fromJSONDict(utils.from_json("""
{"answers": [{"choices": [{"alpha":
"79423156875790789386636380711411557382011404179785862301851615012301997738581616233606306565176776628181638207312074846014426085937540815198122397466359879439087155788105406682550892189407933604393108898921993667488924252715342976726016778309376458081564159805006567274567646092947902027698679865295747216740",
 
# ballot #2 - Ma90MRM+iLZWxxUiTirbpaqp8eo, cake
ballot_2 = electionalgs.EncryptedVote.fromJSONDict(utils.from_json("""
{"answers": [{"choices": [{"alpha":
"78454100981663368932465092656713871228650967506558712658782406784793844667524153043017923922103073546870759419965815858066146308905943442162975343983537456635838087185992821971940516811024302718972657843807895907317281950662914815422978817105940419155005672363749089725684818849347832835161343273445397826761",
 
# ballot #3 - RRI4Vs+l40uTpLoCSrydmmQ8B34, cake
ballot_3 = electionalgs.EncryptedVote.fromJSONDict(utils.from_json("""
{"answers": [{"choices": [{"alpha":
"81642020430918166775570713406678183593369218820302857306382356094089432167331031079478937392783784933853806670480533268149150236392032485249401254538644938600711126772133477730707354118162610947778313074625833147828602732618924961354100147804929046782888380639576059324126310799930140580197582333069780133121",