commit
stringlengths
40
40
old_file
stringlengths
4
118
new_file
stringlengths
4
118
old_contents
stringlengths
0
2.94k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
444
message
stringlengths
16
3.45k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
5
43.2k
prompt
stringlengths
17
4.58k
response
stringlengths
1
4.43k
prompt_tagged
stringlengths
58
4.62k
response_tagged
stringlengths
1
4.43k
text
stringlengths
132
7.29k
text_tagged
stringlengths
173
7.33k
36acb0222c3b5366de148460eb858c84eec4f5a4
play.py
play.py
#! /usr/bin/env python # title :play.py # description :Decides between 2 versions of reversi # author :andresthor # date :07-02-2017 # usage :python play.py # python_version :3.5.2 # ============================================================================= # A veru crud...
Add crude way of selecting game interface/version
Add crude way of selecting game interface/version
Python
mit
andresthor/reversi
Add crude way of selecting game interface/version
#! /usr/bin/env python # title :play.py # description :Decides between 2 versions of reversi # author :andresthor # date :07-02-2017 # usage :python play.py # python_version :3.5.2 # ============================================================================= # A veru crud...
<commit_before><commit_msg>Add crude way of selecting game interface/version<commit_after>
#! /usr/bin/env python # title :play.py # description :Decides between 2 versions of reversi # author :andresthor # date :07-02-2017 # usage :python play.py # python_version :3.5.2 # ============================================================================= # A veru crud...
Add crude way of selecting game interface/version#! /usr/bin/env python # title :play.py # description :Decides between 2 versions of reversi # author :andresthor # date :07-02-2017 # usage :python play.py # python_version :3.5.2 # ===========================================...
<commit_before><commit_msg>Add crude way of selecting game interface/version<commit_after>#! /usr/bin/env python # title :play.py # description :Decides between 2 versions of reversi # author :andresthor # date :07-02-2017 # usage :python play.py # python_version :3.5.2 # ==...
5d42b027d5f438bb66de70c23b8d1631cac4ddd5
array/bubble-sort.py
array/bubble-sort.py
# Bubble sort python implementation def bubble_sort(arr): length = len(arr) for i in range(length): for j in range(0, length-i-1): if arr[j] > arr[j+1]: temp = arr[j] arr[j] = arr[j+1] arr[j] = temp return arr
Add bubble sort method in python
Add bubble sort method in python
Python
mit
derekmpham/interview-prep,derekmpham/interview-prep
Add bubble sort method in python
# Bubble sort python implementation def bubble_sort(arr): length = len(arr) for i in range(length): for j in range(0, length-i-1): if arr[j] > arr[j+1]: temp = arr[j] arr[j] = arr[j+1] arr[j] = temp return arr
<commit_before><commit_msg>Add bubble sort method in python<commit_after>
# Bubble sort python implementation def bubble_sort(arr): length = len(arr) for i in range(length): for j in range(0, length-i-1): if arr[j] > arr[j+1]: temp = arr[j] arr[j] = arr[j+1] arr[j] = temp return arr
Add bubble sort method in python# Bubble sort python implementation def bubble_sort(arr): length = len(arr) for i in range(length): for j in range(0, length-i-1): if arr[j] > arr[j+1]: temp = arr[j] arr[j] = arr[j+1] arr[j] = temp return arr
<commit_before><commit_msg>Add bubble sort method in python<commit_after># Bubble sort python implementation def bubble_sort(arr): length = len(arr) for i in range(length): for j in range(0, length-i-1): if arr[j] > arr[j+1]: temp = arr[j] arr[j] = arr[j+1] arr[j] = temp return arr
139936eb92ea295cae620011c93bb4a1e41a32f3
wsgi.py
wsgi.py
# Copyright (c) 2014 Matthias Klumpp <mak@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, me...
Add simple uWSGI helper script
Add simple uWSGI helper script
Python
mit
opencollab/debile-web,opencollab/debile-web,opencollab/debile-web
Add simple uWSGI helper script
# Copyright (c) 2014 Matthias Klumpp <mak@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, me...
<commit_before><commit_msg>Add simple uWSGI helper script<commit_after>
# Copyright (c) 2014 Matthias Klumpp <mak@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, me...
Add simple uWSGI helper script# Copyright (c) 2014 Matthias Klumpp <mak@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the r...
<commit_before><commit_msg>Add simple uWSGI helper script<commit_after># Copyright (c) 2014 Matthias Klumpp <mak@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restrict...
89f00372e1cf86c3ee48d292982cfca376010780
scripts/jenkins_plugins.py
scripts/jenkins_plugins.py
#!/usr/bin/env python3 """Fetch and format currently installed Jenkins plugins as puppet configuration. """ import json import sys from argparse import ArgumentParser from base64 import b64encode from datetime import datetime from urllib.request import Request, urlopen resource_template = """ ::jenkins::plugin {{ '...
Use current Jenkins plugin API to generate puppet class for plugins.
Use current Jenkins plugin API to generate puppet class for plugins. This script can connect to a live jenkins instance and fetch plugin data, then output a puppet class with the plugin versions and dependencies specified. This does not handle the job of configuring any plugins, that still needs to be done manually. ...
Python
apache-2.0
clearpathrobotics/buildfarm_deployment,clearpathrobotics/buildfarm_deployment,ros-infrastructure/buildfarm_deployment,clearpathrobotics/buildfarm_deployment,ros-infrastructure/buildfarm_deployment,ros-infrastructure/buildfarm_deployment,ros-infrastructure/buildfarm_deployment
Use current Jenkins plugin API to generate puppet class for plugins. This script can connect to a live jenkins instance and fetch plugin data, then output a puppet class with the plugin versions and dependencies specified. This does not handle the job of configuring any plugins, that still needs to be done manually. ...
#!/usr/bin/env python3 """Fetch and format currently installed Jenkins plugins as puppet configuration. """ import json import sys from argparse import ArgumentParser from base64 import b64encode from datetime import datetime from urllib.request import Request, urlopen resource_template = """ ::jenkins::plugin {{ '...
<commit_before><commit_msg>Use current Jenkins plugin API to generate puppet class for plugins. This script can connect to a live jenkins instance and fetch plugin data, then output a puppet class with the plugin versions and dependencies specified. This does not handle the job of configuring any plugins, that still ...
#!/usr/bin/env python3 """Fetch and format currently installed Jenkins plugins as puppet configuration. """ import json import sys from argparse import ArgumentParser from base64 import b64encode from datetime import datetime from urllib.request import Request, urlopen resource_template = """ ::jenkins::plugin {{ '...
Use current Jenkins plugin API to generate puppet class for plugins. This script can connect to a live jenkins instance and fetch plugin data, then output a puppet class with the plugin versions and dependencies specified. This does not handle the job of configuring any plugins, that still needs to be done manually. ...
<commit_before><commit_msg>Use current Jenkins plugin API to generate puppet class for plugins. This script can connect to a live jenkins instance and fetch plugin data, then output a puppet class with the plugin versions and dependencies specified. This does not handle the job of configuring any plugins, that still ...
8591c4eac8f90612143fe64db9a36d18f08819ad
contrib/performance/event_move.py
contrib/performance/event_move.py
from itertools import count, cycle from urllib2 import HTTPDigestAuthHandler from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, returnValue from twisted.web.client import Agent from twisted.web.http_headers import Headers from httpauth import AuthHandlerAgent from httpclient imp...
Add a benchmark for moving events between calendars
Add a benchmark for moving events between calendars git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6294 e27351fd-9f3e-4f54-a53b-843176b1656c
Python
apache-2.0
trevor/calendarserver,trevor/calendarserver,trevor/calendarserver
Add a benchmark for moving events between calendars git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6294 e27351fd-9f3e-4f54-a53b-843176b1656c
from itertools import count, cycle from urllib2 import HTTPDigestAuthHandler from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, returnValue from twisted.web.client import Agent from twisted.web.http_headers import Headers from httpauth import AuthHandlerAgent from httpclient imp...
<commit_before><commit_msg>Add a benchmark for moving events between calendars git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6294 e27351fd-9f3e-4f54-a53b-843176b1656c<commit_after>
from itertools import count, cycle from urllib2 import HTTPDigestAuthHandler from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, returnValue from twisted.web.client import Agent from twisted.web.http_headers import Headers from httpauth import AuthHandlerAgent from httpclient imp...
Add a benchmark for moving events between calendars git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6294 e27351fd-9f3e-4f54-a53b-843176b1656c from itertools import count, cycle from urllib2 import HTTPDigestAuthHandler from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks, retur...
<commit_before><commit_msg>Add a benchmark for moving events between calendars git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6294 e27351fd-9f3e-4f54-a53b-843176b1656c<commit_after> from itertools import count, cycle from urllib2 import HTTPDigestAuthHandler from twisted.internet import reactor from twisted.int...
24e21dd5e11844e333278ba580da3814ad513c1a
src/excel_sheet_column_number.py
src/excel_sheet_column_number.py
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 """ def titl...
Add solution for excel sheet column number
Add solution for excel sheet column number
Python
mit
chancyWu/leetcode
Add solution for excel sheet column number
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 """ def titl...
<commit_before><commit_msg>Add solution for excel sheet column number<commit_after>
""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 """ def titl...
Add solution for excel sheet column number""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 ...
<commit_before><commit_msg>Add solution for excel sheet column number<commit_after>""" Source : https://oj.leetcode.com/problems/excel-sheet-column-number/ Author : Changxi Wu Date : 2015-01-21 Given a column title as appear in an Excel sheet, return its corresponding column number. For example: A -> 1 B ...
b91efc73046fe1df8e7678e50464daf6a36ddab1
char_map.py
char_map.py
char_map = { 'a': 3, 'b': 6, 'c': 9, 'd': 12, 'e': 15, 'f': 18, 'g': 21, 'h': 24, 'i': 27, 'j': 30, 'k': 33, 'l': 36, 'm': 39, 'n': 42, 'o': 45, 'p': 48, 'q': 51, 'r': 54, 's': 57, 't': 60, 'u': 63, 'v': 66, 'w': 69, 'x': 72...
Create mapping of characters to percentage values
Create mapping of characters to percentage values
Python
mit
eddiezane/hackpack-cloudbit,eddiezane/hackpack-cloudbit
Create mapping of characters to percentage values
char_map = { 'a': 3, 'b': 6, 'c': 9, 'd': 12, 'e': 15, 'f': 18, 'g': 21, 'h': 24, 'i': 27, 'j': 30, 'k': 33, 'l': 36, 'm': 39, 'n': 42, 'o': 45, 'p': 48, 'q': 51, 'r': 54, 's': 57, 't': 60, 'u': 63, 'v': 66, 'w': 69, 'x': 72...
<commit_before><commit_msg>Create mapping of characters to percentage values<commit_after>
char_map = { 'a': 3, 'b': 6, 'c': 9, 'd': 12, 'e': 15, 'f': 18, 'g': 21, 'h': 24, 'i': 27, 'j': 30, 'k': 33, 'l': 36, 'm': 39, 'n': 42, 'o': 45, 'p': 48, 'q': 51, 'r': 54, 's': 57, 't': 60, 'u': 63, 'v': 66, 'w': 69, 'x': 72...
Create mapping of characters to percentage valueschar_map = { 'a': 3, 'b': 6, 'c': 9, 'd': 12, 'e': 15, 'f': 18, 'g': 21, 'h': 24, 'i': 27, 'j': 30, 'k': 33, 'l': 36, 'm': 39, 'n': 42, 'o': 45, 'p': 48, 'q': 51, 'r': 54, 's': 57, 't': 60, ...
<commit_before><commit_msg>Create mapping of characters to percentage values<commit_after>char_map = { 'a': 3, 'b': 6, 'c': 9, 'd': 12, 'e': 15, 'f': 18, 'g': 21, 'h': 24, 'i': 27, 'j': 30, 'k': 33, 'l': 36, 'm': 39, 'n': 42, 'o': 45, 'p': 48, 'q': 51,...
e291a2e117444c431d7912beaaa359b695f7ec1f
src/rosrepo/__main__.py
src/rosrepo/__main__.py
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
Make module executable with `python -m rosrepo`
Make module executable with `python -m rosrepo`
Python
apache-2.0
fkie/rosrepo,fkie/rosrepo
Make module executable with `python -m rosrepo`
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
<commit_before><commit_msg>Make module executable with `python -m rosrepo`<commit_after>
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
Make module executable with `python -m rosrepo`# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
<commit_before><commit_msg>Make module executable with `python -m rosrepo`<commit_after># coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
8faf9798d2e9a2b60b70c327ddfe916a49658816
src/Route.py
src/Route.py
from .station_map import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self.arrives = trip_attrs['destTi...
Add class for handling routes
Add class for handling routes
Python
mit
ganemone/SublimeBart,ganemone/SublimeBart,ganemone/SublimeBart,ganemone/SublimeBart
Add class for handling routes
from .station_map import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self.arrives = trip_attrs['destTi...
<commit_before><commit_msg>Add class for handling routes<commit_after>
from .station_map import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self.arrives = trip_attrs['destTi...
Add class for handling routesfrom .station_map import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs = trip_attrs['origTimeMin'] self...
<commit_before><commit_msg>Add class for handling routes<commit_after>from .station_map import station_map class Route: def __init__(self, trip_attrs, legs): self.origin = trip_attrs['origin'] self.destination = trip_attrs['destination'] self.fare = trip_attrs['fare'] self.departs...
89349fbf73b3377c73bcd5c6c44e24c3a4f62809
show_usbcamera_undistort.py
show_usbcamera_undistort.py
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # External dependencies import pickle import cv2 # Load calibration file with open( 'calibration.pkl', 'rb' ) as calibration_file : calibration = pickle.load( calibration_file ) # Get the camera camera = cv2.VideoCapture( 0 ) #...
Add a script to show undistorted images from the USB camera.
Add a script to show undistorted images from the USB camera.
Python
mit
microy/RobotVision,microy/RobotVision
Add a script to show undistorted images from the USB camera.
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # External dependencies import pickle import cv2 # Load calibration file with open( 'calibration.pkl', 'rb' ) as calibration_file : calibration = pickle.load( calibration_file ) # Get the camera camera = cv2.VideoCapture( 0 ) #...
<commit_before><commit_msg>Add a script to show undistorted images from the USB camera.<commit_after>
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # External dependencies import pickle import cv2 # Load calibration file with open( 'calibration.pkl', 'rb' ) as calibration_file : calibration = pickle.load( calibration_file ) # Get the camera camera = cv2.VideoCapture( 0 ) #...
Add a script to show undistorted images from the USB camera.#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # External dependencies import pickle import cv2 # Load calibration file with open( 'calibration.pkl', 'rb' ) as calibration_file : calibration = pickle.load( calibrat...
<commit_before><commit_msg>Add a script to show undistorted images from the USB camera.<commit_after>#! /usr/bin/env python # -*- coding:utf-8 -*- # # Show the images from a USB camera # # External dependencies import pickle import cv2 # Load calibration file with open( 'calibration.pkl', 'rb' ) as calibration_file ...
eb7dc7690ecd9f6fad5928057b1ec078a799dda4
icekit_events/migrations/0025_auto_20170519_1327.py
icekit_events/migrations/0025_auto_20170519_1327.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_events', '0024_auto_20170320_1824'), ] operations = [ migrations.AddField( model_name='eventbase', ...
Update DB migrations following upstream change in ICEkit
Update DB migrations following upstream change in ICEkit The `WorkflowStateMixin` model in django-icekit -- which is used as a basis for the `EventBase` model -- was updated with two new fields: `brief`, and `admin_notes`. This change updates the model in this project to comply with the upstream changes. And will ho...
Python
mit
ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/django-icekit
Update DB migrations following upstream change in ICEkit The `WorkflowStateMixin` model in django-icekit -- which is used as a basis for the `EventBase` model -- was updated with two new fields: `brief`, and `admin_notes`. This change updates the model in this project to comply with the upstream changes. And will ho...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_events', '0024_auto_20170320_1824'), ] operations = [ migrations.AddField( model_name='eventbase', ...
<commit_before><commit_msg>Update DB migrations following upstream change in ICEkit The `WorkflowStateMixin` model in django-icekit -- which is used as a basis for the `EventBase` model -- was updated with two new fields: `brief`, and `admin_notes`. This change updates the model in this project to comply with the ups...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icekit_events', '0024_auto_20170320_1824'), ] operations = [ migrations.AddField( model_name='eventbase', ...
Update DB migrations following upstream change in ICEkit The `WorkflowStateMixin` model in django-icekit -- which is used as a basis for the `EventBase` model -- was updated with two new fields: `brief`, and `admin_notes`. This change updates the model in this project to comply with the upstream changes. And will ho...
<commit_before><commit_msg>Update DB migrations following upstream change in ICEkit The `WorkflowStateMixin` model in django-icekit -- which is used as a basis for the `EventBase` model -- was updated with two new fields: `brief`, and `admin_notes`. This change updates the model in this project to comply with the ups...
19280f953b3eac8231466b4cceae7160737ae0e1
tests/test_text.py
tests/test_text.py
"""Unit tests for straight text output.""" import unittest import utils class TestText(utils.TestCase): def test_short_string(self): self.assertEqual(self.render('{% template %}short'), 'short') self.assertEqual(self.render('{% template %}short\n2'), 'short\n2') self.assertEqual(self.rend...
Add unit tests for straight text output
Add unit tests for straight text output
Python
bsd-3-clause
benhoyt/symplate
Add unit tests for straight text output
"""Unit tests for straight text output.""" import unittest import utils class TestText(utils.TestCase): def test_short_string(self): self.assertEqual(self.render('{% template %}short'), 'short') self.assertEqual(self.render('{% template %}short\n2'), 'short\n2') self.assertEqual(self.rend...
<commit_before><commit_msg>Add unit tests for straight text output<commit_after>
"""Unit tests for straight text output.""" import unittest import utils class TestText(utils.TestCase): def test_short_string(self): self.assertEqual(self.render('{% template %}short'), 'short') self.assertEqual(self.render('{% template %}short\n2'), 'short\n2') self.assertEqual(self.rend...
Add unit tests for straight text output"""Unit tests for straight text output.""" import unittest import utils class TestText(utils.TestCase): def test_short_string(self): self.assertEqual(self.render('{% template %}short'), 'short') self.assertEqual(self.render('{% template %}short\n2'), 'short\...
<commit_before><commit_msg>Add unit tests for straight text output<commit_after>"""Unit tests for straight text output.""" import unittest import utils class TestText(utils.TestCase): def test_short_string(self): self.assertEqual(self.render('{% template %}short'), 'short') self.assertEqual(self....
1f142cf73a14e50e11f26d6be2b8ac101504f1b9
tests/test_extended_functionality.py
tests/test_extended_functionality.py
"""Tests for non-core functionality in sandman2.""" from pytest_flask.fixtures import client exclude_tables = ('Invoice') def test_pagination(client): """Do we return paginated results when a 'page' parameter is provided?""" response = client.get('/artist?page=2') assert response.status_code == 200 a...
Clean up tests; add tests for user-defined models and pagination
Clean up tests; add tests for user-defined models and pagination
Python
apache-2.0
jeffknupp/sandman2,jeffknupp/sandman2,jeffknupp/sandman2
Clean up tests; add tests for user-defined models and pagination
"""Tests for non-core functionality in sandman2.""" from pytest_flask.fixtures import client exclude_tables = ('Invoice') def test_pagination(client): """Do we return paginated results when a 'page' parameter is provided?""" response = client.get('/artist?page=2') assert response.status_code == 200 a...
<commit_before><commit_msg>Clean up tests; add tests for user-defined models and pagination<commit_after>
"""Tests for non-core functionality in sandman2.""" from pytest_flask.fixtures import client exclude_tables = ('Invoice') def test_pagination(client): """Do we return paginated results when a 'page' parameter is provided?""" response = client.get('/artist?page=2') assert response.status_code == 200 a...
Clean up tests; add tests for user-defined models and pagination"""Tests for non-core functionality in sandman2.""" from pytest_flask.fixtures import client exclude_tables = ('Invoice') def test_pagination(client): """Do we return paginated results when a 'page' parameter is provided?""" response = client.ge...
<commit_before><commit_msg>Clean up tests; add tests for user-defined models and pagination<commit_after>"""Tests for non-core functionality in sandman2.""" from pytest_flask.fixtures import client exclude_tables = ('Invoice') def test_pagination(client): """Do we return paginated results when a 'page' parameter...
361f62bbdbcf475a65c3e6e6b04b4c896c58b9bf
traffic-monitor.py
traffic-monitor.py
#!/usr/bin/env python3 import json import requests # Configuration # To create an authentication key, see # https://msdn.microsoft.com/en-ca/library/ff701720.aspx bing_maps_auth_key = "" # Coordinates of the bounding box where traffic incidents are to be monitored # See https://msdn.microsoft.com/en-us/library/ff70...
Add script with basic traffic data retrieval
Add script with basic traffic data retrieval
Python
mit
jleung51/scripts,jleung51/scripts,jleung51/scripts
Add script with basic traffic data retrieval
#!/usr/bin/env python3 import json import requests # Configuration # To create an authentication key, see # https://msdn.microsoft.com/en-ca/library/ff701720.aspx bing_maps_auth_key = "" # Coordinates of the bounding box where traffic incidents are to be monitored # See https://msdn.microsoft.com/en-us/library/ff70...
<commit_before><commit_msg>Add script with basic traffic data retrieval<commit_after>
#!/usr/bin/env python3 import json import requests # Configuration # To create an authentication key, see # https://msdn.microsoft.com/en-ca/library/ff701720.aspx bing_maps_auth_key = "" # Coordinates of the bounding box where traffic incidents are to be monitored # See https://msdn.microsoft.com/en-us/library/ff70...
Add script with basic traffic data retrieval#!/usr/bin/env python3 import json import requests # Configuration # To create an authentication key, see # https://msdn.microsoft.com/en-ca/library/ff701720.aspx bing_maps_auth_key = "" # Coordinates of the bounding box where traffic incidents are to be monitored # See h...
<commit_before><commit_msg>Add script with basic traffic data retrieval<commit_after>#!/usr/bin/env python3 import json import requests # Configuration # To create an authentication key, see # https://msdn.microsoft.com/en-ca/library/ff701720.aspx bing_maps_auth_key = "" # Coordinates of the bounding box where traf...
a7b9860538c50e58a06f751b5f9eecde575fae2a
example/quickstart/show_time_2.py
example/quickstart/show_time_2.py
#!/usr/bin/env python import asyncio import datetime import random import websockets CONNECTIONS = set() async def register(websocket): CONNECTIONS.add(websocket) try: await websocket.wait_closed() finally: CONNECTIONS.remove(websocket) async def show_time(): while True: mess...
Add file forgotten in 731ad8c.
Add file forgotten in 731ad8c.
Python
bsd-3-clause
aaugustin/websockets,aaugustin/websockets,aaugustin/websockets,aaugustin/websockets
Add file forgotten in 731ad8c.
#!/usr/bin/env python import asyncio import datetime import random import websockets CONNECTIONS = set() async def register(websocket): CONNECTIONS.add(websocket) try: await websocket.wait_closed() finally: CONNECTIONS.remove(websocket) async def show_time(): while True: mess...
<commit_before><commit_msg>Add file forgotten in 731ad8c.<commit_after>
#!/usr/bin/env python import asyncio import datetime import random import websockets CONNECTIONS = set() async def register(websocket): CONNECTIONS.add(websocket) try: await websocket.wait_closed() finally: CONNECTIONS.remove(websocket) async def show_time(): while True: mess...
Add file forgotten in 731ad8c.#!/usr/bin/env python import asyncio import datetime import random import websockets CONNECTIONS = set() async def register(websocket): CONNECTIONS.add(websocket) try: await websocket.wait_closed() finally: CONNECTIONS.remove(websocket) async def show_time()...
<commit_before><commit_msg>Add file forgotten in 731ad8c.<commit_after>#!/usr/bin/env python import asyncio import datetime import random import websockets CONNECTIONS = set() async def register(websocket): CONNECTIONS.add(websocket) try: await websocket.wait_closed() finally: CONNECTIONS...
0d31f071b5a5ba76f484ffa49e32f34381b44281
examples/continuous_recordings.py
examples/continuous_recordings.py
#!/usr/bin/env python3 # One common issue is that Saleae records traces into memory, which means that # it can't handle very long captures. This example shows how to use scripting to # do long recordings over time. There will be brief gaps every time Saleae saves # the old recording and starts a new one. import os im...
Add example for repeated / continuous recordings
Add example for repeated / continuous recordings
Python
apache-2.0
ppannuto/python-saleae
Add example for repeated / continuous recordings
#!/usr/bin/env python3 # One common issue is that Saleae records traces into memory, which means that # it can't handle very long captures. This example shows how to use scripting to # do long recordings over time. There will be brief gaps every time Saleae saves # the old recording and starts a new one. import os im...
<commit_before><commit_msg>Add example for repeated / continuous recordings<commit_after>
#!/usr/bin/env python3 # One common issue is that Saleae records traces into memory, which means that # it can't handle very long captures. This example shows how to use scripting to # do long recordings over time. There will be brief gaps every time Saleae saves # the old recording and starts a new one. import os im...
Add example for repeated / continuous recordings#!/usr/bin/env python3 # One common issue is that Saleae records traces into memory, which means that # it can't handle very long captures. This example shows how to use scripting to # do long recordings over time. There will be brief gaps every time Saleae saves # the o...
<commit_before><commit_msg>Add example for repeated / continuous recordings<commit_after>#!/usr/bin/env python3 # One common issue is that Saleae records traces into memory, which means that # it can't handle very long captures. This example shows how to use scripting to # do long recordings over time. There will be b...
0c91b4302ca4019ab1ea7c023b592c177dddc4fe
stdnum/fi/veronumero.py
stdnum/fi/veronumero.py
# veronumero.py - functions for handling Finnish individual tax numbers # coding: utf-8 # # Copyright (C) 2017 Holvi Payment Services Oy # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
Implement Finnish individual tax number validation
Implement Finnish individual tax number validation
Python
lgpl-2.1
arthurdejong/python-stdnum,holvi/python-stdnum,arthurdejong/python-stdnum,holvi/python-stdnum,holvi/python-stdnum,arthurdejong/python-stdnum
Implement Finnish individual tax number validation
# veronumero.py - functions for handling Finnish individual tax numbers # coding: utf-8 # # Copyright (C) 2017 Holvi Payment Services Oy # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
<commit_before><commit_msg>Implement Finnish individual tax number validation<commit_after>
# veronumero.py - functions for handling Finnish individual tax numbers # coding: utf-8 # # Copyright (C) 2017 Holvi Payment Services Oy # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publish...
Implement Finnish individual tax number validation# veronumero.py - functions for handling Finnish individual tax numbers # coding: utf-8 # # Copyright (C) 2017 Holvi Payment Services Oy # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of ...
<commit_before><commit_msg>Implement Finnish individual tax number validation<commit_after># veronumero.py - functions for handling Finnish individual tax numbers # coding: utf-8 # # Copyright (C) 2017 Holvi Payment Services Oy # Copyright (C) 2017 Arthur de Jong # # This library is free software; you can redistribute ...
58a60d2380bd0a9768b1ca4eaee713c31ea8790e
tests/test_base.py
tests/test_base.py
import pytest from celery.schedules import crontab from scrapi import _Registry from scrapi.base import BaseHarvester from scrapi.base import HarvesterMeta @pytest.fixture def mock_registry(monkeypatch): registry = _Registry() monkeypatch.setattr('scrapi.base.registry', registry) return registry @pyte...
Add some tests for base.py
Add some tests for base.py
Python
apache-2.0
fabianvf/scrapi,ostwald/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,erinspace/scrapi,alexgarciac/scrapi,felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,jeffreyliu3230/scrapi,mehanig/scrapi,icereval/scrapi,felliott/scrapi,fabianvf/scrapi
Add some tests for base.py
import pytest from celery.schedules import crontab from scrapi import _Registry from scrapi.base import BaseHarvester from scrapi.base import HarvesterMeta @pytest.fixture def mock_registry(monkeypatch): registry = _Registry() monkeypatch.setattr('scrapi.base.registry', registry) return registry @pyte...
<commit_before><commit_msg>Add some tests for base.py<commit_after>
import pytest from celery.schedules import crontab from scrapi import _Registry from scrapi.base import BaseHarvester from scrapi.base import HarvesterMeta @pytest.fixture def mock_registry(monkeypatch): registry = _Registry() monkeypatch.setattr('scrapi.base.registry', registry) return registry @pyte...
Add some tests for base.pyimport pytest from celery.schedules import crontab from scrapi import _Registry from scrapi.base import BaseHarvester from scrapi.base import HarvesterMeta @pytest.fixture def mock_registry(monkeypatch): registry = _Registry() monkeypatch.setattr('scrapi.base.registry', registry) ...
<commit_before><commit_msg>Add some tests for base.py<commit_after>import pytest from celery.schedules import crontab from scrapi import _Registry from scrapi.base import BaseHarvester from scrapi.base import HarvesterMeta @pytest.fixture def mock_registry(monkeypatch): registry = _Registry() monkeypatch.se...
d2be813ae6e2549ad36d823e9abdcb4dc5d21d0e
tests/test_this.py
tests/test_this.py
"""tests/test_this.py. Tests the Zen of Hug Copyright (C) 2019 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights...
Add test for this module
Add test for this module
Python
mit
timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
Add test for this module
"""tests/test_this.py. Tests the Zen of Hug Copyright (C) 2019 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights...
<commit_before><commit_msg>Add test for this module<commit_after>
"""tests/test_this.py. Tests the Zen of Hug Copyright (C) 2019 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights...
Add test for this module"""tests/test_this.py. Tests the Zen of Hug Copyright (C) 2019 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including witho...
<commit_before><commit_msg>Add test for this module<commit_after>"""tests/test_this.py. Tests the Zen of Hug Copyright (C) 2019 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Soft...
1ce9502f212a49b13289570bb182d65c3ffcfafe
tests/acceptance/test_commits.py
tests/acceptance/test_commits.py
#!/usr/bin/python # Copyright 2016 Mender Software AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Add checking of commits using mendertesting.
Add checking of commits using mendertesting. Changelog: None Signed-off-by: Kristian Amlie <505e66ae45028a0596c853559221f0b72c1cee21@mender.io>
Python
apache-2.0
bboozzoo/meta-mender,bboozzoo/meta-mender,bboozzoo/meta-mender,bboozzoo/meta-mender
Add checking of commits using mendertesting. Changelog: None Signed-off-by: Kristian Amlie <505e66ae45028a0596c853559221f0b72c1cee21@mender.io>
#!/usr/bin/python # Copyright 2016 Mender Software AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
<commit_before><commit_msg>Add checking of commits using mendertesting. Changelog: None Signed-off-by: Kristian Amlie <505e66ae45028a0596c853559221f0b72c1cee21@mender.io><commit_after>
#!/usr/bin/python # Copyright 2016 Mender Software AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
Add checking of commits using mendertesting. Changelog: None Signed-off-by: Kristian Amlie <505e66ae45028a0596c853559221f0b72c1cee21@mender.io>#!/usr/bin/python # Copyright 2016 Mender Software AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
<commit_before><commit_msg>Add checking of commits using mendertesting. Changelog: None Signed-off-by: Kristian Amlie <505e66ae45028a0596c853559221f0b72c1cee21@mender.io><commit_after>#!/usr/bin/python # Copyright 2016 Mender Software AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you ...
6c431129e64380754296b646e5e063521980b8da
test/_common.py
test/_common.py
# encoding: utf-8 ''' .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> ''' from __future__ import absolute_import, print_function, unicode_literals def print_result(expected, actual): print("[expected]\n{}\n".format(expected)) print("[actual]\n{}\n".format(actual))
Add a test helper function
Add a test helper function
Python
mit
thombashi/pytablewriter
Add a test helper function
# encoding: utf-8 ''' .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> ''' from __future__ import absolute_import, print_function, unicode_literals def print_result(expected, actual): print("[expected]\n{}\n".format(expected)) print("[actual]\n{}\n".format(actual))
<commit_before><commit_msg>Add a test helper function<commit_after>
# encoding: utf-8 ''' .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> ''' from __future__ import absolute_import, print_function, unicode_literals def print_result(expected, actual): print("[expected]\n{}\n".format(expected)) print("[actual]\n{}\n".format(actual))
Add a test helper function# encoding: utf-8 ''' .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> ''' from __future__ import absolute_import, print_function, unicode_literals def print_result(expected, actual): print("[expected]\n{}\n".format(expected)) print("[actual]\n{}\n".format(actual))
<commit_before><commit_msg>Add a test helper function<commit_after># encoding: utf-8 ''' .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> ''' from __future__ import absolute_import, print_function, unicode_literals def print_result(expected, actual): print("[expected]\n{}\n".format(expected)) ...
488e471bc361d3754ecf4ee6072365f4f67dea2e
backend/initialize_database.py
backend/initialize_database.py
import json import os import django import logging os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from unichat.models import Country, City, University, School level = logging.DEBUG logger = logging.getLogger(__name__) logger.setLevel(level) logging.basicConfig(format='%(message)s'...
Add script to initialize db with schools, unis etc
Add script to initialize db with schools, unis etc
Python
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
Add script to initialize db with schools, unis etc
import json import os import django import logging os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from unichat.models import Country, City, University, School level = logging.DEBUG logger = logging.getLogger(__name__) logger.setLevel(level) logging.basicConfig(format='%(message)s'...
<commit_before><commit_msg>Add script to initialize db with schools, unis etc<commit_after>
import json import os import django import logging os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from unichat.models import Country, City, University, School level = logging.DEBUG logger = logging.getLogger(__name__) logger.setLevel(level) logging.basicConfig(format='%(message)s'...
Add script to initialize db with schools, unis etcimport json import os import django import logging os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from unichat.models import Country, City, University, School level = logging.DEBUG logger = logging.getLogger(__name__) logger.setLev...
<commit_before><commit_msg>Add script to initialize db with schools, unis etc<commit_after>import json import os import django import logging os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from unichat.models import Country, City, University, School level = logging.DEBUG logger = ...
36a9950e81cfa273a6782cc0377f9dfd510291d8
test_polycomp_low_level.py
test_polycomp_low_level.py
import numpy as np import pypolycomp def test_polycomp(): inv_cheby = pypolycomp.Chebyshev(samples.size, pypolycomp.PCOMP_TD_INVERSE) for alg in (pypolycomp.PCOMP_ALG_USE_CHEBYSHEV, pypolycomp.PCOMP_ALG_NO_CHEBYSHEV): max_error = 0.1 samples = np.array([1.0, 2.0, 3.0, 4.1])...
Add tests for PolycompChunk class
Add tests for PolycompChunk class
Python
bsd-3-clause
ziotom78/polycomp
Add tests for PolycompChunk class
import numpy as np import pypolycomp def test_polycomp(): inv_cheby = pypolycomp.Chebyshev(samples.size, pypolycomp.PCOMP_TD_INVERSE) for alg in (pypolycomp.PCOMP_ALG_USE_CHEBYSHEV, pypolycomp.PCOMP_ALG_NO_CHEBYSHEV): max_error = 0.1 samples = np.array([1.0, 2.0, 3.0, 4.1])...
<commit_before><commit_msg>Add tests for PolycompChunk class<commit_after>
import numpy as np import pypolycomp def test_polycomp(): inv_cheby = pypolycomp.Chebyshev(samples.size, pypolycomp.PCOMP_TD_INVERSE) for alg in (pypolycomp.PCOMP_ALG_USE_CHEBYSHEV, pypolycomp.PCOMP_ALG_NO_CHEBYSHEV): max_error = 0.1 samples = np.array([1.0, 2.0, 3.0, 4.1])...
Add tests for PolycompChunk classimport numpy as np import pypolycomp def test_polycomp(): inv_cheby = pypolycomp.Chebyshev(samples.size, pypolycomp.PCOMP_TD_INVERSE) for alg in (pypolycomp.PCOMP_ALG_USE_CHEBYSHEV, pypolycomp.PCOMP_ALG_NO_CHEBYSHEV): max_error = 0.1 samples...
<commit_before><commit_msg>Add tests for PolycompChunk class<commit_after>import numpy as np import pypolycomp def test_polycomp(): inv_cheby = pypolycomp.Chebyshev(samples.size, pypolycomp.PCOMP_TD_INVERSE) for alg in (pypolycomp.PCOMP_ALG_USE_CHEBYSHEV, pypolycomp.PCOMP_ALG_NO_CHEBYSHEV)...
cb166b81a243cb1251ab9185f92b8a4734e4db55
euler012.py
euler012.py
#!/usr/bin/python from math import sqrt """ Our limit """ LIMIT = 500 """ We start from 6 """ test = 1 + 2 + 3 """ Next to add """ add = 4 div_count = 0 while div_count < LIMIT: div_count = 1 test += add add += 1 tmp = test for i in range(2, int(sqrt(test))): factor_count = 0 while...
Add solution for problem 12, really slow, need to be optimize
Add solution for problem 12, really slow, need to be optimize
Python
mit
cifvts/PyEuler
Add solution for problem 12, really slow, need to be optimize
#!/usr/bin/python from math import sqrt """ Our limit """ LIMIT = 500 """ We start from 6 """ test = 1 + 2 + 3 """ Next to add """ add = 4 div_count = 0 while div_count < LIMIT: div_count = 1 test += add add += 1 tmp = test for i in range(2, int(sqrt(test))): factor_count = 0 while...
<commit_before><commit_msg>Add solution for problem 12, really slow, need to be optimize<commit_after>
#!/usr/bin/python from math import sqrt """ Our limit """ LIMIT = 500 """ We start from 6 """ test = 1 + 2 + 3 """ Next to add """ add = 4 div_count = 0 while div_count < LIMIT: div_count = 1 test += add add += 1 tmp = test for i in range(2, int(sqrt(test))): factor_count = 0 while...
Add solution for problem 12, really slow, need to be optimize#!/usr/bin/python from math import sqrt """ Our limit """ LIMIT = 500 """ We start from 6 """ test = 1 + 2 + 3 """ Next to add """ add = 4 div_count = 0 while div_count < LIMIT: div_count = 1 test += add add += 1 tmp = test for i in rang...
<commit_before><commit_msg>Add solution for problem 12, really slow, need to be optimize<commit_after>#!/usr/bin/python from math import sqrt """ Our limit """ LIMIT = 500 """ We start from 6 """ test = 1 + 2 + 3 """ Next to add """ add = 4 div_count = 0 while div_count < LIMIT: div_count = 1 test += add ...
25b3ad79bda44fda8b110ef183049e08765dfb18
euler017.py
euler017.py
#!/usr/bin/python values = {} values[1] = "one" values[2] = "two" values[3] = "three" values[4] = "four" values[5] = "five" values[6] = "six" values[7] = "seven" values[8] = "eight" values[9] = "nine" values[10] = "ten" values[11] = "eleven" values[12] = "twelve" values[13] = "thirteen" values[14] = "fourteen" values[...
Add solution for problem 17
Add solution for problem 17
Python
mit
cifvts/PyEuler
Add solution for problem 17
#!/usr/bin/python values = {} values[1] = "one" values[2] = "two" values[3] = "three" values[4] = "four" values[5] = "five" values[6] = "six" values[7] = "seven" values[8] = "eight" values[9] = "nine" values[10] = "ten" values[11] = "eleven" values[12] = "twelve" values[13] = "thirteen" values[14] = "fourteen" values[...
<commit_before><commit_msg>Add solution for problem 17<commit_after>
#!/usr/bin/python values = {} values[1] = "one" values[2] = "two" values[3] = "three" values[4] = "four" values[5] = "five" values[6] = "six" values[7] = "seven" values[8] = "eight" values[9] = "nine" values[10] = "ten" values[11] = "eleven" values[12] = "twelve" values[13] = "thirteen" values[14] = "fourteen" values[...
Add solution for problem 17#!/usr/bin/python values = {} values[1] = "one" values[2] = "two" values[3] = "three" values[4] = "four" values[5] = "five" values[6] = "six" values[7] = "seven" values[8] = "eight" values[9] = "nine" values[10] = "ten" values[11] = "eleven" values[12] = "twelve" values[13] = "thirteen" valu...
<commit_before><commit_msg>Add solution for problem 17<commit_after>#!/usr/bin/python values = {} values[1] = "one" values[2] = "two" values[3] = "three" values[4] = "four" values[5] = "five" values[6] = "six" values[7] = "seven" values[8] = "eight" values[9] = "nine" values[10] = "ten" values[11] = "eleven" values[12...
10be73daab13815662871898ccfc8201e43ea3db
testifi/pypi.py
testifi/pypi.py
# -*- coding: utf-8 -*- """ testifi.pypi ~~~~~~~~~~~~ This module contains the portions of testifi code that know how to handle interacting with PyPI. """ import treq from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def certifiVersions(): """ This function determines what cer...
Add basic PyPI reading logic
Add basic PyPI reading logic
Python
mit
Lukasa/testifi
Add basic PyPI reading logic
# -*- coding: utf-8 -*- """ testifi.pypi ~~~~~~~~~~~~ This module contains the portions of testifi code that know how to handle interacting with PyPI. """ import treq from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def certifiVersions(): """ This function determines what cer...
<commit_before><commit_msg>Add basic PyPI reading logic<commit_after>
# -*- coding: utf-8 -*- """ testifi.pypi ~~~~~~~~~~~~ This module contains the portions of testifi code that know how to handle interacting with PyPI. """ import treq from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def certifiVersions(): """ This function determines what cer...
Add basic PyPI reading logic# -*- coding: utf-8 -*- """ testifi.pypi ~~~~~~~~~~~~ This module contains the portions of testifi code that know how to handle interacting with PyPI. """ import treq from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks def certifiVersions(): """ This ...
<commit_before><commit_msg>Add basic PyPI reading logic<commit_after># -*- coding: utf-8 -*- """ testifi.pypi ~~~~~~~~~~~~ This module contains the portions of testifi code that know how to handle interacting with PyPI. """ import treq from twisted.internet.defer import inlineCallbacks, returnValue @inlineCallbacks...
a160b70ced5cf5d7debcdc8cf73a94a79de275b1
tests/basics/frozenset_set.py
tests/basics/frozenset_set.py
try: frozenset except NameError: print("SKIP") import sys sys.exit() # Examples from https://docs.python.org/3/library/stdtypes.html#set # "Instances of set are compared to instances of frozenset based on their # members. For example:" print(set('abc') == frozenset('abc')) # This doesn't work in uPy #p...
Add test on set/frozenset equality.
tests: Add test on set/frozenset equality.
Python
mit
dmazzella/micropython,feilongfl/micropython,adafruit/micropython,ernesto-g/micropython,vriera/micropython,toolmacher/micropython,ahotam/micropython,ahotam/micropython,skybird6672/micropython,blazewicz/micropython,noahchense/micropython,dxxb/micropython,blazewicz/micropython,ernesto-g/micropython,lowRISC/micropython,drr...
tests: Add test on set/frozenset equality.
try: frozenset except NameError: print("SKIP") import sys sys.exit() # Examples from https://docs.python.org/3/library/stdtypes.html#set # "Instances of set are compared to instances of frozenset based on their # members. For example:" print(set('abc') == frozenset('abc')) # This doesn't work in uPy #p...
<commit_before><commit_msg>tests: Add test on set/frozenset equality.<commit_after>
try: frozenset except NameError: print("SKIP") import sys sys.exit() # Examples from https://docs.python.org/3/library/stdtypes.html#set # "Instances of set are compared to instances of frozenset based on their # members. For example:" print(set('abc') == frozenset('abc')) # This doesn't work in uPy #p...
tests: Add test on set/frozenset equality.try: frozenset except NameError: print("SKIP") import sys sys.exit() # Examples from https://docs.python.org/3/library/stdtypes.html#set # "Instances of set are compared to instances of frozenset based on their # members. For example:" print(set('abc') == froze...
<commit_before><commit_msg>tests: Add test on set/frozenset equality.<commit_after>try: frozenset except NameError: print("SKIP") import sys sys.exit() # Examples from https://docs.python.org/3/library/stdtypes.html#set # "Instances of set are compared to instances of frozenset based on their # members...
f2474508e799a4cd37533baa9ce2acae7af1ee89
tests/HashContainerSimpleTest.py
tests/HashContainerSimpleTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy.HashContainer import HashContainer class HashContainerSimpleTest(TestCase): def test_emptyCreation(self): h = HashContainer() self.asser...
Add few tests of HashContainer
Add few tests of HashContainer
Python
mit
PatrikValkovic/grammpy
Add few tests of HashContainer
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy.HashContainer import HashContainer class HashContainerSimpleTest(TestCase): def test_emptyCreation(self): h = HashContainer() self.asser...
<commit_before><commit_msg>Add few tests of HashContainer<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy.HashContainer import HashContainer class HashContainerSimpleTest(TestCase): def test_emptyCreation(self): h = HashContainer() self.asser...
Add few tests of HashContainer#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy.HashContainer import HashContainer class HashContainerSimpleTest(TestCase): def test_emptyCreation(self): h = Hash...
<commit_before><commit_msg>Add few tests of HashContainer<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy.HashContainer import HashContainer class HashContainerSimpleTest(TestCase): def t...
67e2e29fb23e53c73655fe8df9779f7e8cc69796
alerts/proxy_drop_exfil_domains.py
alerts/proxy_drop_exfil_domains.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
Create an alert on attempts to use known exfil domains
Create an alert on attempts to use known exfil domains For example, pastebin.com
Python
mpl-2.0
mpurzynski/MozDef,Phrozyn/MozDef,jeffbryner/MozDef,gdestuynder/MozDef,mozilla/MozDef,gdestuynder/MozDef,mozilla/MozDef,jeffbryner/MozDef,gdestuynder/MozDef,Phrozyn/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mozilla/MozDef,mozilla/MozDef,Phrozyn/MozDef,mpurzynski/MozDef,gdestuynder/MozDef,Phrozyn/MozDef,jeffbryner/MozDe...
Create an alert on attempts to use known exfil domains For example, pastebin.com
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
<commit_before><commit_msg>Create an alert on attempts to use known exfil domains For example, pastebin.com<commit_after>
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.qu...
Create an alert on attempts to use known exfil domains For example, pastebin.com#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2...
<commit_before><commit_msg>Create an alert on attempts to use known exfil domains For example, pastebin.com<commit_after>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http:...
ac3e2cff6850b46d6daa38f90af276d23214c772
st2tests/st2tests/base_test_classes.py
st2tests/st2tests/base_test_classes.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Add CRUD model db test cases for RBAC models.
Add CRUD model db test cases for RBAC models.
Python
apache-2.0
nzlosh/st2,nzlosh/st2,tonybaloney/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,tonybaloney/st2,StackStorm/st2,nzlosh/st2,tonybaloney/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2
Add CRUD model db test cases for RBAC models.
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before><commit_msg>Add CRUD model db test cases for RBAC models.<commit_after>
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Add CRUD model db test cases for RBAC models.# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Vers...
<commit_before><commit_msg>Add CRUD model db test cases for RBAC models.<commit_after># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this f...
254ef4c3a433bebd8a668f5516d2f2ac707e2943
isUnique.py
isUnique.py
def verifyUnique(string): if len(string) > 128: return False characterHash = [0] * 128 for character in string: hashKey = ord(character)%128 if(characterHash[hashKey] > 0): return False else: characterHash[hashKey] = characterHash[hashKey]+1 return...
Verify the given string has unique characters
Verify the given string has unique characters
Python
mit
arunkumarpalaniappan/algorithm_tryouts
Verify the given string has unique characters
def verifyUnique(string): if len(string) > 128: return False characterHash = [0] * 128 for character in string: hashKey = ord(character)%128 if(characterHash[hashKey] > 0): return False else: characterHash[hashKey] = characterHash[hashKey]+1 return...
<commit_before><commit_msg>Verify the given string has unique characters<commit_after>
def verifyUnique(string): if len(string) > 128: return False characterHash = [0] * 128 for character in string: hashKey = ord(character)%128 if(characterHash[hashKey] > 0): return False else: characterHash[hashKey] = characterHash[hashKey]+1 return...
Verify the given string has unique charactersdef verifyUnique(string): if len(string) > 128: return False characterHash = [0] * 128 for character in string: hashKey = ord(character)%128 if(characterHash[hashKey] > 0): return False else: characterHash[h...
<commit_before><commit_msg>Verify the given string has unique characters<commit_after>def verifyUnique(string): if len(string) > 128: return False characterHash = [0] * 128 for character in string: hashKey = ord(character)%128 if(characterHash[hashKey] > 0): return False ...
e151a51cc1ed634f282f69a869af6ac9f85df780
api/user_service.py
api/user_service.py
import werkzeug.security as ws from flask import Flask, request, jsonify, abort app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') salt = ws.hashlib.sha256(SERVER_SECRET + uuid).hexdigest() pow_cha...
import os import werkzeug.security as ws from flask import Flask, request, jsonify, abort, json app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' data_dir_root = os.environ.get('DATADIR') @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') if exists...
Add wallet serialization to disk
Add wallet serialization to disk
Python
agpl-3.0
FuzzyBearBTC/omniwallet,OmniLayer/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,VukDukic/omniwallet,OmniLayer/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,achamely/omniwallet,FuzzyBearBTC/omniwallet,Nevtep/omniwallet,habibmasuro/omniwallet,dexX7/omniwallet,Nevtep/omniwallet,ripper234/omniwallet,ripper234/o...
import werkzeug.security as ws from flask import Flask, request, jsonify, abort app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') salt = ws.hashlib.sha256(SERVER_SECRET + uuid).hexdigest() pow_cha...
import os import werkzeug.security as ws from flask import Flask, request, jsonify, abort, json app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' data_dir_root = os.environ.get('DATADIR') @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') if exists...
<commit_before>import werkzeug.security as ws from flask import Flask, request, jsonify, abort app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') salt = ws.hashlib.sha256(SERVER_SECRET + uuid).hexdig...
import os import werkzeug.security as ws from flask import Flask, request, jsonify, abort, json app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' data_dir_root = os.environ.get('DATADIR') @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') if exists...
import werkzeug.security as ws from flask import Flask, request, jsonify, abort app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') salt = ws.hashlib.sha256(SERVER_SECRET + uuid).hexdigest() pow_cha...
<commit_before>import werkzeug.security as ws from flask import Flask, request, jsonify, abort app = Flask(__name__) app.debug = True LOGIN_DIFFICULTY = '0400' SERVER_SECRET = 'SoSecret!' @app.route('/salt') def challenge(): uuid = request.args.get('uuid', '') salt = ws.hashlib.sha256(SERVER_SECRET + uuid).hexdig...
71bd24dd15295ade1b511a5dbff7d7a150ef2084
problems/problem_36.py
problems/problem_36.py
# Double-base palindromes def decimal_to_binary(n): binary = [] while n > 0: binary.append(n % 2) n /= 2 output = [] while len(binary) != 0: output.append(str(binary.pop())) return "".join(output) def is_palindrome(product): product = str(product) reverse = prod...
Add solution for problem 36
Add solution for problem 36 - Added solution for problem 36 (double-base palindromes)
Python
mit
edmondkotowski/project-euler
Add solution for problem 36 - Added solution for problem 36 (double-base palindromes)
# Double-base palindromes def decimal_to_binary(n): binary = [] while n > 0: binary.append(n % 2) n /= 2 output = [] while len(binary) != 0: output.append(str(binary.pop())) return "".join(output) def is_palindrome(product): product = str(product) reverse = prod...
<commit_before><commit_msg>Add solution for problem 36 - Added solution for problem 36 (double-base palindromes)<commit_after>
# Double-base palindromes def decimal_to_binary(n): binary = [] while n > 0: binary.append(n % 2) n /= 2 output = [] while len(binary) != 0: output.append(str(binary.pop())) return "".join(output) def is_palindrome(product): product = str(product) reverse = prod...
Add solution for problem 36 - Added solution for problem 36 (double-base palindromes)# Double-base palindromes def decimal_to_binary(n): binary = [] while n > 0: binary.append(n % 2) n /= 2 output = [] while len(binary) != 0: output.append(str(binary.pop())) return ""....
<commit_before><commit_msg>Add solution for problem 36 - Added solution for problem 36 (double-base palindromes)<commit_after># Double-base palindromes def decimal_to_binary(n): binary = [] while n > 0: binary.append(n % 2) n /= 2 output = [] while len(binary) != 0: output....
ebfbe65c08ed8ee5d44c4c39f83f5e08bba8a1a7
tests/test_misc.py
tests/test_misc.py
from flask.ext.resty import Api, GenericModelView from marshmallow import fields, Schema import pytest from sqlalchemy import Column, Integer import helpers # ----------------------------------------------------------------------------- @pytest.yield_fixture def models(db): class Widget(db.Model): __tab...
Add miscellaneous tests for remaining code
Add miscellaneous tests for remaining code
Python
mit
taion/flask-jsonapiview,4Catalyzer/flask-resty,4Catalyzer/flask-jsonapiview
Add miscellaneous tests for remaining code
from flask.ext.resty import Api, GenericModelView from marshmallow import fields, Schema import pytest from sqlalchemy import Column, Integer import helpers # ----------------------------------------------------------------------------- @pytest.yield_fixture def models(db): class Widget(db.Model): __tab...
<commit_before><commit_msg>Add miscellaneous tests for remaining code<commit_after>
from flask.ext.resty import Api, GenericModelView from marshmallow import fields, Schema import pytest from sqlalchemy import Column, Integer import helpers # ----------------------------------------------------------------------------- @pytest.yield_fixture def models(db): class Widget(db.Model): __tab...
Add miscellaneous tests for remaining codefrom flask.ext.resty import Api, GenericModelView from marshmallow import fields, Schema import pytest from sqlalchemy import Column, Integer import helpers # ----------------------------------------------------------------------------- @pytest.yield_fixture def models(db):...
<commit_before><commit_msg>Add miscellaneous tests for remaining code<commit_after>from flask.ext.resty import Api, GenericModelView from marshmallow import fields, Schema import pytest from sqlalchemy import Column, Integer import helpers # ----------------------------------------------------------------------------...
40711777de24d30cfe771f172b221cfdf460d8eb
rng.py
rng.py
from random import randint def get_random_number(start=1, end=10): """Generates and returns random number between :start: and :end:""" return randint(start, end)
def get_random_number(start=1, end=10): """https://xkcd.com/221/""" return 4
Revert "Fix python random number generator."
Revert "Fix python random number generator."
Python
mit
1yvT0s/illacceptanything,dushmis/illacceptanything,dushmis/illacceptanything,ultranaut/illacceptanything,caioproiete/illacceptanything,triggerNZ/illacceptanything,dushmis/illacceptanything,oneminot/illacceptanything,TheWhiteLlama/illacceptanything,ds84182/illacceptanything,caioproiete/illacceptanything,paladique/illacc...
from random import randint def get_random_number(start=1, end=10): """Generates and returns random number between :start: and :end:""" return randint(start, end) Revert "Fix python random number generator."
def get_random_number(start=1, end=10): """https://xkcd.com/221/""" return 4
<commit_before>from random import randint def get_random_number(start=1, end=10): """Generates and returns random number between :start: and :end:""" return randint(start, end) <commit_msg>Revert "Fix python random number generator."<commit_after>
def get_random_number(start=1, end=10): """https://xkcd.com/221/""" return 4
from random import randint def get_random_number(start=1, end=10): """Generates and returns random number between :start: and :end:""" return randint(start, end) Revert "Fix python random number generator."def get_random_number(start=1, end=10): """https://xkcd.com/221/""" return 4
<commit_before>from random import randint def get_random_number(start=1, end=10): """Generates and returns random number between :start: and :end:""" return randint(start, end) <commit_msg>Revert "Fix python random number generator."<commit_after>def get_random_number(start=1, end=10): """https://xkcd.com/...
191b6cb9b772efb9c03eff36f7295c59c6dcd026
web/examples/extendcube.py
web/examples/extendcube.py
import argparse import empaths import dbconfig import dbconfighayworth5nm import numpy as np import urllib, urllib2 import cStringIO import sys import anncube import anndb import zindex def main(): parser = argparse.ArgumentParser(description='Cutout a portion of the database.') parser.add_argument('id', action=...
Move to home. Not sure that this builds.
Move to home. Not sure that this builds.
Python
apache-2.0
openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,neurodata/ndstore,openconnectome/open-connectome,openconnectome/open-connectome,openconnectome/open-connectome,neurodata/ndstore
Move to home. Not sure that this builds.
import argparse import empaths import dbconfig import dbconfighayworth5nm import numpy as np import urllib, urllib2 import cStringIO import sys import anncube import anndb import zindex def main(): parser = argparse.ArgumentParser(description='Cutout a portion of the database.') parser.add_argument('id', action=...
<commit_before><commit_msg>Move to home. Not sure that this builds.<commit_after>
import argparse import empaths import dbconfig import dbconfighayworth5nm import numpy as np import urllib, urllib2 import cStringIO import sys import anncube import anndb import zindex def main(): parser = argparse.ArgumentParser(description='Cutout a portion of the database.') parser.add_argument('id', action=...
Move to home. Not sure that this builds.import argparse import empaths import dbconfig import dbconfighayworth5nm import numpy as np import urllib, urllib2 import cStringIO import sys import anncube import anndb import zindex def main(): parser = argparse.ArgumentParser(description='Cutout a portion of the databa...
<commit_before><commit_msg>Move to home. Not sure that this builds.<commit_after>import argparse import empaths import dbconfig import dbconfighayworth5nm import numpy as np import urllib, urllib2 import cStringIO import sys import anncube import anndb import zindex def main(): parser = argparse.ArgumentParser(de...
13c5b37377d0d937a9675d71f66865548ab1089e
sk_nb.py
sk_nb.py
import numpy as np import feature_extractor as fe from sklearn.naive_bayes import MultinomialNB # X = np.random.randint(5, size=(6, 100)) # y = np.array([1, 2, 3, 4, 5, 6]) (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() # print X.shape # print y.shape # print features.shap...
Implement first version of NB classifier
Implement first version of NB classifier
Python
mit
trein/quora-classifier
Implement first version of NB classifier
import numpy as np import feature_extractor as fe from sklearn.naive_bayes import MultinomialNB # X = np.random.randint(5, size=(6, 100)) # y = np.array([1, 2, 3, 4, 5, 6]) (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() # print X.shape # print y.shape # print features.shap...
<commit_before><commit_msg>Implement first version of NB classifier<commit_after>
import numpy as np import feature_extractor as fe from sklearn.naive_bayes import MultinomialNB # X = np.random.randint(5, size=(6, 100)) # y = np.array([1, 2, 3, 4, 5, 6]) (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() # print X.shape # print y.shape # print features.shap...
Implement first version of NB classifierimport numpy as np import feature_extractor as fe from sklearn.naive_bayes import MultinomialNB # X = np.random.randint(5, size=(6, 100)) # y = np.array([1, 2, 3, 4, 5, 6]) (features, targets) = fe.extract_train() (features_test, targets_test) = fe.extract_test() # print X.sha...
<commit_before><commit_msg>Implement first version of NB classifier<commit_after>import numpy as np import feature_extractor as fe from sklearn.naive_bayes import MultinomialNB # X = np.random.randint(5, size=(6, 100)) # y = np.array([1, 2, 3, 4, 5, 6]) (features, targets) = fe.extract_train() (features_test, targets...
0e2e6865c1ad7fb0a74ae673c405d1c6b4ef1b36
tasks.py
tasks.py
import os from invoke import task @task def docs(ctx, version=None): targets = ["latest"] if version: targets.append(version) for target in targets: try: os.makedirs("docs/{}".format(target)) except: pass ctx.run("python -m robot.libdoc -f html src/S...
Add an Invoke task for generating documentation.
Add an Invoke task for generating documentation.
Python
apache-2.0
edbrannin/Robotframework-SQLAlchemy-Library
Add an Invoke task for generating documentation.
import os from invoke import task @task def docs(ctx, version=None): targets = ["latest"] if version: targets.append(version) for target in targets: try: os.makedirs("docs/{}".format(target)) except: pass ctx.run("python -m robot.libdoc -f html src/S...
<commit_before><commit_msg>Add an Invoke task for generating documentation.<commit_after>
import os from invoke import task @task def docs(ctx, version=None): targets = ["latest"] if version: targets.append(version) for target in targets: try: os.makedirs("docs/{}".format(target)) except: pass ctx.run("python -m robot.libdoc -f html src/S...
Add an Invoke task for generating documentation.import os from invoke import task @task def docs(ctx, version=None): targets = ["latest"] if version: targets.append(version) for target in targets: try: os.makedirs("docs/{}".format(target)) except: pass ...
<commit_before><commit_msg>Add an Invoke task for generating documentation.<commit_after>import os from invoke import task @task def docs(ctx, version=None): targets = ["latest"] if version: targets.append(version) for target in targets: try: os.makedirs("docs/{}".format(target...
878d5e9c1ebaa20c9eb07c865293dd500924f321
IPython/frontend.py
IPython/frontend.py
import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
Add shim module to allow flattening of namespace.
Add shim module to allow flattening of namespace.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
Add shim module to allow flattening of namespace.
import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
<commit_before><commit_msg>Add shim module to allow flattening of namespace.<commit_after>
import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
Add shim module to allow flattening of namespace.import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
<commit_before><commit_msg>Add shim module to allow flattening of namespace.<commit_after>import sys import types class ShimModule(types.ModuleType): def __getattribute__(self, key): exec 'from IPython import %s' % key return eval(key) sys.modules['IPython.frontend'] = ShimModule('frontend')
aee1d362f52b2f3a2649669468552c2899e43bf8
openmmtools/data/alanine-dipeptide-explicit/generate-pdb.py
openmmtools/data/alanine-dipeptide-explicit/generate-pdb.py
""" Generate PDB file containing periodic box data. """ from simtk import openmm, unit from simtk.openmm import app prmtop_filename = 'alanine-dipeptide.prmtop' crd_filename = 'alanine-dipeptide.crd' pdb_filename = 'alanine-dipeptide.pdb' # Read topology and positions. prmtop = app.AmberPrmtopFile(prmtop_filename) ...
Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.
Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.
Python
mit
choderalab/openmmtools,choderalab/openmmtools
Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.
""" Generate PDB file containing periodic box data. """ from simtk import openmm, unit from simtk.openmm import app prmtop_filename = 'alanine-dipeptide.prmtop' crd_filename = 'alanine-dipeptide.crd' pdb_filename = 'alanine-dipeptide.pdb' # Read topology and positions. prmtop = app.AmberPrmtopFile(prmtop_filename) ...
<commit_before><commit_msg>Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.<commit_after>
""" Generate PDB file containing periodic box data. """ from simtk import openmm, unit from simtk.openmm import app prmtop_filename = 'alanine-dipeptide.prmtop' crd_filename = 'alanine-dipeptide.crd' pdb_filename = 'alanine-dipeptide.pdb' # Read topology and positions. prmtop = app.AmberPrmtopFile(prmtop_filename) ...
Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.""" Generate PDB file containing periodic box data. """ from simtk import openmm, unit from simtk.openmm import app prmtop_filename = 'alanine-dipeptide.prmtop' crd_filename = 'alanine-dipeptide.crd' pdb_filename = 'alanine-d...
<commit_before><commit_msg>Add script to generate proper alanine-dipeptide explicit solvent PDB file with CRYST record.<commit_after>""" Generate PDB file containing periodic box data. """ from simtk import openmm, unit from simtk.openmm import app prmtop_filename = 'alanine-dipeptide.prmtop' crd_filename = 'alanine...
5d3cf8074bc50e5e269fab047d64db8cc60d16e6
netbox/users/migrations/0009_replicate_permissions.py
netbox/users/migrations/0009_replicate_permissions.py
from django.db import migrations ACTIONS = ['view', 'add', 'change', 'delete'] def replicate_permissions(apps, schema_editor): """ Replicate all Permission assignments as ObjectPermissions. """ Permission = apps.get_model('auth', 'Permission') ObjectPermission = apps.get_model('users', 'ObjectPe...
Add migration for replicating legact permissions to ObjectPermissions
Add migration for replicating legact permissions to ObjectPermissions
Python
apache-2.0
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
Add migration for replicating legact permissions to ObjectPermissions
from django.db import migrations ACTIONS = ['view', 'add', 'change', 'delete'] def replicate_permissions(apps, schema_editor): """ Replicate all Permission assignments as ObjectPermissions. """ Permission = apps.get_model('auth', 'Permission') ObjectPermission = apps.get_model('users', 'ObjectPe...
<commit_before><commit_msg>Add migration for replicating legact permissions to ObjectPermissions<commit_after>
from django.db import migrations ACTIONS = ['view', 'add', 'change', 'delete'] def replicate_permissions(apps, schema_editor): """ Replicate all Permission assignments as ObjectPermissions. """ Permission = apps.get_model('auth', 'Permission') ObjectPermission = apps.get_model('users', 'ObjectPe...
Add migration for replicating legact permissions to ObjectPermissionsfrom django.db import migrations ACTIONS = ['view', 'add', 'change', 'delete'] def replicate_permissions(apps, schema_editor): """ Replicate all Permission assignments as ObjectPermissions. """ Permission = apps.get_model('auth', '...
<commit_before><commit_msg>Add migration for replicating legact permissions to ObjectPermissions<commit_after>from django.db import migrations ACTIONS = ['view', 'add', 'change', 'delete'] def replicate_permissions(apps, schema_editor): """ Replicate all Permission assignments as ObjectPermissions. """ ...
255e8d5b32b57a851be9254052bfb9279f80f76c
alerts/ssh_password_auth_violation.py
alerts/ssh_password_auth_violation.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from query_models im...
Add ssh password auth violation alert
Add ssh password auth violation alert
Python
mpl-2.0
mpurzynski/MozDef,mpurzynski/MozDef,gdestuynder/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,mozilla/MozDef,mozilla/MozDef,gdestuynder/MozDef,Phrozyn/MozDef,mozilla/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,mozilla/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,jeffbryner/MozDe...
Add ssh password auth violation alert
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from query_models im...
<commit_before><commit_msg>Add ssh password auth violation alert<commit_after>
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from query_models im...
Add ssh password auth violation alert#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask ...
<commit_before><commit_msg>Add ssh password auth violation alert<commit_after>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017...
f18ca1330a435765a7b06562522c80723dc24402
admin/update_sparkle_xml.py
admin/update_sparkle_xml.py
#!/usr/bin/env python # Updates a sparkle appcast xml file with a new release from optparse import OptionParser from xml.dom.minidom import parse from datetime import datetime import os parser = OptionParser(r""" %prog --f xmlfile -s "signature" -v X.X.X -l <bytelength>""") parser.add_option("-f", "--file", d...
Add a script to update our sparkle XML files
Add a script to update our sparkle XML files
Python
apache-2.0
zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop,zofuthan/zulip-desktop
Add a script to update our sparkle XML files
#!/usr/bin/env python # Updates a sparkle appcast xml file with a new release from optparse import OptionParser from xml.dom.minidom import parse from datetime import datetime import os parser = OptionParser(r""" %prog --f xmlfile -s "signature" -v X.X.X -l <bytelength>""") parser.add_option("-f", "--file", d...
<commit_before><commit_msg>Add a script to update our sparkle XML files<commit_after>
#!/usr/bin/env python # Updates a sparkle appcast xml file with a new release from optparse import OptionParser from xml.dom.minidom import parse from datetime import datetime import os parser = OptionParser(r""" %prog --f xmlfile -s "signature" -v X.X.X -l <bytelength>""") parser.add_option("-f", "--file", d...
Add a script to update our sparkle XML files#!/usr/bin/env python # Updates a sparkle appcast xml file with a new release from optparse import OptionParser from xml.dom.minidom import parse from datetime import datetime import os parser = OptionParser(r""" %prog --f xmlfile -s "signature" -v X.X.X -l <bytelength>"...
<commit_before><commit_msg>Add a script to update our sparkle XML files<commit_after>#!/usr/bin/env python # Updates a sparkle appcast xml file with a new release from optparse import OptionParser from xml.dom.minidom import parse from datetime import datetime import os parser = OptionParser(r""" %prog --f xmlfile...
3a0ffa04344df4d8e2ec124d4f4115887b1e7da8
virtual_machine.py
virtual_machine.py
class VirtualMachine: def __init__(self, ram_size=256, stack_size=32): self.data = [None]*ram_size self.stack = [None]*stack_size self.stack_size = stack_size self.stack_top = 0 def push(self, value): """Push something onto the stack.""" if self.stack_top+1 > sel...
Add a virtual machine, with a stub for the bytecode
Add a virtual machine, with a stub for the bytecode
Python
bsd-3-clause
darbaga/simple_compiler
Add a virtual machine, with a stub for the bytecode
class VirtualMachine: def __init__(self, ram_size=256, stack_size=32): self.data = [None]*ram_size self.stack = [None]*stack_size self.stack_size = stack_size self.stack_top = 0 def push(self, value): """Push something onto the stack.""" if self.stack_top+1 > sel...
<commit_before><commit_msg>Add a virtual machine, with a stub for the bytecode<commit_after>
class VirtualMachine: def __init__(self, ram_size=256, stack_size=32): self.data = [None]*ram_size self.stack = [None]*stack_size self.stack_size = stack_size self.stack_top = 0 def push(self, value): """Push something onto the stack.""" if self.stack_top+1 > sel...
Add a virtual machine, with a stub for the bytecodeclass VirtualMachine: def __init__(self, ram_size=256, stack_size=32): self.data = [None]*ram_size self.stack = [None]*stack_size self.stack_size = stack_size self.stack_top = 0 def push(self, value): """Push something o...
<commit_before><commit_msg>Add a virtual machine, with a stub for the bytecode<commit_after>class VirtualMachine: def __init__(self, ram_size=256, stack_size=32): self.data = [None]*ram_size self.stack = [None]*stack_size self.stack_size = stack_size self.stack_top = 0 def push(...
10b65412f477de18527bdaee5d270fae826a2161
utils/export_pixels_mask.py
utils/export_pixels_mask.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
Add a script to export pixels masks for mr_filter's -I option.
Add a script to export pixels masks for mr_filter's -I option.
Python
mit
jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/data-pipeline-standalone-scripts,jdhp-sap/sap-cta-data-pipeline,jdhp-sap/sap-cta-data-pipeline
Add a script to export pixels masks for mr_filter's -I option.
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
<commit_before><commit_msg>Add a script to export pixels masks for mr_filter's -I option.<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (th...
Add a script to export pixels masks for mr_filter's -I option.#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, free of charge, to any person obtaining a ...
<commit_before><commit_msg>Add a script to export pixels masks for mr_filter's -I option.<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org) # This script is provided under the terms and conditions of the MIT license: # Permission is hereby granted, f...
1eff1c6b604718414c95099f3833d58a3d2b463c
fireplace/actions.py
fireplace/actions.py
import logging from .entity import Entity class Action: # Lawsuit args = () def __init__(self, target, *args, **kwargs): self.target = target self.times = 1 self._args = args for k, v in zip(self.args, args): setattr(self, k, v) def __repr__(self): args = ["%s=%r" % (k, v) for k, v in zip(self.args, ...
Implement a basic Action class
Implement a basic Action class
Python
agpl-3.0
Meerkov/fireplace,butozerca/fireplace,NightKev/fireplace,Ragowit/fireplace,jleclanche/fireplace,Ragowit/fireplace,amw2104/fireplace,oftc-ftw/fireplace,liujimj/fireplace,smallnamespace/fireplace,beheh/fireplace,smallnamespace/fireplace,amw2104/fireplace,Meerkov/fireplace,liujimj/fireplace,butozerca/fireplace,oftc-ftw/fi...
Implement a basic Action class
import logging from .entity import Entity class Action: # Lawsuit args = () def __init__(self, target, *args, **kwargs): self.target = target self.times = 1 self._args = args for k, v in zip(self.args, args): setattr(self, k, v) def __repr__(self): args = ["%s=%r" % (k, v) for k, v in zip(self.args, ...
<commit_before><commit_msg>Implement a basic Action class<commit_after>
import logging from .entity import Entity class Action: # Lawsuit args = () def __init__(self, target, *args, **kwargs): self.target = target self.times = 1 self._args = args for k, v in zip(self.args, args): setattr(self, k, v) def __repr__(self): args = ["%s=%r" % (k, v) for k, v in zip(self.args, ...
Implement a basic Action classimport logging from .entity import Entity class Action: # Lawsuit args = () def __init__(self, target, *args, **kwargs): self.target = target self.times = 1 self._args = args for k, v in zip(self.args, args): setattr(self, k, v) def __repr__(self): args = ["%s=%r" % (k, ...
<commit_before><commit_msg>Implement a basic Action class<commit_after>import logging from .entity import Entity class Action: # Lawsuit args = () def __init__(self, target, *args, **kwargs): self.target = target self.times = 1 self._args = args for k, v in zip(self.args, args): setattr(self, k, v) def...
10204708652f463984c9f21e2b1bdc898049071d
zephyrus/script.py
zephyrus/script.py
import abc import json class Script(list): def __init__(self, filename=None, iterable=None): if iterable is not None: super().__init__(iterable) else: super().__init__() self.filename = filename def save(self, filename=None): if filename is not None: ...
Add module that helps to generate configuration files.
Add module that helps to generate configuration files.
Python
mit
wairton/zephyrus-mas
Add module that helps to generate configuration files.
import abc import json class Script(list): def __init__(self, filename=None, iterable=None): if iterable is not None: super().__init__(iterable) else: super().__init__() self.filename = filename def save(self, filename=None): if filename is not None: ...
<commit_before><commit_msg>Add module that helps to generate configuration files.<commit_after>
import abc import json class Script(list): def __init__(self, filename=None, iterable=None): if iterable is not None: super().__init__(iterable) else: super().__init__() self.filename = filename def save(self, filename=None): if filename is not None: ...
Add module that helps to generate configuration files.import abc import json class Script(list): def __init__(self, filename=None, iterable=None): if iterable is not None: super().__init__(iterable) else: super().__init__() self.filename = filename def save(sel...
<commit_before><commit_msg>Add module that helps to generate configuration files.<commit_after>import abc import json class Script(list): def __init__(self, filename=None, iterable=None): if iterable is not None: super().__init__(iterable) else: super().__init__() s...
82826f468186b737d63dffb2c79cfeff5a8d47a0
examples/python3-urllib/run.py
examples/python3-urllib/run.py
import sys import ssl import urllib.error import urllib.request host = sys.argv[1] port = sys.argv[2] cafile = sys.argv[3] if len(sys.argv) > 3 else None try: urllib.request.urlopen("https://" + host + ":" + port, cafile=cafile) except urllib.error.URLError as exc: if not isinstance(exc.reason, ssl.SSLError):...
Add a Python3 + urllib example
Add a Python3 + urllib example
Python
mit
ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls
Add a Python3 + urllib example
import sys import ssl import urllib.error import urllib.request host = sys.argv[1] port = sys.argv[2] cafile = sys.argv[3] if len(sys.argv) > 3 else None try: urllib.request.urlopen("https://" + host + ":" + port, cafile=cafile) except urllib.error.URLError as exc: if not isinstance(exc.reason, ssl.SSLError):...
<commit_before><commit_msg>Add a Python3 + urllib example<commit_after>
import sys import ssl import urllib.error import urllib.request host = sys.argv[1] port = sys.argv[2] cafile = sys.argv[3] if len(sys.argv) > 3 else None try: urllib.request.urlopen("https://" + host + ":" + port, cafile=cafile) except urllib.error.URLError as exc: if not isinstance(exc.reason, ssl.SSLError):...
Add a Python3 + urllib exampleimport sys import ssl import urllib.error import urllib.request host = sys.argv[1] port = sys.argv[2] cafile = sys.argv[3] if len(sys.argv) > 3 else None try: urllib.request.urlopen("https://" + host + ":" + port, cafile=cafile) except urllib.error.URLError as exc: if not isinsta...
<commit_before><commit_msg>Add a Python3 + urllib example<commit_after>import sys import ssl import urllib.error import urllib.request host = sys.argv[1] port = sys.argv[2] cafile = sys.argv[3] if len(sys.argv) > 3 else None try: urllib.request.urlopen("https://" + host + ":" + port, cafile=cafile) except urllib....
52fcf23a15cda393dabde53f513687ec92d03598
src/stratuslab/FileAppender.py
src/stratuslab/FileAppender.py
import os import shutil class FileAppender(object): def __init__(self, filename): self.filename = filename self.lines = [] self.newLines = [] self.foundExit = False def insertAtTheEnd(self, newLine): ''' Append at the end of the file (e.g. rc.local) the newLine...
Append intelligently at the end of a file
Append intelligently at the end of a file
Python
apache-2.0
StratusLab/client,StratusLab/client,StratusLab/client,StratusLab/client
Append intelligently at the end of a file
import os import shutil class FileAppender(object): def __init__(self, filename): self.filename = filename self.lines = [] self.newLines = [] self.foundExit = False def insertAtTheEnd(self, newLine): ''' Append at the end of the file (e.g. rc.local) the newLine...
<commit_before><commit_msg>Append intelligently at the end of a file<commit_after>
import os import shutil class FileAppender(object): def __init__(self, filename): self.filename = filename self.lines = [] self.newLines = [] self.foundExit = False def insertAtTheEnd(self, newLine): ''' Append at the end of the file (e.g. rc.local) the newLine...
Append intelligently at the end of a fileimport os import shutil class FileAppender(object): def __init__(self, filename): self.filename = filename self.lines = [] self.newLines = [] self.foundExit = False def insertAtTheEnd(self, newLine): ''' Append at the en...
<commit_before><commit_msg>Append intelligently at the end of a file<commit_after>import os import shutil class FileAppender(object): def __init__(self, filename): self.filename = filename self.lines = [] self.newLines = [] self.foundExit = False def insertAtTheEnd(sel...
8d35dad5fc63de919936d0407d105c36c87a1b14
tests/test_no_extra_queries.py
tests/test_no_extra_queries.py
from nose.tools import assert_false from mock import Mock, PropertyMock, patch from .models import Photo def test_dont_access_source(): """ Touching the source may trigger an unneeded query. See <https://github.com/matthewwithanm/django-imagekit/issues/295> """ pmock = PropertyMock() pmock.__...
Add test to illustrate GH-295
Add test to illustrate GH-295
Python
bsd-3-clause
FundedByMe/django-imagekit,tawanda/django-imagekit,tawanda/django-imagekit,FundedByMe/django-imagekit
Add test to illustrate GH-295
from nose.tools import assert_false from mock import Mock, PropertyMock, patch from .models import Photo def test_dont_access_source(): """ Touching the source may trigger an unneeded query. See <https://github.com/matthewwithanm/django-imagekit/issues/295> """ pmock = PropertyMock() pmock.__...
<commit_before><commit_msg>Add test to illustrate GH-295<commit_after>
from nose.tools import assert_false from mock import Mock, PropertyMock, patch from .models import Photo def test_dont_access_source(): """ Touching the source may trigger an unneeded query. See <https://github.com/matthewwithanm/django-imagekit/issues/295> """ pmock = PropertyMock() pmock.__...
Add test to illustrate GH-295from nose.tools import assert_false from mock import Mock, PropertyMock, patch from .models import Photo def test_dont_access_source(): """ Touching the source may trigger an unneeded query. See <https://github.com/matthewwithanm/django-imagekit/issues/295> """ pmock ...
<commit_before><commit_msg>Add test to illustrate GH-295<commit_after>from nose.tools import assert_false from mock import Mock, PropertyMock, patch from .models import Photo def test_dont_access_source(): """ Touching the source may trigger an unneeded query. See <https://github.com/matthewwithanm/django...
24e9f6f1f9f7d6c48715a5e57c0dbc0b0271b8e0
perftest.py
perftest.py
""" Simple peformance tests. """ import sys import time import couchdb def main(): print 'sys.version : %r' % (sys.version,) print 'sys.platform : %r' % (sys.platform,) tests = [create_doc, create_bulk_docs] if len(sys.argv) > 1: tests = [test for test in tests if test.__name__ in sys.argv...
Add a very simple performance testing tool.
Add a very simple performance testing tool.
Python
bsd-3-clause
ssaavedra/couchdb-python,hdmessaging/couchbase-mapping-python,oliora/couchdb-python
Add a very simple performance testing tool.
""" Simple peformance tests. """ import sys import time import couchdb def main(): print 'sys.version : %r' % (sys.version,) print 'sys.platform : %r' % (sys.platform,) tests = [create_doc, create_bulk_docs] if len(sys.argv) > 1: tests = [test for test in tests if test.__name__ in sys.argv...
<commit_before><commit_msg>Add a very simple performance testing tool.<commit_after>
""" Simple peformance tests. """ import sys import time import couchdb def main(): print 'sys.version : %r' % (sys.version,) print 'sys.platform : %r' % (sys.platform,) tests = [create_doc, create_bulk_docs] if len(sys.argv) > 1: tests = [test for test in tests if test.__name__ in sys.argv...
Add a very simple performance testing tool.""" Simple peformance tests. """ import sys import time import couchdb def main(): print 'sys.version : %r' % (sys.version,) print 'sys.platform : %r' % (sys.platform,) tests = [create_doc, create_bulk_docs] if len(sys.argv) > 1: tests = [test for...
<commit_before><commit_msg>Add a very simple performance testing tool.<commit_after>""" Simple peformance tests. """ import sys import time import couchdb def main(): print 'sys.version : %r' % (sys.version,) print 'sys.platform : %r' % (sys.platform,) tests = [create_doc, create_bulk_docs] if len...
a0173b248c7fe54534e0caed048e5f8f408d7ca1
rejected/data.py
rejected/data.py
""" Rejected data objects """ import copy class DataObject(object): """A class that will return a plain text representation of all of the attributes assigned to the object. """ def __repr__(self): """Return a string representation of the object and all of its attributes. :rt...
Move these classes into their own file
Move these classes into their own file
Python
bsd-3-clause
gmr/rejected,gmr/rejected
Move these classes into their own file
""" Rejected data objects """ import copy class DataObject(object): """A class that will return a plain text representation of all of the attributes assigned to the object. """ def __repr__(self): """Return a string representation of the object and all of its attributes. :rt...
<commit_before><commit_msg>Move these classes into their own file<commit_after>
""" Rejected data objects """ import copy class DataObject(object): """A class that will return a plain text representation of all of the attributes assigned to the object. """ def __repr__(self): """Return a string representation of the object and all of its attributes. :rt...
Move these classes into their own file""" Rejected data objects """ import copy class DataObject(object): """A class that will return a plain text representation of all of the attributes assigned to the object. """ def __repr__(self): """Return a string representation of the object and all o...
<commit_before><commit_msg>Move these classes into their own file<commit_after>""" Rejected data objects """ import copy class DataObject(object): """A class that will return a plain text representation of all of the attributes assigned to the object. """ def __repr__(self): """Return a stri...
127cf9f067ebb622d41a24fa70010cb46b111126
molly/batch_processing/migrations/0002_auto__add_field_batch_last_run_failed.py
molly/batch_processing/migrations/0002_auto__add_field_batch_last_run_failed.py
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Batch.last_run_failed' db.add_column('batch_processing_batch', 'last_run_failed', self.gf(...
Add migration for last commit
Add migration for last commit
Python
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
Add migration for last commit
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Batch.last_run_failed' db.add_column('batch_processing_batch', 'last_run_failed', self.gf(...
<commit_before><commit_msg>Add migration for last commit<commit_after>
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Batch.last_run_failed' db.add_column('batch_processing_batch', 'last_run_failed', self.gf(...
Add migration for last commit# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Batch.last_run_failed' db.add_column('batch_processing_batch'...
<commit_before><commit_msg>Add migration for last commit<commit_after># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Batch.last_run_failed' ...
446cb8846a221d055f7a3b121a200c0c2b5f34ba
test/example_controller_switchinghub_gevent.py
test/example_controller_switchinghub_gevent.py
import logging import twink import twink.ovs import twink.gevent import twink.ext import twink.ofp4 as ofp4 import twink.ofp4.parse as ofp4parse import twink.ofp4.build as b import twink.ofp4.oxm as oxm class TestChannel(twink.ovs.OvsChannel, twink.ext.PortMonitorChannel, twink.JackinChannel, twink.gevent.Parall...
Add gevent version of switching hub example
Add gevent version of switching hub example
Python
apache-2.0
hkwi/twink,yeardancing/twink
Add gevent version of switching hub example
import logging import twink import twink.ovs import twink.gevent import twink.ext import twink.ofp4 as ofp4 import twink.ofp4.parse as ofp4parse import twink.ofp4.build as b import twink.ofp4.oxm as oxm class TestChannel(twink.ovs.OvsChannel, twink.ext.PortMonitorChannel, twink.JackinChannel, twink.gevent.Parall...
<commit_before><commit_msg>Add gevent version of switching hub example<commit_after>
import logging import twink import twink.ovs import twink.gevent import twink.ext import twink.ofp4 as ofp4 import twink.ofp4.parse as ofp4parse import twink.ofp4.build as b import twink.ofp4.oxm as oxm class TestChannel(twink.ovs.OvsChannel, twink.ext.PortMonitorChannel, twink.JackinChannel, twink.gevent.Parall...
Add gevent version of switching hub exampleimport logging import twink import twink.ovs import twink.gevent import twink.ext import twink.ofp4 as ofp4 import twink.ofp4.parse as ofp4parse import twink.ofp4.build as b import twink.ofp4.oxm as oxm class TestChannel(twink.ovs.OvsChannel, twink.ext.PortMonitorChannel, ...
<commit_before><commit_msg>Add gevent version of switching hub example<commit_after>import logging import twink import twink.ovs import twink.gevent import twink.ext import twink.ofp4 as ofp4 import twink.ofp4.parse as ofp4parse import twink.ofp4.build as b import twink.ofp4.oxm as oxm class TestChannel(twink.ovs.OvsC...
f9a1945a1ea85273074c38de7be2d3cfed3e6551
tests/test_color.py
tests/test_color.py
# import pytest import re from sdsc import printcolor @pytest.mark.parametrize("msg", ("hello",) ) @pytest.mark.parametrize("msgtype", ("error", "debug", None) ) @pytest.mark.parametrize('isatty', (True, False)) def test_printcolor(capsys, monkeypatch, msg, msgtype, isatty): """Checks p...
Add test case for printcolor() function
Add test case for printcolor() function Also adds isatty fixture and uses monkeypatch to actually test the colored output
Python
lgpl-2.1
sknorr/suse-doc-style-checker,sknorr/suse-doc-style-checker,sknorr/suse-doc-style-checker
Add test case for printcolor() function Also adds isatty fixture and uses monkeypatch to actually test the colored output
# import pytest import re from sdsc import printcolor @pytest.mark.parametrize("msg", ("hello",) ) @pytest.mark.parametrize("msgtype", ("error", "debug", None) ) @pytest.mark.parametrize('isatty', (True, False)) def test_printcolor(capsys, monkeypatch, msg, msgtype, isatty): """Checks p...
<commit_before><commit_msg>Add test case for printcolor() function Also adds isatty fixture and uses monkeypatch to actually test the colored output<commit_after>
# import pytest import re from sdsc import printcolor @pytest.mark.parametrize("msg", ("hello",) ) @pytest.mark.parametrize("msgtype", ("error", "debug", None) ) @pytest.mark.parametrize('isatty', (True, False)) def test_printcolor(capsys, monkeypatch, msg, msgtype, isatty): """Checks p...
Add test case for printcolor() function Also adds isatty fixture and uses monkeypatch to actually test the colored output# import pytest import re from sdsc import printcolor @pytest.mark.parametrize("msg", ("hello",) ) @pytest.mark.parametrize("msgtype", ("error", "debug", None) ) @pytest...
<commit_before><commit_msg>Add test case for printcolor() function Also adds isatty fixture and uses monkeypatch to actually test the colored output<commit_after># import pytest import re from sdsc import printcolor @pytest.mark.parametrize("msg", ("hello",) ) @pytest.mark.parametrize("msgtype", ...
130df743b14cf329c09f0c514ec0d6991b21dd45
examples/mnist-deepautoencoder.py
examples/mnist-deepautoencoder.py
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
Decrease patience for each layerwise trainer.
Decrease patience for each layerwise trainer.
Python
mit
chrinide/theanets,lmjohns3/theanets,devdoer/theanets
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
<commit_before>#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) ...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) e.train(train, ...
<commit_before>#!/usr/bin/env python import matplotlib.pyplot as plt import theanets from utils import load_mnist, plot_layers, plot_images train, valid, _ = load_mnist() e = theanets.Experiment( theanets.Autoencoder, layers=(784, 256, 64, 36, 64, 256, 784), train_batches=100, tied_weights=True, ) ...
46493648e16ea99f2dbc86175b2fc8b134628b61
tests/test_http_api.py
tests/test_http_api.py
import json import six from twisted.trial import unittest from twisted.internet.defer import inlineCallbacks from twisted.web import server from twisted.internet.defer import succeed from twisted.web.test.test_web import DummyRequest from tests.mockserver import MockServer, PORT from autologin.http_api import Autolog...
Test http-api (only the success path)
Test http-api (only the success path)
Python
apache-2.0
TeamHG-Memex/autologin,TeamHG-Memex/autologin,TeamHG-Memex/autologin
Test http-api (only the success path)
import json import six from twisted.trial import unittest from twisted.internet.defer import inlineCallbacks from twisted.web import server from twisted.internet.defer import succeed from twisted.web.test.test_web import DummyRequest from tests.mockserver import MockServer, PORT from autologin.http_api import Autolog...
<commit_before><commit_msg>Test http-api (only the success path)<commit_after>
import json import six from twisted.trial import unittest from twisted.internet.defer import inlineCallbacks from twisted.web import server from twisted.internet.defer import succeed from twisted.web.test.test_web import DummyRequest from tests.mockserver import MockServer, PORT from autologin.http_api import Autolog...
Test http-api (only the success path)import json import six from twisted.trial import unittest from twisted.internet.defer import inlineCallbacks from twisted.web import server from twisted.internet.defer import succeed from twisted.web.test.test_web import DummyRequest from tests.mockserver import MockServer, PORT f...
<commit_before><commit_msg>Test http-api (only the success path)<commit_after>import json import six from twisted.trial import unittest from twisted.internet.defer import inlineCallbacks from twisted.web import server from twisted.internet.defer import succeed from twisted.web.test.test_web import DummyRequest from t...
5cc9cd1f3c05b1f83c4f57cfc86918135c20764f
lackawanna/datapoint/migrations/0002_datapoint_large_file.py
lackawanna/datapoint/migrations/0002_datapoint_large_file.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from s3direct.fields import S3DirectField class Migration(migrations.Migration): dependencies = [ ('datapoint', '0001_initial'), ] operations = [ migrations.AddField( mode...
Add hand written migration for large_file inclusion in datapoint model
Add hand written migration for large_file inclusion in datapoint model
Python
bsd-3-clause
allyjweir/lackawanna,allyjweir/lackawanna,allyjweir/lackawanna,allyjweir/lackawanna
Add hand written migration for large_file inclusion in datapoint model
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from s3direct.fields import S3DirectField class Migration(migrations.Migration): dependencies = [ ('datapoint', '0001_initial'), ] operations = [ migrations.AddField( mode...
<commit_before><commit_msg>Add hand written migration for large_file inclusion in datapoint model<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from s3direct.fields import S3DirectField class Migration(migrations.Migration): dependencies = [ ('datapoint', '0001_initial'), ] operations = [ migrations.AddField( mode...
Add hand written migration for large_file inclusion in datapoint model# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from s3direct.fields import S3DirectField class Migration(migrations.Migration): dependencies = [ ('datapoint', '0001_initial'), ...
<commit_before><commit_msg>Add hand written migration for large_file inclusion in datapoint model<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from s3direct.fields import S3DirectField class Migration(migrations.Migration): dependencies = [...
8c2f30e6de8b4d5237d39d178a07c8a3fddc0b7f
tests/test_interface.py
tests/test_interface.py
"""tests/test_interface.py. Tests hug's defined interfaces (HTTP, CLI, & Local) Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, inc...
Add tests for desired automatic url creation feature
Add tests for desired automatic url creation feature
Python
mit
MuhammadAlkarouri/hug,timothycrosley/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug
Add tests for desired automatic url creation feature
"""tests/test_interface.py. Tests hug's defined interfaces (HTTP, CLI, & Local) Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, inc...
<commit_before><commit_msg>Add tests for desired automatic url creation feature<commit_after>
"""tests/test_interface.py. Tests hug's defined interfaces (HTTP, CLI, & Local) Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, inc...
Add tests for desired automatic url creation feature"""tests/test_interface.py. Tests hug's defined interfaces (HTTP, CLI, & Local) Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
<commit_before><commit_msg>Add tests for desired automatic url creation feature<commit_after>"""tests/test_interface.py. Tests hug's defined interfaces (HTTP, CLI, & Local) Copyright (C) 2016 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and asso...
58b6f41b7ba67ce9720e069eab8d2f78af113eb3
evennia/typeclasses/migrations/0010_delete_old_player_tables.py
evennia/typeclasses/migrations/0010_delete_old_player_tables.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-13 18:47 from __future__ import unicode_literals from django.db import migrations, OperationalError, connection def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" sql_check_exists = "SELECT * from %s;" % tablename ...
Add migration to finally remove the last playerdb_ tables
Add migration to finally remove the last playerdb_ tables
Python
bsd-3-clause
jamesbeebop/evennia,feend78/evennia,feend78/evennia,feend78/evennia,feend78/evennia,jamesbeebop/evennia,jamesbeebop/evennia
Add migration to finally remove the last playerdb_ tables
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-13 18:47 from __future__ import unicode_literals from django.db import migrations, OperationalError, connection def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" sql_check_exists = "SELECT * from %s;" % tablename ...
<commit_before><commit_msg>Add migration to finally remove the last playerdb_ tables<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-13 18:47 from __future__ import unicode_literals from django.db import migrations, OperationalError, connection def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" sql_check_exists = "SELECT * from %s;" % tablename ...
Add migration to finally remove the last playerdb_ tables# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-13 18:47 from __future__ import unicode_literals from django.db import migrations, OperationalError, connection def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" ...
<commit_before><commit_msg>Add migration to finally remove the last playerdb_ tables<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-13 18:47 from __future__ import unicode_literals from django.db import migrations, OperationalError, connection def _table_exists(db_cursor, tablename): ...
e8fdda66fcda2be3d002fc256abd2dcb2b55edc1
create.py
create.py
def ClassFactory(name, argnames, BaseClass=BaseClass): def __init__(self, **kwargs): for key, value in kwargs.items(): if key not in argnames: raise TypeError("Argument %s not valid for %s" % (key, self.__class__.__name__)) setattr(self, key, value...
Add the secondary ClassFactory class to generate models on the fly
Add the secondary ClassFactory class to generate models on the fly
Python
mit
mathur/modelstruct
Add the secondary ClassFactory class to generate models on the fly
def ClassFactory(name, argnames, BaseClass=BaseClass): def __init__(self, **kwargs): for key, value in kwargs.items(): if key not in argnames: raise TypeError("Argument %s not valid for %s" % (key, self.__class__.__name__)) setattr(self, key, value...
<commit_before><commit_msg>Add the secondary ClassFactory class to generate models on the fly<commit_after>
def ClassFactory(name, argnames, BaseClass=BaseClass): def __init__(self, **kwargs): for key, value in kwargs.items(): if key not in argnames: raise TypeError("Argument %s not valid for %s" % (key, self.__class__.__name__)) setattr(self, key, value...
Add the secondary ClassFactory class to generate models on the flydef ClassFactory(name, argnames, BaseClass=BaseClass): def __init__(self, **kwargs): for key, value in kwargs.items(): if key not in argnames: raise TypeError("Argument %s not valid for %s" % (k...
<commit_before><commit_msg>Add the secondary ClassFactory class to generate models on the fly<commit_after>def ClassFactory(name, argnames, BaseClass=BaseClass): def __init__(self, **kwargs): for key, value in kwargs.items(): if key not in argnames: raise TypeError("Argument %s n...
d9ccb59f26f0ff2d7b2d70e2d17e7f33e56e2b0b
code/ex4.2-tornado_multiple_requests.py
code/ex4.2-tornado_multiple_requests.py
from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient from tornado.gen import coroutine import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] @coroutine def get_greetings(): http_client = AsyncHTTPClient() responses = yield [...
Add ex4.2: multiple tornado requests
Add ex4.2: multiple tornado requests
Python
mit
MA3STR0/PythonAsyncWorkshop
Add ex4.2: multiple tornado requests
from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient from tornado.gen import coroutine import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] @coroutine def get_greetings(): http_client = AsyncHTTPClient() responses = yield [...
<commit_before><commit_msg>Add ex4.2: multiple tornado requests<commit_after>
from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient from tornado.gen import coroutine import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] @coroutine def get_greetings(): http_client = AsyncHTTPClient() responses = yield [...
Add ex4.2: multiple tornado requestsfrom tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient from tornado.gen import coroutine import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] @coroutine def get_greetings(): http_client = Async...
<commit_before><commit_msg>Add ex4.2: multiple tornado requests<commit_after>from tornado.ioloop import IOLoop from tornado.httpclient import AsyncHTTPClient from tornado.gen import coroutine import time URLS = [ 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', 'http://127.0.0.1:8000', ] @coroutine def...
5b99ef78b0982c03448b967dc6c98361f0244896
examples/multiple_joint_kde.py
examples/multiple_joint_kde.py
""" Multiple bivariate KDE plots ============================ _thumb: .6, .4 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="darkgrid") iris = sns.load_dataset("iris") # Subset the iris dataset by species setosa = iris.query("species == 'setosa'") virginica = iris.query("species == 'virginic...
Add new multiple bivariate KDE example
Add new multiple bivariate KDE example
Python
bsd-3-clause
anntzer/seaborn,nileracecrew/seaborn,bsipocz/seaborn,jat255/seaborn,mia1rab/seaborn,sinhrks/seaborn,huongttlan/seaborn,mwaskom/seaborn,mwaskom/seaborn,dimarkov/seaborn,lukauskas/seaborn,phobson/seaborn,lukauskas/seaborn,kyleam/seaborn,wrobstory/seaborn,gef756/seaborn,petebachant/seaborn,clarkfitzg/seaborn,uhjish/seabor...
Add new multiple bivariate KDE example
""" Multiple bivariate KDE plots ============================ _thumb: .6, .4 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="darkgrid") iris = sns.load_dataset("iris") # Subset the iris dataset by species setosa = iris.query("species == 'setosa'") virginica = iris.query("species == 'virginic...
<commit_before><commit_msg>Add new multiple bivariate KDE example<commit_after>
""" Multiple bivariate KDE plots ============================ _thumb: .6, .4 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="darkgrid") iris = sns.load_dataset("iris") # Subset the iris dataset by species setosa = iris.query("species == 'setosa'") virginica = iris.query("species == 'virginic...
Add new multiple bivariate KDE example""" Multiple bivariate KDE plots ============================ _thumb: .6, .4 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="darkgrid") iris = sns.load_dataset("iris") # Subset the iris dataset by species setosa = iris.query("species == 'setosa'") virgin...
<commit_before><commit_msg>Add new multiple bivariate KDE example<commit_after>""" Multiple bivariate KDE plots ============================ _thumb: .6, .4 """ import seaborn as sns import matplotlib.pyplot as plt sns.set(style="darkgrid") iris = sns.load_dataset("iris") # Subset the iris dataset by species setosa =...
73ab8125e8248d22b475419c81180c7ba0bf4535
api/models/preview_email.py
api/models/preview_email.py
from django.db import models from api.models import Hackathon from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class PreviewEmail(models.Model): hackathon = models.ForeignKey(to=Hackathon, on_delete=models.CASCADE) email = models.CharField(max_length=100) interest = models.Char...
Add model for preview emails
Add model for preview emails
Python
apache-2.0
andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com,andrewsosa/hackfsu_com
Add model for preview emails
from django.db import models from api.models import Hackathon from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class PreviewEmail(models.Model): hackathon = models.ForeignKey(to=Hackathon, on_delete=models.CASCADE) email = models.CharField(max_length=100) interest = models.Char...
<commit_before><commit_msg>Add model for preview emails<commit_after>
from django.db import models from api.models import Hackathon from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class PreviewEmail(models.Model): hackathon = models.ForeignKey(to=Hackathon, on_delete=models.CASCADE) email = models.CharField(max_length=100) interest = models.Char...
Add model for preview emailsfrom django.db import models from api.models import Hackathon from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class PreviewEmail(models.Model): hackathon = models.ForeignKey(to=Hackathon, on_delete=models.CASCADE) email = models.CharField(max_length=100...
<commit_before><commit_msg>Add model for preview emails<commit_after>from django.db import models from api.models import Hackathon from django.contrib import admin from hackfsu_com.admin import hackfsu_admin class PreviewEmail(models.Model): hackathon = models.ForeignKey(to=Hackathon, on_delete=models.CASCADE) ...
496e3ada83d3c6d41df535c5433522edaa75e085
mozillians/users/migrations/0036_auto_20180704_0634.py
mozillians/users/migrations/0036_auto_20180704_0634.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-04 13:34 from __future__ import unicode_literals from django.db import migrations def migrate_privacy_email(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get_model('users', 'IdpProfile') for i...
Add data migration for email privacy field.
Add data migration for email privacy field.
Python
bsd-3-clause
akatsoulas/mozillians,akatsoulas/mozillians,akatsoulas/mozillians,akatsoulas/mozillians,mozilla/mozillians,johngian/mozillians,mozilla/mozillians,johngian/mozillians,johngian/mozillians,mozilla/mozillians,johngian/mozillians,mozilla/mozillians
Add data migration for email privacy field.
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-04 13:34 from __future__ import unicode_literals from django.db import migrations def migrate_privacy_email(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get_model('users', 'IdpProfile') for i...
<commit_before><commit_msg>Add data migration for email privacy field.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-04 13:34 from __future__ import unicode_literals from django.db import migrations def migrate_privacy_email(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps.get_model('users', 'IdpProfile') for i...
Add data migration for email privacy field.# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-04 13:34 from __future__ import unicode_literals from django.db import migrations def migrate_privacy_email(apps, schema_editor): UserProfile = apps.get_model('users', 'UserProfile') IdpProfile = apps....
<commit_before><commit_msg>Add data migration for email privacy field.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-07-04 13:34 from __future__ import unicode_literals from django.db import migrations def migrate_privacy_email(apps, schema_editor): UserProfile = apps.get_model('user...
6748d60d650d0b2383c62ae076aec799c0f8fda3
numpy/core/tests/test_print.py
numpy/core/tests/test_print.py
import numpy as np from numpy.testing import * class TestPrint(TestCase): def test_float_types(self) : """ Check formatting. This is only for the str function, and only for simple types. The precision of np.float and np.longdouble aren't the same as the python float pr...
Add basic tests of number str() formatting.
Add basic tests of number str() formatting.
Python
bsd-3-clause
numpy/numpy,rherault-insa/numpy,numpy/numpy-refactor,ddasilva/numpy,bertrand-l/numpy,mattip/numpy,rajathkumarmp/numpy,sigma-random/numpy,kirillzhuravlev/numpy,madphysicist/numpy,madphysicist/numpy,cowlicks/numpy,ESSS/numpy,ChristopherHogan/numpy,felipebetancur/numpy,mwiebe/numpy,CMartelLML/numpy,NextThought/pypy-numpy,...
Add basic tests of number str() formatting.
import numpy as np from numpy.testing import * class TestPrint(TestCase): def test_float_types(self) : """ Check formatting. This is only for the str function, and only for simple types. The precision of np.float and np.longdouble aren't the same as the python float pr...
<commit_before><commit_msg>Add basic tests of number str() formatting.<commit_after>
import numpy as np from numpy.testing import * class TestPrint(TestCase): def test_float_types(self) : """ Check formatting. This is only for the str function, and only for simple types. The precision of np.float and np.longdouble aren't the same as the python float pr...
Add basic tests of number str() formatting.import numpy as np from numpy.testing import * class TestPrint(TestCase): def test_float_types(self) : """ Check formatting. This is only for the str function, and only for simple types. The precision of np.float and np.longdouble aren't ...
<commit_before><commit_msg>Add basic tests of number str() formatting.<commit_after>import numpy as np from numpy.testing import * class TestPrint(TestCase): def test_float_types(self) : """ Check formatting. This is only for the str function, and only for simple types. The precis...
ab61e71f083817f575bb6652402e62d1f949230e
opps/article/search_indexes.py
opps/article/search_indexes.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from .models import Post class PostIndex(SearchIndex): text = CharField(document=True, use_template=True) date_available = DateTimeField(mo...
Create search indexes article on post models
Create search indexes article on post models
Python
mit
williamroot/opps,YACOWS/opps,YACOWS/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,opps/opps
Create search indexes article on post models
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from .models import Post class PostIndex(SearchIndex): text = CharField(document=True, use_template=True) date_available = DateTimeField(mo...
<commit_before><commit_msg>Create search indexes article on post models<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from .models import Post class PostIndex(SearchIndex): text = CharField(document=True, use_template=True) date_available = DateTimeField(mo...
Create search indexes article on post models#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from .models import Post class PostIndex(SearchIndex): text = CharField(document=True, use_template...
<commit_before><commit_msg>Create search indexes article on post models<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from .models import Post class PostIndex(SearchIndex): tex...
3bbaa8c922dafcce17e522d61a4869446e6e2f70
ironic/drivers/__init__.py
ironic/drivers/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
Add new base and fake driver classes.
Add new base and fake driver classes.
Python
apache-2.0
rdo-management/tuskar,tuskar/tuskar,rdo-management/tuskar,rdo-management/tuskar
Add new base and fake driver classes.
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
<commit_before><commit_msg>Add new base and fake driver classes.<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
Add new base and fake driver classes.# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain ...
<commit_before><commit_msg>Add new base and fake driver classes.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in com...
390b5b7e2aa9373b94acde2364e6e19c3cb19489
bayespy/inference/vmp/nodes/pdf.py
bayespy/inference/vmp/nodes/pdf.py
###################################################################### # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ####################...
Create file for the black box node
ENH: Create file for the black box node
Python
mit
SalemAmeen/bayespy,jluttine/bayespy,bayespy/bayespy,fivejjs/bayespy
ENH: Create file for the black box node
###################################################################### # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ####################...
<commit_before><commit_msg>ENH: Create file for the black box node<commit_after>
###################################################################### # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ###################################################################### ####################...
ENH: Create file for the black box node###################################################################### # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. #####################################################...
<commit_before><commit_msg>ENH: Create file for the black box node<commit_after>###################################################################### # Copyright (C) 2015 Jaakko Luttinen # # This file is licensed under Version 3.0 of the GNU General Public # License. See LICENSE for a text of the license. ############...
80d10488196bb9090719e45bd17aa45f1c350455
canvas_and_schedule/course_list.py
canvas_and_schedule/course_list.py
""" Module for searching on SVSU Course Schedule website """ import bs4 import re from selenium import webdriver from selenium.webdriver.support.ui import Select from time import sleep def enter_selection(driver, id, regexp): """ Search drop-down menu options for a regexp and select the first match """ ...
Add a module for listing courses on schedule website
Add a module for listing courses on schedule website
Python
mit
lahvak/svsu-utils
Add a module for listing courses on schedule website
""" Module for searching on SVSU Course Schedule website """ import bs4 import re from selenium import webdriver from selenium.webdriver.support.ui import Select from time import sleep def enter_selection(driver, id, regexp): """ Search drop-down menu options for a regexp and select the first match """ ...
<commit_before><commit_msg>Add a module for listing courses on schedule website<commit_after>
""" Module for searching on SVSU Course Schedule website """ import bs4 import re from selenium import webdriver from selenium.webdriver.support.ui import Select from time import sleep def enter_selection(driver, id, regexp): """ Search drop-down menu options for a regexp and select the first match """ ...
Add a module for listing courses on schedule website""" Module for searching on SVSU Course Schedule website """ import bs4 import re from selenium import webdriver from selenium.webdriver.support.ui import Select from time import sleep def enter_selection(driver, id, regexp): """ Search drop-down menu option...
<commit_before><commit_msg>Add a module for listing courses on schedule website<commit_after>""" Module for searching on SVSU Course Schedule website """ import bs4 import re from selenium import webdriver from selenium.webdriver.support.ui import Select from time import sleep def enter_selection(driver, id, regexp):...
2477c94314acbfd7c5687b1ea0b17db812964552
python/robotics/sensors/sharp_ir_distance_sensor.py
python/robotics/sensors/sharp_ir_distance_sensor.py
class SharpIrDistanceSensor(object): def __init__(self, spi_interface, pin_id): self.spi_interface = spi_interface self.pin_id = pin_id def _voltageToMeters(self, voltage): return 67.84 / (voltage - 3) - 0.04 def readDistance(self): '''Returns distance in meters.''' ...
Add implementation for Sharp IR distance sensor
Add implementation for Sharp IR distance sensor
Python
mit
asydorchuk/robotics,asydorchuk/robotics
Add implementation for Sharp IR distance sensor
class SharpIrDistanceSensor(object): def __init__(self, spi_interface, pin_id): self.spi_interface = spi_interface self.pin_id = pin_id def _voltageToMeters(self, voltage): return 67.84 / (voltage - 3) - 0.04 def readDistance(self): '''Returns distance in meters.''' ...
<commit_before><commit_msg>Add implementation for Sharp IR distance sensor<commit_after>
class SharpIrDistanceSensor(object): def __init__(self, spi_interface, pin_id): self.spi_interface = spi_interface self.pin_id = pin_id def _voltageToMeters(self, voltage): return 67.84 / (voltage - 3) - 0.04 def readDistance(self): '''Returns distance in meters.''' ...
Add implementation for Sharp IR distance sensorclass SharpIrDistanceSensor(object): def __init__(self, spi_interface, pin_id): self.spi_interface = spi_interface self.pin_id = pin_id def _voltageToMeters(self, voltage): return 67.84 / (voltage - 3) - 0.04 def readDistance(self): ...
<commit_before><commit_msg>Add implementation for Sharp IR distance sensor<commit_after>class SharpIrDistanceSensor(object): def __init__(self, spi_interface, pin_id): self.spi_interface = spi_interface self.pin_id = pin_id def _voltageToMeters(self, voltage): return 67.84 / (voltage -...
cb4f876c7bd52f66de955c0a800a3fd0de612ead
tests/health_checks/test_per_gwas_snp_AND_disease.py
tests/health_checks/test_per_gwas_snp_AND_disease.py
# ------------------------------------------------ # built-ins import unittest # local from utils.base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerGwasSnpANDDisease(TestPostgapBase): def setUp(self): self.per_gwas_snp_and_disease = self.pg.groupby(['gwas_...
Add tests per gwas_snp and disease
Add tests per gwas_snp and disease
Python
apache-2.0
Ensembl/cttv024,Ensembl/cttv024
Add tests per gwas_snp and disease
# ------------------------------------------------ # built-ins import unittest # local from utils.base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerGwasSnpANDDisease(TestPostgapBase): def setUp(self): self.per_gwas_snp_and_disease = self.pg.groupby(['gwas_...
<commit_before><commit_msg>Add tests per gwas_snp and disease<commit_after>
# ------------------------------------------------ # built-ins import unittest # local from utils.base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerGwasSnpANDDisease(TestPostgapBase): def setUp(self): self.per_gwas_snp_and_disease = self.pg.groupby(['gwas_...
Add tests per gwas_snp and disease# ------------------------------------------------ # built-ins import unittest # local from utils.base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerGwasSnpANDDisease(TestPostgapBase): def setUp(self): self.per_gwas_snp_and...
<commit_before><commit_msg>Add tests per gwas_snp and disease<commit_after># ------------------------------------------------ # built-ins import unittest # local from utils.base import TestPostgapBase # ------------------------------------------------ class TestPostgapPerGwasSnpANDDisease(TestPostgapBase): def s...
339790845461344ab7ea5a6f864b3bfdede0b9c0
dev-tools/get-bwc-version.py
dev-tools/get-bwc-version.py
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
Add script to grab ES version for BWC tests.
Tools: Add script to grab ES version for BWC tests. closes #7653
Python
apache-2.0
myelin/elasticsearch,gmarz/elasticsearch,andrestc/elasticsearch,vrkansagara/elasticsearch,xpandan/elasticsearch,strapdata/elassandra5-rc,sposam/elasticsearch,bestwpw/elasticsearch,PhaedrusTheGreek/elasticsearch,maddin2016/elasticsearch,kaneshin/elasticsearch,huypx1292/elasticsearch,sjohnr/elasticsearch,wittyameta/elast...
Tools: Add script to grab ES version for BWC tests. closes #7653
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
<commit_before><commit_msg>Tools: Add script to grab ES version for BWC tests. closes #7653<commit_after>
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
Tools: Add script to grab ES version for BWC tests. closes #7653# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License...
<commit_before><commit_msg>Tools: Add script to grab ES version for BWC tests. closes #7653<commit_after># Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses th...
d0d10749c7e9bd37c5ce4eed1574390e46914b8f
sklearn/utils/tests/test_ransac.py
sklearn/utils/tests/test_ransac.py
import numpy as np from numpy.testing import assert_equal from sklearn import linear_model from sklearn.utils import ransac def test_ransac_inliers_outliers(): np.random.seed(1) # Generate coordinates of line X = np.arange(-200, 200) y = 0.2 * X + 20 data = np.column_stack([X, y]) # Add som...
Add simple RANSAC unit test
Add simple RANSAC unit test
Python
bsd-3-clause
xyguo/scikit-learn,imaculate/scikit-learn,walterreade/scikit-learn,ClimbsRocks/scikit-learn,vshtanko/scikit-learn,liangz0707/scikit-learn,sumspr/scikit-learn,DonBeo/scikit-learn,tmhm/scikit-learn,fredhusser/scikit-learn,aetilley/scikit-learn,pypot/scikit-learn,carrillo/scikit-learn,xwolf12/scikit-learn,xiaoxiamii/sciki...
Add simple RANSAC unit test
import numpy as np from numpy.testing import assert_equal from sklearn import linear_model from sklearn.utils import ransac def test_ransac_inliers_outliers(): np.random.seed(1) # Generate coordinates of line X = np.arange(-200, 200) y = 0.2 * X + 20 data = np.column_stack([X, y]) # Add som...
<commit_before><commit_msg>Add simple RANSAC unit test<commit_after>
import numpy as np from numpy.testing import assert_equal from sklearn import linear_model from sklearn.utils import ransac def test_ransac_inliers_outliers(): np.random.seed(1) # Generate coordinates of line X = np.arange(-200, 200) y = 0.2 * X + 20 data = np.column_stack([X, y]) # Add som...
Add simple RANSAC unit testimport numpy as np from numpy.testing import assert_equal from sklearn import linear_model from sklearn.utils import ransac def test_ransac_inliers_outliers(): np.random.seed(1) # Generate coordinates of line X = np.arange(-200, 200) y = 0.2 * X + 20 data = np.column_s...
<commit_before><commit_msg>Add simple RANSAC unit test<commit_after>import numpy as np from numpy.testing import assert_equal from sklearn import linear_model from sklearn.utils import ransac def test_ransac_inliers_outliers(): np.random.seed(1) # Generate coordinates of line X = np.arange(-200, 200) ...
7aac6f1b6407300033e5ba46b61b9b8f0ae089c3
boardinghouse/tests/test_sql.py
boardinghouse/tests/test_sql.py
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
Add test for exception raising.
Add test for exception raising.
Python
bsd-3-clause
luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse
Add test for exception raising.
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
<commit_before><commit_msg>Add test for exception raising.<commit_after>
""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schema.objects.mass_create('a') ...
Add test for exception raising.""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test_exception_is_raised(self): Schem...
<commit_before><commit_msg>Add test for exception raising.<commit_after>""" Tests for the RAW sql functions. """ from django.conf import settings from django.test import TestCase from django.db.models import connection from boardinghouse.models import Schema class TestRejectSchemaColumnChange(TestCase): def test...
033bddcfc933191397e4f01cd5ce5b10b2344c92
boundary_cli/plugin_manifest.py
boundary_cli/plugin_manifest.py
#!/usr/bin/env python ### ### Copyright 2014-2015, Boundary ### ### Licensed under the Apache License, Version 2.0 (the "License"); ### you may not use this file except in compliance with the License. ### You may obtain a copy of the License at ### ### http://www.apache.org/licenses/LICENSE-2.0 ### ### Unless requi...
Add python class for handling the plugin manifest plugin.json
Add python class for handling the plugin manifest plugin.json
Python
apache-2.0
jdgwartney/pulse-api-cli,boundary/pulse-api-cli,boundary/boundary-api-cli,boundary/boundary-api-cli,jdgwartney/boundary-api-cli,jdgwartney/pulse-api-cli,wcainboundary/boundary-api-cli,boundary/pulse-api-cli,jdgwartney/boundary-api-cli,wcainboundary/boundary-api-cli
Add python class for handling the plugin manifest plugin.json
#!/usr/bin/env python ### ### Copyright 2014-2015, Boundary ### ### Licensed under the Apache License, Version 2.0 (the "License"); ### you may not use this file except in compliance with the License. ### You may obtain a copy of the License at ### ### http://www.apache.org/licenses/LICENSE-2.0 ### ### Unless requi...
<commit_before><commit_msg>Add python class for handling the plugin manifest plugin.json<commit_after>
#!/usr/bin/env python ### ### Copyright 2014-2015, Boundary ### ### Licensed under the Apache License, Version 2.0 (the "License"); ### you may not use this file except in compliance with the License. ### You may obtain a copy of the License at ### ### http://www.apache.org/licenses/LICENSE-2.0 ### ### Unless requi...
Add python class for handling the plugin manifest plugin.json#!/usr/bin/env python ### ### Copyright 2014-2015, Boundary ### ### Licensed under the Apache License, Version 2.0 (the "License"); ### you may not use this file except in compliance with the License. ### You may obtain a copy of the License at ### ### ht...
<commit_before><commit_msg>Add python class for handling the plugin manifest plugin.json<commit_after>#!/usr/bin/env python ### ### Copyright 2014-2015, Boundary ### ### Licensed under the Apache License, Version 2.0 (the "License"); ### you may not use this file except in compliance with the License. ### You may obtai...
e3d54a9f85a98acd774a22281288b9224fa18b12
djangae/settings_base.py
djangae/settings_base.py
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
Make sure we set the EMAIL_BACKEND by default
Make sure we set the EMAIL_BACKEND by default
Python
bsd-3-clause
armirusco/djangae,SiPiggles/djangae,nealedj/djangae,armirusco/djangae,martinogden/djangae,wangjun/djangae,nealedj/djangae,chargrizzle/djangae,SiPiggles/djangae,leekchan/djangae,trik/djangae,asendecka/djangae,martinogden/djangae,leekchan/djangae,grzes/djangae,jscissr/djangae,SiPiggles/djangae,wangjun/djangae,kirberich/d...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
<commit_before> DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.ba...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.backends.appengin...
<commit_before> DEFAULT_FILE_STORAGE = 'djangae.storage.BlobstoreStorage' FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 FILE_UPLOAD_HANDLERS = ( 'djangae.storage.BlobstoreFileUploadHandler', 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) DATABASES = { 'default': { 'ENGINE': 'djangae.db.ba...
e1e8dbaec0717a1bcbc709458da0dcfdfba03bd0
glaciercmd/command_list_vaults.py
glaciercmd/command_list_vaults.py
import boto class CommandListVaults(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) for index, vault in enumerate(glacier_connection.list_vaults()):...
Add a command to list vaults
Add a command to list vaults
Python
mit
carsonmcdonald/glacier-cmd
Add a command to list vaults
import boto class CommandListVaults(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) for index, vault in enumerate(glacier_connection.list_vaults()):...
<commit_before><commit_msg>Add a command to list vaults<commit_after>
import boto class CommandListVaults(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) for index, vault in enumerate(glacier_connection.list_vaults()):...
Add a command to list vaultsimport boto class CommandListVaults(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) for index, vault in enumerate(glacie...
<commit_before><commit_msg>Add a command to list vaults<commit_after>import boto class CommandListVaults(object): def execute(self, args, config): glacier_connection = boto.connect_glacier(aws_access_key_id=config.get('configuration', 'aws_key'), aws_secret_access_key=config.get('configuration', 'aws_secret')) ...
e3abfebdc57d364ded08034a6f1dead556fc4b57
regscrape/regscrape_lib/commands/cancel_jobs.py
regscrape/regscrape_lib/commands/cancel_jobs.py
from regscrape_lib.util import get_db import settings def run(): query = settings.FILTER.copy() query['_job_id'] = {'$exists': True} db = get_db() db.docs.update(query, {'$unset': {'_job_id': True}}, multi=True, safe=True) print 'Canceled all currently-assigned jobs.'
Add command to cancel existing jobs to make it easier to resume failed scrapes.
Add command to cancel existing jobs to make it easier to resume failed scrapes.
Python
bsd-3-clause
sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper
Add command to cancel existing jobs to make it easier to resume failed scrapes.
from regscrape_lib.util import get_db import settings def run(): query = settings.FILTER.copy() query['_job_id'] = {'$exists': True} db = get_db() db.docs.update(query, {'$unset': {'_job_id': True}}, multi=True, safe=True) print 'Canceled all currently-assigned jobs.'
<commit_before><commit_msg>Add command to cancel existing jobs to make it easier to resume failed scrapes.<commit_after>
from regscrape_lib.util import get_db import settings def run(): query = settings.FILTER.copy() query['_job_id'] = {'$exists': True} db = get_db() db.docs.update(query, {'$unset': {'_job_id': True}}, multi=True, safe=True) print 'Canceled all currently-assigned jobs.'
Add command to cancel existing jobs to make it easier to resume failed scrapes.from regscrape_lib.util import get_db import settings def run(): query = settings.FILTER.copy() query['_job_id'] = {'$exists': True} db = get_db() db.docs.update(query, {'$unset': {'_job_id': True}}, multi=True, safe=Tr...
<commit_before><commit_msg>Add command to cancel existing jobs to make it easier to resume failed scrapes.<commit_after>from regscrape_lib.util import get_db import settings def run(): query = settings.FILTER.copy() query['_job_id'] = {'$exists': True} db = get_db() db.docs.update(query, {'$unset'...
fda37167996c1c1550ef94a033977982248add64
word2vec_convert.py
word2vec_convert.py
from flask import Flask, request from flask.ext.restful import reqparse, Api, Resource from gensim.models.word2vec import Word2Vec import json print 'loading model' MODEL = Word2Vec.load_word2vec_format( 'GoogleNews-vectors-negative300.bin.gz', binary=True) print 'model loaded' print 'dumping model' MODEL.save('Go...
Convert the word2vec to gensim format
convert: Convert the word2vec to gensim format
Python
mit
mdbecker/word2vec_demo,mdbecker/word2vec_demo
convert: Convert the word2vec to gensim format
from flask import Flask, request from flask.ext.restful import reqparse, Api, Resource from gensim.models.word2vec import Word2Vec import json print 'loading model' MODEL = Word2Vec.load_word2vec_format( 'GoogleNews-vectors-negative300.bin.gz', binary=True) print 'model loaded' print 'dumping model' MODEL.save('Go...
<commit_before><commit_msg>convert: Convert the word2vec to gensim format<commit_after>
from flask import Flask, request from flask.ext.restful import reqparse, Api, Resource from gensim.models.word2vec import Word2Vec import json print 'loading model' MODEL = Word2Vec.load_word2vec_format( 'GoogleNews-vectors-negative300.bin.gz', binary=True) print 'model loaded' print 'dumping model' MODEL.save('Go...
convert: Convert the word2vec to gensim formatfrom flask import Flask, request from flask.ext.restful import reqparse, Api, Resource from gensim.models.word2vec import Word2Vec import json print 'loading model' MODEL = Word2Vec.load_word2vec_format( 'GoogleNews-vectors-negative300.bin.gz', binary=True) print 'mode...
<commit_before><commit_msg>convert: Convert the word2vec to gensim format<commit_after>from flask import Flask, request from flask.ext.restful import reqparse, Api, Resource from gensim.models.word2vec import Word2Vec import json print 'loading model' MODEL = Word2Vec.load_word2vec_format( 'GoogleNews-vectors-nega...
e74ebce60cc1de84465b16175320aa32f4795c0a
src/pyddl/__init__.py
src/pyddl/__init__.py
from abc import abstractmethod __author__ = "Jonathan Hale" class DdlStructure: """ An OpenDDL structure. """ def __init__(self, name): self.structures = [] self.properties = dict() self.name = name class DdlDocument: """ An OpenDDL document. """ def __init...
Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter
Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter Empty classes for a general structure. Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com>
Python
mit
Squareys/PyDDL
Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter Empty classes for a general structure. Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com>
from abc import abstractmethod __author__ = "Jonathan Hale" class DdlStructure: """ An OpenDDL structure. """ def __init__(self, name): self.structures = [] self.properties = dict() self.name = name class DdlDocument: """ An OpenDDL document. """ def __init...
<commit_before><commit_msg>Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter Empty classes for a general structure. Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com><commit_after>
from abc import abstractmethod __author__ = "Jonathan Hale" class DdlStructure: """ An OpenDDL structure. """ def __init__(self, name): self.structures = [] self.properties = dict() self.name = name class DdlDocument: """ An OpenDDL document. """ def __init...
Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter Empty classes for a general structure. Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com>from abc import abstractmethod __author__ = "Jonathan Hale" class DdlStructure: """ An OpenDDL structure. """ d...
<commit_before><commit_msg>Add initial DdlStructure, DdlDocument, DdlWriter and DdlTextWriter Empty classes for a general structure. Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com><commit_after>from abc import abstractmethod __author__ = "Jonathan Hale" class DdlStructure: """...
4bd16a83c2cc6202edd0e2a9c3fa49df46519d59
scrapi/harvesters/iowaresearch.py
scrapi/harvesters/iowaresearch.py
''' Harvester for the Iowa Research Online for the SHARE project Example API call: http://ir.uiowa.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class IowaresearchHarvester(OAIHarvester): short_name = 'iowaresearch' long_n...
Add Iowa Research Online harvester
Add Iowa Research Online harvester
Python
apache-2.0
icereval/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,mehanig/scrapi,mehanig/scrapi,felliott/scrapi,erinspace/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,alexgarciac/scrapi,fabianvf/scrapi
Add Iowa Research Online harvester
''' Harvester for the Iowa Research Online for the SHARE project Example API call: http://ir.uiowa.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class IowaresearchHarvester(OAIHarvester): short_name = 'iowaresearch' long_n...
<commit_before><commit_msg>Add Iowa Research Online harvester<commit_after>
''' Harvester for the Iowa Research Online for the SHARE project Example API call: http://ir.uiowa.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class IowaresearchHarvester(OAIHarvester): short_name = 'iowaresearch' long_n...
Add Iowa Research Online harvester''' Harvester for the Iowa Research Online for the SHARE project Example API call: http://ir.uiowa.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class IowaresearchHarvester(OAIHarvester): shor...
<commit_before><commit_msg>Add Iowa Research Online harvester<commit_after>''' Harvester for the Iowa Research Online for the SHARE project Example API call: http://ir.uiowa.edu/do/oai/?verb=ListRecords&metadataPrefix=oai_dc ''' from __future__ import unicode_literals from scrapi.base import OAIHarvester class Iowa...
3eb0baa7f00a3ec77cc5ebf0d43c0f6918c62161
enable/constraints_container.py
enable/constraints_container.py
#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ # traits imports from traits.api import Dict # local imports from container import Container ...
Add a ConstraintsContainer which doesn't do much yet.
Add a ConstraintsContainer which doesn't do much yet.
Python
bsd-3-clause
tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable
Add a ConstraintsContainer which doesn't do much yet.
#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ # traits imports from traits.api import Dict # local imports from container import Container ...
<commit_before><commit_msg>Add a ConstraintsContainer which doesn't do much yet.<commit_after>
#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ # traits imports from traits.api import Dict # local imports from container import Container ...
Add a ConstraintsContainer which doesn't do much yet.#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ # traits imports from traits.api import Dic...
<commit_before><commit_msg>Add a ConstraintsContainer which doesn't do much yet.<commit_after>#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ # ...
09fa9bc28d7265c013737b2c44c94991880877d1
octoprint/cura/tests/test_cura.py
octoprint/cura/tests/test_cura.py
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
Fix error in test path
Fix error in test path
Python
agpl-3.0
abinashk-inf/AstroBox,Mikk36/OctoPrint,EZ3-India/EZ-Remote,ymilord/OctoPrint-MrBeam,beeverycreative/BEEweb,Voxel8/OctoPrint,Catrodigious/OctoPrint-TAM,ryanneufeld/OctoPrint,ryanneufeld/OctoPrint,eddieparker/OctoPrint,mcanes/OctoPrint,Voxel8/OctoPrint,shaggythesheep/OctoPrint,nicanor-romero/OctoPrint,dansantee/OctoPrint...
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
<commit_before> import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) ...
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) def test_cur...
<commit_before> import unittest from cura import CuraFactory from cura import CuraEngine class CuraFactoryTestCase(unittest.TestCase): def test_cura_factory(self): fake_path = 'my/temp/path' result = CuraFactory.create_slicer(fake_path) self.assertEqual(fake_path, result.cura_path) ...
9e38f0c54faa4b4bdfa15dd5139d562a0661a2a0
test/unit/builtins/test_version.py
test/unit/builtins/test_version.py
import unittest from bfg9000.builtins.version import bfg9000_required_version, bfg9000_version from bfg9000.versioning import bfg_version, VersionError class TestRequiredVersion(unittest.TestCase): def test_bfg_version(self): bfg9000_required_version('>=0.1.0') self.assertRaises(VersionError, bfg...
Add unit tests for versioning builtins
Add unit tests for versioning builtins
Python
bsd-3-clause
jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000
Add unit tests for versioning builtins
import unittest from bfg9000.builtins.version import bfg9000_required_version, bfg9000_version from bfg9000.versioning import bfg_version, VersionError class TestRequiredVersion(unittest.TestCase): def test_bfg_version(self): bfg9000_required_version('>=0.1.0') self.assertRaises(VersionError, bfg...
<commit_before><commit_msg>Add unit tests for versioning builtins<commit_after>
import unittest from bfg9000.builtins.version import bfg9000_required_version, bfg9000_version from bfg9000.versioning import bfg_version, VersionError class TestRequiredVersion(unittest.TestCase): def test_bfg_version(self): bfg9000_required_version('>=0.1.0') self.assertRaises(VersionError, bfg...
Add unit tests for versioning builtinsimport unittest from bfg9000.builtins.version import bfg9000_required_version, bfg9000_version from bfg9000.versioning import bfg_version, VersionError class TestRequiredVersion(unittest.TestCase): def test_bfg_version(self): bfg9000_required_version('>=0.1.0') ...
<commit_before><commit_msg>Add unit tests for versioning builtins<commit_after>import unittest from bfg9000.builtins.version import bfg9000_required_version, bfg9000_version from bfg9000.versioning import bfg_version, VersionError class TestRequiredVersion(unittest.TestCase): def test_bfg_version(self): ...
14759bf0a40025745c11f4110f88e5f58115d2c9
ci_helpers_usage.py
ci_helpers_usage.py
import requests from github import Github from common import get_credentials username, password = get_credentials() gh = Github(username, password) gh_search_result = gh.search_code('filename:.travis.yml "astropy/ci-helpers"') gh_repo = [] gh_name = [] for i in gh_search_result: gh_repo.append(i.repository.full...
Add script to check ci-helpers usage
Add script to check ci-helpers usage
Python
bsd-3-clause
astropy/astropy-tools,astropy/astropy-tools
Add script to check ci-helpers usage
import requests from github import Github from common import get_credentials username, password = get_credentials() gh = Github(username, password) gh_search_result = gh.search_code('filename:.travis.yml "astropy/ci-helpers"') gh_repo = [] gh_name = [] for i in gh_search_result: gh_repo.append(i.repository.full...
<commit_before><commit_msg>Add script to check ci-helpers usage<commit_after>
import requests from github import Github from common import get_credentials username, password = get_credentials() gh = Github(username, password) gh_search_result = gh.search_code('filename:.travis.yml "astropy/ci-helpers"') gh_repo = [] gh_name = [] for i in gh_search_result: gh_repo.append(i.repository.full...
Add script to check ci-helpers usageimport requests from github import Github from common import get_credentials username, password = get_credentials() gh = Github(username, password) gh_search_result = gh.search_code('filename:.travis.yml "astropy/ci-helpers"') gh_repo = [] gh_name = [] for i in gh_search_result: ...
<commit_before><commit_msg>Add script to check ci-helpers usage<commit_after>import requests from github import Github from common import get_credentials username, password = get_credentials() gh = Github(username, password) gh_search_result = gh.search_code('filename:.travis.yml "astropy/ci-helpers"') gh_repo = [] ...
62bce0ee3ea80f41d7184c6199defba55fc257f2
tests/external/py2/testfixture_test.py
tests/external/py2/testfixture_test.py
#!/usr/bin/env python # ---------------------------------------------------------------------- # Copyright (C) 2013 Numenta Inc. All rights reserved. # # The information and source code contained herein is the # exclusive property of Numenta Inc. No part of this software # may be used, reproduced, stored or distributed...
Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.
Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.
Python
agpl-3.0
passiweinberger/nupic,lscheinkman/nupic,subutai/nupic,akhilaananthram/nupic,brev/nupic,BeiLuoShiMen/nupic,cngo-github/nupic,cngo-github/nupic,glorizen/nupic,blueburningcoder/nupic,rhyolight/nupic,rcrowder/nupic,marionleborgne/nupic,lscheinkman/nupic,alfonsokim/nupic,metaml/nupic,chanceraine/nupic,cogmission/nupic,EricS...
Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.
#!/usr/bin/env python # ---------------------------------------------------------------------- # Copyright (C) 2013 Numenta Inc. All rights reserved. # # The information and source code contained herein is the # exclusive property of Numenta Inc. No part of this software # may be used, reproduced, stored or distributed...
<commit_before><commit_msg>Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.<commit_after>
#!/usr/bin/env python # ---------------------------------------------------------------------- # Copyright (C) 2013 Numenta Inc. All rights reserved. # # The information and source code contained herein is the # exclusive property of Numenta Inc. No part of this software # may be used, reproduced, stored or distributed...
Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.#!/usr/bin/env python # ---------------------------------------------------------------------...
<commit_before><commit_msg>Make sure setUpModule is called by the test framework. We brought in pytest-2.4.0.dev8 for that specific functionality. However, one time we regressed, and our tests started misbehaving. So, this test is here to keep us honest.<commit_after>#!/usr/bin/env python # ----------------------------...
b9dfb22f5676226a77b89a994843a27b43823391
tests/functional/test_waiter_config.py
tests/functional/test_waiter_config.py
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Add start of basic waiter model validation
Add start of basic waiter model validation Makes it quicker to review contributions for waiter configs.
Python
apache-2.0
boto/botocore,pplu/botocore
Add start of basic waiter model validation Makes it quicker to review contributions for waiter configs.
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
<commit_before><commit_msg>Add start of basic waiter model validation Makes it quicker to review contributions for waiter configs.<commit_after>
# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Add start of basic waiter model validation Makes it quicker to review contributions for waiter configs.# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy ...
<commit_before><commit_msg>Add start of basic waiter model validation Makes it quicker to review contributions for waiter configs.<commit_after># Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file excep...
d72961536570695ec1a6a160f118aff51b9b1328
cra_helper/views.py
cra_helper/views.py
from django.views.decorators.csrf import csrf_exempt from proxy.views import proxy_view from cra_helper import CRA_URL @csrf_exempt def proxy_cra_requests(request, path): ''' Proxy various requests sent by Create-React-App projects in dev mode ("npm start"), within Django-hosted views, to the Create-React-App ...
Add a reverse-proxy view for hot-reloading
Add a reverse-proxy view for hot-reloading
Python
mit
MasterKale/django-cra-helper
Add a reverse-proxy view for hot-reloading
from django.views.decorators.csrf import csrf_exempt from proxy.views import proxy_view from cra_helper import CRA_URL @csrf_exempt def proxy_cra_requests(request, path): ''' Proxy various requests sent by Create-React-App projects in dev mode ("npm start"), within Django-hosted views, to the Create-React-App ...
<commit_before><commit_msg>Add a reverse-proxy view for hot-reloading<commit_after>
from django.views.decorators.csrf import csrf_exempt from proxy.views import proxy_view from cra_helper import CRA_URL @csrf_exempt def proxy_cra_requests(request, path): ''' Proxy various requests sent by Create-React-App projects in dev mode ("npm start"), within Django-hosted views, to the Create-React-App ...
Add a reverse-proxy view for hot-reloadingfrom django.views.decorators.csrf import csrf_exempt from proxy.views import proxy_view from cra_helper import CRA_URL @csrf_exempt def proxy_cra_requests(request, path): ''' Proxy various requests sent by Create-React-App projects in dev mode ("npm start"), within Dja...
<commit_before><commit_msg>Add a reverse-proxy view for hot-reloading<commit_after>from django.views.decorators.csrf import csrf_exempt from proxy.views import proxy_view from cra_helper import CRA_URL @csrf_exempt def proxy_cra_requests(request, path): ''' Proxy various requests sent by Create-React-App project...
3a63b8986b347091be613a23a1029bb744eb20f1
tests/passthrough/test_passthrough.py
tests/passthrough/test_passthrough.py
import __builtin__ from pytest import raises from fuse import FuseOSError from mock import MagicMock, patch, call from gitfs.views import PassthroughView class TestPassthrough(object): def setup(self): def mock_super(*args, **kwargs): if args and issubclass(PassthroughView, args[0]): ...
Add test for the access method.
Add test for the access method.
Python
apache-2.0
ksmaheshkumar/gitfs,PressLabs/gitfs,rowhit/gitfs,PressLabs/gitfs,bussiere/gitfs
Add test for the access method.
import __builtin__ from pytest import raises from fuse import FuseOSError from mock import MagicMock, patch, call from gitfs.views import PassthroughView class TestPassthrough(object): def setup(self): def mock_super(*args, **kwargs): if args and issubclass(PassthroughView, args[0]): ...
<commit_before><commit_msg>Add test for the access method.<commit_after>
import __builtin__ from pytest import raises from fuse import FuseOSError from mock import MagicMock, patch, call from gitfs.views import PassthroughView class TestPassthrough(object): def setup(self): def mock_super(*args, **kwargs): if args and issubclass(PassthroughView, args[0]): ...
Add test for the access method.import __builtin__ from pytest import raises from fuse import FuseOSError from mock import MagicMock, patch, call from gitfs.views import PassthroughView class TestPassthrough(object): def setup(self): def mock_super(*args, **kwargs): if args and issubclass(Pas...
<commit_before><commit_msg>Add test for the access method.<commit_after>import __builtin__ from pytest import raises from fuse import FuseOSError from mock import MagicMock, patch, call from gitfs.views import PassthroughView class TestPassthrough(object): def setup(self): def mock_super(*args, **kwargs...
eb1ae63b247b668453b55e0622a5aa6018bb82ab
semillas_backend/users/management/commands/anonymize_all_data.py
semillas_backend/users/management/commands/anonymize_all_data.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from factory import Faker # Django imports from django.conf import settings from django.core.management.base import BaseCommand from semillas_backend.users.models import User class Command(BaseCommand): help = "Th...
Add script to anonymize all data
Add script to anonymize all data
Python
mit
Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend
Add script to anonymize all data
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from factory import Faker # Django imports from django.conf import settings from django.core.management.base import BaseCommand from semillas_backend.users.models import User class Command(BaseCommand): help = "Th...
<commit_before><commit_msg>Add script to anonymize all data<commit_after>
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from factory import Faker # Django imports from django.conf import settings from django.core.management.base import BaseCommand from semillas_backend.users.models import User class Command(BaseCommand): help = "Th...
Add script to anonymize all data# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from factory import Faker # Django imports from django.conf import settings from django.core.management.base import BaseCommand from semillas_backend.users.models import User class Comm...
<commit_before><commit_msg>Add script to anonymize all data<commit_after># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function from factory import Faker # Django imports from django.conf import settings from django.core.management.base import BaseCommand from semillas_backe...
dffa63270d9bcd54fad9beb6847ad1e8aa9f86ba
hs_core/management/commands/debug_composite_resource.py
hs_core/management/commands/debug_composite_resource.py
"""This prints the state of a logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models import BaseResource, ResourceFile def debug_resource(short_id): """ Debug view for resource depicts...
Debug the contents of composite resources after conversion.
Debug the contents of composite resources after conversion.
Python
bsd-3-clause
hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare,hydroshare/hydroshare
Debug the contents of composite resources after conversion.
"""This prints the state of a logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models import BaseResource, ResourceFile def debug_resource(short_id): """ Debug view for resource depicts...
<commit_before><commit_msg>Debug the contents of composite resources after conversion.<commit_after>
"""This prints the state of a logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models import BaseResource, ResourceFile def debug_resource(short_id): """ Debug view for resource depicts...
Debug the contents of composite resources after conversion."""This prints the state of a logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models import BaseResource, ResourceFile def debug_...
<commit_before><commit_msg>Debug the contents of composite resources after conversion.<commit_after>"""This prints the state of a logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models impor...
fd1062be8acbb09ca60dd0d87e657d9417d9b4d7
scripts/checkInstalledFiles.py
scripts/checkInstalledFiles.py
#!/usr/bin/env python import os import sys import stat import difflib import inspect import getopt def referenceFile(): if sys.platform.startswith('linux'): filename = 'makeinstall.linux' elif sys.platform.startswith('win'): filename = 'makeinstall.windows' elif sys.platform == 'darwin': ...
Add script that can check builds for completeness.
Add script that can check builds for completeness. It checks against os-dependent lists which will be submitted in follow-up commits. Change-Id: Ieb40b19dbd85c30b28062b46320a6ee60ba672af Reviewed-by: Bill King <2ab503764bfba23a6f2e273493fc021dc3d4cd8f@nokia.com>
Python
lgpl-2.1
xianian/qt-creator,farseerri/git_code,xianian/qt-creator,kuba1/qtcreator,kuba1/qtcreator,syntheticpp/qt-creator,richardmg/qtcreator,malikcjm/qtcreator,farseerri/git_code,duythanhphan/qt-creator,xianian/qt-creator,colede/qtcreator,danimo/qt-creator,malikcjm/qtcreator,jonnor/qt-creator,xianian/qt-creator,Distrotech/qtcre...
Add script that can check builds for completeness. It checks against os-dependent lists which will be submitted in follow-up commits. Change-Id: Ieb40b19dbd85c30b28062b46320a6ee60ba672af Reviewed-by: Bill King <2ab503764bfba23a6f2e273493fc021dc3d4cd8f@nokia.com>
#!/usr/bin/env python import os import sys import stat import difflib import inspect import getopt def referenceFile(): if sys.platform.startswith('linux'): filename = 'makeinstall.linux' elif sys.platform.startswith('win'): filename = 'makeinstall.windows' elif sys.platform == 'darwin': ...
<commit_before><commit_msg>Add script that can check builds for completeness. It checks against os-dependent lists which will be submitted in follow-up commits. Change-Id: Ieb40b19dbd85c30b28062b46320a6ee60ba672af Reviewed-by: Bill King <2ab503764bfba23a6f2e273493fc021dc3d4cd8f@nokia.com><commit_after>
#!/usr/bin/env python import os import sys import stat import difflib import inspect import getopt def referenceFile(): if sys.platform.startswith('linux'): filename = 'makeinstall.linux' elif sys.platform.startswith('win'): filename = 'makeinstall.windows' elif sys.platform == 'darwin': ...
Add script that can check builds for completeness. It checks against os-dependent lists which will be submitted in follow-up commits. Change-Id: Ieb40b19dbd85c30b28062b46320a6ee60ba672af Reviewed-by: Bill King <2ab503764bfba23a6f2e273493fc021dc3d4cd8f@nokia.com>#!/usr/bin/env python import os import sys import stat i...
<commit_before><commit_msg>Add script that can check builds for completeness. It checks against os-dependent lists which will be submitted in follow-up commits. Change-Id: Ieb40b19dbd85c30b28062b46320a6ee60ba672af Reviewed-by: Bill King <2ab503764bfba23a6f2e273493fc021dc3d4cd8f@nokia.com><commit_after>#!/usr/bin/env ...
52191143671d2d9311f978c4f3ba043807b918e8
singularity_frobenius.py
singularity_frobenius.py
# -*- coding: utf-8 -*- """ Created on Thu Aug 21 13:23:31 2014 @author: Jens von der Linden Implments Frobneius expansion around a singularity to determine the "small" solution and check the Suydam condition. """ from __future__ import print_function from __future__ import division from __future__ import absolute_i...
Add Frobenius solution methods for singular points.
Add Frobenius solution methods for singular points.
Python
mit
jensv/fluxtubestability,jensv/fluxtubestability
Add Frobenius solution methods for singular points.
# -*- coding: utf-8 -*- """ Created on Thu Aug 21 13:23:31 2014 @author: Jens von der Linden Implments Frobneius expansion around a singularity to determine the "small" solution and check the Suydam condition. """ from __future__ import print_function from __future__ import division from __future__ import absolute_i...
<commit_before><commit_msg>Add Frobenius solution methods for singular points.<commit_after>
# -*- coding: utf-8 -*- """ Created on Thu Aug 21 13:23:31 2014 @author: Jens von der Linden Implments Frobneius expansion around a singularity to determine the "small" solution and check the Suydam condition. """ from __future__ import print_function from __future__ import division from __future__ import absolute_i...
Add Frobenius solution methods for singular points.# -*- coding: utf-8 -*- """ Created on Thu Aug 21 13:23:31 2014 @author: Jens von der Linden Implments Frobneius expansion around a singularity to determine the "small" solution and check the Suydam condition. """ from __future__ import print_function from __future_...
<commit_before><commit_msg>Add Frobenius solution methods for singular points.<commit_after># -*- coding: utf-8 -*- """ Created on Thu Aug 21 13:23:31 2014 @author: Jens von der Linden Implments Frobneius expansion around a singularity to determine the "small" solution and check the Suydam condition. """ from __futu...
556325cc8cb1032194c2d3739f303fe0a4cfa1a4
undercloud_heat_plugins/config.py
undercloud_heat_plugins/config.py
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
Add custom subclass to revert mapping
Add custom subclass to revert mapping To be able to revert the custom mappings down by config-download, let's add some tripleo specific subclasses which will be available in the registry. Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2 Related-Bug: #1758065
Python
apache-2.0
openstack/tripleo-common,openstack/tripleo-common
Add custom subclass to revert mapping To be able to revert the custom mappings down by config-download, let's add some tripleo specific subclasses which will be available in the registry. Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2 Related-Bug: #1758065
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
<commit_before><commit_msg>Add custom subclass to revert mapping To be able to revert the custom mappings down by config-download, let's add some tripleo specific subclasses which will be available in the registry. Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2 Related-Bug: #1758065<commit_after>
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
Add custom subclass to revert mapping To be able to revert the custom mappings down by config-download, let's add some tripleo specific subclasses which will be available in the registry. Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2 Related-Bug: #1758065# # Licensed under the Apache License, Version 2.0 (t...
<commit_before><commit_msg>Add custom subclass to revert mapping To be able to revert the custom mappings down by config-download, let's add some tripleo specific subclasses which will be available in the registry. Change-Id: I6bd4107e8e1a6a9abc38d2dca7a91a6823f8b6c2 Related-Bug: #1758065<commit_after># # Licensed...
101738323720d7f23b714d0a0b8f40c2926f9645
midterm/problem8.py
midterm/problem8.py
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
Implement applyF_filterG function (1 test case missing)
Implement applyF_filterG function (1 test case missing)
Python
mit
Kunal57/MIT_6.00.1x
Implement applyF_filterG function (1 test case missing)
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
<commit_before><commit_msg>Implement applyF_filterG function (1 test case missing)<commit_after>
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
Implement applyF_filterG function (1 test case missing)# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(ap...
<commit_before><commit_msg>Implement applyF_filterG function (1 test case missing)<commit_after># Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i...
6a42d70a9f74478ed9d650d5b96a385ea84213b7
nltk/test/unit/test_chunk.py
nltk/test/unit/test_chunk.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk import RegexpParser class TestChunkRule(unittest.TestCase): def test_tag_pattern2re_pattern_quantifier(self): """Test for bug https://github.com/nltk/nltk/issues/1597 Ensures that curly...
Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.
Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.
Python
apache-2.0
nltk/nltk,nltk/nltk,nltk/nltk
Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk import RegexpParser class TestChunkRule(unittest.TestCase): def test_tag_pattern2re_pattern_quantifier(self): """Test for bug https://github.com/nltk/nltk/issues/1597 Ensures that curly...
<commit_before><commit_msg>Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.<commit_after>
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk import RegexpParser class TestChunkRule(unittest.TestCase): def test_tag_pattern2re_pattern_quantifier(self): """Test for bug https://github.com/nltk/nltk/issues/1597 Ensures that curly...
Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk import RegexpParser class TestChunkRule(unittest.TestCase): def test_tag_pattern2re_pattern_quantifier(self): """...
<commit_before><commit_msg>Fix 1597. Allow for curly bracket quantifiers in nltk.chunk.regexp.CHUNK_TAG_PATTERN.<commit_after># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk import RegexpParser class TestChunkRule(unittest.TestCase): def test_tag_pattern...
417b95a9c95146be49feb3322d7e5f2481ea40dc
pambox/tests/test_experiment.py
pambox/tests/test_experiment.py
# -*- coding: utf-8 -*- from __future__ import division, print_function import os.path import numpy as np from numpy.testing import assert_allclose import pytest from pambox.speech import Experiment __DATA_ROOT__ = os.path.join(os.path.dirname(__file__), 'data') class TestExperiment(object): @pytest.mark.param...
Add some tests for Experiment class
Add some tests for Experiment class
Python
bsd-3-clause
achabotl/pambox
Add some tests for Experiment class
# -*- coding: utf-8 -*- from __future__ import division, print_function import os.path import numpy as np from numpy.testing import assert_allclose import pytest from pambox.speech import Experiment __DATA_ROOT__ = os.path.join(os.path.dirname(__file__), 'data') class TestExperiment(object): @pytest.mark.param...
<commit_before><commit_msg>Add some tests for Experiment class<commit_after>
# -*- coding: utf-8 -*- from __future__ import division, print_function import os.path import numpy as np from numpy.testing import assert_allclose import pytest from pambox.speech import Experiment __DATA_ROOT__ = os.path.join(os.path.dirname(__file__), 'data') class TestExperiment(object): @pytest.mark.param...
Add some tests for Experiment class# -*- coding: utf-8 -*- from __future__ import division, print_function import os.path import numpy as np from numpy.testing import assert_allclose import pytest from pambox.speech import Experiment __DATA_ROOT__ = os.path.join(os.path.dirname(__file__), 'data') class TestExperim...
<commit_before><commit_msg>Add some tests for Experiment class<commit_after># -*- coding: utf-8 -*- from __future__ import division, print_function import os.path import numpy as np from numpy.testing import assert_allclose import pytest from pambox.speech import Experiment __DATA_ROOT__ = os.path.join(os.path.dirn...
896160f5291158132c670eae65b7e45dd4a8748f
pox/messenger/mux.py
pox/messenger/mux.py
from pox.core import core from pox.messenger.messenger import * log = pox.core.getLogger() class MuxConnection (MessengerConnection): def __init__ (self, source, channelName, con): MessengerConnection.__init__(self, source, ID=str(id(self))) self.channelName = channelName self.con = con claimed = F...
Add totally untested messenger multiplexer
Add totally untested messenger multiplexer messenger.mux theoretically lets you use a single messenger connection to talk with multiple messenger servers. Send a hello:mux message to have the muxer claim the connection. Now you can send messages that include _mux:<conID>. For every unique conID, a subconnection wil...
Python
apache-2.0
adusia/pox,adusia/pox,diogommartins/pox,noxrepo/pox,kpengboy/pox-exercise,carlye566/IoT-POX,jacobq/csci5221-viro-project,kpengboy/pox-exercise,xAKLx/pox,xAKLx/pox,diogommartins/pox,kavitshah8/SDNDeveloper,xAKLx/pox,PrincetonUniversity/pox,chenyuntc/pox,kulawczukmarcin/mypox,PrincetonUniversity/pox,adusia/pox,Vamsikrish...
Add totally untested messenger multiplexer messenger.mux theoretically lets you use a single messenger connection to talk with multiple messenger servers. Send a hello:mux message to have the muxer claim the connection. Now you can send messages that include _mux:<conID>. For every unique conID, a subconnection wil...
from pox.core import core from pox.messenger.messenger import * log = pox.core.getLogger() class MuxConnection (MessengerConnection): def __init__ (self, source, channelName, con): MessengerConnection.__init__(self, source, ID=str(id(self))) self.channelName = channelName self.con = con claimed = F...
<commit_before><commit_msg>Add totally untested messenger multiplexer messenger.mux theoretically lets you use a single messenger connection to talk with multiple messenger servers. Send a hello:mux message to have the muxer claim the connection. Now you can send messages that include _mux:<conID>. For every unique...
from pox.core import core from pox.messenger.messenger import * log = pox.core.getLogger() class MuxConnection (MessengerConnection): def __init__ (self, source, channelName, con): MessengerConnection.__init__(self, source, ID=str(id(self))) self.channelName = channelName self.con = con claimed = F...
Add totally untested messenger multiplexer messenger.mux theoretically lets you use a single messenger connection to talk with multiple messenger servers. Send a hello:mux message to have the muxer claim the connection. Now you can send messages that include _mux:<conID>. For every unique conID, a subconnection wil...
<commit_before><commit_msg>Add totally untested messenger multiplexer messenger.mux theoretically lets you use a single messenger connection to talk with multiple messenger servers. Send a hello:mux message to have the muxer claim the connection. Now you can send messages that include _mux:<conID>. For every unique...
0a08696add6080c37e6083cedbb950f1ab19cee8
test/test_convert.py
test/test_convert.py
# This file is part of beets. # Copyright 2014, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
Test convert error during import
Test convert error during import When the conversion of an audio file fails during import the original should be imported. See #659
Python
mit
Andypsamp/CODfinalJUNIT,pkess/beets,SusannaMaria/beets,sampsyo/beets,artemutin/beets,jmwatte/beets,gabrielaraujof/beets,Wen777/beets,moodboom/beets,tima/beets,mried/beets,diego-plan9/beets,YetAnotherNerd/beets,jcoady9/beets,Freso/beets,untitaker/beets,untitaker/beets,sampsyo/beets,kelvinhammond/beets,kareemallen/beets,...
Test convert error during import When the conversion of an audio file fails during import the original should be imported. See #659
# This file is part of beets. # Copyright 2014, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
<commit_before><commit_msg>Test convert error during import When the conversion of an audio file fails during import the original should be imported. See #659<commit_after>
# This file is part of beets. # Copyright 2014, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy,...
Test convert error during import When the conversion of an audio file fails during import the original should be imported. See #659# This file is part of beets. # Copyright 2014, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated document...
<commit_before><commit_msg>Test convert error during import When the conversion of an audio file fails during import the original should be imported. See #659<commit_after># This file is part of beets. # Copyright 2014, Thomas Scholtes. # # Permission is hereby granted, free of charge, to any person obtaining # a copy...