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
asd |
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/python | |
import sys | |
def get_commands(): | |
commands = [] | |
with open('/home/svetlio/.zsh_history') as zsh_history: | |
for cmd in zsh_history.read().split('\n'): | |
commands.append(cmd[15:]) |
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 get_preferred_or_current_user(self, user, request_user, session_data={}): | |
client_system = getattr(request_user, 'client_system', None) | |
if not client_system: | |
return user | |
disabled_uids = self._get_disabled_uids(client_system, user) | |
preferred_user = self._get_preferred_from_session(client_system, session_data, user, disabled_uids) | |
if preferred_user: | |
return self._proccess_preferred_user(preferred_user) |
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 test_1(self, fixture1, mocker): | |
mocked = mocker.patch(path) |
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 can_rotate(time, start, end): | |
if time > end: | |
return False | |
return end % time <= end - start | |
def count_birds(times, start, end): | |
res = 0 | |
for time in times: | |
res += int(can_rotate(time, start, end)) |
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 can_rotate(time, start, end): | |
if time > end: | |
return 0 | |
return end % time <= end - start |
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
(function() { | |
function Entity(id, data) { | |
this.id = id; | |
} | |
Entity.repo = new Repository(Entity, Constants.ENTITIES_LIST_URL); | |
Entity.prototype._load = function(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
import React from 'react'; | |
import SearchForm from './SearchForm.jsx'; | |
import Results from './Results.jsx'; | |
import io from 'socket.io-client'; | |
export default class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {items: [], currentlyPlaying: ''}; |
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
function cls() { | |
this.publicFunction1 = function () { | |
return this._helperFunction1(); | |
}; | |
this._helperFunction1 = function (){}; | |
this.publicFunction2 = function () { | |
return this._helperFunction2(); | |
}; |
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
users_filterm group_filter, user_permission_filter = Q(), Q(), Q() |