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 ortools.sat.python import cp_model | |
| persons = ['robert', 'john', 'george', 'yolando', 'christine', 'barbara'] | |
| rooms = ['kitchen', 'bathroom', 'dining', 'living', 'pantry', 'study'] | |
| weapons = ['bag', 'firearm', 'gas', 'knife', 'poison', 'rope'] | |
| robert, john, george, yolando, christine, barbara = 0, 1, 2, 3, 4, 5 | |
| kitchen, bathroom, dining, living, pantry, study = 0, 1, 2, 3, 4, 5 | |
| bag, firearm, gas, knife, poison, rope = 0, 1, 2, 3, 4, 5 |
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
| # HELP disk_storage_available Total available space left on the disk | |
| # TYPE disk_storage_available gauge | |
| disk_storage_available{disk=""} 3.221216e+09 | |
| # HELP disk_storage_total Total space on the disk | |
| # TYPE disk_storage_total gauge | |
| disk_storage_total{disk=""} 3.221225472e+09 | |
| # HELP disk_storage_used Total disk storage used on the disk | |
| # TYPE disk_storage_used gauge | |
| disk_storage_used{disk=""} 9472 | |
| # HELP go_gc_duration_seconds A summary of the GC invocation durations. |
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 jumpscale.loader import j | |
| from time import sleep | |
| import random | |
| import uuid | |
| import os | |
| zos = j.sals.zos | |
| FREEFARM_ID = 71 | |
| MAZR3A_ID = 13619 |
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 jumpscale.loader import j | |
| from time import sleep | |
| import random | |
| import uuid | |
| zos = j.sals.zos | |
| FREEFARM_ID = 71 | |
| MAZR3A_ID = 13619 |
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 pickle | |
| from pprint import pprint | |
| import os | |
| import io | |
| class SmartUnpickler(pickle.Unpickler): | |
| def __init__(self): | |
| self.session_reader = SessionReader() | |
| super().__init__(self.session_reader) |
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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| template <class T> | |
| class TimeMachine{ | |
| private: | |
| class Wrapper{ | |
| private: | |
| TimeMachine& tm; |
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
| #include <bits/stdc++.h> | |
| #include <complex> | |
| using namespace std; | |
| typedef long long ll; | |
| typedef complex<double> Complex; | |
| const Complex J(0, 1); | |
| int logint(int n){ | |
| int lg = 0; | |
| while((1 << lg) < n) |
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 scipy.io.wavfile import read | |
| from scipy.signal import resample | |
| import numpy as np | |
| import math | |
| import sys | |
| if len(sys.argv) < 3: | |
| print("Usage: script <clear.wav> <noisy.wav>") | |
| exit(0) | |
| def unit_vector(vector): |
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
| class AttrDict: | |
| def __init__(self, normal_dict): | |
| for el in normal_dict: | |
| if type(normal_dict[el]) == dict: | |
| self.__dict__[el] = AttrDict(normal_dict[el]) | |
| else: | |
| self.__dict__[el] = normal_dict[el] | |
| def __setitem__(self, key, val): | |
| if type(val) == dict: |
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
| #include <bits/stdc++.h> | |
| #define ll long long | |
| #define int ll | |
| using namespace std; | |
| struct Node{ | |
| int key, pr; | |
| int sz, mx, mn, mnans; | |
| Node* p; | |
| Node* l, *r; |