This file contains 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
```c++ | |
template<class V> | |
using AvialMap = std::map<std::string, V>; | |
namespace Meta | |
{ | |
template<class, uint8_t depth> | |
struct RecursiveMapDepthAux : std::integral_constant<uint8_t, depth> | |
{}; | |
template<class K, class V, uint8_t depth> | |
struct RecursiveMapDepthAux<std::map<K, V>, depth> : RecursiveMapDepthAux<V, depth + 1> |
This file contains 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 numpy as np | |
import cv2 | |
import tsp | |
import pickle as pkl | |
def euclidian_distance(x1, x2): | |
return np.sqrt((x2[0] - x1[0]) ** 2 + (x2[1] - x1[1]) ** 2) | |
This file contains 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 EMDEHGDataset(Dataset): | |
def __init__(self, log_eps=1e-6, filt=None, channels=(2,), truncate=True, average_time=False): | |
super(EMDEHGDataset, self).__init__() | |
assert sum([int(x > 2) for x in channels]) == 0, 'Invalid channel number, can only be in {0, 1, 2}' | |
assert filt is None or filt in ['f1', 'f2', 'f3'], 'Invalid filter option, must be either None or of f1, f2, f3' | |
if filt is None: | |
offset = 0 | |
elif filt == 'f1': |
This file contains 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
#!/usr/bin/env python | |
# OH NO ! IT'S RETARDED !! | |
''' | |
1, 1 [[ 0.94235238 0.4 ] | |
[ 0. 0. ] | |
[ 0. 0. ] | |
[-0.4 -1.35506596] | |
[ 0. 0. ] |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Éditeur de Spyder | |
Ceci est un script temporaire. | |
""" | |
import logging | |
import torchtext.datasets as datasets | |
import torchtext.data as data |
This file contains 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Nov 5 17:22:52 2018 | |
@author: Vladslinger """ | |
import torch | |
from torchvision import datasets, transforms | |
def generate_linear_layers(in_size, out_size, layer_count): | |
return [torch.nn.Linear(in_size, in_size) for _ in range(layer_count)] |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" /> | |
</content> | |
<orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
<component name="PyDocumentationSettings"> |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Éditeur de Spyder | |
Ceci est un script temporaire. | |
""" | |
import torch | |
from torchvision import datasets, transforms | |
from math import sqrt |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon May 7 23:34:58 2018 | |
@author: admin | |
""" | |
from sklearn import linear_model | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import rgb_to_hsv |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Apr 11 11:01:05 2018 | |
@author: 3775548 | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import random |
NewerOlder