commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f44b83f5ea4c5e7699d94e99486b1dbd814f536a | chrome/android/java/res/layout/share_dialog_item.xml | chrome/android/java/res/layout/share_dialog_item.xml | <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:padding="4dp"
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:layout_marginStart="12dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> | <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:padding="4dp"
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> | Fix text alignment in "Share" app picker dialog. | Fix text alignment in "Share" app picker dialog.
BUG=508651
Review URL: https://codereview.chromium.org/1228943003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#338154}
| XML | bsd-3-clause | lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:orientation="horizontal" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:padding="4dp"
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="start|center_vertical"
android:layout_marginStart="12dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
## Instruction:
Fix text alignment in "Share" app picker dialog.
BUG=508651
Review URL: https://codereview.chromium.org/1228943003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#338154}
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:padding="4dp"
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> | <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file. -->
- Use of this source code is governed by a BSD-style license that can be
- found in the LICENSE file.
- -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
+ android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:padding="4dp"
android:scaleType="fitCenter"
android:contentDescription="@null" />
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="start|center_vertical"
android:layout_marginStart="12dp"
+ android:ellipsize="end"
+ android:maxLines="2"
+ android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout> | 10 | 0.4 | 6 | 4 |
a9d1182ae79cad318040fb4e67a931511fc86a59 | src/index.js | src/index.js | export default function move (array, moveIndex, toIndex) {
/* #move - Moves an array item from one position in an array to another.
Note: This is a pure function so a new array will be returned, instead
of altering the array argument.
Arguments:
1. array (String) : Array in which to move an item. (required)
2. moveIndex (Object) : The index of the item to move. (required)
3. toIndex (Object) : The index to move item at moveIndex to. (required)
*/
let item = array[moveIndex];
let length = array.length;
let diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [
...array.slice(0, toIndex),
item,
...array.slice(toIndex, moveIndex),
...array.slice(moveIndex + 1, length)
];
} else if (diff < 0) {
// move right
return [
...array.slice(0, moveIndex),
...array.slice(moveIndex + 1, toIndex + 1),
item,
...array.slice(toIndex + 1, length)
];
}
return array;
}
| export default function move (array, moveIndex, toIndex) {
/* #move - Moves an array item from one position in an array to another.
Note: This is a pure function so a new array will be returned, instead
of altering the array argument.
Arguments:
1. array (String) : Array in which to move an item. (required)
2. moveIndex (Object) : The index of the item to move. (required)
3. toIndex (Object) : The index to move item at moveIndex to. (required)
*/
const item = array[moveIndex];
const length = array.length;
const diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [
...array.slice(0, toIndex),
item,
...array.slice(toIndex, moveIndex),
...array.slice(moveIndex + 1, length)
];
} else if (diff < 0) {
// move right
const targetIndex = toIndex + 1;
return [
...array.slice(0, moveIndex),
...array.slice(moveIndex + 1, targetIndex),
item,
...array.slice(targetIndex, length)
];
}
return array;
}
| Use of const and reduced duplication | Use of const and reduced duplication
Changed code to use const instead of let, as these variables should be read-only references to these values.
I've also removed the only duplicated variable definition; I've named it targetIndex as I couldn't think of anything better (naming things is hard!)
This is a great repo, perfect for implementing drag and drop state changes ;) | JavaScript | mit | granteagon/move | javascript | ## Code Before:
export default function move (array, moveIndex, toIndex) {
/* #move - Moves an array item from one position in an array to another.
Note: This is a pure function so a new array will be returned, instead
of altering the array argument.
Arguments:
1. array (String) : Array in which to move an item. (required)
2. moveIndex (Object) : The index of the item to move. (required)
3. toIndex (Object) : The index to move item at moveIndex to. (required)
*/
let item = array[moveIndex];
let length = array.length;
let diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [
...array.slice(0, toIndex),
item,
...array.slice(toIndex, moveIndex),
...array.slice(moveIndex + 1, length)
];
} else if (diff < 0) {
// move right
return [
...array.slice(0, moveIndex),
...array.slice(moveIndex + 1, toIndex + 1),
item,
...array.slice(toIndex + 1, length)
];
}
return array;
}
## Instruction:
Use of const and reduced duplication
Changed code to use const instead of let, as these variables should be read-only references to these values.
I've also removed the only duplicated variable definition; I've named it targetIndex as I couldn't think of anything better (naming things is hard!)
This is a great repo, perfect for implementing drag and drop state changes ;)
## Code After:
export default function move (array, moveIndex, toIndex) {
/* #move - Moves an array item from one position in an array to another.
Note: This is a pure function so a new array will be returned, instead
of altering the array argument.
Arguments:
1. array (String) : Array in which to move an item. (required)
2. moveIndex (Object) : The index of the item to move. (required)
3. toIndex (Object) : The index to move item at moveIndex to. (required)
*/
const item = array[moveIndex];
const length = array.length;
const diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [
...array.slice(0, toIndex),
item,
...array.slice(toIndex, moveIndex),
...array.slice(moveIndex + 1, length)
];
} else if (diff < 0) {
// move right
const targetIndex = toIndex + 1;
return [
...array.slice(0, moveIndex),
...array.slice(moveIndex + 1, targetIndex),
item,
...array.slice(targetIndex, length)
];
}
return array;
}
| export default function move (array, moveIndex, toIndex) {
/* #move - Moves an array item from one position in an array to another.
Note: This is a pure function so a new array will be returned, instead
of altering the array argument.
Arguments:
1. array (String) : Array in which to move an item. (required)
2. moveIndex (Object) : The index of the item to move. (required)
3. toIndex (Object) : The index to move item at moveIndex to. (required)
*/
- let item = array[moveIndex];
? ^^
+ const item = array[moveIndex];
? ^^^^
- let length = array.length;
? ^^
+ const length = array.length;
? ^^^^
- let diff = moveIndex - toIndex;
? ^^
+ const diff = moveIndex - toIndex;
? ^^^^
if (diff > 0) {
// move left
return [
...array.slice(0, toIndex),
item,
...array.slice(toIndex, moveIndex),
...array.slice(moveIndex + 1, length)
];
} else if (diff < 0) {
// move right
+ const targetIndex = toIndex + 1;
return [
...array.slice(0, moveIndex),
- ...array.slice(moveIndex + 1, toIndex + 1),
? ^ ----
+ ...array.slice(moveIndex + 1, targetIndex),
? ^^^^^
item,
- ...array.slice(toIndex + 1, length)
? ^ ----
+ ...array.slice(targetIndex, length)
? ^^^^^
];
}
return array;
} | 11 | 0.323529 | 6 | 5 |
45731725e296f521e4ae2867742e7ea33a6a2ef6 | libpkg/pkg_error.h | libpkg/pkg_error.h | _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__)
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
| _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db))
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
| Revert "Indicate the location of sqlite failures." | Revert "Indicate the location of sqlite failures."
This reverts commit 2686383409d98488ae7b2c39d531af9ef380e21a.
| C | bsd-2-clause | khorben/pkg,junovitch/pkg,skoef/pkg,skoef/pkg,junovitch/pkg,en90/pkg,khorben/pkg,Open343/pkg,en90/pkg,khorben/pkg,Open343/pkg | c | ## Code Before:
_pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__)
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
## Instruction:
Revert "Indicate the location of sqlite failures."
This reverts commit 2686383409d98488ae7b2c39d531af9ef380e21a.
## Code After:
_pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db))
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif
| _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__)
#else
# define pkg_error_set _pkg_error_set
#endif
#define ERROR_BAD_ARG(name) \
pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__)
#define ERROR_SQLITE(db) \
- pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__)
? --------- --------------------
+ pkg_error_set(EPKG_FATAL, "%s (sqlite)", sqlite3_errmsg(db))
pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...);
#endif | 2 | 0.142857 | 1 | 1 |
5bd3415074d04e948f23d1d26c0819438554dfdf | spec/spec_helper.rb | spec/spec_helper.rb | require 'serverspec'
require 'net/ssh'
set :backend, :ssh
if ENV['ASK_SUDO_PASSWORD']
begin
require 'highline/import'
rescue LoadError
fail "highline is not available. Try installing it."
end
set :sudo_password, ask("Enter sudo password: ") { |q| q.echo = false }
else
set :sudo_password, ENV['SUDO_PASSWORD']
end
host = ENV['TARGET_HOST']
options = Net::SSH::Config.for(host)
options[:user] ||= Etc.getlogin
set :host, options[:host_name] || host
set :ssh_options, options
# Disable sudo
# set :disable_sudo, true
# Set environment variables
# set :env, :LANG => 'C', :LC_MESSAGES => 'C'
# Set PATH
# set :path, '/sbin:/usr/local/sbin:$PATH'
| require 'serverspec'
require 'net/ssh'
require 'yaml'
properties = YAML.load_file('properties.yml')
set :backend, :ssh
if ENV['ASK_SUDO_PASSWORD']
begin
require 'highline/import'
rescue LoadError
fail "highline is not available. Try installing it."
end
set :sudo_password, ask("Enter sudo password: ") { |q| q.echo = false }
else
set :sudo_password, ENV['SUDO_PASSWORD']
end
host = ENV['TARGET_HOST']
set_property properties[host]
options = Net::SSH::Config.for(host)
options[:user] ||= Etc.getlogin
set :host, options[:host_name] || host
set :ssh_options, options
# Disable sudo
# set :disable_sudo, true
# Set environment variables
# set :env, :LANG => 'C', :LC_MESSAGES => 'C'
# Set PATH
# set :path, '/sbin:/usr/local/sbin:$PATH'
| Fix tests that use properties | Fix tests that use properties
| Ruby | mpl-2.0 | joyent/lx-brand-image-tests,joyent/lx-brand-image-tests | ruby | ## Code Before:
require 'serverspec'
require 'net/ssh'
set :backend, :ssh
if ENV['ASK_SUDO_PASSWORD']
begin
require 'highline/import'
rescue LoadError
fail "highline is not available. Try installing it."
end
set :sudo_password, ask("Enter sudo password: ") { |q| q.echo = false }
else
set :sudo_password, ENV['SUDO_PASSWORD']
end
host = ENV['TARGET_HOST']
options = Net::SSH::Config.for(host)
options[:user] ||= Etc.getlogin
set :host, options[:host_name] || host
set :ssh_options, options
# Disable sudo
# set :disable_sudo, true
# Set environment variables
# set :env, :LANG => 'C', :LC_MESSAGES => 'C'
# Set PATH
# set :path, '/sbin:/usr/local/sbin:$PATH'
## Instruction:
Fix tests that use properties
## Code After:
require 'serverspec'
require 'net/ssh'
require 'yaml'
properties = YAML.load_file('properties.yml')
set :backend, :ssh
if ENV['ASK_SUDO_PASSWORD']
begin
require 'highline/import'
rescue LoadError
fail "highline is not available. Try installing it."
end
set :sudo_password, ask("Enter sudo password: ") { |q| q.echo = false }
else
set :sudo_password, ENV['SUDO_PASSWORD']
end
host = ENV['TARGET_HOST']
set_property properties[host]
options = Net::SSH::Config.for(host)
options[:user] ||= Etc.getlogin
set :host, options[:host_name] || host
set :ssh_options, options
# Disable sudo
# set :disable_sudo, true
# Set environment variables
# set :env, :LANG => 'C', :LC_MESSAGES => 'C'
# Set PATH
# set :path, '/sbin:/usr/local/sbin:$PATH'
| require 'serverspec'
require 'net/ssh'
+ require 'yaml'
+
+ properties = YAML.load_file('properties.yml')
set :backend, :ssh
if ENV['ASK_SUDO_PASSWORD']
begin
require 'highline/import'
rescue LoadError
fail "highline is not available. Try installing it."
end
set :sudo_password, ask("Enter sudo password: ") { |q| q.echo = false }
else
set :sudo_password, ENV['SUDO_PASSWORD']
end
host = ENV['TARGET_HOST']
+ set_property properties[host]
options = Net::SSH::Config.for(host)
options[:user] ||= Etc.getlogin
set :host, options[:host_name] || host
set :ssh_options, options
# Disable sudo
# set :disable_sudo, true
# Set environment variables
# set :env, :LANG => 'C', :LC_MESSAGES => 'C'
# Set PATH
# set :path, '/sbin:/usr/local/sbin:$PATH' | 4 | 0.117647 | 4 | 0 |
112ba8a708fb36774a9b976580a6da140c47b3b7 | src/ox/fs/CMakeLists.txt | src/ox/fs/CMakeLists.txt | cmake_minimum_required(VERSION 2.8)
add_library(
OxFS
filesystem.cpp
)
add_executable(
oxfstool
oxfstool.cpp
)
set_target_properties(oxfstool PROPERTIES OUTPUT_NAME oxfs)
target_link_libraries(oxfstool OxFS OxStd)
install(
FILES
filestore.hpp
filesystem.hpp
inodemgr.hpp
DESTINATION
include/ox/fs
)
install(TARGETS oxfstool
RUNTIME DESTINATION bin
)
add_subdirectory(test)
| cmake_minimum_required(VERSION 2.8)
add_library(
OxFS
filesystem.cpp
)
add_executable(
oxfstool
oxfstool.cpp
)
set_target_properties(oxfstool PROPERTIES OUTPUT_NAME oxfs)
target_link_libraries(oxfstool OxFS OxStd)
install(
FILES
filestore.hpp
filesystem.hpp
inodemgr.hpp
DESTINATION
include/ox/fs
)
install(TARGETS oxfstool OxFS
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
add_subdirectory(test)
| Add CMake install parameters to generate complete dist | Add CMake install parameters to generate complete dist
| Text | mpl-2.0 | wombatant/wfs,wombatant/wfs,wombatant/memphis,wombatant/ox,wombatant/ox | text | ## Code Before:
cmake_minimum_required(VERSION 2.8)
add_library(
OxFS
filesystem.cpp
)
add_executable(
oxfstool
oxfstool.cpp
)
set_target_properties(oxfstool PROPERTIES OUTPUT_NAME oxfs)
target_link_libraries(oxfstool OxFS OxStd)
install(
FILES
filestore.hpp
filesystem.hpp
inodemgr.hpp
DESTINATION
include/ox/fs
)
install(TARGETS oxfstool
RUNTIME DESTINATION bin
)
add_subdirectory(test)
## Instruction:
Add CMake install parameters to generate complete dist
## Code After:
cmake_minimum_required(VERSION 2.8)
add_library(
OxFS
filesystem.cpp
)
add_executable(
oxfstool
oxfstool.cpp
)
set_target_properties(oxfstool PROPERTIES OUTPUT_NAME oxfs)
target_link_libraries(oxfstool OxFS OxStd)
install(
FILES
filestore.hpp
filesystem.hpp
inodemgr.hpp
DESTINATION
include/ox/fs
)
install(TARGETS oxfstool OxFS
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
add_subdirectory(test)
| cmake_minimum_required(VERSION 2.8)
add_library(
OxFS
filesystem.cpp
)
add_executable(
oxfstool
oxfstool.cpp
)
set_target_properties(oxfstool PROPERTIES OUTPUT_NAME oxfs)
target_link_libraries(oxfstool OxFS OxStd)
install(
FILES
filestore.hpp
filesystem.hpp
inodemgr.hpp
DESTINATION
include/ox/fs
)
- install(TARGETS oxfstool
+ install(TARGETS oxfstool OxFS
? +++++
RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
)
add_subdirectory(test) | 4 | 0.142857 | 3 | 1 |
5fe68b959073e0893331baef16b966f6d8b19061 | project.clj | project.clj | (defproject mvxcvi/multihash "1.1.0-SNAPSHOT"
:description "Native Clojure implementation of the multihash standard."
:url "https://github.com/greglook/clj-multihash"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:deploy-branches ["master"]
:plugins
[[lein-cloverage "1.0.6"]]
:dependencies
[[org.clojure/clojure "1.7.0"]]
:codox {:metadata {:doc/format :markdown}
:source-uri "https://github.com/greglook/clj-multihash/blob/master/{filepath}#L{line}"
:doc-paths ["doc/extra"]
:output-path "doc/api"})
| (defproject mvxcvi/multihash "1.1.0-SNAPSHOT"
:description "Native Clojure implementation of the multihash standard."
:url "https://github.com/greglook/clj-multihash"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:deploy-branches ["master"]
:plugins
[[lein-cloverage "1.0.6"]]
:dependencies
[[org.clojure/clojure "1.7.0"]]
:codox {:metadata {:doc/format :markdown}
:source-uri "https://github.com/greglook/clj-multihash/blob/master/{filepath}#L{line}"
:doc-paths ["doc/extra"]
:output-path "doc/api"}
:whidbey {:tag-types {'multihash.core.Multihash {'data/hash 'multihash.core/base58}}})
| Add tag type for whidbey. | Add tag type for whidbey.
| Clojure | unlicense | greglook/clj-multihash | clojure | ## Code Before:
(defproject mvxcvi/multihash "1.1.0-SNAPSHOT"
:description "Native Clojure implementation of the multihash standard."
:url "https://github.com/greglook/clj-multihash"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:deploy-branches ["master"]
:plugins
[[lein-cloverage "1.0.6"]]
:dependencies
[[org.clojure/clojure "1.7.0"]]
:codox {:metadata {:doc/format :markdown}
:source-uri "https://github.com/greglook/clj-multihash/blob/master/{filepath}#L{line}"
:doc-paths ["doc/extra"]
:output-path "doc/api"})
## Instruction:
Add tag type for whidbey.
## Code After:
(defproject mvxcvi/multihash "1.1.0-SNAPSHOT"
:description "Native Clojure implementation of the multihash standard."
:url "https://github.com/greglook/clj-multihash"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:deploy-branches ["master"]
:plugins
[[lein-cloverage "1.0.6"]]
:dependencies
[[org.clojure/clojure "1.7.0"]]
:codox {:metadata {:doc/format :markdown}
:source-uri "https://github.com/greglook/clj-multihash/blob/master/{filepath}#L{line}"
:doc-paths ["doc/extra"]
:output-path "doc/api"}
:whidbey {:tag-types {'multihash.core.Multihash {'data/hash 'multihash.core/base58}}})
| (defproject mvxcvi/multihash "1.1.0-SNAPSHOT"
:description "Native Clojure implementation of the multihash standard."
:url "https://github.com/greglook/clj-multihash"
:license {:name "Public Domain"
:url "http://unlicense.org/"}
:deploy-branches ["master"]
:plugins
[[lein-cloverage "1.0.6"]]
:dependencies
[[org.clojure/clojure "1.7.0"]]
:codox {:metadata {:doc/format :markdown}
:source-uri "https://github.com/greglook/clj-multihash/blob/master/{filepath}#L{line}"
:doc-paths ["doc/extra"]
- :output-path "doc/api"})
? -
+ :output-path "doc/api"}
+
+ :whidbey {:tag-types {'multihash.core.Multihash {'data/hash 'multihash.core/base58}}}) | 4 | 0.222222 | 3 | 1 |
352dc0419b1d567081ea685862d2d6040265579c | dynamic/index.jade | dynamic/index.jade | doctype html
html
//-
head
title= something ? "Something" : "Nothing"
link(rel="stylesheet", href="/style/base.css")
include header.jade
style.
.countdown{text-align:center;}
#countdown{font-size:100px;font-weight:100;}
#period-name{font-size:50px;font-weight:100;}
#in{font-size:16px;}
body
div#content
div#period-name.countdown
span#period-label Undefined
div#in.countdown
span#in-label ends in
div#countdown.countdown
span#countdown-label NaN:NaN:NaN
link(rel="stylesheet",href="/style/main.css")
| doctype html
html
include header.jade
style.
.countdown{text-align:center;}
#countdown{font-size:100px;font-weight:100;}
#period-name{font-size:50px;font-weight:100;}
#in{font-size:16px;}
script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js")
script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js")
body
div#content
div#period-name.countdown
span#period-label Undefined
div#in.countdown
span#in-label ends in
div#countdown.countdown
span#countdown-label NaN:NaN:NaN
link(rel="stylesheet",href="/style/main.css")
| Add datejs and jquery script stuffs | Add datejs and jquery script stuffs
| Jade | agpl-3.0 | sbhs-forkbombers/sbhs-timetable-node,sbhs-forkbombers/sbhs-timetable-node | jade | ## Code Before:
doctype html
html
//-
head
title= something ? "Something" : "Nothing"
link(rel="stylesheet", href="/style/base.css")
include header.jade
style.
.countdown{text-align:center;}
#countdown{font-size:100px;font-weight:100;}
#period-name{font-size:50px;font-weight:100;}
#in{font-size:16px;}
body
div#content
div#period-name.countdown
span#period-label Undefined
div#in.countdown
span#in-label ends in
div#countdown.countdown
span#countdown-label NaN:NaN:NaN
link(rel="stylesheet",href="/style/main.css")
## Instruction:
Add datejs and jquery script stuffs
## Code After:
doctype html
html
include header.jade
style.
.countdown{text-align:center;}
#countdown{font-size:100px;font-weight:100;}
#period-name{font-size:50px;font-weight:100;}
#in{font-size:16px;}
script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js")
script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js")
body
div#content
div#period-name.countdown
span#period-label Undefined
div#in.countdown
span#in-label ends in
div#countdown.countdown
span#countdown-label NaN:NaN:NaN
link(rel="stylesheet",href="/style/main.css")
| doctype html
html
- //-
- head
- title= something ? "Something" : "Nothing"
- link(rel="stylesheet", href="/style/base.css")
include header.jade
style.
.countdown{text-align:center;}
#countdown{font-size:100px;font-weight:100;}
#period-name{font-size:50px;font-weight:100;}
#in{font-size:16px;}
+ script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js")
+ script(async,defer,src="//cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js")
body
div#content
div#period-name.countdown
span#period-label Undefined
div#in.countdown
span#in-label ends in
div#countdown.countdown
span#countdown-label NaN:NaN:NaN
link(rel="stylesheet",href="/style/main.css") | 6 | 0.285714 | 2 | 4 |
4b083058b24c2bfd2ffcfe27af9a51db902d8d01 | packages/te/text-utils.yaml | packages/te/text-utils.yaml | homepage: https://github.com/agrafix/text-utils#readme
changelog-type: ''
hash: 6cbd59e749e0a75c25a40fe3bb2024e80dcacaca70ba6f44c4544bead7b0b2b2
test-bench-deps:
HTF: -any
base: ! '>=4.7 && <5'
text: -any
maintainer: mail@athiemann.net
synopsis: Various text utilities
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
text: -any
all-versions:
- 0.1.0.0
author: Alexander Thiemann
latest: 0.1.0.0
description-type: markdown
description: ! '# text-utils
[](https://circleci.com/gh/agrafix/text-utils)
Simple text utils
'
license-name: MIT
| homepage: https://github.com/agrafix/text-utils#readme
changelog-type: ''
hash: 444b4225471b7b71ff1a6e2af8d57bd4d817fcb1941cce632d22a6c419812926
test-bench-deps:
HTF: -any
base: '>=4.7 && <5'
text: -any
maintainer: mail@athiemann.net
synopsis: Various text utilities
changelog: ''
basic-deps:
base: '>=4.7 && <5'
text: -any
all-versions:
- 0.1.0.0
- 0.1.1.0
author: Alexander Thiemann
latest: 0.1.1.0
description-type: markdown
description: |
# text-utils
[](https://circleci.com/gh/agrafix/text-utils)
Simple text utils
license-name: MIT
| Update from Hackage at 2020-05-18T02:37:53Z | Update from Hackage at 2020-05-18T02:37:53Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/agrafix/text-utils#readme
changelog-type: ''
hash: 6cbd59e749e0a75c25a40fe3bb2024e80dcacaca70ba6f44c4544bead7b0b2b2
test-bench-deps:
HTF: -any
base: ! '>=4.7 && <5'
text: -any
maintainer: mail@athiemann.net
synopsis: Various text utilities
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
text: -any
all-versions:
- 0.1.0.0
author: Alexander Thiemann
latest: 0.1.0.0
description-type: markdown
description: ! '# text-utils
[](https://circleci.com/gh/agrafix/text-utils)
Simple text utils
'
license-name: MIT
## Instruction:
Update from Hackage at 2020-05-18T02:37:53Z
## Code After:
homepage: https://github.com/agrafix/text-utils#readme
changelog-type: ''
hash: 444b4225471b7b71ff1a6e2af8d57bd4d817fcb1941cce632d22a6c419812926
test-bench-deps:
HTF: -any
base: '>=4.7 && <5'
text: -any
maintainer: mail@athiemann.net
synopsis: Various text utilities
changelog: ''
basic-deps:
base: '>=4.7 && <5'
text: -any
all-versions:
- 0.1.0.0
- 0.1.1.0
author: Alexander Thiemann
latest: 0.1.1.0
description-type: markdown
description: |
# text-utils
[](https://circleci.com/gh/agrafix/text-utils)
Simple text utils
license-name: MIT
| homepage: https://github.com/agrafix/text-utils#readme
changelog-type: ''
- hash: 6cbd59e749e0a75c25a40fe3bb2024e80dcacaca70ba6f44c4544bead7b0b2b2
+ hash: 444b4225471b7b71ff1a6e2af8d57bd4d817fcb1941cce632d22a6c419812926
test-bench-deps:
HTF: -any
- base: ! '>=4.7 && <5'
? --
+ base: '>=4.7 && <5'
text: -any
maintainer: mail@athiemann.net
synopsis: Various text utilities
changelog: ''
basic-deps:
- base: ! '>=4.7 && <5'
? --
+ base: '>=4.7 && <5'
text: -any
all-versions:
- 0.1.0.0
+ - 0.1.1.0
author: Alexander Thiemann
- latest: 0.1.0.0
? ^
+ latest: 0.1.1.0
? ^
description-type: markdown
- description: ! '# text-utils
-
+ description: |
+ # text-utils
[](https://circleci.com/gh/agrafix/text-utils)
-
Simple text utils
-
- '
license-name: MIT | 16 | 0.571429 | 7 | 9 |
5bf01684ab38ac637b79cf586fedd4d11d781678 | composer.json | composer.json | {
"name": "clue/sockets-react",
"require": {
"clue/socket-raw": "dev-master",
"evenement/evenement": "1.*",
"react/event-loop": "0.2.*",
"react/promise": "1.*",
"react/stream": "0.2.*",
"react/socket": "0.2.*"
}
}
| {
"name": "clue/socket-react",
"homepage": "https://github.com/clue/socket-react",
"license": "MIT",
"require": {
"clue/socket-raw": "dev-master",
"evenement/evenement": "1.*",
"react/event-loop": "0.2.*",
"react/promise": "1.*",
"react/stream": "0.2.*",
"react/socket": "0.2.*"
},
"autoload": {
"psr-0": {"Socket": ""}
}
}
| Rename to clue/socket-react and support autoloading | Rename to clue/socket-react and support autoloading | JSON | mit | clue/php-socket-react | json | ## Code Before:
{
"name": "clue/sockets-react",
"require": {
"clue/socket-raw": "dev-master",
"evenement/evenement": "1.*",
"react/event-loop": "0.2.*",
"react/promise": "1.*",
"react/stream": "0.2.*",
"react/socket": "0.2.*"
}
}
## Instruction:
Rename to clue/socket-react and support autoloading
## Code After:
{
"name": "clue/socket-react",
"homepage": "https://github.com/clue/socket-react",
"license": "MIT",
"require": {
"clue/socket-raw": "dev-master",
"evenement/evenement": "1.*",
"react/event-loop": "0.2.*",
"react/promise": "1.*",
"react/stream": "0.2.*",
"react/socket": "0.2.*"
},
"autoload": {
"psr-0": {"Socket": ""}
}
}
| {
- "name": "clue/sockets-react",
? -
+ "name": "clue/socket-react",
+ "homepage": "https://github.com/clue/socket-react",
+ "license": "MIT",
"require": {
"clue/socket-raw": "dev-master",
"evenement/evenement": "1.*",
"react/event-loop": "0.2.*",
"react/promise": "1.*",
"react/stream": "0.2.*",
"react/socket": "0.2.*"
+ },
+ "autoload": {
+ "psr-0": {"Socket": ""}
}
} | 7 | 0.636364 | 6 | 1 |
febc6372b378b3ae85058bfc1874369552b305b4 | stagemonitor-eum-server/src/main/java/org/stagemonitor/eum/EumApplication.java | stagemonitor-eum-server/src/main/java/org/stagemonitor/eum/EumApplication.java | package org.stagemonitor.eum;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.stagemonitor.core.Stagemonitor;
@SpringBootApplication
public class EumApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}
public static void main(String[] args) {
configureApplication(new SpringApplicationBuilder()).run(args);
}
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
Stagemonitor.init();
return builder.sources(EumApplication.class).bannerMode(Banner.Mode.OFF);
}
}
| package org.stagemonitor.eum;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.stagemonitor.core.Stagemonitor;
@SpringBootApplication
public class EumApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}
public static void main(String[] args) {
configureApplication(new SpringApplicationBuilder()).run(args);
}
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
Stagemonitor.init();
return builder.sources(EumApplication.class);
}
}
| Enable banner for eum server | Enable banner for eum server
| Java | apache-2.0 | stagemonitor/stagemonitor,stagemonitor/stagemonitor,stagemonitor/stagemonitor,stagemonitor/stagemonitor | java | ## Code Before:
package org.stagemonitor.eum;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.stagemonitor.core.Stagemonitor;
@SpringBootApplication
public class EumApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}
public static void main(String[] args) {
configureApplication(new SpringApplicationBuilder()).run(args);
}
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
Stagemonitor.init();
return builder.sources(EumApplication.class).bannerMode(Banner.Mode.OFF);
}
}
## Instruction:
Enable banner for eum server
## Code After:
package org.stagemonitor.eum;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.stagemonitor.core.Stagemonitor;
@SpringBootApplication
public class EumApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}
public static void main(String[] args) {
configureApplication(new SpringApplicationBuilder()).run(args);
}
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
Stagemonitor.init();
return builder.sources(EumApplication.class);
}
}
| package org.stagemonitor.eum;
- import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.stagemonitor.core.Stagemonitor;
@SpringBootApplication
public class EumApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return configureApplication(builder);
}
public static void main(String[] args) {
configureApplication(new SpringApplicationBuilder()).run(args);
}
private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) {
Stagemonitor.init();
- return builder.sources(EumApplication.class).bannerMode(Banner.Mode.OFF);
? ----------------------------
+ return builder.sources(EumApplication.class);
}
} | 3 | 0.115385 | 1 | 2 |
bed9ebebc62c28ea7116875b5a358a09d88f4eba | src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml | src/import/chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml | <!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_init_errors.xml $ -->
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
<!-- EKB Project -->
<!-- -->
<!-- COPYRIGHT 2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- The source code for this program is not published or otherwise -->
<!-- divested of its trade secrets, irrespective of what has been -->
<!-- deposited with the U.S. Copyright Office. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Error definitions for p9_pm_ocb_init procedure -->
<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_MODE</rc>
<description>Unknown mode passed to p9_pm_ocb_init.
</description>
<ffdc>BADMODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc>
<description>Bad Queue Length Passed to p9_pm_ocb_init.
</description>
<ffdc>BADQLENGTH</ffdc>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
| <!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml $ -->
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
<!-- EKB Project -->
<!-- -->
<!-- COPYRIGHT 2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- The source code for this program is not published or otherwise -->
<!-- divested of its trade secrets, irrespective of what has been -->
<!-- deposited with the U.S. Copyright Office. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Error definitions for p9_pm_ocb_init procedure -->
<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_MODE</rc>
<description>Unknown mode passed to p9_pm_ocb_init.
</description>
<ffdc>BADMODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc>
<description>Bad Queue Length Passed to p9_pm_ocb_init.
</description>
<ffdc>BADQLENGTH</ffdc>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
| Fix all incorrect copyright prologs | Fix all incorrect copyright prologs
Change-Id: Ia76346ebea53beaa91ef525138b0b581286d6db3
Original-Change-Id: I293e79b5a37bf4180f6dd19d259fac3434327fb3
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22759
Tested-by: Jenkins Server
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-by: PRACHI GUPTA <25a72946fc4ec2539bba3cff1fbb2916af6a7649@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25817
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>
| XML | apache-2.0 | Over-enthusiastic/hostboot,Over-enthusiastic/hostboot,Over-enthusiastic/hostboot,Over-enthusiastic/hostboot,Over-enthusiastic/hostboot | xml | ## Code Before:
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_init_errors.xml $ -->
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
<!-- EKB Project -->
<!-- -->
<!-- COPYRIGHT 2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- The source code for this program is not published or otherwise -->
<!-- divested of its trade secrets, irrespective of what has been -->
<!-- deposited with the U.S. Copyright Office. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Error definitions for p9_pm_ocb_init procedure -->
<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_MODE</rc>
<description>Unknown mode passed to p9_pm_ocb_init.
</description>
<ffdc>BADMODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc>
<description>Bad Queue Length Passed to p9_pm_ocb_init.
</description>
<ffdc>BADQLENGTH</ffdc>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
## Instruction:
Fix all incorrect copyright prologs
Change-Id: Ia76346ebea53beaa91ef525138b0b581286d6db3
Original-Change-Id: I293e79b5a37bf4180f6dd19d259fac3434327fb3
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22759
Tested-by: Jenkins Server
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-by: PRACHI GUPTA <25a72946fc4ec2539bba3cff1fbb2916af6a7649@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25817
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>
## Code After:
<!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
<!-- $Source: chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml $ -->
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
<!-- EKB Project -->
<!-- -->
<!-- COPYRIGHT 2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- The source code for this program is not published or otherwise -->
<!-- divested of its trade secrets, irrespective of what has been -->
<!-- deposited with the U.S. Copyright Office. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Error definitions for p9_pm_ocb_init procedure -->
<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_MODE</rc>
<description>Unknown mode passed to p9_pm_ocb_init.
</description>
<ffdc>BADMODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc>
<description>Bad Queue Length Passed to p9_pm_ocb_init.
</description>
<ffdc>BADQLENGTH</ffdc>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors>
| <!-- IBM_PROLOG_BEGIN_TAG -->
<!-- This is an automatically generated prolog. -->
<!-- -->
- <!-- $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_init_errors.xml $ -->
? ^^ ^^^ ------
+ <!-- $Source: chips/p9/procedures/xml/error_info/p9_pm_ocb_init_errors.xml $ -->
? ^^ ^^^^^^^^^^
<!-- -->
<!-- IBM CONFIDENTIAL -->
<!-- -->
<!-- EKB Project -->
<!-- -->
<!-- COPYRIGHT 2015 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
<!-- The source code for this program is not published or otherwise -->
<!-- divested of its trade secrets, irrespective of what has been -->
<!-- deposited with the U.S. Copyright Office. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- Error definitions for p9_pm_ocb_init procedure -->
<hwpErrors>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_MODE</rc>
<description>Unknown mode passed to p9_pm_ocb_init.
</description>
<ffdc>BADMODE</ffdc>
</hwpError>
<!-- ******************************************************************** -->
<hwpError>
<rc>RC_PM_OCBINIT_BAD_Q_LENGTH_PARM</rc>
<description>Bad Queue Length Passed to p9_pm_ocb_init.
</description>
<ffdc>BADQLENGTH</ffdc>
</hwpError>
<!-- ********************************************************************* -->
</hwpErrors> | 2 | 0.055556 | 1 | 1 |
f31c1adedd9a8e9f9a3a59bd1fb13822a3931682 | README.md | README.md | WP-Term
=======
Pointless PHP script that provides visitors of your [WordPress](https://github.com/WordPress/WordPress) website a unix-like CLI to view and navigate posts / pages.
Not to be confused with [WP-CLI](https://github.com/wp-cli/wp-cli) or [WP-Terminal](http://wordpress.org/plugins/wp-terminal/).
Demo
----

GIF image recorded using [ScreenToGif](http://screentogif.codeplex.com/)
Configuration
-------------
Configuration is stored in `config/` directory as `app.php` for production
and `app_test.php` for unit tests.
Deployment
----------
Requirements:
* WordPress
* Linux
* patch command
* twentythirteen theme
Execute the following command:
```
./deploy.sh -d /path/to/wordpress
```
| WP-Term
=======
Pointless PHP script that provides visitors of your [WordPress](https://github.com/WordPress/WordPress) website a unix-like CLI to view and navigate posts / pages.
Not to be confused with [WP-CLI](https://github.com/wp-cli/wp-cli) or [WP-Terminal](http://wordpress.org/plugins/wp-terminal/).
Demo
----

GIF image recorded using [ScreenToGif](http://screentogif.codeplex.com/)
Test it on my website:
[www.ockwebs.com](http://www.ockwebs.com/)
Configuration
-------------
Configuration is stored in `config/` directory as `app.php` for production
and `app_test.php` for unit tests.
Deployment
----------
Requirements:
* WordPress
* Linux
* patch command
* twentythirteen theme
Execute the following command:
```
./deploy.sh -d /path/to/wordpress
```
| Add link to my blog | Add link to my blog
| Markdown | mit | ockcyp/wp-term,ockcyp/wp-term,ockcyp/wp-term,ockcyp/wp-term | markdown | ## Code Before:
WP-Term
=======
Pointless PHP script that provides visitors of your [WordPress](https://github.com/WordPress/WordPress) website a unix-like CLI to view and navigate posts / pages.
Not to be confused with [WP-CLI](https://github.com/wp-cli/wp-cli) or [WP-Terminal](http://wordpress.org/plugins/wp-terminal/).
Demo
----

GIF image recorded using [ScreenToGif](http://screentogif.codeplex.com/)
Configuration
-------------
Configuration is stored in `config/` directory as `app.php` for production
and `app_test.php` for unit tests.
Deployment
----------
Requirements:
* WordPress
* Linux
* patch command
* twentythirteen theme
Execute the following command:
```
./deploy.sh -d /path/to/wordpress
```
## Instruction:
Add link to my blog
## Code After:
WP-Term
=======
Pointless PHP script that provides visitors of your [WordPress](https://github.com/WordPress/WordPress) website a unix-like CLI to view and navigate posts / pages.
Not to be confused with [WP-CLI](https://github.com/wp-cli/wp-cli) or [WP-Terminal](http://wordpress.org/plugins/wp-terminal/).
Demo
----

GIF image recorded using [ScreenToGif](http://screentogif.codeplex.com/)
Test it on my website:
[www.ockwebs.com](http://www.ockwebs.com/)
Configuration
-------------
Configuration is stored in `config/` directory as `app.php` for production
and `app_test.php` for unit tests.
Deployment
----------
Requirements:
* WordPress
* Linux
* patch command
* twentythirteen theme
Execute the following command:
```
./deploy.sh -d /path/to/wordpress
```
| WP-Term
=======
Pointless PHP script that provides visitors of your [WordPress](https://github.com/WordPress/WordPress) website a unix-like CLI to view and navigate posts / pages.
Not to be confused with [WP-CLI](https://github.com/wp-cli/wp-cli) or [WP-Terminal](http://wordpress.org/plugins/wp-terminal/).
Demo
----

GIF image recorded using [ScreenToGif](http://screentogif.codeplex.com/)
+
+ Test it on my website:
+ [www.ockwebs.com](http://www.ockwebs.com/)
Configuration
-------------
Configuration is stored in `config/` directory as `app.php` for production
and `app_test.php` for unit tests.
Deployment
----------
Requirements:
* WordPress
* Linux
* patch command
* twentythirteen theme
Execute the following command:
```
./deploy.sh -d /path/to/wordpress
``` | 3 | 0.1 | 3 | 0 |
ede5962c9926c8a852ccbc307e3a970ede4d6954 | build/server.js | build/server.js | console.time('Starting server');
require('promise-helpers');
var fs = require('fs');
var path = require('path');
var express = require('express');
var app = express();
/**
* Serve static files such as css, js, images
*/
app.use('/images', express.static('dist/assets/images'));
app.use('/javascripts', express.static('dist/assets/javascripts'));
app.use('/css', express.static('dist/assets/css'));
// Individual routes pulled from the routes directory
fs.readdir(path.join(__dirname, '/routes'), function(err, files) {
if(err) {
require('trace');
require('clarify');
console.trace(err);
}
files.forEach(function(file) {
require(path.join(__dirname, '/routes/') + file)(app);
});
});
// Go go go
app.listen(process.env.PORT || 3000);
console.log('listening on localhost:' + (process.env.npm_config_port || 3000));
// Export our server for testing purposes
module.exports = app;
console.timeEnd('Starting server');
| console.time('Starting server');
require('promise-helpers');
var fs = require('fs');
var path = require('path');
var express = require('express');
var app = express();
/**
* Serve static files such as css, js, images
*/
app.use('/images', express.static('dist/assets/images'));
app.use('/javascripts', express.static('dist/assets/javascripts'));
app.use('/stylesheets', express.static('dist/assets/stylesheets'));
// Individual routes pulled from the routes directory
fs.readdir(path.join(__dirname, '/routes'), function(err, files) {
if(err) {
require('trace');
require('clarify');
console.trace(err);
}
files.forEach(function(file) {
require(path.join(__dirname, '/routes/') + file)(app);
});
});
// Go go go
app.listen(process.env.PORT || 3000);
console.log('listening on localhost:' + (process.env.npm_config_port || 3000));
// Export our server for testing purposes
module.exports = app;
console.timeEnd('Starting server');
| Fix broken path to css caused by previous commit | Fix broken path to css caused by previous commit
| JavaScript | mit | LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements | javascript | ## Code Before:
console.time('Starting server');
require('promise-helpers');
var fs = require('fs');
var path = require('path');
var express = require('express');
var app = express();
/**
* Serve static files such as css, js, images
*/
app.use('/images', express.static('dist/assets/images'));
app.use('/javascripts', express.static('dist/assets/javascripts'));
app.use('/css', express.static('dist/assets/css'));
// Individual routes pulled from the routes directory
fs.readdir(path.join(__dirname, '/routes'), function(err, files) {
if(err) {
require('trace');
require('clarify');
console.trace(err);
}
files.forEach(function(file) {
require(path.join(__dirname, '/routes/') + file)(app);
});
});
// Go go go
app.listen(process.env.PORT || 3000);
console.log('listening on localhost:' + (process.env.npm_config_port || 3000));
// Export our server for testing purposes
module.exports = app;
console.timeEnd('Starting server');
## Instruction:
Fix broken path to css caused by previous commit
## Code After:
console.time('Starting server');
require('promise-helpers');
var fs = require('fs');
var path = require('path');
var express = require('express');
var app = express();
/**
* Serve static files such as css, js, images
*/
app.use('/images', express.static('dist/assets/images'));
app.use('/javascripts', express.static('dist/assets/javascripts'));
app.use('/stylesheets', express.static('dist/assets/stylesheets'));
// Individual routes pulled from the routes directory
fs.readdir(path.join(__dirname, '/routes'), function(err, files) {
if(err) {
require('trace');
require('clarify');
console.trace(err);
}
files.forEach(function(file) {
require(path.join(__dirname, '/routes/') + file)(app);
});
});
// Go go go
app.listen(process.env.PORT || 3000);
console.log('listening on localhost:' + (process.env.npm_config_port || 3000));
// Export our server for testing purposes
module.exports = app;
console.timeEnd('Starting server');
| console.time('Starting server');
require('promise-helpers');
var fs = require('fs');
var path = require('path');
var express = require('express');
var app = express();
/**
* Serve static files such as css, js, images
*/
app.use('/images', express.static('dist/assets/images'));
app.use('/javascripts', express.static('dist/assets/javascripts'));
- app.use('/css', express.static('dist/assets/css'));
? - -
+ app.use('/stylesheets', express.static('dist/assets/stylesheets'));
? +++++++++ +++++++++
// Individual routes pulled from the routes directory
fs.readdir(path.join(__dirname, '/routes'), function(err, files) {
if(err) {
require('trace');
require('clarify');
console.trace(err);
}
files.forEach(function(file) {
require(path.join(__dirname, '/routes/') + file)(app);
});
});
// Go go go
app.listen(process.env.PORT || 3000);
console.log('listening on localhost:' + (process.env.npm_config_port || 3000));
// Export our server for testing purposes
module.exports = app;
console.timeEnd('Starting server'); | 2 | 0.054054 | 1 | 1 |
0825a47424bd33e547f23bbefe87947cc06a9aaf | requirements.txt | requirements.txt | twisted==13.0.0
apscheduler==2.1.0
zope.component==4.1.0
zope.interface==4.0.5
cyclone==1.1
storm==0.19
transaction==1.4.1
txsocksx==0.0.2
PyCrypto==2.6
scrypt==0.5.5
python_gnupg==0.3.4
| twisted>=13.0.0
apscheduler>=2.1.0
zope.component>=4.1.0
zope.interface>=4.0.5
cyclone>=1.1
storm>=0.19
transaction>=1.4.1
txsocksx>=0.0.2
PyCrypto>=2.6
scrypt>=0.5.5
python_gnupg>=0.3.4
| Change version to be >= | Change version to be >=
| Text | agpl-3.0 | vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks | text | ## Code Before:
twisted==13.0.0
apscheduler==2.1.0
zope.component==4.1.0
zope.interface==4.0.5
cyclone==1.1
storm==0.19
transaction==1.4.1
txsocksx==0.0.2
PyCrypto==2.6
scrypt==0.5.5
python_gnupg==0.3.4
## Instruction:
Change version to be >=
## Code After:
twisted>=13.0.0
apscheduler>=2.1.0
zope.component>=4.1.0
zope.interface>=4.0.5
cyclone>=1.1
storm>=0.19
transaction>=1.4.1
txsocksx>=0.0.2
PyCrypto>=2.6
scrypt>=0.5.5
python_gnupg>=0.3.4
| - twisted==13.0.0
? ^
+ twisted>=13.0.0
? ^
- apscheduler==2.1.0
? ^
+ apscheduler>=2.1.0
? ^
- zope.component==4.1.0
? ^
+ zope.component>=4.1.0
? ^
- zope.interface==4.0.5
? ^
+ zope.interface>=4.0.5
? ^
- cyclone==1.1
? ^
+ cyclone>=1.1
? ^
- storm==0.19
? ^
+ storm>=0.19
? ^
- transaction==1.4.1
? ^
+ transaction>=1.4.1
? ^
- txsocksx==0.0.2
? ^
+ txsocksx>=0.0.2
? ^
- PyCrypto==2.6
? ^
+ PyCrypto>=2.6
? ^
- scrypt==0.5.5
? ^
+ scrypt>=0.5.5
? ^
- python_gnupg==0.3.4
? ^
+ python_gnupg>=0.3.4
? ^
| 22 | 2 | 11 | 11 |
7a88ce0d8014e4db61473c7c1e57d33f8d016dd7 | Components/team.jsx | Components/team.jsx | import React from 'react';
var Team = React.createClass({
render : function () {
if (typeof this.props.selectPlayers === 'undefined') {
return null;
} else {
var playerLists;
playerLists = this.props.selectPlayers.players.map(function(p) {
return (<li>{p.name}</li>)
}.bind(this));
return (
<div>
<h3>{this.props.data.name}</h3>
<ul className="list-unstyled">
{playerLists}
</ul>
</div>
);
}
}
});
export default Team; | import React from 'react';
var position = {
keepers : [],
defenders : [],
midfields : [],
forwards : []
}
var Team = React.createClass({
render : function () {
if (typeof this.props.selectPlayers === 'undefined') {
return null;
} else {
var f = _.chain(this.props.selectPlayers.players).groupBy('position').pairs().map(function (currentItem) {
return _.object(_.zip(["position", "players"], currentItem));
}).value();
/*
var playerLists = _.chain(this.props.selectPlayers.players).filter(function(o) {
if (o.position == "Keeper") {
return position.keepers.push(o);
}
if (o.position == 'Left-Back' || o.position == 'Right-Back' || o.position == "Centre Back") {
return position.defenders.push(o);
}
if (o.position == 'Central Midfield' || o.position == 'Attacking Midfield' || o.position == "Defensive Midfield") {
return position.midfields.push(o);
}
if (o.position == 'Centre Forward' || o.position == 'Right Wing' || o.position == "Left Wing") {
return position.forwards.push(o);
}
}).map(function(p) {
console.log(p)
});*/
console.log(f)
/*
playerLists = this.props.selectPlayers.players.map(function(p) {
return (<li>{p.name}</li>)
}.bind(this));*/
return (
<div>
<h3>{this.props.data.name}</h3>
<ul className="list-unstyled">
</ul>
</div>
);
}
}
});
export default Team; | Test lodash to grouping players | Test lodash to grouping players
| JSX | mit | ryanpark/FEPL,ryanpark/FEPL---React-App,ryanpark/FEPL,ryanpark/FEPL---React-App | jsx | ## Code Before:
import React from 'react';
var Team = React.createClass({
render : function () {
if (typeof this.props.selectPlayers === 'undefined') {
return null;
} else {
var playerLists;
playerLists = this.props.selectPlayers.players.map(function(p) {
return (<li>{p.name}</li>)
}.bind(this));
return (
<div>
<h3>{this.props.data.name}</h3>
<ul className="list-unstyled">
{playerLists}
</ul>
</div>
);
}
}
});
export default Team;
## Instruction:
Test lodash to grouping players
## Code After:
import React from 'react';
var position = {
keepers : [],
defenders : [],
midfields : [],
forwards : []
}
var Team = React.createClass({
render : function () {
if (typeof this.props.selectPlayers === 'undefined') {
return null;
} else {
var f = _.chain(this.props.selectPlayers.players).groupBy('position').pairs().map(function (currentItem) {
return _.object(_.zip(["position", "players"], currentItem));
}).value();
/*
var playerLists = _.chain(this.props.selectPlayers.players).filter(function(o) {
if (o.position == "Keeper") {
return position.keepers.push(o);
}
if (o.position == 'Left-Back' || o.position == 'Right-Back' || o.position == "Centre Back") {
return position.defenders.push(o);
}
if (o.position == 'Central Midfield' || o.position == 'Attacking Midfield' || o.position == "Defensive Midfield") {
return position.midfields.push(o);
}
if (o.position == 'Centre Forward' || o.position == 'Right Wing' || o.position == "Left Wing") {
return position.forwards.push(o);
}
}).map(function(p) {
console.log(p)
});*/
console.log(f)
/*
playerLists = this.props.selectPlayers.players.map(function(p) {
return (<li>{p.name}</li>)
}.bind(this));*/
return (
<div>
<h3>{this.props.data.name}</h3>
<ul className="list-unstyled">
</ul>
</div>
);
}
}
});
export default Team; | import React from 'react';
+
+ var position = {
+ keepers : [],
+ defenders : [],
+ midfields : [],
+ forwards : []
+ }
var Team = React.createClass({
render : function () {
if (typeof this.props.selectPlayers === 'undefined') {
return null;
} else {
- var playerLists;
+ var f = _.chain(this.props.selectPlayers.players).groupBy('position').pairs().map(function (currentItem) {
+ return _.object(_.zip(["position", "players"], currentItem));
+ }).value();
+ /*
+ var playerLists = _.chain(this.props.selectPlayers.players).filter(function(o) {
+ if (o.position == "Keeper") {
+ return position.keepers.push(o);
+ }
+ if (o.position == 'Left-Back' || o.position == 'Right-Back' || o.position == "Centre Back") {
+ return position.defenders.push(o);
+ }
+ if (o.position == 'Central Midfield' || o.position == 'Attacking Midfield' || o.position == "Defensive Midfield") {
+ return position.midfields.push(o);
+ }
+ if (o.position == 'Centre Forward' || o.position == 'Right Wing' || o.position == "Left Wing") {
+ return position.forwards.push(o);
+ }
+ }).map(function(p) {
+ console.log(p)
+ });*/
+
+ console.log(f)
+ /*
playerLists = this.props.selectPlayers.players.map(function(p) {
return (<li>{p.name}</li>)
- }.bind(this));
+ }.bind(this));*/
? ++
return (
<div>
<h3>{this.props.data.name}</h3>
<ul className="list-unstyled">
- {playerLists}
+
</ul>
</div>
);
}
}
});
export default Team; | 35 | 1.25 | 32 | 3 |
05472cbe44ae78a3b82a1855fe9c91b90dc78013 | pull_request_template.md | pull_request_template.md | (If applicable. Also, please censor any sensitive data)
### Notion Card Links
(Please provide links to any relevant Notion card(s) relevant to this PR.)
PR Checklist | Your Answer
------------ | -------------
Have you added and/or updated tests? | (The answer should mostly be 'YES'. If you answer 'NO', please justify.)
Have you deployed to Staging? | (Possible answers: YES, Not yet - deploying now!, NO - non-app change, NO - tiny change)
Self-Review: Have you done an initial self-review of the code below on Github? |
Spec Review: Have you reviewed the spec and ensured this meets requirements and/or matches design mockups? | (N/A or Yes)
Back-to-school 2022: Have you checked the [webinar schedule](https://www.notion.so/quill/Back-to-school-webinar-banners-2022-a75a89cfad9f434899ef6be3eb184733) to avoid for downtime/risky deploys? | (Yes or N/A)
| (If applicable. Also, please censor any sensitive data)
### Notion Card Links
(Please provide links to any relevant Notion card(s) relevant to this PR.)
PR Checklist | Your Answer
------------ | -------------
Have you added and/or updated tests? | (The answer should mostly be 'YES'. If you answer 'NO', please justify.)
Have you deployed to Staging? | (Possible answers: YES, Not yet - deploying now!, NO - non-app change, NO - tiny change)
Self-Review: Have you done an initial self-review of the code below on Github? |
Spec Review: Have you reviewed the spec and ensured this meets requirements and/or matches design mockups? | (N/A or Yes)
| Remove 2002 back-to-school webinars from PR checklist | Remove 2002 back-to-school webinars from PR checklist | Markdown | agpl-3.0 | empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core | markdown | ## Code Before:
(If applicable. Also, please censor any sensitive data)
### Notion Card Links
(Please provide links to any relevant Notion card(s) relevant to this PR.)
PR Checklist | Your Answer
------------ | -------------
Have you added and/or updated tests? | (The answer should mostly be 'YES'. If you answer 'NO', please justify.)
Have you deployed to Staging? | (Possible answers: YES, Not yet - deploying now!, NO - non-app change, NO - tiny change)
Self-Review: Have you done an initial self-review of the code below on Github? |
Spec Review: Have you reviewed the spec and ensured this meets requirements and/or matches design mockups? | (N/A or Yes)
Back-to-school 2022: Have you checked the [webinar schedule](https://www.notion.so/quill/Back-to-school-webinar-banners-2022-a75a89cfad9f434899ef6be3eb184733) to avoid for downtime/risky deploys? | (Yes or N/A)
## Instruction:
Remove 2002 back-to-school webinars from PR checklist
## Code After:
(If applicable. Also, please censor any sensitive data)
### Notion Card Links
(Please provide links to any relevant Notion card(s) relevant to this PR.)
PR Checklist | Your Answer
------------ | -------------
Have you added and/or updated tests? | (The answer should mostly be 'YES'. If you answer 'NO', please justify.)
Have you deployed to Staging? | (Possible answers: YES, Not yet - deploying now!, NO - non-app change, NO - tiny change)
Self-Review: Have you done an initial self-review of the code below on Github? |
Spec Review: Have you reviewed the spec and ensured this meets requirements and/or matches design mockups? | (N/A or Yes)
| (If applicable. Also, please censor any sensitive data)
### Notion Card Links
(Please provide links to any relevant Notion card(s) relevant to this PR.)
PR Checklist | Your Answer
------------ | -------------
Have you added and/or updated tests? | (The answer should mostly be 'YES'. If you answer 'NO', please justify.)
Have you deployed to Staging? | (Possible answers: YES, Not yet - deploying now!, NO - non-app change, NO - tiny change)
Self-Review: Have you done an initial self-review of the code below on Github? |
Spec Review: Have you reviewed the spec and ensured this meets requirements and/or matches design mockups? | (N/A or Yes)
- Back-to-school 2022: Have you checked the [webinar schedule](https://www.notion.so/quill/Back-to-school-webinar-banners-2022-a75a89cfad9f434899ef6be3eb184733) to avoid for downtime/risky deploys? | (Yes or N/A) | 1 | 0.083333 | 0 | 1 |
0a80ed9a586f74dea0207305ba4e6155abd5f9db | spec/helpers/ems_cloud_helper/textual_summary_spec.rb | spec/helpers/ems_cloud_helper/textual_summary_spec.rb | require "spec_helper"
describe EmsCloudHelper do
def role_allows(_)
true
end
before do
@ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
controller.stub(:restful?).and_return(true)
controller.stub(:controller_name).and_return("ems_cloud")
end
context "textual_instances" do
it "sets restful path for instances in summary for restful controllers" do
FactoryGirl.create(:vm_openstack, :ems_id => @ems.id)
expect(textual_instances[:link]).to eq("/ems_cloud/#{@ems.id}?display=instances")
end
end
context "textual_images" do
it "sets restful path for images in summary for restful controllers" do
FactoryGirl.create(:template_cloud, :ems_id => @ems.id)
expect(textual_images[:link]).to eq("/ems_cloud/#{@ems.id}?display=images")
end
end
end
| require "spec_helper"
describe EmsCloudHelper do
context "#textual_instances and #textual_images" do
def role_allows(_)
true
end
before do
@ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
controller.stub(:restful?).and_return(true)
controller.stub(:controller_name).and_return("ems_cloud")
end
it "sets restful path for instances in summary for restful controllers" do
FactoryGirl.create(:vm_openstack, :ems_id => @ems.id)
expect(textual_instances[:link]).to eq("/ems_cloud/#{@ems.id}?display=instances")
end
it "sets restful path for images in summary for restful controllers" do
FactoryGirl.create(:template_cloud, :ems_id => @ems.id)
expect(textual_images[:link]).to eq("/ems_cloud/#{@ems.id}?display=images")
end
end
end
| Remove extra contexts and create a common one | Remove extra contexts and create a common one
| Ruby | apache-2.0 | chessbyte/manageiq,mkanoor/manageiq,mzazrivec/manageiq,djberg96/manageiq,hstastna/manageiq,israel-hdez/manageiq,ailisp/manageiq,aufi/manageiq,romaintb/manageiq,jameswnl/manageiq,borod108/manageiq,durandom/manageiq,KevinLoiseau/manageiq,josejulio/manageiq,ilackarms/manageiq,fbladilo/manageiq,billfitzgerald0120/manageiq,israel-hdez/manageiq,josejulio/manageiq,israel-hdez/manageiq,tinaafitz/manageiq,kbrock/manageiq,syncrou/manageiq,skateman/manageiq,kbrock/manageiq,ailisp/manageiq,tzumainn/manageiq,jrafanie/manageiq,kbrock/manageiq,mfeifer/manageiq,tinaafitz/manageiq,aufi/manageiq,mresti/manageiq,mkanoor/manageiq,jrafanie/manageiq,lpichler/manageiq,borod108/manageiq,agrare/manageiq,NickLaMuro/manageiq,josejulio/manageiq,maas-ufcg/manageiq,syncrou/manageiq,romanblanco/manageiq,chessbyte/manageiq,jvlcek/manageiq,gerikis/manageiq,fbladilo/manageiq,lpichler/manageiq,chessbyte/manageiq,KevinLoiseau/manageiq,KevinLoiseau/manageiq,jntullo/manageiq,skateman/manageiq,aufi/manageiq,ilackarms/manageiq,borod108/manageiq,pkomanek/manageiq,romanblanco/manageiq,mzazrivec/manageiq,gmcculloug/manageiq,juliancheal/manageiq,jvlcek/manageiq,durandom/manageiq,yaacov/manageiq,ailisp/manageiq,gmcculloug/manageiq,matobet/manageiq,skateman/manageiq,aufi/manageiq,matobet/manageiq,branic/manageiq,ailisp/manageiq,romaintb/manageiq,skateman/manageiq,fbladilo/manageiq,romaintb/manageiq,d-m-u/manageiq,tzumainn/manageiq,israel-hdez/manageiq,romanblanco/manageiq,tinaafitz/manageiq,d-m-u/manageiq,andyvesel/manageiq,romaintb/manageiq,kbrock/manageiq,ilackarms/manageiq,KevinLoiseau/manageiq,djberg96/manageiq,maas-ufcg/manageiq,mzazrivec/manageiq,jameswnl/manageiq,ManageIQ/manageiq,KevinLoiseau/manageiq,jrafanie/manageiq,mfeifer/manageiq,syncrou/manageiq,yaacov/manageiq,jntullo/manageiq,jntullo/manageiq,jntullo/manageiq,borod108/manageiq,gerikis/manageiq,jrafanie/manageiq,mfeifer/manageiq,lpichler/manageiq,romanblanco/manageiq,mzazrivec/manageiq,djberg96/manageiq,djberg96/manageiq,tzumainn/manageiq,ManageIQ/manageiq,pkomanek/manageiq,billfitzgerald0120/manageiq,gerikis/manageiq,ManageIQ/manageiq,pkomanek/manageiq,matobet/manageiq,tzumainn/manageiq,durandom/manageiq,NaNi-Z/manageiq,hstastna/manageiq,agrare/manageiq,mkanoor/manageiq,jvlcek/manageiq,jameswnl/manageiq,agrare/manageiq,hstastna/manageiq,hstastna/manageiq,d-m-u/manageiq,jvlcek/manageiq,NickLaMuro/manageiq,mresti/manageiq,juliancheal/manageiq,andyvesel/manageiq,maas-ufcg/manageiq,branic/manageiq,agrare/manageiq,gmcculloug/manageiq,josejulio/manageiq,NickLaMuro/manageiq,maas-ufcg/manageiq,billfitzgerald0120/manageiq,durandom/manageiq,branic/manageiq,NaNi-Z/manageiq,chessbyte/manageiq,gmcculloug/manageiq,maas-ufcg/manageiq,juliancheal/manageiq,mkanoor/manageiq,mresti/manageiq,KevinLoiseau/manageiq,andyvesel/manageiq,ManageIQ/manageiq,ilackarms/manageiq,matobet/manageiq,yaacov/manageiq,billfitzgerald0120/manageiq,NaNi-Z/manageiq,yaacov/manageiq,lpichler/manageiq,jameswnl/manageiq,romaintb/manageiq,juliancheal/manageiq,pkomanek/manageiq,mfeifer/manageiq,maas-ufcg/manageiq,branic/manageiq,d-m-u/manageiq,fbladilo/manageiq,romaintb/manageiq,gerikis/manageiq,syncrou/manageiq,mresti/manageiq,NickLaMuro/manageiq,NaNi-Z/manageiq,tinaafitz/manageiq,andyvesel/manageiq | ruby | ## Code Before:
require "spec_helper"
describe EmsCloudHelper do
def role_allows(_)
true
end
before do
@ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
controller.stub(:restful?).and_return(true)
controller.stub(:controller_name).and_return("ems_cloud")
end
context "textual_instances" do
it "sets restful path for instances in summary for restful controllers" do
FactoryGirl.create(:vm_openstack, :ems_id => @ems.id)
expect(textual_instances[:link]).to eq("/ems_cloud/#{@ems.id}?display=instances")
end
end
context "textual_images" do
it "sets restful path for images in summary for restful controllers" do
FactoryGirl.create(:template_cloud, :ems_id => @ems.id)
expect(textual_images[:link]).to eq("/ems_cloud/#{@ems.id}?display=images")
end
end
end
## Instruction:
Remove extra contexts and create a common one
## Code After:
require "spec_helper"
describe EmsCloudHelper do
context "#textual_instances and #textual_images" do
def role_allows(_)
true
end
before do
@ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
controller.stub(:restful?).and_return(true)
controller.stub(:controller_name).and_return("ems_cloud")
end
it "sets restful path for instances in summary for restful controllers" do
FactoryGirl.create(:vm_openstack, :ems_id => @ems.id)
expect(textual_instances[:link]).to eq("/ems_cloud/#{@ems.id}?display=instances")
end
it "sets restful path for images in summary for restful controllers" do
FactoryGirl.create(:template_cloud, :ems_id => @ems.id)
expect(textual_images[:link]).to eq("/ems_cloud/#{@ems.id}?display=images")
end
end
end
| require "spec_helper"
describe EmsCloudHelper do
+ context "#textual_instances and #textual_images" do
- def role_allows(_)
+ def role_allows(_)
? ++
- true
+ true
? ++
- end
+ end
? ++
- before do
+ before do
? ++
- @ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
+ @ems = FactoryGirl.create(:ems_openstack, :zone => FactoryGirl.build(:zone))
? ++
- controller.stub(:restful?).and_return(true)
+ controller.stub(:restful?).and_return(true)
? ++
- controller.stub(:controller_name).and_return("ems_cloud")
+ controller.stub(:controller_name).and_return("ems_cloud")
? ++
- end
+ end
? ++
- context "textual_instances" do
it "sets restful path for instances in summary for restful controllers" do
FactoryGirl.create(:vm_openstack, :ems_id => @ems.id)
expect(textual_instances[:link]).to eq("/ems_cloud/#{@ems.id}?display=instances")
end
- end
- context "textual_images" do
it "sets restful path for images in summary for restful controllers" do
FactoryGirl.create(:template_cloud, :ems_id => @ems.id)
expect(textual_images[:link]).to eq("/ems_cloud/#{@ems.id}?display=images")
end
end
end | 20 | 0.689655 | 9 | 11 |
47d9663adad363e2627e1ce8289cc17b06271a44 | newtab.js | newtab.js | "use strict";
chrome.sessions.getDevices({}, function(sessions){
for (var i in sessions) {
var device = sessions[i];
var deviceDiv = document.createElement("div");
deviceDiv.classList.add("device");
var deviceName = document.createElement("div");
deviceName.innerHTML = device.deviceName;
deviceName.classList.add("device-name");
deviceDiv.appendChild(deviceName);
var sessionsDiv = document.createElement("div");
sessionsDiv.classList.add("sessions");
for (var j in device.sessions) {
var session = device.sessions[j];
var sessionDiv = document.createElement("div");
sessionDiv.classList.add("session");
for (var k in session.window.tabs) {
var tab = session.window.tabs[k];
var link = document.createElement("a");
link.href = tab.url;
link.innerHTML = tab.title;
link.title = tab.title;
link.classList.add("link");
sessionDiv.appendChild(link);
}
sessionsDiv.appendChild(sessionDiv);
}
deviceDiv.appendChild(sessionsDiv);
document.getElementById("main").appendChild(deviceDiv);
}
});
| "use strict";
chrome.sessions.getDevices({}, function(sessions){
for (var i in sessions) {
var device = sessions[i];
var deviceDiv = document.createElement("div");
deviceDiv.classList.add("device");
var deviceName = document.createElement("div");
deviceName.textContent = device.deviceName;
deviceName.classList.add("device-name");
deviceDiv.appendChild(deviceName);
var sessionsDiv = document.createElement("div");
sessionsDiv.classList.add("sessions");
for (var j in device.sessions) {
var session = device.sessions[j];
var sessionDiv = document.createElement("div");
sessionDiv.classList.add("session");
for (var k in session.window.tabs) {
var tab = session.window.tabs[k];
var link = document.createElement("a");
link.href = tab.url;
link.textContent = tab.title;
link.title = tab.title;
link.classList.add("link");
sessionDiv.appendChild(link);
}
sessionsDiv.appendChild(sessionDiv);
}
deviceDiv.appendChild(sessionsDiv);
document.getElementById("main").appendChild(deviceDiv);
}
});
| Use textContent instead of innerHTML. | Use textContent instead of innerHTML.
| JavaScript | mit | lgarron/chrome-devices-in-new-tab,lgarron/chrome-devices-in-new-tab | javascript | ## Code Before:
"use strict";
chrome.sessions.getDevices({}, function(sessions){
for (var i in sessions) {
var device = sessions[i];
var deviceDiv = document.createElement("div");
deviceDiv.classList.add("device");
var deviceName = document.createElement("div");
deviceName.innerHTML = device.deviceName;
deviceName.classList.add("device-name");
deviceDiv.appendChild(deviceName);
var sessionsDiv = document.createElement("div");
sessionsDiv.classList.add("sessions");
for (var j in device.sessions) {
var session = device.sessions[j];
var sessionDiv = document.createElement("div");
sessionDiv.classList.add("session");
for (var k in session.window.tabs) {
var tab = session.window.tabs[k];
var link = document.createElement("a");
link.href = tab.url;
link.innerHTML = tab.title;
link.title = tab.title;
link.classList.add("link");
sessionDiv.appendChild(link);
}
sessionsDiv.appendChild(sessionDiv);
}
deviceDiv.appendChild(sessionsDiv);
document.getElementById("main").appendChild(deviceDiv);
}
});
## Instruction:
Use textContent instead of innerHTML.
## Code After:
"use strict";
chrome.sessions.getDevices({}, function(sessions){
for (var i in sessions) {
var device = sessions[i];
var deviceDiv = document.createElement("div");
deviceDiv.classList.add("device");
var deviceName = document.createElement("div");
deviceName.textContent = device.deviceName;
deviceName.classList.add("device-name");
deviceDiv.appendChild(deviceName);
var sessionsDiv = document.createElement("div");
sessionsDiv.classList.add("sessions");
for (var j in device.sessions) {
var session = device.sessions[j];
var sessionDiv = document.createElement("div");
sessionDiv.classList.add("session");
for (var k in session.window.tabs) {
var tab = session.window.tabs[k];
var link = document.createElement("a");
link.href = tab.url;
link.textContent = tab.title;
link.title = tab.title;
link.classList.add("link");
sessionDiv.appendChild(link);
}
sessionsDiv.appendChild(sessionDiv);
}
deviceDiv.appendChild(sessionsDiv);
document.getElementById("main").appendChild(deviceDiv);
}
});
| "use strict";
chrome.sessions.getDevices({}, function(sessions){
for (var i in sessions) {
var device = sessions[i];
var deviceDiv = document.createElement("div");
deviceDiv.classList.add("device");
var deviceName = document.createElement("div");
- deviceName.innerHTML = device.deviceName;
? ^ ^^^^^^
+ deviceName.textContent = device.deviceName;
? ^^^^^^ ++ ^
deviceName.classList.add("device-name");
deviceDiv.appendChild(deviceName);
var sessionsDiv = document.createElement("div");
sessionsDiv.classList.add("sessions");
for (var j in device.sessions) {
var session = device.sessions[j];
var sessionDiv = document.createElement("div");
sessionDiv.classList.add("session");
for (var k in session.window.tabs) {
var tab = session.window.tabs[k];
var link = document.createElement("a");
link.href = tab.url;
- link.innerHTML = tab.title;
? ^ ^^^^^^
+ link.textContent = tab.title;
? ^^^^^^ ++ ^
link.title = tab.title;
link.classList.add("link");
sessionDiv.appendChild(link);
}
sessionsDiv.appendChild(sessionDiv);
}
deviceDiv.appendChild(sessionsDiv);
document.getElementById("main").appendChild(deviceDiv);
}
}); | 4 | 0.093023 | 2 | 2 |
439d36dadfe36e6dec4cf213486acdc9fc7381f9 | docs/requirements.txt | docs/requirements.txt | semantic_version ~=2.8
sphinx ~=2.3
sphinx-bootstrap-theme ~=0.7
recommonmark ~=0.6
nbsphinx ~=0.5
pygments-style-monokailight ~=0.4
ipython ~=7.11
| semantic_version ~=2.8
sphinx ~=2.3
# sphinx-bootstrap-theme ~=0.7
https://github.com/althonos/sphinx-bootstrap-theme/archive/master.zip
recommonmark ~=0.6
nbsphinx ~=0.5
pygments-style-monokailight ~=0.4
ipython ~=7.11
| Use fork of `sphinx-bootstrap-theme` when building docs | Use fork of `sphinx-bootstrap-theme` when building docs [ci skip]
| Text | mit | althonos/pronto | text | ## Code Before:
semantic_version ~=2.8
sphinx ~=2.3
sphinx-bootstrap-theme ~=0.7
recommonmark ~=0.6
nbsphinx ~=0.5
pygments-style-monokailight ~=0.4
ipython ~=7.11
## Instruction:
Use fork of `sphinx-bootstrap-theme` when building docs [ci skip]
## Code After:
semantic_version ~=2.8
sphinx ~=2.3
# sphinx-bootstrap-theme ~=0.7
https://github.com/althonos/sphinx-bootstrap-theme/archive/master.zip
recommonmark ~=0.6
nbsphinx ~=0.5
pygments-style-monokailight ~=0.4
ipython ~=7.11
| semantic_version ~=2.8
sphinx ~=2.3
- sphinx-bootstrap-theme ~=0.7
+ # sphinx-bootstrap-theme ~=0.7
? ++
+ https://github.com/althonos/sphinx-bootstrap-theme/archive/master.zip
recommonmark ~=0.6
nbsphinx ~=0.5
pygments-style-monokailight ~=0.4
ipython ~=7.11 | 3 | 0.428571 | 2 | 1 |
0fd7e22bcc784dbe04c2ac07cbb705f0cdec874d | docs/readthedocs.yml | docs/readthedocs.yml |
python:
version: 3
pip_install: true
extra_requirements: # Add specific dependencies for the jupyter notebooks
- docs
- devs
# Don't build any extra formats apart from json/html
formats: []
|
python:
version: 3
pip_install: true
setup_py_install: true
extra_requirements: # Add specific dependencies for the jupyter notebooks
- docs
- devs
# Don't build any extra formats apart from json/html
formats: []
| Install shipped version on rtd | Install shipped version on rtd
| YAML | mit | DOV-Vlaanderen/pydov | yaml | ## Code Before:
python:
version: 3
pip_install: true
extra_requirements: # Add specific dependencies for the jupyter notebooks
- docs
- devs
# Don't build any extra formats apart from json/html
formats: []
## Instruction:
Install shipped version on rtd
## Code After:
python:
version: 3
pip_install: true
setup_py_install: true
extra_requirements: # Add specific dependencies for the jupyter notebooks
- docs
- devs
# Don't build any extra formats apart from json/html
formats: []
|
python:
version: 3
pip_install: true
+ setup_py_install: true
extra_requirements: # Add specific dependencies for the jupyter notebooks
- docs
- devs
# Don't build any extra formats apart from json/html
formats: [] | 1 | 0.111111 | 1 | 0 |
dcc6d8e03178a3fb8518e0390bc6dc9d8e3b0478 | src/Oro/Bundle/NoteBundle/Resources/views/Note/addButton.html.twig | src/Oro/Bundle/NoteBundle/Resources/views/Note/addButton.html.twig | {% import 'OroUIBundle::macros.html.twig' as UI %}
{% if resource_granted('oro_note_create') %}
{{ UI.clientButton({
'id': 'add-entity-note-button',
'aCss': 'no-hash',
'iCss': 'icon-comment-alt hide-text',
'label' : 'oro.note.action.add'|trans
}) }}
<script type="text/javascript">
require(['jquery', 'oroui/js/mediator'],
function($, mediator){
$('#add-entity-note-button').on('click', function(e) {
e.preventDefault();
mediator.trigger('note:add');
});
});
</script>
{% endif %}
| {% import 'OroUIBundle::macros.html.twig' as UI %}
{% if resource_granted('oro_note_create') and resource_granted('oro_note_view') %}
{{ UI.clientButton({
'id': 'add-entity-note-button',
'aCss': 'no-hash',
'iCss': 'icon-comment-alt hide-text',
'label' : 'oro.note.action.add'|trans
}) }}
<script type="text/javascript">
require(['jquery', 'oroui/js/mediator'],
function($, mediator){
$('#add-entity-note-button').on('click', function(e) {
e.preventDefault();
mediator.trigger('note:add');
});
});
</script>
{% endif %}
| Hide Add Note button if there is no permission to view Notes - add condition for resource oro_note_view | BAP-4476: Hide Add Note button if there is no permission to view Notes
- add condition for resource oro_note_view
| Twig | mit | geoffroycochard/platform,northdakota/platform,orocrm/platform,morontt/platform,2ndkauboy/platform,orocrm/platform,morontt/platform,trustify/oroplatform,ramunasd/platform,morontt/platform,hugeval/platform,northdakota/platform,geoffroycochard/platform,ramunasd/platform,geoffroycochard/platform,ramunasd/platform,Djamy/platform,2ndkauboy/platform,trustify/oroplatform,2ndkauboy/platform,orocrm/platform,northdakota/platform,hugeval/platform,Djamy/platform,hugeval/platform,Djamy/platform,trustify/oroplatform | twig | ## Code Before:
{% import 'OroUIBundle::macros.html.twig' as UI %}
{% if resource_granted('oro_note_create') %}
{{ UI.clientButton({
'id': 'add-entity-note-button',
'aCss': 'no-hash',
'iCss': 'icon-comment-alt hide-text',
'label' : 'oro.note.action.add'|trans
}) }}
<script type="text/javascript">
require(['jquery', 'oroui/js/mediator'],
function($, mediator){
$('#add-entity-note-button').on('click', function(e) {
e.preventDefault();
mediator.trigger('note:add');
});
});
</script>
{% endif %}
## Instruction:
BAP-4476: Hide Add Note button if there is no permission to view Notes
- add condition for resource oro_note_view
## Code After:
{% import 'OroUIBundle::macros.html.twig' as UI %}
{% if resource_granted('oro_note_create') and resource_granted('oro_note_view') %}
{{ UI.clientButton({
'id': 'add-entity-note-button',
'aCss': 'no-hash',
'iCss': 'icon-comment-alt hide-text',
'label' : 'oro.note.action.add'|trans
}) }}
<script type="text/javascript">
require(['jquery', 'oroui/js/mediator'],
function($, mediator){
$('#add-entity-note-button').on('click', function(e) {
e.preventDefault();
mediator.trigger('note:add');
});
});
</script>
{% endif %}
| {% import 'OroUIBundle::macros.html.twig' as UI %}
- {% if resource_granted('oro_note_create') %}
+ {% if resource_granted('oro_note_create') and resource_granted('oro_note_view') %}
{{ UI.clientButton({
'id': 'add-entity-note-button',
'aCss': 'no-hash',
'iCss': 'icon-comment-alt hide-text',
'label' : 'oro.note.action.add'|trans
}) }}
<script type="text/javascript">
require(['jquery', 'oroui/js/mediator'],
function($, mediator){
$('#add-entity-note-button').on('click', function(e) {
e.preventDefault();
mediator.trigger('note:add');
});
});
</script>
{% endif %} | 2 | 0.105263 | 1 | 1 |
bc3f2888f00a1b4faeba100d9166194a2f5bcdcd | lib/ffi-glib/main_loop.rb | lib/ffi-glib/main_loop.rb | require 'singleton'
GLib.load_class :MainLoop
module GLib
# Overrides for GMainLoop, GLib's event loop
class MainLoop
# Class encepsulationg logic for running an idle handler to make Ruby code
# run during GLib's event loop.
class ThreadEnabler
include Singleton
FRAMERATE = 25
DEFAULT_TIMEOUT = 1000 / FRAMERATE
def initialize timeout = DEFAULT_TIMEOUT
@timeout = timeout
@handler = proc { Thread.pass; true }
end
def setup_idle_handler
@handler_id ||= GLib.timeout_add(GLib::PRIORITY_DEFAULT,
@timeout, @handler,
nil, nil)
end
end
setup_instance_method "run_with_thread_enabler"
def run_with_thread_enabler
ThreadEnabler.instance.setup_idle_handler
run_without_thread_enabler
end
alias run_without_thread_enabler run
alias run run_with_thread_enabler
end
end
| require 'singleton'
GLib.load_class :MainLoop
module GLib
# Overrides for GMainLoop, GLib's event loop
class MainLoop
# Class encepsulationg logic for running an idle handler to make Ruby code
# run during GLib's event loop.
class ThreadEnabler
include Singleton
FRAMERATE = 25
DEFAULT_TIMEOUT = 1000 / FRAMERATE
def initialize timeout = DEFAULT_TIMEOUT
@timeout = timeout
@handler = if RUBY_VERSION == "1.9.2"
proc { sleep 0.0001; Thread.pass; true }
else
proc { Thread.pass; true }
end
end
def setup_idle_handler
@handler_id ||= GLib.timeout_add(GLib::PRIORITY_DEFAULT,
@timeout, @handler,
nil, nil)
end
end
setup_instance_method "run_with_thread_enabler"
def run_with_thread_enabler
ThreadEnabler.instance.setup_idle_handler
run_without_thread_enabler
end
alias run_without_thread_enabler run
alias run run_with_thread_enabler
end
end
| Add tiny sleep to make idle handler work on MRI 1.9.2 | Add tiny sleep to make idle handler work on MRI 1.9.2
| Ruby | lgpl-2.1 | mvz/gir_ffi,mvz/gir_ffi,mvz/gir_ffi,jcupitt/gir_ffi,jcupitt/gir_ffi | ruby | ## Code Before:
require 'singleton'
GLib.load_class :MainLoop
module GLib
# Overrides for GMainLoop, GLib's event loop
class MainLoop
# Class encepsulationg logic for running an idle handler to make Ruby code
# run during GLib's event loop.
class ThreadEnabler
include Singleton
FRAMERATE = 25
DEFAULT_TIMEOUT = 1000 / FRAMERATE
def initialize timeout = DEFAULT_TIMEOUT
@timeout = timeout
@handler = proc { Thread.pass; true }
end
def setup_idle_handler
@handler_id ||= GLib.timeout_add(GLib::PRIORITY_DEFAULT,
@timeout, @handler,
nil, nil)
end
end
setup_instance_method "run_with_thread_enabler"
def run_with_thread_enabler
ThreadEnabler.instance.setup_idle_handler
run_without_thread_enabler
end
alias run_without_thread_enabler run
alias run run_with_thread_enabler
end
end
## Instruction:
Add tiny sleep to make idle handler work on MRI 1.9.2
## Code After:
require 'singleton'
GLib.load_class :MainLoop
module GLib
# Overrides for GMainLoop, GLib's event loop
class MainLoop
# Class encepsulationg logic for running an idle handler to make Ruby code
# run during GLib's event loop.
class ThreadEnabler
include Singleton
FRAMERATE = 25
DEFAULT_TIMEOUT = 1000 / FRAMERATE
def initialize timeout = DEFAULT_TIMEOUT
@timeout = timeout
@handler = if RUBY_VERSION == "1.9.2"
proc { sleep 0.0001; Thread.pass; true }
else
proc { Thread.pass; true }
end
end
def setup_idle_handler
@handler_id ||= GLib.timeout_add(GLib::PRIORITY_DEFAULT,
@timeout, @handler,
nil, nil)
end
end
setup_instance_method "run_with_thread_enabler"
def run_with_thread_enabler
ThreadEnabler.instance.setup_idle_handler
run_without_thread_enabler
end
alias run_without_thread_enabler run
alias run run_with_thread_enabler
end
end
| require 'singleton'
GLib.load_class :MainLoop
module GLib
# Overrides for GMainLoop, GLib's event loop
class MainLoop
# Class encepsulationg logic for running an idle handler to make Ruby code
# run during GLib's event loop.
class ThreadEnabler
include Singleton
FRAMERATE = 25
DEFAULT_TIMEOUT = 1000 / FRAMERATE
def initialize timeout = DEFAULT_TIMEOUT
@timeout = timeout
+ @handler = if RUBY_VERSION == "1.9.2"
+ proc { sleep 0.0001; Thread.pass; true }
+ else
- @handler = proc { Thread.pass; true }
? -------- ^
+ proc { Thread.pass; true }
? ^^^^^^^^^^^
+ end
end
def setup_idle_handler
@handler_id ||= GLib.timeout_add(GLib::PRIORITY_DEFAULT,
@timeout, @handler,
nil, nil)
end
end
setup_instance_method "run_with_thread_enabler"
def run_with_thread_enabler
ThreadEnabler.instance.setup_idle_handler
run_without_thread_enabler
end
alias run_without_thread_enabler run
alias run run_with_thread_enabler
end
end | 6 | 0.157895 | 5 | 1 |
d2c0990745a16034c3c237fa963dee951a1e5eb4 | README.md | README.md |
Library for the Totango [server integration API](http://help.totango.com/installing-totango/quick-start-http-api-server-side-integration/)
## Example
This example is available at http://play.golang.org/p/bj2zod0fJa
```go
package main
import (
"github.com/BenjaminRH/totango"
)
func main() {
tracker, _ := totango.NewTracker("SP-XXXX-YY")
// Track a new event
tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
// Now update an attribute
tracker.TrackAttribute("account123", "userbob@example.com", "Some Attribute", "The Value")
// How about multiple attributes?
tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
"An Attribute": "The value",
"Another one": "value",
"Maybe a third": "value",
})
}
```
|
Library for the Totango [server integration API](http://help.totango.com/installing-totango/quick-start-http-api-server-side-integration/)
## Example
This example is available at http://play.golang.org/p/pgc709-CnQ
```go
package main
import (
"github.com/BenjaminRH/totango"
)
func main() {
tracker, _ := totango.NewTracker("SP-XXXX-YY")
// Track a new event
tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
// Now update an account attribute
tracker.TrackAttribute("account123", "", "Some Attribute", "The Value")
// Or update a user attribute
tracker.TrackAttribute("account123", "userbob@example.com", "Foo", "Bar")
// How about multiple attributes?
tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
"An Attribute": "The value",
"Another one": "value",
"Maybe a third": "value",
})
}
```
| Update example to show tracking an account/user attribute | Update example to show tracking an account/user attribute | Markdown | mit | BenjaminRH/totango | markdown | ## Code Before:
Library for the Totango [server integration API](http://help.totango.com/installing-totango/quick-start-http-api-server-side-integration/)
## Example
This example is available at http://play.golang.org/p/bj2zod0fJa
```go
package main
import (
"github.com/BenjaminRH/totango"
)
func main() {
tracker, _ := totango.NewTracker("SP-XXXX-YY")
// Track a new event
tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
// Now update an attribute
tracker.TrackAttribute("account123", "userbob@example.com", "Some Attribute", "The Value")
// How about multiple attributes?
tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
"An Attribute": "The value",
"Another one": "value",
"Maybe a third": "value",
})
}
```
## Instruction:
Update example to show tracking an account/user attribute
## Code After:
Library for the Totango [server integration API](http://help.totango.com/installing-totango/quick-start-http-api-server-side-integration/)
## Example
This example is available at http://play.golang.org/p/pgc709-CnQ
```go
package main
import (
"github.com/BenjaminRH/totango"
)
func main() {
tracker, _ := totango.NewTracker("SP-XXXX-YY")
// Track a new event
tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
// Now update an account attribute
tracker.TrackAttribute("account123", "", "Some Attribute", "The Value")
// Or update a user attribute
tracker.TrackAttribute("account123", "userbob@example.com", "Foo", "Bar")
// How about multiple attributes?
tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
"An Attribute": "The value",
"Another one": "value",
"Maybe a third": "value",
})
}
```
|
Library for the Totango [server integration API](http://help.totango.com/installing-totango/quick-start-http-api-server-side-integration/)
## Example
- This example is available at http://play.golang.org/p/bj2zod0fJa
? ^^^^^^ ^^^
+ This example is available at http://play.golang.org/p/pgc709-CnQ
? ^^^^ ^^^^^
```go
package main
import (
"github.com/BenjaminRH/totango"
)
func main() {
tracker, _ := totango.NewTracker("SP-XXXX-YY")
// Track a new event
tracker.Track("account123", "userbob@example.com", "User Bob", "Some Activity", "A Module")
- // Now update an attribute
+ // Now update an account attribute
? ++++++++
- tracker.TrackAttribute("account123", "userbob@example.com", "Some Attribute", "The Value")
? -------------------
+ tracker.TrackAttribute("account123", "", "Some Attribute", "The Value")
+
+ // Or update a user attribute
+ tracker.TrackAttribute("account123", "userbob@example.com", "Foo", "Bar")
// How about multiple attributes?
tracker.TrackAttributes("account123", "userbob@example.com", map[string]string{
"An Attribute": "The value",
"Another one": "value",
"Maybe a third": "value",
})
}
``` | 9 | 0.290323 | 6 | 3 |
7b8f991a7da895be180aed5d1b36a7eb756e64b7 | .travis.yml | .travis.yml | sudo: required
services:
- docker
language: ruby
bundler_args: --without integration development
rvm:
- 2.1
# uncomment this line if your project needs to run something other than `rake`:
# script: bundle exec rspec spec
script:
- bundle exec rake lint
- bundle exec rake kitchen:all_suites
| sudo: required
services:
- docker
branches:
only:
- master
- /^(i:ci)-\d\.\d\.\d/
language: ruby
bundler_args: --without integration development
rvm:
- 2.1
# uncomment this line if your project needs to run something other than `rake`:
# script: bundle exec rspec spec
script:
- bundle exec rake lint
- bundle exec rake kitchen:all_suites
| Return back build only for master branch and added regexp for tags | Return back build only for master branch and added regexp for tags
| YAML | apache-2.0 | vkhatri/chef-aerospike-cluster,vkhatri/chef-aerospike-cluster,vkhatri/chef-aerospike-cluster,trademob/chef-aerospike-cluster,trademob/chef-aerospike-cluster,trademob/chef-aerospike-cluster | yaml | ## Code Before:
sudo: required
services:
- docker
language: ruby
bundler_args: --without integration development
rvm:
- 2.1
# uncomment this line if your project needs to run something other than `rake`:
# script: bundle exec rspec spec
script:
- bundle exec rake lint
- bundle exec rake kitchen:all_suites
## Instruction:
Return back build only for master branch and added regexp for tags
## Code After:
sudo: required
services:
- docker
branches:
only:
- master
- /^(i:ci)-\d\.\d\.\d/
language: ruby
bundler_args: --without integration development
rvm:
- 2.1
# uncomment this line if your project needs to run something other than `rake`:
# script: bundle exec rspec spec
script:
- bundle exec rake lint
- bundle exec rake kitchen:all_suites
| sudo: required
services:
- docker
+
+ branches:
+ only:
+ - master
+ - /^(i:ci)-\d\.\d\.\d/
language: ruby
bundler_args: --without integration development
rvm:
- 2.1
# uncomment this line if your project needs to run something other than `rake`:
# script: bundle exec rspec spec
script:
- bundle exec rake lint
- bundle exec rake kitchen:all_suites | 5 | 0.357143 | 5 | 0 |
1fe19030613fd7fff2f3f5c8c141d8e54e6efcf9 | jobs/serviceDispatcher.js | jobs/serviceDispatcher.js | var Q = require('q');
var util = require('util');
module.exports.ServiceDispatcher = function() {
this.services = [];
};
module.exports.ServiceDispatcher.prototype.use = function(service) {
this.services.push(service);
};
module.exports.ServiceDispatcher.prototype.forAll = function(command) {
var promises = this.services.map(function(service) {
return Q.fcall(command, service);
});
return Q.all(promises);
};
module.exports.ServiceDispatcher.prototype.untilSuccess = function(command, isSuccess) {
var deferred = Q.defer();
var serviceIndex = 0;
var services = this.services;
function loop() {
if (services.length <= serviceIndex) {
return Q.resolve(undefined);
}
var service = services[serviceIndex];
serviceIndex++;
util.log('Trying service ' + service.name);
Q.when(command(service), function(result) {
if (result && (!isSuccess || isSuccess(result))) {
deferred.resolve(result);
} else if (serviceIndex < services.length) {
loop();
} else {
deferred.resolve(undefined);
}
}, deferred.reject);
}
Q.nextTick(loop);
return deferred.promise;
} | var Q = require('q');
var util = require('util');
module.exports.ServiceDispatcher = function() {
this.services = [];
};
module.exports.ServiceDispatcher.prototype.use = function(service) {
this.services.push(service);
};
module.exports.ServiceDispatcher.prototype.forAll = function(command) {
var promises = this.services.map(function(service) {
return Q.fcall(command, service);
});
return Q.all(promises);
};
module.exports.ServiceDispatcher.prototype.untilSuccess = function(command, isSuccess) {
var deferred = Q.defer();
var serviceIndex = 0;
var services = this.services;
function loop() {
if (services.length <= serviceIndex) {
return Q.resolve(undefined);
}
var service = services[serviceIndex];
serviceIndex++;
Q.when(command(service), function(result) {
if (result && (!isSuccess || isSuccess(result))) {
deferred.resolve(result);
} else if (serviceIndex < services.length) {
loop();
} else {
deferred.resolve(undefined);
}
}, deferred.reject);
}
Q.nextTick(loop);
return deferred.promise;
} | Remove the "Trying service" log. | Remove the "Trying service" log. | JavaScript | mit | ziacik/lumus,ziacik/lumus,ziacik/lumus | javascript | ## Code Before:
var Q = require('q');
var util = require('util');
module.exports.ServiceDispatcher = function() {
this.services = [];
};
module.exports.ServiceDispatcher.prototype.use = function(service) {
this.services.push(service);
};
module.exports.ServiceDispatcher.prototype.forAll = function(command) {
var promises = this.services.map(function(service) {
return Q.fcall(command, service);
});
return Q.all(promises);
};
module.exports.ServiceDispatcher.prototype.untilSuccess = function(command, isSuccess) {
var deferred = Q.defer();
var serviceIndex = 0;
var services = this.services;
function loop() {
if (services.length <= serviceIndex) {
return Q.resolve(undefined);
}
var service = services[serviceIndex];
serviceIndex++;
util.log('Trying service ' + service.name);
Q.when(command(service), function(result) {
if (result && (!isSuccess || isSuccess(result))) {
deferred.resolve(result);
} else if (serviceIndex < services.length) {
loop();
} else {
deferred.resolve(undefined);
}
}, deferred.reject);
}
Q.nextTick(loop);
return deferred.promise;
}
## Instruction:
Remove the "Trying service" log.
## Code After:
var Q = require('q');
var util = require('util');
module.exports.ServiceDispatcher = function() {
this.services = [];
};
module.exports.ServiceDispatcher.prototype.use = function(service) {
this.services.push(service);
};
module.exports.ServiceDispatcher.prototype.forAll = function(command) {
var promises = this.services.map(function(service) {
return Q.fcall(command, service);
});
return Q.all(promises);
};
module.exports.ServiceDispatcher.prototype.untilSuccess = function(command, isSuccess) {
var deferred = Q.defer();
var serviceIndex = 0;
var services = this.services;
function loop() {
if (services.length <= serviceIndex) {
return Q.resolve(undefined);
}
var service = services[serviceIndex];
serviceIndex++;
Q.when(command(service), function(result) {
if (result && (!isSuccess || isSuccess(result))) {
deferred.resolve(result);
} else if (serviceIndex < services.length) {
loop();
} else {
deferred.resolve(undefined);
}
}, deferred.reject);
}
Q.nextTick(loop);
return deferred.promise;
} | var Q = require('q');
var util = require('util');
module.exports.ServiceDispatcher = function() {
this.services = [];
};
module.exports.ServiceDispatcher.prototype.use = function(service) {
this.services.push(service);
};
module.exports.ServiceDispatcher.prototype.forAll = function(command) {
var promises = this.services.map(function(service) {
return Q.fcall(command, service);
});
return Q.all(promises);
};
module.exports.ServiceDispatcher.prototype.untilSuccess = function(command, isSuccess) {
var deferred = Q.defer();
var serviceIndex = 0;
var services = this.services;
function loop() {
if (services.length <= serviceIndex) {
return Q.resolve(undefined);
}
var service = services[serviceIndex];
serviceIndex++;
- util.log('Trying service ' + service.name);
-
Q.when(command(service), function(result) {
if (result && (!isSuccess || isSuccess(result))) {
deferred.resolve(result);
} else if (serviceIndex < services.length) {
loop();
} else {
deferred.resolve(undefined);
}
}, deferred.reject);
}
Q.nextTick(loop);
return deferred.promise;
} | 2 | 0.041667 | 0 | 2 |
5ce262a21f77d31e39ae1c9c58b66eddac624dd4 | rmi/src/main/java/com/lynn9388/rmichatroom/rmi/User.java | rmi/src/main/java/com/lynn9388/rmichatroom/rmi/User.java | /*
* Copyright (C) 2016 Lynn
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lynn9388.rmichatroom.rmi;
import java.io.Serializable;
public class User implements Serializable {
private static final long serialVersionUID = 148606460530002054L;
private String username;
private String ip;
private String port;
private String remoteName;
public User(String username, String ip, String port, String remoteName) {
this.username = username;
this.ip = ip;
this.port = port;
this.remoteName = remoteName;
}
public String getUsername() {
return username;
}
public String getIp() {
return ip;
}
public String getPort() {
return port;
}
public String getRemoteName() {
return remoteName;
}
}
| /*
* Copyright (C) 2016 Lynn
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lynn9388.rmichatroom.rmi;
import java.io.Serializable;
public class User implements Serializable {
private static final long serialVersionUID = 8116975872176331171L;
private String username;
private String ip;
private int port;
private String remoteName;
public User(String username, String ip, int port, String remoteName) {
this.username = username;
this.ip = ip;
this.port = port;
this.remoteName = remoteName;
}
public String getUsername() {
return username;
}
public String getIp() {
return ip;
}
public int getPort() {
return port;
}
public String getRemoteName() {
return remoteName;
}
}
| Change user's port value style | Change user's port value style
| Java | apache-2.0 | lynn9388/rmi-chat-room | java | ## Code Before:
/*
* Copyright (C) 2016 Lynn
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lynn9388.rmichatroom.rmi;
import java.io.Serializable;
public class User implements Serializable {
private static final long serialVersionUID = 148606460530002054L;
private String username;
private String ip;
private String port;
private String remoteName;
public User(String username, String ip, String port, String remoteName) {
this.username = username;
this.ip = ip;
this.port = port;
this.remoteName = remoteName;
}
public String getUsername() {
return username;
}
public String getIp() {
return ip;
}
public String getPort() {
return port;
}
public String getRemoteName() {
return remoteName;
}
}
## Instruction:
Change user's port value style
## Code After:
/*
* Copyright (C) 2016 Lynn
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lynn9388.rmichatroom.rmi;
import java.io.Serializable;
public class User implements Serializable {
private static final long serialVersionUID = 8116975872176331171L;
private String username;
private String ip;
private int port;
private String remoteName;
public User(String username, String ip, int port, String remoteName) {
this.username = username;
this.ip = ip;
this.port = port;
this.remoteName = remoteName;
}
public String getUsername() {
return username;
}
public String getIp() {
return ip;
}
public int getPort() {
return port;
}
public String getRemoteName() {
return remoteName;
}
}
| /*
* Copyright (C) 2016 Lynn
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.lynn9388.rmichatroom.rmi;
import java.io.Serializable;
public class User implements Serializable {
- private static final long serialVersionUID = 148606460530002054L;
? ^ ------ ^^^^^^^
+ private static final long serialVersionUID = 8116975872176331171L;
? + ^^^^^ ++++ ^^^^^
-
private String username;
private String ip;
- private String port;
? --- ^
+ private int port;
? ^
private String remoteName;
- public User(String username, String ip, String port, String remoteName) {
? --- ^
+ public User(String username, String ip, int port, String remoteName) {
? ^
this.username = username;
this.ip = ip;
this.port = port;
this.remoteName = remoteName;
}
public String getUsername() {
return username;
}
public String getIp() {
return ip;
}
- public String getPort() {
? --- ^
+ public int getPort() {
? ^
return port;
}
public String getRemoteName() {
return remoteName;
}
} | 9 | 0.176471 | 4 | 5 |
123f92a9de62abfa293a21cb5d29fbccc629377c | CONTRIBUTING.md | CONTRIBUTING.md |
osf-cli is an open-source project and contributions of all kinds
are welcome.
Contributors to the project are required to follow the [code of
conduct](CONDUCT.md).
By contributing, you are agreeing that we may redistribute your work under
[this license](license).
Contributions should follow these guidelines:
* all changes by pull request (PR);
* open your PR as early as possible and add "[WIP]" to the title to mark it as
work in progress;
* a PR solves one problem (do not mix problems together in one PR) with the
minimal set of changes;
* describe why you are proposing the changes you are proposing;
* try to not rush changes (the definition of rush depends on how big your
changes are);
* change [WIP] to [MRG] when your PR is ready to be reviewed;
* someone else has to merge your PR;
* new code needs to come with a test;
* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much
as possible, but not too much;
* no merging if travis is red.
These are not hard rules to be enforced by :police_car: but instead guidelines.
[license]: LICENSE
|
osf-cli is an open-source project and contributions of all kinds
are welcome.
Contributors to the project are required to follow the [code of
conduct](CONDUCT.md).
By contributing, you are agreeing that we may redistribute your work under
[this license](license).
We use the [GitHub flow](https://guides.github.com/introduction/flow/) model
for contributions.
Contributions should follow these guidelines:
* all changes by pull request (PR);
* open your PR as early as possible and add "[WIP]" to the title to mark it as
work in progress;
* a PR solves one problem (do not mix problems together in one PR) with the
minimal set of changes;
* describe why you are proposing the changes you are proposing;
* try to not rush changes (the definition of rush depends on how big your
changes are);
* change [WIP] to [MRG] when your PR is ready to be reviewed;
* someone else has to merge your PR;
* new code needs to come with a test;
* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much
as possible, but not too much;
* no merging if travis is red.
These are not hard rules to be enforced by :police_car: but instead guidelines.
[license]: LICENSE
| Add link to GitHub flow model explanation | Add link to GitHub flow model explanation
| Markdown | bsd-3-clause | betatim/osf-cli,betatim/osf-cli | markdown | ## Code Before:
osf-cli is an open-source project and contributions of all kinds
are welcome.
Contributors to the project are required to follow the [code of
conduct](CONDUCT.md).
By contributing, you are agreeing that we may redistribute your work under
[this license](license).
Contributions should follow these guidelines:
* all changes by pull request (PR);
* open your PR as early as possible and add "[WIP]" to the title to mark it as
work in progress;
* a PR solves one problem (do not mix problems together in one PR) with the
minimal set of changes;
* describe why you are proposing the changes you are proposing;
* try to not rush changes (the definition of rush depends on how big your
changes are);
* change [WIP] to [MRG] when your PR is ready to be reviewed;
* someone else has to merge your PR;
* new code needs to come with a test;
* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much
as possible, but not too much;
* no merging if travis is red.
These are not hard rules to be enforced by :police_car: but instead guidelines.
[license]: LICENSE
## Instruction:
Add link to GitHub flow model explanation
## Code After:
osf-cli is an open-source project and contributions of all kinds
are welcome.
Contributors to the project are required to follow the [code of
conduct](CONDUCT.md).
By contributing, you are agreeing that we may redistribute your work under
[this license](license).
We use the [GitHub flow](https://guides.github.com/introduction/flow/) model
for contributions.
Contributions should follow these guidelines:
* all changes by pull request (PR);
* open your PR as early as possible and add "[WIP]" to the title to mark it as
work in progress;
* a PR solves one problem (do not mix problems together in one PR) with the
minimal set of changes;
* describe why you are proposing the changes you are proposing;
* try to not rush changes (the definition of rush depends on how big your
changes are);
* change [WIP] to [MRG] when your PR is ready to be reviewed;
* someone else has to merge your PR;
* new code needs to come with a test;
* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much
as possible, but not too much;
* no merging if travis is red.
These are not hard rules to be enforced by :police_car: but instead guidelines.
[license]: LICENSE
|
osf-cli is an open-source project and contributions of all kinds
are welcome.
Contributors to the project are required to follow the [code of
conduct](CONDUCT.md).
By contributing, you are agreeing that we may redistribute your work under
[this license](license).
+
+ We use the [GitHub flow](https://guides.github.com/introduction/flow/) model
+ for contributions.
Contributions should follow these guidelines:
* all changes by pull request (PR);
* open your PR as early as possible and add "[WIP]" to the title to mark it as
work in progress;
* a PR solves one problem (do not mix problems together in one PR) with the
minimal set of changes;
* describe why you are proposing the changes you are proposing;
* try to not rush changes (the definition of rush depends on how big your
changes are);
* change [WIP] to [MRG] when your PR is ready to be reviewed;
* someone else has to merge your PR;
* new code needs to come with a test;
* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much
as possible, but not too much;
* no merging if travis is red.
These are not hard rules to be enforced by :police_car: but instead guidelines.
[license]: LICENSE | 3 | 0.1 | 3 | 0 |
ed01bcb594acada5dcf6a476e5db847006f71c1a | node/install.sh | node/install.sh | brew install nvm
export NVM_DIR=~/.nvm
if [ ! -d "$NVM_DIR" ]; then
mkdir $NVM_DIR
fi
source $(brew --prefix nvm)/nvm.sh
nvm install 0.12
nvm install 4
nvm install latest
nvm use 0.12
npm update -g npm
npm install -g bower yo gulp grunt-cli
nvm use 4
npm update -g npm
npm install -g bower yo gulp grunt-cli
nvm use latest
npm update -g npm
npm install -g bower yo gulp grunt-cli react-native
nvm use latest
nvm alias default latest
exit 0
| npm_global="bower yo gulp grunt-cli react-native"
brew install nvm
export NVM_DIR=~/.nvm
if [ ! -d "$NVM_DIR" ]; then
mkdir $NVM_DIR
fi
source $(brew --prefix nvm)/nvm.sh
nvm use latest
npm update -g npm
npm install -g $npm_global
nvm use latest
nvm alias default latest
exit 0
| Install only last version of node | Install only last version of node
| Shell | mit | dmongeau/dotfiles,dmongeau/dotfiles | shell | ## Code Before:
brew install nvm
export NVM_DIR=~/.nvm
if [ ! -d "$NVM_DIR" ]; then
mkdir $NVM_DIR
fi
source $(brew --prefix nvm)/nvm.sh
nvm install 0.12
nvm install 4
nvm install latest
nvm use 0.12
npm update -g npm
npm install -g bower yo gulp grunt-cli
nvm use 4
npm update -g npm
npm install -g bower yo gulp grunt-cli
nvm use latest
npm update -g npm
npm install -g bower yo gulp grunt-cli react-native
nvm use latest
nvm alias default latest
exit 0
## Instruction:
Install only last version of node
## Code After:
npm_global="bower yo gulp grunt-cli react-native"
brew install nvm
export NVM_DIR=~/.nvm
if [ ! -d "$NVM_DIR" ]; then
mkdir $NVM_DIR
fi
source $(brew --prefix nvm)/nvm.sh
nvm use latest
npm update -g npm
npm install -g $npm_global
nvm use latest
nvm alias default latest
exit 0
| + npm_global="bower yo gulp grunt-cli react-native"
+
brew install nvm
export NVM_DIR=~/.nvm
if [ ! -d "$NVM_DIR" ]; then
mkdir $NVM_DIR
fi
source $(brew --prefix nvm)/nvm.sh
- nvm install 0.12
- nvm install 4
- nvm install latest
-
- nvm use 0.12
- npm update -g npm
- npm install -g bower yo gulp grunt-cli
-
- nvm use 4
- npm update -g npm
- npm install -g bower yo gulp grunt-cli
-
nvm use latest
npm update -g npm
- npm install -g bower yo gulp grunt-cli react-native
+ npm install -g $npm_global
nvm use latest
nvm alias default latest
-
exit 0 | 17 | 0.566667 | 3 | 14 |
37e1cec69c0ba28a417b1f89793bcf217e04b0b7 | spec/request/api_key/api_key_spec.rb | spec/request/api_key/api_key_spec.rb | require 'spec_helper'
describe '/api_key' do
it 'should return 401 with invalid credentials' do
create_user 'test@debox.com'
get '/v1/api_key'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return token with valid credentials' do
user = create_user 'test@debox.com'
get '/v1/api_key', user: 'test@debox.com', password: 'secret'
last_response.should be_ok
last_response.body.should eq user.api_key
end
end
| require 'spec_helper'
describe '/api_key' do
it 'should return 401 with invalid credentials' do
get '/v1/api_key'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return 401 with invalid credentials' do
get '/v1/api_key', user: 'test@debox.com'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return token with valid credentials' do
user = create_user 'test@debox.com'
get '/v1/api_key', user: 'test@debox.com', password: 'secret'
last_response.should be_ok
last_response.body.should eq user.api_key
end
end
| Add spec if user provide user but not password | Add spec if user provide user but not password
| Ruby | mit | eloy/debox_server | ruby | ## Code Before:
require 'spec_helper'
describe '/api_key' do
it 'should return 401 with invalid credentials' do
create_user 'test@debox.com'
get '/v1/api_key'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return token with valid credentials' do
user = create_user 'test@debox.com'
get '/v1/api_key', user: 'test@debox.com', password: 'secret'
last_response.should be_ok
last_response.body.should eq user.api_key
end
end
## Instruction:
Add spec if user provide user but not password
## Code After:
require 'spec_helper'
describe '/api_key' do
it 'should return 401 with invalid credentials' do
get '/v1/api_key'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return 401 with invalid credentials' do
get '/v1/api_key', user: 'test@debox.com'
last_response.should_not be_ok
last_response.status.should eq 401
end
it 'should return token with valid credentials' do
user = create_user 'test@debox.com'
get '/v1/api_key', user: 'test@debox.com', password: 'secret'
last_response.should be_ok
last_response.body.should eq user.api_key
end
end
| require 'spec_helper'
describe '/api_key' do
it 'should return 401 with invalid credentials' do
- create_user 'test@debox.com'
get '/v1/api_key'
last_response.should_not be_ok
last_response.status.should eq 401
end
+
+ it 'should return 401 with invalid credentials' do
+ get '/v1/api_key', user: 'test@debox.com'
+ last_response.should_not be_ok
+ last_response.status.should eq 401
+ end
+
it 'should return token with valid credentials' do
user = create_user 'test@debox.com'
get '/v1/api_key', user: 'test@debox.com', password: 'secret'
last_response.should be_ok
last_response.body.should eq user.api_key
end
end | 8 | 0.421053 | 7 | 1 |
d5f285e74ed5d448d7f506b8a03610bcc8af9981 | src/server/src/healthcheck/topology-loaded.indicator.ts | src/server/src/healthcheck/topology-loaded.indicator.ts | import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public topologyService: TopologyService) {
super();
}
async isHealthy(key: string): Promise<HealthIndicatorResult> {
const layers = this.topologyService.layers();
if (layers === undefined) {
const result = this.getStatus(key, false, {});
throw new HealthCheckError("Topology layers not intialized", result);
}
const layerEntries = (await Promise.all(
Object.entries(layers).map(([layerId, topology]) => {
return new Promise((resolve, reject) => {
// Promise.race should return the first already resolved promise
// immediately when provided at least one, so this shouldn't block
void Promise.race([topology, Promise.resolve(undefined)]).then(topology => {
resolve([layerId, topology !== undefined]);
});
});
})
)) as [string, boolean][];
const layerStatus = Object.fromEntries(layerEntries);
const isHealthy = Object.values(layerStatus).every(status => status);
const result = this.getStatus(key, isHealthy, layerStatus);
if (isHealthy) {
return result;
}
throw new HealthCheckError("Topology not fully loaded", result);
}
}
| import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public topologyService: TopologyService) {
super();
}
async isHealthy(key: string): Promise<HealthIndicatorResult> {
const layers = this.topologyService.layers();
if (layers === undefined) {
const result = this.getStatus(key, false, {});
throw new HealthCheckError("Topology layers not intialized", result);
}
const layerEntries = (await Promise.all(
Object.entries(layers).map(([layerId, topology]) => {
return new Promise((resolve, reject) => {
// Promise.race should return the first already resolved promise
// immediately when provided at least one, so this shouldn't block
void Promise.race([topology, Promise.resolve(undefined)]).then(topology => {
resolve([layerId, topology !== undefined]);
});
});
})
)) as [string, boolean][];
const isHealthy = layerEntries.every(([_, status]) => status);
const pendingLayers = layerEntries.filter(([_, status]) => !status).map(([layer, _]) => layer);
const result = this.getStatus(key, isHealthy, {
total: layerEntries.length,
complete: layerEntries.length - pendingLayers.length,
pendingLayers
});
if (isHealthy) {
return result;
}
throw new HealthCheckError("Topology not fully loaded", result);
}
}
| Clean up health check output to be less verbose | Clean up health check output to be less verbose
| TypeScript | apache-2.0 | PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder | typescript | ## Code Before:
import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public topologyService: TopologyService) {
super();
}
async isHealthy(key: string): Promise<HealthIndicatorResult> {
const layers = this.topologyService.layers();
if (layers === undefined) {
const result = this.getStatus(key, false, {});
throw new HealthCheckError("Topology layers not intialized", result);
}
const layerEntries = (await Promise.all(
Object.entries(layers).map(([layerId, topology]) => {
return new Promise((resolve, reject) => {
// Promise.race should return the first already resolved promise
// immediately when provided at least one, so this shouldn't block
void Promise.race([topology, Promise.resolve(undefined)]).then(topology => {
resolve([layerId, topology !== undefined]);
});
});
})
)) as [string, boolean][];
const layerStatus = Object.fromEntries(layerEntries);
const isHealthy = Object.values(layerStatus).every(status => status);
const result = this.getStatus(key, isHealthy, layerStatus);
if (isHealthy) {
return result;
}
throw new HealthCheckError("Topology not fully loaded", result);
}
}
## Instruction:
Clean up health check output to be less verbose
## Code After:
import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public topologyService: TopologyService) {
super();
}
async isHealthy(key: string): Promise<HealthIndicatorResult> {
const layers = this.topologyService.layers();
if (layers === undefined) {
const result = this.getStatus(key, false, {});
throw new HealthCheckError("Topology layers not intialized", result);
}
const layerEntries = (await Promise.all(
Object.entries(layers).map(([layerId, topology]) => {
return new Promise((resolve, reject) => {
// Promise.race should return the first already resolved promise
// immediately when provided at least one, so this shouldn't block
void Promise.race([topology, Promise.resolve(undefined)]).then(topology => {
resolve([layerId, topology !== undefined]);
});
});
})
)) as [string, boolean][];
const isHealthy = layerEntries.every(([_, status]) => status);
const pendingLayers = layerEntries.filter(([_, status]) => !status).map(([layer, _]) => layer);
const result = this.getStatus(key, isHealthy, {
total: layerEntries.length,
complete: layerEntries.length - pendingLayers.length,
pendingLayers
});
if (isHealthy) {
return result;
}
throw new HealthCheckError("Topology not fully loaded", result);
}
}
| import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public topologyService: TopologyService) {
super();
}
async isHealthy(key: string): Promise<HealthIndicatorResult> {
const layers = this.topologyService.layers();
if (layers === undefined) {
const result = this.getStatus(key, false, {});
throw new HealthCheckError("Topology layers not intialized", result);
}
const layerEntries = (await Promise.all(
Object.entries(layers).map(([layerId, topology]) => {
return new Promise((resolve, reject) => {
// Promise.race should return the first already resolved promise
// immediately when provided at least one, so this shouldn't block
void Promise.race([topology, Promise.resolve(undefined)]).then(topology => {
resolve([layerId, topology !== undefined]);
});
});
})
)) as [string, boolean][];
- const layerStatus = Object.fromEntries(layerEntries);
+
- const isHealthy = Object.values(layerStatus).every(status => status);
? -------------- ^ ^^^ -
+ const isHealthy = layerEntries.every(([_, status]) => status);
? ^^ ^^^ +++++ ++
+ const pendingLayers = layerEntries.filter(([_, status]) => !status).map(([layer, _]) => layer);
- const result = this.getStatus(key, isHealthy, layerStatus);
? ^^^^^^^^^^^^^
+ const result = this.getStatus(key, isHealthy, {
? ^
+ total: layerEntries.length,
+ complete: layerEntries.length - pendingLayers.length,
+ pendingLayers
+ });
if (isHealthy) {
return result;
}
throw new HealthCheckError("Topology not fully loaded", result);
}
} | 11 | 0.282051 | 8 | 3 |
d1e614ad73ac0a1fe2b3b2183bbb3bfcc938ad11 | pkgs/development/libraries/apache-activemq/default.nix | pkgs/development/libraries/apache-activemq/default.nix | { stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "apache-activemq-${version}";
version = "5.8.0";
src = fetchurl {
url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
ensureDir $out
mv LICENSE lib $out/
for j in `find $out/lib -name "*.jar"`; do
cp="''${cp:+"$cp:"}$j";
done
echo "CLASSPATH=$cp" > $out/lib/classpath.env
'';
meta = {
homepage = http://activemq.apache.org/;
description = ''
Messaging and Integration Patterns server written in Java.
This nixpkg supplies the jar-files packaged in activemq's
binary distribution.
'';
license = stdenv.lib.licenses.asl20;
};
}
| { stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "apache-activemq-${version}";
version = "5.8.0";
src = fetchurl {
url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
ensureDir $out
mv * $out/
for j in `find $out/lib -name "*.jar"`; do
cp="''${cp:+"$cp:"}$j";
done
echo "CLASSPATH=$cp" > $out/lib/classpath.env
'';
meta = {
homepage = http://activemq.apache.org/;
description = ''
Messaging and Integration Patterns server written in Java.
'';
license = stdenv.lib.licenses.asl20;
};
}
| Copy everything from the dist to the store | activemq: Copy everything from the dist to the store
| Nix | mit | NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton | nix | ## Code Before:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "apache-activemq-${version}";
version = "5.8.0";
src = fetchurl {
url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
ensureDir $out
mv LICENSE lib $out/
for j in `find $out/lib -name "*.jar"`; do
cp="''${cp:+"$cp:"}$j";
done
echo "CLASSPATH=$cp" > $out/lib/classpath.env
'';
meta = {
homepage = http://activemq.apache.org/;
description = ''
Messaging and Integration Patterns server written in Java.
This nixpkg supplies the jar-files packaged in activemq's
binary distribution.
'';
license = stdenv.lib.licenses.asl20;
};
}
## Instruction:
activemq: Copy everything from the dist to the store
## Code After:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "apache-activemq-${version}";
version = "5.8.0";
src = fetchurl {
url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
ensureDir $out
mv * $out/
for j in `find $out/lib -name "*.jar"`; do
cp="''${cp:+"$cp:"}$j";
done
echo "CLASSPATH=$cp" > $out/lib/classpath.env
'';
meta = {
homepage = http://activemq.apache.org/;
description = ''
Messaging and Integration Patterns server written in Java.
'';
license = stdenv.lib.licenses.asl20;
};
}
| { stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "apache-activemq-${version}";
version = "5.8.0";
src = fetchurl {
url = "mirror://apache/activemq/apache-activemq/${version}/${name}-bin.tar.gz";
sha256 = "12a1lmmqapviqdgw307jm07vw1z5q53r56pkbp85w9wnqwspjrbk";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
ensureDir $out
- mv LICENSE lib $out/
+ mv * $out/
for j in `find $out/lib -name "*.jar"`; do
cp="''${cp:+"$cp:"}$j";
done
echo "CLASSPATH=$cp" > $out/lib/classpath.env
'';
meta = {
homepage = http://activemq.apache.org/;
description = ''
Messaging and Integration Patterns server written in Java.
- This nixpkg supplies the jar-files packaged in activemq's
- binary distribution.
'';
license = stdenv.lib.licenses.asl20;
};
} | 4 | 0.121212 | 1 | 3 |
5f8b0cf89762ba75a87e7728e122701147e7ccee | spec/rspec/sitemap/matchers/include_url_spec.rb | spec/rspec/sitemap/matchers/include_url_spec.rb | require "spec_helper"
describe "include_url matcher" do
include RSpec::Sitemap::Matchers
context "on a File" do
let(:sitemap) { fixture('basic') }
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
context "on a String" do
let(:sitemap) { fixture('basic').read }
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
end
| require "spec_helper"
describe "include_url matcher" do
include RSpec::Sitemap::Matchers
shared_examples_for "a matcher that accepts a File or a String" do
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
it_should_behave_like "a matcher that accepts a File or a String" do
let(:sitemap) { fixture('basic') }
end
it_should_behave_like "a matcher that accepts a File or a String" do
let(:sitemap) { fixture('basic').read }
end
end
| Use `shared_examples_for` and DRY up specs. | Use `shared_examples_for` and DRY up specs.
| Ruby | mit | unboxed/rspec-sitemap-matchers | ruby | ## Code Before:
require "spec_helper"
describe "include_url matcher" do
include RSpec::Sitemap::Matchers
context "on a File" do
let(:sitemap) { fixture('basic') }
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
context "on a String" do
let(:sitemap) { fixture('basic').read }
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
end
## Instruction:
Use `shared_examples_for` and DRY up specs.
## Code After:
require "spec_helper"
describe "include_url matcher" do
include RSpec::Sitemap::Matchers
shared_examples_for "a matcher that accepts a File or a String" do
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
end
it_should_behave_like "a matcher that accepts a File or a String" do
let(:sitemap) { fixture('basic') }
end
it_should_behave_like "a matcher that accepts a File or a String" do
let(:sitemap) { fixture('basic').read }
end
end
| require "spec_helper"
describe "include_url matcher" do
include RSpec::Sitemap::Matchers
+ shared_examples_for "a matcher that accepts a File or a String" do
- context "on a File" do
- let(:sitemap) { fixture('basic') }
it "passes" do
sitemap.should include_url('http://www.example.com')
end
it "fails" do
expect {
sitemap.should include_url('http://www.not-an-example.com')
}.to raise_error {|e|
e.message.should match("to include a URL to http://www.not-an-example.com")
}
end
-
end
- context "on a String" do
+ it_should_behave_like "a matcher that accepts a File or a String" do
+ let(:sitemap) { fixture('basic') }
+ end
+ it_should_behave_like "a matcher that accepts a File or a String" do
let(:sitemap) { fixture('basic').read }
-
- it "passes" do
- sitemap.should include_url('http://www.example.com')
- end
-
- it "fails" do
- expect {
- sitemap.should include_url('http://www.not-an-example.com')
- }.to raise_error {|e|
- e.message.should match("to include a URL to http://www.not-an-example.com")
- }
- end
-
end
end | 22 | 0.55 | 5 | 17 |
5ab4f2f09927d46c04a6fea9a8b335b2332c0889 | .github/workflows/PRPreview.yml | .github/workflows/PRPreview.yml | name: Pull Request preview
on: [pull_request]
jobs:
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: yarn install, build
run: |
yarn install
yarn run build
- name: deploy now
env:
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
- uses: iam4x/now-deploy-preview-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
ZEIT_TEAMID: augora
| name: Pull Request preview
on: [pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: yarn install, build
run: |
yarn install
yarn run build
- name: deploy now
env:
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
- uses: iam4x/now-deploy-preview-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
ZEIT_TEAMID: augora
| Fix needs on PRreviw deploy | Fix needs on PRreviw deploy
| YAML | mit | LaBetePolitique/api-wrapper,LaBetePolitique/api-wrapper | yaml | ## Code Before:
name: Pull Request preview
on: [pull_request]
jobs:
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: yarn install, build
run: |
yarn install
yarn run build
- name: deploy now
env:
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
- uses: iam4x/now-deploy-preview-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
ZEIT_TEAMID: augora
## Instruction:
Fix needs on PRreviw deploy
## Code After:
name: Pull Request preview
on: [pull_request]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: yarn install, build
run: |
yarn install
yarn run build
- name: deploy now
env:
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
- uses: iam4x/now-deploy-preview-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
ZEIT_TEAMID: augora
| name: Pull Request preview
on: [pull_request]
jobs:
deploy:
- needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: yarn install, build
run: |
yarn install
yarn run build
- name: deploy now
env:
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
run: now --no-clipboard -t ${ZEIT_TOKEN} -m commit=${GITHUB_SHA} -m branch=${GITHUB_REF}
- uses: iam4x/now-deploy-preview-comment@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
ZEIT_TEAMID: augora | 1 | 0.037037 | 0 | 1 |
18b24f3a87fb55db626a212c0e4278a058ab7bc7 | web.rb | web.rb | require 'sinatra'
require 'flickraw'
def random_pic_url
FlickRaw.api_key = ENV['FLICKR_API_KEY']
FlickRaw.shared_secret = ENV['FLICKR_SHARED_SECRET']
user_id = ENV['FLICKR_USER_ID']
list = flickr.photos.search :user_id => user_id, :tags => ENV['FLICKR_TAG']
ridx = rand(list.count)
info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
FlickRaw.url_z(info)
end
configure do
mime_type :jpg, 'image/jpeg'
end
get '/' do
"Meow!"
end
get '/random' do
random_pic_url
end
get '/randompic' do
"<img src=\"#{random_pic_url}\">"
end | require 'sinatra'
require 'flickraw'
def random_pic_url(user_id = nil, tag = nil)
FlickRaw.api_key = ENV['FLICKR_API_KEY']
FlickRaw.shared_secret = ENV['FLICKR_SHARED_SECRET']
if (user_id == nil)
user_id = ENV['FLICKR_USER_ID']
tag = ENV['FLICKR_TAG']
end
begin
list = flickr.photos.search :user_id => user_id, :tags => tag
rescue
list = nil
end
if (list != nil && list.count != 0)
ridx = rand(list.count)
info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
FlickRaw.url_z(info)
else
nil
end
end
configure do
mime_type :jpg, 'image/jpeg'
end
get '/' do
"Meow!"
end
get '/random' do
url = random_pic_url(params[:user_id], params[:tag])
if (url)
url
else
[404,"no pics found"]
end
end
get '/randompic/?:user_id?/?:tag?' do
url = random_pic_url(params[:user_id], params[:tag])
if (url)
"<img src=\"#{url}\">"
else
[404,"no pics found"]
end
end | Add optional parameters for /random and /randompic to allow specification of arbitrary flickr users and tag | Add optional parameters for /random and /randompic to allow specification of arbitrary flickr users and tag
| Ruby | bsd-2-clause | meatcoder/random-flickr | ruby | ## Code Before:
require 'sinatra'
require 'flickraw'
def random_pic_url
FlickRaw.api_key = ENV['FLICKR_API_KEY']
FlickRaw.shared_secret = ENV['FLICKR_SHARED_SECRET']
user_id = ENV['FLICKR_USER_ID']
list = flickr.photos.search :user_id => user_id, :tags => ENV['FLICKR_TAG']
ridx = rand(list.count)
info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
FlickRaw.url_z(info)
end
configure do
mime_type :jpg, 'image/jpeg'
end
get '/' do
"Meow!"
end
get '/random' do
random_pic_url
end
get '/randompic' do
"<img src=\"#{random_pic_url}\">"
end
## Instruction:
Add optional parameters for /random and /randompic to allow specification of arbitrary flickr users and tag
## Code After:
require 'sinatra'
require 'flickraw'
def random_pic_url(user_id = nil, tag = nil)
FlickRaw.api_key = ENV['FLICKR_API_KEY']
FlickRaw.shared_secret = ENV['FLICKR_SHARED_SECRET']
if (user_id == nil)
user_id = ENV['FLICKR_USER_ID']
tag = ENV['FLICKR_TAG']
end
begin
list = flickr.photos.search :user_id => user_id, :tags => tag
rescue
list = nil
end
if (list != nil && list.count != 0)
ridx = rand(list.count)
info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
FlickRaw.url_z(info)
else
nil
end
end
configure do
mime_type :jpg, 'image/jpeg'
end
get '/' do
"Meow!"
end
get '/random' do
url = random_pic_url(params[:user_id], params[:tag])
if (url)
url
else
[404,"no pics found"]
end
end
get '/randompic/?:user_id?/?:tag?' do
url = random_pic_url(params[:user_id], params[:tag])
if (url)
"<img src=\"#{url}\">"
else
[404,"no pics found"]
end
end | require 'sinatra'
require 'flickraw'
- def random_pic_url
+ def random_pic_url(user_id = nil, tag = nil)
FlickRaw.api_key = ENV['FLICKR_API_KEY']
FlickRaw.shared_secret = ENV['FLICKR_SHARED_SECRET']
+ if (user_id == nil)
- user_id = ENV['FLICKR_USER_ID']
+ user_id = ENV['FLICKR_USER_ID']
? ++ +
+ tag = ENV['FLICKR_TAG']
+ end
- list = flickr.photos.search :user_id => user_id, :tags => ENV['FLICKR_TAG']
- ridx = rand(list.count)
- info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
+ begin
+ list = flickr.photos.search :user_id => user_id, :tags => tag
+ rescue
+ list = nil
+ end
+
+ if (list != nil && list.count != 0)
+ ridx = rand(list.count)
+ info = flickr.photos.getInfo :photo_id => list[ridx].id, :secret => list[ridx].secret
+
- FlickRaw.url_z(info)
+ FlickRaw.url_z(info)
? ++
+ else
+ nil
+ end
end
configure do
mime_type :jpg, 'image/jpeg'
end
get '/' do
"Meow!"
end
get '/random' do
- random_pic_url
+ url = random_pic_url(params[:user_id], params[:tag])
+ if (url)
+ url
+ else
+ [404,"no pics found"]
+ end
end
- get '/randompic' do
+ get '/randompic/?:user_id?/?:tag?' do
+ url = random_pic_url(params[:user_id], params[:tag])
+ if (url)
- "<img src=\"#{random_pic_url}\">"
? -----------
+ "<img src=\"#{url}\">"
? ++
+ else
+ [404,"no pics found"]
+ end
end | 41 | 1.366667 | 32 | 9 |
f736c994e2f5b6341351d3c380c16faee0c7410a | .travis.yml | .travis.yml | language: rust
rust:
- nightly
cache:
cargo: true
timeout: 900
sudo: required
dist: trusty
| language: rust
rust:
- nightly-2018-06-01
cache:
cargo: true
timeout: 900
sudo: required
dist: trusty
| Use nightly Rust from 2018-06-01 to fix error | Use nightly Rust from 2018-06-01 to fix error
| YAML | mit | pombase/pombase-chado-json,pombase/pombase-chado-json | yaml | ## Code Before:
language: rust
rust:
- nightly
cache:
cargo: true
timeout: 900
sudo: required
dist: trusty
## Instruction:
Use nightly Rust from 2018-06-01 to fix error
## Code After:
language: rust
rust:
- nightly-2018-06-01
cache:
cargo: true
timeout: 900
sudo: required
dist: trusty
| language: rust
rust:
- - nightly
+ - nightly-2018-06-01
cache:
cargo: true
timeout: 900
sudo: required
dist: trusty | 2 | 0.25 | 1 | 1 |
95067d61d852a7898b3f81d0752351ae8d41c0ae | scripts/travis_before_install.sh | scripts/travis_before_install.sh |
set -ev
echo ${TRAVIS_OS_NAME}
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz
tar -xzf patchelf-0.8.tar.gz
cd patchelf-0.8
./configure --prefix=$VIRTUAL_ENV && make && make install
else
brew update
brew install python
brew install libogg
fi
|
set -ev
echo ${TRAVIS_OS_NAME}
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz
tar -xzf patchelf-0.8.tar.gz
cd patchelf-0.8
./configure --prefix=$VIRTUAL_ENV && make && make install
else
brew update
brew install python
brew install libogg
brew install ninja
fi
| Support testing ninja on OS X | Support testing ninja on OS X
| Shell | bsd-3-clause | jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000,jimporter/bfg9000 | shell | ## Code Before:
set -ev
echo ${TRAVIS_OS_NAME}
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz
tar -xzf patchelf-0.8.tar.gz
cd patchelf-0.8
./configure --prefix=$VIRTUAL_ENV && make && make install
else
brew update
brew install python
brew install libogg
fi
## Instruction:
Support testing ninja on OS X
## Code After:
set -ev
echo ${TRAVIS_OS_NAME}
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz
tar -xzf patchelf-0.8.tar.gz
cd patchelf-0.8
./configure --prefix=$VIRTUAL_ENV && make && make install
else
brew update
brew install python
brew install libogg
brew install ninja
fi
|
set -ev
echo ${TRAVIS_OS_NAME}
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://nixos.org/releases/patchelf/patchelf-0.8/patchelf-0.8.tar.gz
tar -xzf patchelf-0.8.tar.gz
cd patchelf-0.8
./configure --prefix=$VIRTUAL_ENV && make && make install
else
brew update
brew install python
brew install libogg
+ brew install ninja
fi | 1 | 0.071429 | 1 | 0 |
14615b03ade31e697e771a7ae5ca6aa2d4b7db43 | lib/sinja/sequel/core.rb | lib/sinja/sequel/core.rb | require 'forwardable'
require 'sequel'
require_relative 'pagination'
module Sinja
module Sequel
module Core
extend Forwardable
def self.prepended(base)
base.sinja do |c|
c.conflict_exceptions << ::Sequel::ConstraintViolation
c.not_found_exceptions << ::Sequel::NoMatchingRow
c.validation_exceptions << ::Sequel::ValidationFailed
c.validation_formatter = ->(e) { e.errors.keys.zip(e.errors.full_messages) }
end
base.prepend Pagination if ::Sequel::Model.db.dataset.respond_to?(:paginate)
end
def self.included(_)
abort "You must `prepend' Sinja::Sequel::Core, not `include' it!"
end
def_delegator ::Sequel::Model, :db, :database
def_delegator :database, :transaction
define_method :filter, proc(&:where)
def sort(collection, fields)
collection.order(*fields.map { |k, v| ::Sequel.send(v, k) })
end
define_method :finalize, proc(&:all)
def validate!
raise ::Sequel::ValidationFailed, resource unless resource.valid?
end
end
end
end
| require 'forwardable'
require 'sequel'
require_relative 'pagination'
module Sinja
module Sequel
module Core
extend Forwardable
def self.prepended(base)
base.sinja do |c|
c.conflict_exceptions << ::Sequel::ConstraintViolation
c.not_found_exceptions << ::Sequel::NoMatchingRow
c.validation_exceptions << ::Sequel::ValidationFailed
c.validation_formatter = proc do |e|
lookup = e.model.class.associations.to_set
e.errors.keys.zip(e.errors.full_messages)
.map { |a| a << :relationships if lookup.include?(a.first) }
end
end
base.prepend Pagination if ::Sequel::Model.db.dataset.respond_to?(:paginate)
end
def self.included(_)
abort "You must `prepend' Sinja::Sequel::Core, not `include' it!"
end
def_delegator ::Sequel::Model, :db, :database
def_delegator :database, :transaction
define_method :filter, proc(&:where)
def sort(collection, fields)
collection.order(*fields.map { |k, v| ::Sequel.send(v, k) })
end
define_method :finalize, proc(&:all)
def validate!
raise ::Sequel::ValidationFailed, resource unless resource.valid?
end
end
end
end
| Enhance validation formatter to indicate relationships | Enhance validation formatter to indicate relationships
| Ruby | mit | mwpastore/sinja-sequel,mwpastore/sinja-sequel | ruby | ## Code Before:
require 'forwardable'
require 'sequel'
require_relative 'pagination'
module Sinja
module Sequel
module Core
extend Forwardable
def self.prepended(base)
base.sinja do |c|
c.conflict_exceptions << ::Sequel::ConstraintViolation
c.not_found_exceptions << ::Sequel::NoMatchingRow
c.validation_exceptions << ::Sequel::ValidationFailed
c.validation_formatter = ->(e) { e.errors.keys.zip(e.errors.full_messages) }
end
base.prepend Pagination if ::Sequel::Model.db.dataset.respond_to?(:paginate)
end
def self.included(_)
abort "You must `prepend' Sinja::Sequel::Core, not `include' it!"
end
def_delegator ::Sequel::Model, :db, :database
def_delegator :database, :transaction
define_method :filter, proc(&:where)
def sort(collection, fields)
collection.order(*fields.map { |k, v| ::Sequel.send(v, k) })
end
define_method :finalize, proc(&:all)
def validate!
raise ::Sequel::ValidationFailed, resource unless resource.valid?
end
end
end
end
## Instruction:
Enhance validation formatter to indicate relationships
## Code After:
require 'forwardable'
require 'sequel'
require_relative 'pagination'
module Sinja
module Sequel
module Core
extend Forwardable
def self.prepended(base)
base.sinja do |c|
c.conflict_exceptions << ::Sequel::ConstraintViolation
c.not_found_exceptions << ::Sequel::NoMatchingRow
c.validation_exceptions << ::Sequel::ValidationFailed
c.validation_formatter = proc do |e|
lookup = e.model.class.associations.to_set
e.errors.keys.zip(e.errors.full_messages)
.map { |a| a << :relationships if lookup.include?(a.first) }
end
end
base.prepend Pagination if ::Sequel::Model.db.dataset.respond_to?(:paginate)
end
def self.included(_)
abort "You must `prepend' Sinja::Sequel::Core, not `include' it!"
end
def_delegator ::Sequel::Model, :db, :database
def_delegator :database, :transaction
define_method :filter, proc(&:where)
def sort(collection, fields)
collection.order(*fields.map { |k, v| ::Sequel.send(v, k) })
end
define_method :finalize, proc(&:all)
def validate!
raise ::Sequel::ValidationFailed, resource unless resource.valid?
end
end
end
end
| require 'forwardable'
require 'sequel'
require_relative 'pagination'
module Sinja
module Sequel
module Core
extend Forwardable
def self.prepended(base)
base.sinja do |c|
c.conflict_exceptions << ::Sequel::ConstraintViolation
c.not_found_exceptions << ::Sequel::NoMatchingRow
c.validation_exceptions << ::Sequel::ValidationFailed
+ c.validation_formatter = proc do |e|
+ lookup = e.model.class.associations.to_set
- c.validation_formatter = ->(e) { e.errors.keys.zip(e.errors.full_messages) }
? ---------------------- --------- --
+ e.errors.keys.zip(e.errors.full_messages)
+ .map { |a| a << :relationships if lookup.include?(a.first) }
+ end
end
base.prepend Pagination if ::Sequel::Model.db.dataset.respond_to?(:paginate)
end
def self.included(_)
abort "You must `prepend' Sinja::Sequel::Core, not `include' it!"
end
def_delegator ::Sequel::Model, :db, :database
def_delegator :database, :transaction
define_method :filter, proc(&:where)
def sort(collection, fields)
collection.order(*fields.map { |k, v| ::Sequel.send(v, k) })
end
define_method :finalize, proc(&:all)
def validate!
raise ::Sequel::ValidationFailed, resource unless resource.valid?
end
end
end
end | 6 | 0.139535 | 5 | 1 |
ea0e29ebdf2649d2f88e13439951e03df0b80e72 | modules/gui/frontend/index.html | modules/gui/frontend/index.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>S E P A L</title>
</head>
<body class="border-on">
<!-- site loader -->
<div class="app-loader">
<span></span>
<p>S E P A L</p>
</div>
<!-- site loader -->
<main class="container-fluid site-main app">
</main>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta name="google-site-verification" content="n_oThWXQHxhmqrNjwFLpLvwr38QIIh1iYfC5IkZDJM8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>S E P A L</title>
</head>
<body class="border-on">
<!-- site loader -->
<div class="app-loader">
<span></span>
<p>S E P A L</p>
</div>
<!-- site loader -->
<main class="container-fluid site-main app">
</main>
</body>
</html>
| Add a meta tag to verify ownership with Google. | Add a meta tag to verify ownership with Google.
| HTML | mit | openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>S E P A L</title>
</head>
<body class="border-on">
<!-- site loader -->
<div class="app-loader">
<span></span>
<p>S E P A L</p>
</div>
<!-- site loader -->
<main class="container-fluid site-main app">
</main>
</body>
</html>
## Instruction:
Add a meta tag to verify ownership with Google.
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="google-site-verification" content="n_oThWXQHxhmqrNjwFLpLvwr38QIIh1iYfC5IkZDJM8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>S E P A L</title>
</head>
<body class="border-on">
<!-- site loader -->
<div class="app-loader">
<span></span>
<p>S E P A L</p>
</div>
<!-- site loader -->
<main class="container-fluid site-main app">
</main>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
+ <meta name="google-site-verification" content="n_oThWXQHxhmqrNjwFLpLvwr38QIIh1iYfC5IkZDJM8" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>S E P A L</title>
</head>
<body class="border-on">
<!-- site loader -->
<div class="app-loader">
<span></span>
<p>S E P A L</p>
</div>
<!-- site loader -->
<main class="container-fluid site-main app">
</main>
</body>
</html> | 1 | 0.045455 | 1 | 0 |
70815349764d2e7739e4ebcdd993d3a531c268cd | .travis.yml | .travis.yml | language: scala
sudo: false
cache:
directories:
- $HOME/.ivy2
- $HOME/spark
scala:
- 2.10.4
before_install:
- pip install --user codecov unittest2
script:
- "export SPARK_CONF_DIR=./log4j/"
- sbt compile test
- "[ -f spark] || mkdir spark && wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz && cd .."
- "tar -xvf ./spark/spark-1.6.1-bin-hadoop2.6.tgz"
- "export SPARK_HOME=`pwd`/spark-1.6.1-bin-hadoop2.6/"
- "export PYTHONPATH=$SPARK_HOME/python:`ls -1 $SPARK_HOME/python/lib/py4j-*-src.zip`:$PYTHONPATH"
- "nosetests --with-doctest --doctest-options=+ELLIPSIS --logging-level=INFO --detailed-errors --verbosity=2 --with-coverage --cover-html-dir=./htmlcov"
after_success:
# For now no coverage report
- codecov | language: scala
sudo: false
cache:
directories:
- $HOME/.ivy2
- $HOME/spark
- $HOME/.cache/pip
scala:
- 2.10.4
before_install:
- pip install --user codecov unittest2 nose pep8 pylint scipy pandas
script:
- "export SPARK_CONF_DIR=./log4j/"
- sbt compile test
- "[ -f spark] || mkdir spark && wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz && cd .."
- "tar -xvf ./spark/spark-1.6.1-bin-hadoop2.6.tgz"
- "export SPARK_HOME=`pwd`/spark-1.6.1-bin-hadoop2.6/"
- "export PYTHONPATH=$SPARK_HOME/python:`ls -1 $SPARK_HOME/python/lib/py4j-*-src.zip`:$PYTHONPATH"
- "nosetests --with-doctest --doctest-options=+ELLIPSIS --logging-level=INFO --detailed-errors --verbosity=2 --with-coverage --cover-html-dir=./htmlcov"
after_success:
# For now no coverage report
- codecov | Add more packages and cache them | Add more packages and cache them
| YAML | apache-2.0 | mahmoudhanafy/high-performance-spark-examples | yaml | ## Code Before:
language: scala
sudo: false
cache:
directories:
- $HOME/.ivy2
- $HOME/spark
scala:
- 2.10.4
before_install:
- pip install --user codecov unittest2
script:
- "export SPARK_CONF_DIR=./log4j/"
- sbt compile test
- "[ -f spark] || mkdir spark && wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz && cd .."
- "tar -xvf ./spark/spark-1.6.1-bin-hadoop2.6.tgz"
- "export SPARK_HOME=`pwd`/spark-1.6.1-bin-hadoop2.6/"
- "export PYTHONPATH=$SPARK_HOME/python:`ls -1 $SPARK_HOME/python/lib/py4j-*-src.zip`:$PYTHONPATH"
- "nosetests --with-doctest --doctest-options=+ELLIPSIS --logging-level=INFO --detailed-errors --verbosity=2 --with-coverage --cover-html-dir=./htmlcov"
after_success:
# For now no coverage report
- codecov
## Instruction:
Add more packages and cache them
## Code After:
language: scala
sudo: false
cache:
directories:
- $HOME/.ivy2
- $HOME/spark
- $HOME/.cache/pip
scala:
- 2.10.4
before_install:
- pip install --user codecov unittest2 nose pep8 pylint scipy pandas
script:
- "export SPARK_CONF_DIR=./log4j/"
- sbt compile test
- "[ -f spark] || mkdir spark && wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz && cd .."
- "tar -xvf ./spark/spark-1.6.1-bin-hadoop2.6.tgz"
- "export SPARK_HOME=`pwd`/spark-1.6.1-bin-hadoop2.6/"
- "export PYTHONPATH=$SPARK_HOME/python:`ls -1 $SPARK_HOME/python/lib/py4j-*-src.zip`:$PYTHONPATH"
- "nosetests --with-doctest --doctest-options=+ELLIPSIS --logging-level=INFO --detailed-errors --verbosity=2 --with-coverage --cover-html-dir=./htmlcov"
after_success:
# For now no coverage report
- codecov | language: scala
sudo: false
cache:
directories:
- $HOME/.ivy2
- $HOME/spark
+ - $HOME/.cache/pip
scala:
- 2.10.4
before_install:
- - pip install --user codecov unittest2
+ - pip install --user codecov unittest2 nose pep8 pylint scipy pandas
script:
- "export SPARK_CONF_DIR=./log4j/"
- sbt compile test
- "[ -f spark] || mkdir spark && wget http://d3kbcqa49mib13.cloudfront.net/spark-1.6.1-bin-hadoop2.6.tgz && cd .."
- "tar -xvf ./spark/spark-1.6.1-bin-hadoop2.6.tgz"
- "export SPARK_HOME=`pwd`/spark-1.6.1-bin-hadoop2.6/"
- "export PYTHONPATH=$SPARK_HOME/python:`ls -1 $SPARK_HOME/python/lib/py4j-*-src.zip`:$PYTHONPATH"
- "nosetests --with-doctest --doctest-options=+ELLIPSIS --logging-level=INFO --detailed-errors --verbosity=2 --with-coverage --cover-html-dir=./htmlcov"
after_success:
# For now no coverage report
- codecov | 3 | 0.142857 | 2 | 1 |
6bdd73cf50e2ca43d73a8edad0621c5a5160f3ee | core/ktx/RELEASING.md | core/ktx/RELEASING.md | Releasing
=========
1. Change the version in `build.gradle` to a non-SNAPSHOT version (e.g., `0.2-SNAPSHOT` -> `0.2`)
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
5. `./gradlew clean assemble`
6. Upload the ZIP in `build/distributions/` to Google's maven repository.
7. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
8. Update the `build.gradle` to the next SNAPSHOT version.
9. `git commit -am "Prepare next development version."`
10. `git push && git push --tags`
If step 5 or 6 fails, fix the problem, commit, and start again at step 5.
| Releasing
=========
1. Change the version in `build.gradle` to a non-SNAPSHOT version (e.g., `0.2-SNAPSHOT` -> `0.2`)
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
4. Copy `api/current.txt` to `api/X.Y.Z.txt`.
5. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
6. `./gradlew clean assemble`
7. Upload the ZIP in `build/distributions/` to Google's maven repository.
8. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
9. Update the `build.gradle` to the next SNAPSHOT version.
10. `git commit -am "Prepare next development version."`
11. `git push && git push --tags`
If step 5 or 6 fails, fix the problem, commit, and start again at step 5.
| Add copy API txt releasing step. | Add copy API txt releasing step.
| Markdown | apache-2.0 | androidx/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,AndroidX/androidx,androidx/androidx,androidx/androidx,AndroidX/androidx,androidx/androidx,AndroidX/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,androidx/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,androidx/androidx,AndroidX/androidx | markdown | ## Code Before:
Releasing
=========
1. Change the version in `build.gradle` to a non-SNAPSHOT version (e.g., `0.2-SNAPSHOT` -> `0.2`)
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
5. `./gradlew clean assemble`
6. Upload the ZIP in `build/distributions/` to Google's maven repository.
7. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
8. Update the `build.gradle` to the next SNAPSHOT version.
9. `git commit -am "Prepare next development version."`
10. `git push && git push --tags`
If step 5 or 6 fails, fix the problem, commit, and start again at step 5.
## Instruction:
Add copy API txt releasing step.
## Code After:
Releasing
=========
1. Change the version in `build.gradle` to a non-SNAPSHOT version (e.g., `0.2-SNAPSHOT` -> `0.2`)
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
4. Copy `api/current.txt` to `api/X.Y.Z.txt`.
5. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
6. `./gradlew clean assemble`
7. Upload the ZIP in `build/distributions/` to Google's maven repository.
8. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
9. Update the `build.gradle` to the next SNAPSHOT version.
10. `git commit -am "Prepare next development version."`
11. `git push && git push --tags`
If step 5 or 6 fails, fix the problem, commit, and start again at step 5.
| Releasing
=========
1. Change the version in `build.gradle` to a non-SNAPSHOT version (e.g., `0.2-SNAPSHOT` -> `0.2`)
2. Update the `CHANGELOG.md` for the impending release.
3. Update the `README.md` with the new version.
+ 4. Copy `api/current.txt` to `api/X.Y.Z.txt`.
- 4. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
? ^
+ 5. `git commit -am "Prepare for release X.Y.Z."` (where X.Y.Z is the new version)
? ^
- 5. `./gradlew clean assemble`
? ^
+ 6. `./gradlew clean assemble`
? ^
- 6. Upload the ZIP in `build/distributions/` to Google's maven repository.
? ^
+ 7. Upload the ZIP in `build/distributions/` to Google's maven repository.
? ^
- 7. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
? ^
+ 8. `git tag -a X.Y.X -m "Version X.Y.Z"` (where X.Y.Z is the new version)
? ^
- 8. Update the `build.gradle` to the next SNAPSHOT version.
? ^
+ 9. Update the `build.gradle` to the next SNAPSHOT version.
? ^
- 9. `git commit -am "Prepare next development version."`
? ^
+ 10. `git commit -am "Prepare next development version."`
? ^^
- 10. `git push && git push --tags`
? ^
+ 11. `git push && git push --tags`
? ^
If step 5 or 6 fails, fix the problem, commit, and start again at step 5. | 15 | 1 | 8 | 7 |
4ecac2ee3e9ecf40da64bb2439787467881f3812 | tests/defects.t | tests/defects.t | . tests/functions.sh
title "reported defects"
rc=0
MARKDOWN_FLAGS=
try 'masses of non-block html' \
'<span>foo</span><br>
<br>
<span>bar</span><br>' \
'<p><span>foo</span><br>
<br>
<span>bar</span><br></p>'
try -fautolink -G 'autolink + github-flavoured markdown' \
'http://foo
bar' \
'<p><a href="http://foo">http://foo</a><br/>
bar</p>'
summary $0
exit $rc
| . tests/functions.sh
title "reported defects"
rc=0
MARKDOWN_FLAGS=
try 'masses of non-block html' \
'<span>foo</span><br>
<br>
<span>bar</span><br>' \
'<p><span>foo</span><br>
<br>
<span>bar</span><br></p>'
try -fautolink -G 'autolink + github-flavoured markdown' \
'http://foo
bar' \
'<p><a href="http://foo">http://foo</a><br/>
bar</p>'
try 'unterminated <p> block' '<p></>*' '<p><p></>*</p>'
summary $0
exit $rc
| Add a test case for `<p></>*` | Add a test case for `<p></>*`
| Perl | bsd-3-clause | davidfstr/discount,davidfstr/discount,davidfstr/discount,davidfstr/discount | perl | ## Code Before:
. tests/functions.sh
title "reported defects"
rc=0
MARKDOWN_FLAGS=
try 'masses of non-block html' \
'<span>foo</span><br>
<br>
<span>bar</span><br>' \
'<p><span>foo</span><br>
<br>
<span>bar</span><br></p>'
try -fautolink -G 'autolink + github-flavoured markdown' \
'http://foo
bar' \
'<p><a href="http://foo">http://foo</a><br/>
bar</p>'
summary $0
exit $rc
## Instruction:
Add a test case for `<p></>*`
## Code After:
. tests/functions.sh
title "reported defects"
rc=0
MARKDOWN_FLAGS=
try 'masses of non-block html' \
'<span>foo</span><br>
<br>
<span>bar</span><br>' \
'<p><span>foo</span><br>
<br>
<span>bar</span><br></p>'
try -fautolink -G 'autolink + github-flavoured markdown' \
'http://foo
bar' \
'<p><a href="http://foo">http://foo</a><br/>
bar</p>'
try 'unterminated <p> block' '<p></>*' '<p><p></>*</p>'
summary $0
exit $rc
| . tests/functions.sh
title "reported defects"
rc=0
MARKDOWN_FLAGS=
try 'masses of non-block html' \
'<span>foo</span><br>
<br>
<span>bar</span><br>' \
'<p><span>foo</span><br>
<br>
<span>bar</span><br></p>'
try -fautolink -G 'autolink + github-flavoured markdown' \
'http://foo
bar' \
'<p><a href="http://foo">http://foo</a><br/>
bar</p>'
+ try 'unterminated <p> block' '<p></>*' '<p><p></>*</p>'
+
summary $0
exit $rc | 2 | 0.086957 | 2 | 0 |
1e2068eed58f951d518738d8b8ee0660cdaf6d8c | tox.ini | tox.ini | [tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
lint
[testenv]
commands = py.test {posargs}
extras = test
pip_pre = true
deps =
django111: django>=1.11,<2.0
django20: django>=2.0,<2.1
django21: django>=2.1
appdirs==1.4.3
py27: mock==2.0.0
[testenv:lint]
basepython = python3.6
deps =
flake8
commands =
flake8 django_migration_linter
| [tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
lint
[testenv]
commands = py.test {posargs}
extras = test
pip_pre = true
deps =
django111: django>=1.11,<2.0
django20: django>=2.0,<2.1
django21: django>=2.1
appdirs==1.4.3
py27: mock==2.0.0
[testenv:lint]
basepython = python3.6
deps =
flake8
black
commands =
flake8 --max-line-length=88 django_migration_linter
black --check django_migration_linter
| Add black to lint tests and increase line length for flake8 | Add black to lint tests and increase line length for flake8
| INI | apache-2.0 | 3YOURMIND/django-migration-linter | ini | ## Code Before:
[tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
lint
[testenv]
commands = py.test {posargs}
extras = test
pip_pre = true
deps =
django111: django>=1.11,<2.0
django20: django>=2.0,<2.1
django21: django>=2.1
appdirs==1.4.3
py27: mock==2.0.0
[testenv:lint]
basepython = python3.6
deps =
flake8
commands =
flake8 django_migration_linter
## Instruction:
Add black to lint tests and increase line length for flake8
## Code After:
[tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
lint
[testenv]
commands = py.test {posargs}
extras = test
pip_pre = true
deps =
django111: django>=1.11,<2.0
django20: django>=2.0,<2.1
django21: django>=2.1
appdirs==1.4.3
py27: mock==2.0.0
[testenv:lint]
basepython = python3.6
deps =
flake8
black
commands =
flake8 --max-line-length=88 django_migration_linter
black --check django_migration_linter
| [tox]
envlist =
py{27,34,35,36,37}-django111
py{34,35,36,37}-django20
py{35,36,37}-django21
lint
[testenv]
commands = py.test {posargs}
extras = test
pip_pre = true
deps =
django111: django>=1.11,<2.0
django20: django>=2.0,<2.1
django21: django>=2.1
appdirs==1.4.3
py27: mock==2.0.0
[testenv:lint]
basepython = python3.6
deps =
flake8
+ black
commands =
+ flake8 --max-line-length=88 django_migration_linter
- flake8 django_migration_linter
? ^ ^
+ black --check django_migration_linter
? ^ + +++++ ^^
| 4 | 0.166667 | 3 | 1 |
11b39e6708ca9d70caf374a52eae308537a20b3d | deploy/gradientzoo-web-deployment.yml | deploy/gradientzoo-web-deployment.yml | apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gradientzoo-web-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: gradientzoo-web
spec:
containers:
- name: gradientzoo-web
image: gcr.io/gradientzoo-1233/gradientzoo-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: GOOGLE_ANALYTICS_ID
valueFrom:
secretKeyRef:
name: google-analytics
key: id | apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gradientzoo-web-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: gradientzoo-web
spec:
containers:
- name: gradientzoo-web
image: gcr.io/gradientzoo-1233/gradientzoo-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000 | Remove kube reference to GOOGLE_ANALYTICS_ID | Remove kube reference to GOOGLE_ANALYTICS_ID
| YAML | bsd-3-clause | gradientzoo/gradientzoo,gradientzoo/gradientzoo,gradientzoo/gradientzoo,gradientzoo/gradientzoo | yaml | ## Code Before:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gradientzoo-web-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: gradientzoo-web
spec:
containers:
- name: gradientzoo-web
image: gcr.io/gradientzoo-1233/gradientzoo-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: GOOGLE_ANALYTICS_ID
valueFrom:
secretKeyRef:
name: google-analytics
key: id
## Instruction:
Remove kube reference to GOOGLE_ANALYTICS_ID
## Code After:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gradientzoo-web-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: gradientzoo-web
spec:
containers:
- name: gradientzoo-web
image: gcr.io/gradientzoo-1233/gradientzoo-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000 | apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gradientzoo-web-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: gradientzoo-web
spec:
containers:
- name: gradientzoo-web
image: gcr.io/gradientzoo-1233/gradientzoo-web:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
- env:
- - name: GOOGLE_ANALYTICS_ID
- valueFrom:
- secretKeyRef:
- name: google-analytics
- key: id | 6 | 0.26087 | 0 | 6 |
d6adbc8e1297127b6eb3e5008fa97f2509647ab0 | lib/and-son/connection.rb | lib/and-son/connection.rb | require 'socket'
require 'sanford-protocol'
module AndSon
class Connection < Struct.new(:host, :port)
module NoRequest
def self.to_s; "[?]"; end
end
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
protocol_connection.close
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford
# communication, we have all the information we need to send up front and
# are closing the connection, so it doesn't need to buffer.
# See http://linux.die.net/man/7/tcp
def tcp_socket
TCPSocket.new(host, port).tap do |socket|
socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
end
end
end
| require 'socket'
require 'sanford-protocol'
module AndSon
class Connection < Struct.new(:host, :port)
module NoRequest
def self.to_s; "[?]"; end
end
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
protocol_connection.close if protocol_connection
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford
# communication, we have all the information we need to send up front and
# are closing the connection, so it doesn't need to buffer.
# See http://linux.die.net/man/7/tcp
def tcp_socket
TCPSocket.new(host, port).tap do |socket|
socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
end
end
end
| Stop confusing exception when AndSon can't bind to a server | Stop confusing exception when AndSon can't bind to a server
Previously, we were getting an `NoMethodError` for `close` on the
connection (because it could never make a connection) when a
client couldn't bind. This fixes that by making sure protocol
connection has been set before trying to close it. With this, you
will get an exception like: `Errno::ECONNREFUSED`, which is
the normal exception for the problem.
Fixes #13
| Ruby | mit | redding/and-son | ruby | ## Code Before:
require 'socket'
require 'sanford-protocol'
module AndSon
class Connection < Struct.new(:host, :port)
module NoRequest
def self.to_s; "[?]"; end
end
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
protocol_connection.close
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford
# communication, we have all the information we need to send up front and
# are closing the connection, so it doesn't need to buffer.
# See http://linux.die.net/man/7/tcp
def tcp_socket
TCPSocket.new(host, port).tap do |socket|
socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
end
end
end
## Instruction:
Stop confusing exception when AndSon can't bind to a server
Previously, we were getting an `NoMethodError` for `close` on the
connection (because it could never make a connection) when a
client couldn't bind. This fixes that by making sure protocol
connection has been set before trying to close it. With this, you
will get an exception like: `Errno::ECONNREFUSED`, which is
the normal exception for the problem.
Fixes #13
## Code After:
require 'socket'
require 'sanford-protocol'
module AndSon
class Connection < Struct.new(:host, :port)
module NoRequest
def self.to_s; "[?]"; end
end
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
protocol_connection.close if protocol_connection
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford
# communication, we have all the information we need to send up front and
# are closing the connection, so it doesn't need to buffer.
# See http://linux.die.net/man/7/tcp
def tcp_socket
TCPSocket.new(host, port).tap do |socket|
socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
end
end
end
| require 'socket'
require 'sanford-protocol'
module AndSon
class Connection < Struct.new(:host, :port)
module NoRequest
def self.to_s; "[?]"; end
end
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
- protocol_connection.close
+ protocol_connection.close if protocol_connection
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford
# communication, we have all the information we need to send up front and
# are closing the connection, so it doesn't need to buffer.
# See http://linux.die.net/man/7/tcp
def tcp_socket
TCPSocket.new(host, port).tap do |socket|
socket.setsockopt(::Socket::IPPROTO_TCP, ::Socket::TCP_NODELAY, true)
end
end
end
end | 2 | 0.060606 | 1 | 1 |
563e57bcd0bb7cbebc62443fc66bdcc86d8f2e5c | README.md | README.md |
- Peter
- Doug
- Luke
- Alex
17/04/2017 - hope to setup OAuth
|
To run in docker run: `docker-compose up` and then hit `http://localhost:8080`. Yay!
## Contributors
- Peter
- Doug
- Luke
- Alex
17/04/2017 - hope to setup OAuth
| Add note on how to bring up dockerised instance. | Add note on how to bring up dockerised instance.
| Markdown | mit | codehackdays/HelloWorld | markdown | ## Code Before:
- Peter
- Doug
- Luke
- Alex
17/04/2017 - hope to setup OAuth
## Instruction:
Add note on how to bring up dockerised instance.
## Code After:
To run in docker run: `docker-compose up` and then hit `http://localhost:8080`. Yay!
## Contributors
- Peter
- Doug
- Luke
- Alex
17/04/2017 - hope to setup OAuth
| +
+ To run in docker run: `docker-compose up` and then hit `http://localhost:8080`. Yay!
+
+ ## Contributors
- Peter
- Doug
- Luke
- Alex
17/04/2017 - hope to setup OAuth | 4 | 0.571429 | 4 | 0 |
a0731d5cfc7a80a2750dff7b1f3b56d4b04699ef | app/models/Event.coffee | app/models/Event.coffee | Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, owningLevel, settings
onTouchBegin: (body, point, impulse) =>
if @name == 'FirstYeti'
@name = ''
@level.tasks.push =>
yeti =
name: 'Yeti'
type: 'Yeti'
x: 16*32
y: 16
width: 32
height: 32
properties: {
}
@level.addEntity yeti
mediator.soundManager.stopAll()
mediator.soundManager.playSound @level.manifest.sounds.sounds[0], 1, true
| Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, owningLevel, settings
onTouchBegin: (body, point, impulse) =>
if @name == 'FirstYeti'
@name = ''
@level.tasks.push =>
yeti =
name: 'Yeti'
type: 'Yeti'
x: 16*32
y: 16
width: 32
height: 32
properties: {
}
@level.addEntity yeti
mediator.soundManager.stopAll config =
themeSound: true
backgroundSounds: true
mediator.soundManager.playSound @level.manifest.sounds.sounds[0], 1, true
| Update event to use new SoundManager.stopAll(config) | Update event to use new SoundManager.stopAll(config) | CoffeeScript | apache-2.0 | despairblue/shiny-wight | coffeescript | ## Code Before:
Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, owningLevel, settings
onTouchBegin: (body, point, impulse) =>
if @name == 'FirstYeti'
@name = ''
@level.tasks.push =>
yeti =
name: 'Yeti'
type: 'Yeti'
x: 16*32
y: 16
width: 32
height: 32
properties: {
}
@level.addEntity yeti
mediator.soundManager.stopAll()
mediator.soundManager.playSound @level.manifest.sounds.sounds[0], 1, true
## Instruction:
Update event to use new SoundManager.stopAll(config)
## Code After:
Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, owningLevel, settings
onTouchBegin: (body, point, impulse) =>
if @name == 'FirstYeti'
@name = ''
@level.tasks.push =>
yeti =
name: 'Yeti'
type: 'Yeti'
x: 16*32
y: 16
width: 32
height: 32
properties: {
}
@level.addEntity yeti
mediator.soundManager.stopAll config =
themeSound: true
backgroundSounds: true
mediator.soundManager.playSound @level.manifest.sounds.sounds[0], 1, true
| Entity = require 'models/Entity'
mediator = require 'mediator'
module.exports = class Event extends Entity
mediator.factory['Event'] = this
constructor: (x, y, width, height, owningLevel, settings) ->
# settings.physicsType = 'static'
# settings.isSensor = true
super x, y, width, height, owningLevel, settings
onTouchBegin: (body, point, impulse) =>
if @name == 'FirstYeti'
@name = ''
@level.tasks.push =>
yeti =
name: 'Yeti'
type: 'Yeti'
x: 16*32
y: 16
width: 32
height: 32
properties: {
}
@level.addEntity yeti
- mediator.soundManager.stopAll()
? ^^
+ mediator.soundManager.stopAll config =
? ^^^^^^^^^
+ themeSound: true
+ backgroundSounds: true
+
mediator.soundManager.playSound @level.manifest.sounds.sounds[0], 1, true | 5 | 0.151515 | 4 | 1 |
87b3702ceb0c55a73e51a9c784a764ae8c8fced0 | bower.json | bower.json | {
"name": "js-sequence-diagrams",
"version": "1.0.6",
"authors": "Andrew Brampton (bramp.net)",
"description": "Generates UML sequence diagrams from simple text",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"main": "build/sequence-diagram-min.js",
"keywords": [
"uml",
"sequence",
"diagram"
],
"license": "BSD",
"readmeFilename": "README.md",
"ignore": [
".*",
"_site",
"node_modules",
"bower_components"
],
"dependencies": {
"underscore": "~1.4.x",
"raphael": "~2.1.x"
},
"//" : "Must also install jspp",
"devDependencies": {
"qunit": "1.11.x",
"lodash": "3.8.x",
"jquery": "1.8.x"
},
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/bramp/js-sequence-diagrams.git"
}
}
| {
"name": "js-sequence-diagrams",
"version": "1.0.6",
"authors": "Andrew Brampton (bramp.net)",
"description": "Generates UML sequence diagrams from simple text",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"main": "build/sequence-diagram-min.js",
"namespace": "Diagram",
"keywords": [
"uml",
"sequence",
"diagram"
],
"license": "BSD",
"readmeFilename": "README.md",
"ignore": [
".*",
"_site",
"node_modules",
"bower_components"
],
"dependencies": {
"underscore": "~1.4.x",
"raphael": "~2.1.x"
},
"//" : "Must also install jspp",
"devDependencies": {
"qunit": "1.11.x",
"lodash": "3.8.x",
"jquery": "1.8.x"
},
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/bramp/js-sequence-diagrams.git"
}
}
| Define the namespace of the library (Diagram). | Define the namespace of the library (Diagram).
| JSON | bsd-2-clause | kdoore/js-sequence-diagrams,blademainer/js-sequence-diagrams,kdoore/js-sequence-diagrams,gskielian/js-sequence-diagrams,mcanthony/js-sequence-diagrams,landongn/js-sequence-diagrams,durai145/js-sequence-diagrams,ryukenzen/js-sequence-diagrams,zartata/js-sequence-diagrams,ancchaimongkon/js-sequence-diagrams,pwagland/js-sequence-diagrams,gskielian/js-sequence-diagrams,raboof/js-sequence-diagrams,gdseller/js-sequence-diagrams,ddtxra/js-sequence-diagrams,pingjiang/js-sequence-diagrams,bramp/js-sequence-diagrams,pmelisko/js-sequence-diagrams,soswow/js-sequence-diagrams,pingjiang/js-sequence-diagrams,carabina/js-sequence-diagrams,StefRave/js-sequence-diagrams,ryukenzen/js-sequence-diagrams,zartata/js-sequence-diagrams,gratex/js-sequence-diagrams,blademainer/js-sequence-diagrams,carabina/js-sequence-diagrams,gratex/js-sequence-diagrams,egorko/js-sequence-diagrams,egorko/js-sequence-diagrams,bitwerk/js-sequence-diagrams,hyipworld/js-sequence-diagrams,webmechanicx/js-sequence-diagrams,raboof/js-sequence-diagrams,StefRave/js-sequence-diagrams,hcharts/js-sequence-diagrams,webmechanicx/js-sequence-diagrams,ddtxra/js-sequence-diagrams,mcanthony/js-sequence-diagrams,hcharts/js-sequence-diagrams,bramp/js-sequence-diagrams,jmarsican/js-sequence-diagrams,jmarsican/js-sequence-diagrams,landongn/js-sequence-diagrams,ancchaimongkon/js-sequence-diagrams,gdseller/js-sequence-diagrams,pmelisko/js-sequence-diagrams,lucianmat/js-sequence-diagrams,pwagland/js-sequence-diagrams,lucianmat/js-sequence-diagrams,hyipworld/js-sequence-diagrams,soswow/js-sequence-diagrams,bitwerk/js-sequence-diagrams,durai145/js-sequence-diagrams | json | ## Code Before:
{
"name": "js-sequence-diagrams",
"version": "1.0.6",
"authors": "Andrew Brampton (bramp.net)",
"description": "Generates UML sequence diagrams from simple text",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"main": "build/sequence-diagram-min.js",
"keywords": [
"uml",
"sequence",
"diagram"
],
"license": "BSD",
"readmeFilename": "README.md",
"ignore": [
".*",
"_site",
"node_modules",
"bower_components"
],
"dependencies": {
"underscore": "~1.4.x",
"raphael": "~2.1.x"
},
"//" : "Must also install jspp",
"devDependencies": {
"qunit": "1.11.x",
"lodash": "3.8.x",
"jquery": "1.8.x"
},
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/bramp/js-sequence-diagrams.git"
}
}
## Instruction:
Define the namespace of the library (Diagram).
## Code After:
{
"name": "js-sequence-diagrams",
"version": "1.0.6",
"authors": "Andrew Brampton (bramp.net)",
"description": "Generates UML sequence diagrams from simple text",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"main": "build/sequence-diagram-min.js",
"namespace": "Diagram",
"keywords": [
"uml",
"sequence",
"diagram"
],
"license": "BSD",
"readmeFilename": "README.md",
"ignore": [
".*",
"_site",
"node_modules",
"bower_components"
],
"dependencies": {
"underscore": "~1.4.x",
"raphael": "~2.1.x"
},
"//" : "Must also install jspp",
"devDependencies": {
"qunit": "1.11.x",
"lodash": "3.8.x",
"jquery": "1.8.x"
},
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/bramp/js-sequence-diagrams.git"
}
}
| {
"name": "js-sequence-diagrams",
"version": "1.0.6",
"authors": "Andrew Brampton (bramp.net)",
"description": "Generates UML sequence diagrams from simple text",
"homepage": "http://bramp.github.io/js-sequence-diagrams/",
"main": "build/sequence-diagram-min.js",
+ "namespace": "Diagram",
"keywords": [
"uml",
"sequence",
"diagram"
],
"license": "BSD",
"readmeFilename": "README.md",
"ignore": [
".*",
"_site",
"node_modules",
"bower_components"
],
"dependencies": {
"underscore": "~1.4.x",
"raphael": "~2.1.x"
},
"//" : "Must also install jspp",
"devDependencies": {
"qunit": "1.11.x",
"lodash": "3.8.x",
"jquery": "1.8.x"
},
"scripts": {
"test": "make test"
},
"repository": {
"type": "git",
"url": "git://github.com/bramp/js-sequence-diagrams.git"
}
} | 1 | 0.026316 | 1 | 0 |
16aa537ff01ff36c5ff3f2de9beaf45ec2d93823 | setup.py | setup.py | from __future__ import absolute_import
import sys
from setuptools import setup
_PY2 = sys.version_info.major == 2
# add __version__, __author__, __authoremail__, __description__ to this namespace
# equivalent to:
if _PY2:
execfile("./dimod/package_info.py")
else:
exec(open("./dimod/package_info.py").read())
install_requires = ['decorator==4.1.2',
'enum34==1.1.6']
tests_require = ['numpy']
extras_require = {'tests': tests_require,
'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'],
'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require
)
| from __future__ import absolute_import
import sys
from setuptools import setup
_PY2 = sys.version_info.major == 2
# add __version__, __author__, __authoremail__, __description__ to this namespace
# equivalent to:
if _PY2:
execfile("./dimod/package_info.py")
else:
exec(open("./dimod/package_info.py").read())
install_requires = ['decorator==4.1.2',
'enum34==1.1.6']
tests_require = ['numpy==1.13.3',
'networkx==2.0']
extras_require = {'tests': tests_require,
'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'],
'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require
)
| Add networkx to test dependencies | Add networkx to test dependencies
| Python | apache-2.0 | oneklc/dimod,oneklc/dimod | python | ## Code Before:
from __future__ import absolute_import
import sys
from setuptools import setup
_PY2 = sys.version_info.major == 2
# add __version__, __author__, __authoremail__, __description__ to this namespace
# equivalent to:
if _PY2:
execfile("./dimod/package_info.py")
else:
exec(open("./dimod/package_info.py").read())
install_requires = ['decorator==4.1.2',
'enum34==1.1.6']
tests_require = ['numpy']
extras_require = {'tests': tests_require,
'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'],
'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require
)
## Instruction:
Add networkx to test dependencies
## Code After:
from __future__ import absolute_import
import sys
from setuptools import setup
_PY2 = sys.version_info.major == 2
# add __version__, __author__, __authoremail__, __description__ to this namespace
# equivalent to:
if _PY2:
execfile("./dimod/package_info.py")
else:
exec(open("./dimod/package_info.py").read())
install_requires = ['decorator==4.1.2',
'enum34==1.1.6']
tests_require = ['numpy==1.13.3',
'networkx==2.0']
extras_require = {'tests': tests_require,
'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'],
'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require
)
| from __future__ import absolute_import
import sys
from setuptools import setup
_PY2 = sys.version_info.major == 2
# add __version__, __author__, __authoremail__, __description__ to this namespace
# equivalent to:
if _PY2:
execfile("./dimod/package_info.py")
else:
exec(open("./dimod/package_info.py").read())
install_requires = ['decorator==4.1.2',
'enum34==1.1.6']
- tests_require = ['numpy']
? ^
+ tests_require = ['numpy==1.13.3',
? ++++++++ ^
+ 'networkx==2.0']
extras_require = {'tests': tests_require,
'docs': ['sphinx', 'sphinx_rtd_theme', 'recommonmark'],
'all': ['numpy']}
packages = ['dimod',
'dimod.responses',
'dimod.composites',
'dimod.samplers']
setup(
name='dimod',
version=__version__,
author=__author__,
author_email=__authoremail__,
description=__description__,
url='https://github.com/dwavesystems/dimod',
download_url='https://github.com/dwavesys/dimod/archive/0.1.1.tar.gz',
license='Apache 2.0',
packages=packages,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require
) | 3 | 0.073171 | 2 | 1 |
48a42ea39669a867a7d9928daf5156e80b9800cf | boardinghouse/sql/protect_schema_column.sql | boardinghouse/sql/protect_schema_column.sql | -- Trigger function that will, at the database level, prevent
-- anyone changing the boardinghouse_schema.schema value for
-- a saved schema.
CREATE OR REPLACE FUNCTION reject_schema_column_change() RETURNS TRIGGER AS $$
BEGIN
RAISE EXCEPTION 'Schema % cannot be renamed', OLD.schema;
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
IF NOT EXISTS(
SELECT * FROM information_schema.triggers
WHERE event_object_table = 'boardinghouse_schema'
AND trigger_name = 'protect_boardinghouse_schema_column'
) AND EXISTS(
SELECT * FROM information_schema.tables
WHERE table_name = 'boardinghouse_schema'
AND table_schema = 'public'
)THEN
CREATE TRIGGER protect_boardinghouse_schema_column
BEFORE UPDATE OF schema ON public.boardinghouse_schema
FOR EACH ROW
WHEN (OLD.schema IS DISTINCT FROM NEW.schema)
EXECUTE PROCEDURE reject_schema_column_change();
END IF;
END;
$$ | -- Trigger function that will, at the database level, prevent
-- anyone changing the boardinghouse_schema.schema value for
-- a saved schema.
CREATE OR REPLACE FUNCTION reject_schema_column_change() RETURNS TRIGGER AS $$
BEGIN
RAISE EXCEPTION 'Schema cannot be renamed' USING HINT = OLD.schema;
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
IF NOT EXISTS(
SELECT * FROM information_schema.triggers
WHERE event_object_table = 'boardinghouse_schema'
AND trigger_name = 'protect_boardinghouse_schema_column'
) AND EXISTS(
SELECT * FROM information_schema.tables
WHERE table_name = 'boardinghouse_schema'
AND table_schema = 'public'
)THEN
CREATE TRIGGER protect_boardinghouse_schema_column
BEFORE UPDATE OF schema ON public.boardinghouse_schema
FOR EACH ROW
WHEN (OLD.schema IS DISTINCT FROM NEW.schema)
EXECUTE PROCEDURE reject_schema_column_change();
END IF;
END;
$$
| Raise database-level exception on schema name change. | Raise database-level exception on schema name change.
| SQL | bsd-3-clause | luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse | sql | ## Code Before:
-- Trigger function that will, at the database level, prevent
-- anyone changing the boardinghouse_schema.schema value for
-- a saved schema.
CREATE OR REPLACE FUNCTION reject_schema_column_change() RETURNS TRIGGER AS $$
BEGIN
RAISE EXCEPTION 'Schema % cannot be renamed', OLD.schema;
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
IF NOT EXISTS(
SELECT * FROM information_schema.triggers
WHERE event_object_table = 'boardinghouse_schema'
AND trigger_name = 'protect_boardinghouse_schema_column'
) AND EXISTS(
SELECT * FROM information_schema.tables
WHERE table_name = 'boardinghouse_schema'
AND table_schema = 'public'
)THEN
CREATE TRIGGER protect_boardinghouse_schema_column
BEFORE UPDATE OF schema ON public.boardinghouse_schema
FOR EACH ROW
WHEN (OLD.schema IS DISTINCT FROM NEW.schema)
EXECUTE PROCEDURE reject_schema_column_change();
END IF;
END;
$$
## Instruction:
Raise database-level exception on schema name change.
## Code After:
-- Trigger function that will, at the database level, prevent
-- anyone changing the boardinghouse_schema.schema value for
-- a saved schema.
CREATE OR REPLACE FUNCTION reject_schema_column_change() RETURNS TRIGGER AS $$
BEGIN
RAISE EXCEPTION 'Schema cannot be renamed' USING HINT = OLD.schema;
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
IF NOT EXISTS(
SELECT * FROM information_schema.triggers
WHERE event_object_table = 'boardinghouse_schema'
AND trigger_name = 'protect_boardinghouse_schema_column'
) AND EXISTS(
SELECT * FROM information_schema.tables
WHERE table_name = 'boardinghouse_schema'
AND table_schema = 'public'
)THEN
CREATE TRIGGER protect_boardinghouse_schema_column
BEFORE UPDATE OF schema ON public.boardinghouse_schema
FOR EACH ROW
WHEN (OLD.schema IS DISTINCT FROM NEW.schema)
EXECUTE PROCEDURE reject_schema_column_change();
END IF;
END;
$$
| -- Trigger function that will, at the database level, prevent
-- anyone changing the boardinghouse_schema.schema value for
-- a saved schema.
CREATE OR REPLACE FUNCTION reject_schema_column_change() RETURNS TRIGGER AS $$
BEGIN
- RAISE EXCEPTION 'Schema % cannot be renamed', OLD.schema;
? -- ^
+ RAISE EXCEPTION 'Schema cannot be renamed' USING HINT = OLD.schema;
? ^^^^^^^^^^^^^
END;
$$ LANGUAGE plpgsql;
DO $$
BEGIN
IF NOT EXISTS(
SELECT * FROM information_schema.triggers
WHERE event_object_table = 'boardinghouse_schema'
AND trigger_name = 'protect_boardinghouse_schema_column'
) AND EXISTS(
SELECT * FROM information_schema.tables
WHERE table_name = 'boardinghouse_schema'
AND table_schema = 'public'
)THEN
CREATE TRIGGER protect_boardinghouse_schema_column
BEFORE UPDATE OF schema ON public.boardinghouse_schema
FOR EACH ROW
WHEN (OLD.schema IS DISTINCT FROM NEW.schema)
EXECUTE PROCEDURE reject_schema_column_change();
END IF;
END;
$$ | 2 | 0.068966 | 1 | 1 |
cc67c76d396127827ab0997c79bac49b679275de | biicode.cmake | biicode.cmake | IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
ELSEIF (WIN32 OR UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(APPLE)
ADD_BII_TARGETS()
| IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
ELSEIF (WIN32 OR UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(APPLE)
SET(BII_LIB_TYPE SHARED)
ADD_BII_TARGETS()
| Make Bii generate dynamic library | Make Bii generate dynamic library
| CMake | mit | zhangsu/ccspec,zhangsu/ccspec,zhangsu/ccspec | cmake | ## Code Before:
IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
ELSEIF (WIN32 OR UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(APPLE)
ADD_BII_TARGETS()
## Instruction:
Make Bii generate dynamic library
## Code After:
IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
ELSEIF (WIN32 OR UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(APPLE)
SET(BII_LIB_TYPE SHARED)
ADD_BII_TARGETS()
| IF(APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
ELSEIF (WIN32 OR UNIX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(APPLE)
+ SET(BII_LIB_TYPE SHARED)
+
ADD_BII_TARGETS() | 2 | 0.285714 | 2 | 0 |
da46f2bc341c3b8f443d0ce8b5b574c713cd3be4 | test/expected/query--77.0131,38.8829.json | test/expected/query--77.0131,38.8829.json | [
{
"id": 60,
"attributes": {
"FeatureCla": "Coastline",
"Note": "",
"ScaleRank": 0
}
}
] | [
{
"id": 60,
"distance": 4525.324054772856,
"layer": "coastline",
"attributes": {
"FeatureCla": "Coastline",
"Note": "",
"ScaleRank": 0
}
}
] | Update query results to reflect mapnik 1.4.3. | Update query results to reflect mapnik 1.4.3.
| JSON | bsd-3-clause | mapbox/tilelive-vector,nyurik/kartotherian,nyurik/tilelive-vector,kartotherian/kartotherian,kartotherian/kartotherian,kartotherian/kartotherian,nyurik/kartotherian,nyurik/kartotherian,kartotherian/kartotherian,nyurik/kartotherian,jaredbrookswhite/tilelive-vector | json | ## Code Before:
[
{
"id": 60,
"attributes": {
"FeatureCla": "Coastline",
"Note": "",
"ScaleRank": 0
}
}
]
## Instruction:
Update query results to reflect mapnik 1.4.3.
## Code After:
[
{
"id": 60,
"distance": 4525.324054772856,
"layer": "coastline",
"attributes": {
"FeatureCla": "Coastline",
"Note": "",
"ScaleRank": 0
}
}
] | [
{
"id": 60,
+ "distance": 4525.324054772856,
+ "layer": "coastline",
"attributes": {
"FeatureCla": "Coastline",
"Note": "",
"ScaleRank": 0
}
}
] | 2 | 0.2 | 2 | 0 |
009f16c8ff737c66c000af733071bf0ef0e7afa5 | static/codebook_rnet.csv | static/codebook_rnet.csv | bicycle,No. between-zone cyclists using this segment in Census 2011 (see model output tab for details of selected between-zone flows)
govtarget_slc,No. between-zone cyclists using this segment in Government Target scenario (see model output tab for details of selected between-zone flows)
gendereq_slc,No. between-zone cyclists using this segment in Gender Equity scenario (see model output tab for details of selected between-zone flows)
dutch_slc,No. between-zone cyclists using this segment in Go Dutch scenario (see model output tab for details of selected between-zone flows)
ebike_slc,No. between-zone cyclists using this segment in Ebikes scenario (see model output tab for details of selected between-zone flows)
Singlezone,Flag identifying whether the segment is fully contained in a single zone (1=yes): if so then there may also be considerable numbers of within-zone cyclists on the segment
| Variable name,Variable Description
bicycle,No. between-zone cyclists using this segment in Census 2011 (see model output tab for details of selected between-zone flows)
govtarget_slc,No. between-zone cyclists using this segment in Government Target scenario (see model output tab for details of selected between-zone flows)
gendereq_slc,No. between-zone cyclists using this segment in Gender Equity scenario (see model output tab for details of selected between-zone flows)
dutch_slc,No. between-zone cyclists using this segment in Go Dutch scenario (see model output tab for details of selected between-zone flows)
ebike_slc,No. between-zone cyclists using this segment in Ebikes scenario (see model output tab for details of selected between-zone flows)
Singlezone,Flag identifying whether the segment is fully contained in a single zone (1=yes): if so then there may also be considerable numbers of within-zone cyclists on the segment
| Update rnet's codebook (file was missing headers) | Update rnet's codebook (file was missing headers)
| CSV | agpl-3.0 | npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny | csv | ## Code Before:
bicycle,No. between-zone cyclists using this segment in Census 2011 (see model output tab for details of selected between-zone flows)
govtarget_slc,No. between-zone cyclists using this segment in Government Target scenario (see model output tab for details of selected between-zone flows)
gendereq_slc,No. between-zone cyclists using this segment in Gender Equity scenario (see model output tab for details of selected between-zone flows)
dutch_slc,No. between-zone cyclists using this segment in Go Dutch scenario (see model output tab for details of selected between-zone flows)
ebike_slc,No. between-zone cyclists using this segment in Ebikes scenario (see model output tab for details of selected between-zone flows)
Singlezone,Flag identifying whether the segment is fully contained in a single zone (1=yes): if so then there may also be considerable numbers of within-zone cyclists on the segment
## Instruction:
Update rnet's codebook (file was missing headers)
## Code After:
Variable name,Variable Description
bicycle,No. between-zone cyclists using this segment in Census 2011 (see model output tab for details of selected between-zone flows)
govtarget_slc,No. between-zone cyclists using this segment in Government Target scenario (see model output tab for details of selected between-zone flows)
gendereq_slc,No. between-zone cyclists using this segment in Gender Equity scenario (see model output tab for details of selected between-zone flows)
dutch_slc,No. between-zone cyclists using this segment in Go Dutch scenario (see model output tab for details of selected between-zone flows)
ebike_slc,No. between-zone cyclists using this segment in Ebikes scenario (see model output tab for details of selected between-zone flows)
Singlezone,Flag identifying whether the segment is fully contained in a single zone (1=yes): if so then there may also be considerable numbers of within-zone cyclists on the segment
| + Variable name,Variable Description
bicycle,No. between-zone cyclists using this segment in Census 2011 (see model output tab for details of selected between-zone flows)
govtarget_slc,No. between-zone cyclists using this segment in Government Target scenario (see model output tab for details of selected between-zone flows)
gendereq_slc,No. between-zone cyclists using this segment in Gender Equity scenario (see model output tab for details of selected between-zone flows)
dutch_slc,No. between-zone cyclists using this segment in Go Dutch scenario (see model output tab for details of selected between-zone flows)
ebike_slc,No. between-zone cyclists using this segment in Ebikes scenario (see model output tab for details of selected between-zone flows)
Singlezone,Flag identifying whether the segment is fully contained in a single zone (1=yes): if so then there may also be considerable numbers of within-zone cyclists on the segment | 1 | 0.166667 | 1 | 0 |
bc5795b296f1f9ba2e8854e358247e527868a7c5 | renovate.json | renovate.json | {
"extends": [
"config:base"
],
"packageRules": [
{
"groupSlug": "all",
"packagePatterns": ["*"],
"allowedVersions": "!/^(?i).*[-_\\.](Alpha|Beta|RC|M|EA|Snap|snapshot|jboss|atlassian)[-_\\.]?[0-9]?.*$/",
"groupName": "all dependencies"
}
]
}
| {
"extends": [
"config:base"
],
"packageRules": [
{
"groupSlug": "all",
"packagePatterns": ["*"],
"allowedVersions": "!/^(?i).*[-_\\.](Alpha|Beta|RC|M|EA|Snap|snapshot|jboss|atlassian)[-_\\.]?[0-9]?.*$/",
"groupName": "all dependencies"
},
{
"description": "Disable major updates for centos",
"matchPackageNames": ["centos"],
"matchUpdateTypes": ["major"],
"enabled": false
}
]
}
| Disable major updates for centos | Disable major updates for centos
| JSON | apache-2.0 | nielsbasjes/logparser,nielsbasjes/logparser,nielsbasjes/logparser | json | ## Code Before:
{
"extends": [
"config:base"
],
"packageRules": [
{
"groupSlug": "all",
"packagePatterns": ["*"],
"allowedVersions": "!/^(?i).*[-_\\.](Alpha|Beta|RC|M|EA|Snap|snapshot|jboss|atlassian)[-_\\.]?[0-9]?.*$/",
"groupName": "all dependencies"
}
]
}
## Instruction:
Disable major updates for centos
## Code After:
{
"extends": [
"config:base"
],
"packageRules": [
{
"groupSlug": "all",
"packagePatterns": ["*"],
"allowedVersions": "!/^(?i).*[-_\\.](Alpha|Beta|RC|M|EA|Snap|snapshot|jboss|atlassian)[-_\\.]?[0-9]?.*$/",
"groupName": "all dependencies"
},
{
"description": "Disable major updates for centos",
"matchPackageNames": ["centos"],
"matchUpdateTypes": ["major"],
"enabled": false
}
]
}
| {
"extends": [
"config:base"
],
"packageRules": [
{
"groupSlug": "all",
"packagePatterns": ["*"],
"allowedVersions": "!/^(?i).*[-_\\.](Alpha|Beta|RC|M|EA|Snap|snapshot|jboss|atlassian)[-_\\.]?[0-9]?.*$/",
"groupName": "all dependencies"
+ },
+ {
+ "description": "Disable major updates for centos",
+ "matchPackageNames": ["centos"],
+ "matchUpdateTypes": ["major"],
+ "enabled": false
}
]
} | 6 | 0.461538 | 6 | 0 |
863eb2d080276c4e17315a95413798519a93d072 | vagrant/shell.sh | vagrant/shell.sh | `test ! -x /usr/bin/ruby && ln -s /opt/vagrant_ruby/bin/ruby /usr/bin/ruby`
# install ctags
if [ -x /usr/bin/apt-get ]; then
# update packages
apt-get update
# ctags
apt-get install exuberant-ctags
# python3
apt-get install python3.2 python3.2-minimal
fi
# install ctags
if [ -x /usr/local/bin/pip ]; then
# tox
pip install tox
# coverage
pip install coverage
fi
# configure environment
su vagrant -c 'test ! -d ~/.termrc && git clone git://github.com/michalbachowski/termrc.git ~/.termrc && cd ~/.termrc && /bin/bash init.sh'
# configure vim
su vagrant -c 'test ! -d ~/.vimper && git clone git://github.com/michalbachowski/vimper.git ~/.vimper && cd ~/.vimper && python bootstrap.py'
# git config
su vagrant -c 'git config --global color.ui true'
## Node.js modules
# Yeoman
npm install -g yo grunt-cli bower
# underscore
npm install -g underscore
exit 0
| `test ! -x /usr/bin/ruby && ln -s /opt/vagrant_ruby/bin/ruby /usr/bin/ruby`
# install ctags
if [ -x /usr/bin/apt-get ]; then
# update packages
apt-get update
# ctags
apt-get install exuberant-ctags
# python3
apt-get install python3.2 python3.2-minimal
fi
# install ctags
if [ -x /usr/local/bin/pip ]; then
# tox
pip install tox
# coverage
pip install coverage
fi
# configure environment
su vagrant -c 'test ! -d ~/.termrc && git clone git://github.com/michalbachowski/termrc.git ~/.termrc && cd ~/.termrc && /bin/bash init.sh'
# configure vim
su vagrant -c 'test ! -d ~/.vimper && git clone git://github.com/michalbachowski/vimper.git ~/.vimper && cd ~/.vimper && python bootstrap.py'
# git config
su vagrant -c 'git config --global color.ui true'
su vagrant -c 'git config --global core.editor vim'
## Node.js modules
# Yeoman
npm install -g yo grunt-cli bower
# underscore
npm install -g underscore
exit 0
| Set git core.editor to 'vim' | Set git core.editor to 'vim'
| Shell | bsd-3-clause | michalbachowski/pyevent,michalbachowski/pyevent,michalbachowski/pyevent | shell | ## Code Before:
`test ! -x /usr/bin/ruby && ln -s /opt/vagrant_ruby/bin/ruby /usr/bin/ruby`
# install ctags
if [ -x /usr/bin/apt-get ]; then
# update packages
apt-get update
# ctags
apt-get install exuberant-ctags
# python3
apt-get install python3.2 python3.2-minimal
fi
# install ctags
if [ -x /usr/local/bin/pip ]; then
# tox
pip install tox
# coverage
pip install coverage
fi
# configure environment
su vagrant -c 'test ! -d ~/.termrc && git clone git://github.com/michalbachowski/termrc.git ~/.termrc && cd ~/.termrc && /bin/bash init.sh'
# configure vim
su vagrant -c 'test ! -d ~/.vimper && git clone git://github.com/michalbachowski/vimper.git ~/.vimper && cd ~/.vimper && python bootstrap.py'
# git config
su vagrant -c 'git config --global color.ui true'
## Node.js modules
# Yeoman
npm install -g yo grunt-cli bower
# underscore
npm install -g underscore
exit 0
## Instruction:
Set git core.editor to 'vim'
## Code After:
`test ! -x /usr/bin/ruby && ln -s /opt/vagrant_ruby/bin/ruby /usr/bin/ruby`
# install ctags
if [ -x /usr/bin/apt-get ]; then
# update packages
apt-get update
# ctags
apt-get install exuberant-ctags
# python3
apt-get install python3.2 python3.2-minimal
fi
# install ctags
if [ -x /usr/local/bin/pip ]; then
# tox
pip install tox
# coverage
pip install coverage
fi
# configure environment
su vagrant -c 'test ! -d ~/.termrc && git clone git://github.com/michalbachowski/termrc.git ~/.termrc && cd ~/.termrc && /bin/bash init.sh'
# configure vim
su vagrant -c 'test ! -d ~/.vimper && git clone git://github.com/michalbachowski/vimper.git ~/.vimper && cd ~/.vimper && python bootstrap.py'
# git config
su vagrant -c 'git config --global color.ui true'
su vagrant -c 'git config --global core.editor vim'
## Node.js modules
# Yeoman
npm install -g yo grunt-cli bower
# underscore
npm install -g underscore
exit 0
| `test ! -x /usr/bin/ruby && ln -s /opt/vagrant_ruby/bin/ruby /usr/bin/ruby`
# install ctags
if [ -x /usr/bin/apt-get ]; then
# update packages
apt-get update
# ctags
apt-get install exuberant-ctags
# python3
apt-get install python3.2 python3.2-minimal
fi
# install ctags
if [ -x /usr/local/bin/pip ]; then
# tox
pip install tox
# coverage
pip install coverage
fi
# configure environment
su vagrant -c 'test ! -d ~/.termrc && git clone git://github.com/michalbachowski/termrc.git ~/.termrc && cd ~/.termrc && /bin/bash init.sh'
# configure vim
su vagrant -c 'test ! -d ~/.vimper && git clone git://github.com/michalbachowski/vimper.git ~/.vimper && cd ~/.vimper && python bootstrap.py'
# git config
su vagrant -c 'git config --global color.ui true'
+ su vagrant -c 'git config --global core.editor vim'
## Node.js modules
# Yeoman
npm install -g yo grunt-cli bower
# underscore
npm install -g underscore
exit 0 | 1 | 0.026316 | 1 | 0 |
d8413b9db12441937ec7d06f3d071cacd916520c | lib/common_tools.sh | lib/common_tools.sh | ensureInPath "jq-linux64" "${cache}/.jq/bin"
# Ensure we have a copy of the stdlib
STDLIB_DIR="${TMPDIR:-"/tmp"}/go-buildpack-stdlib"
ensureFile "stdlib.sh.v8" "${STDLIB_DIR}" "chmod a+x" | ensureInPath "jq-linux64" "${cache}/.jq/bin"
# Ensure we have a copy of the stdlib
if [ -z "${TMPDIR}" ]; then
STDLIB_DIR=$(mktemp -d -t stdlib.XXXXX)
else
STDLIB_DIR="${TMPDIR}/go-buildpack-stdlib"
fi
ensureFile "stdlib.sh.v8" "${STDLIB_DIR}" "chmod a+x"
| Use mktemp to create a temporary directory | Use mktemp to create a temporary directory
Do this only if TMPDIR is unset. If TMPDIR is set, use $TMPDIR/go-buildpack-stdlib | Shell | mit | heroku/heroku-buildpack-go,heroku/heroku-buildpack-go | shell | ## Code Before:
ensureInPath "jq-linux64" "${cache}/.jq/bin"
# Ensure we have a copy of the stdlib
STDLIB_DIR="${TMPDIR:-"/tmp"}/go-buildpack-stdlib"
ensureFile "stdlib.sh.v8" "${STDLIB_DIR}" "chmod a+x"
## Instruction:
Use mktemp to create a temporary directory
Do this only if TMPDIR is unset. If TMPDIR is set, use $TMPDIR/go-buildpack-stdlib
## Code After:
ensureInPath "jq-linux64" "${cache}/.jq/bin"
# Ensure we have a copy of the stdlib
if [ -z "${TMPDIR}" ]; then
STDLIB_DIR=$(mktemp -d -t stdlib.XXXXX)
else
STDLIB_DIR="${TMPDIR}/go-buildpack-stdlib"
fi
ensureFile "stdlib.sh.v8" "${STDLIB_DIR}" "chmod a+x"
| ensureInPath "jq-linux64" "${cache}/.jq/bin"
# Ensure we have a copy of the stdlib
+ if [ -z "${TMPDIR}" ]; then
+ STDLIB_DIR=$(mktemp -d -t stdlib.XXXXX)
+ else
- STDLIB_DIR="${TMPDIR:-"/tmp"}/go-buildpack-stdlib"
? --------
+ STDLIB_DIR="${TMPDIR}/go-buildpack-stdlib"
? ++
+ fi
ensureFile "stdlib.sh.v8" "${STDLIB_DIR}" "chmod a+x" | 6 | 1.2 | 5 | 1 |
9d5db080c1679375b7cb9b4a5465b0427138073f | resources/assets/lib/beatmap-discussions/system-post.tsx | resources/assets/lib/beatmap-discussions/system-post.tsx | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import StringWithComponent from 'components/string-with-component';
import BeatmapsetDiscussionPostJson from 'interfaces/beatmapset-discussion-post-json';
import UserJson from 'interfaces/user-json';
import { route } from 'laroute';
import * as React from 'react';
import { classWithModifiers } from 'utils/css';
interface Props {
post: BeatmapsetDiscussionPostJson;
user: UserJson;
}
export default function SystemPost({ post, user }: Props) {
if (!post.system) return null;
if (post.message.type !== 'resolved') {
console.error(`unknown type: ${post.message.type}`);
}
const className = classWithModifiers('beatmap-discussion-system-post', post.message.type, {
deleted: post.deleted_at != null,
});
return (
<div className={className}>
<div className='beatmap-discussion-system-post__content'>
{post.message.type === 'resolved' && (
<StringWithComponent
mappings={{
user: <a
className='beatmap-discussion-system-post__user'
href={route('users.show', { user: user.id })}
>
{user.username}
</a>,
}}
pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
/>
)}
</div>
</div>
);
}
| // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import StringWithComponent from 'components/string-with-component';
import BeatmapsetDiscussionPostJson from 'interfaces/beatmapset-discussion-post-json';
import UserJson from 'interfaces/user-json';
import { route } from 'laroute';
import * as React from 'react';
import { classWithModifiers } from 'utils/css';
interface Props {
post: BeatmapsetDiscussionPostJson;
user: UserJson;
}
export default function SystemPost({ post, user }: Props) {
if (!post.system) return null;
if (post.message.type !== 'resolved') return null;
const className = classWithModifiers('beatmap-discussion-system-post', post.message.type, {
deleted: post.deleted_at != null,
});
return (
<div className={className}>
<div className='beatmap-discussion-system-post__content'>
<StringWithComponent
mappings={{
user: <a
className='beatmap-discussion-system-post__user'
href={route('users.show', { user: user.id })}
>
{user.username}
</a>,
}}
pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
/>
</div>
</div>
);
}
| Revert "render blank content for unknown types" | Revert "render blank content for unknown types"
This reverts commit 3459caadd2a8f4b2ad08b323f77ca2d4570f34bb.
| TypeScript | agpl-3.0 | notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,nanaya/osu-web,nanaya/osu-web,ppy/osu-web,nanaya/osu-web,notbakaneko/osu-web,ppy/osu-web,notbakaneko/osu-web,notbakaneko/osu-web,ppy/osu-web,notbakaneko/osu-web,nanaya/osu-web,ppy/osu-web | typescript | ## Code Before:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import StringWithComponent from 'components/string-with-component';
import BeatmapsetDiscussionPostJson from 'interfaces/beatmapset-discussion-post-json';
import UserJson from 'interfaces/user-json';
import { route } from 'laroute';
import * as React from 'react';
import { classWithModifiers } from 'utils/css';
interface Props {
post: BeatmapsetDiscussionPostJson;
user: UserJson;
}
export default function SystemPost({ post, user }: Props) {
if (!post.system) return null;
if (post.message.type !== 'resolved') {
console.error(`unknown type: ${post.message.type}`);
}
const className = classWithModifiers('beatmap-discussion-system-post', post.message.type, {
deleted: post.deleted_at != null,
});
return (
<div className={className}>
<div className='beatmap-discussion-system-post__content'>
{post.message.type === 'resolved' && (
<StringWithComponent
mappings={{
user: <a
className='beatmap-discussion-system-post__user'
href={route('users.show', { user: user.id })}
>
{user.username}
</a>,
}}
pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
/>
)}
</div>
</div>
);
}
## Instruction:
Revert "render blank content for unknown types"
This reverts commit 3459caadd2a8f4b2ad08b323f77ca2d4570f34bb.
## Code After:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import StringWithComponent from 'components/string-with-component';
import BeatmapsetDiscussionPostJson from 'interfaces/beatmapset-discussion-post-json';
import UserJson from 'interfaces/user-json';
import { route } from 'laroute';
import * as React from 'react';
import { classWithModifiers } from 'utils/css';
interface Props {
post: BeatmapsetDiscussionPostJson;
user: UserJson;
}
export default function SystemPost({ post, user }: Props) {
if (!post.system) return null;
if (post.message.type !== 'resolved') return null;
const className = classWithModifiers('beatmap-discussion-system-post', post.message.type, {
deleted: post.deleted_at != null,
});
return (
<div className={className}>
<div className='beatmap-discussion-system-post__content'>
<StringWithComponent
mappings={{
user: <a
className='beatmap-discussion-system-post__user'
href={route('users.show', { user: user.id })}
>
{user.username}
</a>,
}}
pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
/>
</div>
</div>
);
}
| // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import StringWithComponent from 'components/string-with-component';
import BeatmapsetDiscussionPostJson from 'interfaces/beatmapset-discussion-post-json';
import UserJson from 'interfaces/user-json';
import { route } from 'laroute';
import * as React from 'react';
import { classWithModifiers } from 'utils/css';
interface Props {
post: BeatmapsetDiscussionPostJson;
user: UserJson;
}
export default function SystemPost({ post, user }: Props) {
if (!post.system) return null;
- if (post.message.type !== 'resolved') {
? ^
+ if (post.message.type !== 'resolved') return null;
? ^^^^^^^^^^^^
- console.error(`unknown type: ${post.message.type}`);
- }
const className = classWithModifiers('beatmap-discussion-system-post', post.message.type, {
deleted: post.deleted_at != null,
});
return (
<div className={className}>
<div className='beatmap-discussion-system-post__content'>
- {post.message.type === 'resolved' && (
- <StringWithComponent
? --
+ <StringWithComponent
- mappings={{
? --
+ mappings={{
- user: <a
? --
+ user: <a
- className='beatmap-discussion-system-post__user'
? --
+ className='beatmap-discussion-system-post__user'
- href={route('users.show', { user: user.id })}
? --
+ href={route('users.show', { user: user.id })}
- >
? --
+ >
- {user.username}
? --
+ {user.username}
- </a>,
? --
+ </a>,
- }}
? --
+ }}
- pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
? --
+ pattern={osu.trans(`beatmap_discussions.system.resolved.${post.message.value}`)}
- />
? --
+ />
- )}
</div>
</div>
);
} | 28 | 0.622222 | 12 | 16 |
e3bbaf9421bdc5e0ac538c57a9821b5dba0382ef | dataviva/apps/title/models.py | dataviva/apps/title/models.py | from dataviva import db
class GraphTitle(db.Model):
__tablename__ = 'graph_title'
id = db.Column(db.Integer, primary_key=True)
title_en = db.Column(db.String(255))
subtitle_en = db.Column(db.String(255))
title_pt = db.Column(db.String(255))
subtitle_pt = db.Column(db.String(255))
dataset = db.Column(db.String(45))
graph = db.Column(db.String(45))
shapes = db.Column(db.String(45))
type = db.Column(db.String(45))
product = db.Column(db.Boolean)
partner = db.Column(db.Boolean)
location = db.Column(db.Boolean)
industry = db.Column(db.Boolean)
occupation = db.Column(db.Boolean)
establishment = db.Column(db.Boolean)
hedu_course = db.Column(db.Boolean)
university = db.Column(db.Boolean)
sc_course = db.Column(db.Boolean)
| from dataviva import db
class GraphTitle(db.Model):
__tablename__ = 'graph_title'
id = db.Column(db.Integer, primary_key=True)
title_en = db.Column(db.String(255))
subtitle_en = db.Column(db.String(255))
title_pt = db.Column(db.String(255))
subtitle_pt = db.Column(db.String(255))
dataset = db.Column(db.String(45))
graph = db.Column(db.String(45))
shapes = db.Column(db.String(45))
type = db.Column(db.String(45))
product = db.Column(db.Boolean)
partner = db.Column(db.Boolean)
location = db.Column(db.Boolean)
industry = db.Column(db.Boolean)
occupation = db.Column(db.Boolean)
establishment = db.Column(db.Boolean)
hedu_course = db.Column(db.Boolean)
university = db.Column(db.Boolean)
sc_course = db.Column(db.Boolean)
sc_course_field = db.Column(db.Boolean)
| Add column to title model | Add column to title model
| Python | mit | DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site | python | ## Code Before:
from dataviva import db
class GraphTitle(db.Model):
__tablename__ = 'graph_title'
id = db.Column(db.Integer, primary_key=True)
title_en = db.Column(db.String(255))
subtitle_en = db.Column(db.String(255))
title_pt = db.Column(db.String(255))
subtitle_pt = db.Column(db.String(255))
dataset = db.Column(db.String(45))
graph = db.Column(db.String(45))
shapes = db.Column(db.String(45))
type = db.Column(db.String(45))
product = db.Column(db.Boolean)
partner = db.Column(db.Boolean)
location = db.Column(db.Boolean)
industry = db.Column(db.Boolean)
occupation = db.Column(db.Boolean)
establishment = db.Column(db.Boolean)
hedu_course = db.Column(db.Boolean)
university = db.Column(db.Boolean)
sc_course = db.Column(db.Boolean)
## Instruction:
Add column to title model
## Code After:
from dataviva import db
class GraphTitle(db.Model):
__tablename__ = 'graph_title'
id = db.Column(db.Integer, primary_key=True)
title_en = db.Column(db.String(255))
subtitle_en = db.Column(db.String(255))
title_pt = db.Column(db.String(255))
subtitle_pt = db.Column(db.String(255))
dataset = db.Column(db.String(45))
graph = db.Column(db.String(45))
shapes = db.Column(db.String(45))
type = db.Column(db.String(45))
product = db.Column(db.Boolean)
partner = db.Column(db.Boolean)
location = db.Column(db.Boolean)
industry = db.Column(db.Boolean)
occupation = db.Column(db.Boolean)
establishment = db.Column(db.Boolean)
hedu_course = db.Column(db.Boolean)
university = db.Column(db.Boolean)
sc_course = db.Column(db.Boolean)
sc_course_field = db.Column(db.Boolean)
| from dataviva import db
class GraphTitle(db.Model):
__tablename__ = 'graph_title'
id = db.Column(db.Integer, primary_key=True)
title_en = db.Column(db.String(255))
subtitle_en = db.Column(db.String(255))
title_pt = db.Column(db.String(255))
subtitle_pt = db.Column(db.String(255))
dataset = db.Column(db.String(45))
graph = db.Column(db.String(45))
shapes = db.Column(db.String(45))
type = db.Column(db.String(45))
product = db.Column(db.Boolean)
partner = db.Column(db.Boolean)
location = db.Column(db.Boolean)
industry = db.Column(db.Boolean)
occupation = db.Column(db.Boolean)
establishment = db.Column(db.Boolean)
hedu_course = db.Column(db.Boolean)
university = db.Column(db.Boolean)
sc_course = db.Column(db.Boolean)
+ sc_course_field = db.Column(db.Boolean) | 1 | 0.043478 | 1 | 0 |
4befcc353dfca081ea35cedc5be7687f6e0b97e4 | spec/lib/gitlab/email/email_shared_blocks.rb | spec/lib/gitlab/email/email_shared_blocks.rb |
shared_context :email_shared_context do
let(:mail_key) { "59d8df8370b7e95c5a49fbf86aeb2c93" }
let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }
let(:markdown) { "" }
def setup_attachment
allow_any_instance_of(Gitlab::Email::AttachmentUploader).to receive(:execute).and_return(
[
{
url: "uploads/image.png",
is_image: true,
alt: "image",
markdown: markdown
}
]
)
end
end
shared_examples :email_shared_examples do
context "when the user could not be found" do
before do
user.destroy
end
it "raises a UserNotFoundError" do
expect { receiver.execute }.to raise_error(Gitlab::Email::UserNotFoundError)
end
end
context "when the user is not authorized to the project" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)
end
it "raises a ProjectNotFound" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
end
end
end
| require 'gitlab/email/receiver'
shared_context :email_shared_context do
let(:mail_key) { "59d8df8370b7e95c5a49fbf86aeb2c93" }
let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }
let(:markdown) { "" }
def setup_attachment
allow_any_instance_of(Gitlab::Email::AttachmentUploader).to receive(:execute).and_return(
[
{
url: "uploads/image.png",
is_image: true,
alt: "image",
markdown: markdown
}
]
)
end
end
shared_examples :email_shared_examples do
context "when the user could not be found" do
before do
user.destroy
end
it "raises a UserNotFoundError" do
expect { receiver.execute }.to raise_error(Gitlab::Email::UserNotFoundError)
end
end
context "when the user is not authorized to the project" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)
end
it "raises a ProjectNotFound" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
end
end
end
| Add missing require in tests | Add missing require in tests
| Ruby | mit | htve/GitlabForChinese,screenpages/gitlabhq,t-zuehlsdorff/gitlabhq,icedwater/gitlabhq,htve/GitlabForChinese,dreampet/gitlab,LUMC/gitlabhq,jirutka/gitlabhq,htve/GitlabForChinese,openwide-java/gitlabhq,openwide-java/gitlabhq,openwide-java/gitlabhq,SVArago/gitlabhq,daiyu/gitlab-zh,t-zuehlsdorff/gitlabhq,icedwater/gitlabhq,LUMC/gitlabhq,stoplightio/gitlabhq,t-zuehlsdorff/gitlabhq,darkrasid/gitlabhq,stoplightio/gitlabhq,mr-dxdy/gitlabhq,shinexiao/gitlabhq,dplarson/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,darkrasid/gitlabhq,stoplightio/gitlabhq,daiyu/gitlab-zh,jirutka/gitlabhq,SVArago/gitlabhq,mr-dxdy/gitlabhq,allysonbarros/gitlabhq,daiyu/gitlab-zh,darkrasid/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,SVArago/gitlabhq,htve/GitlabForChinese,dplarson/gitlabhq,shinexiao/gitlabhq,daiyu/gitlab-zh,axilleas/gitlabhq,allysonbarros/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,dplarson/gitlabhq,iiet/iiet-git,dreampet/gitlab,stoplightio/gitlabhq,mr-dxdy/gitlabhq,LUMC/gitlabhq,mr-dxdy/gitlabhq,shinexiao/gitlabhq,allysonbarros/gitlabhq,SVArago/gitlabhq,t-zuehlsdorff/gitlabhq,jirutka/gitlabhq,icedwater/gitlabhq,iiet/iiet-git,icedwater/gitlabhq,axilleas/gitlabhq,LUMC/gitlabhq,dplarson/gitlabhq,darkrasid/gitlabhq,allysonbarros/gitlabhq,mmkassem/gitlabhq,shinexiao/gitlabhq,dreampet/gitlab,openwide-java/gitlabhq,screenpages/gitlabhq,mmkassem/gitlabhq,screenpages/gitlabhq,iiet/iiet-git,screenpages/gitlabhq,axilleas/gitlabhq | ruby | ## Code Before:
shared_context :email_shared_context do
let(:mail_key) { "59d8df8370b7e95c5a49fbf86aeb2c93" }
let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }
let(:markdown) { "" }
def setup_attachment
allow_any_instance_of(Gitlab::Email::AttachmentUploader).to receive(:execute).and_return(
[
{
url: "uploads/image.png",
is_image: true,
alt: "image",
markdown: markdown
}
]
)
end
end
shared_examples :email_shared_examples do
context "when the user could not be found" do
before do
user.destroy
end
it "raises a UserNotFoundError" do
expect { receiver.execute }.to raise_error(Gitlab::Email::UserNotFoundError)
end
end
context "when the user is not authorized to the project" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)
end
it "raises a ProjectNotFound" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
end
end
end
## Instruction:
Add missing require in tests
## Code After:
require 'gitlab/email/receiver'
shared_context :email_shared_context do
let(:mail_key) { "59d8df8370b7e95c5a49fbf86aeb2c93" }
let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }
let(:markdown) { "" }
def setup_attachment
allow_any_instance_of(Gitlab::Email::AttachmentUploader).to receive(:execute).and_return(
[
{
url: "uploads/image.png",
is_image: true,
alt: "image",
markdown: markdown
}
]
)
end
end
shared_examples :email_shared_examples do
context "when the user could not be found" do
before do
user.destroy
end
it "raises a UserNotFoundError" do
expect { receiver.execute }.to raise_error(Gitlab::Email::UserNotFoundError)
end
end
context "when the user is not authorized to the project" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)
end
it "raises a ProjectNotFound" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
end
end
end
| + require 'gitlab/email/receiver'
shared_context :email_shared_context do
let(:mail_key) { "59d8df8370b7e95c5a49fbf86aeb2c93" }
let(:receiver) { Gitlab::Email::Receiver.new(email_raw) }
let(:markdown) { "" }
def setup_attachment
allow_any_instance_of(Gitlab::Email::AttachmentUploader).to receive(:execute).and_return(
[
{
url: "uploads/image.png",
is_image: true,
alt: "image",
markdown: markdown
}
]
)
end
end
shared_examples :email_shared_examples do
context "when the user could not be found" do
before do
user.destroy
end
it "raises a UserNotFoundError" do
expect { receiver.execute }.to raise_error(Gitlab::Email::UserNotFoundError)
end
end
context "when the user is not authorized to the project" do
before do
project.update_attribute(:visibility_level, Project::PRIVATE)
end
it "raises a ProjectNotFound" do
expect { receiver.execute }.to raise_error(Gitlab::Email::ProjectNotFound)
end
end
end | 1 | 0.02439 | 1 | 0 |
b81218b9b9ecd293132d9bd54b6b2f9636b66e74 | core/Activity.qml | core/Activity.qml | BaseActivity {
start: {
this.style('display', 'block')
this.visible = true
this.started()
}
stop: {
this.style('display', 'none')
this.visible = false
this.stopped()
}
function getActivity() {
return this
}
}
| BaseActivity {
property bool handleDisplay;
start: {
if (this.handleDisplay)
this.style('display', 'block')
this.visible = true
this.started()
}
stop: {
if (this.handleDisplay)
this.style('display', 'none')
this.visible = false
this.stopped()
}
function getActivity() {
return this
}
}
| Add flag to handle 'display' style | Add flag to handle 'display' style
| QML | mit | pureqml/controls | qml | ## Code Before:
BaseActivity {
start: {
this.style('display', 'block')
this.visible = true
this.started()
}
stop: {
this.style('display', 'none')
this.visible = false
this.stopped()
}
function getActivity() {
return this
}
}
## Instruction:
Add flag to handle 'display' style
## Code After:
BaseActivity {
property bool handleDisplay;
start: {
if (this.handleDisplay)
this.style('display', 'block')
this.visible = true
this.started()
}
stop: {
if (this.handleDisplay)
this.style('display', 'none')
this.visible = false
this.stopped()
}
function getActivity() {
return this
}
}
| BaseActivity {
+ property bool handleDisplay;
+
start: {
+ if (this.handleDisplay)
- this.style('display', 'block')
+ this.style('display', 'block')
? +
this.visible = true
this.started()
}
stop: {
+ if (this.handleDisplay)
- this.style('display', 'none')
+ this.style('display', 'none')
? +
this.visible = false
this.stopped()
}
function getActivity() {
return this
}
} | 8 | 0.470588 | 6 | 2 |
0fc0754e655a0628c4b25da4fe2ddf261208deb3 | gio/tests/appinfo-test.c | gio/tests/appinfo-test.c |
int
main (int argc, char *argv[])
{
const gchar *envvar;
gint pid_from_env;
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
g_assert_cmpstr (envvar, ==, g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL));
return 0;
}
|
int
main (int argc, char *argv[])
{
const gchar *envvar;
g_test_init (&argc, &argv, NULL);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
if (envvar != NULL)
{
gchar *expected;
gint pid_from_env;
expected = g_test_build_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
g_assert_cmpstr (envvar, ==, expected);
g_free (expected);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
}
return 0;
}
| Fix up the appinfo test | Fix up the appinfo test
One testcase was launching appinfo-test from a GAppInfo that
does not have a filename. In this case, the G_LAUNCHED_DESKTOP_FILE
envvar is not exported. Make appinfo-test deal with that, without
spewing warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=711178
| C | lgpl-2.1 | endlessm/glib,mzabaluev/glib,tamaskenez/glib,cention-sany/glib,gale320/glib,lukasz-skalski/glib,krichter722/glib,endlessm/glib,endlessm/glib,ieei/glib,gale320/glib,ieei/glib,tamaskenez/glib,MathieuDuponchelle/glib,tamaskenez/glib,tchakabam/glib,krichter722/glib,mzabaluev/glib,ieei/glib,Distrotech/glib,johne53/MB3Glib,MathieuDuponchelle/glib,tamaskenez/glib,endlessm/glib,lukasz-skalski/glib,johne53/MB3Glib,ieei/glib,Distrotech/glib,tchakabam/glib,tchakabam/glib,Distrotech/glib,gale320/glib,johne53/MB3Glib,tamaskenez/glib,ieei/glib,cention-sany/glib,Distrotech/glib,MathieuDuponchelle/glib,tchakabam/glib,krichter722/glib,MathieuDuponchelle/glib,cention-sany/glib,mzabaluev/glib,krichter722/glib,tchakabam/glib,johne53/MB3Glib,johne53/MB3Glib,mzabaluev/glib,lukasz-skalski/glib,krichter722/glib,endlessm/glib,gale320/glib,Distrotech/glib,lukasz-skalski/glib,cention-sany/glib,MathieuDuponchelle/glib,johne53/MB3Glib,lukasz-skalski/glib,mzabaluev/glib,cention-sany/glib,gale320/glib | c | ## Code Before:
int
main (int argc, char *argv[])
{
const gchar *envvar;
gint pid_from_env;
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
g_assert_cmpstr (envvar, ==, g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL));
return 0;
}
## Instruction:
Fix up the appinfo test
One testcase was launching appinfo-test from a GAppInfo that
does not have a filename. In this case, the G_LAUNCHED_DESKTOP_FILE
envvar is not exported. Make appinfo-test deal with that, without
spewing warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=711178
## Code After:
int
main (int argc, char *argv[])
{
const gchar *envvar;
g_test_init (&argc, &argv, NULL);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
if (envvar != NULL)
{
gchar *expected;
gint pid_from_env;
expected = g_test_build_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
g_assert_cmpstr (envvar, ==, expected);
g_free (expected);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
}
return 0;
}
|
int
main (int argc, char *argv[])
{
const gchar *envvar;
- gint pid_from_env;
+ g_test_init (&argc, &argv, NULL);
- envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
- g_assert (envvar != NULL);
- pid_from_env = atoi (envvar);
- g_assert_cmpint (pid_from_env, ==, getpid ());
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
+ if (envvar != NULL)
+ {
+ gchar *expected;
+ gint pid_from_env;
+
- g_assert_cmpstr (envvar, ==, g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL));
? ^^^^^ ^ --------- ^^^^^^ -- ^^^ -
+ expected = g_test_build_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
? ^^^^ ^^^^ ^ ^^^^^
+ g_assert_cmpstr (envvar, ==, expected);
+ g_free (expected);
+
+ envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
+ g_assert (envvar != NULL);
+ pid_from_env = atoi (envvar);
+ g_assert_cmpint (pid_from_env, ==, getpid ());
+ }
return 0;
}
| 21 | 1.166667 | 15 | 6 |
159680ed9e6aa611a3ae94bace02edf440a776e1 | .travis.yml | .travis.yml | language: d
sudo: false
d:
- dmd-2.064.2
- dmd-2.065.0
- dmd-2.066.1
- ldc-0.14.0
- ldc-0.15.1
- gdc-4.9.0
script:
- dub test --compiler=${DC} -c library-nonet
- dub build --compiler=${DC}
- DC=${DMD} ./build.sh
- DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh
| language: d
sudo: false
d:
- dmd-2.064.2
- dmd-2.065.0
- dmd-2.066.1
- dmd-2.067.0-b2
- ldc-0.14.0
- ldc-0.15.1
- gdc-4.9.0
script:
- dub test --compiler=${DC} -c library-nonet
- dub build --compiler=${DC}
- DC=${DMD} ./build.sh
- DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh
| Test dub with DMD 2.067 beta | Test dub with DMD 2.067 beta | YAML | mit | Geod24/dub,y12uc231/dub,Flamaros/dub,Abscissa/dub,schuetzm/dub,jelmansouri/dub,D-Programming-Language/dub,p0nce/dub,jeanbaptistelab/dub,rjframe/dub,nazriel/dub,gedaiu/dub,dreamsxin/dub,alexeibs/dub,grogancolin/dub,xentec/dub,Abscissa/dub-data-mod | yaml | ## Code Before:
language: d
sudo: false
d:
- dmd-2.064.2
- dmd-2.065.0
- dmd-2.066.1
- ldc-0.14.0
- ldc-0.15.1
- gdc-4.9.0
script:
- dub test --compiler=${DC} -c library-nonet
- dub build --compiler=${DC}
- DC=${DMD} ./build.sh
- DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh
## Instruction:
Test dub with DMD 2.067 beta
## Code After:
language: d
sudo: false
d:
- dmd-2.064.2
- dmd-2.065.0
- dmd-2.066.1
- dmd-2.067.0-b2
- ldc-0.14.0
- ldc-0.15.1
- gdc-4.9.0
script:
- dub test --compiler=${DC} -c library-nonet
- dub build --compiler=${DC}
- DC=${DMD} ./build.sh
- DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh
| language: d
sudo: false
d:
- dmd-2.064.2
- dmd-2.065.0
- dmd-2.066.1
+ - dmd-2.067.0-b2
- ldc-0.14.0
- ldc-0.15.1
- gdc-4.9.0
script:
- dub test --compiler=${DC} -c library-nonet
- dub build --compiler=${DC}
- DC=${DMD} ./build.sh
- DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh | 1 | 0.0625 | 1 | 0 |
83020d996733b5376cfa5814ca81c8f823029346 | tests/run/pyclass_annotations_pep526.py | tests/run/pyclass_annotations_pep526.py |
from __future__ import annotations
try:
from typing import ClassVar
except ImportError: # Py<=3.5
ClassVar = {int: int}
class PyAnnotatedClass:
"""
>>> PyAnnotatedClass.__annotations__["CLASS_VAR"]
'ClassVar[int]'
>>> PyAnnotatedClass.__annotations__["obj"]
'str'
>>> PyAnnotatedClass.__annotations__["literal"]
"'int'"
>>> PyAnnotatedClass.__annotations__["recurse"]
"'PyAnnotatedClass'"
>>> PyAnnotatedClass.__annotations__["default"]
'bool'
>>> PyAnnotatedClass.CLASS_VAR
1
>>> PyAnnotatedClass.default
False
>>> PyAnnotatedClass.obj
Traceback (most recent call last):
...
AttributeError: type object 'PyAnnotatedClass' has no attribute 'obj'
"""
CLASS_VAR: ClassVar[int] = 1
obj: str
literal: "int"
recurse: "PyAnnotatedClass"
default: bool = False
class PyVanillaClass:
"""
>>> PyVanillaClass.__annotations__
Traceback (most recent call last):
...
AttributeError: type object 'PyVanillaClass' has no attribute '__annotations__'
"""
|
from __future__ import annotations
import sys
try:
from typing import ClassVar
except ImportError: # Py<=3.5
ClassVar = {int: int}
class PyAnnotatedClass:
"""
>>> PyAnnotatedClass.__annotations__["CLASS_VAR"]
'ClassVar[int]'
>>> PyAnnotatedClass.__annotations__["obj"]
'str'
>>> PyAnnotatedClass.__annotations__["literal"]
"'int'"
>>> PyAnnotatedClass.__annotations__["recurse"]
"'PyAnnotatedClass'"
>>> PyAnnotatedClass.__annotations__["default"]
'bool'
>>> PyAnnotatedClass.CLASS_VAR
1
>>> PyAnnotatedClass.default
False
>>> PyAnnotatedClass.obj
Traceback (most recent call last):
...
AttributeError: type object 'PyAnnotatedClass' has no attribute 'obj'
"""
CLASS_VAR: ClassVar[int] = 1
obj: str
literal: "int"
recurse: "PyAnnotatedClass"
default: bool = False
class PyVanillaClass:
"""
Before Py3.10, unannotated classes did not have '__annotations__'.
>>> try:
... a = PyVanillaClass.__annotations__
... except AttributeError:
... assert sys.version_info < (3, 10)
... else:
... assert sys.version_info >= (3, 10)
... assert a == {}
"""
| Repair a Python compatibility test in Py3.10. | Repair a Python compatibility test in Py3.10.
| Python | apache-2.0 | scoder/cython,scoder/cython,scoder/cython,da-woods/cython,cython/cython,cython/cython,da-woods/cython,cython/cython,da-woods/cython,da-woods/cython,scoder/cython,cython/cython | python | ## Code Before:
from __future__ import annotations
try:
from typing import ClassVar
except ImportError: # Py<=3.5
ClassVar = {int: int}
class PyAnnotatedClass:
"""
>>> PyAnnotatedClass.__annotations__["CLASS_VAR"]
'ClassVar[int]'
>>> PyAnnotatedClass.__annotations__["obj"]
'str'
>>> PyAnnotatedClass.__annotations__["literal"]
"'int'"
>>> PyAnnotatedClass.__annotations__["recurse"]
"'PyAnnotatedClass'"
>>> PyAnnotatedClass.__annotations__["default"]
'bool'
>>> PyAnnotatedClass.CLASS_VAR
1
>>> PyAnnotatedClass.default
False
>>> PyAnnotatedClass.obj
Traceback (most recent call last):
...
AttributeError: type object 'PyAnnotatedClass' has no attribute 'obj'
"""
CLASS_VAR: ClassVar[int] = 1
obj: str
literal: "int"
recurse: "PyAnnotatedClass"
default: bool = False
class PyVanillaClass:
"""
>>> PyVanillaClass.__annotations__
Traceback (most recent call last):
...
AttributeError: type object 'PyVanillaClass' has no attribute '__annotations__'
"""
## Instruction:
Repair a Python compatibility test in Py3.10.
## Code After:
from __future__ import annotations
import sys
try:
from typing import ClassVar
except ImportError: # Py<=3.5
ClassVar = {int: int}
class PyAnnotatedClass:
"""
>>> PyAnnotatedClass.__annotations__["CLASS_VAR"]
'ClassVar[int]'
>>> PyAnnotatedClass.__annotations__["obj"]
'str'
>>> PyAnnotatedClass.__annotations__["literal"]
"'int'"
>>> PyAnnotatedClass.__annotations__["recurse"]
"'PyAnnotatedClass'"
>>> PyAnnotatedClass.__annotations__["default"]
'bool'
>>> PyAnnotatedClass.CLASS_VAR
1
>>> PyAnnotatedClass.default
False
>>> PyAnnotatedClass.obj
Traceback (most recent call last):
...
AttributeError: type object 'PyAnnotatedClass' has no attribute 'obj'
"""
CLASS_VAR: ClassVar[int] = 1
obj: str
literal: "int"
recurse: "PyAnnotatedClass"
default: bool = False
class PyVanillaClass:
"""
Before Py3.10, unannotated classes did not have '__annotations__'.
>>> try:
... a = PyVanillaClass.__annotations__
... except AttributeError:
... assert sys.version_info < (3, 10)
... else:
... assert sys.version_info >= (3, 10)
... assert a == {}
"""
|
from __future__ import annotations
+
+ import sys
try:
from typing import ClassVar
except ImportError: # Py<=3.5
ClassVar = {int: int}
class PyAnnotatedClass:
"""
>>> PyAnnotatedClass.__annotations__["CLASS_VAR"]
'ClassVar[int]'
>>> PyAnnotatedClass.__annotations__["obj"]
'str'
>>> PyAnnotatedClass.__annotations__["literal"]
"'int'"
>>> PyAnnotatedClass.__annotations__["recurse"]
"'PyAnnotatedClass'"
>>> PyAnnotatedClass.__annotations__["default"]
'bool'
>>> PyAnnotatedClass.CLASS_VAR
1
>>> PyAnnotatedClass.default
False
>>> PyAnnotatedClass.obj
Traceback (most recent call last):
...
AttributeError: type object 'PyAnnotatedClass' has no attribute 'obj'
"""
CLASS_VAR: ClassVar[int] = 1
obj: str
literal: "int"
recurse: "PyAnnotatedClass"
default: bool = False
class PyVanillaClass:
"""
+ Before Py3.10, unannotated classes did not have '__annotations__'.
+
+ >>> try:
- >>> PyVanillaClass.__annotations__
? ^^^
+ ... a = PyVanillaClass.__annotations__
? ^^^^^^^^^^^
- Traceback (most recent call last):
- ...
- AttributeError: type object 'PyVanillaClass' has no attribute '__annotations__'
+ ... except AttributeError:
+ ... assert sys.version_info < (3, 10)
+ ... else:
+ ... assert sys.version_info >= (3, 10)
+ ... assert a == {}
""" | 15 | 0.340909 | 11 | 4 |
9af4f3bc2ddc07e47f311ae51e20e3f99733ea35 | Orange/tests/test_regression.py | Orange/tests/test_regression.py | import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
prefix="Orange.regression.",
onerror=lambda x: None)
for importer, modname, ispkg in regression_modules:
try:
module = pkgutil.importlib.import_module(modname)
except ImportError:
continue
for name, class_ in inspect.getmembers(module, inspect.isclass):
if issubclass(class_, Learner) and 'base' not in class_.__module__:
yield class_
def test_adequacy_all_learners(self):
for learner in self.all_learners():
learner = learner()
table = Table("iris")
self.assertRaises(ValueError, learner, table)
| import unittest
import inspect
import pkgutil
import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
prefix="Orange.regression.",
onerror=lambda x: None)
for importer, modname, ispkg in regression_modules:
try:
module = pkgutil.importlib.import_module(modname)
except ImportError:
continue
for name, class_ in inspect.getmembers(module, inspect.isclass):
if issubclass(class_, Learner) and 'base' not in class_.__module__:
yield class_
def test_adequacy_all_learners(self):
for learner in self.all_learners():
try:
learner = learner()
table = Table("iris")
self.assertRaises(ValueError, learner, table)
except TypeError as err:
traceback.print_exc()
continue
| Handle TypeError while testing all regression learners | Handle TypeError while testing all regression learners
| Python | bsd-2-clause | qPCR4vir/orange3,marinkaz/orange3,cheral/orange3,kwikadi/orange3,kwikadi/orange3,kwikadi/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,marinkaz/orange3,cheral/orange3,marinkaz/orange3,marinkaz/orange3,qPCR4vir/orange3,cheral/orange3,qPCR4vir/orange3,kwikadi/orange3,kwikadi/orange3,qPCR4vir/orange3,cheral/orange3,cheral/orange3,qPCR4vir/orange3,marinkaz/orange3,kwikadi/orange3 | python | ## Code Before:
import unittest
import inspect
import pkgutil
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
prefix="Orange.regression.",
onerror=lambda x: None)
for importer, modname, ispkg in regression_modules:
try:
module = pkgutil.importlib.import_module(modname)
except ImportError:
continue
for name, class_ in inspect.getmembers(module, inspect.isclass):
if issubclass(class_, Learner) and 'base' not in class_.__module__:
yield class_
def test_adequacy_all_learners(self):
for learner in self.all_learners():
learner = learner()
table = Table("iris")
self.assertRaises(ValueError, learner, table)
## Instruction:
Handle TypeError while testing all regression learners
## Code After:
import unittest
import inspect
import pkgutil
import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
prefix="Orange.regression.",
onerror=lambda x: None)
for importer, modname, ispkg in regression_modules:
try:
module = pkgutil.importlib.import_module(modname)
except ImportError:
continue
for name, class_ in inspect.getmembers(module, inspect.isclass):
if issubclass(class_, Learner) and 'base' not in class_.__module__:
yield class_
def test_adequacy_all_learners(self):
for learner in self.all_learners():
try:
learner = learner()
table = Table("iris")
self.assertRaises(ValueError, learner, table)
except TypeError as err:
traceback.print_exc()
continue
| import unittest
import inspect
import pkgutil
+ import traceback
import Orange
from Orange.data import Table
from Orange.regression import Learner
class RegressionLearnersTest(unittest.TestCase):
def all_learners(self):
regression_modules = pkgutil.walk_packages(
path=Orange.regression.__path__,
prefix="Orange.regression.",
onerror=lambda x: None)
for importer, modname, ispkg in regression_modules:
try:
module = pkgutil.importlib.import_module(modname)
except ImportError:
continue
for name, class_ in inspect.getmembers(module, inspect.isclass):
if issubclass(class_, Learner) and 'base' not in class_.__module__:
yield class_
def test_adequacy_all_learners(self):
for learner in self.all_learners():
+ try:
- learner = learner()
+ learner = learner()
? ++++
- table = Table("iris")
+ table = Table("iris")
? ++++
- self.assertRaises(ValueError, learner, table)
+ self.assertRaises(ValueError, learner, table)
? ++++
+ except TypeError as err:
+ traceback.print_exc()
+ continue | 11 | 0.366667 | 8 | 3 |
473e84daf36f723ff3d4a11c79bc1f120a796cea | Perspective/Perspective/WhosNextVC.swift | Perspective/Perspective/WhosNextVC.swift | //
// WhosNextVC.swift
// Perspective
//
// Created by Apprentice on 2/17/15.
// Copyright (c) 2015 Dev Bootcamp. All rights reserved.
//
import UIKit
class WhosNextVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
| //
// WhosNextVC.swift
// Perspective
//
// Created by Apprentice on 2/17/15.
// Copyright (c) 2015 Dev Bootcamp. All rights reserved.
//
import UIKit
class WhosNextVC: UIViewController {
var url: String!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
| Add whos next view and controller. | Add whos next view and controller.
| Swift | mit | thedanpan/Perspective,dlrifkin/Perspective-1.0 | swift | ## Code Before:
//
// WhosNextVC.swift
// Perspective
//
// Created by Apprentice on 2/17/15.
// Copyright (c) 2015 Dev Bootcamp. All rights reserved.
//
import UIKit
class WhosNextVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
## Instruction:
Add whos next view and controller.
## Code After:
//
// WhosNextVC.swift
// Perspective
//
// Created by Apprentice on 2/17/15.
// Copyright (c) 2015 Dev Bootcamp. All rights reserved.
//
import UIKit
class WhosNextVC: UIViewController {
var url: String!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
| //
// WhosNextVC.swift
// Perspective
//
// Created by Apprentice on 2/17/15.
// Copyright (c) 2015 Dev Bootcamp. All rights reserved.
//
import UIKit
class WhosNextVC: UIViewController {
+
+ var url: String!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
} | 2 | 0.057143 | 2 | 0 |
fa9663eedc829046d80d168f4a9a8ad59ed0cb82 | CHANGELOG.md | CHANGELOG.md |
* Initial release.
|
* Add an option for a detach_if callable, which can contain logic to
determine whether to remove an object from the pool.
### 0.1.0 (2014-02-14)
* Initial release.
| Update changelog for detach_if feature. | Update changelog for detach_if feature.
| Markdown | mit | chanks/pond | markdown | ## Code Before:
* Initial release.
## Instruction:
Update changelog for detach_if feature.
## Code After:
* Add an option for a detach_if callable, which can contain logic to
determine whether to remove an object from the pool.
### 0.1.0 (2014-02-14)
* Initial release.
| +
+ * Add an option for a detach_if callable, which can contain logic to
+ determine whether to remove an object from the pool.
+
+ ### 0.1.0 (2014-02-14)
* Initial release. | 5 | 2.5 | 5 | 0 |
cdb4117f49160090e06b69e6d393199a35a77654 | src/Random/Engine/LinearCongruentialEngine.php | src/Random/Engine/LinearCongruentialEngine.php | <?php
/**
* This file is part of the Random.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Random\Engine;
class LinearCongruentialEngine extends AbstractEngine
{
const DEFAULT_SEED = 1;
/**
* @var integer
*/
private $a;
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $x;
/**
* @param integer $a
* @param integer $c
* @param integer $m
* @param integer $s
*/
public function __construct($a, $c, $m, $s = self::DEFAULT_SEED)
{
$this->a = $a;
$this->c = $c;
$this->m = $m;
$this->seed($s);
}
/**
* {@inheritdoc}
*/
public function max()
{
return $this->m - 1;
}
/**
* {@inheritdoc}
*/
public function min()
{
return $this->c == 0 ? 1 : 0;
}
/**
* {@inheritdoc}
*/
public function next()
{
return $this->x = ($this->a * $this->x + $this->c) % $this->m;
}
/**
* {@inheritdoc}
*/
public function seed($seed)
{
$this->x = $seed;
}
}
| <?php
/**
* This file is part of the Random.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Random\Engine;
class LinearCongruentialEngine extends AbstractEngine
{
const DEFAULT_SEED = 1;
/**
* @var integer
*/
private $a;
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $x;
/**
* @param integer $a
* @param integer $c
* @param integer $m
* @param integer $s
*/
public function __construct($a, $c, $m, $s = self::DEFAULT_SEED)
{
$this->a = $a;
$this->c = $c;
$this->m = $m;
$this->seed($s);
}
/**
* {@inheritdoc}
*/
public function max()
{
return $this->m - 1;
}
/**
* {@inheritdoc}
*/
public function min()
{
return $this->c == 0 ? 1 : 0;
}
/**
* {@inheritdoc}
*/
public function next()
{
return $this->x = (int) fmod($this->a * $this->x + $this->c, $this->m);
}
/**
* {@inheritdoc}
*/
public function seed($seed)
{
$this->x = $seed;
}
}
| Fix % overflow on 32 bit systems | Fix % overflow on 32 bit systems
See http://php.net/manual/en/function.fmod.php
Partially fixes #1 | PHP | mit | emonkak/php-random | php | ## Code Before:
<?php
/**
* This file is part of the Random.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Random\Engine;
class LinearCongruentialEngine extends AbstractEngine
{
const DEFAULT_SEED = 1;
/**
* @var integer
*/
private $a;
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $x;
/**
* @param integer $a
* @param integer $c
* @param integer $m
* @param integer $s
*/
public function __construct($a, $c, $m, $s = self::DEFAULT_SEED)
{
$this->a = $a;
$this->c = $c;
$this->m = $m;
$this->seed($s);
}
/**
* {@inheritdoc}
*/
public function max()
{
return $this->m - 1;
}
/**
* {@inheritdoc}
*/
public function min()
{
return $this->c == 0 ? 1 : 0;
}
/**
* {@inheritdoc}
*/
public function next()
{
return $this->x = ($this->a * $this->x + $this->c) % $this->m;
}
/**
* {@inheritdoc}
*/
public function seed($seed)
{
$this->x = $seed;
}
}
## Instruction:
Fix % overflow on 32 bit systems
See http://php.net/manual/en/function.fmod.php
Partially fixes #1
## Code After:
<?php
/**
* This file is part of the Random.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Random\Engine;
class LinearCongruentialEngine extends AbstractEngine
{
const DEFAULT_SEED = 1;
/**
* @var integer
*/
private $a;
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $x;
/**
* @param integer $a
* @param integer $c
* @param integer $m
* @param integer $s
*/
public function __construct($a, $c, $m, $s = self::DEFAULT_SEED)
{
$this->a = $a;
$this->c = $c;
$this->m = $m;
$this->seed($s);
}
/**
* {@inheritdoc}
*/
public function max()
{
return $this->m - 1;
}
/**
* {@inheritdoc}
*/
public function min()
{
return $this->c == 0 ? 1 : 0;
}
/**
* {@inheritdoc}
*/
public function next()
{
return $this->x = (int) fmod($this->a * $this->x + $this->c, $this->m);
}
/**
* {@inheritdoc}
*/
public function seed($seed)
{
$this->x = $seed;
}
}
| <?php
/**
* This file is part of the Random.php package.
*
* Copyright (C) 2013 Shota Nozaki <emonkak@gmail.com>
*
* Licensed under the MIT License
*/
namespace Random\Engine;
class LinearCongruentialEngine extends AbstractEngine
{
const DEFAULT_SEED = 1;
/**
* @var integer
*/
private $a;
/**
* @var integer
*/
private $c;
/**
* @var integer
*/
private $m;
/**
* @var integer
*/
private $x;
/**
* @param integer $a
* @param integer $c
* @param integer $m
* @param integer $s
*/
public function __construct($a, $c, $m, $s = self::DEFAULT_SEED)
{
$this->a = $a;
$this->c = $c;
$this->m = $m;
$this->seed($s);
}
/**
* {@inheritdoc}
*/
public function max()
{
return $this->m - 1;
}
/**
* {@inheritdoc}
*/
public function min()
{
return $this->c == 0 ? 1 : 0;
}
/**
* {@inheritdoc}
*/
public function next()
{
- return $this->x = ($this->a * $this->x + $this->c) % $this->m;
? ^^^
+ return $this->x = (int) fmod($this->a * $this->x + $this->c, $this->m);
? ++++++++++ ^ +
}
/**
* {@inheritdoc}
*/
public function seed($seed)
{
$this->x = $seed;
}
} | 2 | 0.02439 | 1 | 1 |
78263f26bfd9a1eac67ca1c0ac003c23f5116985 | README.md | README.md | wlanscan
========
Trigger scans for wireless networks, show visible networks, and list established connection profiles.
Output from /?:
```
WlanScan - A small utility for triggering scans for wireless networks.
/triggerscan Triggers a scan for wireless networks.
/shownetworks Shows visible wireless networks.
/showprofiles Shows saved wireless network profiles.
Version: 0.0.1
```
The x86 binary was compiled with Visual Studio 2013, so you'll need the [Visual C++ 2013 redistributables](http://www.microsoft.com/en-us/download/details.aspx?id=40784) installed to run it as is. Of course, you can also compile wlanscan.cpp with the compiler of your choice as well.
I wrote this when I couldn't find an existing tool to scan for wireless networks. The built-in Windows netsh.exe won't actually trigger a new scan, it can only show previously-found networks which may be stale.
Features like parsing profiles ended up in there as this also became a fun introduction to Wlan apis :)
| wlanscan
========
Trigger scans for wireless networks, show visible networks, and list established connection profiles.
Output from /?:
```
WlanScan - A small utility for triggering scans for wireless networks.
/triggerscan Triggers a scan for wireless networks.
/shownetworks Shows visible wireless networks.
/showprofiles Shows saved wireless network profiles.
Version: 0.0.1
```
The x86 binary was compiled with Visual Studio 2013, so you'll need the [Visual C++ 2013 redistributables](http://www.microsoft.com/en-us/download/details.aspx?id=40784) installed to run it as is. Of course, you can also compile wlanscan.cpp with the compiler of your choice as well.
I wrote this when I couldn't find an existing tool to scan for wireless networks. The built-in Windows netsh.exe won't actually trigger a new scan, it can only show previously-found networks which may be stale.
Features like parsing profiles ended up in there as this also became a fun introduction to Wlan apis :)
Compiling from command line:
```
cl /EHsc wlanscan.cpp pugixml.cpp Advapi32.lib
```
| Add command line compilation command | Add command line compilation command | Markdown | mit | lemavri/wlanscan | markdown | ## Code Before:
wlanscan
========
Trigger scans for wireless networks, show visible networks, and list established connection profiles.
Output from /?:
```
WlanScan - A small utility for triggering scans for wireless networks.
/triggerscan Triggers a scan for wireless networks.
/shownetworks Shows visible wireless networks.
/showprofiles Shows saved wireless network profiles.
Version: 0.0.1
```
The x86 binary was compiled with Visual Studio 2013, so you'll need the [Visual C++ 2013 redistributables](http://www.microsoft.com/en-us/download/details.aspx?id=40784) installed to run it as is. Of course, you can also compile wlanscan.cpp with the compiler of your choice as well.
I wrote this when I couldn't find an existing tool to scan for wireless networks. The built-in Windows netsh.exe won't actually trigger a new scan, it can only show previously-found networks which may be stale.
Features like parsing profiles ended up in there as this also became a fun introduction to Wlan apis :)
## Instruction:
Add command line compilation command
## Code After:
wlanscan
========
Trigger scans for wireless networks, show visible networks, and list established connection profiles.
Output from /?:
```
WlanScan - A small utility for triggering scans for wireless networks.
/triggerscan Triggers a scan for wireless networks.
/shownetworks Shows visible wireless networks.
/showprofiles Shows saved wireless network profiles.
Version: 0.0.1
```
The x86 binary was compiled with Visual Studio 2013, so you'll need the [Visual C++ 2013 redistributables](http://www.microsoft.com/en-us/download/details.aspx?id=40784) installed to run it as is. Of course, you can also compile wlanscan.cpp with the compiler of your choice as well.
I wrote this when I couldn't find an existing tool to scan for wireless networks. The built-in Windows netsh.exe won't actually trigger a new scan, it can only show previously-found networks which may be stale.
Features like parsing profiles ended up in there as this also became a fun introduction to Wlan apis :)
Compiling from command line:
```
cl /EHsc wlanscan.cpp pugixml.cpp Advapi32.lib
```
| wlanscan
========
Trigger scans for wireless networks, show visible networks, and list established connection profiles.
Output from /?:
```
WlanScan - A small utility for triggering scans for wireless networks.
/triggerscan Triggers a scan for wireless networks.
/shownetworks Shows visible wireless networks.
/showprofiles Shows saved wireless network profiles.
Version: 0.0.1
```
The x86 binary was compiled with Visual Studio 2013, so you'll need the [Visual C++ 2013 redistributables](http://www.microsoft.com/en-us/download/details.aspx?id=40784) installed to run it as is. Of course, you can also compile wlanscan.cpp with the compiler of your choice as well.
I wrote this when I couldn't find an existing tool to scan for wireless networks. The built-in Windows netsh.exe won't actually trigger a new scan, it can only show previously-found networks which may be stale.
Features like parsing profiles ended up in there as this also became a fun introduction to Wlan apis :)
+
+ Compiling from command line:
+
+ ```
+ cl /EHsc wlanscan.cpp pugixml.cpp Advapi32.lib
+ ``` | 6 | 0.25 | 6 | 0 |
51cf7cd177b797750bd90a504b42457f476194a1 | i18n-tracking.yml | i18n-tracking.yml | es:
src/data/en.yml:
line 399: ''
line 400: reference
line 401: Reference
zh-Hans:
src/data/en.yml:
line 399: ''
line 400: reference
line 401: Reference
| es:
src/data/en.yml:
zh-Hans:
src/data/en.yml:
| Clean up translation tracking file | Clean up translation tracking file
| YAML | mit | processing/p5.js-website,processing/p5.js-website | yaml | ## Code Before:
es:
src/data/en.yml:
line 399: ''
line 400: reference
line 401: Reference
zh-Hans:
src/data/en.yml:
line 399: ''
line 400: reference
line 401: Reference
## Instruction:
Clean up translation tracking file
## Code After:
es:
src/data/en.yml:
zh-Hans:
src/data/en.yml:
| es:
src/data/en.yml:
- line 399: ''
- line 400: reference
- line 401: Reference
zh-Hans:
src/data/en.yml:
- line 399: ''
- line 400: reference
- line 401: Reference | 6 | 0.6 | 0 | 6 |
1df23176deed64c05dfc537593bb9cda4b54a1e8 | app/javascript/app/components/web-tour/web-tour-styles.scss | app/javascript/app/components/web-tour/web-tour-styles.scss | @import '~styles/layout.scss';
.webTour {
.title {
font-size: $font-size;
margin-bottom: 10px;
}
.description {
margin-bottom: 10px;
}
.arrow {
height: 10px;
width: 10px;
&.leftArrow {
transform: rotate(180deg);
}
}
.nextButton {
background-color: $gray3;
position: absolute;
right: 32px;
bottom: 15px;
height: 25px;
width: 25px;
border-radius: 0 3px 3px 0;
cursor: pointer;
&:hover {
&:not(.disabled) {
background-color: $gray2;
}
}
}
.bold {
font-weight: $font-weight;
}
.prevButton {
@extend .nextButton;
right: 58px;
border-radius: 3px 0 0 3px;
}
.disabled {
opacity: 0.5;
cursor: default;
}
}
| @import '~styles/layout.scss';
.webTour {
.title {
font-size: $font-size;
margin-bottom: 10px;
}
.description {
margin-bottom: 10px;
}
.arrow {
height: 10px;
width: 10px;
&.leftArrow {
transform: rotate(180deg);
}
}
.nextButton {
background-color: $gray3;
position: absolute;
right: 21px;
bottom: 15px;
height: 35px;
width: 35px;
border-radius: 0 3px 3px 0;
cursor: pointer;
&:hover {
&:not(.disabled) {
background-color: $gray2;
}
}
}
.bold {
font-weight: $font-weight;
}
.prevButton {
@extend .nextButton;
right: 58px;
border-radius: 3px 0 0 3px;
}
.disabled {
opacity: 0.5;
cursor: default;
}
}
:global .reactour__dot {
width: 14px;
height: 14px;
}
| Make buttons and dots bigger | Make buttons and dots bigger
| SCSS | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | scss | ## Code Before:
@import '~styles/layout.scss';
.webTour {
.title {
font-size: $font-size;
margin-bottom: 10px;
}
.description {
margin-bottom: 10px;
}
.arrow {
height: 10px;
width: 10px;
&.leftArrow {
transform: rotate(180deg);
}
}
.nextButton {
background-color: $gray3;
position: absolute;
right: 32px;
bottom: 15px;
height: 25px;
width: 25px;
border-radius: 0 3px 3px 0;
cursor: pointer;
&:hover {
&:not(.disabled) {
background-color: $gray2;
}
}
}
.bold {
font-weight: $font-weight;
}
.prevButton {
@extend .nextButton;
right: 58px;
border-radius: 3px 0 0 3px;
}
.disabled {
opacity: 0.5;
cursor: default;
}
}
## Instruction:
Make buttons and dots bigger
## Code After:
@import '~styles/layout.scss';
.webTour {
.title {
font-size: $font-size;
margin-bottom: 10px;
}
.description {
margin-bottom: 10px;
}
.arrow {
height: 10px;
width: 10px;
&.leftArrow {
transform: rotate(180deg);
}
}
.nextButton {
background-color: $gray3;
position: absolute;
right: 21px;
bottom: 15px;
height: 35px;
width: 35px;
border-radius: 0 3px 3px 0;
cursor: pointer;
&:hover {
&:not(.disabled) {
background-color: $gray2;
}
}
}
.bold {
font-weight: $font-weight;
}
.prevButton {
@extend .nextButton;
right: 58px;
border-radius: 3px 0 0 3px;
}
.disabled {
opacity: 0.5;
cursor: default;
}
}
:global .reactour__dot {
width: 14px;
height: 14px;
}
| @import '~styles/layout.scss';
.webTour {
.title {
font-size: $font-size;
margin-bottom: 10px;
}
.description {
margin-bottom: 10px;
}
.arrow {
height: 10px;
width: 10px;
&.leftArrow {
transform: rotate(180deg);
}
}
.nextButton {
background-color: $gray3;
position: absolute;
- right: 32px;
? -
+ right: 21px;
? +
bottom: 15px;
- height: 25px;
? ^
+ height: 35px;
? ^
- width: 25px;
? ^
+ width: 35px;
? ^
border-radius: 0 3px 3px 0;
cursor: pointer;
&:hover {
&:not(.disabled) {
background-color: $gray2;
}
}
}
.bold {
font-weight: $font-weight;
}
.prevButton {
@extend .nextButton;
right: 58px;
border-radius: 3px 0 0 3px;
}
.disabled {
opacity: 0.5;
cursor: default;
}
}
+
+ :global .reactour__dot {
+ width: 14px;
+ height: 14px;
+ } | 11 | 0.203704 | 8 | 3 |
d606c5ac7b0f85f9611b9fe08f5b4bee5e62be49 | _includes/sidebar.html | _includes/sidebar.html | <div class="sidebar-container col-md-3">
<ul class="sidebar-content">
{% if site.categories %}
<li class="collapsed active" data-toggle="collapse" data-target="#categories">
<a href="#">Categories</a>
</li>
<ul id="categories" class="sub-menu collapse in">
{% for category in site.categories %}
<li><a href="{{ category | first | downcase | prepend: "/" | prepend: site.baseurl }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
<hr />
<a href="{{ "/index.html" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
</div><!-- .sidebar-container -->
<!-- Search result template -->
<script type="text/x-template" id="search-result">
<div>
<h2><a class="post-link" href="##Url##">##Title##</a></h2>
<p class="post-meta">Posted ##Date## | By ##Author## in <b class="highlight-violet-red">##Category##</b></p>
<p class="post-blurb">##Blurb##</p>
##Tags##
</div>
</script>
| <div class="sidebar-container col-md-3">
<ul class="sidebar-content">
{% if site.categories %}
<li class="collapsed active" data-toggle="collapse" data-target="#categories">
<a href="#">Categories</a>
</li>
<ul id="categories" class="sub-menu collapse in">
{% for category in site.categories %}
<li><a href="{{ category | first | downcase | prepend: "/" | prepend: site.baseurl }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
<hr />
<a href="{{ "/" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
</div><!-- .sidebar-container -->
<!-- Search result template -->
<script type="text/x-template" id="search-result">
<div>
<h2><a class="post-link" href="##Url##">##Title##</a></h2>
<p class="post-meta">Posted ##Date## | By ##Author## in <b class="highlight-violet-red">##Category##</b></p>
<p class="post-blurb">##Blurb##</p>
##Tags##
</div>
</script>
| Change path of all posts button. | Change path of all posts button.
| HTML | apache-2.0 | uhm-coe/assist,uhm-coe/assist,uhm-coe/assist,uhm-coe/assist | html | ## Code Before:
<div class="sidebar-container col-md-3">
<ul class="sidebar-content">
{% if site.categories %}
<li class="collapsed active" data-toggle="collapse" data-target="#categories">
<a href="#">Categories</a>
</li>
<ul id="categories" class="sub-menu collapse in">
{% for category in site.categories %}
<li><a href="{{ category | first | downcase | prepend: "/" | prepend: site.baseurl }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
<hr />
<a href="{{ "/index.html" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
</div><!-- .sidebar-container -->
<!-- Search result template -->
<script type="text/x-template" id="search-result">
<div>
<h2><a class="post-link" href="##Url##">##Title##</a></h2>
<p class="post-meta">Posted ##Date## | By ##Author## in <b class="highlight-violet-red">##Category##</b></p>
<p class="post-blurb">##Blurb##</p>
##Tags##
</div>
</script>
## Instruction:
Change path of all posts button.
## Code After:
<div class="sidebar-container col-md-3">
<ul class="sidebar-content">
{% if site.categories %}
<li class="collapsed active" data-toggle="collapse" data-target="#categories">
<a href="#">Categories</a>
</li>
<ul id="categories" class="sub-menu collapse in">
{% for category in site.categories %}
<li><a href="{{ category | first | downcase | prepend: "/" | prepend: site.baseurl }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
<hr />
<a href="{{ "/" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
</div><!-- .sidebar-container -->
<!-- Search result template -->
<script type="text/x-template" id="search-result">
<div>
<h2><a class="post-link" href="##Url##">##Title##</a></h2>
<p class="post-meta">Posted ##Date## | By ##Author## in <b class="highlight-violet-red">##Category##</b></p>
<p class="post-blurb">##Blurb##</p>
##Tags##
</div>
</script>
| <div class="sidebar-container col-md-3">
<ul class="sidebar-content">
{% if site.categories %}
<li class="collapsed active" data-toggle="collapse" data-target="#categories">
<a href="#">Categories</a>
</li>
<ul id="categories" class="sub-menu collapse in">
{% for category in site.categories %}
<li><a href="{{ category | first | downcase | prepend: "/" | prepend: site.baseurl }}">{{ category | first }}</a></li>
{% endfor %}
</ul>
{% endif %}
</ul>
<hr />
- <a href="{{ "/index.html" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
? ----------
+ <a href="{{ "/" | prepend: site.baseurl }}" class="btn btn-info">All Posts</a>
</div><!-- .sidebar-container -->
<!-- Search result template -->
<script type="text/x-template" id="search-result">
<div>
<h2><a class="post-link" href="##Url##">##Title##</a></h2>
<p class="post-meta">Posted ##Date## | By ##Author## in <b class="highlight-violet-red">##Category##</b></p>
<p class="post-blurb">##Blurb##</p>
##Tags##
</div>
</script> | 2 | 0.076923 | 1 | 1 |
0d1ac2a416d4a9b3a0f86b527a0ae9488115e21b | activity/activity.go | activity/activity.go | package activity
import (
"reflect"
"time"
"github.com/tolexo/aero/activity/model"
"github.com/tolexo/aero/db/tmongo"
mgo "gopkg.in/mgo.v2"
)
const (
DB_CONTAINER = "database.omni"
)
//Log User activity
func LogActivity(url string, body interface{},
resp reflect.Value, respCode int, respTime float64) {
apiDetail := model.APIDetail{
Url: url,
Body: body,
Resp: resp.Interface(),
RespCode: respCode,
RespTime: respTime,
Time: time.Now(),
}
if sess, mdb, err := tmongo.GetMongoConn(DB_CONTAINER); err == nil {
defer sess.Close()
sess.SetSafe(&mgo.Safe{W: 0})
sess.DB(mdb).C("activity").Insert(apiDetail)
}
}
| package activity
import (
"time"
"github.com/tolexo/aero/activity/model"
"github.com/tolexo/aero/db/tmongo"
mgo "gopkg.in/mgo.v2"
)
const (
DB_CONTAINER = "database.omni"
)
//Log User activity
func LogActivity(url string, body interface{},
resp interface{}, respCode int, respTime float64) {
apiDetail := model.APIDetail{
Url: url,
Body: body,
Resp: resp,
RespCode: respCode,
RespTime: respTime,
Time: time.Now(),
}
if sess, mdb, err := tmongo.GetMongoConn(DB_CONTAINER); err == nil {
defer sess.Close()
sess.SetSafe(&mgo.Safe{W: 0})
sess.DB(mdb).C("activity").Insert(apiDetail)
}
}
| Revert "Revert "PRA-410: resp changed to interface"" | Revert "Revert "PRA-410: resp changed to interface""
This reverts commit d12fdf8244766409cf0afba7eab9eeb75e0f2708.
| Go | mit | tolexo/aero | go | ## Code Before:
package activity
import (
"reflect"
"time"
"github.com/tolexo/aero/activity/model"
"github.com/tolexo/aero/db/tmongo"
mgo "gopkg.in/mgo.v2"
)
const (
DB_CONTAINER = "database.omni"
)
//Log User activity
func LogActivity(url string, body interface{},
resp reflect.Value, respCode int, respTime float64) {
apiDetail := model.APIDetail{
Url: url,
Body: body,
Resp: resp.Interface(),
RespCode: respCode,
RespTime: respTime,
Time: time.Now(),
}
if sess, mdb, err := tmongo.GetMongoConn(DB_CONTAINER); err == nil {
defer sess.Close()
sess.SetSafe(&mgo.Safe{W: 0})
sess.DB(mdb).C("activity").Insert(apiDetail)
}
}
## Instruction:
Revert "Revert "PRA-410: resp changed to interface""
This reverts commit d12fdf8244766409cf0afba7eab9eeb75e0f2708.
## Code After:
package activity
import (
"time"
"github.com/tolexo/aero/activity/model"
"github.com/tolexo/aero/db/tmongo"
mgo "gopkg.in/mgo.v2"
)
const (
DB_CONTAINER = "database.omni"
)
//Log User activity
func LogActivity(url string, body interface{},
resp interface{}, respCode int, respTime float64) {
apiDetail := model.APIDetail{
Url: url,
Body: body,
Resp: resp,
RespCode: respCode,
RespTime: respTime,
Time: time.Now(),
}
if sess, mdb, err := tmongo.GetMongoConn(DB_CONTAINER); err == nil {
defer sess.Close()
sess.SetSafe(&mgo.Safe{W: 0})
sess.DB(mdb).C("activity").Insert(apiDetail)
}
}
| package activity
import (
- "reflect"
"time"
"github.com/tolexo/aero/activity/model"
"github.com/tolexo/aero/db/tmongo"
mgo "gopkg.in/mgo.v2"
)
const (
DB_CONTAINER = "database.omni"
)
//Log User activity
func LogActivity(url string, body interface{},
- resp reflect.Value, respCode int, respTime float64) {
? ^^^^^^^^^^^
+ resp interface{}, respCode int, respTime float64) {
? ++++ +++ ^^
apiDetail := model.APIDetail{
Url: url,
Body: body,
- Resp: resp.Interface(),
+ Resp: resp,
RespCode: respCode,
RespTime: respTime,
Time: time.Now(),
}
if sess, mdb, err := tmongo.GetMongoConn(DB_CONTAINER); err == nil {
defer sess.Close()
sess.SetSafe(&mgo.Safe{W: 0})
sess.DB(mdb).C("activity").Insert(apiDetail)
}
} | 5 | 0.15625 | 2 | 3 |
d32ff2d7599eb1899ac8c74e590f7f8c05163e24 | README.md | README.md |
Radium is a toolchain for handling modifiers, states, computed styles and
responsive styles for react component styling. It allows you to handle complex
component styling in a declarative, easy to write way. Component styling in
React provides a number of benefits over traditional CSS:
- Scoped styles, meaning no more global variables
- Avoids specificity conflicts
- Source order independence
- Dead code elimination
- Highly expressive
Inspired by <a href="https://speakerdeck.com/vjeux/react-css-in-js">React: CSS
in JS</a> by <a href="https://twitter.com/Vjeux">Christopher Chedeau</a>.
## What does it look like?
Write a style object and you're done:
```
Code example
```
|
Radium is a toolchain for handling modifiers, states, computed styles and
responsive styles for react component styling. It allows you to handle complex
component styling in a declarative, easy to write way. Component styling in
React provides a number of benefits over traditional CSS:
- Scoped styles, meaning no more global variables
- Avoids specificity conflicts
- Source order independence
- Dead code elimination
- Highly expressive
Inspired by <a href="https://speakerdeck.com/vjeux/react-css-in-js">React: CSS
in JS</a> by <a href="https://twitter.com/Vjeux">Christopher Chedeau</a>.
## What does it look like?
Write a style object and you're done:
```
Code example
```
## Examples
To see local examples in action, do this:
```
npm install
npm run examples
```
| Add examples note to readme | Add examples note to readme
| Markdown | mit | moret/radium,andyhite/radium,almost/radium,bencao/radium,rolandpoulter/radium,Cottin/radium,KenPowers/radium,richardfickling/radium,yetone/radium,azazdeaz/radium,azazdeaz/radium,bencao/radium,MicheleBertoli/radium,clessg/radium,clessg/radium,dabbott/radium,KenPowers/radium,andyhite/radium,bobbyrenwick/radium,kof/radium,jurgob/radium,haridusenadeera/radium,Cottin/radium,yetone/radium,basarat/radium,nfl/radium,haridusenadeera/radium,lexical-labs/radium,AnSavvides/radium,WillJHaggard/radium,rolandpoulter/radium,namuol/radium-insert-rule,FormidableLabs/radium | markdown | ## Code Before:
Radium is a toolchain for handling modifiers, states, computed styles and
responsive styles for react component styling. It allows you to handle complex
component styling in a declarative, easy to write way. Component styling in
React provides a number of benefits over traditional CSS:
- Scoped styles, meaning no more global variables
- Avoids specificity conflicts
- Source order independence
- Dead code elimination
- Highly expressive
Inspired by <a href="https://speakerdeck.com/vjeux/react-css-in-js">React: CSS
in JS</a> by <a href="https://twitter.com/Vjeux">Christopher Chedeau</a>.
## What does it look like?
Write a style object and you're done:
```
Code example
```
## Instruction:
Add examples note to readme
## Code After:
Radium is a toolchain for handling modifiers, states, computed styles and
responsive styles for react component styling. It allows you to handle complex
component styling in a declarative, easy to write way. Component styling in
React provides a number of benefits over traditional CSS:
- Scoped styles, meaning no more global variables
- Avoids specificity conflicts
- Source order independence
- Dead code elimination
- Highly expressive
Inspired by <a href="https://speakerdeck.com/vjeux/react-css-in-js">React: CSS
in JS</a> by <a href="https://twitter.com/Vjeux">Christopher Chedeau</a>.
## What does it look like?
Write a style object and you're done:
```
Code example
```
## Examples
To see local examples in action, do this:
```
npm install
npm run examples
```
|
Radium is a toolchain for handling modifiers, states, computed styles and
responsive styles for react component styling. It allows you to handle complex
component styling in a declarative, easy to write way. Component styling in
React provides a number of benefits over traditional CSS:
- Scoped styles, meaning no more global variables
- Avoids specificity conflicts
- Source order independence
- Dead code elimination
- Highly expressive
Inspired by <a href="https://speakerdeck.com/vjeux/react-css-in-js">React: CSS
in JS</a> by <a href="https://twitter.com/Vjeux">Christopher Chedeau</a>.
## What does it look like?
Write a style object and you're done:
```
Code example
```
+
+ ## Examples
+
+ To see local examples in action, do this:
+
+ ```
+ npm install
+ npm run examples
+ ``` | 9 | 0.409091 | 9 | 0 |
a451e50a75d7ee01d72d34c680c9d948c4fde14f | controller/users-admin/server.js | controller/users-admin/server.js | 'use strict';
var assign = require('es5-ext/object/assign')
, promisify = require('deferred').promisify
, bcrypt = require('bcrypt')
, dbjsCreate = require('mano/lib/utils/dbjs-form-create')
, router = require('mano/server/post-router')
, changePassword = require('mano-auth/controller/server/change-password').submit
, dbObjects = require('mano').db.objects
, genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash)
, submit = router.submit;
// Common
assign(exports, require('../user/server'));
// Add User
exports['user-add'] = {
submit: function (data) {
return hash(data['User#/password'], genSalt())(function (password) {
data['User#/password'] = password;
this.target = dbjsCreate(data);
}.bind(this));
}
};
// Edit User
exports['user/[0-9][a-z0-9]+'] = {
submit: function (normalizedData, data) {
if (this.propertyKey) return changePassword.apply(this, arguments);
return submit.apply(this, arguments);
}
};
// Delete User
exports['user/[0-9][a-z0-9]+/delete'] = {
submit: function () { dbObjects.delete(this.target); }
};
| 'use strict';
var assign = require('es5-ext/object/assign')
, promisify = require('deferred').promisify
, bcrypt = require('bcrypt')
, dbjsCreate = require('mano/lib/utils/dbjs-form-create')
, submit = require('mano/utils/save')
, changePassword = require('mano-auth/controller/server/change-password').submit
, dbObjects = require('mano').db.objects
, genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash);
// Common
assign(exports, require('../user/server'));
// Add User
exports['user-add'] = {
submit: function (data) {
return hash(data['User#/password'], genSalt())(function (password) {
data['User#/password'] = password;
this.target = dbjsCreate(data);
}.bind(this));
}
};
// Edit User
exports['user/[0-9][a-z0-9]+'] = {
submit: function (normalizedData, data) {
if (this.propertyKey) return changePassword.apply(this, arguments);
return submit.apply(this, arguments);
}
};
// Delete User
exports['user/[0-9][a-z0-9]+/delete'] = {
submit: function () { dbObjects.delete(this.target); }
};
| Fix resolution of submit function | Fix resolution of submit function
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | javascript | ## Code Before:
'use strict';
var assign = require('es5-ext/object/assign')
, promisify = require('deferred').promisify
, bcrypt = require('bcrypt')
, dbjsCreate = require('mano/lib/utils/dbjs-form-create')
, router = require('mano/server/post-router')
, changePassword = require('mano-auth/controller/server/change-password').submit
, dbObjects = require('mano').db.objects
, genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash)
, submit = router.submit;
// Common
assign(exports, require('../user/server'));
// Add User
exports['user-add'] = {
submit: function (data) {
return hash(data['User#/password'], genSalt())(function (password) {
data['User#/password'] = password;
this.target = dbjsCreate(data);
}.bind(this));
}
};
// Edit User
exports['user/[0-9][a-z0-9]+'] = {
submit: function (normalizedData, data) {
if (this.propertyKey) return changePassword.apply(this, arguments);
return submit.apply(this, arguments);
}
};
// Delete User
exports['user/[0-9][a-z0-9]+/delete'] = {
submit: function () { dbObjects.delete(this.target); }
};
## Instruction:
Fix resolution of submit function
## Code After:
'use strict';
var assign = require('es5-ext/object/assign')
, promisify = require('deferred').promisify
, bcrypt = require('bcrypt')
, dbjsCreate = require('mano/lib/utils/dbjs-form-create')
, submit = require('mano/utils/save')
, changePassword = require('mano-auth/controller/server/change-password').submit
, dbObjects = require('mano').db.objects
, genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash);
// Common
assign(exports, require('../user/server'));
// Add User
exports['user-add'] = {
submit: function (data) {
return hash(data['User#/password'], genSalt())(function (password) {
data['User#/password'] = password;
this.target = dbjsCreate(data);
}.bind(this));
}
};
// Edit User
exports['user/[0-9][a-z0-9]+'] = {
submit: function (normalizedData, data) {
if (this.propertyKey) return changePassword.apply(this, arguments);
return submit.apply(this, arguments);
}
};
// Delete User
exports['user/[0-9][a-z0-9]+/delete'] = {
submit: function () { dbObjects.delete(this.target); }
};
| 'use strict';
var assign = require('es5-ext/object/assign')
, promisify = require('deferred').promisify
, bcrypt = require('bcrypt')
, dbjsCreate = require('mano/lib/utils/dbjs-form-create')
- , router = require('mano/server/post-router')
+ , submit = require('mano/utils/save')
, changePassword = require('mano-auth/controller/server/change-password').submit
, dbObjects = require('mano').db.objects
- , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash)
+ , genSalt = promisify(bcrypt.genSalt), hash = promisify(bcrypt.hash);
? +
- , submit = router.submit;
// Common
assign(exports, require('../user/server'));
// Add User
exports['user-add'] = {
submit: function (data) {
return hash(data['User#/password'], genSalt())(function (password) {
data['User#/password'] = password;
this.target = dbjsCreate(data);
}.bind(this));
}
};
// Edit User
exports['user/[0-9][a-z0-9]+'] = {
submit: function (normalizedData, data) {
if (this.propertyKey) return changePassword.apply(this, arguments);
return submit.apply(this, arguments);
}
};
// Delete User
exports['user/[0-9][a-z0-9]+/delete'] = {
submit: function () { dbObjects.delete(this.target); }
}; | 5 | 0.131579 | 2 | 3 |
19ebe931c73b62e2ff4e0caf6f49ddf715429496 | views/vote.jade | views/vote.jade | extends layout
block content
.page-header
h1 Vote
p Drag and drop to rank the countries in order of preference!
script(src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js")
script(src="javascripts/jquery-ui-1.10.4.custom.min.js")
script(src="javascripts/jquery.ui.touchpunch.min.js")
form#vote-form(action="/")
ul#sortable.list-unstyled(data-role="listview")
- each country in countries
li(id=country.id)
p.bg-info #{country.name}
p
input(type="submit" value="Submit").btn.btn-primary.btn-lg
script(src="javascripts/vote-form.js" type="text/javascript" charset="utf-8")
| extends layout
block content
.page-header
h1 Vote
p Drag and drop to rank the countries in order of preference!
script(src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js")
script(src="javascripts/jquery-ui-1.10.4.custom.min.js")
script(src="javascripts/jquery.ui.touchpunch.min.js")
form#vote-form(action="/")
ul#sortable.list-unstyled(data-role="listview")
- each country in countries
li(id=country.id).ui-state-default
p.bg-info #{country.name}
p
input(type="submit" value="Submit").btn.btn-primary.btn-lg
script(src="javascripts/vote-form.js" type="text/javascript" charset="utf-8")
| Add ui-state-default to list items | Add ui-state-default to list items
| Jade | mit | fmcgough/eurovote,fmcgough/eurovote | jade | ## Code Before:
extends layout
block content
.page-header
h1 Vote
p Drag and drop to rank the countries in order of preference!
script(src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js")
script(src="javascripts/jquery-ui-1.10.4.custom.min.js")
script(src="javascripts/jquery.ui.touchpunch.min.js")
form#vote-form(action="/")
ul#sortable.list-unstyled(data-role="listview")
- each country in countries
li(id=country.id)
p.bg-info #{country.name}
p
input(type="submit" value="Submit").btn.btn-primary.btn-lg
script(src="javascripts/vote-form.js" type="text/javascript" charset="utf-8")
## Instruction:
Add ui-state-default to list items
## Code After:
extends layout
block content
.page-header
h1 Vote
p Drag and drop to rank the countries in order of preference!
script(src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js")
script(src="javascripts/jquery-ui-1.10.4.custom.min.js")
script(src="javascripts/jquery.ui.touchpunch.min.js")
form#vote-form(action="/")
ul#sortable.list-unstyled(data-role="listview")
- each country in countries
li(id=country.id).ui-state-default
p.bg-info #{country.name}
p
input(type="submit" value="Submit").btn.btn-primary.btn-lg
script(src="javascripts/vote-form.js" type="text/javascript" charset="utf-8")
| extends layout
block content
.page-header
h1 Vote
p Drag and drop to rank the countries in order of preference!
script(src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js")
script(src="javascripts/jquery-ui-1.10.4.custom.min.js")
script(src="javascripts/jquery.ui.touchpunch.min.js")
form#vote-form(action="/")
ul#sortable.list-unstyled(data-role="listview")
- each country in countries
- li(id=country.id)
+ li(id=country.id).ui-state-default
? +++++++++++++++++
p.bg-info #{country.name}
p
input(type="submit" value="Submit").btn.btn-primary.btn-lg
script(src="javascripts/vote-form.js" type="text/javascript" charset="utf-8") | 2 | 0.1 | 1 | 1 |
9b03391b6fd53f7c744ae5a30437f3f916ad0a9e | .travis.yml | .travis.yml | language: cpp
os:
- osx
- linux
compiler:
- clang
env:
global:
- NODE_VERSION=5
cache:
directories:
- node_modules
- app/node_modules
- .nvm
- $HOME/.electron
- $HOME/.npm
before_install:
- if [ ! -f ./.nvm/nvm.sh ]; then git clone https://github.com/creationix/nvm.git ./.nvm; fi
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
install:
- npm prune
- npm install
script:
- make test
- npm run dist
| language: cpp
os:
- osx
- linux
compiler:
- clang
env:
global:
- NODE_VERSION=5
addons:
apt:
packages:
- icnsutils
cache:
directories:
- node_modules
- app/node_modules
- .nvm
- $HOME/.electron
- $HOME/.npm
before_install:
- if [ ! -f ./.nvm/nvm.sh ]; then git clone https://github.com/creationix/nvm.git ./.nvm; fi
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
install:
- npm prune
- npm install
script:
- make test
- npm run dist
| Install icnsutils maybe hopefully only on linux | Install icnsutils maybe hopefully only on linux
| YAML | apache-2.0 | irccloud/irccloud-desktop | yaml | ## Code Before:
language: cpp
os:
- osx
- linux
compiler:
- clang
env:
global:
- NODE_VERSION=5
cache:
directories:
- node_modules
- app/node_modules
- .nvm
- $HOME/.electron
- $HOME/.npm
before_install:
- if [ ! -f ./.nvm/nvm.sh ]; then git clone https://github.com/creationix/nvm.git ./.nvm; fi
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
install:
- npm prune
- npm install
script:
- make test
- npm run dist
## Instruction:
Install icnsutils maybe hopefully only on linux
## Code After:
language: cpp
os:
- osx
- linux
compiler:
- clang
env:
global:
- NODE_VERSION=5
addons:
apt:
packages:
- icnsutils
cache:
directories:
- node_modules
- app/node_modules
- .nvm
- $HOME/.electron
- $HOME/.npm
before_install:
- if [ ! -f ./.nvm/nvm.sh ]; then git clone https://github.com/creationix/nvm.git ./.nvm; fi
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
install:
- npm prune
- npm install
script:
- make test
- npm run dist
| language: cpp
os:
- osx
- linux
compiler:
- clang
env:
global:
- NODE_VERSION=5
+ addons:
+ apt:
+ packages:
+ - icnsutils
cache:
directories:
- node_modules
- app/node_modules
- .nvm
- $HOME/.electron
- $HOME/.npm
before_install:
- if [ ! -f ./.nvm/nvm.sh ]; then git clone https://github.com/creationix/nvm.git ./.nvm; fi
- source ./.nvm/nvm.sh
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
install:
- npm prune
- npm install
script:
- make test
- npm run dist | 4 | 0.148148 | 4 | 0 |
6e9e21fcfacfeedff631026623c243dcd0b6e121 | src/App/View.elm | src/App/View.elm | module App.View exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import App.Types exposing (..)
import App.Input.View as Input
import App.Entries.View as Entries
import App.Control.View as Control
view : Model -> Html Msg
view model =
div []
[ Input.view model.input
, Entries.view model.entries
, Control.view model.control
] | module App.View exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import App.Types exposing (..)
import App.Input.View as Input
import App.Entries.View as Entries
import App.Control.View as Control
view : Model -> Html Msg
view model =
div []
[ title
, Input.view model.input
, Entries.view model.entries
, Control.view model.control
, infoFooter
]
title : Html Msg
title =
header []
[ h1 []
[ a [ href "https://github.com/jackrzhang/lister-elm" ]
[ text "lister"]
]
]
infoFooter : Html Msg
infoFooter =
footer [ id "info" ]
[ p []
[ text "Written by "
, a [ href "https://github.com/jackrzhang" ] [ text "Jack Zhang" ]
]
, p []
[ text "Built with "
, a [ href "http://elm-lang.org" ] [ text "Elm" ]
]
] | Add view functions for header and footer | Add view functions for header and footer
| Elm | mit | jackrzhang/lister-elm,jackrzhang/lister-elm | elm | ## Code Before:
module App.View exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import App.Types exposing (..)
import App.Input.View as Input
import App.Entries.View as Entries
import App.Control.View as Control
view : Model -> Html Msg
view model =
div []
[ Input.view model.input
, Entries.view model.entries
, Control.view model.control
]
## Instruction:
Add view functions for header and footer
## Code After:
module App.View exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import App.Types exposing (..)
import App.Input.View as Input
import App.Entries.View as Entries
import App.Control.View as Control
view : Model -> Html Msg
view model =
div []
[ title
, Input.view model.input
, Entries.view model.entries
, Control.view model.control
, infoFooter
]
title : Html Msg
title =
header []
[ h1 []
[ a [ href "https://github.com/jackrzhang/lister-elm" ]
[ text "lister"]
]
]
infoFooter : Html Msg
infoFooter =
footer [ id "info" ]
[ p []
[ text "Written by "
, a [ href "https://github.com/jackrzhang" ] [ text "Jack Zhang" ]
]
, p []
[ text "Built with "
, a [ href "http://elm-lang.org" ] [ text "Elm" ]
]
] | module App.View exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import App.Types exposing (..)
import App.Input.View as Input
import App.Entries.View as Entries
import App.Control.View as Control
view : Model -> Html Msg
view model =
div []
+ [ title
- [ Input.view model.input
? ^
+ , Input.view model.input
? ^
, Entries.view model.entries
, Control.view model.control
+ , infoFooter
]
+
+
+ title : Html Msg
+ title =
+ header []
+ [ h1 []
+ [ a [ href "https://github.com/jackrzhang/lister-elm" ]
+ [ text "lister"]
+ ]
+ ]
+
+
+ infoFooter : Html Msg
+ infoFooter =
+ footer [ id "info" ]
+ [ p []
+ [ text "Written by "
+ , a [ href "https://github.com/jackrzhang" ] [ text "Jack Zhang" ]
+ ]
+ , p []
+ [ text "Built with "
+ , a [ href "http://elm-lang.org" ] [ text "Elm" ]
+ ]
+ ] | 28 | 1.555556 | 27 | 1 |
83f22fd9d0ec0ca51c4908b977924e1d4589e641 | modules/container/src/main/java/io/liveoak/container/tenancy/service/ApplicationGitInstallCommitService.java | modules/container/src/main/java/io/liveoak/container/tenancy/service/ApplicationGitInstallCommitService.java | package io.liveoak.container.tenancy.service;
import java.io.File;
import java.util.function.Consumer;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
/**
* @author Ken Finnigan
*/
public class ApplicationGitInstallCommitService implements Service<Void> {
public ApplicationGitInstallCommitService(Consumer<File> gitCommit, File installDir) {
this.gitCommit = gitCommit;
this.installDir = installDir;
}
@Override
public void start(StartContext context) throws StartException {
this.gitCommit.accept(this.installDir);
// remove ourselves
context.getController().setMode(ServiceController.Mode.REMOVE);
}
@Override
public void stop(StopContext context) {
}
@Override
public Void getValue() throws IllegalStateException, IllegalArgumentException {
return null;
}
private Consumer<File> gitCommit;
private File installDir;
}
| package io.liveoak.container.tenancy.service;
import java.io.File;
import java.util.function.Consumer;
import org.jboss.logging.Logger;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
/**
* @author Ken Finnigan
*/
public class ApplicationGitInstallCommitService implements Service<Void> {
public ApplicationGitInstallCommitService(Consumer<File> gitCommit, File installDir) {
this.gitCommit = gitCommit;
this.installDir = installDir;
}
@Override
public void start(StartContext context) throws StartException {
try {
this.gitCommit.accept(this.installDir);
} catch (RuntimeException re) {
log.error("Unable to commit to git on application install", re);
} finally {
// remove ourselves
context.getController().setMode(ServiceController.Mode.REMOVE);
}
}
@Override
public void stop(StopContext context) {
}
@Override
public Void getValue() throws IllegalStateException, IllegalArgumentException {
return null;
}
private Consumer<File> gitCommit;
private File installDir;
private static final Logger log = Logger.getLogger(ApplicationGitInstallCommitService.class);
}
| Improve error handling of git process to commit installation of application. Mainly of use in tests | Improve error handling of git process to commit installation of application. Mainly of use in tests
| Java | epl-1.0 | ljshj/liveoak,liveoak-io/liveoak,liveoak-io/liveoak,ljshj/liveoak,kyroskoh/liveoak,ljshj/liveoak,ammendonca/liveoak,liveoak-io/liveoak,ammendonca/liveoak,liveoak-io/liveoak,kyroskoh/liveoak,kyroskoh/liveoak,ammendonca/liveoak,kyroskoh/liveoak,ljshj/liveoak,ammendonca/liveoak | java | ## Code Before:
package io.liveoak.container.tenancy.service;
import java.io.File;
import java.util.function.Consumer;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
/**
* @author Ken Finnigan
*/
public class ApplicationGitInstallCommitService implements Service<Void> {
public ApplicationGitInstallCommitService(Consumer<File> gitCommit, File installDir) {
this.gitCommit = gitCommit;
this.installDir = installDir;
}
@Override
public void start(StartContext context) throws StartException {
this.gitCommit.accept(this.installDir);
// remove ourselves
context.getController().setMode(ServiceController.Mode.REMOVE);
}
@Override
public void stop(StopContext context) {
}
@Override
public Void getValue() throws IllegalStateException, IllegalArgumentException {
return null;
}
private Consumer<File> gitCommit;
private File installDir;
}
## Instruction:
Improve error handling of git process to commit installation of application. Mainly of use in tests
## Code After:
package io.liveoak.container.tenancy.service;
import java.io.File;
import java.util.function.Consumer;
import org.jboss.logging.Logger;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
/**
* @author Ken Finnigan
*/
public class ApplicationGitInstallCommitService implements Service<Void> {
public ApplicationGitInstallCommitService(Consumer<File> gitCommit, File installDir) {
this.gitCommit = gitCommit;
this.installDir = installDir;
}
@Override
public void start(StartContext context) throws StartException {
try {
this.gitCommit.accept(this.installDir);
} catch (RuntimeException re) {
log.error("Unable to commit to git on application install", re);
} finally {
// remove ourselves
context.getController().setMode(ServiceController.Mode.REMOVE);
}
}
@Override
public void stop(StopContext context) {
}
@Override
public Void getValue() throws IllegalStateException, IllegalArgumentException {
return null;
}
private Consumer<File> gitCommit;
private File installDir;
private static final Logger log = Logger.getLogger(ApplicationGitInstallCommitService.class);
}
| package io.liveoak.container.tenancy.service;
import java.io.File;
import java.util.function.Consumer;
+ import org.jboss.logging.Logger;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.StartContext;
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
/**
* @author Ken Finnigan
*/
public class ApplicationGitInstallCommitService implements Service<Void> {
public ApplicationGitInstallCommitService(Consumer<File> gitCommit, File installDir) {
this.gitCommit = gitCommit;
this.installDir = installDir;
}
@Override
public void start(StartContext context) throws StartException {
+ try {
- this.gitCommit.accept(this.installDir);
+ this.gitCommit.accept(this.installDir);
? ++++
-
+ } catch (RuntimeException re) {
+ log.error("Unable to commit to git on application install", re);
+ } finally {
- // remove ourselves
+ // remove ourselves
? ++++
- context.getController().setMode(ServiceController.Mode.REMOVE);
+ context.getController().setMode(ServiceController.Mode.REMOVE);
? ++++
+ }
}
@Override
public void stop(StopContext context) {
}
@Override
public Void getValue() throws IllegalStateException, IllegalArgumentException {
return null;
}
private Consumer<File> gitCommit;
private File installDir;
+ private static final Logger log = Logger.getLogger(ApplicationGitInstallCommitService.class);
} | 14 | 0.35 | 10 | 4 |
28e964b14d70d9ed6bc5cfe29c33908aa0dcd3bb | src/js/components/SecondaryToolbar.js | src/js/components/SecondaryToolbar.js | import React from 'react';
import { TALENTS_PAGES } from '../constants';
export default class SecondaryToolbar extends React.Component {
render() {
const { page, navigateTo } = this.props;
return (
<div id='secondary-toolbar'>
<ul>
<li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.POPULARITY); } }>POPULARITY</li>
<li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.WINRATE); } }>WIN RATE</li>
</ul>
</div>
);
}
};
| import React from 'react';
import { TALENTS_PAGES } from '../constants';
class SecondaryToolbar extends React.Component {
constructor() {
super();
this.navigatePopularity = this.navigatePopularity.bind(this);
this.navigateWinrate = this.navigateWinrate.bind(this);
}
navigatePopularity() {
this.props.navigateTo(TALENTS_PAGES.POPULARITY);
}
navigateWinrate() {
this.props.navigateTo(TALENTS_PAGES.WINRATE);
}
render() {
const { page } = this.props;
return (
<div id='secondary-toolbar'>
<ul>
<li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ this.navigatePopularity }>POPULARITY</li>
<li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ this.navigateWinrate }>WIN RATE</li>
</ul>
</div>
);
}
}
SecondaryToolbar.propTypes = {
navigateTo: React.PropTypes.func,
page: React.PropTypes.string,
};
export default SecondaryToolbar;
| Remove jsx binds from secondary toolbar | Remove jsx binds from secondary toolbar
| JavaScript | mit | dfilipidisz/overfwolf-hots-talents,dfilipidisz/overwolf-hots-talents,dfilipidisz/overfwolf-hots-talents,dfilipidisz/overwolf-hots-talents | javascript | ## Code Before:
import React from 'react';
import { TALENTS_PAGES } from '../constants';
export default class SecondaryToolbar extends React.Component {
render() {
const { page, navigateTo } = this.props;
return (
<div id='secondary-toolbar'>
<ul>
<li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.POPULARITY); } }>POPULARITY</li>
<li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.WINRATE); } }>WIN RATE</li>
</ul>
</div>
);
}
};
## Instruction:
Remove jsx binds from secondary toolbar
## Code After:
import React from 'react';
import { TALENTS_PAGES } from '../constants';
class SecondaryToolbar extends React.Component {
constructor() {
super();
this.navigatePopularity = this.navigatePopularity.bind(this);
this.navigateWinrate = this.navigateWinrate.bind(this);
}
navigatePopularity() {
this.props.navigateTo(TALENTS_PAGES.POPULARITY);
}
navigateWinrate() {
this.props.navigateTo(TALENTS_PAGES.WINRATE);
}
render() {
const { page } = this.props;
return (
<div id='secondary-toolbar'>
<ul>
<li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ this.navigatePopularity }>POPULARITY</li>
<li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ this.navigateWinrate }>WIN RATE</li>
</ul>
</div>
);
}
}
SecondaryToolbar.propTypes = {
navigateTo: React.PropTypes.func,
page: React.PropTypes.string,
};
export default SecondaryToolbar;
| import React from 'react';
import { TALENTS_PAGES } from '../constants';
- export default class SecondaryToolbar extends React.Component {
? ---------------
+ class SecondaryToolbar extends React.Component {
+
+ constructor() {
+ super();
+
+ this.navigatePopularity = this.navigatePopularity.bind(this);
+ this.navigateWinrate = this.navigateWinrate.bind(this);
+ }
+
+ navigatePopularity() {
+ this.props.navigateTo(TALENTS_PAGES.POPULARITY);
+ }
+
+ navigateWinrate() {
+ this.props.navigateTo(TALENTS_PAGES.WINRATE);
+ }
render() {
- const { page, navigateTo } = this.props;
? ------------
+ const { page } = this.props;
return (
<div id='secondary-toolbar'>
<ul>
- <li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.POPULARITY); } }>POPULARITY</li>
? ^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ <li className={ page === TALENTS_PAGES.POPULARITY ? 'active' : null } onClick={ this.navigatePopularity }>POPULARITY</li>
? ^^^^^ ^ ^^^^^^^^
- <li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ () => { navigateTo(TALENTS_PAGES.WINRATE); } }>WIN RATE</li>
? ^^^^^^^^ ----------------- ^^^^^^^^^^
+ <li className={ page === TALENTS_PAGES.WINRATE ? 'active' : null } onClick={ this.navigateWinrate }>WIN RATE</li>
? ^^^^^ ^^^^^^
</ul>
</div>
);
}
+ }
+
+ SecondaryToolbar.propTypes = {
+ navigateTo: React.PropTypes.func,
+ page: React.PropTypes.string,
};
+
+ export default SecondaryToolbar; | 30 | 1.666667 | 26 | 4 |
bb21f4b13b72d56fecea4c5051b6c8090e4946f5 | templates/_includes/related_posts.html | templates/_includes/related_posts.html | {% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
{% for related_post in article.related_posts %}
{% set title = related_post.title|striptags %}
{% set htitle = title %}
{%if related_post.subtitle %}
{% set htitle = title + ' - ' + related_post.subtitle %}
{% set title = title + ' ' + '<small>' + related_post.subtitle + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ htitle }}">{{ title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}
| {% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
{% for related_post in article.related_posts|sort(attribute = 'date') %}
{% set title = related_post.title|striptags %}
{% set htitle = title %}
{%if related_post.subtitle %}
{% set htitle = title + ' - ' + related_post.subtitle %}
{% set title = title + ' ' + '<small>' + related_post.subtitle + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ htitle }}">{{ title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}
| Sort articles in the related posts section by date in ascending order | Sort articles in the related posts section by date in ascending order
I think ascending is better. This way older article will appear on top
of the list. Recent related articles may already appear in recent posts
section. You need to bubble up older articles.
| HTML | mit | Goclis/pelican-blog,Goclis/pelican-blog,Goclis/pelican-blog,Goclis/pelican-blog | html | ## Code Before:
{% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
{% for related_post in article.related_posts %}
{% set title = related_post.title|striptags %}
{% set htitle = title %}
{%if related_post.subtitle %}
{% set htitle = title + ' - ' + related_post.subtitle %}
{% set title = title + ' ' + '<small>' + related_post.subtitle + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ htitle }}">{{ title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}
## Instruction:
Sort articles in the related posts section by date in ascending order
I think ascending is better. This way older article will appear on top
of the list. Recent related articles may already appear in recent posts
section. You need to bubble up older articles.
## Code After:
{% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
{% for related_post in article.related_posts|sort(attribute = 'date') %}
{% set title = related_post.title|striptags %}
{% set htitle = title %}
{%if related_post.subtitle %}
{% set htitle = title + ' - ' + related_post.subtitle %}
{% set title = title + ' ' + '<small>' + related_post.subtitle + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ htitle }}">{{ title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}
| {% if article.related_posts %}
{% from '_includes/_defaults.html' import RELATED_POSTS_LABEL with context %}
<section>
<h2>{{ RELATED_POSTS_LABEL }}</h2>
<ul class="related-posts-list">
- {% for related_post in article.related_posts %}
+ {% for related_post in article.related_posts|sort(attribute = 'date') %}
? +++++++++++++++++++++++++
{% set title = related_post.title|striptags %}
{% set htitle = title %}
{%if related_post.subtitle %}
{% set htitle = title + ' - ' + related_post.subtitle %}
{% set title = title + ' ' + '<small>' + related_post.subtitle + '</small>' %}
{% endif %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}" title="{{ htitle }}">{{ title }}</a></li>
{% endfor %}
</ul>
<hr />
</section>
{% endif %}
| 2 | 0.105263 | 1 | 1 |
a990ade8aa367d59869378f32c8f03e630548534 | README.md | README.md | simple reminders
| simple reminders
## Setting it up with Uberspace
### HTTPS Proxying
- Setup the .htaccess file on the root
```
[~]$ cat .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule ^r/(.*) http://localhost:42888/$1 [P]
```
### Daemontools
- Setup daemontools to use the compiled binary from this repo
```
[~]$ uberspace-setup-service my-r ~/bin/r
```
## Configuring reminders script
I use pushover since they have a simple API.
```
[~]$ cat bin/pushover
#!/usr/bin/env bash
TOKEN=<TOKEN>
USER=<USER>
MESSAGE=$1
curl -s --form-string "token=${TOKEN}" --form-string "user=${USER}" --form-string "message=${MESSAGE}" https://api.pushover.net/1/messages.json
```
| Add install and configuration instructions | Add install and configuration instructions
| Markdown | mit | sdaros/rem,sdaros/rem | markdown | ## Code Before:
simple reminders
## Instruction:
Add install and configuration instructions
## Code After:
simple reminders
## Setting it up with Uberspace
### HTTPS Proxying
- Setup the .htaccess file on the root
```
[~]$ cat .htaccess
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule ^r/(.*) http://localhost:42888/$1 [P]
```
### Daemontools
- Setup daemontools to use the compiled binary from this repo
```
[~]$ uberspace-setup-service my-r ~/bin/r
```
## Configuring reminders script
I use pushover since they have a simple API.
```
[~]$ cat bin/pushover
#!/usr/bin/env bash
TOKEN=<TOKEN>
USER=<USER>
MESSAGE=$1
curl -s --form-string "token=${TOKEN}" --form-string "user=${USER}" --form-string "message=${MESSAGE}" https://api.pushover.net/1/messages.json
```
| simple reminders
+
+ ## Setting it up with Uberspace
+
+ ### HTTPS Proxying
+
+ - Setup the .htaccess file on the root
+
+ ```
+ [~]$ cat .htaccess
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ RewriteCond %{ENV:HTTPS} !=on
+ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
+ RewriteRule ^r/(.*) http://localhost:42888/$1 [P]
+ ```
+
+ ### Daemontools
+
+ - Setup daemontools to use the compiled binary from this repo
+
+ ```
+ [~]$ uberspace-setup-service my-r ~/bin/r
+ ```
+
+ ## Configuring reminders script
+
+ I use pushover since they have a simple API.
+
+ ```
+ [~]$ cat bin/pushover
+ #!/usr/bin/env bash
+ TOKEN=<TOKEN>
+ USER=<USER>
+ MESSAGE=$1
+
+ curl -s --form-string "token=${TOKEN}" --form-string "user=${USER}" --form-string "message=${MESSAGE}" https://api.pushover.net/1/messages.json
+ ``` | 37 | 37 | 37 | 0 |
9837640f82de2930d162c5edaa54684fc44e1d6a | _config.yml | _config.yml | markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Cranky's Cycling Blog
tagline: ''
description: 'A mediocre club cyclist sometimes blogs about his hobby'
url: http://www.jimmycranky.co.uk
baseurl: /
author:
name: 'Jimmy "Cranky" Brough'
url: https://twitter.com/mcjimbob
paginate: 5
# Custom vars
version: 2.1.0
github:
repo: https://github.com/mcjimbob/mcjimbob.github.io
| markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Cranky's Cycling Blog
tagline: ''
description: 'A mediocre Scottish club cyclist who sometimes blogs about his hobby'
url: http://www.jimmycranky.co.uk
baseurl: /
author:
name: 'Jimmy "Cranky" Brough'
url: https://twitter.com/mcjimbob
paginate: 5
# Custom vars
version: 2.1.0
github:
repo: https://github.com/mcjimbob/mcjimbob.github.io
| Change site title and description | Change site title and description | YAML | mit | mcjimbob/mcjimbob.github.io | yaml | ## Code Before:
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Cranky's Cycling Blog
tagline: ''
description: 'A mediocre club cyclist sometimes blogs about his hobby'
url: http://www.jimmycranky.co.uk
baseurl: /
author:
name: 'Jimmy "Cranky" Brough'
url: https://twitter.com/mcjimbob
paginate: 5
# Custom vars
version: 2.1.0
github:
repo: https://github.com/mcjimbob/mcjimbob.github.io
## Instruction:
Change site title and description
## Code After:
markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Cranky's Cycling Blog
tagline: ''
description: 'A mediocre Scottish club cyclist who sometimes blogs about his hobby'
url: http://www.jimmycranky.co.uk
baseurl: /
author:
name: 'Jimmy "Cranky" Brough'
url: https://twitter.com/mcjimbob
paginate: 5
# Custom vars
version: 2.1.0
github:
repo: https://github.com/mcjimbob/mcjimbob.github.io
| markdown: redcarpet
highlighter: pygments
# Permalinks
permalink: pretty
relative_permalinks: true
# Setup
title: Cranky's Cycling Blog
tagline: ''
- description: 'A mediocre club cyclist sometimes blogs about his hobby'
+ description: 'A mediocre Scottish club cyclist who sometimes blogs about his hobby'
? +++++++++ ++++
url: http://www.jimmycranky.co.uk
baseurl: /
author:
name: 'Jimmy "Cranky" Brough'
url: https://twitter.com/mcjimbob
paginate: 5
# Custom vars
version: 2.1.0
github:
repo: https://github.com/mcjimbob/mcjimbob.github.io | 2 | 0.08 | 1 | 1 |
60be76a5877f276399fd299bd6f50c33aa191567 | Casks/adium.rb | Casks/adium.rb | class Adium < Cask
version '1.5.10'
sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a'
url "http://download.adium.im/Adium_#{version}.dmg"
appcast 'http://www.adium.im/sparkle/update.php',
:sha256 => 'cfb624cfa2f2526905ed7cb0eb39da98c73ef3c4633618348c00f12b2d44e19a'
homepage 'https://www.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Library/Application Support/Adium 2.0',
'~/Library/Caches/Adium',
'~/Library/Caches/com.adiumX.adiumX',
'~/Library/Preferences/com.adiumX.adiumX.plist',
]
end
| class Adium < Cask
version '1.5.10'
sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a'
url "http://download.adium.im/Adium_#{version}.dmg"
appcast 'https://www.adium.im/sparkle/appcast-release.xml',
:sha256 => '5d05831689494b3059ddf31580438579dee1d1b2a34f24a018b86fcaadd46e53'
homepage 'https://www.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Library/Application Support/Adium 2.0',
'~/Library/Caches/Adium',
'~/Library/Caches/com.adiumX.adiumX',
'~/Library/Preferences/com.adiumX.adiumX.plist',
]
end
| Fix appcast url for Adium. | Fix appcast url for Adium.
The old url is out-of-date and points to version 1.1.4 from 2007.
The new url is the correct one for stable releases.
| Ruby | bsd-2-clause | jgarber623/homebrew-cask,ohammersmith/homebrew-cask,crmne/homebrew-cask,ky0615/homebrew-cask-1,uetchy/homebrew-cask,tangestani/homebrew-cask,mingzhi22/homebrew-cask,jen20/homebrew-cask,sohtsuka/homebrew-cask,mhubig/homebrew-cask,ayohrling/homebrew-cask,caskroom/homebrew-cask,skyyuan/homebrew-cask,Ephemera/homebrew-cask,jeroenseegers/homebrew-cask,mazehall/homebrew-cask,d/homebrew-cask,alloy/homebrew-cask,Amorymeltzer/homebrew-cask,cblecker/homebrew-cask,barravi/homebrew-cask,jspahrsummers/homebrew-cask,fharbe/homebrew-cask,FranklinChen/homebrew-cask,akiomik/homebrew-cask,kassi/homebrew-cask,cobyism/homebrew-cask,cedwardsmedia/homebrew-cask,RogerThiede/homebrew-cask,JacopKane/homebrew-cask,jconley/homebrew-cask,reitermarkus/homebrew-cask,miku/homebrew-cask,tangestani/homebrew-cask,xight/homebrew-cask,sparrc/homebrew-cask,freeslugs/homebrew-cask,casidiablo/homebrew-cask,kTitan/homebrew-cask,lucasmezencio/homebrew-cask,yutarody/homebrew-cask,stephenwade/homebrew-cask,MoOx/homebrew-cask,nathansgreen/homebrew-cask,aguynamedryan/homebrew-cask,blainesch/homebrew-cask,mlocher/homebrew-cask,santoshsahoo/homebrew-cask,jellyfishcoder/homebrew-cask,nrlquaker/homebrew-cask,jedahan/homebrew-cask,sgnh/homebrew-cask,miguelfrde/homebrew-cask,FredLackeyOfficial/homebrew-cask,scw/homebrew-cask,vmrob/homebrew-cask,tjt263/homebrew-cask,ahundt/homebrew-cask,gustavoavellar/homebrew-cask,phpwutz/homebrew-cask,flada-auxv/homebrew-cask,reelsense/homebrew-cask,otaran/homebrew-cask,illusionfield/homebrew-cask,BahtiyarB/homebrew-cask,tjnycum/homebrew-cask,perfide/homebrew-cask,retbrown/homebrew-cask,jayshao/homebrew-cask,slnovak/homebrew-cask,samshadwell/homebrew-cask,tjt263/homebrew-cask,kassi/homebrew-cask,Hywan/homebrew-cask,y00rb/homebrew-cask,feniix/homebrew-cask,huanzhang/homebrew-cask,kesara/homebrew-cask,morsdyce/homebrew-cask,robertgzr/homebrew-cask,jtriley/homebrew-cask,psibre/homebrew-cask,mlocher/homebrew-cask,a-x-/homebrew-cask,xyb/homebrew-cask,malford/homebrew-cask,chino/homebrew-cask,kostasdizas/homebrew-cask,wesen/homebrew-cask,cohei/homebrew-cask,mazehall/homebrew-cask,wastrachan/homebrew-cask,usami-k/homebrew-cask,Gasol/homebrew-cask,cfillion/homebrew-cask,Dremora/homebrew-cask,toonetown/homebrew-cask,mauricerkelly/homebrew-cask,JoelLarson/homebrew-cask,segiddins/homebrew-cask,lukasbestle/homebrew-cask,daften/homebrew-cask,jacobdam/homebrew-cask,frapposelli/homebrew-cask,ywfwj2008/homebrew-cask,moimikey/homebrew-cask,shanonvl/homebrew-cask,gerrymiller/homebrew-cask,julionc/homebrew-cask,afh/homebrew-cask,onlynone/homebrew-cask,garborg/homebrew-cask,lukeadams/homebrew-cask,deizel/homebrew-cask,freeslugs/homebrew-cask,cedwardsmedia/homebrew-cask,SamiHiltunen/homebrew-cask,tolbkni/homebrew-cask,Keloran/homebrew-cask,mjgardner/homebrew-cask,englishm/homebrew-cask,crzrcn/homebrew-cask,dwkns/homebrew-cask,bkono/homebrew-cask,kostasdizas/homebrew-cask,jaredsampson/homebrew-cask,carlmod/homebrew-cask,ksylvan/homebrew-cask,diguage/homebrew-cask,zeusdeux/homebrew-cask,fkrone/homebrew-cask,0xadada/homebrew-cask,dezon/homebrew-cask,sparrc/homebrew-cask,kesara/homebrew-cask,claui/homebrew-cask,markthetech/homebrew-cask,tranc99/homebrew-cask,xight/homebrew-cask,feigaochn/homebrew-cask,fly19890211/homebrew-cask,coneman/homebrew-cask,colindunn/homebrew-cask,gerrypower/homebrew-cask,akiomik/homebrew-cask,pablote/homebrew-cask,mattrobenolt/homebrew-cask,winkelsdorf/homebrew-cask,gguillotte/homebrew-cask,shoichiaizawa/homebrew-cask,shishi/homebrew-cask,reelsense/homebrew-cask,MisumiRize/homebrew-cask,mathbunnyru/homebrew-cask,ddm/homebrew-cask,asbachb/homebrew-cask,andrewschleifer/homebrew-cask,JosephViolago/homebrew-cask,n0ts/homebrew-cask,adelinofaria/homebrew-cask,kongslund/homebrew-cask,y00rb/homebrew-cask,daften/homebrew-cask,muan/homebrew-cask,zchee/homebrew-cask,tedbundyjr/homebrew-cask,dwkns/homebrew-cask,xcezx/homebrew-cask,artdevjs/homebrew-cask,6uclz1/homebrew-cask,supriyantomaftuh/homebrew-cask,gguillotte/homebrew-cask,stephenwade/homebrew-cask,danielgomezrico/homebrew-cask,mathbunnyru/homebrew-cask,djakarta-trap/homebrew-myCask,mgryszko/homebrew-cask,lucasmezencio/homebrew-cask,esebastian/homebrew-cask,stevenmaguire/homebrew-cask,decrement/homebrew-cask,xiongchiamiov/homebrew-cask,nightscape/homebrew-cask,jppelteret/homebrew-cask,sosedoff/homebrew-cask,iAmGhost/homebrew-cask,nelsonjchen/homebrew-cask,vuquoctuan/homebrew-cask,ohammersmith/homebrew-cask,slnovak/homebrew-cask,gwaldo/homebrew-cask,BenjaminHCCarr/homebrew-cask,sachin21/homebrew-cask,xyb/homebrew-cask,My2ndAngelic/homebrew-cask,kronicd/homebrew-cask,jamesmlees/homebrew-cask,ksylvan/homebrew-cask,ctrevino/homebrew-cask,arranubels/homebrew-cask,dustinblackman/homebrew-cask,MisumiRize/homebrew-cask,tjnycum/homebrew-cask,qbmiller/homebrew-cask,lolgear/homebrew-cask,tedski/homebrew-cask,ninjahoahong/homebrew-cask,squid314/homebrew-cask,morganestes/homebrew-cask,nelsonjchen/homebrew-cask,wayou/homebrew-cask,doits/homebrew-cask,neil-ca-moore/homebrew-cask,blainesch/homebrew-cask,frapposelli/homebrew-cask,cliffcotino/homebrew-cask,albertico/homebrew-cask,Nitecon/homebrew-cask,buo/homebrew-cask,jawshooah/homebrew-cask,bcomnes/homebrew-cask,pgr0ss/homebrew-cask,crzrcn/homebrew-cask,coeligena/homebrew-customized,jeanregisser/homebrew-cask,underyx/homebrew-cask,gyugyu/homebrew-cask,alebcay/homebrew-cask,tarwich/homebrew-cask,joshka/homebrew-cask,dvdoliveira/homebrew-cask,AnastasiaSulyagina/homebrew-cask,patresi/homebrew-cask,wolflee/homebrew-cask,unasuke/homebrew-cask,tranc99/homebrew-cask,JosephViolago/homebrew-cask,ingorichter/homebrew-cask,inz/homebrew-cask,bric3/homebrew-cask,retrography/homebrew-cask,KosherBacon/homebrew-cask,kamilboratynski/homebrew-cask,0rax/homebrew-cask,iamso/homebrew-cask,CameronGarrett/homebrew-cask,singingwolfboy/homebrew-cask,Ibuprofen/homebrew-cask,Bombenleger/homebrew-cask,wastrachan/homebrew-cask,JosephViolago/homebrew-cask,alebcay/homebrew-cask,donbobka/homebrew-cask,tyage/homebrew-cask,a1russell/homebrew-cask,scw/homebrew-cask,sebcode/homebrew-cask,mgryszko/homebrew-cask,wmorin/homebrew-cask,coeligena/homebrew-customized,jbeagley52/homebrew-cask,zerrot/homebrew-cask,winkelsdorf/homebrew-cask,jspahrsummers/homebrew-cask,michelegera/homebrew-cask,nysthee/homebrew-cask,ftiff/homebrew-cask,rickychilcott/homebrew-cask,mjdescy/homebrew-cask,hellosky806/homebrew-cask,AnastasiaSulyagina/homebrew-cask,dcondrey/homebrew-cask,jpmat296/homebrew-cask,deizel/homebrew-cask,andyshinn/homebrew-cask,drostron/homebrew-cask,mishari/homebrew-cask,guylabs/homebrew-cask,nathansgreen/homebrew-cask,stevenmaguire/homebrew-cask,kiliankoe/homebrew-cask,mfpierre/homebrew-cask,danielbayley/homebrew-cask,petmoo/homebrew-cask,arronmabrey/homebrew-cask,bgandon/homebrew-cask,josa42/homebrew-cask,lauantai/homebrew-cask,taherio/homebrew-cask,bdhess/homebrew-cask,Fedalto/homebrew-cask,mchlrmrz/homebrew-cask,yumitsu/homebrew-cask,rickychilcott/homebrew-cask,lieuwex/homebrew-cask,coneman/homebrew-cask,zeusdeux/homebrew-cask,csmith-palantir/homebrew-cask,wuman/homebrew-cask,bgandon/homebrew-cask,githubutilities/homebrew-cask,kesara/homebrew-cask,williamboman/homebrew-cask,aki77/homebrew-cask,qnm/homebrew-cask,jen20/homebrew-cask,mchlrmrz/homebrew-cask,samdoran/homebrew-cask,wickedsp1d3r/homebrew-cask,maxnordlund/homebrew-cask,theoriginalgri/homebrew-cask,samshadwell/homebrew-cask,johan/homebrew-cask,shoichiaizawa/homebrew-cask,SentinelWarren/homebrew-cask,robbiethegeek/homebrew-cask,mindriot101/homebrew-cask,robertgzr/homebrew-cask,squid314/homebrew-cask,jacobdam/homebrew-cask,delphinus35/homebrew-cask,scribblemaniac/homebrew-cask,chrisfinazzo/homebrew-cask,chino/homebrew-cask,crmne/homebrew-cask,MatzFan/homebrew-cask,remko/homebrew-cask,githubutilities/homebrew-cask,asins/homebrew-cask,drostron/homebrew-cask,riyad/homebrew-cask,johntrandall/homebrew-cask,inz/homebrew-cask,scribblemaniac/homebrew-cask,mwilmer/homebrew-cask,julionc/homebrew-cask,thomanq/homebrew-cask,gerrypower/homebrew-cask,johntrandall/homebrew-cask,larseggert/homebrew-cask,reitermarkus/homebrew-cask,miccal/homebrew-cask,ericbn/homebrew-cask,mokagio/homebrew-cask,norio-nomura/homebrew-cask,dwihn0r/homebrew-cask,gord1anknot/homebrew-cask,doits/homebrew-cask,My2ndAngelic/homebrew-cask,otaran/homebrew-cask,jellyfishcoder/homebrew-cask,epmatsw/homebrew-cask,kongslund/homebrew-cask,qbmiller/homebrew-cask,andrewdisley/homebrew-cask,malob/homebrew-cask,Labutin/homebrew-cask,kpearson/homebrew-cask,leipert/homebrew-cask,exherb/homebrew-cask,shorshe/homebrew-cask,howie/homebrew-cask,gmkey/homebrew-cask,gurghet/homebrew-cask,jgarber623/homebrew-cask,af/homebrew-cask,paour/homebrew-cask,klane/homebrew-cask,L2G/homebrew-cask,klane/homebrew-cask,wickles/homebrew-cask,a-x-/homebrew-cask,markhuber/homebrew-cask,sachin21/homebrew-cask,jasmas/homebrew-cask,nickpellant/homebrew-cask,ch3n2k/homebrew-cask,jaredsampson/homebrew-cask,singingwolfboy/homebrew-cask,amatos/homebrew-cask,mariusbutuc/homebrew-cask,aktau/homebrew-cask,seanzxx/homebrew-cask,shonjir/homebrew-cask,kievechua/homebrew-cask,danielbayley/homebrew-cask,opsdev-ws/homebrew-cask,vigosan/homebrew-cask,rkJun/homebrew-cask,paulbreslin/homebrew-cask,kiliankoe/homebrew-cask,lantrix/homebrew-cask,ahundt/homebrew-cask,dictcp/homebrew-cask,tsparber/homebrew-cask,arronmabrey/homebrew-cask,illusionfield/homebrew-cask,chadcatlett/caskroom-homebrew-cask,kingthorin/homebrew-cask,ahvigil/homebrew-cask,boecko/homebrew-cask,jhowtan/homebrew-cask,elyscape/homebrew-cask,ptb/homebrew-cask,faun/homebrew-cask,alexg0/homebrew-cask,chuanxd/homebrew-cask,3van/homebrew-cask,tangestani/homebrew-cask,sebcode/homebrew-cask,djakarta-trap/homebrew-myCask,wizonesolutions/homebrew-cask,ksato9700/homebrew-cask,askl56/homebrew-cask,gyugyu/homebrew-cask,mattfelsen/homebrew-cask,kTitan/homebrew-cask,okket/homebrew-cask,maxnordlund/homebrew-cask,joaoponceleao/homebrew-cask,xtian/homebrew-cask,shoichiaizawa/homebrew-cask,tdsmith/homebrew-cask,dlovitch/homebrew-cask,hvisage/homebrew-cask,alexg0/homebrew-cask,gilesdring/homebrew-cask,wmorin/homebrew-cask,BahtiyarB/homebrew-cask,6uclz1/homebrew-cask,fkrone/homebrew-cask,hakamadare/homebrew-cask,cprecioso/homebrew-cask,LaurentFough/homebrew-cask,stonehippo/homebrew-cask,catap/homebrew-cask,christophermanning/homebrew-cask,jconley/homebrew-cask,inta/homebrew-cask,buo/homebrew-cask,andrewdisley/homebrew-cask,yutarody/homebrew-cask,giannitm/homebrew-cask,mwean/homebrew-cask,elseym/homebrew-cask,boydj/homebrew-cask,sysbot/homebrew-cask,gord1anknot/homebrew-cask,goxberry/homebrew-cask,enriclluelles/homebrew-cask,dspeckhard/homebrew-cask,wKovacs64/homebrew-cask,dcondrey/homebrew-cask,gyndav/homebrew-cask,zorosteven/homebrew-cask,johndbritton/homebrew-cask,shonjir/homebrew-cask,hellosky806/homebrew-cask,leonmachadowilcox/homebrew-cask,hovancik/homebrew-cask,arranubels/homebrew-cask,chrisRidgers/homebrew-cask,toonetown/homebrew-cask,andyli/homebrew-cask,psibre/homebrew-cask,wolflee/homebrew-cask,jbeagley52/homebrew-cask,axodys/homebrew-cask,gyndav/homebrew-cask,13k/homebrew-cask,nshemonsky/homebrew-cask,troyxmccall/homebrew-cask,j13k/homebrew-cask,onlynone/homebrew-cask,xiongchiamiov/homebrew-cask,renaudguerin/homebrew-cask,decrement/homebrew-cask,spruceb/homebrew-cask,norio-nomura/homebrew-cask,farmerchris/homebrew-cask,neil-ca-moore/homebrew-cask,bkono/homebrew-cask,joshka/homebrew-cask,lumaxis/homebrew-cask,afdnlw/homebrew-cask,ajbw/homebrew-cask,moogar0880/homebrew-cask,jrwesolo/homebrew-cask,afdnlw/homebrew-cask,mchlrmrz/homebrew-cask,greg5green/homebrew-cask,mattfelsen/homebrew-cask,Ephemera/homebrew-cask,brianshumate/homebrew-cask,chuanxd/homebrew-cask,stevehedrick/homebrew-cask,cblecker/homebrew-cask,alexg0/homebrew-cask,neverfox/homebrew-cask,imgarylai/homebrew-cask,d/homebrew-cask,nathancahill/homebrew-cask,xight/homebrew-cask,vin047/homebrew-cask,asbachb/homebrew-cask,linc01n/homebrew-cask,bendoerr/homebrew-cask,Ngrd/homebrew-cask,yurrriq/homebrew-cask,malford/homebrew-cask,riyad/homebrew-cask,haha1903/homebrew-cask,bchatard/homebrew-cask,JikkuJose/homebrew-cask,lukasbestle/homebrew-cask,Cottser/homebrew-cask,RogerThiede/homebrew-cask,atsuyim/homebrew-cask,sanyer/homebrew-cask,uetchy/homebrew-cask,nrlquaker/homebrew-cask,vmrob/homebrew-cask,kteru/homebrew-cask,leipert/homebrew-cask,scottsuch/homebrew-cask,yuhki50/homebrew-cask,lolgear/homebrew-cask,dustinblackman/homebrew-cask,skatsuta/homebrew-cask,sjackman/homebrew-cask,yurrriq/homebrew-cask,colindean/homebrew-cask,jpodlech/homebrew-cask,puffdad/homebrew-cask,ldong/homebrew-cask,hanxue/caskroom,hristozov/homebrew-cask,bdhess/homebrew-cask,delphinus35/homebrew-cask,unasuke/homebrew-cask,antogg/homebrew-cask,Bombenleger/homebrew-cask,tedbundyjr/homebrew-cask,renard/homebrew-cask,kpearson/homebrew-cask,3van/homebrew-cask,rcuza/homebrew-cask,lieuwex/homebrew-cask,Keloran/homebrew-cask,hakamadare/homebrew-cask,mwek/homebrew-cask,ingorichter/homebrew-cask,mishari/homebrew-cask,aktau/homebrew-cask,greg5green/homebrew-cask,nathanielvarona/homebrew-cask,syscrusher/homebrew-cask,mrmachine/homebrew-cask,esebastian/homebrew-cask,Whoaa512/homebrew-cask,kevyau/homebrew-cask,stevehedrick/homebrew-cask,chrisfinazzo/homebrew-cask,tyage/homebrew-cask,hovancik/homebrew-cask,bosr/homebrew-cask,deanmorin/homebrew-cask,dieterdemeyer/homebrew-cask,yutarody/homebrew-cask,xakraz/homebrew-cask,exherb/homebrew-cask,stonehippo/homebrew-cask,Ibuprofen/homebrew-cask,JacopKane/homebrew-cask,SamiHiltunen/homebrew-cask,nysthee/homebrew-cask,cprecioso/homebrew-cask,pinut/homebrew-cask,MichaelPei/homebrew-cask,koenrh/homebrew-cask,mkozjak/homebrew-cask,paour/homebrew-cask,prime8/homebrew-cask,Ketouem/homebrew-cask,dlovitch/homebrew-cask,troyxmccall/homebrew-cask,malob/homebrew-cask,epardee/homebrew-cask,casidiablo/homebrew-cask,mAAdhaTTah/homebrew-cask,samdoran/homebrew-cask,adelinofaria/homebrew-cask,mwek/homebrew-cask,hanxue/caskroom,jacobbednarz/homebrew-cask,skatsuta/homebrew-cask,wayou/homebrew-cask,FredLackeyOfficial/homebrew-cask,bcaceiro/homebrew-cask,MerelyAPseudonym/homebrew-cask,ninjahoahong/homebrew-cask,caskroom/homebrew-cask,thomanq/homebrew-cask,pacav69/homebrew-cask,nicolas-brousse/homebrew-cask,barravi/homebrew-cask,englishm/homebrew-cask,inta/homebrew-cask,rajiv/homebrew-cask,yumitsu/homebrew-cask,theoriginalgri/homebrew-cask,rajiv/homebrew-cask,tmoreira2020/homebrew,jmeridth/homebrew-cask,nivanchikov/homebrew-cask,mariusbutuc/homebrew-cask,mAAdhaTTah/homebrew-cask,feigaochn/homebrew-cask,vuquoctuan/homebrew-cask,cliffcotino/homebrew-cask,CameronGarrett/homebrew-cask,nathanielvarona/homebrew-cask,bric3/homebrew-cask,vigosan/homebrew-cask,miguelfrde/homebrew-cask,afh/homebrew-cask,rhendric/homebrew-cask,AndreTheHunter/homebrew-cask,hanxue/caskroom,anbotero/homebrew-cask,fanquake/homebrew-cask,nrlquaker/homebrew-cask,kryhear/homebrew-cask,catap/homebrew-cask,joschi/homebrew-cask,rkJun/homebrew-cask,kuno/homebrew-cask,janlugt/homebrew-cask,sohtsuka/homebrew-cask,Whoaa512/homebrew-cask,antogg/homebrew-cask,helloIAmPau/homebrew-cask,MerelyAPseudonym/homebrew-cask,a1russell/homebrew-cask,chrisRidgers/homebrew-cask,pkq/homebrew-cask,kirikiriyamama/homebrew-cask,imgarylai/homebrew-cask,schneidmaster/homebrew-cask,boecko/homebrew-cask,fwiesel/homebrew-cask,djmonta/homebrew-cask,joschi/homebrew-cask,stigkj/homebrew-caskroom-cask,feniix/homebrew-cask,deiga/homebrew-cask,zmwangx/homebrew-cask,corbt/homebrew-cask,FinalDes/homebrew-cask,valepert/homebrew-cask,seanorama/homebrew-cask,thii/homebrew-cask,miccal/homebrew-cask,franklouwers/homebrew-cask,janlugt/homebrew-cask,0rax/homebrew-cask,ahvigil/homebrew-cask,jrwesolo/homebrew-cask,kingthorin/homebrew-cask,mwilmer/homebrew-cask,ywfwj2008/homebrew-cask,chadcatlett/caskroom-homebrew-cask,sirodoht/homebrew-cask,gyndav/homebrew-cask,valepert/homebrew-cask,opsdev-ws/homebrew-cask,nightscape/homebrew-cask,amatos/homebrew-cask,lvicentesanchez/homebrew-cask,gerrymiller/homebrew-cask,remko/homebrew-cask,gurghet/homebrew-cask,askl56/homebrew-cask,MircoT/homebrew-cask,ponychicken/homebrew-customcask,j13k/homebrew-cask,bchatard/homebrew-cask,xtian/homebrew-cask,giannitm/homebrew-cask,tsparber/homebrew-cask,wuman/homebrew-cask,johndbritton/homebrew-cask,forevergenin/homebrew-cask,larseggert/homebrew-cask,Amorymeltzer/homebrew-cask,zhuzihhhh/homebrew-cask,reitermarkus/homebrew-cask,taherio/homebrew-cask,rcuza/homebrew-cask,BenjaminHCCarr/homebrew-cask,mahori/homebrew-cask,vin047/homebrew-cask,sanyer/homebrew-cask,kteru/homebrew-cask,jpmat296/homebrew-cask,mindriot101/homebrew-cask,nathanielvarona/homebrew-cask,markhuber/homebrew-cask,fwiesel/homebrew-cask,linc01n/homebrew-cask,Gasol/homebrew-cask,lifepillar/homebrew-cask,Amorymeltzer/homebrew-cask,rajiv/homebrew-cask,flaviocamilo/homebrew-cask,vitorgalvao/homebrew-cask,paulombcosta/homebrew-cask,cclauss/homebrew-cask,ftiff/homebrew-cask,slack4u/homebrew-cask,shishi/homebrew-cask,ptb/homebrew-cask,malob/homebrew-cask,kingthorin/homebrew-cask,scribblemaniac/homebrew-cask,andyli/homebrew-cask,pgr0ss/homebrew-cask,bosr/homebrew-cask,Nitecon/homebrew-cask,johnste/homebrew-cask,mikem/homebrew-cask,jhowtan/homebrew-cask,tmoreira2020/homebrew,supriyantomaftuh/homebrew-cask,hristozov/homebrew-cask,codeurge/homebrew-cask,AdamCmiel/homebrew-cask,Ephemera/homebrew-cask,huanzhang/homebrew-cask,kolomiichenko/homebrew-cask,cblecker/homebrew-cask,RickWong/homebrew-cask,johnste/homebrew-cask,tan9/homebrew-cask,mjgardner/homebrew-cask,xakraz/homebrew-cask,santoshsahoo/homebrew-cask,andrewschleifer/homebrew-cask,corbt/homebrew-cask,samnung/homebrew-cask,rubenerd/homebrew-cask,13k/homebrew-cask,Ketouem/homebrew-cask,ch3n2k/homebrew-cask,pablote/homebrew-cask,goxberry/homebrew-cask,andersonba/homebrew-cask,wmorin/homebrew-cask,dunn/homebrew-cask,ksato9700/homebrew-cask,retrography/homebrew-cask,stonehippo/homebrew-cask,jangalinski/homebrew-cask,diogodamiani/homebrew-cask,moimikey/homebrew-cask,flaviocamilo/homebrew-cask,bsiddiqui/homebrew-cask,xalep/homebrew-cask,deiga/homebrew-cask,robbiethegeek/homebrew-cask,julionc/homebrew-cask,fly19890211/homebrew-cask,ayohrling/homebrew-cask,m3nu/homebrew-cask,danielgomezrico/homebrew-cask,dieterdemeyer/homebrew-cask,ianyh/homebrew-cask,johnjelinek/homebrew-cask,kei-yamazaki/homebrew-cask,singingwolfboy/homebrew-cask,imgarylai/homebrew-cask,napaxton/homebrew-cask,chrisfinazzo/homebrew-cask,hvisage/homebrew-cask,nathancahill/homebrew-cask,slack4u/homebrew-cask,tdsmith/homebrew-cask,Fedalto/homebrew-cask,atsuyim/homebrew-cask,nivanchikov/homebrew-cask,nshemonsky/homebrew-cask,thii/homebrew-cask,genewoo/homebrew-cask,stigkj/homebrew-caskroom-cask,jonathanwiesel/homebrew-cask,moimikey/homebrew-cask,cclauss/homebrew-cask,a1russell/homebrew-cask,dezon/homebrew-cask,zmwangx/homebrew-cask,shanonvl/homebrew-cask,mfpierre/homebrew-cask,tolbkni/homebrew-cask,MicTech/homebrew-cask,codeurge/homebrew-cask,mikem/homebrew-cask,samnung/homebrew-cask,deanmorin/homebrew-cask,claui/homebrew-cask,joaocc/homebrew-cask,joaoponceleao/homebrew-cask,usami-k/homebrew-cask,markthetech/homebrew-cask,joshka/homebrew-cask,howie/homebrew-cask,ldong/homebrew-cask,victorpopkov/homebrew-cask,jgarber623/homebrew-cask,MichaelPei/homebrew-cask,zchee/homebrew-cask,devmynd/homebrew-cask,jalaziz/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,nicolas-brousse/homebrew-cask,dictcp/homebrew-cask,BenjaminHCCarr/homebrew-cask,bendoerr/homebrew-cask,michelegera/homebrew-cask,brianshumate/homebrew-cask,adrianchia/homebrew-cask,RickWong/homebrew-cask,gabrielizaias/homebrew-cask,andyshinn/homebrew-cask,wickles/homebrew-cask,gibsjose/homebrew-cask,albertico/homebrew-cask,jangalinski/homebrew-cask,seanzxx/homebrew-cask,moonboots/homebrew-cask,elnappo/homebrew-cask,mahori/homebrew-cask,patresi/homebrew-cask,miccal/homebrew-cask,katoquro/homebrew-cask,sysbot/homebrew-cask,xyb/homebrew-cask,paulbreslin/homebrew-cask,cfillion/homebrew-cask,gibsjose/homebrew-cask,genewoo/homebrew-cask,yuhki50/homebrew-cask,jtriley/homebrew-cask,christophermanning/homebrew-cask,MatzFan/homebrew-cask,andrewdisley/homebrew-cask,mauricerkelly/homebrew-cask,aguynamedryan/homebrew-cask,lantrix/homebrew-cask,mwean/homebrew-cask,williamboman/homebrew-cask,lauantai/homebrew-cask,puffdad/homebrew-cask,rubenerd/homebrew-cask,jasmas/homebrew-cask,jamesmlees/homebrew-cask,lcasey001/homebrew-cask,ponychicken/homebrew-customcask,kolomiichenko/homebrew-cask,sanchezm/homebrew-cask,anbotero/homebrew-cask,thehunmonkgroup/homebrew-cask,timsutton/homebrew-cask,cohei/homebrew-cask,ctrevino/homebrew-cask,jppelteret/homebrew-cask,scottsuch/homebrew-cask,lalyos/homebrew-cask,gwaldo/homebrew-cask,donbobka/homebrew-cask,djmonta/homebrew-cask,0xadada/homebrew-cask,royalwang/homebrew-cask,boydj/homebrew-cask,lifepillar/homebrew-cask,yurikoles/homebrew-cask,optikfluffel/homebrew-cask,iAmGhost/homebrew-cask,kkdd/homebrew-cask,lcasey001/homebrew-cask,adriweb/homebrew-cask,mattrobenolt/homebrew-cask,athrunsun/homebrew-cask,hyuna917/homebrew-cask,bcomnes/homebrew-cask,shonjir/homebrew-cask,Ngrd/homebrew-cask,xalep/homebrew-cask,zorosteven/homebrew-cask,vitorgalvao/homebrew-cask,johnjelinek/homebrew-cask,n8henrie/homebrew-cask,jeanregisser/homebrew-cask,blogabe/homebrew-cask,paulombcosta/homebrew-cask,andersonba/homebrew-cask,xcezx/homebrew-cask,ebraminio/homebrew-cask,renard/homebrew-cask,underyx/homebrew-cask,astorije/homebrew-cask,FranklinChen/homebrew-cask,dspeckhard/homebrew-cask,antogg/homebrew-cask,AndreTheHunter/homebrew-cask,elnappo/homebrew-cask,fharbe/homebrew-cask,diogodamiani/homebrew-cask,skyyuan/homebrew-cask,ebraminio/homebrew-cask,dunn/homebrew-cask,AdamCmiel/homebrew-cask,asins/homebrew-cask,blogabe/homebrew-cask,L2G/homebrew-cask,mhubig/homebrew-cask,kronicd/homebrew-cask,iamso/homebrew-cask,bsiddiqui/homebrew-cask,lalyos/homebrew-cask,mingzhi22/homebrew-cask,zhuzihhhh/homebrew-cask,thehunmonkgroup/homebrew-cask,okket/homebrew-cask,moonboots/homebrew-cask,devmynd/homebrew-cask,ajbw/homebrew-cask,wickedsp1d3r/homebrew-cask,mokagio/homebrew-cask,joschi/homebrew-cask,claui/homebrew-cask,johan/homebrew-cask,lvicentesanchez/homebrew-cask,fazo96/homebrew-cask,esebastian/homebrew-cask,ericbn/homebrew-cask,schneidmaster/homebrew-cask,Saklad5/homebrew-cask,pacav69/homebrew-cask,JacopKane/homebrew-cask,lukeadams/homebrew-cask,optikfluffel/homebrew-cask,paour/homebrew-cask,morganestes/homebrew-cask,Philosoft/homebrew-cask,sosedoff/homebrew-cask,jawshooah/homebrew-cask,guerrero/homebrew-cask,moogar0880/homebrew-cask,yurikoles/homebrew-cask,victorpopkov/homebrew-cask,jpodlech/homebrew-cask,mathbunnyru/homebrew-cask,alloy/homebrew-cask,julienlavergne/homebrew-cask,forevergenin/homebrew-cask,RJHsiao/homebrew-cask,kkdd/homebrew-cask,adrianchia/homebrew-cask,jiashuw/homebrew-cask,tan9/homebrew-cask,SentinelWarren/homebrew-cask,qnm/homebrew-cask,athrunsun/homebrew-cask,haha1903/homebrew-cask,jeroenj/homebrew-cask,wizonesolutions/homebrew-cask,Dremora/homebrew-cask,sanyer/homebrew-cask,kevyau/homebrew-cask,RJHsiao/homebrew-cask,jmeridth/homebrew-cask,rogeriopradoj/homebrew-cask,deiga/homebrew-cask,rogeriopradoj/homebrew-cask,sjackman/homebrew-cask,hackhandslabs/homebrew-cask,sscotth/homebrew-cask,alebcay/homebrew-cask,ericbn/homebrew-cask,sgnh/homebrew-cask,kryhear/homebrew-cask,axodys/homebrew-cask,Cottser/homebrew-cask,astorije/homebrew-cask,FinalDes/homebrew-cask,carlmod/homebrew-cask,dictcp/homebrew-cask,kirikiriyamama/homebrew-cask,neverfox/homebrew-cask,csmith-palantir/homebrew-cask,LaurentFough/homebrew-cask,jedahan/homebrew-cask,kuno/homebrew-cask,mjgardner/homebrew-cask,sirodoht/homebrew-cask,jiashuw/homebrew-cask,muan/homebrew-cask,kievechua/homebrew-cask,leonmachadowilcox/homebrew-cask,gmkey/homebrew-cask,n8henrie/homebrew-cask,jacobbednarz/homebrew-cask,stephenwade/homebrew-cask,adriweb/homebrew-cask,sscotth/homebrew-cask,blogabe/homebrew-cask,MircoT/homebrew-cask,guylabs/homebrew-cask,faun/homebrew-cask,sanchezm/homebrew-cask,christer155/homebrew-cask,tarwich/homebrew-cask,elyscape/homebrew-cask,nickpellant/homebrew-cask,rhendric/homebrew-cask,ky0615/homebrew-cask-1,jeroenj/homebrew-cask,timsutton/homebrew-cask,colindean/homebrew-cask,JikkuJose/homebrew-cask,dwihn0r/homebrew-cask,aki77/homebrew-cask,jalaziz/homebrew-cask,colindunn/homebrew-cask,wKovacs64/homebrew-cask,diguage/homebrew-cask,kamilboratynski/homebrew-cask,epmatsw/homebrew-cask,koenrh/homebrew-cask,n0ts/homebrew-cask,pkq/homebrew-cask,mattrobenolt/homebrew-cask,cobyism/homebrew-cask,jayshao/homebrew-cask,hyuna917/homebrew-cask,jalaziz/homebrew-cask,mkozjak/homebrew-cask,josa42/homebrew-cask,garborg/homebrew-cask,adrianchia/homebrew-cask,royalwang/homebrew-cask,tedski/homebrew-cask,kei-yamazaki/homebrew-cask,seanorama/homebrew-cask,spruceb/homebrew-cask,winkelsdorf/homebrew-cask,pinut/homebrew-cask,shorshe/homebrew-cask,m3nu/homebrew-cask,katoquro/homebrew-cask,wesen/homebrew-cask,morsdyce/homebrew-cask,hackhandslabs/homebrew-cask,farmerchris/homebrew-cask,cobyism/homebrew-cask,phpwutz/homebrew-cask,elseym/homebrew-cask,af/homebrew-cask,flada-auxv/homebrew-cask,m3nu/homebrew-cask,yurikoles/homebrew-cask,sscotth/homebrew-cask,zerrot/homebrew-cask,petmoo/homebrew-cask,jeroenseegers/homebrew-cask,artdevjs/homebrew-cask,perfide/homebrew-cask,renaudguerin/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,bric3/homebrew-cask,ddm/homebrew-cask,mahori/homebrew-cask,gilesdring/homebrew-cask,rogeriopradoj/homebrew-cask,miku/homebrew-cask,joaocc/homebrew-cask,fanquake/homebrew-cask,fazo96/homebrew-cask,coeligena/homebrew-customized,josa42/homebrew-cask,epardee/homebrew-cask,bcaceiro/homebrew-cask,uetchy/homebrew-cask,franklouwers/homebrew-cask,gustavoavellar/homebrew-cask,Saklad5/homebrew-cask,mrmachine/homebrew-cask,dvdoliveira/homebrew-cask,MicTech/homebrew-cask,pkq/homebrew-cask,ianyh/homebrew-cask,Labutin/homebrew-cask,helloIAmPau/homebrew-cask,retbrown/homebrew-cask,lumaxis/homebrew-cask,Hywan/homebrew-cask,JoelLarson/homebrew-cask,gabrielizaias/homebrew-cask,KosherBacon/homebrew-cask,neverfox/homebrew-cask,christer155/homebrew-cask,segiddins/homebrew-cask,prime8/homebrew-cask,timsutton/homebrew-cask,enriclluelles/homebrew-cask,optikfluffel/homebrew-cask,danielbayley/homebrew-cask,guerrero/homebrew-cask,MoOx/homebrew-cask,napaxton/homebrew-cask,Philosoft/homebrew-cask,scottsuch/homebrew-cask,mjdescy/homebrew-cask,jonathanwiesel/homebrew-cask,tjnycum/homebrew-cask,julienlavergne/homebrew-cask,syscrusher/homebrew-cask | ruby | ## Code Before:
class Adium < Cask
version '1.5.10'
sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a'
url "http://download.adium.im/Adium_#{version}.dmg"
appcast 'http://www.adium.im/sparkle/update.php',
:sha256 => 'cfb624cfa2f2526905ed7cb0eb39da98c73ef3c4633618348c00f12b2d44e19a'
homepage 'https://www.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Library/Application Support/Adium 2.0',
'~/Library/Caches/Adium',
'~/Library/Caches/com.adiumX.adiumX',
'~/Library/Preferences/com.adiumX.adiumX.plist',
]
end
## Instruction:
Fix appcast url for Adium.
The old url is out-of-date and points to version 1.1.4 from 2007.
The new url is the correct one for stable releases.
## Code After:
class Adium < Cask
version '1.5.10'
sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a'
url "http://download.adium.im/Adium_#{version}.dmg"
appcast 'https://www.adium.im/sparkle/appcast-release.xml',
:sha256 => '5d05831689494b3059ddf31580438579dee1d1b2a34f24a018b86fcaadd46e53'
homepage 'https://www.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Library/Application Support/Adium 2.0',
'~/Library/Caches/Adium',
'~/Library/Caches/com.adiumX.adiumX',
'~/Library/Preferences/com.adiumX.adiumX.plist',
]
end
| class Adium < Cask
version '1.5.10'
sha256 'bca3ac81d33265b71c95a3984be80715fbd98f38d7c463d0441d43a335ed399a'
url "http://download.adium.im/Adium_#{version}.dmg"
- appcast 'http://www.adium.im/sparkle/update.php',
? ^ ^ ^^^
+ appcast 'https://www.adium.im/sparkle/appcast-release.xml',
? + ^ ^^ + +++++++ ^^^
- :sha256 => 'cfb624cfa2f2526905ed7cb0eb39da98c73ef3c4633618348c00f12b2d44e19a'
+ :sha256 => '5d05831689494b3059ddf31580438579dee1d1b2a34f24a018b86fcaadd46e53'
homepage 'https://www.adium.im/'
license :gpl
app 'Adium.app'
zap :delete => [
'~/Library/Application Support/Adium 2.0',
'~/Library/Caches/Adium',
'~/Library/Caches/com.adiumX.adiumX',
'~/Library/Preferences/com.adiumX.adiumX.plist',
]
end | 4 | 0.210526 | 2 | 2 |
a8102752c77b7d45938102a391ed86e8785af4b9 | recipes/helics/build.sh | recipes/helics/build.sh |
set -e
set -x
if [ `uname` = "Darwin" ]; then
FLAGS="-std=c++14"
else
FLAGS="-std=c++11"
fi
if test "${PY3K}" = "1"
then
BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
else
BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
fi
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
cp -v ${PREFIX}/python/_helics.so ${SP_DIR}/
cp -v ${PREFIX}/python/helics.py ${SP_DIR}/
|
set -e
set -x
if [ `uname` = "Darwin" ]; then
FLAGS="-std=c++14"
else
FLAGS="-std=c++11"
fi
if [[ $PY3K -eq 1 || $PY3K == "True" ]]; then
BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
else
BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
fi
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
cp -v ${PREFIX}/python/_helics.so ${SP_DIR}/
cp -v ${PREFIX}/python/helics.py ${SP_DIR}/
| Make PY3K work for both linux and mac | Make PY3K work for both linux and mac
| Shell | bsd-3-clause | barkls/staged-recipes,stuertz/staged-recipes,synapticarbors/staged-recipes,petrushy/staged-recipes,stuertz/staged-recipes,jochym/staged-recipes,ReimarBauer/staged-recipes,kwilcox/staged-recipes,ocefpaf/staged-recipes,Juanlu001/staged-recipes,goanpeca/staged-recipes,kwilcox/staged-recipes,rmcgibbo/staged-recipes,shadowwalkersb/staged-recipes,conda-forge/staged-recipes,mariusvniekerk/staged-recipes,shadowwalkersb/staged-recipes,ceholden/staged-recipes,isuruf/staged-recipes,chrisburr/staged-recipes,scopatz/staged-recipes,basnijholt/staged-recipes,ocefpaf/staged-recipes,basnijholt/staged-recipes,mcs07/staged-recipes,petrushy/staged-recipes,patricksnape/staged-recipes,dschreij/staged-recipes,ceholden/staged-recipes,birdsarah/staged-recipes,jjhelmus/staged-recipes,mariusvniekerk/staged-recipes,rvalieris/staged-recipes,mcs07/staged-recipes,barkls/staged-recipes,goanpeca/staged-recipes,sodre/staged-recipes,hadim/staged-recipes,birdsarah/staged-recipes,cpaulik/staged-recipes,rvalieris/staged-recipes,patricksnape/staged-recipes,conda-forge/staged-recipes,asmeurer/staged-recipes,chrisburr/staged-recipes,Juanlu001/staged-recipes,hadim/staged-recipes,jochym/staged-recipes,sodre/staged-recipes,johanneskoester/staged-recipes,jakirkham/staged-recipes,synapticarbors/staged-recipes,scopatz/staged-recipes,johanneskoester/staged-recipes,igortg/staged-recipes,sodre/staged-recipes,igortg/staged-recipes,asmeurer/staged-recipes,ReimarBauer/staged-recipes,isuruf/staged-recipes,jakirkham/staged-recipes,rmcgibbo/staged-recipes,cpaulik/staged-recipes,SylvainCorlay/staged-recipes,jjhelmus/staged-recipes,SylvainCorlay/staged-recipes,dschreij/staged-recipes | shell | ## Code Before:
set -e
set -x
if [ `uname` = "Darwin" ]; then
FLAGS="-std=c++14"
else
FLAGS="-std=c++11"
fi
if test "${PY3K}" = "1"
then
BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
else
BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
fi
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
cp -v ${PREFIX}/python/_helics.so ${SP_DIR}/
cp -v ${PREFIX}/python/helics.py ${SP_DIR}/
## Instruction:
Make PY3K work for both linux and mac
## Code After:
set -e
set -x
if [ `uname` = "Darwin" ]; then
FLAGS="-std=c++14"
else
FLAGS="-std=c++11"
fi
if [[ $PY3K -eq 1 || $PY3K == "True" ]]; then
BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
else
BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
fi
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
cp -v ${PREFIX}/python/_helics.so ${SP_DIR}/
cp -v ${PREFIX}/python/helics.py ${SP_DIR}/
|
set -e
set -x
if [ `uname` = "Darwin" ]; then
FLAGS="-std=c++14"
else
FLAGS="-std=c++11"
fi
+ if [[ $PY3K -eq 1 || $PY3K == "True" ]]; then
- if test "${PY3K}" = "1"
- then
BUILD_PYTHON="-DBUILD_PYTHON_INTERFACE=ON"
else
BUILD_PYTHON="-DBUILD_PYTHON2_INTERFACE=ON"
fi
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=$FLAGS ${BUILD_PYTHON} -DCMAKE_INSTALL_PREFIX=$PREFIX ../
make -j $CPU_COUNT
make install
cp -v ${PREFIX}/python/_helics.so ${SP_DIR}/
cp -v ${PREFIX}/python/helics.py ${SP_DIR}/ | 3 | 0.12 | 1 | 2 |
f597d9d626039437a08f21b16b0622ddc958d6b2 | templates/page.collection.tpl | templates/page.collection.tpl | {% extends "page.tpl" %}
{% block title %}{{ id.title }}{% endblock %}
{% block body_class %}collection{% endblock %}
{% block content %}
<div class="page--collection page__content-wrapper do_ginger_default_content_group_navigation">
{% with id as collection %}
{% block masthead %}
{% include "_masthead.tpl" article=collection %}
{% endblock %}
<main role="main" class="page__main-content">
<article class="page__content">
<h1 class="page__content__title">{{ collection.title }}</h1>
{% if collection.summary %}
<div class="page__content__intro">
{{ collection.summary }}
</div>
{% endif %}
<div class="page__content__body">
{{ collection.body|show_media }}
</div>
</article>
</main>
{% block correlatedItems %}
{% if id.o.haspart %}
{% if id.o.haspart|length > 10 %}
{% include "_correlated-items.tpl"
items=id.o.haspart|slice:[1,10]
showMetaData="date"
title="Andere objecten"
variant="related"
showMoreLabel="Toon alle"
showMoreQueryRsc=m.rsc.le_all_events
%}
{% else %}
{% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="" %}
{% endif %}
{% endif %}
{% endblock %}
{% endwith %}
</div>
{% endblock %}
| {% extends "page.tpl" %}
{% block title %}{{ id.title }}{% endblock %}
{% block body_class %}collection{% endblock %}
{% block content %}
<div class="page--collection page__content-wrapper do_ginger_default_content_group_navigation">
{% with id as collection %}
{% block masthead %}
{% include "_masthead.tpl" article=collection %}
{% endblock %}
<main role="main" class="page__main-content">
<article class="page__content">
<h1 class="page__content__title">{{ collection.title }}</h1>
{% if collection.summary %}
<div class="page__content__intro">
{{ collection.summary }}
</div>
{% endif %}
<div class="page__content__body">
{{ collection.body|show_media }}
</div>
</article>
</main>
{% block correlatedItems %}
{% if id.o.haspart %}
{% if id.o.haspart|length > 10 %}
{% include "_correlated-items.tpl"
items=id.o.haspart|slice:[1,10]
showMetaData="date"
title="Andere objecten"
variant="related"
showMoreLabel="Toon alle"
showMoreQueryRsc=m.rsc.le_all_events
%}
{% else %}
{% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="Andere objecten" %}
{% endif %}
{% endif %}
{% endblock %}
{% endwith %}
</div>
{% endblock %}
| Add title for other objects | [default] Add title for other objects
| Smarty | apache-2.0 | driebit/ginger,driebit/ginger,driebit/ginger | smarty | ## Code Before:
{% extends "page.tpl" %}
{% block title %}{{ id.title }}{% endblock %}
{% block body_class %}collection{% endblock %}
{% block content %}
<div class="page--collection page__content-wrapper do_ginger_default_content_group_navigation">
{% with id as collection %}
{% block masthead %}
{% include "_masthead.tpl" article=collection %}
{% endblock %}
<main role="main" class="page__main-content">
<article class="page__content">
<h1 class="page__content__title">{{ collection.title }}</h1>
{% if collection.summary %}
<div class="page__content__intro">
{{ collection.summary }}
</div>
{% endif %}
<div class="page__content__body">
{{ collection.body|show_media }}
</div>
</article>
</main>
{% block correlatedItems %}
{% if id.o.haspart %}
{% if id.o.haspart|length > 10 %}
{% include "_correlated-items.tpl"
items=id.o.haspart|slice:[1,10]
showMetaData="date"
title="Andere objecten"
variant="related"
showMoreLabel="Toon alle"
showMoreQueryRsc=m.rsc.le_all_events
%}
{% else %}
{% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="" %}
{% endif %}
{% endif %}
{% endblock %}
{% endwith %}
</div>
{% endblock %}
## Instruction:
[default] Add title for other objects
## Code After:
{% extends "page.tpl" %}
{% block title %}{{ id.title }}{% endblock %}
{% block body_class %}collection{% endblock %}
{% block content %}
<div class="page--collection page__content-wrapper do_ginger_default_content_group_navigation">
{% with id as collection %}
{% block masthead %}
{% include "_masthead.tpl" article=collection %}
{% endblock %}
<main role="main" class="page__main-content">
<article class="page__content">
<h1 class="page__content__title">{{ collection.title }}</h1>
{% if collection.summary %}
<div class="page__content__intro">
{{ collection.summary }}
</div>
{% endif %}
<div class="page__content__body">
{{ collection.body|show_media }}
</div>
</article>
</main>
{% block correlatedItems %}
{% if id.o.haspart %}
{% if id.o.haspart|length > 10 %}
{% include "_correlated-items.tpl"
items=id.o.haspart|slice:[1,10]
showMetaData="date"
title="Andere objecten"
variant="related"
showMoreLabel="Toon alle"
showMoreQueryRsc=m.rsc.le_all_events
%}
{% else %}
{% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="Andere objecten" %}
{% endif %}
{% endif %}
{% endblock %}
{% endwith %}
</div>
{% endblock %}
| {% extends "page.tpl" %}
{% block title %}{{ id.title }}{% endblock %}
{% block body_class %}collection{% endblock %}
{% block content %}
<div class="page--collection page__content-wrapper do_ginger_default_content_group_navigation">
{% with id as collection %}
{% block masthead %}
{% include "_masthead.tpl" article=collection %}
{% endblock %}
<main role="main" class="page__main-content">
<article class="page__content">
<h1 class="page__content__title">{{ collection.title }}</h1>
{% if collection.summary %}
<div class="page__content__intro">
{{ collection.summary }}
</div>
{% endif %}
<div class="page__content__body">
{{ collection.body|show_media }}
</div>
</article>
</main>
{% block correlatedItems %}
{% if id.o.haspart %}
{% if id.o.haspart|length > 10 %}
{% include "_correlated-items.tpl"
items=id.o.haspart|slice:[1,10]
showMetaData="date"
title="Andere objecten"
variant="related"
showMoreLabel="Toon alle"
showMoreQueryRsc=m.rsc.le_all_events
%}
{% else %}
- {% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="" %}
+ {% include "_correlated-items.tpl" items=id.o.haspart showMetaData="date" title="Andere objecten" %}
? +++++++++++++++
{% endif %}
{% endif %}
{% endblock %}
{% endwith %}
</div>
{% endblock %} | 2 | 0.040816 | 1 | 1 |
2aa57f34961218200c8cb467d0139da65b99ba0a | pubspec.yaml | pubspec.yaml | name: ambient
description: A sample web application
dependencies:
browser: any
image: any
| name: AmbientImageBox
description: A Dart image widget whose border color matches the image color tone.
dependencies:
browser: any
image: any
| Update Dart project name and description | Update Dart project name and description
| YAML | mit | scai/ambient-imagebox | yaml | ## Code Before:
name: ambient
description: A sample web application
dependencies:
browser: any
image: any
## Instruction:
Update Dart project name and description
## Code After:
name: AmbientImageBox
description: A Dart image widget whose border color matches the image color tone.
dependencies:
browser: any
image: any
| - name: ambient
- description: A sample web application
+ name: AmbientImageBox
+ description: A Dart image widget whose border color matches the image color tone.
dependencies:
browser: any
image: any | 4 | 0.8 | 2 | 2 |
88cc0452b7d4f787b0a9641e32dafce4dd18afe0 | db/seeds/prisons/VEI-the-verne.yml | db/seeds/prisons/VEI-the-verne.yml | ---
name: The Verne
nomis_id: VEI
address: |-
Verne Common Road
Portland
Dorset
postcode: DT5 1EQ
email_address: socialvisits.theverne@hmps.gsi.gov.uk
phone_no: 01305 825000
enabled: true
private: false
lead_days: 4
closed: false
recurring:
tue:
- 1400-1600
wed:
- 1400-1600
sat:
- 1400-1600
sun:
- 1400-1600
| ---
name: The Verne
nomis_id: VEI
address: |-
Verne Common Road
Portland
Dorset
postcode: DT5 1EQ
email_address: socialvisits.theverne@hmps.gsi.gov.uk
phone_no: 01305 825000
enabled: true
private: false
lead_days: 4
closed: false
recurring:
tue:
- 1400-1600
wed:
- 1400-1600
sat:
- 1400-1600
sun:
- 1400-1600
unbookable:
- 2019-08-03
- 2019-08-04
- 2019-08-06
- 2019-08-07
- 2019-08-10
- 2019-08-11
- 2019-08-13
- 2019-08-14
- 2019-08-17
- 2019-08-18
- 2019-08-20
- 2019-08-21
- 2019-08-24
- 2019-08-25
- 2019-08-27
- 2019-08-28
- 2019-08-31
- 2019-09-01
- 2019-09-03
- 2019-09-04
- 2019-09-07
- 2019-09-08
- 2019-09-10
- 2019-09-11
- 2019-09-14
- 2019-09-15
| Add unbookable dates to The Verne | Add unbookable dates to The Verne
Whilst testing the slots had been correctly named a couple of visitors
found The Verne had online booking enabled and made requests. As there
are requests we don't want to cause further issues by 'shutting' them
down in production and therefore have decided to make future dates
unbookable, until they are ready to start using the service. Once ready,
we can remove the unbookable dates so visitors will be able to use the
service.
| YAML | mit | ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2 | yaml | ## Code Before:
---
name: The Verne
nomis_id: VEI
address: |-
Verne Common Road
Portland
Dorset
postcode: DT5 1EQ
email_address: socialvisits.theverne@hmps.gsi.gov.uk
phone_no: 01305 825000
enabled: true
private: false
lead_days: 4
closed: false
recurring:
tue:
- 1400-1600
wed:
- 1400-1600
sat:
- 1400-1600
sun:
- 1400-1600
## Instruction:
Add unbookable dates to The Verne
Whilst testing the slots had been correctly named a couple of visitors
found The Verne had online booking enabled and made requests. As there
are requests we don't want to cause further issues by 'shutting' them
down in production and therefore have decided to make future dates
unbookable, until they are ready to start using the service. Once ready,
we can remove the unbookable dates so visitors will be able to use the
service.
## Code After:
---
name: The Verne
nomis_id: VEI
address: |-
Verne Common Road
Portland
Dorset
postcode: DT5 1EQ
email_address: socialvisits.theverne@hmps.gsi.gov.uk
phone_no: 01305 825000
enabled: true
private: false
lead_days: 4
closed: false
recurring:
tue:
- 1400-1600
wed:
- 1400-1600
sat:
- 1400-1600
sun:
- 1400-1600
unbookable:
- 2019-08-03
- 2019-08-04
- 2019-08-06
- 2019-08-07
- 2019-08-10
- 2019-08-11
- 2019-08-13
- 2019-08-14
- 2019-08-17
- 2019-08-18
- 2019-08-20
- 2019-08-21
- 2019-08-24
- 2019-08-25
- 2019-08-27
- 2019-08-28
- 2019-08-31
- 2019-09-01
- 2019-09-03
- 2019-09-04
- 2019-09-07
- 2019-09-08
- 2019-09-10
- 2019-09-11
- 2019-09-14
- 2019-09-15
| ---
name: The Verne
nomis_id: VEI
address: |-
Verne Common Road
Portland
Dorset
postcode: DT5 1EQ
email_address: socialvisits.theverne@hmps.gsi.gov.uk
phone_no: 01305 825000
enabled: true
private: false
lead_days: 4
closed: false
recurring:
tue:
- 1400-1600
wed:
- 1400-1600
sat:
- 1400-1600
sun:
- 1400-1600
+ unbookable:
+ - 2019-08-03
+ - 2019-08-04
+ - 2019-08-06
+ - 2019-08-07
+ - 2019-08-10
+ - 2019-08-11
+ - 2019-08-13
+ - 2019-08-14
+ - 2019-08-17
+ - 2019-08-18
+ - 2019-08-20
+ - 2019-08-21
+ - 2019-08-24
+ - 2019-08-25
+ - 2019-08-27
+ - 2019-08-28
+ - 2019-08-31
+ - 2019-09-01
+ - 2019-09-03
+ - 2019-09-04
+ - 2019-09-07
+ - 2019-09-08
+ - 2019-09-10
+ - 2019-09-11
+ - 2019-09-14
+ - 2019-09-15 | 27 | 1.173913 | 27 | 0 |
b71893e794113676475b1bd6a602be4635434bb3 | src/Data/Iteratee.hs | src/Data/Iteratee.hs | {-# LANGUAGE FlexibleContexts #-}
module Data.Iteratee (
module Data.Iteratee.Base,
module Data.Iteratee.Binary,
fileDriverRandom
)
where
import Data.Iteratee.Base
import Data.Iteratee.Binary
import Data.Iteratee.IO
| {- | Provide iteratee-based IO as described in Oleg Kiselyov's paper http://okmij.org/ftp/Haskell/Iteratee/.
Oleg's original code uses lists to store buffers of data for reading in the iteratee. This package allows the use of arbitrary types through use of the StreamChunk type class. See Data.Iteratee.WrappedByteString for implementation details.
-}
module Data.Iteratee (
module Data.Iteratee.Base,
module Data.Iteratee.Binary,
fileDriverRandom
)
where
import Data.Iteratee.Base
import Data.Iteratee.Binary
import Data.Iteratee.IO
| Add header to Haddock docs. | Add header to Haddock docs.
| Haskell | bsd-3-clause | JohnLato/iteratee | haskell | ## Code Before:
{-# LANGUAGE FlexibleContexts #-}
module Data.Iteratee (
module Data.Iteratee.Base,
module Data.Iteratee.Binary,
fileDriverRandom
)
where
import Data.Iteratee.Base
import Data.Iteratee.Binary
import Data.Iteratee.IO
## Instruction:
Add header to Haddock docs.
## Code After:
{- | Provide iteratee-based IO as described in Oleg Kiselyov's paper http://okmij.org/ftp/Haskell/Iteratee/.
Oleg's original code uses lists to store buffers of data for reading in the iteratee. This package allows the use of arbitrary types through use of the StreamChunk type class. See Data.Iteratee.WrappedByteString for implementation details.
-}
module Data.Iteratee (
module Data.Iteratee.Base,
module Data.Iteratee.Binary,
fileDriverRandom
)
where
import Data.Iteratee.Base
import Data.Iteratee.Binary
import Data.Iteratee.IO
| - {-# LANGUAGE FlexibleContexts #-}
+ {- | Provide iteratee-based IO as described in Oleg Kiselyov's paper http://okmij.org/ftp/Haskell/Iteratee/.
+
+ Oleg's original code uses lists to store buffers of data for reading in the iteratee. This package allows the use of arbitrary types through use of the StreamChunk type class. See Data.Iteratee.WrappedByteString for implementation details.
+
+ -}
module Data.Iteratee (
module Data.Iteratee.Base,
module Data.Iteratee.Binary,
fileDriverRandom
)
where
import Data.Iteratee.Base
import Data.Iteratee.Binary
import Data.Iteratee.IO
| 6 | 0.428571 | 5 | 1 |
2fefa148f1d419a6247ab3c924043f8ae59b666e | README.md | README.md |
[](https://travis-ci.org/zurb/inky-cli) [](https://badge.fury.io/js/inky-cli)
Command-line interface for [Inky](https://github.com/zurb/inky), a templating language for HTML emails created with [Foundation for Emails](http://foundation.zurb.com/emails).
## Installation
```bash
npm install inky-cli --global
```
## Usage
```
Usage
$ inky <input> <output>
Options
-w, --watch Watch input files for changes
```
|
[](https://travis-ci.org/zurb/inky-cli) [](https://badge.fury.io/js/inky-cli)
Command-line interface for [Inky](https://github.com/zurb/inky), a templating language for HTML emails created with [Foundation for Emails](http://foundation.zurb.com/emails).
Please report issues with the HTML output to [inky](https://github.com/zurb/inky/issues) instead.
## Installation
```bash
npm install inky-cli --global
```
## Usage
```
Usage
$ inky <input> <output>
Options
-w, --watch Watch input files for changes
```
| Add line to readme instructing users to file issues with the HTML output on the inky repo itself | Add line to readme instructing users to file issues with the HTML output on the inky repo itself | Markdown | mit | zurb/inky-cli | markdown | ## Code Before:
[](https://travis-ci.org/zurb/inky-cli) [](https://badge.fury.io/js/inky-cli)
Command-line interface for [Inky](https://github.com/zurb/inky), a templating language for HTML emails created with [Foundation for Emails](http://foundation.zurb.com/emails).
## Installation
```bash
npm install inky-cli --global
```
## Usage
```
Usage
$ inky <input> <output>
Options
-w, --watch Watch input files for changes
```
## Instruction:
Add line to readme instructing users to file issues with the HTML output on the inky repo itself
## Code After:
[](https://travis-ci.org/zurb/inky-cli) [](https://badge.fury.io/js/inky-cli)
Command-line interface for [Inky](https://github.com/zurb/inky), a templating language for HTML emails created with [Foundation for Emails](http://foundation.zurb.com/emails).
Please report issues with the HTML output to [inky](https://github.com/zurb/inky/issues) instead.
## Installation
```bash
npm install inky-cli --global
```
## Usage
```
Usage
$ inky <input> <output>
Options
-w, --watch Watch input files for changes
```
|
[](https://travis-ci.org/zurb/inky-cli) [](https://badge.fury.io/js/inky-cli)
Command-line interface for [Inky](https://github.com/zurb/inky), a templating language for HTML emails created with [Foundation for Emails](http://foundation.zurb.com/emails).
+
+ Please report issues with the HTML output to [inky](https://github.com/zurb/inky/issues) instead.
## Installation
```bash
npm install inky-cli --global
```
## Usage
```
Usage
$ inky <input> <output>
Options
-w, --watch Watch input files for changes
``` | 2 | 0.1 | 2 | 0 |
a081e1554614ac92aebe31b0dd514a12484d4ece | app/lib/collections/posts.js | app/lib/collections/posts.js | Posts = new Mongo.Collection('posts');
Posts.allow({
insert: function(userId, doc) {
// only allow posting if you are logged in
return !! userId;
}
}); | Posts = new Mongo.Collection('posts');
Meteor.methods({
postInsert: function(postAttributes) {
check(Meteor.userId(), String);
check(postAttributes, {
title: String,
url: String
});
var user = Meteor.user();
var post = _.extend(postAttributes, {
userId: user._id,
author: user.username,
submitted: new Date()
});
var postId = Posts.insert(post);
return {
_id: postId
};
}
}); | Use Meteor.methods to set up post (including user) | Use Meteor.methods to set up post (including user)
| JavaScript | mit | drainpip/music-management-system,drainpip/music-management-system | javascript | ## Code Before:
Posts = new Mongo.Collection('posts');
Posts.allow({
insert: function(userId, doc) {
// only allow posting if you are logged in
return !! userId;
}
});
## Instruction:
Use Meteor.methods to set up post (including user)
## Code After:
Posts = new Mongo.Collection('posts');
Meteor.methods({
postInsert: function(postAttributes) {
check(Meteor.userId(), String);
check(postAttributes, {
title: String,
url: String
});
var user = Meteor.user();
var post = _.extend(postAttributes, {
userId: user._id,
author: user.username,
submitted: new Date()
});
var postId = Posts.insert(post);
return {
_id: postId
};
}
}); | Posts = new Mongo.Collection('posts');
- Posts.allow({
- insert: function(userId, doc) {
- // only allow posting if you are logged in
- return !! userId;
+ Meteor.methods({
+ postInsert: function(postAttributes) {
+ check(Meteor.userId(), String);
+ check(postAttributes, {
+ title: String,
+ url: String
+ });
+ var user = Meteor.user();
+ var post = _.extend(postAttributes, {
+ userId: user._id,
+ author: user.username,
+ submitted: new Date()
+ });
+ var postId = Posts.insert(post);
+ return {
+ _id: postId
+ };
}
}); | 21 | 2.625 | 17 | 4 |
4e97336f7f6b68b677b41558244652f6379a8918 | package.json | package.json | {
"name": "be.bastelstu.packageServer",
"description": "Package Server for WoltLab Community Framework",
"homepage": "https://github.com/wbbaddons/PackageServer",
"keywords": [
"woltlab community framework"
],
"author": "Tim Düsterhus <timwolla@bastelstu.be>",
"dependencies": {
"express": "~3",
"async": "> 0.2",
"tar": "> 0.1",
"xml2js": "> 0.2",
"caterpillar": "~2",
"caterpillar-human": "*",
"caterpillar-filter": "*",
"xml-writer": "> 1.2"
},
"engines": {
"node": ">=0.6.0",
"npm": ">=1.0"
},
"version": "1.0.0"
}
| {
"name": "be.bastelstu.packageServer",
"description": "Package Server for WoltLab Community Framework",
"homepage": "https://github.com/wbbaddons/PackageServer",
"keywords": [
"woltlab community framework"
],
"author": "Tim Düsterhus <timwolla@bastelstu.be>",
"dependencies": {
"express": "~3",
"async": "> 0.2",
"tar": "> 0.1",
"xml2js": "> 0.2",
"caterpillar": "~2",
"caterpillar-human": "*",
"caterpillar-filter": "*",
"xml-writer": "> 1.2",
"coffee-script": "> 1.4"
},
"engines": {
"node": ">=0.6.0",
"npm": ">=1.0"
},
"version": "1.0.0"
}
| Add coffee-script as a dependency | Add coffee-script as a dependency
| JSON | agpl-3.0 | wbbaddons/Tims-PackageServer,wbbaddons/Tims-PackageServer,wbbaddons/Tims-PackageServer | json | ## Code Before:
{
"name": "be.bastelstu.packageServer",
"description": "Package Server for WoltLab Community Framework",
"homepage": "https://github.com/wbbaddons/PackageServer",
"keywords": [
"woltlab community framework"
],
"author": "Tim Düsterhus <timwolla@bastelstu.be>",
"dependencies": {
"express": "~3",
"async": "> 0.2",
"tar": "> 0.1",
"xml2js": "> 0.2",
"caterpillar": "~2",
"caterpillar-human": "*",
"caterpillar-filter": "*",
"xml-writer": "> 1.2"
},
"engines": {
"node": ">=0.6.0",
"npm": ">=1.0"
},
"version": "1.0.0"
}
## Instruction:
Add coffee-script as a dependency
## Code After:
{
"name": "be.bastelstu.packageServer",
"description": "Package Server for WoltLab Community Framework",
"homepage": "https://github.com/wbbaddons/PackageServer",
"keywords": [
"woltlab community framework"
],
"author": "Tim Düsterhus <timwolla@bastelstu.be>",
"dependencies": {
"express": "~3",
"async": "> 0.2",
"tar": "> 0.1",
"xml2js": "> 0.2",
"caterpillar": "~2",
"caterpillar-human": "*",
"caterpillar-filter": "*",
"xml-writer": "> 1.2",
"coffee-script": "> 1.4"
},
"engines": {
"node": ">=0.6.0",
"npm": ">=1.0"
},
"version": "1.0.0"
}
| {
"name": "be.bastelstu.packageServer",
"description": "Package Server for WoltLab Community Framework",
"homepage": "https://github.com/wbbaddons/PackageServer",
"keywords": [
"woltlab community framework"
],
"author": "Tim Düsterhus <timwolla@bastelstu.be>",
"dependencies": {
"express": "~3",
"async": "> 0.2",
"tar": "> 0.1",
"xml2js": "> 0.2",
"caterpillar": "~2",
"caterpillar-human": "*",
"caterpillar-filter": "*",
- "xml-writer": "> 1.2"
+ "xml-writer": "> 1.2",
? +
+ "coffee-script": "> 1.4"
},
"engines": {
"node": ">=0.6.0",
"npm": ">=1.0"
},
"version": "1.0.0"
} | 3 | 0.125 | 2 | 1 |
fd6cc34c682c773273bcdd9d09d2f7f2e4d91700 | ocr/tfhelpers.py | ocr/tfhelpers.py | import tensorflow as tf
class Graph():
""" Loading and running isolated tf graph """
def __init__(self, loc):
self.graph = tf.Graph()
self.sess = tf.Session(graph=self.graph)
with self.graph.as_default():
saver = tf.train.import_meta_graph(loc + '.meta', clear_devices=True)
saver.restore(self.sess, loc)
self.activation = tf.get_collection('activation')[0]
# To launch the graph
def run(self, data):
return self.sess.run(self.activation, feed_dict={"x:0": data}) | import tensorflow as tf
class Graph():
""" Loading and running isolated tf graph """
def __init__(self, loc, operation='activation', input_name='x'):
"""
loc: location of file containing saved model
operation: name of operation for running the model
input_name: name of input placeholder
"""
self.input = input_name + ":0"
self.graph = tf.Graph()
self.sess = tf.Session(graph=self.graph)
with self.graph.as_default():
saver = tf.train.import_meta_graph(loc + '.meta', clear_devices=True)
saver.restore(self.sess, loc)
self.op = self.graph.get_operation_by_name(operation).outputs[0]
def run(self, data):
""" Run the specified operation on given data """
return self.sess.run(self.op, feed_dict={self.input: data}) | Update Graph class for loading saved models Requires renaming operations in models -> re-train them | Update Graph class for loading saved models
Requires renaming operations in models -> re-train them
| Python | mit | Breta01/handwriting-ocr | python | ## Code Before:
import tensorflow as tf
class Graph():
""" Loading and running isolated tf graph """
def __init__(self, loc):
self.graph = tf.Graph()
self.sess = tf.Session(graph=self.graph)
with self.graph.as_default():
saver = tf.train.import_meta_graph(loc + '.meta', clear_devices=True)
saver.restore(self.sess, loc)
self.activation = tf.get_collection('activation')[0]
# To launch the graph
def run(self, data):
return self.sess.run(self.activation, feed_dict={"x:0": data})
## Instruction:
Update Graph class for loading saved models
Requires renaming operations in models -> re-train them
## Code After:
import tensorflow as tf
class Graph():
""" Loading and running isolated tf graph """
def __init__(self, loc, operation='activation', input_name='x'):
"""
loc: location of file containing saved model
operation: name of operation for running the model
input_name: name of input placeholder
"""
self.input = input_name + ":0"
self.graph = tf.Graph()
self.sess = tf.Session(graph=self.graph)
with self.graph.as_default():
saver = tf.train.import_meta_graph(loc + '.meta', clear_devices=True)
saver.restore(self.sess, loc)
self.op = self.graph.get_operation_by_name(operation).outputs[0]
def run(self, data):
""" Run the specified operation on given data """
return self.sess.run(self.op, feed_dict={self.input: data}) | import tensorflow as tf
class Graph():
""" Loading and running isolated tf graph """
- def __init__(self, loc):
+ def __init__(self, loc, operation='activation', input_name='x'):
+ """
+ loc: location of file containing saved model
+ operation: name of operation for running the model
+ input_name: name of input placeholder
+ """
+ self.input = input_name + ":0"
self.graph = tf.Graph()
self.sess = tf.Session(graph=self.graph)
with self.graph.as_default():
saver = tf.train.import_meta_graph(loc + '.meta', clear_devices=True)
saver.restore(self.sess, loc)
- self.activation = tf.get_collection('activation')[0]
- # To launch the graph
+ self.op = self.graph.get_operation_by_name(operation).outputs[0]
+
def run(self, data):
+ """ Run the specified operation on given data """
- return self.sess.run(self.activation, feed_dict={"x:0": data})
? -------- ^ ^^^^^
+ return self.sess.run(self.op, feed_dict={self.input: data})
? ^ ^^^^^^^^^^
| 15 | 1.071429 | 11 | 4 |
cc3ee3c873b51c7d4b9925ebf9f48616da1bc49f | .github/workflows/build.yml | .github/workflows/build.yml | name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v2
with:
# Get full history; needed for Prettier to amend commit
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Prettier
if: matrix.os != 'windows-latest'
uses: creyD/prettier_action@v3.3
with:
prettier_options: '--write **/*.{ts,js,json,md,yml}'
same_commit: true
only_changed: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: npx tslint -c tslint.json -p tsconfig.json
- name: Build
run: gulp webpack
- name: Test on ubuntu-latest
if: matrix.os != 'windows-latest'
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Test on windows-latest
if: matrix.os == 'windows-latest'
run: |
gulp prepare-test
yarn test
| name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
# Get full history; needed for Prettier to amend commit
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Prettier
if: matrix.os != 'windows-latest'
uses: creyD/prettier_action@v3.3
with:
prettier_options: '--write **/*.{ts,js,json,md,yml}'
same_commit: true
only_changed: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: npx tslint -c tslint.json -p tsconfig.json
- name: Build
run: gulp webpack
- name: Test on ubuntu-latest
if: matrix.os != 'windows-latest'
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Test on windows-latest
if: matrix.os == 'windows-latest'
run: |
gulp prepare-test
yarn test
| Fix prettier GitHub Action... maybe? | Fix prettier GitHub Action... maybe?
| YAML | mit | VSCodeVim/Vim,VSCodeVim/Vim | yaml | ## Code Before:
name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v2
with:
# Get full history; needed for Prettier to amend commit
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Prettier
if: matrix.os != 'windows-latest'
uses: creyD/prettier_action@v3.3
with:
prettier_options: '--write **/*.{ts,js,json,md,yml}'
same_commit: true
only_changed: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: npx tslint -c tslint.json -p tsconfig.json
- name: Build
run: gulp webpack
- name: Test on ubuntu-latest
if: matrix.os != 'windows-latest'
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Test on windows-latest
if: matrix.os == 'windows-latest'
run: |
gulp prepare-test
yarn test
## Instruction:
Fix prettier GitHub Action... maybe?
## Code After:
name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
# Get full history; needed for Prettier to amend commit
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Prettier
if: matrix.os != 'windows-latest'
uses: creyD/prettier_action@v3.3
with:
prettier_options: '--write **/*.{ts,js,json,md,yml}'
same_commit: true
only_changed: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: npx tslint -c tslint.json -p tsconfig.json
- name: Build
run: gulp webpack
- name: Test on ubuntu-latest
if: matrix.os != 'windows-latest'
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Test on windows-latest
if: matrix.os == 'windows-latest'
run: |
gulp prepare-test
yarn test
| name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout VSCodeVim
uses: actions/checkout@v2
with:
+ ref: ${{ github.head_ref }}
# Get full history; needed for Prettier to amend commit
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Install dependencies
run: yarn install
- name: Prettier
if: matrix.os != 'windows-latest'
uses: creyD/prettier_action@v3.3
with:
prettier_options: '--write **/*.{ts,js,json,md,yml}'
same_commit: true
only_changed: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint
run: npx tslint -c tslint.json -p tsconfig.json
- name: Build
run: gulp webpack
- name: Test on ubuntu-latest
if: matrix.os != 'windows-latest'
run: |
gulp prepare-test
xvfb-run -a yarn test
- name: Test on windows-latest
if: matrix.os == 'windows-latest'
run: |
gulp prepare-test
yarn test | 1 | 0.017241 | 1 | 0 |
8c6e70378f5dae065f912acaa7fecd166e7ff0ca | scss/main.scss | scss/main.scss | @import 'reset';
$breakpoints: (
small: 0,
medium: 400px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$breakpoint-classes: (small medium large);
@import '../node_modules/foundation-sites/scss/foundation';
@include foundation-flex-grid;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-flex-classes;
/* @import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); */
@import '_colors';
@import '_typography';
@import '_general';
@import '_menu';
@import '_feeds';
@import '_chord';
@import '_feeding';
| @import 'reset';
$breakpoints: (
small: 0,
medium: 400px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$breakpoint-classes: (small medium large);
@import '../node_modules/foundation-sites/scss/foundation';
@include foundation-flex-grid;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-flex-classes;
/* @import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); */
@import '_colors';
@import '_typography';
@import '_general';
@import '_menu';
@import '_feeds';
@import '_feeding';
| Remove reference to chord scss | Remove reference to chord scss
| SCSS | mit | nico1000/feedr,nico1000/feedr | scss | ## Code Before:
@import 'reset';
$breakpoints: (
small: 0,
medium: 400px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$breakpoint-classes: (small medium large);
@import '../node_modules/foundation-sites/scss/foundation';
@include foundation-flex-grid;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-flex-classes;
/* @import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); */
@import '_colors';
@import '_typography';
@import '_general';
@import '_menu';
@import '_feeds';
@import '_chord';
@import '_feeding';
## Instruction:
Remove reference to chord scss
## Code After:
@import 'reset';
$breakpoints: (
small: 0,
medium: 400px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$breakpoint-classes: (small medium large);
@import '../node_modules/foundation-sites/scss/foundation';
@include foundation-flex-grid;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-flex-classes;
/* @import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); */
@import '_colors';
@import '_typography';
@import '_general';
@import '_menu';
@import '_feeds';
@import '_feeding';
| @import 'reset';
$breakpoints: (
small: 0,
medium: 400px,
large: 1024px,
xlarge: 1200px,
xxlarge: 1440px,
);
$breakpoint-classes: (small medium large);
@import '../node_modules/foundation-sites/scss/foundation';
@include foundation-flex-grid;
@include foundation-visibility-classes;
@include foundation-float-classes;
@include foundation-flex-classes;
/* @import url('https://fonts.googleapis.com/css?family=Raleway:400,700'); */
@import '_colors';
@import '_typography';
@import '_general';
@import '_menu';
@import '_feeds';
- @import '_chord';
@import '_feeding'; | 1 | 0.037037 | 0 | 1 |
5ce87fb61d472a6e4690063bf410f4174765e6ab | breath_depth_search.rb | breath_depth_search.rb | class Node
attr_accessor :value, :left, :right, :name
def initialize(options={})
@value = options[:value]
@name = options[:name]
end
def children
[@left, @right].compact
end
def children?
@left && @right
end
def no_children?
!children?
end
end
# Create nodes
root = Node.new({:value => 1, :name => "root"})
child_1 = Node.new({:value => 2, :name => "child_1"})
child_2 = Node.new({:value => 3, :name => "child_2"})
grand_child_1 = Node.new({:value => 4, :name => "grand_child_1"})
grand_child_2 = Node.new({:value => 5, :name => "grand_child_2"})
# Connect the nodes
child_1.left = grand_child_1
child_1.right = grand_child_2
root.left = child_1
root.right = child_2
def breath_first_search(node)
queue = []
queue.push(node)
while(queue.length != 0)
current = queue.shift
puts current.value
current.children.each do |child|
queue.push(child)
end
end
end
breath_first_search(root)
| class Node
attr_accessor :value, :left, :right, :name
def initialize(options={})
@value = options[:value]
@name = options[:name]
end
def children
[@left, @right].compact
end
def children?
@left && @right
end
def no_children?
!children?
end
end
# Create nodes
root = Node.new({:value => 1, :name => "root"})
child_1 = Node.new({:value => 2, :name => "child_1"})
child_2 = Node.new({:value => 3, :name => "child_2"})
grand_child_1 = Node.new({:value => 4, :name => "grand_child_1"})
grand_child_2 = Node.new({:value => 5, :name => "grand_child_2"})
# Connect the nodes
child_1.left = grand_child_1
child_1.right = grand_child_2
root.left = child_1
root.right = child_2
def breath_first_search(node)
queue = []
queue.push(node)
while(queue.length != 0)
current = queue.shift
puts current.value
current.children.each do |child|
queue.push(child)
end
end
end
breath_first_search(root)
def depth_first_search(node)
puts node.value
node.children.each do |child|
depth_first_search(child)
end
end
depth_first_search(root)
| Complete depth first search method | Complete depth first search method
| Ruby | mit | Chris-Wong-1/ruby-algorithms | ruby | ## Code Before:
class Node
attr_accessor :value, :left, :right, :name
def initialize(options={})
@value = options[:value]
@name = options[:name]
end
def children
[@left, @right].compact
end
def children?
@left && @right
end
def no_children?
!children?
end
end
# Create nodes
root = Node.new({:value => 1, :name => "root"})
child_1 = Node.new({:value => 2, :name => "child_1"})
child_2 = Node.new({:value => 3, :name => "child_2"})
grand_child_1 = Node.new({:value => 4, :name => "grand_child_1"})
grand_child_2 = Node.new({:value => 5, :name => "grand_child_2"})
# Connect the nodes
child_1.left = grand_child_1
child_1.right = grand_child_2
root.left = child_1
root.right = child_2
def breath_first_search(node)
queue = []
queue.push(node)
while(queue.length != 0)
current = queue.shift
puts current.value
current.children.each do |child|
queue.push(child)
end
end
end
breath_first_search(root)
## Instruction:
Complete depth first search method
## Code After:
class Node
attr_accessor :value, :left, :right, :name
def initialize(options={})
@value = options[:value]
@name = options[:name]
end
def children
[@left, @right].compact
end
def children?
@left && @right
end
def no_children?
!children?
end
end
# Create nodes
root = Node.new({:value => 1, :name => "root"})
child_1 = Node.new({:value => 2, :name => "child_1"})
child_2 = Node.new({:value => 3, :name => "child_2"})
grand_child_1 = Node.new({:value => 4, :name => "grand_child_1"})
grand_child_2 = Node.new({:value => 5, :name => "grand_child_2"})
# Connect the nodes
child_1.left = grand_child_1
child_1.right = grand_child_2
root.left = child_1
root.right = child_2
def breath_first_search(node)
queue = []
queue.push(node)
while(queue.length != 0)
current = queue.shift
puts current.value
current.children.each do |child|
queue.push(child)
end
end
end
breath_first_search(root)
def depth_first_search(node)
puts node.value
node.children.each do |child|
depth_first_search(child)
end
end
depth_first_search(root)
| class Node
attr_accessor :value, :left, :right, :name
def initialize(options={})
@value = options[:value]
@name = options[:name]
end
def children
[@left, @right].compact
end
def children?
@left && @right
end
def no_children?
!children?
end
end
# Create nodes
root = Node.new({:value => 1, :name => "root"})
child_1 = Node.new({:value => 2, :name => "child_1"})
child_2 = Node.new({:value => 3, :name => "child_2"})
grand_child_1 = Node.new({:value => 4, :name => "grand_child_1"})
grand_child_2 = Node.new({:value => 5, :name => "grand_child_2"})
# Connect the nodes
child_1.left = grand_child_1
child_1.right = grand_child_2
root.left = child_1
root.right = child_2
def breath_first_search(node)
queue = []
queue.push(node)
while(queue.length != 0)
current = queue.shift
puts current.value
current.children.each do |child|
queue.push(child)
end
end
end
breath_first_search(root)
+
+ def depth_first_search(node)
+ puts node.value
+ node.children.each do |child|
+ depth_first_search(child)
+ end
+ end
+
+ depth_first_search(root) | 9 | 0.1875 | 9 | 0 |
8c1108e91111b78826e2a165483b906fe1ae1c71 | foodr-backend/app/controllers/searches_controller.rb | foodr-backend/app/controllers/searches_controller.rb | class SearchesController < ApplicationController
def create
end
def save
search = Search.find_by(id: params[:id])
if search
search.update(is_saved: true)
render json: {
save_successful: true,
search: search,
product: search.product
}.to_json
else
render json: { save_successful: false }.to_json
end
end
end | class SearchesController < ApplicationController
def save
search = Search.find_by(id: params[:id])
if search
search.update(is_saved: true)
render json: {
save_successful: true,
search: search,
product: search.product
}.to_json
else
render json: { save_successful: false }.to_json
end
end
end | Remove create method from search controller | Remove create method from search controller
| Ruby | mit | foodr/foodr,foodr/foodr,foodr/foodr,foodr/foodr,foodr/foodr | ruby | ## Code Before:
class SearchesController < ApplicationController
def create
end
def save
search = Search.find_by(id: params[:id])
if search
search.update(is_saved: true)
render json: {
save_successful: true,
search: search,
product: search.product
}.to_json
else
render json: { save_successful: false }.to_json
end
end
end
## Instruction:
Remove create method from search controller
## Code After:
class SearchesController < ApplicationController
def save
search = Search.find_by(id: params[:id])
if search
search.update(is_saved: true)
render json: {
save_successful: true,
search: search,
product: search.product
}.to_json
else
render json: { save_successful: false }.to_json
end
end
end | class SearchesController < ApplicationController
-
- def create
- end
def save
search = Search.find_by(id: params[:id])
if search
search.update(is_saved: true)
render json: {
save_successful: true,
search: search,
product: search.product
}.to_json
else
render json: { save_successful: false }.to_json
end
end
end | 3 | 0.157895 | 0 | 3 |
a6e7f053c151fc343f0dd86010b159e21c0948b5 | accountsplus/forms.py | accountsplus/forms.py | from __future__ import unicode_literals
import django.forms
from django.conf import settings
from django.apps import apps
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.admin.forms import AdminAuthenticationForm
from captcha.fields import ReCaptchaField
class CaptchaForm(django.forms.Form):
captcha = ReCaptchaField()
username = django.forms.CharField()
def clean_username(self):
username = self.cleaned_data.get('username')
User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL'))
if not User.objects.filter(email=username).exists():
raise django.forms.ValidationError("Username does not belong to a registered user")
return username
class EmailBasedAuthenticationForm(AuthenticationForm):
def clean_username(self):
return self.cleaned_data['username'].lower()
class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm):
def clean_username(self):
return self.cleaned_data['username'].lower()
| from __future__ import unicode_literals
import django.forms
from django.conf import settings
from django.apps import apps
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.admin.forms import AdminAuthenticationForm
from captcha.fields import ReCaptchaField
class CaptchaForm(django.forms.Form):
captcha = ReCaptchaField()
username = django.forms.CharField()
def clean_username(self):
username = self.cleaned_data.get('username')
User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL'))
if not User.objects.filter(email=username).exists():
raise django.forms.ValidationError("Username does not belong to a registered user")
return username
class EmailBasedAuthenticationForm(AuthenticationForm):
def clean_username(self):
return self.data['username'].lower()
class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm):
def clean_username(self):
return self.data['username'].lower()
| Fix how we are reading user name | Fix how we are reading user name
| Python | mit | foundertherapy/django-users-plus,foundertherapy/django-users-plus | python | ## Code Before:
from __future__ import unicode_literals
import django.forms
from django.conf import settings
from django.apps import apps
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.admin.forms import AdminAuthenticationForm
from captcha.fields import ReCaptchaField
class CaptchaForm(django.forms.Form):
captcha = ReCaptchaField()
username = django.forms.CharField()
def clean_username(self):
username = self.cleaned_data.get('username')
User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL'))
if not User.objects.filter(email=username).exists():
raise django.forms.ValidationError("Username does not belong to a registered user")
return username
class EmailBasedAuthenticationForm(AuthenticationForm):
def clean_username(self):
return self.cleaned_data['username'].lower()
class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm):
def clean_username(self):
return self.cleaned_data['username'].lower()
## Instruction:
Fix how we are reading user name
## Code After:
from __future__ import unicode_literals
import django.forms
from django.conf import settings
from django.apps import apps
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.admin.forms import AdminAuthenticationForm
from captcha.fields import ReCaptchaField
class CaptchaForm(django.forms.Form):
captcha = ReCaptchaField()
username = django.forms.CharField()
def clean_username(self):
username = self.cleaned_data.get('username')
User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL'))
if not User.objects.filter(email=username).exists():
raise django.forms.ValidationError("Username does not belong to a registered user")
return username
class EmailBasedAuthenticationForm(AuthenticationForm):
def clean_username(self):
return self.data['username'].lower()
class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm):
def clean_username(self):
return self.data['username'].lower()
| from __future__ import unicode_literals
import django.forms
from django.conf import settings
from django.apps import apps
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.admin.forms import AdminAuthenticationForm
from captcha.fields import ReCaptchaField
class CaptchaForm(django.forms.Form):
captcha = ReCaptchaField()
username = django.forms.CharField()
def clean_username(self):
username = self.cleaned_data.get('username')
User = apps.get_model(getattr(settings, 'AUTH_USER_MODEL'))
if not User.objects.filter(email=username).exists():
raise django.forms.ValidationError("Username does not belong to a registered user")
return username
class EmailBasedAuthenticationForm(AuthenticationForm):
def clean_username(self):
- return self.cleaned_data['username'].lower()
? --------
+ return self.data['username'].lower()
class EmailBasedAdminAuthenticationForm(AdminAuthenticationForm):
def clean_username(self):
- return self.cleaned_data['username'].lower()
? --------
+ return self.data['username'].lower() | 4 | 0.121212 | 2 | 2 |
e6c672af2bc125fbe57f5bf85b5a7f912e4fd61d | network/src/main/scala/com/linkedin/norbert/network/netty/Request.scala | network/src/main/scala/com/linkedin/norbert/network/netty/Request.scala | /*
* Copyright 2009-2010 LinkedIn, Inc
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.linkedin.norbert.network.netty
import com.google.protobuf.Message
import java.util.UUID
case class Request(message: Message, responseCallback: (Either[Throwable, Message]) => Unit) {
val id = UUID.randomUUID
val timestamp = System.currentTimeMillis
}
| /*
* Copyright 2009-2010 LinkedIn, Inc
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.linkedin.norbert.network.netty
import com.google.protobuf.Message
import java.util.UUID
object Request {
def apply(message: Message, responseCallback: (Either[Throwable, Message]) => Unit): Request = {
Request(UUID.randomUUID, message, System.currentTimeMillis, responseCallback)
}
}
case class Request(id: UUID, message: Message, timestamp: Long, responseCallback: (Either[Throwable, Message]) => Unit)
| Refactor so toString is more informative | Refactor so toString is more informative
| Scala | apache-2.0 | nickhristov/norbert,linkedin/norbert,thesiddharth/norbert,rhavyn/norbert,linkedin-sna/norbert,jhartman/norbert,jhartman/norbert,linkedin-sna/norbert | scala | ## Code Before:
/*
* Copyright 2009-2010 LinkedIn, Inc
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.linkedin.norbert.network.netty
import com.google.protobuf.Message
import java.util.UUID
case class Request(message: Message, responseCallback: (Either[Throwable, Message]) => Unit) {
val id = UUID.randomUUID
val timestamp = System.currentTimeMillis
}
## Instruction:
Refactor so toString is more informative
## Code After:
/*
* Copyright 2009-2010 LinkedIn, Inc
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.linkedin.norbert.network.netty
import com.google.protobuf.Message
import java.util.UUID
object Request {
def apply(message: Message, responseCallback: (Either[Throwable, Message]) => Unit): Request = {
Request(UUID.randomUUID, message, System.currentTimeMillis, responseCallback)
}
}
case class Request(id: UUID, message: Message, timestamp: Long, responseCallback: (Either[Throwable, Message]) => Unit)
| /*
* Copyright 2009-2010 LinkedIn, Inc
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.linkedin.norbert.network.netty
import com.google.protobuf.Message
import java.util.UUID
+ object Request {
- case class Request(message: Message, responseCallback: (Either[Throwable, Message]) => Unit) {
? ^ ^^^^ ^^^^^^^^^^^
+ def apply(message: Message, responseCallback: (Either[Throwable, Message]) => Unit): Request = {
? ^^^^^^ ^^ ^ +++++++++++
- val id = UUID.randomUUID
- val timestamp = System.currentTimeMillis
+ Request(UUID.randomUUID, message, System.currentTimeMillis, responseCallback)
+ }
}
+
+ case class Request(id: UUID, message: Message, timestamp: Long, responseCallback: (Either[Throwable, Message]) => Unit) | 9 | 0.375 | 6 | 3 |
f5e213d70042b8c7c02fe8c01df5c0d4a340712b | spec/dynamodb_mutex_spec.rb | spec/dynamodb_mutex_spec.rb | require 'spec_helper'
describe DynamoDBMutex::Lock do
let(:locker) { DynamoDBMutex::Lock }
let(:lockname) { 'test.lock' }
describe '#with_lock' do
def run(id, ms)
print "invoked worker #{id}...\n"
locker.with_lock 'test.lock' do
sleep(ms)
end
end
it 'should execute block by default' do
locked = false
locker.with_lock(lockname) do
locked = true
end
expect(locked).to eq(true)
end
it 'should raise error after block timeout' do
if pid1 = fork
sleep(1)
expect {
locker.with_lock(lockname) { sleep(1) }
}.to raise_error(DynamoDBMutex::LockError)
Process.waitall
else
run(1, 5)
end
end
it 'should expire lock if stale' do
if pid1 = fork
sleep(2)
locker.with_lock(lockname, wait_for_other: 10) do
expect(locker).to receive(:delete).with('test.lock')
end
Process.waitall
else
run(1, 5)
end
end
end
end
| require 'spec_helper'
describe DynamoDBMutex::Lock do
let(:locker) { DynamoDBMutex::Lock }
let(:lockname) { 'test.lock' }
describe '#with_lock' do
def run(id, seconds)
locker.with_lock(lockname) do
sleep(seconds)
end
end
it 'should execute block by default' do
locked = false
locker.with_lock(lockname) do
locked = true
end
expect(locked).to eq(true)
end
it 'should raise error after block timeout' do
if pid1 = fork
sleep(1)
expect {
locker.with_lock(lockname) { sleep(1) }
}.to raise_error(DynamoDBMutex::LockError)
Process.waitall
else
run(1, 5)
end
end
it 'should expire lock if stale' do
if pid1 = fork
sleep(2)
locker.with_lock(lockname, wait_for_other: 10) do
expect(locker).to receive(:delete).with('test.lock')
end
Process.waitall
else
run(1, 5)
end
end
end
end
| Clarify time unit; no printing. | Clarify time unit; no printing.
| Ruby | mit | clearhaus/dynamodb-mutex,clearhaus/dynamodb-mutex | ruby | ## Code Before:
require 'spec_helper'
describe DynamoDBMutex::Lock do
let(:locker) { DynamoDBMutex::Lock }
let(:lockname) { 'test.lock' }
describe '#with_lock' do
def run(id, ms)
print "invoked worker #{id}...\n"
locker.with_lock 'test.lock' do
sleep(ms)
end
end
it 'should execute block by default' do
locked = false
locker.with_lock(lockname) do
locked = true
end
expect(locked).to eq(true)
end
it 'should raise error after block timeout' do
if pid1 = fork
sleep(1)
expect {
locker.with_lock(lockname) { sleep(1) }
}.to raise_error(DynamoDBMutex::LockError)
Process.waitall
else
run(1, 5)
end
end
it 'should expire lock if stale' do
if pid1 = fork
sleep(2)
locker.with_lock(lockname, wait_for_other: 10) do
expect(locker).to receive(:delete).with('test.lock')
end
Process.waitall
else
run(1, 5)
end
end
end
end
## Instruction:
Clarify time unit; no printing.
## Code After:
require 'spec_helper'
describe DynamoDBMutex::Lock do
let(:locker) { DynamoDBMutex::Lock }
let(:lockname) { 'test.lock' }
describe '#with_lock' do
def run(id, seconds)
locker.with_lock(lockname) do
sleep(seconds)
end
end
it 'should execute block by default' do
locked = false
locker.with_lock(lockname) do
locked = true
end
expect(locked).to eq(true)
end
it 'should raise error after block timeout' do
if pid1 = fork
sleep(1)
expect {
locker.with_lock(lockname) { sleep(1) }
}.to raise_error(DynamoDBMutex::LockError)
Process.waitall
else
run(1, 5)
end
end
it 'should expire lock if stale' do
if pid1 = fork
sleep(2)
locker.with_lock(lockname, wait_for_other: 10) do
expect(locker).to receive(:delete).with('test.lock')
end
Process.waitall
else
run(1, 5)
end
end
end
end
| require 'spec_helper'
describe DynamoDBMutex::Lock do
let(:locker) { DynamoDBMutex::Lock }
let(:lockname) { 'test.lock' }
describe '#with_lock' do
- def run(id, ms)
? ^
+ def run(id, seconds)
? ^^^^^^
- print "invoked worker #{id}...\n"
- locker.with_lock 'test.lock' do
? ^^^^^^^ ^
+ locker.with_lock(lockname) do
? ^ ^^^^^
- sleep(ms)
? ^
+ sleep(seconds)
? ^^^^^^
end
end
it 'should execute block by default' do
locked = false
locker.with_lock(lockname) do
locked = true
end
expect(locked).to eq(true)
end
it 'should raise error after block timeout' do
if pid1 = fork
sleep(1)
expect {
locker.with_lock(lockname) { sleep(1) }
}.to raise_error(DynamoDBMutex::LockError)
Process.waitall
else
run(1, 5)
end
end
it 'should expire lock if stale' do
if pid1 = fork
sleep(2)
locker.with_lock(lockname, wait_for_other: 10) do
expect(locker).to receive(:delete).with('test.lock')
end
Process.waitall
else
run(1, 5)
end
end
end
end | 7 | 0.14 | 3 | 4 |
a3cbc016f86753c09b53ecadddf4d9016d2689de | .travis.yml | .travis.yml | language: ruby
rvm:
- jruby-19mode
- 1.9
- 2.2.5
- 2.3.1
- ruby-head
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
sudo: false
matrix:
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails5.gemfile
allow_failures:
- rvm: ruby-head
exclude:
- rvm: 2.2
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.9
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile
| language: ruby
rvm:
- jruby-19mode
- 1.9
- 2.2.5
- 2.3.1
- ruby-head
- 2.4.0-preview2
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
sudo: false
matrix:
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails5.gemfile
allow_failures:
- rvm: ruby-head
- rvm: 2.4.0-preview2
exclude:
- rvm: 2.2
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.9
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile
| Add 2.4 preview to build list | Add 2.4 preview to build list
| YAML | apache-2.0 | looker/raven-ruby,getsentry/raven-ruby | yaml | ## Code Before:
language: ruby
rvm:
- jruby-19mode
- 1.9
- 2.2.5
- 2.3.1
- ruby-head
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
sudo: false
matrix:
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails5.gemfile
allow_failures:
- rvm: ruby-head
exclude:
- rvm: 2.2
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.9
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile
## Instruction:
Add 2.4 preview to build list
## Code After:
language: ruby
rvm:
- jruby-19mode
- 1.9
- 2.2.5
- 2.3.1
- ruby-head
- 2.4.0-preview2
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
sudo: false
matrix:
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails5.gemfile
allow_failures:
- rvm: ruby-head
- rvm: 2.4.0-preview2
exclude:
- rvm: 2.2
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.9
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile
| language: ruby
rvm:
- jruby-19mode
- 1.9
- 2.2.5
- 2.3.1
- ruby-head
+ - 2.4.0-preview2
gemfile:
- gemfiles/rails32.gemfile
- gemfiles/rails42.gemfile
- gemfiles/rails5.gemfile
sudo: false
matrix:
include:
- rvm: jruby-1.7.24
env: JRUBY_OPTS="--2.0"
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails42.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/rails5.gemfile
allow_failures:
- rvm: ruby-head
+ - rvm: 2.4.0-preview2
exclude:
- rvm: 2.2
gemfile: gemfiles/rails32.gemfile
- rvm: ruby-head
gemfile: gemfiles/rails32.gemfile
- rvm: 1.9
gemfile: gemfiles/rails5.gemfile
- rvm: jruby-19mode
gemfile: gemfiles/rails5.gemfile | 2 | 0.055556 | 2 | 0 |
4f3b9b7632a8d41945f6e3f8861563e591e3998d | etc/compile/compile.sh | etc/compile/compile.sh |
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP="$(mktemp -d -p . build.XXXXXXXXXX)"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
|
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP=docker_build_${BINARY}.tmpdir
mkdir -p "${TMP}"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
| Use consistent output dir (that depends on binary) | Use consistent output dir (that depends on binary)
| Shell | apache-2.0 | pachyderm/pfs,pachyderm/pfs,pachyderm/pfs | shell | ## Code Before:
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP="$(mktemp -d -p . build.XXXXXXXXXX)"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
## Instruction:
Use consistent output dir (that depends on binary)
## Code After:
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
TMP=docker_build_${BINARY}.tmpdir
mkdir -p "${TMP}"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}"
|
set -Eex
DIR="$(cd "$(dirname "${0}")/../.." && pwd)"
cd "${DIR}"
pwd
BINARY="${1}"
LD_FLAGS="${2}"
PROFILE="${3}"
- TMP="$(mktemp -d -p . build.XXXXXXXXXX)"
+ TMP=docker_build_${BINARY}.tmpdir
+ mkdir -p "${TMP}"
CGO_ENABLED=0 GOOS=linux go build \
-installsuffix netgo \
-tags netgo \
-o ${TMP}/${BINARY} \
-ldflags "${LD_FLAGS}" \
-gcflags "all=-trimpath=$GOPATH" \
src/server/cmd/${BINARY}/main.go
echo "LD_FLAGS=$LD_FLAGS"
# When creating profile binaries, we dont want to detach or do docker ops
if [ -z ${PROFILE} ]
then
cp Dockerfile.${BINARY} ${TMP}/Dockerfile
if [ ${BINARY} = "worker" ]; then
cp ./etc/worker/* ${TMP}/
fi
cp /etc/ssl/certs/ca-certificates.crt ${TMP}/ca-certificates.crt
docker build ${DOCKER_BUILD_FLAGS} -t pachyderm_${BINARY} ${TMP}
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:latest
docker tag pachyderm_${BINARY}:latest pachyderm/${BINARY}:local
else
cd ${TMP}
tar cf - ${BINARY}
fi
rm -rf "${TMP}" | 3 | 0.078947 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.