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
    
  
  
    
  | # -*- coding: utf-8 -*- | |
| from inflection import underscore | |
| from sqlalchemy import inspect | |
| from sqlalchemy.orm import RelationshipProperty, joinedload, load_only | |
| class RelationshipPathNode(object): | |
| def __init__(self, value, parent=None): | |
| if parent: | |
| parent.isLeaf = False | 
  
    
      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
    
  
  
    
  | # coding: utf-8 | |
| import re | |
| from collections import defaultdict, deque | |
| from statsd.client import StatsClient, Timer | |
| class Prof(object): | |
| """Инструмент для профилирования времени исполнения кода в контексте | |
| HTTP-запроса или команды. | 
  
    
      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
    
  
  
    
  | # coding: utf-8 | |
| import threading | |
| import time | |
| from collections import deque | |
| from datetime import datetime | |
| from functools import wraps | |
| from django.utils.encoding import smart_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
    
  
  
    
  | # coding: utf-8 | |
| from cian_statprof.profiler import Profiler | |
| from cian_statprof.sampler import Sampler | |
| profiler = Profiler(Sampler(), Logger(), {'is_enabled': True}) | |
| class StatisticalProfilerMiddleware(object): | |
| def process_request(self, request): | 
  
    
      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 django.db import models | |
| from fysom_singleton import * | |
| class ItemStatus(object): | |
| NEW = 'new' | |
| NEED_INFO = 'need_info' | |
| REVIEWING = 'reviewing' | |
| REDOING = 'redoing' | |
| CONFLICT = 'conflict' | 
  
    
      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
    
  
  
    
  | # add the other files to your django app and migrate | |
| # enter django shell with python manage.py shell and execute the following | |
| # I called my app 'issues'; so change issues to your app name in case you choose another one | |
| # there are 5 models which realize state machine bindings to django models in different ways | |
| # Item: add a transitions.Machine instance to each record/item | |
| # ItemSingleton: add each model to a global transitions.Machine | |
| # ItemSingletonSet: Extend transitions.Machine to use set instead of list to store models; this increases look up speed in add_model | |
| # ItemNoMachine: just a minimal model without a state machine (for referencing purposes) | |
| # ItemFysom: add a customized fysom machine to each record/item | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    UPDATE: You don't need shims anymore! We can just use this now, and eventually it'll even be in Ember core.
app.import() works with node_modules now! As of Ember 2.15. Previously it only worked with bower_components and vendor.
Docs for app.import are here:
https://ember-cli.com/managing-dependencies#standard-non-amd-asset
  
    
      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
    
  
  
    
  | #!/bin/bash | |
| # !!WARNING!! | |
| # This will DELETE all efforts you have put into configuring nix | |
| # Have a look through everything that gets deleted / copied over | |
| nix-env -e '.*' | |
| rm -rf $HOME/.nix-* | |
| rm -rf $HOME/.config/nixpkgs |