I hereby claim:
- I am z2s8 on github.
- I am z2s8 (https://keybase.io/z2s8) on keybase.
- I have a public key whose fingerprint is 282A 1D44 ABEF 174A 6925 A3BA 20C7 5F00 C13C 1D74
To claim this, I am signing this object:
| from collections import namedtuple | |
| Measurement = namedtuple('Measurement', | |
| ['town', 'time', 'direction', 'speed', 'temperature']) | |
| def format_time(raw): | |
| hour = raw[:2] | |
| minute = raw[2:] | |
| return f'{hour}:{minute}' |
| [2017-03-27 19:17:12][ fedmsg ERROR] Failed to load plugin from EntryPoint.parse('newy = statscache_plugins.new_statscache_plugin:Plugin') | |
| Traceback (most recent call last): | |
| File "/var/tmp/stats/statscache/statscache/utils.py", line 95, in init_plugins | |
| entry_object = entry_point.load() | |
| File "/var/tmp/stats/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load | |
| return self.resolve() | |
| File "/var/tmp/stats/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve | |
| module = __import__(self.module_name, fromlist=['__name__'], level=0) | |
| File "/var/tmp/stats/statscache_plugins/statscache_plugins/new_statscache_plugin.py", line 6, in <module> | |
| class Model(BaseModel): |
I hereby claim:
To claim this, I am signing this object:
| $ rubocop | |
| Inspecting 41 files | |
| ............C.................C.......... | |
| Offenses: | |
| test/api/v1/routes/exercises_test.rb:93:20: C: Always use raise to signal exceptions. | |
| error = proc { fail Exception.new("failing hard") } | |
| ^^^^ | |
| api/services/exercism_io.rb:53:7: C: Always use raise to signal exceptions. |
| #!/usr/bin/env ruby | |
| def save_line(line) | |
| open('repldata', 'a') do |repldata| | |
| repldata.puts "puts %s(> #{line.rstrip})" | |
| repldata.puts "print('= ')" | |
| repldata.puts "puts(#{line})" | |
| end | |
| end |
| Python 3.5.1 (default, Dec 2015, 13:05:11) | |
| [GCC 4.8.2] on linux | |
| a=set() | |
| => None | |
| a.add(8) | |
| => None | |
| b=set([4]) | |
| => None | |
| a |
| # based on developer.github.com/webhooks/securing | |
| require "openssl" | |
| require "openssl/hmac" | |
| # constant time string comparison between fixed length strings | |
| # forked from github.com/rack/rack, modified to work with crystal | |
| def secure_compare(a, b) | |
| return false unless a.bytesize == b.bytesize |
| NUMBER_OF_PRIMES = 150000 | |
| primes = [2] | |
| test_number = 2 | |
| primes_found = 0 | |
| while primes_found < NUMBER_OF_PRIMES | |
| test_primitiveness = true | |
| i = 0 | |
| while (primes.size > i && primes[i] <= Math.sqrt(test_number) && test_primitiveness) | |
| if test_number % primes[i] == 0 |
| require "math" | |
| NUMBER_OF_PRIMES = 1500000 | |
| primes = [2] | |
| test_number = 2 | |
| primes_found = 0 | |
| while primes_found < NUMBER_OF_PRIMES | |
| test_primitiveness = true | |
| i = 0 |
| from collections import namedtuple | |
| from decimal import Decimal | |
| def reszfeladat(n): # sorszam kiirasa | |
| print('{}. feladat'.format(n)) | |
| def kepviselo_ki(kepviselo): # kimenet formazas osszes tulajdonsagra | |
| part = kepviselo.part if kepviselo.part != '-' else 'fuggetlen' | |
| return '{} {} {} {}'.format(kepviselo.kerulet, kepviselo.v_nev, | |
| kepviselo.u_nev, part) |