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 { createStore, createEffect } from 'effector'; | |
import { listApi } from '../../api/Todo'; | |
const listStore = createStore([]); | |
const stateStore = createStore('INIT'); | |
const loadTodoList = createEffect(() => listApi()); | |
stateStore.on(loadTodoList, () => 'LOADING'); |
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
const int2ip = (ipInt) => ( | |
(ipInt >>> 24) + '.' + | |
(ipInt >> 16 & 255) + '.' + | |
(ipInt >> 8 & 255) + '.' + | |
(ipInt & 255) | |
); | |
const ip2int = (ip) => ip.split('.').reduce( | |
(ipInt, octet) => (ipInt << 8) + parseInt(octet, 10), 0 | |
) >>> 0; |
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
is_outlier = lambda group: (np.abs(group - group.mean()) > 2 * group.std()).astype(int) | |
factors = df.select_dtypes(exclude=[np.number]).columns.tolist() | |
df['is_outlier'] = df.groupby(factors).transform(is_outlier) |
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
"use strict"; | |
function _toConsumableArray(arr) { | |
if (Array.isArray(arr)) { | |
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { | |
arr2[i] = arr[i]; | |
} | |
return arr2; | |
} else { | |
return Array.from(arr); |
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
"use strict"; | |
var currying = function currying(fn) { | |
var fun = function fun() { | |
for (var _len = arguments.length, orig = Array(_len), _key = 0; _key < _len; _key++) { | |
orig[_key] = arguments[_key]; | |
} | |
var inner = function inner() { | |
for (var _len2 = arguments.length, val = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { |
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
#!/usr/bin/env python | |
import random | |
multipliers=[2, 4, 10, 3, 5, 9, 4, 6, 8] | |
N10=0 | |
result="" | |
random.seed() | |
for i in range(0, 9): | |
N = random.randint(0, 9) |
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
#!/usr/bin/python | |
import argparse | |
import requests | |
def send_request(params): | |
r = requests.post('http://online-generators.ru/ajax.php', data=params) | |
return r.text |
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
group 'test.thrift' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'java' | |
allprojects { | |
apply plugin: "idea" | |
} | |
sourceCompatibility = 1.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
#!/usr/bin/env python | |
import random | |
multipliers=[2, 4, 10, 3, 5, 9, 4, 6, 8] | |
N10=0 | |
result="" | |
random.seed() | |
for i in range(0, 9): | |
N = random.randint(0, 9) |