Guest User

Untitled

a guest
Oct 17th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. A collection of snippets that might be useful for among others:
  2.  
  3. - sql
  4. - R
  5. - python
  6. - iPython
  7. - conda
  8.  
  9. and more
  10.  
  11.  
  12. ## sql
  13. cte
  14. ```sql
  15. with cte1 as (
  16. select *
  17. from dbo.someTable
  18. ), cte2 as (
  19. select *
  20. from cte1
  21. ) select *
  22. from cte2
  23. ```
  24.  
  25.  
  26. sql switch using case:
  27. ```sql
  28. SELECT
  29. var = case
  30. when col1 = 1 then 1
  31. when col1 = 2 then 2
  32. end
  33. FROM dbo.someTable
  34. ```
  35.  
  36. ## python
  37.  
  38. ## R
  39.  
  40. ## git
  41.  
  42. ## iPython
  43. Install kernel in conda environment using:
  44. ```bash
  45. source activate myenv
  46. python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
  47. ```
  48. List/delete all jupyter kernels
  49. ```bash
  50. jupyter kernelspec list
  51. jupyter kernelspec remove myenv
  52. ```
Add Comment
Please, Sign In to add comment