Skip to content

Instantly share code, notes, and snippets.

View szaniewski's full-sized avatar
🌴
On vacation

Michał Szaniewski szaniewski

🌴
On vacation
View GitHub Profile
import time
import numpy as np
import matplotlib.pyplot as plt
import dynamiqs as dq
import jax.numpy as jnp
from qutip import destroy, mesolve, coherent
# Function to measure execution time (without JIT for JAX)
def measure_execution_time(func, *args, warmup=False, **kwargs):
@szaniewski
szaniewski / gist:334af51ef3e66065e2676a34ff7842fb
Created June 15, 2021 13:41 — forked from thegdshop/gist:3171026
WooCommerce - Add checkbox field to the checkout
<?php
/**
* Add checkbox field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my-new-field"><h3>'.__('My Checkbox: ').'</h3>';
<?php
$db_connect = mysqli_connect('localhost', 'login', 'haslo','db');
$cieplo = $_POST['hot'];
$numer = $_POST['numer'];
function hotOrNot($number, $cieplo){
if($cieplo = 'hot') {
$menu = $article->templates->menu;
$i = 1;
foreach($categories as $categorie ){
$last_article_ids[] = $categorie->last_article->id;
}
foreach($last_article_ids as $cat){
$menu = str_replace('{'.$i.'}',$cat,$menu);
$i++
@szaniewski
szaniewski / hi
Created May 25, 2020 13:53
Most of semantick html code
<h1>Hi</h1>
$(document).ready(function() {
$(‘.fancybox-button’).fancybox();
new WOW().init();
});
@szaniewski
szaniewski / dabblet.css
Created January 16, 2014 08:08
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;