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 nltk | |
from nltk.book import * | |
text1 | |
text2 | |
text1.concordance("monstrous") | |
text2.concordance("monstrous") | |
text1.similar("monstrous") |
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
def sumSeries(first, ratio, n): | |
return (first*(1-(ratio)**n))/(1-ratio) |
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
const transResources = { | |
'projects':{ | |
1: '1 стул выбран', | |
4: '{{number}} стула выбрано', | |
5: '{{numerb}} стульев выбрано' | |
}1 | |
}; | |
class CoreServices { | |
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 math | |
class Vector(object): | |
def __init__(self, coordinates): | |
try: | |
if not coordinates: | |
raise ValueError | |
self.coordinates = tuple(coordinates) | |
self.dimension = len(coordinates) |
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 matplotlib.pyplot as plt | |
from scipy.stats import norm | |
data = np.random.normal(7.3, 1.43, 20) | |
d = [x for x in np.ceil(data) if x <= 10] | |
plt.hist(d, bins=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], range=(1,11), color="red", align="left") | |
plt.title('Title') | |
plt.show() |
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 { get, set } from 'lodash'; | |
// import 'object to paths' converter from here https://gist.github.com/AlexDel/9f9f732f77ffa8bb10b4f4967a6513d8 | |
import getPaths from 'helpers'; | |
// service uses new settings structure from here https://gist.github.com/AlexDel/007771d7c6d2b1415d7275557a9a432b | |
import { EvernoteSettings } from 'Settings'; | |
class SettingsService { | |
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
const evernoteSeetings = { | |
source: { | |
mode: { | |
default: 'simple', | |
availableValues: [ | |
{ name: constantOptions.simple, description: 'simple' }, | |
{ name: constantOptions.advanced, description: 'advanced' } | |
], | |
validation: { | |
presence: true, |
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
tt |
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
const testObj = { | |
prop1: { | |
child1: 'test', | |
}, | |
prop2: 'test2' | |
}; | |
function getPaths(obj) { | |
let pathsArray = []; |
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
let webpackConfig = { | |
devtool: 'inline-source-map', | |
output: { | |
filename: 'bundle.js', | |
publicPath: '/build/', | |
path: path.resolve(__dirname, './public') | |
}, | |
module: { | |
loaders: [ |