Skip to content

Instantly share code, notes, and snippets.

View Phyks's full-sized avatar

Lucas Verney Phyks

View GitHub Profile
{'author Barahona, F. title On the computational complexity of I sing spin glass models . journal Journal of Physics A: Mathematical and General volume 15 , pages 3241 ( year 1982 )': 'http://dx.doi.org/10.1088/0305-4470/15/10/028',
'author Bennett, C. , author Bernstein, E. , author Brassard, G. author Vazirani, U. title Strengths and weaknesses of quantum computing . journal SIAM Journal on Computing volume 26 , pages 1510-1523 ( year 1997 )': 'http://dx.doi.org/10.1137/s0097539796300933',
'author Berkley, A. J. et al. title A scalable readout system for a superconducting adiabatic quantum optimization system . journal Superconductor Science and Technology volume 23 , pages 105014 ( year 2010 )': 'http://dx.doi.org/10.1088/0953-2048/23/10/105014',
'author Berry, D. W. , author Childs, A. M. , author Cleve, R. , author Kothari, R. author Somma, R. D. title Exponential improvement in precision for simulating sparse hamiltonians . journal arXiv:1312.1414 ( year 2013 )': 'http://arxiv.org/abs/1312.1414',
'a
{'Abrikosov A. A., Gorʹkov L. P., Dzyaloshinski I. E. Dzi͡aloshinskiĭ I. E. Methods Of Quantum Field Theory In Statistical Physics (Dover Publications) 1975': None,
'Arnold P. Moore G. Phys. Rev. Lett. 87 2001 120401': None,
'Baym G., Blaizot J.-P., Holzmann M., Lalo e F. Vautherin D. Phys. Rev. Lett. 83 1999 1703': 'http://dx.doi.org/10.1103/physrevlett.83.1703',
"Capogrosso-Sansone B., Giorgini S., Pilati S., Pollet L., Prokof'ev N., Svistunov B. Troyer M. New Journal of Physics 12 2010 043010": 'http://dx.doi.org/10.1088/1367-2630/12/4/043010',
'Donnelly R. J. Phys. Today 62 2009 34–39': 'http://dx.doi.org/10.1063/1.3248499',
'Griffin A. Zaremba E. Phys. Rev. A 56 1997 4839': 'http://dx.doi.org/10.1103/physreva.56.4839',
'Hou Y.-H., Pitaevskii L. P. Stringari S. Phys. Rev. A 88 2013 043630': 'http://dx.doi.org/10.1103/physreva.88.043630',
'Hu H., Taylor E., Liu X.-J., Stringari S. Griffin A. New Journal of Physics 12 2010 043040': 'http://dx.doi.org/10.1088/1367-2630/12/4/043040',
"Kashurnikov V. A
{'author Barahona, F. title On the computational complexity of I sing spin glass models . journal Journal of Physics A: Mathematical and General volume 15 , pages 3241 ( year 1982 )': 'http://dx.doi.org/10.1088/0305-4470/15/10/028',
'author Bennett, C. , author Bernstein, E. , author Brassard, G. author Vazirani, U. title Strengths and weaknesses of quantum computing . journal SIAM Journal on Computing volume 26 , pages 1510-1523 ( year 1997 )': 'http://dx.doi.org/10.1137/s0097539796300933',
'author Berkley, A. J. et al. title A scalable readout system for a superconducting adiabatic quantum optimization system . journal Superconductor Science and Technology volume 23 , pages 105014 ( year 2010 )': 'http://dx.doi.org/10.1088/0953-2048/23/10/105014',
'author Berry, D. W. , author Childs, A. M. , author Cleve, R. , author Kothari, R. author Somma, R. D. title Exponential improvement in precision for simulating sparse hamiltonians . journal arXiv:1312.1414 ( year 2013 )': 'http://arxiv.org/abs/1312.1414',
'a
@Phyks
Phyks / mirror_ftp.py
Last active April 26, 2022 14:30
Mirror a distant FTP using Python and lftp
#!/usr/bin/env python
"""
Simple Python wrapper around lftp to mirror a remote ftp onto a local folder.
New files are downloaded, deleted files are marked for removal in a TO_DELETE.sh
script.
"""
import os
import pprint
import re
@Phyks
Phyks / FreederAPI
Last active August 29, 2015 14:12
FreederAPI
## Open questions
* Right endpoint to tag an entry ? a feed ? (in /feed, resp /entry, or in /tag)
* Right endpoint to share an entry ? (in /entry or in /share)
## Feeds endpoint
* GET /feeds
* Get a list of all the available feeds.
@Phyks
Phyks / Diaspora init script
Created August 6, 2014 18:32
Diaspora init script. Stop() is not fully working…
#!/bin/sh
### BEGIN INIT INFO
# Provides: diaspora
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts diaspora
# Description: starts diaspora using start-stop-daemon
### END INIT INFO
<?php
//$thumbdir = str_replace('/..', '', $thumbdir); // Prevent directory traversal attacks.
if(strstr($thumbdir, '..') !== FALSE) {
$requestedDir = '';
$thumbdir = rtrim('photos/','/');
}
?>
def notifs_emprunts(self, serv):
"""Notifications when borrowing is over"""
now = datetime.datetime.now()
1h_later = now + datetime.timedelta(hours=1)
query = ("SELECT borrower, tool, until FROM borrowings " +
"WHERE until BETWEEN %s AND %s")
try:
self.bdd_cursor.execute(query, (now, 1h_later))
except mysql.connector.errors.Error:
serv.say(serv,
#!/usr/bin/env python2
# -*- coding: utf8 -*-
# -----------------------------------------------------------------------------
# "THE NO-ALCOHOL BEER-WARE LICENSE" (Revision 42):
# Phyks ([email protected]) wrote or updated these files for hackEns. As long
# as you retain this notice you can do whatever you want with this stuff
# (and you can also do whatever you want with this stuff without retaining it,
# but that's not cool...).
#
# If we meet some day, and you think this stuff is worth it, you can buy us a
def function_toute_prete(y):
return y
def operation(n):
"""
operation(n) is a function that adds n to its argument if n = 0 [2] or multiply n by its two arguments if n = 1 [2].
For instance, add(3) : x -> x * 3
"""
functions = [