MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
void | |
montecarlo_thomson_scatter (rpacket_t * packet, storage_model_t * storage, | |
double distance) | |
{ | |
double comov_energy, doppler_factor, comov_nu, inverse_doppler_factor; | |
doppler_factor = move_packet (packet, storage, distance); | |
comov_nu = rpacket_get_nu (packet) * doppler_factor; | |
comov_energy = rpacket_get_energy (packet) * doppler_factor; | |
rpacket_set_mu (packet, 2.0 * rk_double (&mt_state) - 1.0); | |
inverse_doppler_factor = 1.0 / rpacket_doppler_factor (packet, storage); |
def test_element_symbol_reformatter(): | |
def _test_element_symbol_reformatter( | |
unformatted_element_string, formatted_element_string): | |
assert reformat_element_symbol( | |
unformatted_element_string) == formatted_element_string | |
data = [('si', 'Si'), | |
('sI', 'Si'), | |
('Si', 'Si'), | |
('c', 'C'), |
def test_element_symbol_reformatter(): | |
def _test_element_symbol_reformatter( | |
unformatted_element_string, formatted_element_string): | |
assert reformat_element_symbol( | |
unformatted_element_string) != formatted_element_string | |
data = [('si', 'Si'), | |
('sI', 'Si'), | |
('Si', 'Si'), | |
('c', 'C'), |
@pytest.mark.parametrize( | |
"unformatted_element_string, formatted_element_string", [ | |
('si', 'Si'), | |
('sI', 'Si'), | |
('Si', 'Si'), | |
('c', 'C'), | |
('C', 'C'), | |
]) | |
def test_element_symbol_reformatter( | |
unformatted_element_string, formatted_element_string): |
## The idea | |
The idea was to have a frontend for a streaming data of json documents and a way to notify of any updates/deletes. So technically we want the browser to do just one thing - update the frontend as new document comes in or if something changes and we wanted it to be good at just that. | |
## React ? Seriously ? | |
We chose react to build this since it deals well with one thing in particular - How to update the DOM from state A to state B in the most optimal way(less read/writes). You can control the DOM without exactly telling how to reach there, but just by telling what it should look like in an object-oriented fashion. Plus its a perfect library for frontend. Other options like angular and JQuery fall into the category of frameworks which let you manipulate the DOM "easily". This is sometimes bad since we just want the template to render the data in a particular fashion once we let it know what the data is. Refer to "Why so much code?" section for more detail. | |
## Ohh but .. | |
Note : that I am not talking |
# At the end of this file | |
alias <new-alias-without-quotes>='<existing-command-in-quotes>' |
# Fork your repo example, the following is link to mine | |
https://github.com/kaushik94/privacybadgerchrome | |
# On your terminal | |
git clone https://github.com/kaushik94/privacybadgerchrome | |
# Install and run tests, then checkout another branch | |
# and name it in a way that resonates with the issue being solved | |
git checkout -b <new-branch-name-withou-these-brackets> |
#!/usr/bin/env python2.7 | |
from __future__ import print_function | |
import commands | |
import os | |
import stat | |
from gitlab import Gitlab | |
def get_clone_commands(token, repo_root): | |
con = Gitlab("http://gitlab.your.domain", token) |
# This will destroy any local modifications. | |
# Don't do it if you have uncommitted work you want to keep. | |
git reset --hard 0d1d7fc32 | |
# Alternatively, if there's work to keep: | |
git stash | |
git reset --hard 0d1d7fc32 | |
git stash pop | |
# This saves the modifications, then reapplies that patch after resetting. | |
# You could get merge conflicts, if you've modified things which were |