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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
25512a9e900277c7fb42fada6f9fe1fb9bf3bb5c | client/src/Authenticated.js | client/src/Authenticated.js | import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { connect } from 'unistore/react';
import initApp from './stores/initApp';
import useAppContext from './utilities/use-app-context';
import useSWR from 'swr';
function Authenticated({ children, initApp, initialized }) {
const { config, currentUser } = useAppContext();
let { data: connectionsData } = useSWR('/api/connections');
const connections = connectionsData || [];
useEffect(() => {
if (config && !initialized && connections.length > 0) {
initApp(config, connections);
}
}, [initApp, config, connections, initialized]);
if (!config) {
return null;
}
if (config && !currentUser) {
return <Redirect to={{ pathname: '/signin' }} />;
}
if (!initialized) {
return null;
}
return children;
}
export default connect(['initialized'], {
initApp,
})(Authenticated);
| import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { connect } from 'unistore/react';
import initApp from './stores/initApp';
import useAppContext from './utilities/use-app-context';
import useSWR from 'swr';
function Authenticated({ children, initApp, initialized }) {
const { config, currentUser } = useAppContext();
let { data: connections } = useSWR('/api/connections');
useEffect(() => {
if (config && !initialized && connections) {
initApp(config, connections);
}
}, [initApp, config, connections, initialized]);
if (!config) {
return null;
}
if (config && !currentUser) {
return <Redirect to={{ pathname: '/signin' }} />;
}
if (!initialized) {
return null;
}
return children;
}
export default connect(['initialized'], {
initApp,
})(Authenticated);
| Fix init for startup with no predefined connections | Fix init for startup with no predefined connections
| JavaScript | mit | rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad | javascript | ## Code Before:
import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { connect } from 'unistore/react';
import initApp from './stores/initApp';
import useAppContext from './utilities/use-app-context';
import useSWR from 'swr';
function Authenticated({ children, initApp, initialized }) {
const { config, currentUser } = useAppContext();
let { data: connectionsData } = useSWR('/api/connections');
const connections = connectionsData || [];
useEffect(() => {
if (config && !initialized && connections.length > 0) {
initApp(config, connections);
}
}, [initApp, config, connections, initialized]);
if (!config) {
return null;
}
if (config && !currentUser) {
return <Redirect to={{ pathname: '/signin' }} />;
}
if (!initialized) {
return null;
}
return children;
}
export default connect(['initialized'], {
initApp,
})(Authenticated);
## Instruction:
Fix init for startup with no predefined connections
## Code After:
import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { connect } from 'unistore/react';
import initApp from './stores/initApp';
import useAppContext from './utilities/use-app-context';
import useSWR from 'swr';
function Authenticated({ children, initApp, initialized }) {
const { config, currentUser } = useAppContext();
let { data: connections } = useSWR('/api/connections');
useEffect(() => {
if (config && !initialized && connections) {
initApp(config, connections);
}
}, [initApp, config, connections, initialized]);
if (!config) {
return null;
}
if (config && !currentUser) {
return <Redirect to={{ pathname: '/signin' }} />;
}
if (!initialized) {
return null;
}
return children;
}
export default connect(['initialized'], {
initApp,
})(Authenticated);
| import React, { useEffect } from 'react';
import { Redirect } from 'react-router-dom';
import { connect } from 'unistore/react';
import initApp from './stores/initApp';
import useAppContext from './utilities/use-app-context';
import useSWR from 'swr';
function Authenticated({ children, initApp, initialized }) {
const { config, currentUser } = useAppContext();
- let { data: connectionsData } = useSWR('/api/connections');
? ----
+ let { data: connections } = useSWR('/api/connections');
- const connections = connectionsData || [];
useEffect(() => {
- if (config && !initialized && connections.length > 0) {
? -----------
+ if (config && !initialized && connections) {
initApp(config, connections);
}
}, [initApp, config, connections, initialized]);
if (!config) {
return null;
}
if (config && !currentUser) {
return <Redirect to={{ pathname: '/signin' }} />;
}
if (!initialized) {
return null;
}
return children;
}
export default connect(['initialized'], {
initApp,
})(Authenticated); | 5 | 0.135135 | 2 | 3 |
0936f2141402d142519e884a9a7fc902f59298e9 | app/views/votes/_vote.html.erb | app/views/votes/_vote.html.erb | <div class="vote-count row-centered">
<% if post.has_voted?(current_user) %>
<div class="warning">
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% else %>
<%= link_to vote_post_path(post), method: :put do %>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
<% end %>
<% end %>
</div>
| <div class="vote-count row-centered">
<% if current_user %>
<% if post.has_voted?(current_user) %>
<div class="warning">
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% else %>
<%= link_to vote_post_path(post), method: :put do %>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
<% end %>
<% end %>
<% else %>
<div>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% end %>
</div>
| Fix votes when user is not logged in | Fix votes when user is not logged in
| HTML+ERB | mit | PowerCodeGirls/RubyGameDev.com,ruby-rcade/RubyGameDev.com,PowerCodeGirls/RubyGameDev.com,RailsGEnthusiasts/RubyGameDev.com,PowerCodeGirls/RubyGameDev.com,ruby-rcade/RubyGameDev.com,RailsGEnthusiasts/RubyGameDev.com,ruby-rcade/RubyGameDev.com,RailsGEnthusiasts/RubyGameDev.com | html+erb | ## Code Before:
<div class="vote-count row-centered">
<% if post.has_voted?(current_user) %>
<div class="warning">
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% else %>
<%= link_to vote_post_path(post), method: :put do %>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
<% end %>
<% end %>
</div>
## Instruction:
Fix votes when user is not logged in
## Code After:
<div class="vote-count row-centered">
<% if current_user %>
<% if post.has_voted?(current_user) %>
<div class="warning">
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% else %>
<%= link_to vote_post_path(post), method: :put do %>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
<% end %>
<% end %>
<% else %>
<div>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
<% end %>
</div>
| <div class="vote-count row-centered">
+ <% if current_user %>
- <% if post.has_voted?(current_user) %>
+ <% if post.has_voted?(current_user) %>
? ++
- <div class="warning">
+ <div class="warning">
? ++
+ <span class="glyphicon glyphicon-chevron-up"></span><br/>
+ <span><%= post.votes.count %></span><br>
+ <span class="small">votes</span>
+ </div>
+ <% else %>
+ <%= link_to vote_post_path(post), method: :put do %>
+ <span class="glyphicon glyphicon-chevron-up"></span><br/>
+ <span><%= post.votes.count %></span><br>
+ <span class="small">votes</span>
+ <% end %>
+ <% end %>
+ <% else %>
+ <div>
<span class="glyphicon glyphicon-chevron-up"></span><br/>
<span><%= post.votes.count %></span><br>
<span class="small">votes</span>
</div>
- <% else %>
- <%= link_to vote_post_path(post), method: :put do %>
- <span class="glyphicon glyphicon-chevron-up"></span><br/>
- <span><%= post.votes.count %></span><br>
- <span class="small">votes</span>
- <% end %>
<% end %>
</div> | 24 | 1.6 | 16 | 8 |
a719d3f1e2734708f6b57d645d9fdc53187e88d9 | util/oauth/encode.go | util/oauth/encode.go | package oauth
import (
"bytes"
"fmt"
)
var hex = "0123456789ABCDEF"
// encode percent-encodes a string as defined in RFC 3986.
func encode(s string) string {
var buf bytes.Buffer
for _, c := range []byte(s) {
if isEncodable(c) {
buf.WriteByte('%')
buf.WriteByte(hex[c>>4])
buf.WriteByte(hex[c&15])
} else {
buf.WriteByte(c)
}
}
return buf.String()
}
func encodeQuoted(key, value string) string {
return fmt.Sprintf("%s=\"%s\"", encode(key), encode(value))
}
// isEncodable returns true if a given character should be percent-encoded
// according to RFC 3986.
func isEncodable(c byte) bool {
// return false if c is an unreserved character (see RFC 3986 section 2.3)
switch {
case (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'):
return false
case c >= '0' && c <= '9':
return false
case c == '-' || c == '.' || c == '_' || c == '~':
return false
}
return true
}
| package oauth
import (
"bytes"
"fmt"
)
var hex = "0123456789ABCDEF"
// encode percent-encodes a string as defined in RFC 3986.
func encode(s string) string {
var buf bytes.Buffer
for _, c := range []byte(s) {
if isEncodable(c) {
if c == '+' {
// replace plus-encoding with percent-encoding
buf.WriteString("%2520")
} else {
buf.WriteByte('%')
buf.WriteByte(hex[c>>4])
buf.WriteByte(hex[c&15])
}
} else {
buf.WriteByte(c)
}
}
return buf.String()
}
func encodeQuoted(key, value string) string {
return fmt.Sprintf("%s=\"%s\"", encode(key), encode(value))
}
// isEncodable returns true if a given character should be percent-encoded
// according to RFC 3986.
func isEncodable(c byte) bool {
// return false if c is an unreserved character (see RFC 3986 section 2.3)
switch {
case (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'):
return false
case c >= '0' && c <= '9':
return false
case c == '-' || c == '.' || c == '_' || c == '~':
return false
}
return true
}
| Use percent encoding for calculating the signature | Use percent encoding for calculating the signature
| Go | mpl-2.0 | rainycape/gondola,rainycape/gondola,rainycape/gondola,rainycape/gondola | go | ## Code Before:
package oauth
import (
"bytes"
"fmt"
)
var hex = "0123456789ABCDEF"
// encode percent-encodes a string as defined in RFC 3986.
func encode(s string) string {
var buf bytes.Buffer
for _, c := range []byte(s) {
if isEncodable(c) {
buf.WriteByte('%')
buf.WriteByte(hex[c>>4])
buf.WriteByte(hex[c&15])
} else {
buf.WriteByte(c)
}
}
return buf.String()
}
func encodeQuoted(key, value string) string {
return fmt.Sprintf("%s=\"%s\"", encode(key), encode(value))
}
// isEncodable returns true if a given character should be percent-encoded
// according to RFC 3986.
func isEncodable(c byte) bool {
// return false if c is an unreserved character (see RFC 3986 section 2.3)
switch {
case (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'):
return false
case c >= '0' && c <= '9':
return false
case c == '-' || c == '.' || c == '_' || c == '~':
return false
}
return true
}
## Instruction:
Use percent encoding for calculating the signature
## Code After:
package oauth
import (
"bytes"
"fmt"
)
var hex = "0123456789ABCDEF"
// encode percent-encodes a string as defined in RFC 3986.
func encode(s string) string {
var buf bytes.Buffer
for _, c := range []byte(s) {
if isEncodable(c) {
if c == '+' {
// replace plus-encoding with percent-encoding
buf.WriteString("%2520")
} else {
buf.WriteByte('%')
buf.WriteByte(hex[c>>4])
buf.WriteByte(hex[c&15])
}
} else {
buf.WriteByte(c)
}
}
return buf.String()
}
func encodeQuoted(key, value string) string {
return fmt.Sprintf("%s=\"%s\"", encode(key), encode(value))
}
// isEncodable returns true if a given character should be percent-encoded
// according to RFC 3986.
func isEncodable(c byte) bool {
// return false if c is an unreserved character (see RFC 3986 section 2.3)
switch {
case (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'):
return false
case c >= '0' && c <= '9':
return false
case c == '-' || c == '.' || c == '_' || c == '~':
return false
}
return true
}
| package oauth
import (
"bytes"
"fmt"
)
var hex = "0123456789ABCDEF"
// encode percent-encodes a string as defined in RFC 3986.
func encode(s string) string {
var buf bytes.Buffer
for _, c := range []byte(s) {
if isEncodable(c) {
+ if c == '+' {
+ // replace plus-encoding with percent-encoding
+ buf.WriteString("%2520")
+ } else {
- buf.WriteByte('%')
+ buf.WriteByte('%')
? +
- buf.WriteByte(hex[c>>4])
+ buf.WriteByte(hex[c>>4])
? +
- buf.WriteByte(hex[c&15])
+ buf.WriteByte(hex[c&15])
? +
+ }
} else {
buf.WriteByte(c)
}
}
return buf.String()
}
func encodeQuoted(key, value string) string {
return fmt.Sprintf("%s=\"%s\"", encode(key), encode(value))
}
// isEncodable returns true if a given character should be percent-encoded
// according to RFC 3986.
func isEncodable(c byte) bool {
// return false if c is an unreserved character (see RFC 3986 section 2.3)
switch {
case (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'):
return false
case c >= '0' && c <= '9':
return false
case c == '-' || c == '.' || c == '_' || c == '~':
return false
}
return true
} | 11 | 0.261905 | 8 | 3 |
f0151507efa8123906d44c0cbe4aae2cc2ff35b0 | README.md | README.md |
Retrieves realtime value of Indian Rupee - ₹ (INR) for unit US Dollars (USD).
### Installation
```sh
npm install realtime-usd-to-inr
```
or install it globally:
```sh
npm install -g realtime-usd-to-inr
```
### Usage
```sh
usd2inr
# $1 = ₹ 68.655
# and also you can provide the multiplication factor
usd2inr 5
# $5 = ₹ 343.275
```
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr'>
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr.svg' />
</a>
|
Retrieves realtime value of Indian Rupee - ₹ (INR) for unit US Dollars (USD).
### Installation
```sh
npm install realtime-usd-to-inr
```
or install it globally:
```sh
npm install -g realtime-usd-to-inr
```
### Usage
```sh
usd2inr
# $1 = ₹ 68.655
# and also you can provide the multiplication factor
usd2inr 5
# $5 = ₹ 343.275
```
| Revert "Try out Code Sponsor" | Revert "Try out Code Sponsor"
This reverts commit b39ecbfca7fd31f82554ce88f355edcee2b8da71.
| Markdown | mit | vishaltelangre/realtime-usd-to-inr | markdown | ## Code Before:
Retrieves realtime value of Indian Rupee - ₹ (INR) for unit US Dollars (USD).
### Installation
```sh
npm install realtime-usd-to-inr
```
or install it globally:
```sh
npm install -g realtime-usd-to-inr
```
### Usage
```sh
usd2inr
# $1 = ₹ 68.655
# and also you can provide the multiplication factor
usd2inr 5
# $5 = ₹ 343.275
```
<a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr'>
<img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr.svg' />
</a>
## Instruction:
Revert "Try out Code Sponsor"
This reverts commit b39ecbfca7fd31f82554ce88f355edcee2b8da71.
## Code After:
Retrieves realtime value of Indian Rupee - ₹ (INR) for unit US Dollars (USD).
### Installation
```sh
npm install realtime-usd-to-inr
```
or install it globally:
```sh
npm install -g realtime-usd-to-inr
```
### Usage
```sh
usd2inr
# $1 = ₹ 68.655
# and also you can provide the multiplication factor
usd2inr 5
# $5 = ₹ 343.275
```
|
Retrieves realtime value of Indian Rupee - ₹ (INR) for unit US Dollars (USD).
### Installation
```sh
npm install realtime-usd-to-inr
```
or install it globally:
```sh
npm install -g realtime-usd-to-inr
```
### Usage
```sh
usd2inr
# $1 = ₹ 68.655
# and also you can provide the multiplication factor
usd2inr 5
# $5 = ₹ 343.275
```
-
- <a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr'>
- <img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/PfwgcRiC73ERAe1WTDUo4DmM/vishaltelangre/realtime-usd-to-inr.svg' />
- </a> | 4 | 0.137931 | 0 | 4 |
7e5feea91100aa26df67bbdb64003926624bf9c3 | CONTRIBUTORS.md | CONTRIBUTORS.md |
This serves as an official list of all organisations or indiviuals that have helped with the development of HTML Email Boilerplate Redux, whether directly or indirectly.
### Author(s):
* Central College Nottingham
* James White <james.white@centralnottingham.ac.uk>
### Contributors/Pull Requests:
* GC-Max
* cresencio (Gave me the idea for adding gulp processing)
* Josh Buchea - https://github.com/joshbuchea/HEAD
### Credited Organisations:
* Litmus
* Campaign Monitor
* Email on Acid
* MailChimp
* Action Rocket
### Credited Indiviuals:
* Sean Powell - https://github.com/seanpowell/Email-Boilerplate
* Justin Khoo - http://freshinbox.com
* Michael Muscat
* Jack Osbourne
* Eli Dickinson - http://www.industrydive.com
* Mike Ragan
If I have missed you out or believe you should be on this list, please give me a friendly nudge!
|
This serves as an official list of all organisations or indiviuals that have helped with the development of HTML Email Boilerplate Redux, whether directly or indirectly.
### Author(s):
* [Central College Nottingham](https://www.centralnottingham.ac.uk)
* James White (<james.white@centralnottingham.ac.uk>)
### Contributors/Pull Requests:
* [Max King](https://github.com/gc-max)
* [Cresencio Cantu](https://github.com/cresencio)
* [Josh Buchea](https://github.com/joshbuchea/HEAD)
* [Dan Black](https://github.com/dyspop)
### Credited Organisations:
* [Litmus](https://litmus.com)
* [Campaign Monitor](https://www.campaignmonitor.com)
* [Email on Acid](https://www.emailonacid.com)
* [MailChimp](http://mailchimp.com)
* [Action Rocket](http://actionrocket.co)
### Credited Indiviuals:
* [Sean Powell](https://github.com/seanpowell/Email-Boilerplate)
* [Justin Khoo](http://freshinbox.com)
* Michael Muscat
* [Jack Osbourne](http://jackosborne.com)
* [Eli Dickinson](http://www.industrydive.com)
* [Mike Ragan](http://labs.actionrocket.co)
If I have missed you out or believe you should be on this list, please give me a friendly nudge!
| Add dyspop to contributors and update formatting | Add dyspop to contributors and update formatting | Markdown | mit | centralcollegenottingham/HTML-Email-Boilerplate-Redux,centralcollegenottingham/HTML-Email-Boilerplate-Redux | markdown | ## Code Before:
This serves as an official list of all organisations or indiviuals that have helped with the development of HTML Email Boilerplate Redux, whether directly or indirectly.
### Author(s):
* Central College Nottingham
* James White <james.white@centralnottingham.ac.uk>
### Contributors/Pull Requests:
* GC-Max
* cresencio (Gave me the idea for adding gulp processing)
* Josh Buchea - https://github.com/joshbuchea/HEAD
### Credited Organisations:
* Litmus
* Campaign Monitor
* Email on Acid
* MailChimp
* Action Rocket
### Credited Indiviuals:
* Sean Powell - https://github.com/seanpowell/Email-Boilerplate
* Justin Khoo - http://freshinbox.com
* Michael Muscat
* Jack Osbourne
* Eli Dickinson - http://www.industrydive.com
* Mike Ragan
If I have missed you out or believe you should be on this list, please give me a friendly nudge!
## Instruction:
Add dyspop to contributors and update formatting
## Code After:
This serves as an official list of all organisations or indiviuals that have helped with the development of HTML Email Boilerplate Redux, whether directly or indirectly.
### Author(s):
* [Central College Nottingham](https://www.centralnottingham.ac.uk)
* James White (<james.white@centralnottingham.ac.uk>)
### Contributors/Pull Requests:
* [Max King](https://github.com/gc-max)
* [Cresencio Cantu](https://github.com/cresencio)
* [Josh Buchea](https://github.com/joshbuchea/HEAD)
* [Dan Black](https://github.com/dyspop)
### Credited Organisations:
* [Litmus](https://litmus.com)
* [Campaign Monitor](https://www.campaignmonitor.com)
* [Email on Acid](https://www.emailonacid.com)
* [MailChimp](http://mailchimp.com)
* [Action Rocket](http://actionrocket.co)
### Credited Indiviuals:
* [Sean Powell](https://github.com/seanpowell/Email-Boilerplate)
* [Justin Khoo](http://freshinbox.com)
* Michael Muscat
* [Jack Osbourne](http://jackosborne.com)
* [Eli Dickinson](http://www.industrydive.com)
* [Mike Ragan](http://labs.actionrocket.co)
If I have missed you out or believe you should be on this list, please give me a friendly nudge!
|
This serves as an official list of all organisations or indiviuals that have helped with the development of HTML Email Boilerplate Redux, whether directly or indirectly.
### Author(s):
- * Central College Nottingham
+ * [Central College Nottingham](https://www.centralnottingham.ac.uk)
- * James White <james.white@centralnottingham.ac.uk>
+ * James White (<james.white@centralnottingham.ac.uk>)
? + +
### Contributors/Pull Requests:
- * GC-Max
- * cresencio (Gave me the idea for adding gulp processing)
+ * [Max King](https://github.com/gc-max)
+ * [Cresencio Cantu](https://github.com/cresencio)
- * Josh Buchea - https://github.com/joshbuchea/HEAD
? ^^^
+ * [Josh Buchea](https://github.com/joshbuchea/HEAD)
? + ^^ +
+ * [Dan Black](https://github.com/dyspop)
### Credited Organisations:
- * Litmus
- * Campaign Monitor
- * Email on Acid
- * MailChimp
- * Action Rocket
+ * [Litmus](https://litmus.com)
+ * [Campaign Monitor](https://www.campaignmonitor.com)
+ * [Email on Acid](https://www.emailonacid.com)
+ * [MailChimp](http://mailchimp.com)
+ * [Action Rocket](http://actionrocket.co)
### Credited Indiviuals:
- * Sean Powell - https://github.com/seanpowell/Email-Boilerplate
? ^^^
+ * [Sean Powell](https://github.com/seanpowell/Email-Boilerplate)
? + ^^ +
- * Justin Khoo - http://freshinbox.com
? ^^^
+ * [Justin Khoo](http://freshinbox.com)
? + ^^ +
* Michael Muscat
- * Jack Osbourne
+ * [Jack Osbourne](http://jackosborne.com)
- * Eli Dickinson - http://www.industrydive.com
? ^^^
+ * [Eli Dickinson](http://www.industrydive.com)
? + ^^ +
- * Mike Ragan
+ * [Mike Ragan](http://labs.actionrocket.co)
If I have missed you out or believe you should be on this list, please give me a friendly nudge! | 31 | 0.96875 | 16 | 15 |
0e576407f4e54496b1072d45636931ed415c55d7 | application/views/all_facilities.php | application/views/all_facilities.php | <h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="text-center">Name</th>
<th class="text-center">Homepage</th>
<th class="text-center">Email</th>
<th class="text-center">Telefon</th>
<th class="text-center">Adresse</th>
<th class="text-center">Öffnungszeiten</th>
<th class="text-center">Bedarfsliste</th>
</tr>
</thead>
<tbody>
<?php foreach($facilities as $facility): ?>
<tr>
<td><?= $facility->organisation; ?></td>
<td>
<?php if($facility->homepage): ?>
<a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
<?php endif; ?>
</td>
<td>
<?php if($facility->email): ?>
<a href="mailto:<?= $facility->email; ?>">Email</a>
<?php endif; ?>
</td>
<td><?= $facility->phone; ?></td>
<td>
<?= $facility->address; ?><br />
<?= $facility->zip; ?> <?= $facility->city; ?>
</td>
<td><?= opening_hours($facility->opening_hours); ?></td>
<td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
| <div class="container">
<h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="text-center">Name</th>
<th class="text-center">Homepage</th>
<th class="text-center">Adresse</th>
<th class="text-center">Öffnungszeiten</th>
<th class="text-center">Bedarfsliste</th>
</tr>
</thead>
<tbody>
<?php foreach($facilities as $facility): ?>
<tr>
<td><?= $facility->organisation; ?></td>
<td>
<?php if($facility->homepage): ?>
<a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
<?php endif; ?>
</td>
<td>
<?= $facility->address; ?><br />
<?= $facility->zip; ?> <?= $facility->city; ?>
</td>
<td><?= opening_hours($facility->opening_hours); ?></td>
<td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
| Remove phone-number and email from facilities | Remove phone-number and email from facilities
| PHP | mit | DonationmatcherBerlin/donationmatcher,DonationmatcherBerlin/donationmatcher,DonationmatcherBerlin/donationmatcher,DonationmatcherBerlin/donationmatcher | php | ## Code Before:
<h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="text-center">Name</th>
<th class="text-center">Homepage</th>
<th class="text-center">Email</th>
<th class="text-center">Telefon</th>
<th class="text-center">Adresse</th>
<th class="text-center">Öffnungszeiten</th>
<th class="text-center">Bedarfsliste</th>
</tr>
</thead>
<tbody>
<?php foreach($facilities as $facility): ?>
<tr>
<td><?= $facility->organisation; ?></td>
<td>
<?php if($facility->homepage): ?>
<a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
<?php endif; ?>
</td>
<td>
<?php if($facility->email): ?>
<a href="mailto:<?= $facility->email; ?>">Email</a>
<?php endif; ?>
</td>
<td><?= $facility->phone; ?></td>
<td>
<?= $facility->address; ?><br />
<?= $facility->zip; ?> <?= $facility->city; ?>
</td>
<td><?= opening_hours($facility->opening_hours); ?></td>
<td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
## Instruction:
Remove phone-number and email from facilities
## Code After:
<div class="container">
<h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th class="text-center">Name</th>
<th class="text-center">Homepage</th>
<th class="text-center">Adresse</th>
<th class="text-center">Öffnungszeiten</th>
<th class="text-center">Bedarfsliste</th>
</tr>
</thead>
<tbody>
<?php foreach($facilities as $facility): ?>
<tr>
<td><?= $facility->organisation; ?></td>
<td>
<?php if($facility->homepage): ?>
<a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
<?php endif; ?>
</td>
<td>
<?= $facility->address; ?><br />
<?= $facility->zip; ?> <?= $facility->city; ?>
</td>
<td><?= opening_hours($facility->opening_hours); ?></td>
<td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
| + <div class="container">
- <h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
+ <h2 class="headline">Liste der Hilfsgruppen in Berlin</h2>
? ++++
- <div class="table-responsive">
+ <div class="table-responsive">
? ++++
- <table class="table table-striped table-condensed">
+ <table class="table table-striped table-condensed">
? ++++
- <thead>
+ <thead>
? ++++
- <tr>
- <th class="text-center">Name</th>
- <th class="text-center">Homepage</th>
- <th class="text-center">Email</th>
- <th class="text-center">Telefon</th>
- <th class="text-center">Adresse</th>
- <th class="text-center">Öffnungszeiten</th>
- <th class="text-center">Bedarfsliste</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($facilities as $facility): ?>
<tr>
+ <th class="text-center">Name</th>
+ <th class="text-center">Homepage</th>
+ <th class="text-center">Adresse</th>
+ <th class="text-center">Öffnungszeiten</th>
+ <th class="text-center">Bedarfsliste</th>
- <td><?= $facility->organisation; ?></td>
- <td>
- <?php if($facility->homepage): ?>
- <a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
- <?php endif; ?>
- </td>
- <td>
- <?php if($facility->email): ?>
- <a href="mailto:<?= $facility->email; ?>">Email</a>
- <?php endif; ?>
- </td>
- <td><?= $facility->phone; ?></td>
- <td>
- <?= $facility->address; ?><br />
- <?= $facility->zip; ?> <?= $facility->city; ?>
- </td>
- <td><?= opening_hours($facility->opening_hours); ?></td>
- <td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
</tr>
+ </thead>
+ <tbody>
+ <?php foreach($facilities as $facility): ?>
+ <tr>
+ <td><?= $facility->organisation; ?></td>
+ <td>
+ <?php if($facility->homepage): ?>
+ <a target="_blank" href="<?= $facility->homepage; ?>">Link</a>
+ <?php endif; ?>
+ </td>
+ <td>
+ <?= $facility->address; ?><br />
+ <?= $facility->zip; ?> <?= $facility->city; ?>
+ </td>
+ <td><?= opening_hours($facility->opening_hours); ?></td>
+ <td><a href="<?= base_url('/stocklist/public_pdf/' . $facility->facility_id) ?>">Download</a></td>
+ </tr>
- <?php endforeach; ?>
+ <?php endforeach; ?>
? ++++
- </tbody>
+ </tbody>
? ++++
- </table>
+ </table>
? ++++
+ </div>
</div>
- | 69 | 1.682927 | 31 | 38 |
f90c591a9b1f8ec0becd0e9d0c53fe4202eb7e6d | install.sh | install.sh |
set -u
set -o errexit
working_dir=`dirname $0`
cd $working_dir
if [ `uname -m` != 'x86_64' ]; then
echo "Install failed, you must have a 64 bit OS"
fi
sudo ./install_scripts/install_mediacloud_package_dependencies.sh
sudo ./install_scripts/create_default_db_user_and_databases.sh
cp mediawords.yml.dist mediawords.yml
sudo ./install_scripts/install_system_wide_modules_for_plpg_perl.sh
./install_mc_perlbrew_and_modules.sh
echo "install complete"
echo "running compile test"
./script/run_carton.sh exec -Ilib/ -- prove -r t/compile.t
echo "compile test succeeded"
echo "creating new database"
./script/run_with_carton.sh ./script/mediawords_create_db.pl
echo "Media Cloud install succeeded!!!!"
echo "See doc/ for more information on using Media Cloud"
echo "Run ./script/run_plackup_with_carton.sh to start the Media Cloud server"
|
set -u
set -o errexit
working_dir=`dirname $0`
cd $working_dir
if [ `uname -m` != 'x86_64' ]; then
echo "Install failed, you must have a 64 bit OS";
exit 1;
fi
sudo ./install_scripts/install_mediacloud_package_dependencies.sh
sudo ./install_scripts/create_default_db_user_and_databases.sh
cp mediawords.yml.dist mediawords.yml
sudo ./install_scripts/install_system_wide_modules_for_plpg_perl.sh
./install_mc_perlbrew_and_modules.sh
echo "install complete"
echo "running compile test"
./script/run_carton.sh exec -Ilib/ -- prove -r t/compile.t
echo "compile test succeeded"
echo "creating new database"
./script/run_with_carton.sh ./script/mediawords_create_db.pl
echo "Media Cloud install succeeded!!!!"
echo "See doc/ for more information on using Media Cloud"
echo "Run ./script/run_plackup_with_carton.sh to start the Media Cloud server"
| EXit with an error when 64 bit os not detected. | EXit with an error when 64 bit os not detected.
| Shell | agpl-3.0 | berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,AchyuthIIIT/mediacloud,AchyuthIIIT/mediacloud,berkmancenter/mediacloud | shell | ## Code Before:
set -u
set -o errexit
working_dir=`dirname $0`
cd $working_dir
if [ `uname -m` != 'x86_64' ]; then
echo "Install failed, you must have a 64 bit OS"
fi
sudo ./install_scripts/install_mediacloud_package_dependencies.sh
sudo ./install_scripts/create_default_db_user_and_databases.sh
cp mediawords.yml.dist mediawords.yml
sudo ./install_scripts/install_system_wide_modules_for_plpg_perl.sh
./install_mc_perlbrew_and_modules.sh
echo "install complete"
echo "running compile test"
./script/run_carton.sh exec -Ilib/ -- prove -r t/compile.t
echo "compile test succeeded"
echo "creating new database"
./script/run_with_carton.sh ./script/mediawords_create_db.pl
echo "Media Cloud install succeeded!!!!"
echo "See doc/ for more information on using Media Cloud"
echo "Run ./script/run_plackup_with_carton.sh to start the Media Cloud server"
## Instruction:
EXit with an error when 64 bit os not detected.
## Code After:
set -u
set -o errexit
working_dir=`dirname $0`
cd $working_dir
if [ `uname -m` != 'x86_64' ]; then
echo "Install failed, you must have a 64 bit OS";
exit 1;
fi
sudo ./install_scripts/install_mediacloud_package_dependencies.sh
sudo ./install_scripts/create_default_db_user_and_databases.sh
cp mediawords.yml.dist mediawords.yml
sudo ./install_scripts/install_system_wide_modules_for_plpg_perl.sh
./install_mc_perlbrew_and_modules.sh
echo "install complete"
echo "running compile test"
./script/run_carton.sh exec -Ilib/ -- prove -r t/compile.t
echo "compile test succeeded"
echo "creating new database"
./script/run_with_carton.sh ./script/mediawords_create_db.pl
echo "Media Cloud install succeeded!!!!"
echo "See doc/ for more information on using Media Cloud"
echo "Run ./script/run_plackup_with_carton.sh to start the Media Cloud server"
|
set -u
set -o errexit
working_dir=`dirname $0`
cd $working_dir
if [ `uname -m` != 'x86_64' ]; then
- echo "Install failed, you must have a 64 bit OS"
+ echo "Install failed, you must have a 64 bit OS";
? +
+ exit 1;
fi
sudo ./install_scripts/install_mediacloud_package_dependencies.sh
sudo ./install_scripts/create_default_db_user_and_databases.sh
cp mediawords.yml.dist mediawords.yml
sudo ./install_scripts/install_system_wide_modules_for_plpg_perl.sh
./install_mc_perlbrew_and_modules.sh
echo "install complete"
echo "running compile test"
./script/run_carton.sh exec -Ilib/ -- prove -r t/compile.t
echo "compile test succeeded"
echo "creating new database"
./script/run_with_carton.sh ./script/mediawords_create_db.pl
echo "Media Cloud install succeeded!!!!"
echo "See doc/ for more information on using Media Cloud"
echo "Run ./script/run_plackup_with_carton.sh to start the Media Cloud server" | 3 | 0.1 | 2 | 1 |
9c07a0944716ba918cc6115830b0559e41bdc466 | commands/Disintegrate.hs | commands/Disintegrate.hs | {-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Types.Sing
import Language.Hakaru.Disintegrate
import Language.Hakaru.Evaluation.ConstantPropagation
import Language.Hakaru.Command
import Data.Text
import qualified Data.Text.IO as IO
import System.Environment
main :: IO ()
main = do
args <- getArgs
case args of
[prog] -> IO.readFile prog >>= runDisintegrate
[] -> IO.getContents >>= runDisintegrate
_ -> IO.putStrLn "Usage: disintegrate <file>"
runDisintegrate :: Text -> IO ()
runDisintegrate prog =
case parseAndInfer prog of
Left err -> IO.putStrLn err
Right (TypedAST typ ast) ->
case typ of
SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _) ->
case jmEq1 sym sSymbol_Pair of
Just Refl ->
case determine (disintegrate ast) of
Just ast' -> print . pretty $ constantPropagation ast'
Nothing -> error "No disintegration found"
Nothing -> error "Can only disintegrate a measure over pairs"
_ -> error "Can only disintegrate a measure over pairs"
| {-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Types.Sing
import Language.Hakaru.Disintegrate
import Language.Hakaru.Evaluation.ConstantPropagation
import Language.Hakaru.Command
import Data.Text
import qualified Data.Text.IO as IO
import System.Environment
main :: IO ()
main = do
args <- getArgs
progs <- mapM readFromFile args
case progs of
[prog] -> runDisintegrate prog
_ -> IO.putStrLn "Usage: disintegrate <file>"
runDisintegrate :: Text -> IO ()
runDisintegrate prog =
case parseAndInfer prog of
Left err -> IO.putStrLn err
Right (TypedAST typ ast) ->
case typ of
SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _) ->
case jmEq1 sym sSymbol_Pair of
Just Refl ->
case determine (disintegrate ast) of
Just ast' -> print . pretty $ constantPropagation ast'
Nothing -> error "No disintegration found"
Nothing -> error "Can only disintegrate a measure over pairs"
_ -> error "Can only disintegrate a measure over pairs"
| Make disintegrate more like other commands | Make disintegrate more like other commands
| Haskell | bsd-3-clause | zachsully/hakaru,zaxtax/hakaru,zaxtax/hakaru,zachsully/hakaru | haskell | ## Code Before:
{-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Types.Sing
import Language.Hakaru.Disintegrate
import Language.Hakaru.Evaluation.ConstantPropagation
import Language.Hakaru.Command
import Data.Text
import qualified Data.Text.IO as IO
import System.Environment
main :: IO ()
main = do
args <- getArgs
case args of
[prog] -> IO.readFile prog >>= runDisintegrate
[] -> IO.getContents >>= runDisintegrate
_ -> IO.putStrLn "Usage: disintegrate <file>"
runDisintegrate :: Text -> IO ()
runDisintegrate prog =
case parseAndInfer prog of
Left err -> IO.putStrLn err
Right (TypedAST typ ast) ->
case typ of
SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _) ->
case jmEq1 sym sSymbol_Pair of
Just Refl ->
case determine (disintegrate ast) of
Just ast' -> print . pretty $ constantPropagation ast'
Nothing -> error "No disintegration found"
Nothing -> error "Can only disintegrate a measure over pairs"
_ -> error "Can only disintegrate a measure over pairs"
## Instruction:
Make disintegrate more like other commands
## Code After:
{-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Types.Sing
import Language.Hakaru.Disintegrate
import Language.Hakaru.Evaluation.ConstantPropagation
import Language.Hakaru.Command
import Data.Text
import qualified Data.Text.IO as IO
import System.Environment
main :: IO ()
main = do
args <- getArgs
progs <- mapM readFromFile args
case progs of
[prog] -> runDisintegrate prog
_ -> IO.putStrLn "Usage: disintegrate <file>"
runDisintegrate :: Text -> IO ()
runDisintegrate prog =
case parseAndInfer prog of
Left err -> IO.putStrLn err
Right (TypedAST typ ast) ->
case typ of
SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _) ->
case jmEq1 sym sSymbol_Pair of
Just Refl ->
case determine (disintegrate ast) of
Just ast' -> print . pretty $ constantPropagation ast'
Nothing -> error "No disintegration found"
Nothing -> error "Can only disintegrate a measure over pairs"
_ -> error "Can only disintegrate a measure over pairs"
| {-# LANGUAGE OverloadedStrings, DataKinds, GADTs #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Types.Sing
import Language.Hakaru.Disintegrate
import Language.Hakaru.Evaluation.ConstantPropagation
import Language.Hakaru.Command
import Data.Text
import qualified Data.Text.IO as IO
import System.Environment
main :: IO ()
main = do
- args <- getArgs
+ args <- getArgs
? +
+ progs <- mapM readFromFile args
- case args of
? ^
+ case progs of
? ^ +
+ [prog] -> runDisintegrate prog
- [prog] -> IO.readFile prog >>= runDisintegrate
- [] -> IO.getContents >>= runDisintegrate
_ -> IO.putStrLn "Usage: disintegrate <file>"
runDisintegrate :: Text -> IO ()
runDisintegrate prog =
case parseAndInfer prog of
Left err -> IO.putStrLn err
Right (TypedAST typ ast) ->
case typ of
SMeasure (SData (STyCon sym `STyApp` _ `STyApp` _) _) ->
case jmEq1 sym sSymbol_Pair of
Just Refl ->
case determine (disintegrate ast) of
Just ast' -> print . pretty $ constantPropagation ast'
Nothing -> error "No disintegration found"
Nothing -> error "Can only disintegrate a measure over pairs"
_ -> error "Can only disintegrate a measure over pairs"
| 8 | 0.195122 | 4 | 4 |
efaabb16dfe1219f2e51727b5bfac5bba17af78c | lib/tolua++/CMakeLists.txt | lib/tolua++/CMakeLists.txt |
cmake_minimum_required (VERSION 2.6)
project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB LIB_SOURCE
"src/lib/*.c"
)
file(GLOB BIN_SOURCE
"src/bin/*.c"
)
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
if(UNIX)
add_library(math STATIC IMPORTED)
target_link_libraries(tolua math)
endif()
target_link_libraries(tolua lua tolualib)
|
cmake_minimum_required (VERSION 2.6)
project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB LIB_SOURCE
"src/lib/*.c"
)
file(GLOB BIN_SOURCE
"src/bin/*.c"
)
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
if(UNIX)
find_library(M_LIB m)
target_link_libraries(${M_LIB})
endif()
target_link_libraries(tolua lua tolualib)
| Revert "fixed bad reference to math library" | Revert "fixed bad reference to math library"
This reverts commit c2167d7ed73c96c7e8cb935074ba860e11c821f9.
| Text | apache-2.0 | birkett/cuberite,birkett/MCServer,birkett/cuberite,johnsoch/cuberite,Altenius/cuberite,QUSpilPrgm/cuberite,Fighter19/cuberite,jammet/MCServer,nichwall/cuberite,Tri125/MCServer,nounoursheureux/MCServer,nichwall/cuberite,HelenaKitty/EbooMC,Tri125/MCServer,Fighter19/cuberite,nicodinh/cuberite,Schwertspize/cuberite,QUSpilPrgm/cuberite,Haxi52/cuberite,Fighter19/cuberite,birkett/MCServer,Howaner/MCServer,marvinkopf/cuberite,QUSpilPrgm/cuberite,guijun/MCServer,tonibm19/cuberite,ionux/MCServer,QUSpilPrgm/cuberite,bendl/cuberite,nevercast/cuberite,Altenius/cuberite,linnemannr/MCServer,mjssw/cuberite,nevercast/cuberite,marvinkopf/cuberite,nevercast/cuberite,mc-server/MCServer,ionux/MCServer,Howaner/MCServer,birkett/MCServer,tonibm19/cuberite,jammet/MCServer,linnemannr/MCServer,mjssw/cuberite,Frownigami1/cuberite,Tri125/MCServer,nevercast/cuberite,johnsoch/cuberite,electromatter/cuberite,electromatter/cuberite,Schwertspize/cuberite,kevinr/cuberite,jammet/MCServer,MuhammadWang/MCServer,HelenaKitty/EbooMC,Altenius/cuberite,mmdk95/cuberite,Schwertspize/cuberite,mjssw/cuberite,tonibm19/cuberite,Schwertspize/cuberite,Haxi52/cuberite,Frownigami1/cuberite,HelenaKitty/EbooMC,QUSpilPrgm/cuberite,Fighter19/cuberite,mmdk95/cuberite,mc-server/MCServer,mjssw/cuberite,thetaeo/cuberite,MuhammadWang/MCServer,SamOatesPlugins/cuberite,ionux/MCServer,nichwall/cuberite,mmdk95/cuberite,johnsoch/cuberite,nicodinh/cuberite,guijun/MCServer,guijun/MCServer,linnemannr/MCServer,Fighter19/cuberite,zackp30/cuberite,zackp30/cuberite,tonibm19/cuberite,kevinr/cuberite,nicodinh/cuberite,electromatter/cuberite,mmdk95/cuberite,bendl/cuberite,mmdk95/cuberite,Frownigami1/cuberite,birkett/MCServer,Howaner/MCServer,johnsoch/cuberite,kevinr/cuberite,ionux/MCServer,nounoursheureux/MCServer,SamOatesPlugins/cuberite,linnemannr/MCServer,kevinr/cuberite,jammet/MCServer,Haxi52/cuberite,jammet/MCServer,nicodinh/cuberite,linnemannr/MCServer,Haxi52/cuberite,Haxi52/cuberite,zackp30/cuberite,nevercast/cuberite,tonibm19/cuberite,zackp30/cuberite,birkett/cuberite,guijun/MCServer,nicodinh/cuberite,nounoursheureux/MCServer,SamOatesPlugins/cuberite,Tri125/MCServer,QUSpilPrgm/cuberite,MuhammadWang/MCServer,electromatter/cuberite,mc-server/MCServer,SamOatesPlugins/cuberite,nounoursheureux/MCServer,marvinkopf/cuberite,guijun/MCServer,SamOatesPlugins/cuberite,Howaner/MCServer,marvinkopf/cuberite,nichwall/cuberite,HelenaKitty/EbooMC,thetaeo/cuberite,Fighter19/cuberite,bendl/cuberite,bendl/cuberite,ionux/MCServer,zackp30/cuberite,zackp30/cuberite,marvinkopf/cuberite,bendl/cuberite,mc-server/MCServer,marvinkopf/cuberite,mc-server/MCServer,nounoursheureux/MCServer,MuhammadWang/MCServer,MuhammadWang/MCServer,mc-server/MCServer,Haxi52/cuberite,thetaeo/cuberite,ionux/MCServer,nicodinh/cuberite,Frownigami1/cuberite,tonibm19/cuberite,electromatter/cuberite,thetaeo/cuberite,mjssw/cuberite,Schwertspize/cuberite,nichwall/cuberite,kevinr/cuberite,birkett/cuberite,Altenius/cuberite,birkett/MCServer,birkett/MCServer,Tri125/MCServer,johnsoch/cuberite,mjssw/cuberite,birkett/cuberite,nounoursheureux/MCServer,thetaeo/cuberite,Frownigami1/cuberite,nichwall/cuberite,electromatter/cuberite,kevinr/cuberite,Howaner/MCServer,birkett/cuberite,HelenaKitty/EbooMC,Altenius/cuberite,mmdk95/cuberite,jammet/MCServer,Howaner/MCServer,linnemannr/MCServer,nevercast/cuberite,thetaeo/cuberite,Tri125/MCServer,guijun/MCServer | text | ## Code Before:
cmake_minimum_required (VERSION 2.6)
project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB LIB_SOURCE
"src/lib/*.c"
)
file(GLOB BIN_SOURCE
"src/bin/*.c"
)
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
if(UNIX)
add_library(math STATIC IMPORTED)
target_link_libraries(tolua math)
endif()
target_link_libraries(tolua lua tolualib)
## Instruction:
Revert "fixed bad reference to math library"
This reverts commit c2167d7ed73c96c7e8cb935074ba860e11c821f9.
## Code After:
cmake_minimum_required (VERSION 2.6)
project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB LIB_SOURCE
"src/lib/*.c"
)
file(GLOB BIN_SOURCE
"src/bin/*.c"
)
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
if(UNIX)
find_library(M_LIB m)
target_link_libraries(${M_LIB})
endif()
target_link_libraries(tolua lua tolualib)
|
cmake_minimum_required (VERSION 2.6)
project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB LIB_SOURCE
"src/lib/*.c"
)
file(GLOB BIN_SOURCE
"src/bin/*.c"
)
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
if(UNIX)
- add_library(math STATIC IMPORTED)
- target_link_libraries(tolua math)
+ find_library(M_LIB m)
+ target_link_libraries(${M_LIB})
endif()
target_link_libraries(tolua lua tolualib) | 4 | 0.153846 | 2 | 2 |
56bfaeda70752ff87e8fac957b4c4bad59c4ef17 | timing_test.go | timing_test.go | package gomol
import (
"time"
. "gopkg.in/check.v1"
)
type testClock struct {
curTime time.Time
}
func newTestClock(curTime time.Time) *testClock {
return &testClock{curTime: curTime}
}
func (c *testClock) Now() time.Time {
return c.curTime
}
func (s *GomolSuite) TestTestClockNow(c *C) {
realNow := time.Now().AddDate(0, 0, 1)
setClock(newTestClock(realNow))
c.Check(clock().Now(), Equals, realNow)
}
| package gomol
import (
"time"
. "gopkg.in/check.v1"
)
type testClock struct {
curTime time.Time
}
func newTestClock(curTime time.Time) *testClock {
return &testClock{curTime: curTime}
}
func (c *testClock) Now() time.Time {
return c.curTime
}
func (s *GomolSuite) TestTestClockNow(c *C) {
realNow := time.Now().AddDate(0, 0, 1)
setClock(newTestClock(realNow))
c.Check(clock().Now(), Equals, realNow)
}
func (s *GomolSuite) TestRealClockNow(c *C) {
// This test is completely pointless because it's not something that can really
// be tested but I was sick of seeing the red for a lack of a unit test. So I created
// this one and figure even on slow systems the two lines should be executed within
// one second of each other. :P
setClock(&realClock{})
timeNow := time.Now()
clockNow := clock().Now()
diff := clockNow.Sub(timeNow)
c.Check(diff < time.Second, Equals, true)
}
| Make more red go away | Make more red go away
| Go | mit | aphistic/gomol | go | ## Code Before:
package gomol
import (
"time"
. "gopkg.in/check.v1"
)
type testClock struct {
curTime time.Time
}
func newTestClock(curTime time.Time) *testClock {
return &testClock{curTime: curTime}
}
func (c *testClock) Now() time.Time {
return c.curTime
}
func (s *GomolSuite) TestTestClockNow(c *C) {
realNow := time.Now().AddDate(0, 0, 1)
setClock(newTestClock(realNow))
c.Check(clock().Now(), Equals, realNow)
}
## Instruction:
Make more red go away
## Code After:
package gomol
import (
"time"
. "gopkg.in/check.v1"
)
type testClock struct {
curTime time.Time
}
func newTestClock(curTime time.Time) *testClock {
return &testClock{curTime: curTime}
}
func (c *testClock) Now() time.Time {
return c.curTime
}
func (s *GomolSuite) TestTestClockNow(c *C) {
realNow := time.Now().AddDate(0, 0, 1)
setClock(newTestClock(realNow))
c.Check(clock().Now(), Equals, realNow)
}
func (s *GomolSuite) TestRealClockNow(c *C) {
// This test is completely pointless because it's not something that can really
// be tested but I was sick of seeing the red for a lack of a unit test. So I created
// this one and figure even on slow systems the two lines should be executed within
// one second of each other. :P
setClock(&realClock{})
timeNow := time.Now()
clockNow := clock().Now()
diff := clockNow.Sub(timeNow)
c.Check(diff < time.Second, Equals, true)
}
| package gomol
import (
"time"
. "gopkg.in/check.v1"
)
type testClock struct {
curTime time.Time
}
func newTestClock(curTime time.Time) *testClock {
return &testClock{curTime: curTime}
}
func (c *testClock) Now() time.Time {
return c.curTime
}
func (s *GomolSuite) TestTestClockNow(c *C) {
realNow := time.Now().AddDate(0, 0, 1)
setClock(newTestClock(realNow))
c.Check(clock().Now(), Equals, realNow)
}
+
+ func (s *GomolSuite) TestRealClockNow(c *C) {
+ // This test is completely pointless because it's not something that can really
+ // be tested but I was sick of seeing the red for a lack of a unit test. So I created
+ // this one and figure even on slow systems the two lines should be executed within
+ // one second of each other. :P
+ setClock(&realClock{})
+
+ timeNow := time.Now()
+ clockNow := clock().Now()
+
+ diff := clockNow.Sub(timeNow)
+ c.Check(diff < time.Second, Equals, true)
+ } | 14 | 0.518519 | 14 | 0 |
d283210af8c1111a48ff9a7f2864bfe0e6ef25f7 | docs/use_with/vue.md | docs/use_with/vue.md |
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example
|
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
},
unbind: function (el) {
el.iFrameResizer.removeListeners();
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example
| Remove listeners when unbinding in Vue | Remove listeners when unbinding in Vue
Add unbind method to the Vue's directive example, to remove the iFrameResizer's listeners when the directive is unbound from the element. | Markdown | mit | davidjbradshaw/iframe-resizer,davidjbradshaw/iframe-resizer | markdown | ## Code Before:
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example
## Instruction:
Remove listeners when unbinding in Vue
Add unbind method to the Vue's directive example, to remove the iFrameResizer's listeners when the directive is unbound from the element.
## Code After:
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
},
unbind: function (el) {
el.iFrameResizer.removeListeners();
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example
|
Create the following Vue directive
```js
import Vue from 'vue'
import iframeResize from 'iframe-resizer/js/iframeResizer';
Vue.directive('resize', {
bind: function(el, { value = {} }) {
el.addEventListener('load', () => iframeResize(value, el))
+ },
+ unbind: function (el) {
+ el.iFrameResizer.removeListeners();
}
})
```
and then include it on your page as follows.
```html
<iframe
v-resize="{ log: true }"
width="100%"
src="myiframe.html"
frameborder="0"
></iframe>
```
- Thanks to [Aldebaran Desombergh](https://github.com/davidjbradshaw/iframe-resizer/issues/513#issuecomment-538333854) for this example | 3 | 0.115385 | 3 | 0 |
0eaa7c9c5d8fc2087c4ecde68c8f79104120a462 | src/Checkers/FilesystemChecker.php | src/Checkers/FilesystemChecker.php | <?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
unlink($file);
});
return $file;
}
}
| <?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
if (! file_exists($file)) {
return $this->makeResult(false, sprintf(config('health.error-messages.tempfile'), $file));
}
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
if (file_exists($file)) {
unlink($file);
}
});
return $file;
}
}
| Fix checker for console calls | Fix checker for console calls
| PHP | bsd-3-clause | antonioribeiro/health,antonioribeiro/health | php | ## Code Before:
<?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
unlink($file);
});
return $file;
}
}
## Instruction:
Fix checker for console calls
## Code After:
<?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
if (! file_exists($file)) {
return $this->makeResult(false, sprintf(config('health.error-messages.tempfile'), $file));
}
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
if (file_exists($file)) {
unlink($file);
}
});
return $file;
}
}
| <?php
namespace PragmaRX\Health\Checkers;
class FilesystemChecker extends BaseChecker
{
/**
* @param $resources
* @return bool
*/
public function check($resources)
{
try {
$file = $this->temporaryFile('health-check-', 'just testing', storage_path());
+
+ if (! file_exists($file)) {
+ return $this->makeResult(false, sprintf(config('health.error-messages.tempfile'), $file));
+ }
unlink($file);
return $this->makeHealthyResult();
} catch (\Exception $exception) {
return $this->makeResultFromException($exception);
}
}
/**
* @param $name
* @param $content
* @param null $folder
* @return string
*/
private function temporaryFile($name, $content, $folder = null)
{
$folder = $folder ?: sys_get_temp_dir();
$file = tempnam($folder, $name);
file_put_contents($file, $content);
register_shutdown_function(function() use($file) {
+ if (file_exists($file)) {
- unlink($file);
+ unlink($file);
? ++++
+ }
});
return $file;
}
} | 8 | 0.181818 | 7 | 1 |
3ada5d25aba67d54a22568fc6e74d5248dd671cd | package.json | package.json | {
"name": "timestamp",
"version": "1.0.0",
"description": "timestamp api",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "stylus source/stylesheets/main.styl -o static/css",
"watch-css": "stylus source/stylesheets/main.styl -o static/css -w",
"clean": "rm -rf static/css && mkdir -p static/css",
"build": "npm run clean && npm run build-css",
"watch": "npm run clean && npm run watch-css & nodemon server -e js,pug",
"start": "node server",
"heroku-postbuild": "stylus source/stylesheets/main.styl -o static/css"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.14.1",
"moment": "^2.17.1",
"node": "4.7.3",
"nodemon": "^1.11.0",
"npm": "2.5.11",
"pug": "^2.0.0-beta11",
"stylus": "^0.54.5"
}
}
| {
"name": "timestamp",
"version": "1.0.0",
"description": "timestamp api",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "stylus source/stylesheets/main.styl -o static/css",
"watch-css": "stylus source/stylesheets/main.styl -o static/css -w",
"clean": "rm -rf static/css && mkdir -p static/css",
"build": "npm run clean && npm run build-css",
"watch": "npm run clean && npm run watch-css & nodemon server -e js,pug",
"start": "node server"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.14.1",
"moment": "^2.17.1",
"node": "4.7.3",
"nodemon": "^1.11.0",
"npm": "2.5.11",
"pug": "^2.0.0-beta11",
"stylus": "^0.54.5"
}
}
| Fix build-css step in procfile | Fix build-css step in procfile
| JSON | mit | vivshaw/timestamp-api,vivshaw/timestamp-api | json | ## Code Before:
{
"name": "timestamp",
"version": "1.0.0",
"description": "timestamp api",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "stylus source/stylesheets/main.styl -o static/css",
"watch-css": "stylus source/stylesheets/main.styl -o static/css -w",
"clean": "rm -rf static/css && mkdir -p static/css",
"build": "npm run clean && npm run build-css",
"watch": "npm run clean && npm run watch-css & nodemon server -e js,pug",
"start": "node server",
"heroku-postbuild": "stylus source/stylesheets/main.styl -o static/css"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.14.1",
"moment": "^2.17.1",
"node": "4.7.3",
"nodemon": "^1.11.0",
"npm": "2.5.11",
"pug": "^2.0.0-beta11",
"stylus": "^0.54.5"
}
}
## Instruction:
Fix build-css step in procfile
## Code After:
{
"name": "timestamp",
"version": "1.0.0",
"description": "timestamp api",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "stylus source/stylesheets/main.styl -o static/css",
"watch-css": "stylus source/stylesheets/main.styl -o static/css -w",
"clean": "rm -rf static/css && mkdir -p static/css",
"build": "npm run clean && npm run build-css",
"watch": "npm run clean && npm run watch-css & nodemon server -e js,pug",
"start": "node server"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.14.1",
"moment": "^2.17.1",
"node": "4.7.3",
"nodemon": "^1.11.0",
"npm": "2.5.11",
"pug": "^2.0.0-beta11",
"stylus": "^0.54.5"
}
}
| {
"name": "timestamp",
"version": "1.0.0",
"description": "timestamp api",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-css": "stylus source/stylesheets/main.styl -o static/css",
"watch-css": "stylus source/stylesheets/main.styl -o static/css -w",
"clean": "rm -rf static/css && mkdir -p static/css",
"build": "npm run clean && npm run build-css",
"watch": "npm run clean && npm run watch-css & nodemon server -e js,pug",
- "start": "node server",
? -
+ "start": "node server"
- "heroku-postbuild": "stylus source/stylesheets/main.styl -o static/css"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.14.1",
"moment": "^2.17.1",
"node": "4.7.3",
"nodemon": "^1.11.0",
"npm": "2.5.11",
"pug": "^2.0.0-beta11",
"stylus": "^0.54.5"
}
} | 3 | 0.111111 | 1 | 2 |
3844c3b8eebb224270a5a108c72a4214c766d00f | src/chrome/content_core.js | src/chrome/content_core.js | /*global chrome*/
export function init() {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'load'
});
window.addEventListener('unload', () => {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'unload'
});
});
}
function dispatchMouseEvent(target, ..args) {
let e = document.createEvent('MouseEvents');
e.initEvent.apply(e, args);
target.dispatchEvent(e);
}
export function simulateClick(el) {
let events = ['mouseover', 'mousedown', 'click', 'mouseup'];
for (let event of events) {
dispatchMouseEvent(el[0], event, true, true);
}
}
| /*global chrome*/
export function init() {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'load'
});
window.addEventListener('unload', () => {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'unload'
});
});
}
function dispatchMouseEvent(target) {
let e = document.createEvent('MouseEvents');
e.initEvent.apply(e, Array.prototype.slice.call(arguments, this.length));
target.dispatchEvent(e);
}
export function simulateClick(el) {
let events = ['mouseover', 'mousedown', 'click', 'mouseup'];
for (let event of events) {
dispatchMouseEvent(el[0], event, true, true);
}
}
| Use older variable arguments syntax | Use older variable arguments syntax
| JavaScript | mit | nextgensparx/quantum-router,nextgensparx/quantum-router | javascript | ## Code Before:
/*global chrome*/
export function init() {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'load'
});
window.addEventListener('unload', () => {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'unload'
});
});
}
function dispatchMouseEvent(target, ..args) {
let e = document.createEvent('MouseEvents');
e.initEvent.apply(e, args);
target.dispatchEvent(e);
}
export function simulateClick(el) {
let events = ['mouseover', 'mousedown', 'click', 'mouseup'];
for (let event of events) {
dispatchMouseEvent(el[0], event, true, true);
}
}
## Instruction:
Use older variable arguments syntax
## Code After:
/*global chrome*/
export function init() {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'load'
});
window.addEventListener('unload', () => {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'unload'
});
});
}
function dispatchMouseEvent(target) {
let e = document.createEvent('MouseEvents');
e.initEvent.apply(e, Array.prototype.slice.call(arguments, this.length));
target.dispatchEvent(e);
}
export function simulateClick(el) {
let events = ['mouseover', 'mousedown', 'click', 'mouseup'];
for (let event of events) {
dispatchMouseEvent(el[0], event, true, true);
}
}
| /*global chrome*/
export function init() {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'load'
});
window.addEventListener('unload', () => {
chrome.runtime.sendMessage({
from: 'contentScript',
type: 'loadEvent',
loadState: 'unload'
});
});
}
- function dispatchMouseEvent(target, ..args) {
? --------
+ function dispatchMouseEvent(target) {
let e = document.createEvent('MouseEvents');
- e.initEvent.apply(e, args);
+ e.initEvent.apply(e, Array.prototype.slice.call(arguments, this.length));
target.dispatchEvent(e);
}
export function simulateClick(el) {
let events = ['mouseover', 'mousedown', 'click', 'mouseup'];
for (let event of events) {
dispatchMouseEvent(el[0], event, true, true);
}
} | 4 | 0.137931 | 2 | 2 |
28a7f606a575fa14b87bdf90372b5832c6675b2d | cmake/FindMySQL.cmake | cmake/FindMySQL.cmake | find_path(MYSQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
NAMES mysqlclient_r
)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_FOUND)
if (NOT MYSQL_FIND_QUIETLY)
message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
endif (NOT MYSQL_FIND_QUIETLY)
set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
if (MYSQL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find mysql development files")
endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND)
| find_path(MYSQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
NAMES mysqlclient_r
PATH_SUFFIXES mysql
)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_FOUND)
if (NOT MYSQL_FIND_QUIETLY)
message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
endif (NOT MYSQL_FIND_QUIETLY)
set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
if (MYSQL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find mysql development files")
endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND)
| Fix find path mysql libs | Fix find path mysql libs
| CMake | bsd-2-clause | guard163/tarantool,dkorolev/tarantool,Sannis/tarantool,rtsisyk/tarantool,condor-the-bird/tarantool,KlonD90/tarantool,condor-the-bird/tarantool,ocelot-inc/tarantool,guard163/tarantool,KlonD90/tarantool,mejedi/tarantool,Sannis/tarantool,nvoron23/tarantool,nvoron23/tarantool,dkorolev/tarantool,mejedi/tarantool,condor-the-bird/tarantool,dkorolev/tarantool,nvoron23/tarantool,vasilenkomike/tarantool,dkorolev/tarantool,vasilenkomike/tarantool,dkorolev/tarantool,guard163/tarantool,nvoron23/tarantool,ocelot-inc/tarantool,KlonD90/tarantool,condor-the-bird/tarantool,KlonD90/tarantool,ocelot-inc/tarantool,vasilenkomike/tarantool,mejedi/tarantool,rtsisyk/tarantool,vasilenkomike/tarantool,nvoron23/tarantool,guard163/tarantool,mejedi/tarantool,rtsisyk/tarantool,KlonD90/tarantool,rtsisyk/tarantool,nvoron23/tarantool,condor-the-bird/tarantool,Sannis/tarantool,guard163/tarantool,Sannis/tarantool,Sannis/tarantool,vasilenkomike/tarantool,ocelot-inc/tarantool | cmake | ## Code Before:
find_path(MYSQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
NAMES mysqlclient_r
)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_FOUND)
if (NOT MYSQL_FIND_QUIETLY)
message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
endif (NOT MYSQL_FIND_QUIETLY)
set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
if (MYSQL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find mysql development files")
endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND)
## Instruction:
Fix find path mysql libs
## Code After:
find_path(MYSQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
NAMES mysqlclient_r
PATH_SUFFIXES mysql
)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_FOUND)
if (NOT MYSQL_FIND_QUIETLY)
message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
endif (NOT MYSQL_FIND_QUIETLY)
set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
if (MYSQL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find mysql development files")
endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND)
| find_path(MYSQL_INCLUDE_DIR
NAMES mysql.h
PATH_SUFFIXES mysql
)
find_library(MYSQL_LIBRARIES
NAMES mysqlclient_r
+ PATH_SUFFIXES mysql
)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
set(MYSQL_FOUND ON)
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_FOUND)
if (NOT MYSQL_FIND_QUIETLY)
message(STATUS "Found MySQL includes: ${MYSQL_INCLUDE_DIR}/mysql.h")
message(STATUS "Found MySQL library: ${MYSQL_LIBRARIES}")
endif (NOT MYSQL_FIND_QUIETLY)
set(MYSQL_INCLUDE_DIRS ${MYSQL_INCLUDE_DIR})
else(MYSQL_FOUND)
if (MYSQL_FIND_REQUIRED)
message(FATAL_ERROR "Could not find mysql development files")
endif (MYSQL_FIND_REQUIRED)
endif (MYSQL_FOUND) | 1 | 0.043478 | 1 | 0 |
2a242bb6984fae5e32f117fa5ae68118621f3c95 | pycroft/model/alembic/versions/fb8d553a7268_add_account_pattern.py | pycroft/model/alembic/versions/fb8d553a7268_add_account_pattern.py | from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('account_pattern',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pattern', sa.String(), nullable=False),
sa.Column('account_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['account_id'], ['account.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_pattern')
# ### end Alembic commands ###
| from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('account_pattern',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pattern', sa.String(), nullable=False),
sa.Column('account_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['account_id'], ['account.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_pattern')
# ### end Alembic commands ###
| Remove unnecessary pycroft import in migration | Remove unnecessary pycroft import in migration
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | python | ## Code Before:
from alembic import op
import sqlalchemy as sa
import pycroft
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('account_pattern',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pattern', sa.String(), nullable=False),
sa.Column('account_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['account_id'], ['account.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_pattern')
# ### end Alembic commands ###
## Instruction:
Remove unnecessary pycroft import in migration
## Code After:
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('account_pattern',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pattern', sa.String(), nullable=False),
sa.Column('account_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['account_id'], ['account.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_pattern')
# ### end Alembic commands ###
| from alembic import op
import sqlalchemy as sa
- import pycroft
-
# revision identifiers, used by Alembic.
revision = 'fb8d553a7268'
down_revision = '0b69e80a9388'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('account_pattern',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('pattern', sa.String(), nullable=False),
sa.Column('account_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['account_id'], ['account.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('account_pattern')
# ### end Alembic commands ### | 2 | 0.071429 | 0 | 2 |
babbe814cac8f97dd3ddb3677969b13c1dee09ce | wger/core/templates/user/login.html | wger/core/templates/user/login.html | {% extends "base.html" %}
{% load i18n static wger_extras crispy_forms_tags %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
{% endblock %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block sidebar %}
<h4>{% trans "No account?" %}</h4>
<p>
<a href="{% url 'core:user:registration' %}" class="btn btn-block btn-default">
<span class="{% fa_class 'sign-in-alt' %}"></span>
{% trans "Register" %}
</a>
</p>
<h4>{% trans "Forgot password?" %}</h4>
<p>
<a href="{% url 'core:user:password_reset' %}" class="btn btn-block btn-default">
<span class="{% fa_class 'key' %}"></span>
{% trans "Reset password" %}
</a>
</p>
{% endblock %}
| {% extends "base.html" %}
{% load i18n static wger_extras crispy_forms_tags %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
{% endblock %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block sidebar %}
<h4>{% trans "No account?" %}</h4>
<p>
<a href="{% url 'core:user:registration' %}">
<span class="{% fa_class 'sign-in-alt' %}"></span>
{% trans "Register" %}
</a>
</p>
<h4>{% trans "Forgot password?" %}</h4>
<p>
<a href="{% url 'core:user:password_reset' %}" >
<span class="{% fa_class 'key' %}"></span>
{% trans "Reset password" %}
</a>
</p>
{% endblock %}
| Use regular links for registration and password reset | Use regular links for registration and password reset
| HTML | agpl-3.0 | rolandgeider/wger,rolandgeider/wger,wger-project/wger,petervanderdoes/wger,rolandgeider/wger,petervanderdoes/wger,petervanderdoes/wger,petervanderdoes/wger,wger-project/wger,wger-project/wger,rolandgeider/wger,wger-project/wger | html | ## Code Before:
{% extends "base.html" %}
{% load i18n static wger_extras crispy_forms_tags %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
{% endblock %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block sidebar %}
<h4>{% trans "No account?" %}</h4>
<p>
<a href="{% url 'core:user:registration' %}" class="btn btn-block btn-default">
<span class="{% fa_class 'sign-in-alt' %}"></span>
{% trans "Register" %}
</a>
</p>
<h4>{% trans "Forgot password?" %}</h4>
<p>
<a href="{% url 'core:user:password_reset' %}" class="btn btn-block btn-default">
<span class="{% fa_class 'key' %}"></span>
{% trans "Reset password" %}
</a>
</p>
{% endblock %}
## Instruction:
Use regular links for registration and password reset
## Code After:
{% extends "base.html" %}
{% load i18n static wger_extras crispy_forms_tags %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
{% endblock %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block sidebar %}
<h4>{% trans "No account?" %}</h4>
<p>
<a href="{% url 'core:user:registration' %}">
<span class="{% fa_class 'sign-in-alt' %}"></span>
{% trans "Register" %}
</a>
</p>
<h4>{% trans "Forgot password?" %}</h4>
<p>
<a href="{% url 'core:user:password_reset' %}" >
<span class="{% fa_class 'key' %}"></span>
{% trans "Reset password" %}
</a>
</p>
{% endblock %}
| {% extends "base.html" %}
{% load i18n static wger_extras crispy_forms_tags %}
{% block title %}{% trans "Login" %}{% endblock %}
{% block header %}
{% endblock %}
{% block content %}
{% crispy form %}
{% endblock %}
{% block sidebar %}
<h4>{% trans "No account?" %}</h4>
<p>
- <a href="{% url 'core:user:registration' %}" class="btn btn-block btn-default">
+ <a href="{% url 'core:user:registration' %}">
<span class="{% fa_class 'sign-in-alt' %}"></span>
{% trans "Register" %}
</a>
</p>
<h4>{% trans "Forgot password?" %}</h4>
<p>
- <a href="{% url 'core:user:password_reset' %}" class="btn btn-block btn-default">
? ---------------------------------
+ <a href="{% url 'core:user:password_reset' %}" >
<span class="{% fa_class 'key' %}"></span>
{% trans "Reset password" %}
</a>
</p>
{% endblock %} | 4 | 0.129032 | 2 | 2 |
2107453ef7f588584b2ea51256ea9adce8969a80 | circle.yml | circle.yml | machine:
node:
version: v5.7.0
test:
pre:
- npm run lint:failfast
| machine:
node:
version: v5.7.0
test:
pre:
- npm run lint:failfast
post:
- '[ -z "${CIRCLE_PR_USERNAME}" ] && npm run coveralls || false'
| Add Coveralls Code Coverage CircleCI | Add Coveralls Code Coverage CircleCI
| YAML | mit | frig-js/frigging-bootstrap,frig-js/frigging-bootstrap | yaml | ## Code Before:
machine:
node:
version: v5.7.0
test:
pre:
- npm run lint:failfast
## Instruction:
Add Coveralls Code Coverage CircleCI
## Code After:
machine:
node:
version: v5.7.0
test:
pre:
- npm run lint:failfast
post:
- '[ -z "${CIRCLE_PR_USERNAME}" ] && npm run coveralls || false'
| machine:
node:
version: v5.7.0
test:
pre:
- npm run lint:failfast
+ post:
+ - '[ -z "${CIRCLE_PR_USERNAME}" ] && npm run coveralls || false' | 2 | 0.285714 | 2 | 0 |
a3acd3a0bab4b9d9d358bb714e22c7a71191a304 | cmd/registry/config-example.yml | cmd/registry/config-example.yml | version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
maintenance:
uploadpurging:
enabled: true
http:
addr: :5000
| version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
| Fix earlier commit to enable upload purging in example config file | Fix earlier commit to enable upload purging in example config file
Rather than setting this to "true", the whole section should be removed.
Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>
| YAML | apache-2.0 | cezarsa/distribution,genedock/distribution,thaJeztah/docker.github.io,rillig/docker.github.io,jzwlqx/distribution,amitshukla/distribution,johnstep/docker.github.io,menglingwei/denverdino.github.io,zhaytee/distribution,noxiouz/distribution,RichardScothern/distribution,johnstep/docker.github.io,menglingwei/denverdino.github.io,schu/distribution,xiekeyang/distribution,rbarlow/distribution,sallyom/distribution,BrickXu/distribution,aduermael/docker.github.io,deis/distribution,mattmoor/distribution,zerosign/distribution,avinson/distribution,ChenLingPeng/distribution,jzwlqx/denverdino.github.io,13W/distribution,Tiesheng/distribution,nevermosby/distribution,lindenlab/distribution,jzwlqx/denverdino.github.io,rodacom/docker-hub,atyenoria/distribution,miminar/distribution,rbarlow/distribution,miminar/distribution,bxy09/distribution,runcom/distribution,mattmoor/distribution,denverdino/denverdino.github.io,johnstep/docker.github.io,sthapaun/distribution,mbentley/distribution,alexisbellido/docker.github.io,docker/docker.github.io,nwt/distribution,arneluehrs/distribution,Tiesheng/distribution,thaJeztah/distribution,jzwlqx/denverdino.github.io,armbuilds/distribution,atyenoria/distribution,harrisonfeng/distribution,kmala/distribution,lorieri/distribution,LuisBosquez/docker.github.io,bigsurge/distribution,denverdino/distribution-stevvooe,shubheksha/docker.github.io,londoncalling/docker.github.io,menglingwei/denverdino.github.io,deis/distribution,JimGalasyn/docker.github.io,codefresh-io/cf-distribution,shubheksha/docker.github.io,rochacon/distribution,anweiss/docker.github.io,sadlil/distribution,moxiegirl/distribution,bpradipt/distribution,iskradelta/distribution,jackpgriffin/distribution,gdevillele/docker.github.io,shin-/docker.github.io,docker/docker.github.io,denverdino/distribution-stevvooe,yeghishe/distribution,denverdino/docker.github.io,manoj535/distribution,troy0820/docker.github.io,jackpgriffin/distribution,joaofnfernandes/docker.github.io,lcarstensen/distribution,aduermael/docker.github.io,humble00/distribution,rochacon/distribution,jzwlqx/denverdino.github.io,spacexnice/distribution,londoncalling/docker.github.io,mikebrow/distribution,BradleyA/distribution,joeuo/docker.github.io,championv/distribution,calavera/distribution,mbentley/distribution,imranraja85/distribution,aaronlehmann/distribution,BrickXu/distribution,estesp/distribution,gdevillele/docker.github.io,aybabtme/distribution,BSWANG/denverdino.github.io,docker-zh/docker.github.io,docker-zh/docker.github.io,denverdino/denverdino.github.io,bdwill/docker.github.io,iskradelta/distribution,docker/docker.github.io,zerosign/distribution,konnase/distribution,mikebrow/distribution,troy0820/docker.github.io,tian-xiaobo/distribution,sanscontext/docker.github.io,liubin/distribution,shin-/docker.github.io,docker-zh/docker.github.io,jwhonce/distribution,BradleyA/distribution,nateww/distribution,tdooner/distribution,duglin/distribution,BSWANG/denverdino.github.io,tdooner/distribution,sadlil/distribution,joeuo/docker.github.io,alexisbellido/docker.github.io,konstruktoid/distribution,CodeJuan/distribution,aduermael/docker.github.io,sebrandon1/distribution,dmcgowan/distribution,troy0820/docker.github.io,sthapaun/distribution,konnase/distribution,tschoots/distribution,anweiss/docker.github.io,wangmingshuai/distribution,bdwill/docker.github.io,LouisKottmann/distribution,bsmr-docker/distribution,kmala/distribution,phiroict/docker,tt/distribution,ChenLingPeng/distribution,bxy09/distribution,RyanDeng/distribution,jramseye/distribution,jordimassaguerpla/distribution,bdwill/docker.github.io,BSWANG/denverdino.github.io,13W/distribution,aaronlehmann/distribution,docker-zh/docker.github.io,denverdino/docker.github.io,shin-/docker.github.io,denverdino/denverdino.github.io,bsmr-docker/distribution,adambrett-forks/distribution,LuisBosquez/docker.github.io,mattrgreen/distribution,dobril-stanga/distribution,moxiegirl/distribution,bdwill/docker.github.io,humble00/distribution,thaJeztah/docker.github.io,LuisBosquez/docker.github.io,beni55/distribution,wangmingshuai/distribution,anweiss/docker.github.io,joeuo/docker.github.io,BrianBland/distribution,danix800/docker.github.io,codefresh-io/cf-distribution,sergeyfd/distribution,stevvooe/distribution,denverdino/docker.github.io,higebu/distribution,joaofnfernandes/docker.github.io,pdevine/distribution,lorieri/distribution,Seb-Solon/distribution,docker/distribution,danix800/docker.github.io,arneluehrs/distribution,konstruktoid/distribution,rhoml/distribution,londoncalling/docker.github.io,CodeJuan/distribution,tian-xiaobo/distribution,JimGalasyn/docker.github.io,JimGalasyn/docker.github.io,LouisKottmann/distribution,schu/distribution,aprajshekhar/distribution,lcarstensen/distribution,aduermael/docker.github.io,johnstep/docker.github.io,adambrett-forks/distribution,RichardScothern/distribution,jordimassaguerpla/distribution,gavioto/distribution,harrisonfeng/distribution,huamai-io/distribution,shyr/distribution,cezarsa/distribution,vdemeester/distribution,thaJeztah/docker.github.io,shubheksha/docker.github.io,jlhawn/distribution,phiroict/docker,yeghishe/distribution,RaviTezu/distribution,linearregression/distribution,jrjang/distribution,docker/docker.github.io,baloo/distribution,nevermosby/distribution,alexisbellido/docker.github.io,higebu/distribution,joeuo/docker.github.io,thelinuxkid/distribution,menglingwei/denverdino.github.io,gdevillele/docker.github.io,jzwlqx/denverdino.github.io,nwt/distribution,jwhonce/distribution,arvindkandhare/distribution,jhicks-camgian/distribution,joeuo/docker.github.io,sanscontext/docker.github.io,shyr/distribution,jhicks-camgian/distribution,phiroict/docker,yuwaMSFT2/distribution,danix800/docker.github.io,noxiouz/distribution,LuisBosquez/docker.github.io,sanscontext/docker.github.io,manoj535/distribution,AoJ/distribution,rillig/docker.github.io,BSWANG/denverdino.github.io,avinson/distribution,harche/distribution,joaofnfernandes/docker.github.io,xiekeyang/distribution,sanscontext/docker.github.io,denverdino/docker.github.io,tt/distribution,denverdino/distribution,genedock/distribution,BSWANG/denverdino.github.io,zhaytee/distribution,vdemeester/distribution,beni55/distribution,jonboulle/distribution,calavera/distribution,anweiss/docker.github.io,shubheksha/docker.github.io,djenriquez/distribution,sallyom/distribution,n1tr0g/distribution,djenriquez/distribution,dobril-stanga/distribution,arvindkandhare/distribution,BrianBland/distribution,n1tr0g/distribution,londoncalling/docker.github.io,paulczar/distribution,paulczar/distribution,alexisbellido/docker.github.io,alexisbellido/docker.github.io,bdwill/docker.github.io,tschoots/distribution,yuwaMSFT2/distribution,denverdino/denverdino.github.io,AoJ/distribution,joaofnfernandes/docker.github.io,endophage/distribution,londoncalling/docker.github.io,jrjang/distribution,duglin/distribution,spacexnice/distribution,phiroict/docker,shin-/docker.github.io,rillig/docker.github.io,rhoml/distribution,armbuilds/distribution,gavioto/distribution,rillig/docker.github.io,Seb-Solon/distribution,andrewnguyen/distribution,sanscontext/docker.github.io,RyanDeng/distribution,thaJeztah/docker.github.io,gdevillele/docker.github.io,dmcgowan/distribution,shin-/docker.github.io,jramseye/distribution,baloo/distribution,shubheksha/docker.github.io,johnstep/docker.github.io,lindenlab/distribution,endophage/distribution,jzwlqx/distribution,sergeyfd/distribution,JimGalasyn/docker.github.io,hopkings2008/distribution,liubin/distribution,phiroict/docker,nateww/distribution,dave-tucker/distribution,thelinuxkid/distribution,rodacom/docker-hub,jlhawn/distribution,docker/docker.github.io,jonboulle/distribution,aprajshekhar/distribution,jmitchell/distribution,amitshukla/distribution,imranraja85/distribution,harche/distribution,docker/distribution,huamai-io/distribution,jmitchell/distribution,RaviTezu/distribution,mattrgreen/distribution,cyli/distribution,denverdino/distribution,anweiss/docker.github.io,aybabtme/distribution,menglingwei/denverdino.github.io,linearregression/distribution,estesp/distribution,denverdino/docker.github.io,runcom/distribution,troy0820/docker.github.io,LuisBosquez/docker.github.io,danix800/docker.github.io,denverdino/denverdino.github.io,JimGalasyn/docker.github.io,thaJeztah/distribution,joaofnfernandes/docker.github.io,docker-zh/docker.github.io,andrewnguyen/distribution,pdevine/distribution,stevvooe/distribution,gdevillele/docker.github.io,hopkings2008/distribution,bpradipt/distribution,dave-tucker/distribution,bigsurge/distribution,sebrandon1/distribution,thaJeztah/docker.github.io,cyli/distribution,championv/distribution | yaml | ## Code Before:
version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
maintenance:
uploadpurging:
enabled: true
http:
addr: :5000
## Instruction:
Fix earlier commit to enable upload purging in example config file
Rather than setting this to "true", the whole section should be removed.
Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>
## Code After:
version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
| version: 0.1
log:
fields:
service: registry
storage:
cache:
layerinfo: inmemory
filesystem:
rootdirectory: /var/lib/registry
- maintenance:
- uploadpurging:
- enabled: true
http:
addr: :5000 | 3 | 0.214286 | 0 | 3 |
dcfd12d784147f9f56d1c60d20b5d637e33ac97d | src/indexPage/index.js | src/indexPage/index.js | import 'babel-polyfill'
import $ from 'jquery'
import { getTokenList } from 'binary-common-utils/lib/storageManager'
import { setAppId, oauthLogin } from '../common/appId'
import { load as loadLang } from '../common/lang'
if (getTokenList().length) {
location.pathname = '/bot.html'
} else {
window.$ = $ // eslint-disable-line no-undef
loadLang()
setAppId()
oauthLogin(() => {
$('.show-on-load').show()
$('.barspinner').hide()
})
}
| import 'babel-polyfill'
import $ from 'jquery'
import { getTokenList } from 'binary-common-utils/lib/storageManager'
import { setAppId, oauthLogin } from '../common/appId'
import { load as loadLang } from '../common/lang'
if (getTokenList().length) {
location.pathname = `${location.pathname.replace(/\/+$/, '')}/bot.html`
} else {
window.$ = $ // eslint-disable-line no-undef
loadLang()
setAppId()
oauthLogin(() => {
$('.show-on-load').show()
$('.barspinner').hide()
})
}
| Handle multiple slashes when redirecting to bot.html | Handle multiple slashes when redirecting to bot.html
| JavaScript | mit | binary-com/binary-bot,aminmarashi/binary-bot,aminmarashi/binary-bot,binary-com/binary-bot | javascript | ## Code Before:
import 'babel-polyfill'
import $ from 'jquery'
import { getTokenList } from 'binary-common-utils/lib/storageManager'
import { setAppId, oauthLogin } from '../common/appId'
import { load as loadLang } from '../common/lang'
if (getTokenList().length) {
location.pathname = '/bot.html'
} else {
window.$ = $ // eslint-disable-line no-undef
loadLang()
setAppId()
oauthLogin(() => {
$('.show-on-load').show()
$('.barspinner').hide()
})
}
## Instruction:
Handle multiple slashes when redirecting to bot.html
## Code After:
import 'babel-polyfill'
import $ from 'jquery'
import { getTokenList } from 'binary-common-utils/lib/storageManager'
import { setAppId, oauthLogin } from '../common/appId'
import { load as loadLang } from '../common/lang'
if (getTokenList().length) {
location.pathname = `${location.pathname.replace(/\/+$/, '')}/bot.html`
} else {
window.$ = $ // eslint-disable-line no-undef
loadLang()
setAppId()
oauthLogin(() => {
$('.show-on-load').show()
$('.barspinner').hide()
})
}
| import 'babel-polyfill'
import $ from 'jquery'
import { getTokenList } from 'binary-common-utils/lib/storageManager'
import { setAppId, oauthLogin } from '../common/appId'
import { load as loadLang } from '../common/lang'
if (getTokenList().length) {
- location.pathname = '/bot.html'
+ location.pathname = `${location.pathname.replace(/\/+$/, '')}/bot.html`
} else {
window.$ = $ // eslint-disable-line no-undef
loadLang()
setAppId()
oauthLogin(() => {
$('.show-on-load').show()
$('.barspinner').hide()
})
}
| 2 | 0.111111 | 1 | 1 |
a567ff2501e7c1e5422c69107fac5ce9eac95e9b | app/views/games/waiting.html.erb | app/views/games/waiting.html.erb | <div>
Waiting for game #<%= @game.id %> to begin.
</div>
<div>
Players:<br>
<ul>
<% @game.players.each do |player| %>
<li><%= player.handle %></li>
<% end %>
</ul>
</div>
<div>
Open Invites:<br>
<ul>
<% @game.invites.open.each do |invite| %>
<li><%= invite.email %> <% if @can_revoke %>(<%= link_to "Revoke", revoke_invite_path(invite), method: :post %>)<% end %></li>
<% end %>
</ul>
<% if @can_invite %>
<%= form_for :invite, url: invite_game_path(@game) do |f| %>
Email: <%= f.text_field :email %>
<%= f.submit "Invite" %>
<% end %>
<% end %>
</div>
| <div>
Waiting for game #<%= @game.id %> to begin.
</div>
<div>
Players:<br>
<ul>
<% @game.players.each do |player| %>
<li><%= player.handle %></li>
<% end %>
</ul>
</div>
<div>
Open Invites:<br>
<ul>
<% @game.invites.open.each do |invite| %>
<li><%= invite.email %> <% if @can_revoke %>(<%= link_to "Revoke", revoke_invite_path(invite), method: :post %>)<% end %></li>
<% end %>
</ul>
<% if @can_invite %>
<%= form_for :invite, url: invite_game_path(@game) do |f| %>
Email: <%= f.text_field :email %>
<%= f.submit "Invite" %>
<% end %>
<% end %>
</div>
<% if @is_owner %>
<div>
<%= link_to "Start", start_game_path(@game), method: :post %>
</div>
<% end %>
| Add a link for the game owner to start a game | Add a link for the game owner to start a game
| HTML+ERB | agpl-3.0 | bschmeck/two_sixes,bschmeck/two_sixes | html+erb | ## Code Before:
<div>
Waiting for game #<%= @game.id %> to begin.
</div>
<div>
Players:<br>
<ul>
<% @game.players.each do |player| %>
<li><%= player.handle %></li>
<% end %>
</ul>
</div>
<div>
Open Invites:<br>
<ul>
<% @game.invites.open.each do |invite| %>
<li><%= invite.email %> <% if @can_revoke %>(<%= link_to "Revoke", revoke_invite_path(invite), method: :post %>)<% end %></li>
<% end %>
</ul>
<% if @can_invite %>
<%= form_for :invite, url: invite_game_path(@game) do |f| %>
Email: <%= f.text_field :email %>
<%= f.submit "Invite" %>
<% end %>
<% end %>
</div>
## Instruction:
Add a link for the game owner to start a game
## Code After:
<div>
Waiting for game #<%= @game.id %> to begin.
</div>
<div>
Players:<br>
<ul>
<% @game.players.each do |player| %>
<li><%= player.handle %></li>
<% end %>
</ul>
</div>
<div>
Open Invites:<br>
<ul>
<% @game.invites.open.each do |invite| %>
<li><%= invite.email %> <% if @can_revoke %>(<%= link_to "Revoke", revoke_invite_path(invite), method: :post %>)<% end %></li>
<% end %>
</ul>
<% if @can_invite %>
<%= form_for :invite, url: invite_game_path(@game) do |f| %>
Email: <%= f.text_field :email %>
<%= f.submit "Invite" %>
<% end %>
<% end %>
</div>
<% if @is_owner %>
<div>
<%= link_to "Start", start_game_path(@game), method: :post %>
</div>
<% end %>
| <div>
Waiting for game #<%= @game.id %> to begin.
</div>
<div>
Players:<br>
<ul>
<% @game.players.each do |player| %>
<li><%= player.handle %></li>
<% end %>
</ul>
</div>
<div>
Open Invites:<br>
<ul>
<% @game.invites.open.each do |invite| %>
<li><%= invite.email %> <% if @can_revoke %>(<%= link_to "Revoke", revoke_invite_path(invite), method: :post %>)<% end %></li>
<% end %>
</ul>
<% if @can_invite %>
<%= form_for :invite, url: invite_game_path(@game) do |f| %>
Email: <%= f.text_field :email %>
<%= f.submit "Invite" %>
<% end %>
<% end %>
</div>
+
+ <% if @is_owner %>
+ <div>
+ <%= link_to "Start", start_game_path(@game), method: :post %>
+ </div>
+ <% end %> | 6 | 0.214286 | 6 | 0 |
e82e7fd3b6b755cb4ee0240c74ccde7846664326 | README.rst | README.rst | Pyramid Social Network Authentication
=====================================
.. image:: https://secure.travis-ci.org/lorenzogil/pyramid_sna.png
pyramid_sna is a Pyramid library for authenticating users using OAuth2
providers.
It is released under the terms of a 3 clause BSD license and it is
based on code originally from the
`Yith Library Server <https://github.com/Yaco-Sistemas/yith-library-server>`_
project.
| Pyramid Social Network Authentication
=====================================
.. image:: https://secure.travis-ci.org/lorenzogil/pyramid_sna.png
pyramid_sna is a Pyramid library for authenticating users using OAuth2
providers.
It is released under the terms of a 3 clause BSD license and it is
based on code originally from the
`Yith Library Server <https://github.com/Yaco-Sistemas/yith-library-server>`_
project.
You can learn how to use it reading the documentation in the *docs* directory.
| Add a line telling where to find the documentation | Add a line telling where to find the documentation
| reStructuredText | bsd-3-clause | lorenzogil/pyramid_sna | restructuredtext | ## Code Before:
Pyramid Social Network Authentication
=====================================
.. image:: https://secure.travis-ci.org/lorenzogil/pyramid_sna.png
pyramid_sna is a Pyramid library for authenticating users using OAuth2
providers.
It is released under the terms of a 3 clause BSD license and it is
based on code originally from the
`Yith Library Server <https://github.com/Yaco-Sistemas/yith-library-server>`_
project.
## Instruction:
Add a line telling where to find the documentation
## Code After:
Pyramid Social Network Authentication
=====================================
.. image:: https://secure.travis-ci.org/lorenzogil/pyramid_sna.png
pyramid_sna is a Pyramid library for authenticating users using OAuth2
providers.
It is released under the terms of a 3 clause BSD license and it is
based on code originally from the
`Yith Library Server <https://github.com/Yaco-Sistemas/yith-library-server>`_
project.
You can learn how to use it reading the documentation in the *docs* directory.
| Pyramid Social Network Authentication
=====================================
.. image:: https://secure.travis-ci.org/lorenzogil/pyramid_sna.png
pyramid_sna is a Pyramid library for authenticating users using OAuth2
providers.
It is released under the terms of a 3 clause BSD license and it is
based on code originally from the
`Yith Library Server <https://github.com/Yaco-Sistemas/yith-library-server>`_
project.
+
+ You can learn how to use it reading the documentation in the *docs* directory. | 2 | 0.166667 | 2 | 0 |
f7ef5afffd3fba36eaa3310325125222d56ce315 | README.md | README.md | SoleBTC
| [](https://travis-ci.org/freeusd/solebtc)
[](http://goreportcard.com/report/freeusd/solebtc)
SoleBTC
| Add travis, goreportcard badge to readme | Add travis, goreportcard badge to readme
| Markdown | mit | freeusd/solebtc,freeusd/solebtc,solefaucet/sole-server,solefaucet/sole-server,solefaucet/sole-server,freeusd/solebtc | markdown | ## Code Before:
SoleBTC
## Instruction:
Add travis, goreportcard badge to readme
## Code After:
[](https://travis-ci.org/freeusd/solebtc)
[](http://goreportcard.com/report/freeusd/solebtc)
SoleBTC
| + [](https://travis-ci.org/freeusd/solebtc)
+ [](http://goreportcard.com/report/freeusd/solebtc)
+
SoleBTC | 3 | 3 | 3 | 0 |
88f86838b7f7f926e5df349edcd6461284fde181 | jest.config.js | jest.config.js | module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb'
}
| module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb',
roots: ['src']
}
| Add root to prevent infinite loop in watch | Add root to prevent infinite loop in watch
| JavaScript | mit | synzen/Discord.RSS,synzen/Discord.RSS | javascript | ## Code Before:
module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb'
}
## Instruction:
Add root to prevent infinite loop in watch
## Code After:
module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb',
roots: ['src']
}
| module.exports = {
testEnvironment: 'node',
- preset: '@shelf/jest-mongodb'
+ preset: '@shelf/jest-mongodb',
? +
+ roots: ['src']
} | 3 | 0.75 | 2 | 1 |
0436a2292808e81c7fc7cb7dbbd19732cea21d70 | server/main.js | server/main.js | import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
});
| import { Meteor } from 'meteor/meteor';
import '/imports/server/ntlm-auth/proxy';
Meteor.startup(() => {
// code to run on server at startup
});
| Load NTLM Authentication Proxy on startup | Load NTLM Authentication Proxy on startup
| JavaScript | mit | staskorz/meteor-ntlm-example,staskorz/meteor-ntlm-example | javascript | ## Code Before:
import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
});
## Instruction:
Load NTLM Authentication Proxy on startup
## Code After:
import { Meteor } from 'meteor/meteor';
import '/imports/server/ntlm-auth/proxy';
Meteor.startup(() => {
// code to run on server at startup
});
| import { Meteor } from 'meteor/meteor';
+
+ import '/imports/server/ntlm-auth/proxy';
+
Meteor.startup(() => {
// code to run on server at startup
}); | 3 | 0.6 | 3 | 0 |
1b3a2185ebfa2a9304c773af09b2e737f62176af | app/views/people/_sub_header.html.haml | app/views/people/_sub_header.html.haml | .right
- if user_signed_in? && current_user.person != person
- if @block.present?
= link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
:method => :delete,
:class => "button"
- else
= aspect_membership_dropdown(contact, person, 'right')
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.tag_string.blank? && user_signed_in?
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
- if user_signed_in? && person == current_user.person && current_page?(controller: :people, action: :show)
%hr
= render 'aspects/aspect_stream', :stream => @stream
%hr
| .right
- if user_signed_in? && current_user.person != person
- if @block.present?
= link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
:method => :delete,
:class => "button"
- else
= aspect_membership_dropdown(contact, person, 'right')
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.tag_string.blank? && user_signed_in?
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
- if user_signed_in? && current_page?(person_path current_user.person)
%hr
= render 'aspects/aspect_stream', :stream => @stream
%hr
| Fix and simplify current_page? check on profile page | Fix and simplify current_page? check on profile page
| Haml | agpl-3.0 | Muhannes/diaspora,spixi/diaspora,Muhannes/diaspora,geraspora/diaspora,geraspora/diaspora,Amadren/diaspora,Flaburgan/diaspora,KentShikama/diaspora,spixi/diaspora,jhass/diaspora,Muhannes/diaspora,despora/diaspora,Amadren/diaspora,jhass/diaspora,KentShikama/diaspora,spixi/diaspora,geraspora/diaspora,Flaburgan/diaspora,Amadren/diaspora,SuperTux88/diaspora,Flaburgan/diaspora,KentShikama/diaspora,Muhannes/diaspora,despora/diaspora,Flaburgan/diaspora,diaspora/diaspora,SuperTux88/diaspora,diaspora/diaspora,Amadren/diaspora,SuperTux88/diaspora,jhass/diaspora,despora/diaspora,despora/diaspora,diaspora/diaspora,diaspora/diaspora,geraspora/diaspora,KentShikama/diaspora,spixi/diaspora,jhass/diaspora,SuperTux88/diaspora | haml | ## Code Before:
.right
- if user_signed_in? && current_user.person != person
- if @block.present?
= link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
:method => :delete,
:class => "button"
- else
= aspect_membership_dropdown(contact, person, 'right')
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.tag_string.blank? && user_signed_in?
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
- if user_signed_in? && person == current_user.person && current_page?(controller: :people, action: :show)
%hr
= render 'aspects/aspect_stream', :stream => @stream
%hr
## Instruction:
Fix and simplify current_page? check on profile page
## Code After:
.right
- if user_signed_in? && current_user.person != person
- if @block.present?
= link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
:method => :delete,
:class => "button"
- else
= aspect_membership_dropdown(contact, person, 'right')
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.tag_string.blank? && user_signed_in?
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
- if user_signed_in? && current_page?(person_path current_user.person)
%hr
= render 'aspects/aspect_stream', :stream => @stream
%hr
| .right
- if user_signed_in? && current_user.person != person
- if @block.present?
= link_to t('users.privacy_settings.stop_ignoring'), block_path(@block),
:method => :delete,
:class => "button"
- else
= aspect_membership_dropdown(contact, person, 'right')
- elsif user_signed_in? && current_user.person == person
= link_to t('people.profile_sidebar.edit_my_profile'), edit_profile_path, :class => 'button creation'
%h2
= person.name
%span.diaspora_handle
= person.diaspora_handle
.description
- if !person.tag_string.blank? && user_signed_in?
= Diaspora::Taggable.format_tags(person.profile.tag_string)
- if user_signed_in? && person == current_user.person
%span.hover_edit
= link_to t('.edit'), edit_profile_path
- else
- if user_signed_in? && person == current_user.person
%i
= t('.you_have_no_tags')
%span.add_tags
= link_to t('.add_some'), edit_profile_path
- - if user_signed_in? && person == current_user.person && current_page?(controller: :people, action: :show)
+ - if user_signed_in? && current_page?(person_path current_user.person)
%hr
= render 'aspects/aspect_stream', :stream => @stream
%hr | 2 | 0.060606 | 1 | 1 |
22feb9c08c827b62015dea239d45aec528fa3f29 | Cargo.toml | Cargo.toml | [package]
name = "domain"
version = "0.3.0"
authors = ["Martin Hoffmann <hn@nvnc.de>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain/"
homepage = "https://github.com/partim/domain"
repository = "https://github.com/partim/domain"
readme = "README.md"
keywords = ["DNS", "domain", "resolver", "futures"]
license = "MIT"
[lib]
name = "domain"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
rand = "0.3"
failure = "0.1"
failure_derive = "0.1"
futures = "0.1.14"
tokio = { git = "https://github.com/tokio-rs/tokio.git", branch="new-crate" }
[dev-dependencies]
chrono = "0.4"
native-tls = "0.1.2"
tokio-io = "0.1.2"
tokio-tls = "0.1.2"
| [package]
name = "domain"
version = "0.3.0"
authors = ["Martin Hoffmann <hn@nvnc.de>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain/"
homepage = "https://github.com/partim/domain"
repository = "https://github.com/partim/domain"
readme = "README.md"
keywords = ["DNS", "domain", "resolver", "futures"]
license = "MIT"
[lib]
name = "domain"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
rand = "0.3"
failure = "0.1"
failure_derive = "0.1"
futures = "0.1.14"
tokio = "0.1"
[dev-dependencies]
chrono = "0.4"
native-tls = "0.1.2"
tokio-io = "0.1.2"
tokio-tls = "0.1.2"
| Update dependencies to tokio 0.1. | Update dependencies to tokio 0.1.
| TOML | mit | cloudshipping/domain,cloudshipping/domain-rs,partim/domain | toml | ## Code Before:
[package]
name = "domain"
version = "0.3.0"
authors = ["Martin Hoffmann <hn@nvnc.de>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain/"
homepage = "https://github.com/partim/domain"
repository = "https://github.com/partim/domain"
readme = "README.md"
keywords = ["DNS", "domain", "resolver", "futures"]
license = "MIT"
[lib]
name = "domain"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
rand = "0.3"
failure = "0.1"
failure_derive = "0.1"
futures = "0.1.14"
tokio = { git = "https://github.com/tokio-rs/tokio.git", branch="new-crate" }
[dev-dependencies]
chrono = "0.4"
native-tls = "0.1.2"
tokio-io = "0.1.2"
tokio-tls = "0.1.2"
## Instruction:
Update dependencies to tokio 0.1.
## Code After:
[package]
name = "domain"
version = "0.3.0"
authors = ["Martin Hoffmann <hn@nvnc.de>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain/"
homepage = "https://github.com/partim/domain"
repository = "https://github.com/partim/domain"
readme = "README.md"
keywords = ["DNS", "domain", "resolver", "futures"]
license = "MIT"
[lib]
name = "domain"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
rand = "0.3"
failure = "0.1"
failure_derive = "0.1"
futures = "0.1.14"
tokio = "0.1"
[dev-dependencies]
chrono = "0.4"
native-tls = "0.1.2"
tokio-io = "0.1.2"
tokio-tls = "0.1.2"
| [package]
name = "domain"
version = "0.3.0"
authors = ["Martin Hoffmann <hn@nvnc.de>"]
description = "A DNS library for Rust."
documentation = "https://docs.rs/domain/"
homepage = "https://github.com/partim/domain"
repository = "https://github.com/partim/domain"
readme = "README.md"
keywords = ["DNS", "domain", "resolver", "futures"]
license = "MIT"
[lib]
name = "domain"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
rand = "0.3"
failure = "0.1"
failure_derive = "0.1"
futures = "0.1.14"
- tokio = { git = "https://github.com/tokio-rs/tokio.git", branch="new-crate" }
+ tokio = "0.1"
[dev-dependencies]
chrono = "0.4"
native-tls = "0.1.2"
tokio-io = "0.1.2"
tokio-tls = "0.1.2"
| 2 | 0.066667 | 1 | 1 |
682fd1159472b7bbdd65a07d1f314bc4f2c45608 | .travis.yml | .travis.yml | language: go
install: true
script:
- make test
- make
| language: go
go:
- 1.6
- tip
install: true
script:
- gofmt -e -l
- make criticism
- make test
- make
| Add style validation and Go version targets | Add style validation and Go version targets
Change-Id: I6087e91c7e14d639b011965c716859a56abf5b7a
Signed-off-by: Jake Sanders <d7c79a945d71c8c27d84b007687c1a4cfff8858e@google.com>
| YAML | apache-2.0 | KingEmet/docker-credential-gcr,GoogleCloudPlatform/docker-credential-gcr | yaml | ## Code Before:
language: go
install: true
script:
- make test
- make
## Instruction:
Add style validation and Go version targets
Change-Id: I6087e91c7e14d639b011965c716859a56abf5b7a
Signed-off-by: Jake Sanders <d7c79a945d71c8c27d84b007687c1a4cfff8858e@google.com>
## Code After:
language: go
go:
- 1.6
- tip
install: true
script:
- gofmt -e -l
- make criticism
- make test
- make
| language: go
+ go:
+ - 1.6
+ - tip
install: true
- script:
? -
+ script:
+ - gofmt -e -l
+ - make criticism
- make test
- make | 7 | 1.4 | 6 | 1 |
7c26d18cdee3aa9a63823bd435fbf4a6bc78ce59 | .travis.yml | .travis.yml | language: python
python:
- "3.2"
- "3.3"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq llvm-3.3
env:
global:
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3
install:
- "pip install llvmpy"
# command to run tests
script: nosetests
| language: python
python:
- "3.2"
- "3.3"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq llvm-3.3
env:
global:
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3
install:
- "pip install git@github.com:llvmpy/llvmpy.git"
# command to run tests
script: nosetests
| Use lastest llvmpy build for Travis. Needed for llvm-3.3 support. | Use lastest llvmpy build for Travis. Needed for llvm-3.3 support.
| YAML | bsd-2-clause | ucb-sejits/ctree,ucb-sejits/ctree,mbdriscoll/ctree | yaml | ## Code Before:
language: python
python:
- "3.2"
- "3.3"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq llvm-3.3
env:
global:
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3
install:
- "pip install llvmpy"
# command to run tests
script: nosetests
## Instruction:
Use lastest llvmpy build for Travis. Needed for llvm-3.3 support.
## Code After:
language: python
python:
- "3.2"
- "3.3"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq llvm-3.3
env:
global:
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3
install:
- "pip install git@github.com:llvmpy/llvmpy.git"
# command to run tests
script: nosetests
| language: python
python:
- "3.2"
- "3.3"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq llvm-3.3
env:
global:
- LLVM_CONFIG_PATH=/usr/bin/llvm-config-3.3
install:
- - "pip install llvmpy"
+ - "pip install git@github.com:llvmpy/llvmpy.git"
# command to run tests
script: nosetests | 2 | 0.111111 | 1 | 1 |
2bf6a563a4655f2897ab8c411336714cbca40dc6 | compare-newton.sh | compare-newton.sh |
LOOPS="$1"
shift
[ -z "$LOOPS" ] && exit 1
run_measure() {
echo "$1"
shift
./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//'
}
run_measure "Without any agent"
run_measure "With bare agent" --std-agent-bare
run_measure "With agent, without measuring" --std-agent=no-measuring
run_measure "With agent, with measuring" --std-agent
|
LOOPS="$1"
shift
[ -z "$LOOPS" ] && exit 1
run_measure() {
echo "$1"
shift
./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//'
}
run_measure "Without any agent"
run_measure "With bare agent" --std-agent-bare
run_measure "With agent, without measuring" --std-agent=no-measuring
run_measure "With agent, with measuring (unobtrusive)" "--std-agent=,skip.factor=1000"
run_measure "With agent, with measuring" "--std-agent"
run_measure "With agent, with measuring (intensive)" "--std-agent=,skip.factor=2"
run_measure "With agent, with measuring (very intensive)" "--std-agent=,skip.factor=1"
| Extend Newton comparison (different skip factors) | Extend Newton comparison (different skip factors)
| Shell | apache-2.0 | vhotspur/spl-adaptation-framework,vhotspur/spl-adaptation-framework | shell | ## Code Before:
LOOPS="$1"
shift
[ -z "$LOOPS" ] && exit 1
run_measure() {
echo "$1"
shift
./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//'
}
run_measure "Without any agent"
run_measure "With bare agent" --std-agent-bare
run_measure "With agent, without measuring" --std-agent=no-measuring
run_measure "With agent, with measuring" --std-agent
## Instruction:
Extend Newton comparison (different skip factors)
## Code After:
LOOPS="$1"
shift
[ -z "$LOOPS" ] && exit 1
run_measure() {
echo "$1"
shift
./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//'
}
run_measure "Without any agent"
run_measure "With bare agent" --std-agent-bare
run_measure "With agent, without measuring" --std-agent=no-measuring
run_measure "With agent, with measuring (unobtrusive)" "--std-agent=,skip.factor=1000"
run_measure "With agent, with measuring" "--std-agent"
run_measure "With agent, with measuring (intensive)" "--std-agent=,skip.factor=2"
run_measure "With agent, with measuring (very intensive)" "--std-agent=,skip.factor=1"
|
LOOPS="$1"
shift
[ -z "$LOOPS" ] && exit 1
run_measure() {
echo "$1"
shift
./measure-newton.sh "$LOOPS" "$@" 2>&1 | tail -n 1 | sed 's/^[>]*//'
}
run_measure "Without any agent"
run_measure "With bare agent" --std-agent-bare
run_measure "With agent, without measuring" --std-agent=no-measuring
+ run_measure "With agent, with measuring (unobtrusive)" "--std-agent=,skip.factor=1000"
- run_measure "With agent, with measuring" --std-agent
+ run_measure "With agent, with measuring" "--std-agent"
? + +
+ run_measure "With agent, with measuring (intensive)" "--std-agent=,skip.factor=2"
+ run_measure "With agent, with measuring (very intensive)" "--std-agent=,skip.factor=1" | 5 | 0.294118 | 4 | 1 |
0231a875135bf2dd4ef6b70b52eb014782c7541c | apps/RhoSugarCRM/SugarOpportunity/index.erb | apps/RhoSugarCRM/SugarOpportunity/index.erb | <ul id="SugarOpportunities" title="Opportunities">
<%@SugarOpportunities.each do |x|%>
<a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
<li class="overview">
<a href="<%= "/RhoSugarCRM/SugarOpportunity/#{x.object}/show" %>">
<%= x.name %>
<div>
<%= x.sales_stage %> <%= x.probability %>%
</div>
</a>
</li>
<%end%>
</ul> | <ul id="SugarOpportunities" title="Opportunities">
<a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
<%@SugarOpportunities.each do |x|%>
<li class="overview">
<a href="<%= "/RhoSugarCRM/SugarOpportunity/#{x.object}/show" %>">
<%= x.name %>
<div>
<%= x.sales_stage %> <%= x.probability %>%
</div>
</a>
</li>
<%end%>
</ul> | Move new link out of for | Move new link out of for
| HTML+ERB | mit | watusi/rhodes,pslgoh/rhodes,rhosilver/rhodes-1,rhosilver/rhodes-1,pslgoh/rhodes,louisatome/rhodes,jdrider/rhodes,UIKit0/rhodes,rhosilver/rhodes-1,tauplatform/tau,rhomobile/rhodes,watusi/rhodes,rhosilver/rhodes-1,tauplatform/tau,UIKit0/rhodes,nosolosoftware/rhodes,rhosilver/rhodes-1,watusi/rhodes,pslgoh/rhodes,nosolosoftware/rhodes,watusi/rhodes,tauplatform/tau,tauplatform/tau,tauplatform/tau,watusi/rhodes,rhomobile/rhodes,jdrider/rhodes,jdrider/rhodes,tauplatform/tau,watusi/rhodes,tauplatform/tau,rhomobile/rhodes,louisatome/rhodes,UIKit0/rhodes,tauplatform/tau,pslgoh/rhodes,louisatome/rhodes,nosolosoftware/rhodes,UIKit0/rhodes,tauplatform/tau,pslgoh/rhodes,watusi/rhodes,rhomobile/rhodes,pslgoh/rhodes,watusi/rhodes,nosolosoftware/rhodes,UIKit0/rhodes,rhosilver/rhodes-1,nosolosoftware/rhodes,rhosilver/rhodes-1,pslgoh/rhodes,rhomobile/rhodes,nosolosoftware/rhodes,watusi/rhodes,rhomobile/rhodes,UIKit0/rhodes,rhomobile/rhodes,watusi/rhodes,pslgoh/rhodes,nosolosoftware/rhodes,UIKit0/rhodes,rhosilver/rhodes-1,UIKit0/rhodes,UIKit0/rhodes,pslgoh/rhodes,rhosilver/rhodes-1,nosolosoftware/rhodes,rhomobile/rhodes,rhomobile/rhodes,jdrider/rhodes,jdrider/rhodes,jdrider/rhodes,pslgoh/rhodes,louisatome/rhodes,louisatome/rhodes,jdrider/rhodes,jdrider/rhodes,louisatome/rhodes,tauplatform/tau,louisatome/rhodes,rhosilver/rhodes-1,louisatome/rhodes,jdrider/rhodes,UIKit0/rhodes,rhomobile/rhodes,louisatome/rhodes | html+erb | ## Code Before:
<ul id="SugarOpportunities" title="Opportunities">
<%@SugarOpportunities.each do |x|%>
<a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
<li class="overview">
<a href="<%= "/RhoSugarCRM/SugarOpportunity/#{x.object}/show" %>">
<%= x.name %>
<div>
<%= x.sales_stage %> <%= x.probability %>%
</div>
</a>
</li>
<%end%>
</ul>
## Instruction:
Move new link out of for
## Code After:
<ul id="SugarOpportunities" title="Opportunities">
<a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
<%@SugarOpportunities.each do |x|%>
<li class="overview">
<a href="<%= "/RhoSugarCRM/SugarOpportunity/#{x.object}/show" %>">
<%= x.name %>
<div>
<%= x.sales_stage %> <%= x.probability %>%
</div>
</a>
</li>
<%end%>
</ul> | <ul id="SugarOpportunities" title="Opportunities">
+ <a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
+
<%@SugarOpportunities.each do |x|%>
-
- <a class="button right_button" href="/RhoSugarCRM/SugarOpportunity/new">New</a>
<li class="overview">
<a href="<%= "/RhoSugarCRM/SugarOpportunity/#{x.object}/show" %>">
<%= x.name %>
<div>
<%= x.sales_stage %> <%= x.probability %>%
</div>
</a>
</li>
<%end%>
</ul> | 4 | 0.235294 | 2 | 2 |
11deda08ca2cea49a0b0af7954647ef6246378ef | _posts/2016-06-02-GlobalSprint.markdown | _posts/2016-06-02-GlobalSprint.markdown | ---
title: Mozilla Science Lab Global Sprint
text: Collaborate on open science projects!
location: TBA
link: https://github.com/UofTCoders/Events/issues/50
date: 2016-06-02
startTime: '00:00'
endTime: '23:59'
---
| ---
title: Mozilla Science Lab Global Sprint
text: Collaborate on open science projects!
location: Mozilla Toronto, 366 Adelaide St. W.
link: https://github.com/UofTCoders/Events/issues/50
date: 2016-06-02
startTime: '09:00'
endTime: '17:00'
---
| Add location to global sprint post | Add location to global sprint post | Markdown | apache-2.0 | sjeblee/studyGroup,linamnt/studyGroup,QuLogic/studyGroup,mbonsma/studyGroup,lwjohnst86/studyGroup,linamnt/studyGroup,linamnt/studyGroup,QuLogic/studyGroup,sjeblee/studyGroup,lwjohnst86/studyGroup,mbonsma/studyGroup,sjeblee/studyGroup,lwjohnst86/studyGroup,lwjohnst86/studyGroup,QuLogic/studyGroup,lwjohnst86/studyGroup,lwjohnst86/studyGroup,linamnt/studyGroup,QuLogic/studyGroup,mbonsma/studyGroup,sjeblee/studyGroup,mbonsma/studyGroup,QuLogic/studyGroup,linamnt/studyGroup,sjeblee/studyGroup,mbonsma/studyGroup,mbonsma/studyGroup,linamnt/studyGroup,QuLogic/studyGroup,sjeblee/studyGroup | markdown | ## Code Before:
---
title: Mozilla Science Lab Global Sprint
text: Collaborate on open science projects!
location: TBA
link: https://github.com/UofTCoders/Events/issues/50
date: 2016-06-02
startTime: '00:00'
endTime: '23:59'
---
## Instruction:
Add location to global sprint post
## Code After:
---
title: Mozilla Science Lab Global Sprint
text: Collaborate on open science projects!
location: Mozilla Toronto, 366 Adelaide St. W.
link: https://github.com/UofTCoders/Events/issues/50
date: 2016-06-02
startTime: '09:00'
endTime: '17:00'
---
| ---
title: Mozilla Science Lab Global Sprint
text: Collaborate on open science projects!
- location: TBA
+ location: Mozilla Toronto, 366 Adelaide St. W.
link: https://github.com/UofTCoders/Events/issues/50
date: 2016-06-02
- startTime: '00:00'
? ^
+ startTime: '09:00'
? ^
- endTime: '23:59'
? ^^ ^^
+ endTime: '17:00'
? ^^ ^^
--- | 6 | 0.666667 | 3 | 3 |
9861e1376adff00a5105fe87e2d8172053310f87 | .travis.yml | .travis.yml | language: java
before_install: (cd parent && exec mvn install)
notifications:
irc: "irc.oftc.net#mammon"
template:
- "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
| language: java
before_install: (cd parent && exec mvn install)
notifications:
irc: "irc.oftc.net#mammon"
template:
- "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
use_notice: true
skip_join: true
| Reduce IRC notification to a single line | Reduce IRC notification to a single line
| YAML | bsd-3-clause | phedny/Mammon | yaml | ## Code Before:
language: java
before_install: (cd parent && exec mvn install)
notifications:
irc: "irc.oftc.net#mammon"
template:
- "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
## Instruction:
Reduce IRC notification to a single line
## Code After:
language: java
before_install: (cd parent && exec mvn install)
notifications:
irc: "irc.oftc.net#mammon"
template:
- "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
use_notice: true
skip_join: true
| language: java
before_install: (cd parent && exec mvn install)
notifications:
irc: "irc.oftc.net#mammon"
- template:
+ template:
? ++
- - "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
+ - "%{branch}/%{commit} (#%{build_number} by %{author}): %{mesage} %{build_url}"
? ++
+ use_notice: true
+ skip_join: true
| 6 | 0.666667 | 4 | 2 |
f731b7271b5f7fd0762e8f44260a0680a71166a7 | app/controllers/track_controller.rb | app/controllers/track_controller.rb | class TrackController < ApplicationController
def index
@upcoming_events = UpcomingEvents.find_all(:date => Date.new(2008, 6), :weeks => 6, :discipline => "Track")
end
def schedule
@events = SingleDayEvent.find_all_by_year(Date.today.year, Discipline[:track]) + MultiDayEvent.find_all_by_year(Date.today.year, Discipline[:track])
end
end | class TrackController < ApplicationController
def index
@upcoming_events = UpcomingEvents.find_all(:weeks => 52, :discipline => "Track")
end
def schedule
@events = SingleDayEvent.find_all_by_year(Date.today.year, Discipline[:track]) + MultiDayEvent.find_all_by_year(Date.today.year, Discipline[:track])
end
end | Remove hard-coded date from track upcoming events, and default to entire year in advance | Remove hard-coded date from track upcoming events, and default to entire year in advance
| Ruby | mit | scottwillson/racing_on_rails,alpendergrass/montanacycling-racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,scottwillson/racing_on_rails,alpendergrass/montanacycling-racing_on_rails,alpendergrass/montanacycling-racing_on_rails,alpendergrass/montanacycling-racing_on_rails,alpendergrass/montanacycling-racing_on_rails | ruby | ## Code Before:
class TrackController < ApplicationController
def index
@upcoming_events = UpcomingEvents.find_all(:date => Date.new(2008, 6), :weeks => 6, :discipline => "Track")
end
def schedule
@events = SingleDayEvent.find_all_by_year(Date.today.year, Discipline[:track]) + MultiDayEvent.find_all_by_year(Date.today.year, Discipline[:track])
end
end
## Instruction:
Remove hard-coded date from track upcoming events, and default to entire year in advance
## Code After:
class TrackController < ApplicationController
def index
@upcoming_events = UpcomingEvents.find_all(:weeks => 52, :discipline => "Track")
end
def schedule
@events = SingleDayEvent.find_all_by_year(Date.today.year, Discipline[:track]) + MultiDayEvent.find_all_by_year(Date.today.year, Discipline[:track])
end
end | class TrackController < ApplicationController
def index
- @upcoming_events = UpcomingEvents.find_all(:date => Date.new(2008, 6), :weeks => 6, :discipline => "Track")
? ---------------------------- ^
+ @upcoming_events = UpcomingEvents.find_all(:weeks => 52, :discipline => "Track")
? ^^
end
def schedule
@events = SingleDayEvent.find_all_by_year(Date.today.year, Discipline[:track]) + MultiDayEvent.find_all_by_year(Date.today.year, Discipline[:track])
end
end | 2 | 0.222222 | 1 | 1 |
7f77a82ac7b990d4ef451503acb3ea07865fb242 | lib/remindice.rb | lib/remindice.rb | require "remindice/version"
module Remindice
# Your code goes here...
end
| require "remindice/version"
require "thor"
module Remindice
class Commands < Thor
end
end
| Add class inherits Thor in the module | Add class inherits Thor in the module
| Ruby | mit | Roadagain/remindice | ruby | ## Code Before:
require "remindice/version"
module Remindice
# Your code goes here...
end
## Instruction:
Add class inherits Thor in the module
## Code After:
require "remindice/version"
require "thor"
module Remindice
class Commands < Thor
end
end
| require "remindice/version"
+ require "thor"
module Remindice
- # Your code goes here...
+ class Commands < Thor
+ end
end | 4 | 0.8 | 3 | 1 |
40d4435359fdd56cf4457960ff1fee8c76c7856f | logstash/lib.sls | logstash/lib.sls | {#
include:
- .beaver
#}
{% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n') -%}
{% if salt['pillar.get']('monitoring:enabled', True) %}
{% set tags = ','.join(tags) %}
/etc/beaver.d/{{appshort}}.conf:
file:
- managed
- source: salt://logstash/templates/beaver/beaver-file.conf
- template: jinja
- context:
logfile: {{logfile}}
format: {{format}}
type: {{type}}
tags: {{tags}}
delimiter: "{{delimiter}}"
- watch_in:
- service: beaver
- require:
- file: /etc/beaver.d
{% endif %}
{%- endmacro %}
| {#
include:
- .beaver
#}
{% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n', absent=False) -%}
{% if salt['pillar.get']('monitoring:enabled', True) and absent == false %}
{% set tags = ','.join(tags) %}
/etc/beaver.d/{{appshort}}.conf:
file:
- managed
- source: salt://logstash/templates/beaver/beaver-file.conf
- template: jinja
- context:
logfile: {{logfile}}
format: {{format}}
type: {{type}}
tags: {{tags}}
delimiter: "{{delimiter}}"
- watch_in:
- service: beaver
- require:
- file: /etc/beaver.d
{% endif %}
{% if absent == True %}
/etc/beaver.d/{{appshort}}.conf:
file.absent
{% endif %}
{%- endmacro %}
| Add absent flag on logship macro. | Add absent flag on logship macro.
If a logship line is removed, then the corresponding configuration file
is not removed from the disk. This flag makes sure that we do remove the
files.
| SaltStack | apache-2.0 | ministryofjustice/logstash-formula,ministryofjustice/logstash-formula,ministryofjustice/logstash-formula,ministryofjustice/logstash-formula,ministryofjustice/logstash-formula | saltstack | ## Code Before:
{#
include:
- .beaver
#}
{% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n') -%}
{% if salt['pillar.get']('monitoring:enabled', True) %}
{% set tags = ','.join(tags) %}
/etc/beaver.d/{{appshort}}.conf:
file:
- managed
- source: salt://logstash/templates/beaver/beaver-file.conf
- template: jinja
- context:
logfile: {{logfile}}
format: {{format}}
type: {{type}}
tags: {{tags}}
delimiter: "{{delimiter}}"
- watch_in:
- service: beaver
- require:
- file: /etc/beaver.d
{% endif %}
{%- endmacro %}
## Instruction:
Add absent flag on logship macro.
If a logship line is removed, then the corresponding configuration file
is not removed from the disk. This flag makes sure that we do remove the
files.
## Code After:
{#
include:
- .beaver
#}
{% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n', absent=False) -%}
{% if salt['pillar.get']('monitoring:enabled', True) and absent == false %}
{% set tags = ','.join(tags) %}
/etc/beaver.d/{{appshort}}.conf:
file:
- managed
- source: salt://logstash/templates/beaver/beaver-file.conf
- template: jinja
- context:
logfile: {{logfile}}
format: {{format}}
type: {{type}}
tags: {{tags}}
delimiter: "{{delimiter}}"
- watch_in:
- service: beaver
- require:
- file: /etc/beaver.d
{% endif %}
{% if absent == True %}
/etc/beaver.d/{{appshort}}.conf:
file.absent
{% endif %}
{%- endmacro %}
| {#
include:
- .beaver
#}
- {% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n') -%}
+ {% macro logship(appshort, logfile, type='daemon', tags=['daemon','error'], format='json', delimiter='\\\\n', absent=False) -%}
? ++++++++++++++
- {% if salt['pillar.get']('monitoring:enabled', True) %}
+ {% if salt['pillar.get']('monitoring:enabled', True) and absent == false %}
? ++++++++++++++++++++
{% set tags = ','.join(tags) %}
/etc/beaver.d/{{appshort}}.conf:
file:
- managed
- source: salt://logstash/templates/beaver/beaver-file.conf
- template: jinja
- context:
logfile: {{logfile}}
format: {{format}}
type: {{type}}
tags: {{tags}}
delimiter: "{{delimiter}}"
- watch_in:
- service: beaver
- require:
- file: /etc/beaver.d
{% endif %}
+
+ {% if absent == True %}
+ /etc/beaver.d/{{appshort}}.conf:
+ file.absent
+ {% endif %}
+
{%- endmacro %} | 10 | 0.344828 | 8 | 2 |
caa4e2071ae26d012a71eeae77b72cc60bcfe2e1 | src/content/shorten-url.js | src/content/shorten-url.js | import fetchJsonP from 'fetch-jsonp';
import queryString from 'query-string';
import url from 'url';
export default function shortenURL(urlToShorten) {
let longURL = urlToShorten;
if (!longURL.startsWith('https://perf-html.io/')) {
const parsedURL = url.parse(longURL);
const parsedURLOnCanonicalHost = Object.assign({}, parsedURL, {
protocol: 'https:',
host: 'perf-html.io',
});
longURL = url.format(parsedURLOnCanonicalHost);
}
const bitlyQueryURL = 'https://api-ssl.bitly.com/v3/shorten?' +
queryString.stringify({
'longUrl': longURL,
'domain': 'perfht.ml',
'access_token': 'b177b00a130faf3ecda6960e8b59fde73e902422',
});
return fetchJsonP(bitlyQueryURL).then(response => response.json()).then(json => json.data.url);
}
| import fetchJsonP from 'fetch-jsonp';
import queryString from 'query-string';
import url from 'url';
export default function shortenURL(urlToShorten) {
let longURL = urlToShorten;
if (!longURL.startsWith('https://perf-html.io/')) {
const parsedURL = url.parse(longURL);
const parsedURLOnCanonicalHost = Object.assign({}, parsedURL, {
protocol: 'https:',
host: 'perf-html.io',
});
longURL = url.format(parsedURLOnCanonicalHost);
}
const bitlyQueryURL = 'https://api-ssl.bitly.com/v3/shorten?' +
queryString.stringify({
'longUrl': longURL,
'domain': 'perfht.ml',
'format': 'json',
'access_token': 'b177b00a130faf3ecda6960e8b59fde73e902422',
});
return fetchJsonP(bitlyQueryURL).then(response => response.json()).then(json => json.data.url);
}
| Add missing 'format' key in the bit.ly API request. | Add missing 'format' key in the bit.ly API request.
Bit.ly have recently made a change on their side to ignore the jsonp callback argument
if format=json was not specified, and that made our requests fail.
| JavaScript | mpl-2.0 | devtools-html/perf.html,mstange/cleopatra,squarewave/bhr.html,mstange/cleopatra,squarewave/bhr.html,devtools-html/perf.html | javascript | ## Code Before:
import fetchJsonP from 'fetch-jsonp';
import queryString from 'query-string';
import url from 'url';
export default function shortenURL(urlToShorten) {
let longURL = urlToShorten;
if (!longURL.startsWith('https://perf-html.io/')) {
const parsedURL = url.parse(longURL);
const parsedURLOnCanonicalHost = Object.assign({}, parsedURL, {
protocol: 'https:',
host: 'perf-html.io',
});
longURL = url.format(parsedURLOnCanonicalHost);
}
const bitlyQueryURL = 'https://api-ssl.bitly.com/v3/shorten?' +
queryString.stringify({
'longUrl': longURL,
'domain': 'perfht.ml',
'access_token': 'b177b00a130faf3ecda6960e8b59fde73e902422',
});
return fetchJsonP(bitlyQueryURL).then(response => response.json()).then(json => json.data.url);
}
## Instruction:
Add missing 'format' key in the bit.ly API request.
Bit.ly have recently made a change on their side to ignore the jsonp callback argument
if format=json was not specified, and that made our requests fail.
## Code After:
import fetchJsonP from 'fetch-jsonp';
import queryString from 'query-string';
import url from 'url';
export default function shortenURL(urlToShorten) {
let longURL = urlToShorten;
if (!longURL.startsWith('https://perf-html.io/')) {
const parsedURL = url.parse(longURL);
const parsedURLOnCanonicalHost = Object.assign({}, parsedURL, {
protocol: 'https:',
host: 'perf-html.io',
});
longURL = url.format(parsedURLOnCanonicalHost);
}
const bitlyQueryURL = 'https://api-ssl.bitly.com/v3/shorten?' +
queryString.stringify({
'longUrl': longURL,
'domain': 'perfht.ml',
'format': 'json',
'access_token': 'b177b00a130faf3ecda6960e8b59fde73e902422',
});
return fetchJsonP(bitlyQueryURL).then(response => response.json()).then(json => json.data.url);
}
| import fetchJsonP from 'fetch-jsonp';
import queryString from 'query-string';
import url from 'url';
export default function shortenURL(urlToShorten) {
let longURL = urlToShorten;
if (!longURL.startsWith('https://perf-html.io/')) {
const parsedURL = url.parse(longURL);
const parsedURLOnCanonicalHost = Object.assign({}, parsedURL, {
protocol: 'https:',
host: 'perf-html.io',
});
longURL = url.format(parsedURLOnCanonicalHost);
}
const bitlyQueryURL = 'https://api-ssl.bitly.com/v3/shorten?' +
queryString.stringify({
'longUrl': longURL,
'domain': 'perfht.ml',
+ 'format': 'json',
'access_token': 'b177b00a130faf3ecda6960e8b59fde73e902422',
});
return fetchJsonP(bitlyQueryURL).then(response => response.json()).then(json => json.data.url);
} | 1 | 0.043478 | 1 | 0 |
84632f202a05ac4603a6ae1ea495039387838811 | server/README.md | server/README.md | TelegramQt Server
=======================
TelegramQt-based Telegram Server
This server is developed to test a Telegram client without bothering the official server.
There is also no intention to make it a "production-ready" server and though it runs as
a cluster there is no purpose to make it scalable or performant.
Note
=============
The server is expected to work with any Telegram client, though now there is no plan for
multilayer support and currently it work only with layer 72.
Key Generation
==============
mkdir ~/TelegramServer
cd ~/TelegramServer
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
openssl rsa -pubin -in public_key.pem -RSAPublicKey_out > public_key_PKCS1.pem
License
=======
This application is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
| TelegramQt Server
=======================
TelegramQt-based Telegram Server
This server is developed to test a Telegram client without bothering the official server.
There is also no intention to make it a "production-ready" server and though it runs as
a cluster there is no purpose to make it scalable or performant.
Note
=============
The server is expected to work with any Telegram client, though now there is no plan for
multilayer support and currently it work only with layer 72.
Key Generation
==============
mkdir ~/TelegramServer
cd ~/TelegramServer
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
openssl rsa -pubin -in public_key.pem -RSAPublicKey_out > public_key_PKCS1.pem
Implemented API
===============
Registration/Authorization:
- auth.checkPassword
- auth.checkPhone
- auth.exportAuthorization
- auth.importAuthorization
- auth.sendCode
- auth.signIn
- auth.signUp
Account:
- account.checkUsername
- account.getPassword
- account.updateProfile
- account.updateStatus
- account.updateUsername
Contacts:
- contacts.getContacts
- contacts.importContacts
- contacts.resolveUsername
Users:
- users.getFullUser
- users.getUsers
Messages:
- messages.sendMessage
- messages.sendMedia (contact and uploaded document)
- messages.setTyping
- messages.getDialogs
- messages.getHistory
- messages.readHistory
Files:
- upload.getFile
- upload.saveFilePart
Photos:
- photos.getUserPhotos
- photos.uploadProfilePhoto
License
=======
This application is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
| Add a list of (at least partially) implemented API | Server: Add a list of (at least partially) implemented API
| Markdown | lgpl-2.1 | Kaffeine/telegram-qt,Kaffeine/telegram-qt,Kaffeine/telegram-qt | markdown | ## Code Before:
TelegramQt Server
=======================
TelegramQt-based Telegram Server
This server is developed to test a Telegram client without bothering the official server.
There is also no intention to make it a "production-ready" server and though it runs as
a cluster there is no purpose to make it scalable or performant.
Note
=============
The server is expected to work with any Telegram client, though now there is no plan for
multilayer support and currently it work only with layer 72.
Key Generation
==============
mkdir ~/TelegramServer
cd ~/TelegramServer
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
openssl rsa -pubin -in public_key.pem -RSAPublicKey_out > public_key_PKCS1.pem
License
=======
This application is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
## Instruction:
Server: Add a list of (at least partially) implemented API
## Code After:
TelegramQt Server
=======================
TelegramQt-based Telegram Server
This server is developed to test a Telegram client without bothering the official server.
There is also no intention to make it a "production-ready" server and though it runs as
a cluster there is no purpose to make it scalable or performant.
Note
=============
The server is expected to work with any Telegram client, though now there is no plan for
multilayer support and currently it work only with layer 72.
Key Generation
==============
mkdir ~/TelegramServer
cd ~/TelegramServer
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
openssl rsa -pubin -in public_key.pem -RSAPublicKey_out > public_key_PKCS1.pem
Implemented API
===============
Registration/Authorization:
- auth.checkPassword
- auth.checkPhone
- auth.exportAuthorization
- auth.importAuthorization
- auth.sendCode
- auth.signIn
- auth.signUp
Account:
- account.checkUsername
- account.getPassword
- account.updateProfile
- account.updateStatus
- account.updateUsername
Contacts:
- contacts.getContacts
- contacts.importContacts
- contacts.resolveUsername
Users:
- users.getFullUser
- users.getUsers
Messages:
- messages.sendMessage
- messages.sendMedia (contact and uploaded document)
- messages.setTyping
- messages.getDialogs
- messages.getHistory
- messages.readHistory
Files:
- upload.getFile
- upload.saveFilePart
Photos:
- photos.getUserPhotos
- photos.uploadProfilePhoto
License
=======
This application is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version.
| TelegramQt Server
=======================
TelegramQt-based Telegram Server
This server is developed to test a Telegram client without bothering the official server.
There is also no intention to make it a "production-ready" server and though it runs as
a cluster there is no purpose to make it scalable or performant.
Note
=============
The server is expected to work with any Telegram client, though now there is no plan for
multilayer support and currently it work only with layer 72.
Key Generation
==============
mkdir ~/TelegramServer
cd ~/TelegramServer
openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private_key.pem -out public_key.pem
openssl rsa -pubin -in public_key.pem -RSAPublicKey_out > public_key_PKCS1.pem
+ Implemented API
+ ===============
+
+ Registration/Authorization:
+
+ - auth.checkPassword
+ - auth.checkPhone
+ - auth.exportAuthorization
+ - auth.importAuthorization
+ - auth.sendCode
+ - auth.signIn
+ - auth.signUp
+
+ Account:
+
+ - account.checkUsername
+ - account.getPassword
+ - account.updateProfile
+ - account.updateStatus
+ - account.updateUsername
+
+ Contacts:
+
+ - contacts.getContacts
+ - contacts.importContacts
+ - contacts.resolveUsername
+
+ Users:
+
+ - users.getFullUser
+ - users.getUsers
+
+ Messages:
+
+ - messages.sendMessage
+ - messages.sendMedia (contact and uploaded document)
+ - messages.setTyping
+ - messages.getDialogs
+ - messages.getHistory
+ - messages.readHistory
+
+ Files:
+
+ - upload.getFile
+ - upload.saveFilePart
+
+ Photos:
+
+ - photos.getUserPhotos
+ - photos.uploadProfilePhoto
+
License
=======
This application is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License,
or (at your option) any later version. | 51 | 1.645161 | 51 | 0 |
d3a879f78790175e4287e518f77f8bab441628df | src/main/java/info/u_team/u_team_core/intern/asm/ASMUContainerMenuHook.java | src/main/java/info/u_team/u_team_core/intern/asm/ASMUContainerMenuHook.java | package info.u_team.u_team_core.intern.asm;
import info.u_team.u_team_core.menu.UAbstractContainerMenu;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
public class ASMUContainerMenuHook {
/**
* Called from asm core mod (ucontainermenu-init-menu.js)
*/
public static void hook(AbstractContainerMenu menu, ServerPlayer player) {
if (menu instanceof UAbstractContainerMenu uContainerMenu) {
uContainerMenu.setSynchronizerPlayer(player);
uContainerMenu.initMenu(player);
}
}
}
| package info.u_team.u_team_core.intern.asm;
import info.u_team.u_team_core.menu.UAbstractContainerMenu;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
public class ASMUContainerMenuHook {
/**
* Called from asm core mod (ucontainermenu-init-menu.js) from {@link ServerPlayer#initMenu(AbstractContainerMenu)}
* method.
*/
public static void hook(AbstractContainerMenu menu, ServerPlayer player) {
if (menu instanceof UAbstractContainerMenu uContainerMenu) {
uContainerMenu.setSynchronizerPlayer(player);
uContainerMenu.initMenu(player);
}
}
}
| Make coremod description a bit more enhanced | Make coremod description a bit more enhanced | Java | apache-2.0 | MC-U-Team/U-Team-Core,MC-U-Team/U-Team-Core | java | ## Code Before:
package info.u_team.u_team_core.intern.asm;
import info.u_team.u_team_core.menu.UAbstractContainerMenu;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
public class ASMUContainerMenuHook {
/**
* Called from asm core mod (ucontainermenu-init-menu.js)
*/
public static void hook(AbstractContainerMenu menu, ServerPlayer player) {
if (menu instanceof UAbstractContainerMenu uContainerMenu) {
uContainerMenu.setSynchronizerPlayer(player);
uContainerMenu.initMenu(player);
}
}
}
## Instruction:
Make coremod description a bit more enhanced
## Code After:
package info.u_team.u_team_core.intern.asm;
import info.u_team.u_team_core.menu.UAbstractContainerMenu;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
public class ASMUContainerMenuHook {
/**
* Called from asm core mod (ucontainermenu-init-menu.js) from {@link ServerPlayer#initMenu(AbstractContainerMenu)}
* method.
*/
public static void hook(AbstractContainerMenu menu, ServerPlayer player) {
if (menu instanceof UAbstractContainerMenu uContainerMenu) {
uContainerMenu.setSynchronizerPlayer(player);
uContainerMenu.initMenu(player);
}
}
}
| package info.u_team.u_team_core.intern.asm;
import info.u_team.u_team_core.menu.UAbstractContainerMenu;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.inventory.AbstractContainerMenu;
public class ASMUContainerMenuHook {
/**
- * Called from asm core mod (ucontainermenu-init-menu.js)
+ * Called from asm core mod (ucontainermenu-init-menu.js) from {@link ServerPlayer#initMenu(AbstractContainerMenu)}
+ * method.
*/
public static void hook(AbstractContainerMenu menu, ServerPlayer player) {
if (menu instanceof UAbstractContainerMenu uContainerMenu) {
uContainerMenu.setSynchronizerPlayer(player);
uContainerMenu.initMenu(player);
}
}
} | 3 | 0.157895 | 2 | 1 |
52b94ad763575b3c67139ed5ed378e26ee104b94 | src/client/app/+play/play.component.ts | src/client/app/+play/play.component.ts | import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillator: OscillatorNode;
constructor() {
this.audioContext = new AudioContext();
}
startNote(frequency: number) {
console.log("startNote()");
var oscillator = this.audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = frequency;
oscillator.connect(this.audioContext.destination);
oscillator.start(0);
this.currentOscillator = oscillator;
}
stopNote() {
console.log("stopNote()");
this.currentOscillator.stop(0);
}
}
| import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillator: OscillatorNode;
constructor() {
this.audioContext = new AudioContext();
}
startNote(frequency: number) {
console.log("startNote()");
var oscillator = this.audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = frequency;
oscillator.connect(this.audioContext.destination);
oscillator.start(0);
this.currentOscillator = oscillator;
}
stopNote() {
console.log("stopNote()");
if (this.currentOscillator !== undefined)
{
this.currentOscillator.stop(0);
}
}
}
| Fix undefined error in PlayComponent.stopNote | Fix undefined error in PlayComponent.stopNote
| TypeScript | mit | Ecafracs/flatthirteen,Ecafracs/flatthirteen,Ecafracs/flatthirteen | typescript | ## Code Before:
import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillator: OscillatorNode;
constructor() {
this.audioContext = new AudioContext();
}
startNote(frequency: number) {
console.log("startNote()");
var oscillator = this.audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = frequency;
oscillator.connect(this.audioContext.destination);
oscillator.start(0);
this.currentOscillator = oscillator;
}
stopNote() {
console.log("stopNote()");
this.currentOscillator.stop(0);
}
}
## Instruction:
Fix undefined error in PlayComponent.stopNote
## Code After:
import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillator: OscillatorNode;
constructor() {
this.audioContext = new AudioContext();
}
startNote(frequency: number) {
console.log("startNote()");
var oscillator = this.audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = frequency;
oscillator.connect(this.audioContext.destination);
oscillator.start(0);
this.currentOscillator = oscillator;
}
stopNote() {
console.log("stopNote()");
if (this.currentOscillator !== undefined)
{
this.currentOscillator.stop(0);
}
}
}
| import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillator: OscillatorNode;
constructor() {
this.audioContext = new AudioContext();
}
startNote(frequency: number) {
console.log("startNote()");
var oscillator = this.audioContext.createOscillator();
oscillator.type = 'sine';
oscillator.frequency.value = frequency;
oscillator.connect(this.audioContext.destination);
oscillator.start(0);
this.currentOscillator = oscillator;
}
stopNote() {
console.log("stopNote()");
+ if (this.currentOscillator !== undefined)
+ {
- this.currentOscillator.stop(0);
+ this.currentOscillator.stop(0);
? ++++
+ }
+
}
} | 6 | 0.181818 | 5 | 1 |
a7c43168cb8751fa0094b26a333c0750980a977a | roles/docker-engine/tasks/redhat.yml | roles/docker-engine/tasks/redhat.yml | ---
- name: "Install Docker rpm key"
become: yes
rpm_key:
key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
state: present
# install yum utils and Docker repo
- name: "Install yum utils"
become: yes
yum:
name: yum-utils
state: installed
- name: "Install Docker yum repo"
become: yes
command: "yum-config-manager --add-repo https://packages.docker.com/1.10/yum/repo/main/centos/7"
- name: "Install Docker package"
become: yes
yum:
name: docker-engine
update_cache: yes
state: installed
## Storage?
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~
| ---
- name: "Install Docker rpm key"
become: yes
rpm_key:
key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
state: present
- name: "Install libselinux-python to allow file copy"
become: yes
yum:
name: libselinux-python
state: present
- name: "Add Docker yum repo"
copy:
src: "docker.repo"
dest: /etc/yum.repos.d
owner: root
group: root
- name: "Install Docker package"
become: yes
yum:
name: docker-engine
update_cache: yes
state: installed
## Storage?
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~
| Use file copy for yum repo to make it indempotent. | Use file copy for yum repo to make it indempotent.
| YAML | apache-2.0 | adrahon/ansible-docker-ucp | yaml | ## Code Before:
---
- name: "Install Docker rpm key"
become: yes
rpm_key:
key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
state: present
# install yum utils and Docker repo
- name: "Install yum utils"
become: yes
yum:
name: yum-utils
state: installed
- name: "Install Docker yum repo"
become: yes
command: "yum-config-manager --add-repo https://packages.docker.com/1.10/yum/repo/main/centos/7"
- name: "Install Docker package"
become: yes
yum:
name: docker-engine
update_cache: yes
state: installed
## Storage?
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~
## Instruction:
Use file copy for yum repo to make it indempotent.
## Code After:
---
- name: "Install Docker rpm key"
become: yes
rpm_key:
key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
state: present
- name: "Install libselinux-python to allow file copy"
become: yes
yum:
name: libselinux-python
state: present
- name: "Add Docker yum repo"
copy:
src: "docker.repo"
dest: /etc/yum.repos.d
owner: root
group: root
- name: "Install Docker package"
become: yes
yum:
name: docker-engine
update_cache: yes
state: installed
## Storage?
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~
| ---
- name: "Install Docker rpm key"
become: yes
rpm_key:
key: "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
state: present
+ - name: "Install libselinux-python to allow file copy"
- # install yum utils and Docker repo
- - name: "Install yum utils"
become: yes
yum:
- name: yum-utils
- state: installed
+ name: libselinux-python
+ state: present
+
- - name: "Install Docker yum repo"
? ^^^^^^^
+ - name: "Add Docker yum repo"
? ^^^
- become: yes
- command: "yum-config-manager --add-repo https://packages.docker.com/1.10/yum/repo/main/centos/7"
+ copy:
+ src: "docker.repo"
+ dest: /etc/yum.repos.d
+ owner: root
+ group: root
- name: "Install Docker package"
become: yes
yum:
name: docker-engine
update_cache: yes
state: installed
## Storage?
# # enable
# # become systemctl enable docker.service
# # become systemctl start docker.service
# ~ | 17 | 0.548387 | 10 | 7 |
a958e5af2ee60199213045fec3446188d9ee0c03 | core/spec-unit/classes/open_graph_formatter_spec.rb | core/spec-unit/classes/open_graph_formatter_spec.rb | require_relative '../../app/classes/open_graph_formatter.rb'
describe OpenGraphFormatter do
describe '#to_hash' do
it 'returns a hash with the two default keys by default' do
default_rules = { key: mock }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
expect(formatter.to_hash).to eq default_rules
end
end
describe '#add' do
it 'adds the passed GraphObjects hash presentation to the rules' do
default_rules = {foo: 'bar'}
graph_object = mock to_hash: {bla: 'foo'}
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq({foo: 'bar', bla: 'foo'})
end
it 'overwrites the default values when a GraphObject with the same key gets added' do
default_rules = { foo: 'bar' }
graph_object = mock to_hash: { foo: 'bla' }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq graph_object.to_hash
end
end
end
| require_relative '../../app/classes/open_graph_formatter.rb'
describe OpenGraphFormatter do
describe '#to_hash' do
it 'returns a hash with the two default keys by default' do
default_rules = { key: mock }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
expect(formatter.to_hash).to eq default_rules
end
end
describe '#add' do
it 'adds the passed GraphObjects hash presentation to the rules' do
default_rules = {foo: 'bar'}
graph_object = mock to_hash: {bla: 'foo'}
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq({foo: 'bar', bla: 'foo'})
end
it 'overwrites the default values when a GraphObject with the same key gets added' do
default_rules = { key: 'old_value' }
graph_object = mock to_hash: { key: 'new_value' }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq graph_object.to_hash
end
end
end
| Use old_value new_value for readability | Use old_value new_value for readability
| Ruby | mit | Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core | ruby | ## Code Before:
require_relative '../../app/classes/open_graph_formatter.rb'
describe OpenGraphFormatter do
describe '#to_hash' do
it 'returns a hash with the two default keys by default' do
default_rules = { key: mock }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
expect(formatter.to_hash).to eq default_rules
end
end
describe '#add' do
it 'adds the passed GraphObjects hash presentation to the rules' do
default_rules = {foo: 'bar'}
graph_object = mock to_hash: {bla: 'foo'}
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq({foo: 'bar', bla: 'foo'})
end
it 'overwrites the default values when a GraphObject with the same key gets added' do
default_rules = { foo: 'bar' }
graph_object = mock to_hash: { foo: 'bla' }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq graph_object.to_hash
end
end
end
## Instruction:
Use old_value new_value for readability
## Code After:
require_relative '../../app/classes/open_graph_formatter.rb'
describe OpenGraphFormatter do
describe '#to_hash' do
it 'returns a hash with the two default keys by default' do
default_rules = { key: mock }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
expect(formatter.to_hash).to eq default_rules
end
end
describe '#add' do
it 'adds the passed GraphObjects hash presentation to the rules' do
default_rules = {foo: 'bar'}
graph_object = mock to_hash: {bla: 'foo'}
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq({foo: 'bar', bla: 'foo'})
end
it 'overwrites the default values when a GraphObject with the same key gets added' do
default_rules = { key: 'old_value' }
graph_object = mock to_hash: { key: 'new_value' }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq graph_object.to_hash
end
end
end
| require_relative '../../app/classes/open_graph_formatter.rb'
describe OpenGraphFormatter do
describe '#to_hash' do
it 'returns a hash with the two default keys by default' do
default_rules = { key: mock }
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
expect(formatter.to_hash).to eq default_rules
end
end
describe '#add' do
it 'adds the passed GraphObjects hash presentation to the rules' do
default_rules = {foo: 'bar'}
graph_object = mock to_hash: {bla: 'foo'}
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq({foo: 'bar', bla: 'foo'})
end
it 'overwrites the default values when a GraphObject with the same key gets added' do
- default_rules = { foo: 'bar' }
? ^^^ ^ ^
+ default_rules = { key: 'old_value' }
? ^^^ ^^^^^ ^^^
- graph_object = mock to_hash: { foo: 'bla' }
? ^^^ ^ ^
+ graph_object = mock to_hash: { key: 'new_value' }
? ^^^ ^^^^^^ ^^
formatter = described_class.new
formatter.stub(:default_rules).and_return(default_rules)
formatter.add graph_object
expect(formatter.to_hash).to eq graph_object.to_hash
end
end
end | 4 | 0.1 | 2 | 2 |
819836a9e8732cd645b9be3b0ba08cc358e74b1d | roles/centos6/tasks/main.yml | roles/centos6/tasks/main.yml | - include: ../../common/tasks/create_user.yml
with_items:
- "{{ v123456 }}"
- "{{ v789012 }}"
| - include: ../../common/tasks/create_user.yml
with_items:
- "{{ u220815 }}"
- "{{ u224711 }}"
| Change example to use testdata | Change example to use testdata
| YAML | mit | dehesselle/clum | yaml | ## Code Before:
- include: ../../common/tasks/create_user.yml
with_items:
- "{{ v123456 }}"
- "{{ v789012 }}"
## Instruction:
Change example to use testdata
## Code After:
- include: ../../common/tasks/create_user.yml
with_items:
- "{{ u220815 }}"
- "{{ u224711 }}"
| - include: ../../common/tasks/create_user.yml
with_items:
- - "{{ v123456 }}"
? ^ --- -
+ - "{{ u220815 }}"
? ^^^^^
- - "{{ v789012 }}"
? ^ --- ^
+ - "{{ u224711 }}"
? ^^^^ ^
| 4 | 1 | 2 | 2 |
48455d0d1b8632d6b512e257d6dd914defd7ae84 | px/px_process_test.py | px/px_process_test.py | import px_process
def test_create_process():
process_builder = px_process.PxProcessBuilder()
process_builder.pid = 7
process_builder.username = "usernamex"
process_builder.cpu_time = 1.3
process_builder.memory_percent = 42.7
process_builder.cmdline = "hej kontinent"
test_me = px_process.PxProcess(process_builder)
assert test_me.pid == 7
assert test_me.user == "usernamex"
assert test_me.cpu_time_s == "1.300s"
assert test_me.memory_percent_s == "43%"
assert test_me.cmdline == "hej kontinent"
| import getpass
import os
import px_process
def test_create_process():
process_builder = px_process.PxProcessBuilder()
process_builder.pid = 7
process_builder.username = "usernamex"
process_builder.cpu_time = 1.3
process_builder.memory_percent = 42.7
process_builder.cmdline = "hej kontinent"
test_me = px_process.PxProcess(process_builder)
assert test_me.pid == 7
assert test_me.user == "usernamex"
assert test_me.cpu_time_s == "1.300s"
assert test_me.memory_percent_s == "43%"
assert test_me.cmdline == "hej kontinent"
def test_get_all():
all = px_process.get_all()
# Assert that current PID is part of all
assert os.getpid() in map(lambda p: p.pid, all)
# Assert that all contains no duplicate PIDs
seen_pids = set()
for process in all:
pid = process.pid
assert pid not in seen_pids
seen_pids.add(pid)
# Assert that the current PID has the correct user name
current_process = filter(lambda process: process.pid == os.getpid(), all)[0]
assert current_process.username == getpass.getuser()
| Add (failing) test for getting all processes | Add (failing) test for getting all processes
| Python | mit | walles/px,walles/px | python | ## Code Before:
import px_process
def test_create_process():
process_builder = px_process.PxProcessBuilder()
process_builder.pid = 7
process_builder.username = "usernamex"
process_builder.cpu_time = 1.3
process_builder.memory_percent = 42.7
process_builder.cmdline = "hej kontinent"
test_me = px_process.PxProcess(process_builder)
assert test_me.pid == 7
assert test_me.user == "usernamex"
assert test_me.cpu_time_s == "1.300s"
assert test_me.memory_percent_s == "43%"
assert test_me.cmdline == "hej kontinent"
## Instruction:
Add (failing) test for getting all processes
## Code After:
import getpass
import os
import px_process
def test_create_process():
process_builder = px_process.PxProcessBuilder()
process_builder.pid = 7
process_builder.username = "usernamex"
process_builder.cpu_time = 1.3
process_builder.memory_percent = 42.7
process_builder.cmdline = "hej kontinent"
test_me = px_process.PxProcess(process_builder)
assert test_me.pid == 7
assert test_me.user == "usernamex"
assert test_me.cpu_time_s == "1.300s"
assert test_me.memory_percent_s == "43%"
assert test_me.cmdline == "hej kontinent"
def test_get_all():
all = px_process.get_all()
# Assert that current PID is part of all
assert os.getpid() in map(lambda p: p.pid, all)
# Assert that all contains no duplicate PIDs
seen_pids = set()
for process in all:
pid = process.pid
assert pid not in seen_pids
seen_pids.add(pid)
# Assert that the current PID has the correct user name
current_process = filter(lambda process: process.pid == os.getpid(), all)[0]
assert current_process.username == getpass.getuser()
| + import getpass
+
+ import os
import px_process
def test_create_process():
process_builder = px_process.PxProcessBuilder()
process_builder.pid = 7
process_builder.username = "usernamex"
process_builder.cpu_time = 1.3
process_builder.memory_percent = 42.7
process_builder.cmdline = "hej kontinent"
test_me = px_process.PxProcess(process_builder)
assert test_me.pid == 7
assert test_me.user == "usernamex"
assert test_me.cpu_time_s == "1.300s"
assert test_me.memory_percent_s == "43%"
assert test_me.cmdline == "hej kontinent"
+
+
+ def test_get_all():
+ all = px_process.get_all()
+
+ # Assert that current PID is part of all
+ assert os.getpid() in map(lambda p: p.pid, all)
+
+ # Assert that all contains no duplicate PIDs
+ seen_pids = set()
+ for process in all:
+ pid = process.pid
+ assert pid not in seen_pids
+ seen_pids.add(pid)
+
+ # Assert that the current PID has the correct user name
+ current_process = filter(lambda process: process.pid == os.getpid(), all)[0]
+ assert current_process.username == getpass.getuser() | 21 | 1.235294 | 21 | 0 |
63bf9c267ff891f1a2bd1f472a5d77f8df1e0209 | tests/iam/test_iam_valid_json.py | tests/iam/test_iam_valid_json.py | """Test IAM Policy templates are valid JSON."""
import jinja2
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TEMPLATES]))
iam_template_names = jinjaenv.list_templates(filter_func=lambda x: all([
x.startswith('infrastructure/iam/'),
'trust' not in x,
'wrapper' not in x, ]))
for iam_template_name in iam_template_names:
yield iam_template_name
items = ['resource1', 'resource2']
if service == 'rds-db':
items = {
'resource1': 'user1',
'resource2': 'user2',
}
rendered = render_policy_template(
account_number='',
app='coreforrest',
env='dev',
group='forrest',
items=items,
pipeline_settings={
'lambda': {
'vpc_enabled': False,
},
},
region='us-east-1',
service=service)
assert isinstance(rendered, list)
| """Test IAM Policy templates are valid JSON."""
import json
import jinja2
import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TEMPLATES]))
iam_template_names = jinjaenv.list_templates(filter_func=lambda x: all([
x.startswith('infrastructure/iam/'),
'trust' not in x,
'wrapper' not in x, ]))
for iam_template_name in iam_template_names:
yield iam_template_name
@pytest.mark.parametrize(argnames='template_name', argvalues=iam_templates())
def test_all_iam_templates(template_name):
"""Verify all IAM templates render as proper JSON."""
*_, service_json = template_name.split('/')
service, *_ = service_json.split('.')
items = ['resource1', 'resource2']
if service == 'rds-db':
items = {
'resource1': 'user1',
'resource2': 'user2',
}
try:
rendered = render_policy_template(
account_number='',
app='coreforrest',
env='dev',
group='forrest',
items=items,
pipeline_settings={
'lambda': {
'vpc_enabled': False,
},
},
region='us-east-1',
service=service)
except json.decoder.JSONDecodeError:
pytest.fail('Bad template: {0}'.format(template_name), pytrace=False)
assert isinstance(rendered, list)
| Split IAM template tests with paramtrize | test: Split IAM template tests with paramtrize
See also: #208
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | python | ## Code Before:
"""Test IAM Policy templates are valid JSON."""
import jinja2
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TEMPLATES]))
iam_template_names = jinjaenv.list_templates(filter_func=lambda x: all([
x.startswith('infrastructure/iam/'),
'trust' not in x,
'wrapper' not in x, ]))
for iam_template_name in iam_template_names:
yield iam_template_name
items = ['resource1', 'resource2']
if service == 'rds-db':
items = {
'resource1': 'user1',
'resource2': 'user2',
}
rendered = render_policy_template(
account_number='',
app='coreforrest',
env='dev',
group='forrest',
items=items,
pipeline_settings={
'lambda': {
'vpc_enabled': False,
},
},
region='us-east-1',
service=service)
assert isinstance(rendered, list)
## Instruction:
test: Split IAM template tests with paramtrize
See also: #208
## Code After:
"""Test IAM Policy templates are valid JSON."""
import json
import jinja2
import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TEMPLATES]))
iam_template_names = jinjaenv.list_templates(filter_func=lambda x: all([
x.startswith('infrastructure/iam/'),
'trust' not in x,
'wrapper' not in x, ]))
for iam_template_name in iam_template_names:
yield iam_template_name
@pytest.mark.parametrize(argnames='template_name', argvalues=iam_templates())
def test_all_iam_templates(template_name):
"""Verify all IAM templates render as proper JSON."""
*_, service_json = template_name.split('/')
service, *_ = service_json.split('.')
items = ['resource1', 'resource2']
if service == 'rds-db':
items = {
'resource1': 'user1',
'resource2': 'user2',
}
try:
rendered = render_policy_template(
account_number='',
app='coreforrest',
env='dev',
group='forrest',
items=items,
pipeline_settings={
'lambda': {
'vpc_enabled': False,
},
},
region='us-east-1',
service=service)
except json.decoder.JSONDecodeError:
pytest.fail('Bad template: {0}'.format(template_name), pytrace=False)
assert isinstance(rendered, list)
| """Test IAM Policy templates are valid JSON."""
+ import json
+
import jinja2
+ import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
def iam_templates():
"""Generate list of IAM templates."""
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader([LOCAL_TEMPLATES]))
iam_template_names = jinjaenv.list_templates(filter_func=lambda x: all([
x.startswith('infrastructure/iam/'),
'trust' not in x,
'wrapper' not in x, ]))
for iam_template_name in iam_template_names:
yield iam_template_name
+ @pytest.mark.parametrize(argnames='template_name', argvalues=iam_templates())
+ def test_all_iam_templates(template_name):
+ """Verify all IAM templates render as proper JSON."""
+ *_, service_json = template_name.split('/')
+ service, *_ = service_json.split('.')
- items = ['resource1', 'resource2']
? ----
+ items = ['resource1', 'resource2']
- if service == 'rds-db':
? ----
+ if service == 'rds-db':
- items = {
? ----
+ items = {
- 'resource1': 'user1',
? ----
+ 'resource1': 'user1',
- 'resource2': 'user2',
? ----
+ 'resource2': 'user2',
- }
? ----
+ }
+ try:
rendered = render_policy_template(
account_number='',
app='coreforrest',
env='dev',
group='forrest',
items=items,
pipeline_settings={
'lambda': {
'vpc_enabled': False,
},
},
region='us-east-1',
service=service)
+ except json.decoder.JSONDecodeError:
+ pytest.fail('Bad template: {0}'.format(template_name), pytrace=False)
- assert isinstance(rendered, list)
? ----
+ assert isinstance(rendered, list) | 25 | 0.568182 | 18 | 7 |
7588fcb13a30b8a723e2789b26f3e612ece71c1b | dev-requirements.txt | dev-requirements.txt | bzr; python_version == '2.7'
kgb>=5.0
mercurial>=4.4.2
mock
nose
# As of p4python 2019.1.1858212, there are only compiled wheel packages for
# Python 2.7 and 3.4 through 3.7. p4python's setup.py doesn't support
# locating p4api or OpenSSL on anything but Linux. We have to wire off
# Python 3.8 support for now when not running on Linux.
p4python; python_version <= '3.7' or platform_system == 'Linux'
setuptools>=18.2
# As of subvertpy 0.10.1, Python 3.8 support is busted, resulting in a
# SystemError during usage (though installation works fine). 0.10.1 was
# released on July 19, 2017, and there has not been an official release
# since (even though the upstream source does fix this). For now, we can't
# safely install this on Python 3.8.
subvertpy; python_version <= '3.7'
wheel
# Load in some extra dependencies defined in Review Board's setup.py.
ReviewBoard[ldap]
| bzr; python_version == '2.7'
kgb>=6.0
mercurial>=4.4.2
mock
nose
# As of p4python 2020.1.2056111, there are only compiled wheel packages for
# Python 2.7 and 3.5 through 3.8. p4python's setup.py doesn't support
# locating p4api or OpenSSL on anything but Linux. We have to wire off
# Python 3.9 support for now when not running on Linux.
p4python; python_version <= '3.8' or platform_system == 'Linux'
setuptools>=18.2
# As of subvertpy 0.10.1, Python 3.8 support is busted, resulting in a
# SystemError during usage (though installation works fine). 0.10.1 was
# released on July 19, 2017, and there has not been an official release
# since (even though the upstream source does fix this). For now, we can't
# safely install this on Python 3.8.
subvertpy; python_version <= '3.7'
wheel
# Load in some extra dependencies defined in Review Board's setup.py.
ReviewBoard[ldap]
ReviewBoard[s3]
ReviewBoard[swift]
| Update development dependencies for p4python, Swift, and S3. | Update development dependencies for p4python, Swift, and S3.
When setting up a development environment, we now use the latest version
of p4python (which added Python 3.8 support, but does not include 3.9),
and our Swift and S3 packages, which are needed for unit tests.
Testing Done:
Ran `pip install -r dev-requirements.txt` for each version of Python.
Verified the expected packages were installed.
Reviewed at https://reviews.reviewboard.org/r/11357/
| Text | mit | reviewboard/reviewboard,chipx86/reviewboard,chipx86/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard | text | ## Code Before:
bzr; python_version == '2.7'
kgb>=5.0
mercurial>=4.4.2
mock
nose
# As of p4python 2019.1.1858212, there are only compiled wheel packages for
# Python 2.7 and 3.4 through 3.7. p4python's setup.py doesn't support
# locating p4api or OpenSSL on anything but Linux. We have to wire off
# Python 3.8 support for now when not running on Linux.
p4python; python_version <= '3.7' or platform_system == 'Linux'
setuptools>=18.2
# As of subvertpy 0.10.1, Python 3.8 support is busted, resulting in a
# SystemError during usage (though installation works fine). 0.10.1 was
# released on July 19, 2017, and there has not been an official release
# since (even though the upstream source does fix this). For now, we can't
# safely install this on Python 3.8.
subvertpy; python_version <= '3.7'
wheel
# Load in some extra dependencies defined in Review Board's setup.py.
ReviewBoard[ldap]
## Instruction:
Update development dependencies for p4python, Swift, and S3.
When setting up a development environment, we now use the latest version
of p4python (which added Python 3.8 support, but does not include 3.9),
and our Swift and S3 packages, which are needed for unit tests.
Testing Done:
Ran `pip install -r dev-requirements.txt` for each version of Python.
Verified the expected packages were installed.
Reviewed at https://reviews.reviewboard.org/r/11357/
## Code After:
bzr; python_version == '2.7'
kgb>=6.0
mercurial>=4.4.2
mock
nose
# As of p4python 2020.1.2056111, there are only compiled wheel packages for
# Python 2.7 and 3.5 through 3.8. p4python's setup.py doesn't support
# locating p4api or OpenSSL on anything but Linux. We have to wire off
# Python 3.9 support for now when not running on Linux.
p4python; python_version <= '3.8' or platform_system == 'Linux'
setuptools>=18.2
# As of subvertpy 0.10.1, Python 3.8 support is busted, resulting in a
# SystemError during usage (though installation works fine). 0.10.1 was
# released on July 19, 2017, and there has not been an official release
# since (even though the upstream source does fix this). For now, we can't
# safely install this on Python 3.8.
subvertpy; python_version <= '3.7'
wheel
# Load in some extra dependencies defined in Review Board's setup.py.
ReviewBoard[ldap]
ReviewBoard[s3]
ReviewBoard[swift]
| bzr; python_version == '2.7'
- kgb>=5.0
? ^
+ kgb>=6.0
? ^
mercurial>=4.4.2
mock
nose
- # As of p4python 2019.1.1858212, there are only compiled wheel packages for
? ^^ ---- ^
+ # As of p4python 2020.1.2056111, there are only compiled wheel packages for
? ^^ ++++ ^
- # Python 2.7 and 3.4 through 3.7. p4python's setup.py doesn't support
? ^ ^
+ # Python 2.7 and 3.5 through 3.8. p4python's setup.py doesn't support
? ^ ^
# locating p4api or OpenSSL on anything but Linux. We have to wire off
- # Python 3.8 support for now when not running on Linux.
? ^
+ # Python 3.9 support for now when not running on Linux.
? ^
- p4python; python_version <= '3.7' or platform_system == 'Linux'
? ^
+ p4python; python_version <= '3.8' or platform_system == 'Linux'
? ^
setuptools>=18.2
# As of subvertpy 0.10.1, Python 3.8 support is busted, resulting in a
# SystemError during usage (though installation works fine). 0.10.1 was
# released on July 19, 2017, and there has not been an official release
# since (even though the upstream source does fix this). For now, we can't
# safely install this on Python 3.8.
subvertpy; python_version <= '3.7'
wheel
# Load in some extra dependencies defined in Review Board's setup.py.
ReviewBoard[ldap]
+ ReviewBoard[s3]
+ ReviewBoard[swift] | 12 | 0.48 | 7 | 5 |
977ced8e01f5a01f8e604fa4a12c7c1327ae68c7 | log4j-core/src/test/resources/log4j-props1.xml | log4j-core/src/test/resources/log4j-props1.xml | <?xml version="1.0" encoding="UTF-8"?>
<Configuration strict="false" name="DSI" packages="com.terradue.dsione">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="${sys:log.level}">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration> | <?xml version="1.0" encoding="UTF-8"?>
<Configuration strict="false" name="DSI">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="${sys:log.level}">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration> | Remove reference to nonexistent packages. | Remove reference to nonexistent packages.
git-svn-id: de5ce936019686f47409c93bcc5e202a9739563b@1588340 13f79535-47bb-0310-9956-ffa450edef68
| XML | apache-2.0 | GFriedrich/logging-log4j2,lburgazzoli/logging-log4j2,GFriedrich/logging-log4j2,lburgazzoli/logging-log4j2,jsnikhil/nj-logging-log4j2,pisfly/logging-log4j2,lqbweb/logging-log4j2,MagicWiz/log4j2,neuro-sys/logging-log4j2,ChetnaChaudhari/logging-log4j2,jsnikhil/nj-logging-log4j2,renchunxiao/logging-log4j2,codescale/logging-log4j2,xnslong/logging-log4j2,lqbweb/logging-log4j2,codescale/logging-log4j2,lburgazzoli/logging-log4j2,apache/logging-log4j2,xnslong/logging-log4j2,lqbweb/logging-log4j2,neuro-sys/logging-log4j2,apache/logging-log4j2,lburgazzoli/apache-logging-log4j2,xnslong/logging-log4j2,lburgazzoli/apache-logging-log4j2,GFriedrich/logging-log4j2,jinxuan/logging-log4j2,pisfly/logging-log4j2,renchunxiao/logging-log4j2,ChetnaChaudhari/logging-log4j2,jinxuan/logging-log4j2,MagicWiz/log4j2,apache/logging-log4j2,codescale/logging-log4j2,lburgazzoli/apache-logging-log4j2 | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration strict="false" name="DSI" packages="com.terradue.dsione">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="${sys:log.level}">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
## Instruction:
Remove reference to nonexistent packages.
git-svn-id: de5ce936019686f47409c93bcc5e202a9739563b@1588340 13f79535-47bb-0310-9956-ffa450edef68
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration strict="false" name="DSI">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="${sys:log.level}">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration> | <?xml version="1.0" encoding="UTF-8"?>
- <Configuration strict="false" name="DSI" packages="com.terradue.dsione">
+ <Configuration strict="false" name="DSI">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="${sys:log.level}">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration> | 2 | 0.142857 | 1 | 1 |
6f9faf3ea0cad5be88f2694ede4722b822ceec98 | core/bin/server/stop_resque.sh | core/bin/server/stop_resque.sh | PID=`cat ~/resque.pid`
# Check if the process id is in the running processes list
count=`ps x --no-header -eo pid | grep -c $PID`
if [ "$count" -eq "1" ]; then
cat ~/resque.pid | xargs kill
fi | /bin/sh -c 'kill -9 `cat /home/deploy/resque.pid` && rm -f cat /home/deploy/resque.pid; exit 0;'
| Kill the Resque worker with the defined PID | Kill the Resque worker with the defined PID
| Shell | mit | Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core | shell | ## Code Before:
PID=`cat ~/resque.pid`
# Check if the process id is in the running processes list
count=`ps x --no-header -eo pid | grep -c $PID`
if [ "$count" -eq "1" ]; then
cat ~/resque.pid | xargs kill
fi
## Instruction:
Kill the Resque worker with the defined PID
## Code After:
/bin/sh -c 'kill -9 `cat /home/deploy/resque.pid` && rm -f cat /home/deploy/resque.pid; exit 0;'
| + /bin/sh -c 'kill -9 `cat /home/deploy/resque.pid` && rm -f cat /home/deploy/resque.pid; exit 0;'
- PID=`cat ~/resque.pid`
-
- # Check if the process id is in the running processes list
- count=`ps x --no-header -eo pid | grep -c $PID`
-
- if [ "$count" -eq "1" ]; then
- cat ~/resque.pid | xargs kill
- fi | 9 | 1.125 | 1 | 8 |
d93ffe995dfbdbc698c4594f9e0d255a6af3802b | index.html | index.html | <!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- META TAGS -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" />
<meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb,
couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
desenvolvimento, development, develop, developer" />
<meta name="copyright" content="© Copyleft NoSQL BA" />
<title>NoSQLBA - Conferência Baiana de NoSQL</title>
<meta http-equiv="refresh" content="0; url=2019/index.html" />
</head>
<body>
<p><a href="2019/index.html">Redirect</a></p>
</body>
</html>
| <!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- META TAGS -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" />
<meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb,
couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
desenvolvimento, development, develop, developer" />
<meta name="copyright" content="© Copyleft NoSQL BA" />
<title>NoSQLBA - Conferência Baiana de NoSQL</title>
<meta http-equiv="refresh" content="0; url=2019/index.html" />
</head>
<body>
<p><a href="2019/">Redirect</a></p>
</body>
</html>
| Make the redirect generic, now its point to the folder and not for the file | Make the redirect generic, now its point to the folder and not for the file
| HTML | apache-2.0 | otaviojava/nosqlba,otaviojava/nosqlba | html | ## Code Before:
<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- META TAGS -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" />
<meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb,
couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
desenvolvimento, development, develop, developer" />
<meta name="copyright" content="© Copyleft NoSQL BA" />
<title>NoSQLBA - Conferência Baiana de NoSQL</title>
<meta http-equiv="refresh" content="0; url=2019/index.html" />
</head>
<body>
<p><a href="2019/index.html">Redirect</a></p>
</body>
</html>
## Instruction:
Make the redirect generic, now its point to the folder and not for the file
## Code After:
<!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- META TAGS -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" />
<meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb,
couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
desenvolvimento, development, develop, developer" />
<meta name="copyright" content="© Copyleft NoSQL BA" />
<title>NoSQLBA - Conferência Baiana de NoSQL</title>
<meta http-equiv="refresh" content="0; url=2019/index.html" />
</head>
<body>
<p><a href="2019/">Redirect</a></p>
</body>
</html>
| <!DOCTYPE HTML>
<html lang="pt-br">
<head>
<!-- META TAGS -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Conferência sobre as tecnolgoias em volta do NoSQL" />
<meta name="keywords" content="nosql, sql, rdms, sgbdr, banco de dados, database, not only sql, bahia, salvador, mongodb,
- couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
? -
+ couchdb, cassandra, neo4j, hipertable, bigtable, mysql, oracle, postgres, web, internet, solution, solução, soluções,
- solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
? -
+ solutions, app, webapp, application, applications, aplicativos, aplicativo, design, programação, programming,
desenvolvimento, development, develop, developer" />
<meta name="copyright" content="© Copyleft NoSQL BA" />
<title>NoSQLBA - Conferência Baiana de NoSQL</title>
<meta http-equiv="refresh" content="0; url=2019/index.html" />
</head>
<body>
- <p><a href="2019/index.html">Redirect</a></p>
? ----------
+ <p><a href="2019/">Redirect</a></p>
</body>
</html> | 6 | 0.26087 | 3 | 3 |
5763e16845b126a527cb6108a95888c42f8ac75f | web-framework/search/search-index-asset.html | web-framework/search/search-index-asset.html | %begin_asset_metadata_robots^contains:noindex:1:0^eq:0%
%begin_asset_metadata_jcu.site.search_enabled^neq:0%
<a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_name^htmlentities:ENT_QUOTES%<a/> - (Asset ID - %asset_assetid%)<br>
%end_asset%
%end_asset%
| %begin_asset_metadata_robots^contains:noindex:1:0^eq:0%
%begin_asset_metadata_jcu.site.search_enabled^neq:0%
<a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_url^htmlentities:ENT_QUOTES%<a/><br>
%end_asset%
%end_asset%
| Change search index to list URLs for sites to be indexed | Change search index to list URLs for sites to be indexed
| HTML | agpl-3.0 | jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers,jcu-eresearch/matrix-helpers | html | ## Code Before:
%begin_asset_metadata_robots^contains:noindex:1:0^eq:0%
%begin_asset_metadata_jcu.site.search_enabled^neq:0%
<a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_name^htmlentities:ENT_QUOTES%<a/> - (Asset ID - %asset_assetid%)<br>
%end_asset%
%end_asset%
## Instruction:
Change search index to list URLs for sites to be indexed
## Code After:
%begin_asset_metadata_robots^contains:noindex:1:0^eq:0%
%begin_asset_metadata_jcu.site.search_enabled^neq:0%
<a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_url^htmlentities:ENT_QUOTES%<a/><br>
%end_asset%
%end_asset%
| %begin_asset_metadata_robots^contains:noindex:1:0^eq:0%
%begin_asset_metadata_jcu.site.search_enabled^neq:0%
- <a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_name^htmlentities:ENT_QUOTES%<a/> - (Asset ID - %asset_assetid%)<br>
? ^^^^ -------------------------------
+ <a href="%asset_url^htmlentities:ENT_QUOTES%">%asset_url^htmlentities:ENT_QUOTES%<a/><br>
? ^^^
%end_asset%
%end_asset% | 2 | 0.4 | 1 | 1 |
7d79cc0efee86c348b049d381690909c88655432 | README.md | README.md | Android App for Movie-Maniac Project
https://cloud.githubusercontent.com/assets/2491168/11892089/d7b0fa82-a59f-11e5-92ea-a2c8203bd860.png
https://cloud.githubusercontent.com/assets/2491168/11892091/d7ba2486-a59f-11e5-996c-271c57d8b040.png
https://cloud.githubusercontent.com/assets/2491168/11892092/d7c4b1b2-a59f-11e5-9f07-5f0ef3dc6e15.png
https://cloud.githubusercontent.com/assets/2491168/11892090/d7b94c0a-a59f-11e5-8875-7f30e97761dc.png
| Android App for Movie-Maniac Project



 | Update ReadMe to show the screenshots properly. | Update ReadMe to show the screenshots properly.
| Markdown | apache-2.0 | AungPyae/Movie-Maniac-Android | markdown | ## Code Before:
Android App for Movie-Maniac Project
https://cloud.githubusercontent.com/assets/2491168/11892089/d7b0fa82-a59f-11e5-92ea-a2c8203bd860.png
https://cloud.githubusercontent.com/assets/2491168/11892091/d7ba2486-a59f-11e5-996c-271c57d8b040.png
https://cloud.githubusercontent.com/assets/2491168/11892092/d7c4b1b2-a59f-11e5-9f07-5f0ef3dc6e15.png
https://cloud.githubusercontent.com/assets/2491168/11892090/d7b94c0a-a59f-11e5-8875-7f30e97761dc.png
## Instruction:
Update ReadMe to show the screenshots properly.
## Code After:
Android App for Movie-Maniac Project



 | Android App for Movie-Maniac Project
- https://cloud.githubusercontent.com/assets/2491168/11892089/d7b0fa82-a59f-11e5-92ea-a2c8203bd860.png
+ 
? ++++++++++++++++++++++++++++++ +
-
- https://cloud.githubusercontent.com/assets/2491168/11892091/d7ba2486-a59f-11e5-996c-271c57d8b040.png
+ 
? ++++++++++++++++++++++++++++++ +
-
- https://cloud.githubusercontent.com/assets/2491168/11892092/d7c4b1b2-a59f-11e5-9f07-5f0ef3dc6e15.png
+ 
? ++++++++++++++++++++++++++++++ +
-
- https://cloud.githubusercontent.com/assets/2491168/11892090/d7b94c0a-a59f-11e5-8875-7f30e97761dc.png
+ 
? ++++++++++++++++++++++++++++++ +
| 11 | 1.222222 | 4 | 7 |
69a763860202c42026b2c7146dcf915e30bc3f9b | misc/utils/LogTools/LogView.py | misc/utils/LogTools/LogView.py | import threading
import socket
import logging
import os
import colorama
from termcolor import colored
from collections import deque
markerStack = deque([''])
def colorMessage(message):
if 'Info' in message :
print(colored(message, 'green'))
elif 'Error' in message :
print(colored(message, 'red'))
elif 'Fatal' in message :
print(colored(message, 'red', 'white'))
else:
print(message)
def appendMessageToBuffer(message):
markerStack.append(message)
if len(markerStack) > MAX_ELEMENTS_IN_QUEUE:
markerStack.popleft()
def updateView():
for marker in reversed(markerStack):
colorMessage(marker)
class UdpListener():
def __init__(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(('127.0.0.1', 4242))
self.clients_list = []
def listen(self):
while True:
msg = self.sock.recv(4096)
appendMessageToBuffer(msg)
updateView()
def start_listening(self):
t = threading.Thread(target=self.listen)
t.start()
if __name__ == "__main__":
print 'call'
colorama.init()
listener = UdpListener()
listener.start_listening()
|
import threading
import socket
import logging
import os
import colorama
import docopt
from termcolor import colored
from collections import deque
markerStack = deque([''])
def colorMessage(message):
if 'Info' in message :
print(colored(message, 'green'))
elif 'Error' in message :
print(colored(message, 'red'))
elif 'Fatal' in message :
print(colored(message, 'red', 'white'))
else:
print(message)
def appendMessageToBuffer(message):
markerStack.append(message)
if len(markerStack) > MAX_ELEMENTS_IN_QUEUE:
markerStack.popleft()
def updateView():
for marker in reversed(markerStack):
colorMessage(marker)
class UdpListener():
def __init__(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(('127.0.0.1', 4242))
self.clients_list = []
def listen(self):
while True:
msg = self.sock.recv(4096)
appendMessageToBuffer(msg)
updateView()
def start_listening(self):
t = threading.Thread(target=self.listen)
t.start()
if __name__ == "__main__":
print 'call'
colorama.init()
listener = UdpListener()
listener.start_listening()
| Add docopt - not finished | Add docopt - not finished
| Python | mit | xfleckx/BeMoBI,xfleckx/BeMoBI | python | ## Code Before:
import threading
import socket
import logging
import os
import colorama
from termcolor import colored
from collections import deque
markerStack = deque([''])
def colorMessage(message):
if 'Info' in message :
print(colored(message, 'green'))
elif 'Error' in message :
print(colored(message, 'red'))
elif 'Fatal' in message :
print(colored(message, 'red', 'white'))
else:
print(message)
def appendMessageToBuffer(message):
markerStack.append(message)
if len(markerStack) > MAX_ELEMENTS_IN_QUEUE:
markerStack.popleft()
def updateView():
for marker in reversed(markerStack):
colorMessage(marker)
class UdpListener():
def __init__(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(('127.0.0.1', 4242))
self.clients_list = []
def listen(self):
while True:
msg = self.sock.recv(4096)
appendMessageToBuffer(msg)
updateView()
def start_listening(self):
t = threading.Thread(target=self.listen)
t.start()
if __name__ == "__main__":
print 'call'
colorama.init()
listener = UdpListener()
listener.start_listening()
## Instruction:
Add docopt - not finished
## Code After:
import threading
import socket
import logging
import os
import colorama
import docopt
from termcolor import colored
from collections import deque
markerStack = deque([''])
def colorMessage(message):
if 'Info' in message :
print(colored(message, 'green'))
elif 'Error' in message :
print(colored(message, 'red'))
elif 'Fatal' in message :
print(colored(message, 'red', 'white'))
else:
print(message)
def appendMessageToBuffer(message):
markerStack.append(message)
if len(markerStack) > MAX_ELEMENTS_IN_QUEUE:
markerStack.popleft()
def updateView():
for marker in reversed(markerStack):
colorMessage(marker)
class UdpListener():
def __init__(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(('127.0.0.1', 4242))
self.clients_list = []
def listen(self):
while True:
msg = self.sock.recv(4096)
appendMessageToBuffer(msg)
updateView()
def start_listening(self):
t = threading.Thread(target=self.listen)
t.start()
if __name__ == "__main__":
print 'call'
colorama.init()
listener = UdpListener()
listener.start_listening()
| +
import threading
import socket
import logging
import os
import colorama
+ import docopt
from termcolor import colored
from collections import deque
markerStack = deque([''])
def colorMessage(message):
if 'Info' in message :
print(colored(message, 'green'))
elif 'Error' in message :
print(colored(message, 'red'))
elif 'Fatal' in message :
print(colored(message, 'red', 'white'))
else:
print(message)
def appendMessageToBuffer(message):
markerStack.append(message)
if len(markerStack) > MAX_ELEMENTS_IN_QUEUE:
markerStack.popleft()
def updateView():
for marker in reversed(markerStack):
colorMessage(marker)
class UdpListener():
def __init__(self):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.sock.bind(('127.0.0.1', 4242))
self.clients_list = []
def listen(self):
while True:
msg = self.sock.recv(4096)
appendMessageToBuffer(msg)
updateView()
def start_listening(self):
t = threading.Thread(target=self.listen)
t.start()
if __name__ == "__main__":
print 'call'
colorama.init()
listener = UdpListener()
listener.start_listening() | 2 | 0.036364 | 2 | 0 |
2cb03ff8c3d21f36b95103eaf9ae0fb3e43077bd | pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py | pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py | from django import template
from django.contrib.messages.utils import get_level_tags
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix
along with any tags included in message.extra_tags
Messages in Django >= 1.7 have a message.level_tag attr
"""
level_tag = LEVEL_TAGS[message.level]
if level_tag == u"error":
level_tag = u"danger"
alert_level_tag = u"alert-{tag}".format(tag=level_tag)
tags = [alert_level_tag]
if message.extra_tags:
tags.append(message.extra_tags)
return u" ".join(tags)
| from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix
along with any tags included in message.extra_tags
Messages in Django >= 1.7 have a message.level_tag attr
"""
level_tag = force_text(LEVEL_TAGS.get(message.level, ''), strings_only=True)
if level_tag == u"error":
level_tag = u"danger"
alert_level_tag = u"alert-{tag}".format(tag=level_tag)
tags = [alert_level_tag]
extra_tags = force_text(message.extra_tags, strings_only=True)
if extra_tags:
tags.append(extra_tags)
return u" ".join(tags)
| Allow for lazy translation of message tags | Allow for lazy translation of message tags
| Python | mit | foraliving/foraliving,druss16/danslist,grahamu/pinax-theme-bootstrap,foraliving/foraliving,grahamu/pinax-theme-bootstrap,druss16/danslist,jacobwegner/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,druss16/danslist,grahamu/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap,foraliving/foraliving | python | ## Code Before:
from django import template
from django.contrib.messages.utils import get_level_tags
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix
along with any tags included in message.extra_tags
Messages in Django >= 1.7 have a message.level_tag attr
"""
level_tag = LEVEL_TAGS[message.level]
if level_tag == u"error":
level_tag = u"danger"
alert_level_tag = u"alert-{tag}".format(tag=level_tag)
tags = [alert_level_tag]
if message.extra_tags:
tags.append(message.extra_tags)
return u" ".join(tags)
## Instruction:
Allow for lazy translation of message tags
## Code After:
from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix
along with any tags included in message.extra_tags
Messages in Django >= 1.7 have a message.level_tag attr
"""
level_tag = force_text(LEVEL_TAGS.get(message.level, ''), strings_only=True)
if level_tag == u"error":
level_tag = u"danger"
alert_level_tag = u"alert-{tag}".format(tag=level_tag)
tags = [alert_level_tag]
extra_tags = force_text(message.extra_tags, strings_only=True)
if extra_tags:
tags.append(extra_tags)
return u" ".join(tags)
| from django import template
from django.contrib.messages.utils import get_level_tags
+ from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "alert-" prefix
along with any tags included in message.extra_tags
Messages in Django >= 1.7 have a message.level_tag attr
"""
- level_tag = LEVEL_TAGS[message.level]
+ level_tag = force_text(LEVEL_TAGS.get(message.level, ''), strings_only=True)
if level_tag == u"error":
level_tag = u"danger"
alert_level_tag = u"alert-{tag}".format(tag=level_tag)
tags = [alert_level_tag]
+ extra_tags = force_text(message.extra_tags, strings_only=True)
- if message.extra_tags:
? --------
+ if extra_tags:
- tags.append(message.extra_tags)
? --------
+ tags.append(extra_tags)
return u" ".join(tags) | 8 | 0.285714 | 5 | 3 |
6b88ed3466226fdb56dbb0be3f1fa9916b288f4b | requiregems.rb | requiregems.rb | begin
require 'cinch'
rescue LoadError
puts "You're missing the gem `cinch`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install cinch`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the cinch gem'
exit
end
end
begin
require 'RestClient'
rescue LoadError
puts "You're missing the gem `rest-client`. Would you like to install this now? (y/n)"
input = gets
if input == 'y'
eval `gem install rest-client`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the rest-client gem'
exit
end
end
require 'json'
require 'net/http'
require 'yaml'
begin
require 'Nokogiri'
rescue LoadError
puts "You're missing the gem `nokogiri`. Would you like to install this now? (y/n)"
input = gets
if input == 'y'
eval `gem install nokogiri`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the nokogiri gem'
exit
end
end
require 'open-uri'
| begin
require 'cinch'
rescue LoadError
puts "You're missing the gem `cinch`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install cinch`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the cinch gem'
exit
end
end
begin
require 'RestClient'
rescue LoadError
puts "You're missing the gem `rest-client`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install rest-client`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the rest-client gem'
exit
end
end
require 'json'
require 'net/http'
require 'yaml'
begin
require 'Nokogiri'
rescue LoadError
puts "You're missing the gem `nokogiri`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install nokogiri`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the nokogiri gem'
exit
end
end
require 'open-uri'
| Fix require gems not working (maybe?) | Fix require gems not working (maybe?)
| Ruby | mit | Chewbotcca/IRC,Chewbotcca/IRC | ruby | ## Code Before:
begin
require 'cinch'
rescue LoadError
puts "You're missing the gem `cinch`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install cinch`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the cinch gem'
exit
end
end
begin
require 'RestClient'
rescue LoadError
puts "You're missing the gem `rest-client`. Would you like to install this now? (y/n)"
input = gets
if input == 'y'
eval `gem install rest-client`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the rest-client gem'
exit
end
end
require 'json'
require 'net/http'
require 'yaml'
begin
require 'Nokogiri'
rescue LoadError
puts "You're missing the gem `nokogiri`. Would you like to install this now? (y/n)"
input = gets
if input == 'y'
eval `gem install nokogiri`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the nokogiri gem'
exit
end
end
require 'open-uri'
## Instruction:
Fix require gems not working (maybe?)
## Code After:
begin
require 'cinch'
rescue LoadError
puts "You're missing the gem `cinch`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install cinch`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the cinch gem'
exit
end
end
begin
require 'RestClient'
rescue LoadError
puts "You're missing the gem `rest-client`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install rest-client`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the rest-client gem'
exit
end
end
require 'json'
require 'net/http'
require 'yaml'
begin
require 'Nokogiri'
rescue LoadError
puts "You're missing the gem `nokogiri`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install nokogiri`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the nokogiri gem'
exit
end
end
require 'open-uri'
| begin
require 'cinch'
rescue LoadError
puts "You're missing the gem `cinch`. Would you like to install this now? (y/n)"
input = gets.chomp
if input == 'y'
`gem install cinch`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the cinch gem'
exit
end
end
begin
require 'RestClient'
rescue LoadError
puts "You're missing the gem `rest-client`. Would you like to install this now? (y/n)"
- input = gets
+ input = gets.chomp
? ++++++
if input == 'y'
- eval `gem install rest-client`
? -----
+ `gem install rest-client`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the rest-client gem'
exit
end
end
require 'json'
require 'net/http'
require 'yaml'
begin
require 'Nokogiri'
rescue LoadError
puts "You're missing the gem `nokogiri`. Would you like to install this now? (y/n)"
- input = gets
+ input = gets.chomp
? ++++++
if input == 'y'
- eval `gem install nokogiri`
? -----
+ `gem install nokogiri`
puts 'Gem installed! Continuing..'
else
puts 'To continue, install the nokogiri gem'
exit
end
end
require 'open-uri' | 8 | 0.186047 | 4 | 4 |
588a552ce9750a70f0c80ed574c139f563d5ffcc | optimize/index.js | optimize/index.js | var eng = require('./node/engine');
var index = module.exports = {
localMinimize: function(func, options, callback) {
eng.runPython('local', func, options, callback);
},
globalMinimize: function(func, options, callback) {
eng.runPython('global', func, options, callback);
},
nonNegLeastSquares: function(A, b, callback) {
eng.runPython('nnls', A, b, callback);
},
fitCurve: function(func, xData, yData, options, callback) {
eng.runPython('fit', func, options, callback, xData, yData);
},
findRoot: function(func, lower, upper, options, callback) {
eng.runPython('root', func, options, callback, lower, upper);
}
};
index.fitCurve.linear = function(xData, yData, callback) {
eng.runPython('fit', 'a * x + b', { variables: ['x', 'a', 'b'] }, callback, xData, yData);
};
index.fitCurve.quadratic = function(xData, yData, callback) {
eng.runPython('fit', 'a * (x**2) + b * x + c', { variables: ['x', 'a', 'b', 'c'] }, callback, xData, yData);
};
| var eng = require('./node/engine');
var index = module.exports = {
localMinimize: function(func, options, callback) {
eng.runPython('local', func, options, callback);
},
globalMinimize: function(func, options, callback) {
eng.runPython('global', func, options, callback);
},
minimizeEuclideanNorm: function(A, b, callback) {
eng.runPython('nnls', A, b, callback);
},
fitCurve: function(func, xData, yData, options, callback) {
eng.runPython('fit', func, options, callback, xData, yData);
},
findRoot: function(func, lower, upper, options, callback) {
eng.runPython('root', func, options, callback, lower, upper);
},
findVectorRoot: function(func, guess, options, callback) {
eng.runPython('vectorRoot', func, options, callback, guess);
},
calcDerivatives: function(func, point, options, callback) {
eng.runPython('derivative', func, options, callback, point);
}
};
index.fitCurve.linear = function(xData, yData, callback) {
eng.runPython('fit', 'a * x + b', { variables: ['x', 'a', 'b'] }, callback, xData, yData);
};
index.fitCurve.quadratic = function(xData, yData, callback) {
eng.runPython('fit', 'a * (x**2) + b * x + c', { variables: ['x', 'a', 'b', 'c'] }, callback, xData, yData);
};
| Add API for derivative, vector root | Add API for derivative, vector root
| JavaScript | mit | acjones617/scipy-node,acjones617/scipy-node | javascript | ## Code Before:
var eng = require('./node/engine');
var index = module.exports = {
localMinimize: function(func, options, callback) {
eng.runPython('local', func, options, callback);
},
globalMinimize: function(func, options, callback) {
eng.runPython('global', func, options, callback);
},
nonNegLeastSquares: function(A, b, callback) {
eng.runPython('nnls', A, b, callback);
},
fitCurve: function(func, xData, yData, options, callback) {
eng.runPython('fit', func, options, callback, xData, yData);
},
findRoot: function(func, lower, upper, options, callback) {
eng.runPython('root', func, options, callback, lower, upper);
}
};
index.fitCurve.linear = function(xData, yData, callback) {
eng.runPython('fit', 'a * x + b', { variables: ['x', 'a', 'b'] }, callback, xData, yData);
};
index.fitCurve.quadratic = function(xData, yData, callback) {
eng.runPython('fit', 'a * (x**2) + b * x + c', { variables: ['x', 'a', 'b', 'c'] }, callback, xData, yData);
};
## Instruction:
Add API for derivative, vector root
## Code After:
var eng = require('./node/engine');
var index = module.exports = {
localMinimize: function(func, options, callback) {
eng.runPython('local', func, options, callback);
},
globalMinimize: function(func, options, callback) {
eng.runPython('global', func, options, callback);
},
minimizeEuclideanNorm: function(A, b, callback) {
eng.runPython('nnls', A, b, callback);
},
fitCurve: function(func, xData, yData, options, callback) {
eng.runPython('fit', func, options, callback, xData, yData);
},
findRoot: function(func, lower, upper, options, callback) {
eng.runPython('root', func, options, callback, lower, upper);
},
findVectorRoot: function(func, guess, options, callback) {
eng.runPython('vectorRoot', func, options, callback, guess);
},
calcDerivatives: function(func, point, options, callback) {
eng.runPython('derivative', func, options, callback, point);
}
};
index.fitCurve.linear = function(xData, yData, callback) {
eng.runPython('fit', 'a * x + b', { variables: ['x', 'a', 'b'] }, callback, xData, yData);
};
index.fitCurve.quadratic = function(xData, yData, callback) {
eng.runPython('fit', 'a * (x**2) + b * x + c', { variables: ['x', 'a', 'b', 'c'] }, callback, xData, yData);
};
| var eng = require('./node/engine');
var index = module.exports = {
localMinimize: function(func, options, callback) {
eng.runPython('local', func, options, callback);
},
globalMinimize: function(func, options, callback) {
eng.runPython('global', func, options, callback);
},
- nonNegLeastSquares: function(A, b, callback) {
+ minimizeEuclideanNorm: function(A, b, callback) {
eng.runPython('nnls', A, b, callback);
},
fitCurve: function(func, xData, yData, options, callback) {
eng.runPython('fit', func, options, callback, xData, yData);
},
findRoot: function(func, lower, upper, options, callback) {
eng.runPython('root', func, options, callback, lower, upper);
+ },
+ findVectorRoot: function(func, guess, options, callback) {
+ eng.runPython('vectorRoot', func, options, callback, guess);
+ },
+ calcDerivatives: function(func, point, options, callback) {
+ eng.runPython('derivative', func, options, callback, point);
}
};
index.fitCurve.linear = function(xData, yData, callback) {
eng.runPython('fit', 'a * x + b', { variables: ['x', 'a', 'b'] }, callback, xData, yData);
};
index.fitCurve.quadratic = function(xData, yData, callback) {
eng.runPython('fit', 'a * (x**2) + b * x + c', { variables: ['x', 'a', 'b', 'c'] }, callback, xData, yData);
}; | 8 | 0.296296 | 7 | 1 |
6dca408ee648031671ca97f3e655f581938f32d8 | metadata.rb | metadata.rb | name "bacula-ng"
maintainer "Maciej Pasternacki"
maintainer_email "maciej@3ofcoins.net"
license 'MIT'
description "Bacula"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends 'apache2'
depends 'chef-solo-search'
depends 'database'
depends 'iptables'
depends 'mysql'
depends 'openssl'
depends 'php'
depends 'postgresql'
| name "bacula-ng"
maintainer "Maciej Pasternacki"
maintainer_email "maciej@3ofcoins.net"
license 'MIT'
description "Bacula"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends 'apache2'
depends 'database'
depends 'iptables'
depends 'mysql'
depends 'openssl'
depends 'php'
depends 'postgresql'
| Drop chef-solo-search from direct dependencies | Drop chef-solo-search from direct dependencies
| Ruby | mit | 3ofcoins/chef-cookbook-bacula-ng,3ofcoins/chef-cookbook-bacula-ng,3ofcoins/chef-cookbook-bacula-ng | ruby | ## Code Before:
name "bacula-ng"
maintainer "Maciej Pasternacki"
maintainer_email "maciej@3ofcoins.net"
license 'MIT'
description "Bacula"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends 'apache2'
depends 'chef-solo-search'
depends 'database'
depends 'iptables'
depends 'mysql'
depends 'openssl'
depends 'php'
depends 'postgresql'
## Instruction:
Drop chef-solo-search from direct dependencies
## Code After:
name "bacula-ng"
maintainer "Maciej Pasternacki"
maintainer_email "maciej@3ofcoins.net"
license 'MIT'
description "Bacula"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends 'apache2'
depends 'database'
depends 'iptables'
depends 'mysql'
depends 'openssl'
depends 'php'
depends 'postgresql'
| name "bacula-ng"
maintainer "Maciej Pasternacki"
maintainer_email "maciej@3ofcoins.net"
license 'MIT'
description "Bacula"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.2.0'
depends 'apache2'
- depends 'chef-solo-search'
depends 'database'
depends 'iptables'
depends 'mysql'
depends 'openssl'
depends 'php'
depends 'postgresql' | 1 | 0.0625 | 0 | 1 |
a7c33752a7de5af20f21a06fb011918afa241b6e | ide/tool/drone_io.sh | ide/tool/drone_io.sh | if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
sudo start xvfb
export HAS_DARTIUM=true
fi
# Display installed versions.
dart --version
/usr/bin/google-chrome --version
# Get our packages.
pub get
# Build the archive.
if test \( x$DRONE_REPO_SLUG = xgithub.com/dart-lang/spark -a x$DRONE_BRANCH = xmaster \) \
-o x$FORCE_NIGHTLY = xyes ; then
./grind release-nightly
else
./grind archive
fi
./grind mode-test
# Run tests the Dart version of the app.
if [ "$HAS_DARTIUM" = "true" ]; then
dart tool/test_runner.dart --dartium
fi
# Run tests on the dart2js version of the app.
if [ "$DRONE" = "true" ]; then
# TODO: For now, dartium is a stand-in for chrome on drone.io.
# TODO(devoncarew): disable dart2js tests on drone...
# https://github.com/dart-lang/spark/issues/2054
#dart tool/test_runner.dart --dartium --appPath=build/deploy-out/web
echo "testing of JavaScript version temporarily disabled (#2054)"
else
dart tool/test_runner.dart --chrome
fi
| if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
curl -O https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
sudo dpkg -i google-chrome-unstable_current_amd64.deb
sudo start xvfb
export HAS_DARTIUM=true
fi
# Display installed versions.
dart --version
/usr/bin/google-chrome --version
# Get our packages.
pub get
# Build the archive.
if test \( x$DRONE_REPO_SLUG = xgithub.com/dart-lang/spark -a x$DRONE_BRANCH = xmaster \) \
-o x$FORCE_NIGHTLY = xyes ; then
./grind release-nightly
else
./grind archive
fi
./grind mode-test
# Run tests the Dart version of the app.
if [ "$HAS_DARTIUM" = "true" ]; then
dart tool/test_runner.dart --dartium
fi
# Run tests on the dart2js version of the app.
if [ "$DRONE" = "true" ]; then
dart tool/test_runner.dart --chrome-dev --appPath=build/deploy-out/web
else
dart tool/test_runner.dart --chrome
fi
| Install chrome dev and test with chrome dev | Install chrome dev and test with chrome dev
| Shell | bsd-3-clause | b0dh1sattva/chromedeveditor,yikaraman/chromedeveditor,yikaraman/chromedeveditor,ussuri/chromedeveditor,2947721120/choredev,yikaraman/chromedeveditor,beaufortfrancois/chromedeveditor,ussuri/chromedeveditor,b0dh1sattva/chromedeveditor,googlearchive/chromedeveditor,valmzetvn/chromedeveditor,vivalaralstin/chromedeveditor,2947721120/chromedeveditor,hxddh/chromedeveditor,2947721120/chromedeveditor,devoncarew/spark,vivalaralstin/chromedeveditor,googlearchive/chromedeveditor,modulexcite/chromedeveditor,yikaraman/chromedeveditor,hxddh/chromedeveditor,2947721120/chromedeveditor,b0dh1sattva/chromedeveditor,hxddh/chromedeveditor,b0dh1sattva/chromedeveditor,devoncarew/spark,modulexcite/chromedeveditor,valmzetvn/chromedeveditor,2947721120/chromedeveditor,2947721120/chromedeveditor,ussuri/chromedeveditor,hxddh/chromedeveditor,devoncarew/spark,modulexcite/chromedeveditor,2947721120/chromedeveditor,ussuri/chromedeveditor,valmzetvn/chromedeveditor,b0dh1sattva/chromedeveditor,2947721120/chromedeveditor,2947721120/choredev,modulexcite/chromedeveditor,googlearchive/chromedeveditor,modulexcite/chromedeveditor,beaufortfrancois/chromedeveditor,vivalaralstin/chromedeveditor,valmzetvn/chromedeveditor,beaufortfrancois/chromedeveditor,2947721120/choredev,vivalaralstin/chromedeveditor,ussuri/chromedeveditor,devoncarew/spark,devoncarew/spark,valmzetvn/chromedeveditor,2947721120/choredev,modulexcite/chromedeveditor,beaufortfrancois/chromedeveditor,yikaraman/chromedeveditor,devoncarew/spark,valmzetvn/chromedeveditor,2947721120/choredev,ussuri/chromedeveditor,yikaraman/chromedeveditor,b0dh1sattva/chromedeveditor,2947721120/choredev,valmzetvn/chromedeveditor,vivalaralstin/chromedeveditor,b0dh1sattva/chromedeveditor,googlearchive/chromedeveditor,googlearchive/chromedeveditor,googlearchive/chromedeveditor,vivalaralstin/chromedeveditor,beaufortfrancois/chromedeveditor,hxddh/chromedeveditor,yikaraman/chromedeveditor,vivalaralstin/chromedeveditor,beaufortfrancois/chromedeveditor,googlearchive/chromedeveditor,2947721120/choredev,hxddh/chromedeveditor,beaufortfrancois/chromedeveditor,modulexcite/chromedeveditor,hxddh/chromedeveditor,ussuri/chromedeveditor | shell | ## Code Before:
if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
sudo start xvfb
export HAS_DARTIUM=true
fi
# Display installed versions.
dart --version
/usr/bin/google-chrome --version
# Get our packages.
pub get
# Build the archive.
if test \( x$DRONE_REPO_SLUG = xgithub.com/dart-lang/spark -a x$DRONE_BRANCH = xmaster \) \
-o x$FORCE_NIGHTLY = xyes ; then
./grind release-nightly
else
./grind archive
fi
./grind mode-test
# Run tests the Dart version of the app.
if [ "$HAS_DARTIUM" = "true" ]; then
dart tool/test_runner.dart --dartium
fi
# Run tests on the dart2js version of the app.
if [ "$DRONE" = "true" ]; then
# TODO: For now, dartium is a stand-in for chrome on drone.io.
# TODO(devoncarew): disable dart2js tests on drone...
# https://github.com/dart-lang/spark/issues/2054
#dart tool/test_runner.dart --dartium --appPath=build/deploy-out/web
echo "testing of JavaScript version temporarily disabled (#2054)"
else
dart tool/test_runner.dart --chrome
fi
## Instruction:
Install chrome dev and test with chrome dev
## Code After:
if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
curl -O https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
sudo dpkg -i google-chrome-unstable_current_amd64.deb
sudo start xvfb
export HAS_DARTIUM=true
fi
# Display installed versions.
dart --version
/usr/bin/google-chrome --version
# Get our packages.
pub get
# Build the archive.
if test \( x$DRONE_REPO_SLUG = xgithub.com/dart-lang/spark -a x$DRONE_BRANCH = xmaster \) \
-o x$FORCE_NIGHTLY = xyes ; then
./grind release-nightly
else
./grind archive
fi
./grind mode-test
# Run tests the Dart version of the app.
if [ "$HAS_DARTIUM" = "true" ]; then
dart tool/test_runner.dart --dartium
fi
# Run tests on the dart2js version of the app.
if [ "$DRONE" = "true" ]; then
dart tool/test_runner.dart --chrome-dev --appPath=build/deploy-out/web
else
dart tool/test_runner.dart --chrome
fi
| if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
+ curl -O https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
+ sudo dpkg -i google-chrome-unstable_current_amd64.deb
sudo start xvfb
export HAS_DARTIUM=true
fi
# Display installed versions.
dart --version
/usr/bin/google-chrome --version
# Get our packages.
pub get
# Build the archive.
if test \( x$DRONE_REPO_SLUG = xgithub.com/dart-lang/spark -a x$DRONE_BRANCH = xmaster \) \
-o x$FORCE_NIGHTLY = xyes ; then
./grind release-nightly
else
./grind archive
fi
./grind mode-test
# Run tests the Dart version of the app.
if [ "$HAS_DARTIUM" = "true" ]; then
dart tool/test_runner.dart --dartium
fi
# Run tests on the dart2js version of the app.
if [ "$DRONE" = "true" ]; then
- # TODO: For now, dartium is a stand-in for chrome on drone.io.
- # TODO(devoncarew): disable dart2js tests on drone...
- # https://github.com/dart-lang/spark/issues/2054
- #dart tool/test_runner.dart --dartium --appPath=build/deploy-out/web
? - ^^^^^^
+ dart tool/test_runner.dart --chrome-dev --appPath=build/deploy-out/web
? +++++++ ^^
- echo "testing of JavaScript version temporarily disabled (#2054)"
else
dart tool/test_runner.dart --chrome
fi | 8 | 0.210526 | 3 | 5 |
591d2658cb82c9f0fa1b37c90b9bc9046f24868a | tinylog-core-base/src/main/java/org/tinylog/core/backend/LoggingBackendBuilder.java | tinylog-core-base/src/main/java/org/tinylog/core/backend/LoggingBackendBuilder.java | package org.tinylog.core.backend;
import org.tinylog.core.Framework;
/**
* Builder for creating {@link LoggingBackend LoggingBackends}.
*
* <p>
* This interface must be implemented by all logging backends and provided as
* {@link java.util.ServiceLoader service} in {@code META-INF/services}.
* </p>
*/
public interface LoggingBackendBuilder {
/**
* Gets the name of the logging backend, which can be used to address the logging backend in a configuration.
*
* <p>
* The name must start with a lower case ASCII letter [a-z] and end with a lower case ASCII letter [a-z] or
* digit [0-9]. Within the name, lower case letters [a-z], numbers [0-9], spaces [ ], and hyphens [-] are
* allowed.
* </p>
*
* @return The name of the logging backend
*/
String getName();
/**
* Creates a new instance of the logging backend.
*
* @param framework Configuration and hooks
* @return New instance of the logging backend
*/
LoggingBackend create(Framework framework);
}
| package org.tinylog.core.backend;
import org.tinylog.core.Framework;
/**
* Builder for creating {@link LoggingBackend LoggingBackends}.
*
* <p>
* This interface must be implemented by all logging backends and provided as
* {@link java.util.ServiceLoader service} in {@code META-INF/services}.
* </p>
*/
public interface LoggingBackendBuilder {
/**
* Gets the name of the logging backend, which can be used to address the logging backend in a configuration.
*
* <p>
* The name must start with a lower case ASCII letter [a-z] and end with a lower case ASCII letter [a-z] or
* digit [0-9]. Within the name, lower case letters [a-z], numbers [0-9], spaces [ ], and hyphens [-] are
* allowed.
* </p>
*
* @return The name of the logging backend
*/
String getName();
/**
* Creates a new instance of the logging backend.
*
* @param framework The actual logging framework instance
* @return New instance of the logging backend
*/
LoggingBackend create(Framework framework);
}
| Use the standard Javadoc description for framework parameters | Use the standard Javadoc description for framework parameters
| Java | apache-2.0 | pmwmedia/tinylog,pmwmedia/tinylog | java | ## Code Before:
package org.tinylog.core.backend;
import org.tinylog.core.Framework;
/**
* Builder for creating {@link LoggingBackend LoggingBackends}.
*
* <p>
* This interface must be implemented by all logging backends and provided as
* {@link java.util.ServiceLoader service} in {@code META-INF/services}.
* </p>
*/
public interface LoggingBackendBuilder {
/**
* Gets the name of the logging backend, which can be used to address the logging backend in a configuration.
*
* <p>
* The name must start with a lower case ASCII letter [a-z] and end with a lower case ASCII letter [a-z] or
* digit [0-9]. Within the name, lower case letters [a-z], numbers [0-9], spaces [ ], and hyphens [-] are
* allowed.
* </p>
*
* @return The name of the logging backend
*/
String getName();
/**
* Creates a new instance of the logging backend.
*
* @param framework Configuration and hooks
* @return New instance of the logging backend
*/
LoggingBackend create(Framework framework);
}
## Instruction:
Use the standard Javadoc description for framework parameters
## Code After:
package org.tinylog.core.backend;
import org.tinylog.core.Framework;
/**
* Builder for creating {@link LoggingBackend LoggingBackends}.
*
* <p>
* This interface must be implemented by all logging backends and provided as
* {@link java.util.ServiceLoader service} in {@code META-INF/services}.
* </p>
*/
public interface LoggingBackendBuilder {
/**
* Gets the name of the logging backend, which can be used to address the logging backend in a configuration.
*
* <p>
* The name must start with a lower case ASCII letter [a-z] and end with a lower case ASCII letter [a-z] or
* digit [0-9]. Within the name, lower case letters [a-z], numbers [0-9], spaces [ ], and hyphens [-] are
* allowed.
* </p>
*
* @return The name of the logging backend
*/
String getName();
/**
* Creates a new instance of the logging backend.
*
* @param framework The actual logging framework instance
* @return New instance of the logging backend
*/
LoggingBackend create(Framework framework);
}
| package org.tinylog.core.backend;
import org.tinylog.core.Framework;
/**
* Builder for creating {@link LoggingBackend LoggingBackends}.
*
* <p>
* This interface must be implemented by all logging backends and provided as
* {@link java.util.ServiceLoader service} in {@code META-INF/services}.
* </p>
*/
public interface LoggingBackendBuilder {
/**
* Gets the name of the logging backend, which can be used to address the logging backend in a configuration.
*
* <p>
* The name must start with a lower case ASCII letter [a-z] and end with a lower case ASCII letter [a-z] or
* digit [0-9]. Within the name, lower case letters [a-z], numbers [0-9], spaces [ ], and hyphens [-] are
* allowed.
* </p>
*
* @return The name of the logging backend
*/
String getName();
/**
* Creates a new instance of the logging backend.
*
- * @param framework Configuration and hooks
+ * @param framework The actual logging framework instance
* @return New instance of the logging backend
*/
LoggingBackend create(Framework framework);
} | 2 | 0.055556 | 1 | 1 |
280ff6b3d6de3e65f43ad4a643c5215464d23c24 | azure-pipelines.yml | azure-pipelines.yml |
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
LINUX_USE_VMS: $[ not(contains(variables['Build.SourceBranch'], '/pull/')) ]
stages:
- template: ci-templates/stages.yml
parameters:
poolSettings:
vmImage: 'Ubuntu 16.04'
displayPrefix: '(Azure Hosted)'
expectUseVMs: true
- template: ci-templates/stages.yml
parameters:
poolSettings:
name: 'Expansion'
displayPrefix: '(Expansion)'
expectUseVMs: false
|
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
# Force everything to use VMs if the expansion pool is disabled. Otherwise send PRs to the expansion pool and everything else to the hosted VMs
LINUX_USE_VMS: $[ or(not(variables['quarkus_expansion_enabled']), not(contains(variables['Build.SourceBranch'], '/pull/'))) ]
stages:
- template: ci-templates/stages.yml
parameters:
poolSettings:
vmImage: 'Ubuntu 16.04'
displayPrefix: '(Azure Hosted)'
expectUseVMs: true
- template: ci-templates/stages.yml
parameters:
poolSettings:
name: 'Expansion'
displayPrefix: '(Expansion)'
expectUseVMs: false
| Add a build property to allow disabling without source changes | Add a build property to allow disabling without source changes
| YAML | apache-2.0 | quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus | yaml | ## Code Before:
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
LINUX_USE_VMS: $[ not(contains(variables['Build.SourceBranch'], '/pull/')) ]
stages:
- template: ci-templates/stages.yml
parameters:
poolSettings:
vmImage: 'Ubuntu 16.04'
displayPrefix: '(Azure Hosted)'
expectUseVMs: true
- template: ci-templates/stages.yml
parameters:
poolSettings:
name: 'Expansion'
displayPrefix: '(Expansion)'
expectUseVMs: false
## Instruction:
Add a build property to allow disabling without source changes
## Code After:
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
# Force everything to use VMs if the expansion pool is disabled. Otherwise send PRs to the expansion pool and everything else to the hosted VMs
LINUX_USE_VMS: $[ or(not(variables['quarkus_expansion_enabled']), not(contains(variables['Build.SourceBranch'], '/pull/'))) ]
stages:
- template: ci-templates/stages.yml
parameters:
poolSettings:
vmImage: 'Ubuntu 16.04'
displayPrefix: '(Azure Hosted)'
expectUseVMs: true
- template: ci-templates/stages.yml
parameters:
poolSettings:
name: 'Expansion'
displayPrefix: '(Expansion)'
expectUseVMs: false
|
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
+ # Force everything to use VMs if the expansion pool is disabled. Otherwise send PRs to the expansion pool and everything else to the hosted VMs
- LINUX_USE_VMS: $[ not(contains(variables['Build.SourceBranch'], '/pull/')) ]
+ LINUX_USE_VMS: $[ or(not(variables['quarkus_expansion_enabled']), not(contains(variables['Build.SourceBranch'], '/pull/'))) ]
? ++++++++++++++++++++++++++++++++++++++++++++++++ +
stages:
- template: ci-templates/stages.yml
parameters:
poolSettings:
vmImage: 'Ubuntu 16.04'
displayPrefix: '(Azure Hosted)'
expectUseVMs: true
- template: ci-templates/stages.yml
parameters:
poolSettings:
name: 'Expansion'
displayPrefix: '(Expansion)'
expectUseVMs: false | 3 | 0.075 | 2 | 1 |
970095beeda0120df2572323097a25b2357a8e80 | test/e2e/member1-spec.js | test/e2e/member1-spec.js | describe('Member', function() {
it('should create a new member', function() {
browser.get('#/member-list');
$('.btn-primary').click();
element(by.model('item.name')).sendKeys('New member');
$('.btn-primary').click();
var idElement = element(by.model('item._id'));
expect(idElement.getAttribute('value')).toBeDefined();
idElement.getAttribute('value').then(function(value) {
console.log('value', value);
});
expect(element(by.binding('message')).getText()).toBe('Member created');
});
it('should update existing member', function() {
browser.get('#/member-list');
var list = element.all(by.repeater('item in list'));
list.get(0).findElement(by.css('a')).click();
// Get the name.
element(by.model('item.name')).getAttribute('value').then(function(name) {
return name + '_Updated';
}).then(function(updatedName) {
var field = element(by.model('item.name'));
field.clear();
field.sendKeys(updatedName);
});
$('.btn-primary').click();
expect(element(by.binding('message')).getText()).toBe('Member updated');
});
});
| describe('Member', function() {
it('should create a new member', function() {
// Navigate to list page.
browser.get('#/member-list');
// Click on the create button.
element(by.linkText('Create new')).click();
// Enter a name.
element(by.model('item.name')).sendKeys('New member');
// Save.
$('.btn-primary').click();
// Expect an id to be generated.
expect(element(by.model('item._id')).getAttribute('value')).toBeDefined();
// Expect a message to be shown.
expect(element(by.binding('message')).getText()).toBe('Member created');
// With a promise.
element(by.binding('message')).getText().then(function(text) {
console.log('The message is: ' + text);
});
});
});
| Add comments and remove second test | Add comments and remove second test
| JavaScript | mit | andresdominguez/protractor-meetup | javascript | ## Code Before:
describe('Member', function() {
it('should create a new member', function() {
browser.get('#/member-list');
$('.btn-primary').click();
element(by.model('item.name')).sendKeys('New member');
$('.btn-primary').click();
var idElement = element(by.model('item._id'));
expect(idElement.getAttribute('value')).toBeDefined();
idElement.getAttribute('value').then(function(value) {
console.log('value', value);
});
expect(element(by.binding('message')).getText()).toBe('Member created');
});
it('should update existing member', function() {
browser.get('#/member-list');
var list = element.all(by.repeater('item in list'));
list.get(0).findElement(by.css('a')).click();
// Get the name.
element(by.model('item.name')).getAttribute('value').then(function(name) {
return name + '_Updated';
}).then(function(updatedName) {
var field = element(by.model('item.name'));
field.clear();
field.sendKeys(updatedName);
});
$('.btn-primary').click();
expect(element(by.binding('message')).getText()).toBe('Member updated');
});
});
## Instruction:
Add comments and remove second test
## Code After:
describe('Member', function() {
it('should create a new member', function() {
// Navigate to list page.
browser.get('#/member-list');
// Click on the create button.
element(by.linkText('Create new')).click();
// Enter a name.
element(by.model('item.name')).sendKeys('New member');
// Save.
$('.btn-primary').click();
// Expect an id to be generated.
expect(element(by.model('item._id')).getAttribute('value')).toBeDefined();
// Expect a message to be shown.
expect(element(by.binding('message')).getText()).toBe('Member created');
// With a promise.
element(by.binding('message')).getText().then(function(text) {
console.log('The message is: ' + text);
});
});
});
| describe('Member', function() {
it('should create a new member', function() {
+ // Navigate to list page.
browser.get('#/member-list');
+ // Click on the create button.
+ element(by.linkText('Create new')).click();
+
+ // Enter a name.
+ element(by.model('item.name')).sendKeys('New member');
+
+ // Save.
$('.btn-primary').click();
- element(by.model('item.name')).sendKeys('New member');
+ // Expect an id to be generated.
+ expect(element(by.model('item._id')).getAttribute('value')).toBeDefined();
- $('.btn-primary').click();
+ // Expect a message to be shown.
+ expect(element(by.binding('message')).getText()).toBe('Member created');
+ // With a promise.
+ element(by.binding('message')).getText().then(function(text) {
+ console.log('The message is: ' + text);
- var idElement = element(by.model('item._id'));
- expect(idElement.getAttribute('value')).toBeDefined();
- idElement.getAttribute('value').then(function(value) {
- console.log('value', value);
});
- expect(element(by.binding('message')).getText()).toBe('Member created');
- });
-
- it('should update existing member', function() {
- browser.get('#/member-list');
-
- var list = element.all(by.repeater('item in list'));
- list.get(0).findElement(by.css('a')).click();
-
- // Get the name.
- element(by.model('item.name')).getAttribute('value').then(function(name) {
- return name + '_Updated';
- }).then(function(updatedName) {
- var field = element(by.model('item.name'));
- field.clear();
- field.sendKeys(updatedName);
- });
-
- $('.btn-primary').click();
-
- expect(element(by.binding('message')).getText()).toBe('Member updated');
});
}); | 42 | 1.105263 | 15 | 27 |
7d8026467e2da2cc87eaa1cd75e2bfbfe8370f0c | project.clj | project.clj | (defproject railway-oriented-programming "0.1.1"
:description "An implementation of railway oriented programming"
:url "https://github.com/HughPowell/railway-oriented-programming"
:license {:name "Mozilla Public License v2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha16"]]
:plugins [[update-readme "0.1.0"]]
:repositories [["releases" {:url "https://clojars.org/repo/"
:username :env
:password :env
:sign-releases false}]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
:monkeypatch-clojure-test false
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["update-readme"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["update-readme"]
["vcs" "commit"]
["vcs" "push"]])
| (defproject railway-oriented-programming "0.1.2-SNAPSHOT"
:description "An implementation of railway oriented programming"
:url "https://github.com/HughPowell/railway-oriented-programming"
:license {:name "Mozilla Public License v2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha16"]]
:plugins [[update-readme "0.1.0"]]
:repositories [["releases" {:url "https://clojars.org/repo/"
:username :env
:password :env
:sign-releases false}]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
:monkeypatch-clojure-test false
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["update-readme"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["update-readme"]
["vcs" "commit"]
["vcs" "push"]])
| Move version to next SNAPSHOT | Move version to next SNAPSHOT
| Clojure | mpl-2.0 | HughPowell/railway-oriented-programming | clojure | ## Code Before:
(defproject railway-oriented-programming "0.1.1"
:description "An implementation of railway oriented programming"
:url "https://github.com/HughPowell/railway-oriented-programming"
:license {:name "Mozilla Public License v2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha16"]]
:plugins [[update-readme "0.1.0"]]
:repositories [["releases" {:url "https://clojars.org/repo/"
:username :env
:password :env
:sign-releases false}]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
:monkeypatch-clojure-test false
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["update-readme"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["update-readme"]
["vcs" "commit"]
["vcs" "push"]])
## Instruction:
Move version to next SNAPSHOT
## Code After:
(defproject railway-oriented-programming "0.1.2-SNAPSHOT"
:description "An implementation of railway oriented programming"
:url "https://github.com/HughPowell/railway-oriented-programming"
:license {:name "Mozilla Public License v2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha16"]]
:plugins [[update-readme "0.1.0"]]
:repositories [["releases" {:url "https://clojars.org/repo/"
:username :env
:password :env
:sign-releases false}]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
:monkeypatch-clojure-test false
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["update-readme"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["update-readme"]
["vcs" "commit"]
["vcs" "push"]])
| - (defproject railway-oriented-programming "0.1.1"
? ^
+ (defproject railway-oriented-programming "0.1.2-SNAPSHOT"
? ^^^^^^^^^^
:description "An implementation of railway oriented programming"
:url "https://github.com/HughPowell/railway-oriented-programming"
:license {:name "Mozilla Public License v2.0"
:url "https://www.mozilla.org/en-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.9.0-alpha16"]]
:plugins [[update-readme "0.1.0"]]
:repositories [["releases" {:url "https://clojars.org/repo/"
:username :env
:password :env
:sign-releases false}]]
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
:monkeypatch-clojure-test false
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["update-readme"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["deploy"]
["change" "version" "leiningen.release/bump-version"]
["update-readme"]
["vcs" "commit"]
["vcs" "push"]]) | 2 | 0.086957 | 1 | 1 |
4642f29759a5c6eb735ec977651542a22954d576 | README.md | README.md |
Open Drug Discovery Toolkit (ODDT) is modular and comprehensive toolkit for use in cheminformatics, molecular modeling etc. ODDT is written in Python, and make extensive use of Numpy/Scipy
[](http://oddt.readthedocs.org/en/latest/)
### Requrements
* Python 2.7.X
* OpenBabel (2.3.2+) or/and RDKit (2012.03)
* Numpy (1.6.2+)
* Scipy (0.10+)
* Sklearn (0.11+)
* ffnet (0.7.1+) only for neural network functionality.
### Install
When all requirements are met, then installation process is simple
> python setup.py install
You can also use pip. All requirements besides toolkits (OpenBabel, RDKit) are installed if necessary.
Installing inside virtualenv is encouraged, but not necessary.
> pip install oddt
### Documentation
Automatic documentation for ODDT can be build
> cd docs
> make html
> make latexpdf
### License
ODDT is released under permissive [3-clause BSD license](./LICENSE)
[](https://github.com/igrigorik/ga-beacon)
|
Open Drug Discovery Toolkit (ODDT) is modular and comprehensive toolkit for use in cheminformatics, molecular modeling etc. ODDT is written in Python, and make extensive use of Numpy/Scipy
[](http://oddt.readthedocs.org/en/latest/)
### Requrements
* Python 2.7.X
* OpenBabel (2.3.2+) or/and RDKit (2012.03)
* Numpy (1.6.2+)
* Scipy (0.10+)
* Sklearn (0.11+)
* ffnet (0.7.1+) only for neural network functionality.
### Install
When all requirements are met, then installation process is simple
> python setup.py install
You can also use pip. All requirements besides toolkits (OpenBabel, RDKit) are installed if necessary.
Installing inside virtualenv is encouraged, but not necessary.
> pip install oddt
### Documentation
Automatic documentation for ODDT can be build
> cd docs
> make html
> make latexpdf
### License
ODDT is released under permissive [3-clause BSD license](./LICENSE)
[](https://github.com/igrigorik/ga-beacon)
| Correct link to G. Analytics | Correct link to G. Analytics | Markdown | bsd-3-clause | oddt/oddt,oddt/oddt,mkukielka/oddt,mkukielka/oddt | markdown | ## Code Before:
Open Drug Discovery Toolkit (ODDT) is modular and comprehensive toolkit for use in cheminformatics, molecular modeling etc. ODDT is written in Python, and make extensive use of Numpy/Scipy
[](http://oddt.readthedocs.org/en/latest/)
### Requrements
* Python 2.7.X
* OpenBabel (2.3.2+) or/and RDKit (2012.03)
* Numpy (1.6.2+)
* Scipy (0.10+)
* Sklearn (0.11+)
* ffnet (0.7.1+) only for neural network functionality.
### Install
When all requirements are met, then installation process is simple
> python setup.py install
You can also use pip. All requirements besides toolkits (OpenBabel, RDKit) are installed if necessary.
Installing inside virtualenv is encouraged, but not necessary.
> pip install oddt
### Documentation
Automatic documentation for ODDT can be build
> cd docs
> make html
> make latexpdf
### License
ODDT is released under permissive [3-clause BSD license](./LICENSE)
[](https://github.com/igrigorik/ga-beacon)
## Instruction:
Correct link to G. Analytics
## Code After:
Open Drug Discovery Toolkit (ODDT) is modular and comprehensive toolkit for use in cheminformatics, molecular modeling etc. ODDT is written in Python, and make extensive use of Numpy/Scipy
[](http://oddt.readthedocs.org/en/latest/)
### Requrements
* Python 2.7.X
* OpenBabel (2.3.2+) or/and RDKit (2012.03)
* Numpy (1.6.2+)
* Scipy (0.10+)
* Sklearn (0.11+)
* ffnet (0.7.1+) only for neural network functionality.
### Install
When all requirements are met, then installation process is simple
> python setup.py install
You can also use pip. All requirements besides toolkits (OpenBabel, RDKit) are installed if necessary.
Installing inside virtualenv is encouraged, but not necessary.
> pip install oddt
### Documentation
Automatic documentation for ODDT can be build
> cd docs
> make html
> make latexpdf
### License
ODDT is released under permissive [3-clause BSD license](./LICENSE)
[](https://github.com/igrigorik/ga-beacon)
|
Open Drug Discovery Toolkit (ODDT) is modular and comprehensive toolkit for use in cheminformatics, molecular modeling etc. ODDT is written in Python, and make extensive use of Numpy/Scipy
[](http://oddt.readthedocs.org/en/latest/)
### Requrements
* Python 2.7.X
* OpenBabel (2.3.2+) or/and RDKit (2012.03)
* Numpy (1.6.2+)
* Scipy (0.10+)
* Sklearn (0.11+)
* ffnet (0.7.1+) only for neural network functionality.
### Install
When all requirements are met, then installation process is simple
> python setup.py install
You can also use pip. All requirements besides toolkits (OpenBabel, RDKit) are installed if necessary.
Installing inside virtualenv is encouraged, but not necessary.
> pip install oddt
### Documentation
Automatic documentation for ODDT can be build
> cd docs
> make html
> make latexpdf
### License
ODDT is released under permissive [3-clause BSD license](./LICENSE)
- [](https://github.com/igrigorik/ga-beacon)
? ^^^^^ ^ - ^^^^^^ ^^^^^^^^^^
+ [](https://github.com/igrigorik/ga-beacon)
? ^^^^^^^^ ^ ^^^^ ^^^
| 2 | 0.058824 | 1 | 1 |
69ea3ae14fba2cca826f4c40d2e4ed8914029560 | ghost/admin/app/utils/route.js | ghost/admin/app/utils/route.js | import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
Route.reopen({
config: service(),
billing: service(),
router: service(),
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.upgradeStatus.requireUpgrade();
return false;
} else if (this.config.get('hostSettings.forceUpgrade')) {
transition.abort();
// Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro');
return false;
} else {
return true;
}
}
}
});
| import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
Route.reopen({
config: service(),
billing: service(),
router: service(),
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.upgradeStatus.requireUpgrade();
return false;
} else if (this.config.get('hostSettings.forceUpgrade') && transition.to?.name !== 'signout') {
transition.abort();
// Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro');
return false;
} else {
return true;
}
}
}
});
| Allow signout in `forceUpgrade` state | Allow signout in `forceUpgrade` state
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | javascript | ## Code Before:
import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
Route.reopen({
config: service(),
billing: service(),
router: service(),
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.upgradeStatus.requireUpgrade();
return false;
} else if (this.config.get('hostSettings.forceUpgrade')) {
transition.abort();
// Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro');
return false;
} else {
return true;
}
}
}
});
## Instruction:
Allow signout in `forceUpgrade` state
## Code After:
import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
Route.reopen({
config: service(),
billing: service(),
router: service(),
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.upgradeStatus.requireUpgrade();
return false;
} else if (this.config.get('hostSettings.forceUpgrade') && transition.to?.name !== 'signout') {
transition.abort();
// Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro');
return false;
} else {
return true;
}
}
}
});
| import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
Route.reopen({
config: service(),
billing: service(),
router: service(),
actions: {
willTransition(transition) {
if (this.get('upgradeStatus.isRequired')) {
transition.abort();
this.upgradeStatus.requireUpgrade();
return false;
- } else if (this.config.get('hostSettings.forceUpgrade')) {
+ } else if (this.config.get('hostSettings.forceUpgrade') && transition.to?.name !== 'signout') {
? +++++++++++++++++++++++++++++++++++++
transition.abort();
// Catch and redirect every route in a force upgrade state
this.billing.openBillingWindow(this.router.currentURL, '/pro');
return false;
} else {
return true;
}
}
}
}); | 2 | 0.08 | 1 | 1 |
2a8e5f3fac93504993fda88d01e4e4667773a179 | utils/vagrant/bootstrap_root.sh | utils/vagrant/bootstrap_root.sh |
echo "Provisioning virtual machine..."
apt-get update
echo "Preparing MySQL"
apt-get install debconf-utils -y
# set default mysql root password
debconf-set-selections <<< "mysql-server mysql-server/root_password password 1234"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 1234"
echo "Installing MySQL"
apt-get install mysql-server libmysqlclient-dev -y
echo "Initiating MySQL Databases"
echo "CREATE DATABASE chris_dev CHARACTER SET utf8;GRANT ALL ON chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234'; GRANT ALL ON test_chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234';" | mysql -u root -p1234
echo "Installing Python"
apt-get install python3-dev -y
echo "Installing PIP"
apt-get install python-pip -y
echo "Upgrading PIP"
pip install --upgrade pip
echo "Installing Python Vitual Env"
pip install virtualenv virtualenvwrapper
|
echo "Provisioning virtual machine..."
apt-get update
echo "Preparing MySQL"
apt-get install debconf-utils -y
# set default mysql root password
debconf-set-selections <<< "mysql-server mysql-server/root_password password 1234"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 1234"
echo "Installing Apache2 - dev"
apt-get install apache2-dev -y
echo "Installing MySQL"
apt-get install mysql-server libmysqlclient-dev -y
echo "Initiating MySQL Databases"
echo "CREATE DATABASE chris_dev CHARACTER SET utf8;GRANT ALL ON chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234'; GRANT ALL ON test_chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234';" | mysql -u root -p1234
echo "Installing Python"
apt-get install python3-dev -y
echo "Installing PIP"
apt-get install python-pip -y
echo "Upgrading PIP"
pip install --upgrade pip
echo "Installing Python Vitual Env"
pip install virtualenv virtualenvwrapper
| Update Vagrant provision script for https | Update Vagrant provision script for https
| Shell | mit | FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd,FNNDSC/ChRIS_ultron_backEnd | shell | ## Code Before:
echo "Provisioning virtual machine..."
apt-get update
echo "Preparing MySQL"
apt-get install debconf-utils -y
# set default mysql root password
debconf-set-selections <<< "mysql-server mysql-server/root_password password 1234"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 1234"
echo "Installing MySQL"
apt-get install mysql-server libmysqlclient-dev -y
echo "Initiating MySQL Databases"
echo "CREATE DATABASE chris_dev CHARACTER SET utf8;GRANT ALL ON chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234'; GRANT ALL ON test_chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234';" | mysql -u root -p1234
echo "Installing Python"
apt-get install python3-dev -y
echo "Installing PIP"
apt-get install python-pip -y
echo "Upgrading PIP"
pip install --upgrade pip
echo "Installing Python Vitual Env"
pip install virtualenv virtualenvwrapper
## Instruction:
Update Vagrant provision script for https
## Code After:
echo "Provisioning virtual machine..."
apt-get update
echo "Preparing MySQL"
apt-get install debconf-utils -y
# set default mysql root password
debconf-set-selections <<< "mysql-server mysql-server/root_password password 1234"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 1234"
echo "Installing Apache2 - dev"
apt-get install apache2-dev -y
echo "Installing MySQL"
apt-get install mysql-server libmysqlclient-dev -y
echo "Initiating MySQL Databases"
echo "CREATE DATABASE chris_dev CHARACTER SET utf8;GRANT ALL ON chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234'; GRANT ALL ON test_chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234';" | mysql -u root -p1234
echo "Installing Python"
apt-get install python3-dev -y
echo "Installing PIP"
apt-get install python-pip -y
echo "Upgrading PIP"
pip install --upgrade pip
echo "Installing Python Vitual Env"
pip install virtualenv virtualenvwrapper
|
echo "Provisioning virtual machine..."
apt-get update
echo "Preparing MySQL"
apt-get install debconf-utils -y
# set default mysql root password
debconf-set-selections <<< "mysql-server mysql-server/root_password password 1234"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password 1234"
+
+ echo "Installing Apache2 - dev"
+ apt-get install apache2-dev -y
echo "Installing MySQL"
apt-get install mysql-server libmysqlclient-dev -y
echo "Initiating MySQL Databases"
echo "CREATE DATABASE chris_dev CHARACTER SET utf8;GRANT ALL ON chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234'; GRANT ALL ON test_chris_dev.* TO 'chris'@'localhost' IDENTIFIED BY 'Chris1234';" | mysql -u root -p1234
echo "Installing Python"
apt-get install python3-dev -y
echo "Installing PIP"
apt-get install python-pip -y
echo "Upgrading PIP"
pip install --upgrade pip
echo "Installing Python Vitual Env"
pip install virtualenv virtualenvwrapper | 3 | 0.103448 | 3 | 0 |
07016492150374b08c54e2a2519258e9f80f774d | Sources/Birthdays/BirthdaysManager.swift | Sources/Birthdays/BirthdaysManager.swift | // Created by dasdom on 13.04.20.
//
//
import Foundation
public class BirthdaysManager {
public private(set) var all: [Birthday]
public init() {
all = []
all = loadBirthdays()
}
public func add(_ birthday: Birthday) {
all.append(birthday)
save(birthdays: all)
}
public func birthdayCounts() -> [BirthdayCount] {
all.map { BirthdayCount(birthday: $0) }.sorted(by: { $0.remainingDays < $1.remainingDays })
}
}
public extension BirthdaysManager {
func save(birthdays: [Birthday]) {
do {
let data = try JSONEncoder().encode(birthdays)
try data.write(to: FileManager.default.birthdaysURL(), options: .atomic)
} catch {
print("error: \(error)")
}
}
func loadBirthdays() -> [Birthday] {
do {
let data = try Data(contentsOf: FileManager.default.birthdaysURL())
return try JSONDecoder().decode([Birthday].self, from: data)
} catch {
return []
}
}
}
| // Created by dasdom on 13.04.20.
//
//
import Foundation
public class BirthdaysManager {
public private(set) var all: [Birthday] {
didSet {
birthdayCounts = all
.map { BirthdayCount(birthday: $0) }
.sorted(by: { $0.remainingDays < $1.remainingDays })
}
}
public private(set) var birthdayCounts: [BirthdayCount]
public init() {
all = []
all = loadBirthdays()
birthdayCounts = all
.map { BirthdayCount(birthday: $0) }
.sorted(by: { $0.remainingDays < $1.remainingDays })
}
public func add(_ birthday: Birthday) {
all.append(birthday)
save(birthdays: all)
}
}
public extension BirthdaysManager {
func save(birthdays: [Birthday]) {
do {
let data = try JSONEncoder().encode(birthdays)
try data.write(to: FileManager.default.birthdaysURL(), options: .atomic)
} catch {
print("error: \(error)")
}
}
func loadBirthdays() -> [Birthday] {
do {
let data = try Data(contentsOf: FileManager.default.birthdaysURL())
return try JSONDecoder().decode([Birthday].self, from: data)
} catch {
return []
}
}
}
| Change birthdayCounts from method to property | Change birthdayCounts from method to property
| Swift | mit | dasdom/Birthdays | swift | ## Code Before:
// Created by dasdom on 13.04.20.
//
//
import Foundation
public class BirthdaysManager {
public private(set) var all: [Birthday]
public init() {
all = []
all = loadBirthdays()
}
public func add(_ birthday: Birthday) {
all.append(birthday)
save(birthdays: all)
}
public func birthdayCounts() -> [BirthdayCount] {
all.map { BirthdayCount(birthday: $0) }.sorted(by: { $0.remainingDays < $1.remainingDays })
}
}
public extension BirthdaysManager {
func save(birthdays: [Birthday]) {
do {
let data = try JSONEncoder().encode(birthdays)
try data.write(to: FileManager.default.birthdaysURL(), options: .atomic)
} catch {
print("error: \(error)")
}
}
func loadBirthdays() -> [Birthday] {
do {
let data = try Data(contentsOf: FileManager.default.birthdaysURL())
return try JSONDecoder().decode([Birthday].self, from: data)
} catch {
return []
}
}
}
## Instruction:
Change birthdayCounts from method to property
## Code After:
// Created by dasdom on 13.04.20.
//
//
import Foundation
public class BirthdaysManager {
public private(set) var all: [Birthday] {
didSet {
birthdayCounts = all
.map { BirthdayCount(birthday: $0) }
.sorted(by: { $0.remainingDays < $1.remainingDays })
}
}
public private(set) var birthdayCounts: [BirthdayCount]
public init() {
all = []
all = loadBirthdays()
birthdayCounts = all
.map { BirthdayCount(birthday: $0) }
.sorted(by: { $0.remainingDays < $1.remainingDays })
}
public func add(_ birthday: Birthday) {
all.append(birthday)
save(birthdays: all)
}
}
public extension BirthdaysManager {
func save(birthdays: [Birthday]) {
do {
let data = try JSONEncoder().encode(birthdays)
try data.write(to: FileManager.default.birthdaysURL(), options: .atomic)
} catch {
print("error: \(error)")
}
}
func loadBirthdays() -> [Birthday] {
do {
let data = try Data(contentsOf: FileManager.default.birthdaysURL())
return try JSONDecoder().decode([Birthday].self, from: data)
} catch {
return []
}
}
}
| // Created by dasdom on 13.04.20.
//
//
import Foundation
public class BirthdaysManager {
- public private(set) var all: [Birthday]
+ public private(set) var all: [Birthday] {
? ++
+ didSet {
+ birthdayCounts = all
+ .map { BirthdayCount(birthday: $0) }
+ .sorted(by: { $0.remainingDays < $1.remainingDays })
+ }
+ }
+ public private(set) var birthdayCounts: [BirthdayCount]
public init() {
all = []
all = loadBirthdays()
+
+ birthdayCounts = all
+ .map { BirthdayCount(birthday: $0) }
+ .sorted(by: { $0.remainingDays < $1.remainingDays })
}
public func add(_ birthday: Birthday) {
all.append(birthday)
save(birthdays: all)
- }
-
- public func birthdayCounts() -> [BirthdayCount] {
- all.map { BirthdayCount(birthday: $0) }.sorted(by: { $0.remainingDays < $1.remainingDays })
}
}
public extension BirthdaysManager {
func save(birthdays: [Birthday]) {
do {
let data = try JSONEncoder().encode(birthdays)
try data.write(to: FileManager.default.birthdaysURL(), options: .atomic)
} catch {
print("error: \(error)")
}
}
func loadBirthdays() -> [Birthday] {
do {
let data = try Data(contentsOf: FileManager.default.birthdaysURL())
return try JSONDecoder().decode([Birthday].self, from: data)
} catch {
return []
}
}
} | 17 | 0.395349 | 12 | 5 |
56deed3316cc670a3f1ef0df96d6b858b507ccf6 | lib/drug-bot/plugins/reddit.rb | lib/drug-bot/plugins/reddit.rb | require 'rss/1.0'
require 'rss/2.0'
require 'eventmachine'
class Reddit
def initialize(bot)
@bot = bot
unless File.exist?(@config = ENV["HOME"] + "/.drug-bot")
FileUtils.mkdir @config
end
unless File.exist? @config + "/last_update.yml"
db = YAML::dump Time.now
File.open(@config + "/last_update.yml", "w"){|f| f.write(db)}
end
@last_update = YAML::load File.open(@config + "/last_update.yml", "r").read
end
def call(connection, message)
if message[:command] == "JOIN" && message[:nick] == connection.options[:nick]
EventMachine::add_periodic_timer(30) do
c_http = EM::Protocols::HttpClient2.connect 'www.reddit.com', 80
http = c_http.get "/r/ruby/.rss"
http.callback {|response|
rss = RSS::Parser.parse(response.content, false)
rss.items.each do |item|
connection.msg(message[:channel], "#{item.title} | #{item.link}") if item.date > @last_update
end
save
}
end
end
end
def save
@last_update = Time.now
file = File.open(@config + "/last_update.yml", "w"){|f| f.write YAML::dump(@last_update)}
end
end
| require 'rss/1.0'
require 'rss/2.0'
require 'eventmachine'
class Reddit
def initialize(bot)
@bot = bot
unless File.exist?(@config = ENV["HOME"] + "/.drug-bot")
FileUtils.mkdir @config
end
unless File.exist? @config + "/last_update.yml"
db = YAML::dump Time.now
File.open(@config + "/last_update.yml", "w"){|f| f.write(db)}
end
@last_update = YAML::load File.open(@config + "/last_update.yml", "r").read
end
def call(connection, message)
if message[:command] == "JOIN" && message[:nick] == connection.options[:nick]
EventMachine::add_periodic_timer(30) do
@last_update = Time.now
c_http = EM::Protocols::HttpClient2.connect 'www.reddit.com', 80
http = c_http.get "/r/ruby/.rss"
http.callback {|response|
rss = RSS::Parser.parse(response.content, false)
rss.items.each do |item|
connection.msg(message[:channel], "#{item.title} | #{item.link}") if item.date > @last_update
end
save
}
end
end
end
def save
file = File.open(@config + "/last_update.yml", "w"){|f| f.write YAML::dump(@last_update)}
end
end
| Move last update before request | Move last update before request
| Ruby | mit | LTe/muzang | ruby | ## Code Before:
require 'rss/1.0'
require 'rss/2.0'
require 'eventmachine'
class Reddit
def initialize(bot)
@bot = bot
unless File.exist?(@config = ENV["HOME"] + "/.drug-bot")
FileUtils.mkdir @config
end
unless File.exist? @config + "/last_update.yml"
db = YAML::dump Time.now
File.open(@config + "/last_update.yml", "w"){|f| f.write(db)}
end
@last_update = YAML::load File.open(@config + "/last_update.yml", "r").read
end
def call(connection, message)
if message[:command] == "JOIN" && message[:nick] == connection.options[:nick]
EventMachine::add_periodic_timer(30) do
c_http = EM::Protocols::HttpClient2.connect 'www.reddit.com', 80
http = c_http.get "/r/ruby/.rss"
http.callback {|response|
rss = RSS::Parser.parse(response.content, false)
rss.items.each do |item|
connection.msg(message[:channel], "#{item.title} | #{item.link}") if item.date > @last_update
end
save
}
end
end
end
def save
@last_update = Time.now
file = File.open(@config + "/last_update.yml", "w"){|f| f.write YAML::dump(@last_update)}
end
end
## Instruction:
Move last update before request
## Code After:
require 'rss/1.0'
require 'rss/2.0'
require 'eventmachine'
class Reddit
def initialize(bot)
@bot = bot
unless File.exist?(@config = ENV["HOME"] + "/.drug-bot")
FileUtils.mkdir @config
end
unless File.exist? @config + "/last_update.yml"
db = YAML::dump Time.now
File.open(@config + "/last_update.yml", "w"){|f| f.write(db)}
end
@last_update = YAML::load File.open(@config + "/last_update.yml", "r").read
end
def call(connection, message)
if message[:command] == "JOIN" && message[:nick] == connection.options[:nick]
EventMachine::add_periodic_timer(30) do
@last_update = Time.now
c_http = EM::Protocols::HttpClient2.connect 'www.reddit.com', 80
http = c_http.get "/r/ruby/.rss"
http.callback {|response|
rss = RSS::Parser.parse(response.content, false)
rss.items.each do |item|
connection.msg(message[:channel], "#{item.title} | #{item.link}") if item.date > @last_update
end
save
}
end
end
end
def save
file = File.open(@config + "/last_update.yml", "w"){|f| f.write YAML::dump(@last_update)}
end
end
| require 'rss/1.0'
require 'rss/2.0'
require 'eventmachine'
class Reddit
def initialize(bot)
@bot = bot
unless File.exist?(@config = ENV["HOME"] + "/.drug-bot")
FileUtils.mkdir @config
end
unless File.exist? @config + "/last_update.yml"
db = YAML::dump Time.now
File.open(@config + "/last_update.yml", "w"){|f| f.write(db)}
end
@last_update = YAML::load File.open(@config + "/last_update.yml", "r").read
end
def call(connection, message)
if message[:command] == "JOIN" && message[:nick] == connection.options[:nick]
EventMachine::add_periodic_timer(30) do
+ @last_update = Time.now
c_http = EM::Protocols::HttpClient2.connect 'www.reddit.com', 80
http = c_http.get "/r/ruby/.rss"
http.callback {|response|
rss = RSS::Parser.parse(response.content, false)
rss.items.each do |item|
connection.msg(message[:channel], "#{item.title} | #{item.link}") if item.date > @last_update
end
save
}
end
end
end
def save
- @last_update = Time.now
file = File.open(@config + "/last_update.yml", "w"){|f| f.write YAML::dump(@last_update)}
end
end | 2 | 0.047619 | 1 | 1 |
9d975d9eba88748d6d9ace43cc3f8706648c30a5 | docs/source/installation/upgrade_legacy.rst | docs/source/installation/upgrade_legacy.rst | Upgrade Indico from 1.2
=======================
The migration tool (`indico-migrate <https://github.com/indico/indico-migrate>`_)
requires Python 2.7 and Indico 2.0. It is not supported by Indico v3 nor will it
work on Python 3.
If you still need to migrate a legacy instance from the 1.x (or older), please
consult the documentation from Indico v2. You may also want to consider running
the migration on a separate virtual machine in order to not clutter the server
that will run Indico v3 with legacy tools and software.
| Upgrade Indico from 1.2
=======================
The migration tool (`indico-migrate <https://github.com/indico/indico-migrate>`_)
requires Python 2.7 and Indico 2.0. It is not supported by Indico v3 nor will it
work on Python 3.
If you still need to migrate a legacy instance from the 1.x (or older), please
consult the `documentation from Indico v2 <https://docs.getindico.io/en/2.3.x/installation/upgrade_legacy/>`_.
You may also want to consider running the migration on a separate virtual machine
in order to not clutter the server that will run Indico v3 with legacy tools and software.
| Add link to v2 docs for 1.2 migration | Add link to v2 docs for 1.2 migration
| reStructuredText | mit | indico/indico,DirkHoffmann/indico,indico/indico,indico/indico,indico/indico,DirkHoffmann/indico,DirkHoffmann/indico,DirkHoffmann/indico | restructuredtext | ## Code Before:
Upgrade Indico from 1.2
=======================
The migration tool (`indico-migrate <https://github.com/indico/indico-migrate>`_)
requires Python 2.7 and Indico 2.0. It is not supported by Indico v3 nor will it
work on Python 3.
If you still need to migrate a legacy instance from the 1.x (or older), please
consult the documentation from Indico v2. You may also want to consider running
the migration on a separate virtual machine in order to not clutter the server
that will run Indico v3 with legacy tools and software.
## Instruction:
Add link to v2 docs for 1.2 migration
## Code After:
Upgrade Indico from 1.2
=======================
The migration tool (`indico-migrate <https://github.com/indico/indico-migrate>`_)
requires Python 2.7 and Indico 2.0. It is not supported by Indico v3 nor will it
work on Python 3.
If you still need to migrate a legacy instance from the 1.x (or older), please
consult the `documentation from Indico v2 <https://docs.getindico.io/en/2.3.x/installation/upgrade_legacy/>`_.
You may also want to consider running the migration on a separate virtual machine
in order to not clutter the server that will run Indico v3 with legacy tools and software.
| Upgrade Indico from 1.2
=======================
The migration tool (`indico-migrate <https://github.com/indico/indico-migrate>`_)
requires Python 2.7 and Indico 2.0. It is not supported by Indico v3 nor will it
work on Python 3.
If you still need to migrate a legacy instance from the 1.x (or older), please
- consult the documentation from Indico v2. You may also want to consider running
- the migration on a separate virtual machine in order to not clutter the server
+ consult the `documentation from Indico v2 <https://docs.getindico.io/en/2.3.x/installation/upgrade_legacy/>`_.
+ You may also want to consider running the migration on a separate virtual machine
- that will run Indico v3 with legacy tools and software.
+ in order to not clutter the server that will run Indico v3 with legacy tools and software.
? +++++++++++++++++++++++++++++++++++
| 6 | 0.545455 | 3 | 3 |
52749a9b894f62bcc149189a8baa57a91889ffbf | .travis.yml | .travis.yml | language: objective-c
before_install:
- (ruby --version)
- sudo chown -R travis ~/Library/RubyMotion
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
- sudo motion update
gemfile:
- Gemfile
script:
- bundle install --jobs=3 --retry=3
- bundle exec rake clean
- bundle exec rake spec
- bundle exec rake clean
- bundle exec rake spec osx=true
| language: objective-c
before_install:
- (ruby --version)
- sudo chown -R travis ~/Library/RubyMotion
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
- sudo motion update
- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/simctl create seven com.apple.CoreSimulator.SimDeviceType.iPhone-5 com.apple.CoreSimulator.SimRuntime.iOS-7-1
gemfile:
- Gemfile
script:
- bundle install --jobs=3 --retry=3
- bundle exec rake clean
- bundle exec rake spec
- bundle exec rake clean
- bundle exec rake spec device_name=seven
- bundle exec rake clean
- bundle exec rake spec osx=true
| Test ios 8 and ios 7 | Test ios 8 and ios 7
| YAML | mit | fandor/BubbleWrap,andersennl/BubbleWrap,dam13n/BubbleWrap,earthrid/BubbleWrap | yaml | ## Code Before:
language: objective-c
before_install:
- (ruby --version)
- sudo chown -R travis ~/Library/RubyMotion
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
- sudo motion update
gemfile:
- Gemfile
script:
- bundle install --jobs=3 --retry=3
- bundle exec rake clean
- bundle exec rake spec
- bundle exec rake clean
- bundle exec rake spec osx=true
## Instruction:
Test ios 8 and ios 7
## Code After:
language: objective-c
before_install:
- (ruby --version)
- sudo chown -R travis ~/Library/RubyMotion
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
- sudo motion update
- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/simctl create seven com.apple.CoreSimulator.SimDeviceType.iPhone-5 com.apple.CoreSimulator.SimRuntime.iOS-7-1
gemfile:
- Gemfile
script:
- bundle install --jobs=3 --retry=3
- bundle exec rake clean
- bundle exec rake spec
- bundle exec rake clean
- bundle exec rake spec device_name=seven
- bundle exec rake clean
- bundle exec rake spec osx=true
| language: objective-c
before_install:
- (ruby --version)
- sudo chown -R travis ~/Library/RubyMotion
- sudo mkdir -p ~/Library/RubyMotion/build
- sudo chown -R travis ~/Library/RubyMotion/build
- sudo motion update
+ - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/simctl create seven com.apple.CoreSimulator.SimDeviceType.iPhone-5 com.apple.CoreSimulator.SimRuntime.iOS-7-1
gemfile:
- Gemfile
script:
- bundle install --jobs=3 --retry=3
- bundle exec rake clean
- bundle exec rake spec
- bundle exec rake clean
+ - bundle exec rake spec device_name=seven
+ - bundle exec rake clean
- bundle exec rake spec osx=true | 3 | 0.2 | 3 | 0 |
16af493cad28ab23c3c1abb128b4db3b405f25e9 | src/main/resources/run-docker-container.sh | src/main/resources/run-docker-container.sh |
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Ds3proxy.cors-allow-all=${S3PROXY_CORS_ALLOW_ALL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.endpoint=${JCLOUDS_ENDPOINT} \
-Djclouds.region=${JCLOUDS_REGION} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null
|
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.virtual-host=${S3PROXY_VIRTUALHOST} \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Ds3proxy.cors-allow-all=${S3PROXY_CORS_ALLOW_ALL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.endpoint=${JCLOUDS_ENDPOINT} \
-Djclouds.region=${JCLOUDS_REGION} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null
| Update docker script to allow for configuration of virtualhost | Update docker script to allow for configuration of virtualhost
| Shell | apache-2.0 | andrewgaul/s3proxy,timuralp/s3proxy,timuralp/s3proxy,andrewgaul/s3proxy | shell | ## Code Before:
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Ds3proxy.cors-allow-all=${S3PROXY_CORS_ALLOW_ALL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.endpoint=${JCLOUDS_ENDPOINT} \
-Djclouds.region=${JCLOUDS_REGION} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null
## Instruction:
Update docker script to allow for configuration of virtualhost
## Code After:
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.virtual-host=${S3PROXY_VIRTUALHOST} \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Ds3proxy.cors-allow-all=${S3PROXY_CORS_ALLOW_ALL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.endpoint=${JCLOUDS_ENDPOINT} \
-Djclouds.region=${JCLOUDS_REGION} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null
|
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
+ -Ds3proxy.virtual-host=${S3PROXY_VIRTUALHOST} \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Ds3proxy.cors-allow-all=${S3PROXY_CORS_ALLOW_ALL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.endpoint=${JCLOUDS_ENDPOINT} \
-Djclouds.region=${JCLOUDS_REGION} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null | 1 | 0.0625 | 1 | 0 |
2756dfdf198f4ed02dd0b1418dd4f4bb835a95fe | layouts/partials/js.html | layouts/partials/js.html | {{ "<!-- jQuery -->" | safeHTML }}
<script src="{{ "js/jquery-v3.3.1/jquery.min.js"| absURL }}"></script>
{{ "<!-- Bootstrap Core -->" | safeHTML }}
<script src="{{ "js/bootstrap-v3.3.7/bootstrap.min.js"| absURL }}"></script>
{{ "<!-- Form Validation -->" | safeHTML }}
<script src="{{ "js/jquery.form-validator-v2.3.44/jquery.form-validator.min.js"| absURL }}"></script>
{{ "<!-- Custom Theme -->" | safeHTML }}
<script src="{{ "js/agency.js"| absURL }}"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.analytics.piwik }}
{{ partial "_analytics/piwik.html" . }}
{{ end }}
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
| {{ "<!-- jQuery -->" | safeHTML }}
<script src="{{ "js/jquery-v3.3.1/jquery.min.js"| absURL }}"></script>
{{ "<!-- Bootstrap Core -->" | safeHTML }}
<script src="{{ "js/bootstrap-v3.3.7/bootstrap.min.js"| absURL }}"></script>
{{ "<!-- Form Validation -->" | safeHTML }}
<script src="{{ "//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"| absURL }}"></script>
{{ "<!-- Custom Theme -->" | safeHTML }}
<script src="{{ "js/agency.js"| absURL }}"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.analytics.piwik }}
{{ partial "_analytics/piwik.html" . }}
{{ end }}
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
| Revert "Revert "update jquery form validator to newer version 2.3.26 due to CDN issues when deploying to netlify"" | Revert "Revert "update jquery form validator to newer version 2.3.26 due to CDN issues when deploying to netlify""
This reverts commit e533cfe1d44800169a4731ab14a78ad824546234.
| HTML | apache-2.0 | brwnchnl/vrnm,brwnchnl/vrnm | html | ## Code Before:
{{ "<!-- jQuery -->" | safeHTML }}
<script src="{{ "js/jquery-v3.3.1/jquery.min.js"| absURL }}"></script>
{{ "<!-- Bootstrap Core -->" | safeHTML }}
<script src="{{ "js/bootstrap-v3.3.7/bootstrap.min.js"| absURL }}"></script>
{{ "<!-- Form Validation -->" | safeHTML }}
<script src="{{ "js/jquery.form-validator-v2.3.44/jquery.form-validator.min.js"| absURL }}"></script>
{{ "<!-- Custom Theme -->" | safeHTML }}
<script src="{{ "js/agency.js"| absURL }}"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.analytics.piwik }}
{{ partial "_analytics/piwik.html" . }}
{{ end }}
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
## Instruction:
Revert "Revert "update jquery form validator to newer version 2.3.26 due to CDN issues when deploying to netlify""
This reverts commit e533cfe1d44800169a4731ab14a78ad824546234.
## Code After:
{{ "<!-- jQuery -->" | safeHTML }}
<script src="{{ "js/jquery-v3.3.1/jquery.min.js"| absURL }}"></script>
{{ "<!-- Bootstrap Core -->" | safeHTML }}
<script src="{{ "js/bootstrap-v3.3.7/bootstrap.min.js"| absURL }}"></script>
{{ "<!-- Form Validation -->" | safeHTML }}
<script src="{{ "//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"| absURL }}"></script>
{{ "<!-- Custom Theme -->" | safeHTML }}
<script src="{{ "js/agency.js"| absURL }}"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.analytics.piwik }}
{{ partial "_analytics/piwik.html" . }}
{{ end }}
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }}
| {{ "<!-- jQuery -->" | safeHTML }}
<script src="{{ "js/jquery-v3.3.1/jquery.min.js"| absURL }}"></script>
{{ "<!-- Bootstrap Core -->" | safeHTML }}
<script src="{{ "js/bootstrap-v3.3.7/bootstrap.min.js"| absURL }}"></script>
{{ "<!-- Form Validation -->" | safeHTML }}
- <script src="{{ "js/jquery.form-validator-v2.3.44/jquery.form-validator.min.js"| absURL }}"></script>
? ^ ^^ ^^
+ <script src="{{ "//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"| absURL }}"></script>
? +++++ +++++++++++++++++++++++++ ^ ^ ^^
{{ "<!-- Custom Theme -->" | safeHTML }}
<script src="{{ "js/agency.js"| absURL }}"></script>
{{ template "_internal/google_analytics_async.html" . }}
{{ if .Site.Params.analytics.piwik }}
{{ partial "_analytics/piwik.html" . }}
{{ end }}
{{ range .Site.Params.custom_js }}
<script src="{{ . | absURL }}"></script>
{{ end }} | 2 | 0.095238 | 1 | 1 |
74cdcc4cf557af27bd1a9c4766993f71b2c50f00 | web/index.html | web/index.html | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/createProject.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="style/fonts/font-awesome/css/font-awesome.min.css">
</head>
<body>
<div class="content"></div>
</body>
<script src="bundle.js"></script>
</html>
| <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/createProject.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="style/fonts/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="content"></div>
</body>
<script src="bundle.js"></script>
</html>
| Add stable version of bootstrap. | Add stable version of bootstrap.
v4-dev version seems to be having trouble.
| HTML | mit | Drakulix/knex,Drakulix/knex,Drakulix/knex,Drakulix/knex | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/createProject.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="style/fonts/font-awesome/css/font-awesome.min.css">
</head>
<body>
<div class="content"></div>
</body>
<script src="bundle.js"></script>
</html>
## Instruction:
Add stable version of bootstrap.
v4-dev version seems to be having trouble.
## Code After:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/createProject.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="style/fonts/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="content"></div>
</body>
<script src="bundle.js"></script>
</html>
| <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/createProject.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="style/fonts/font-awesome/css/font-awesome.min.css">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="content"></div>
</body>
<script src="bundle.js"></script>
</html> | 1 | 0.076923 | 1 | 0 |
22cc9b560633cf3b60418ee9d0305b2dc0eb0873 | .travis.yml | .travis.yml | dist: xenial
language: ruby
cache:
directories:
- vendor/bundle
services:
- postgresql
rvm:
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8
env:
- REDMINE_VERSION=4.0.1
- REDMINE_VERSION=3.4.8
- REDMINE_VERSION=master
matrix:
allow_failures:
- env: REDMINE_VERSION=master
branches:
except:
- debian
before_install:
- gem update --system
- gem uninstall bundler --all --executables
- gem install bundler -v '~> 1.0'
- bundle --version
- sudo apt-get install -yq chromium-browser chromium-chromedriver
- export PATH=$PATH:/usr/lib/chromium-browser/
install:
- export BUNDLE_GEMFILE=""
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
- bundle install --jobs=3 --retry=3 --without development
- BUNDLE_OPTS="--without development" ./redmine update
script:
- bundle exec rake spec
| dist: xenial
language: ruby
cache:
directories:
- vendor/bundle
services:
- postgresql
rvm:
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8
env:
- REDMINE_VERSION=4.0.1
- REDMINE_VERSION=3.4.8
- REDMINE_VERSION=master
matrix:
allow_failures:
- env: REDMINE_VERSION=master
branches:
except:
- debian
before_install:
- gem update --system
- echo yes | rvm gemset delete global
- gem uninstall bundler --all --executables
- gem install bundler -v '~> 1.0'
- bundle --version
- sudo apt-get install -yq chromium-browser chromium-chromedriver
- export PATH=$PATH:/usr/lib/chromium-browser/
install:
- export BUNDLE_GEMFILE=""
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
- bundle install --jobs=3 --retry=3 --without development
- BUNDLE_OPTS="--without development" ./redmine update
script:
- bundle exec rake spec
| Purge rvm global gemset too | Purge rvm global gemset too
Purge global gemset to avoid using wrong bundler from RVM setup
| YAML | apache-2.0 | jgraichen/redmine_dashboard,jgraichen/redmine_dashboard,jgraichen/redmine_dashboard | yaml | ## Code Before:
dist: xenial
language: ruby
cache:
directories:
- vendor/bundle
services:
- postgresql
rvm:
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8
env:
- REDMINE_VERSION=4.0.1
- REDMINE_VERSION=3.4.8
- REDMINE_VERSION=master
matrix:
allow_failures:
- env: REDMINE_VERSION=master
branches:
except:
- debian
before_install:
- gem update --system
- gem uninstall bundler --all --executables
- gem install bundler -v '~> 1.0'
- bundle --version
- sudo apt-get install -yq chromium-browser chromium-chromedriver
- export PATH=$PATH:/usr/lib/chromium-browser/
install:
- export BUNDLE_GEMFILE=""
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
- bundle install --jobs=3 --retry=3 --without development
- BUNDLE_OPTS="--without development" ./redmine update
script:
- bundle exec rake spec
## Instruction:
Purge rvm global gemset too
Purge global gemset to avoid using wrong bundler from RVM setup
## Code After:
dist: xenial
language: ruby
cache:
directories:
- vendor/bundle
services:
- postgresql
rvm:
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8
env:
- REDMINE_VERSION=4.0.1
- REDMINE_VERSION=3.4.8
- REDMINE_VERSION=master
matrix:
allow_failures:
- env: REDMINE_VERSION=master
branches:
except:
- debian
before_install:
- gem update --system
- echo yes | rvm gemset delete global
- gem uninstall bundler --all --executables
- gem install bundler -v '~> 1.0'
- bundle --version
- sudo apt-get install -yq chromium-browser chromium-chromedriver
- export PATH=$PATH:/usr/lib/chromium-browser/
install:
- export BUNDLE_GEMFILE=""
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
- bundle install --jobs=3 --retry=3 --without development
- BUNDLE_OPTS="--without development" ./redmine update
script:
- bundle exec rake spec
| dist: xenial
language: ruby
cache:
directories:
- vendor/bundle
services:
- postgresql
rvm:
- 2.6.0
- 2.5.3
- 2.4.5
- 2.3.8
env:
- REDMINE_VERSION=4.0.1
- REDMINE_VERSION=3.4.8
- REDMINE_VERSION=master
matrix:
allow_failures:
- env: REDMINE_VERSION=master
branches:
except:
- debian
before_install:
- gem update --system
+ - echo yes | rvm gemset delete global
- gem uninstall bundler --all --executables
- gem install bundler -v '~> 1.0'
- bundle --version
- sudo apt-get install -yq chromium-browser chromium-chromedriver
- export PATH=$PATH:/usr/lib/chromium-browser/
install:
- export BUNDLE_GEMFILE=""
- export BUNDLE_PATH="$(pwd)/vendor/bundle"
- bundle install --jobs=3 --retry=3 --without development
- BUNDLE_OPTS="--without development" ./redmine update
script:
- bundle exec rake spec | 1 | 0.027778 | 1 | 0 |
71083a50a6cc900edb272dded2c3578ee5065d2d | index.js | index.js | require('./lib/metro-transit')
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
// Create an instance of the MetroTransit skill.
var dcMetro = new MetroTransit();
dcMetro.execute(event, context);
};
| var MetroTransit = require('./lib/metro-transit');
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
MetroTransit.execute(event, context);
};
| Update driver file for new module interfaces | Update driver file for new module interfaces
| JavaScript | mit | pmyers88/dc-metro-echo | javascript | ## Code Before:
require('./lib/metro-transit')
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
// Create an instance of the MetroTransit skill.
var dcMetro = new MetroTransit();
dcMetro.execute(event, context);
};
## Instruction:
Update driver file for new module interfaces
## Code After:
var MetroTransit = require('./lib/metro-transit');
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
MetroTransit.execute(event, context);
};
| - require('./lib/metro-transit')
+ var MetroTransit = require('./lib/metro-transit');
? +++++++++++++++++++ +
// Create the handler that responds to the Alexa Request.
exports.handler = function (event, context) {
- // Create an instance of the MetroTransit skill.
- var dcMetro = new MetroTransit();
- dcMetro.execute(event, context);
? --
+ MetroTransit.execute(event, context);
? +++++++
}; | 6 | 0.75 | 2 | 4 |
d92cdf7b055d8571e5417679f2b76acab9de0f0f | .travis.yml | .travis.yml | language: ruby
env:
- CODECLIMATE_REPO_TOKEN='2d89fff3a359f62355f9e07647fede441b37800782b861b48cbf798f5bcafca0' NACRE_USER_ID='test_user_id' NACRE_EMAIL='testuser@example.com' NACRE_PASSWORD='123456'
script:
- bundle exec rspec
rvm:
- 2.1.0
- jruby-19mode
branches:
except:
- /^experimental.*$/
notifications:
email:
- nacre@allolex.net
| language: ruby
env:
- CODECLIMATE_REPO_TOKEN='2d89fff3a359f62355f9e07647fede441b37800782b861b48cbf798f5bcafca0' NACRE_USER_ID='test_user_id' NACRE_EMAIL='testuser@example.com' NACRE_PASSWORD='123456'
script:
- bundle exec rspec
rvm:
- 2.1.0
branches:
except:
- /^experimental.*$/
notifications:
email:
- nacre@allolex.net
| Remove jruby support pending later investigation | Remove jruby support pending later investigation
Getting this error message. It appears to have something to do with DateTime or Date.
Nacre::Order.get should make a request to the correct endpoint
Failure/Error: resource = described_class.get(range)
NoMethodError:
undefined method `/' for "000":String
# ./lib/nacre/order/invoice.rb:15:in `tax_date='
# ./lib/nacre/abstract_resource.rb:30:in `attributes='
# ./lib/nacre/abstract_resource.rb:28:in `attributes='
# ./lib/nacre/abstract_resource.rb:24:in `initialize'
# ./lib/nacre/order/invoice_collection.rb:11:in `initialize'
# ./lib/nacre/order/invoice_collection.rb:10:in `initialize'
# ./lib/nacre/order.rb:40:in `invoices='
# ./lib/nacre/abstract_resource.rb:30:in `attributes='
# ./lib/nacre/abstract_resource.rb:28:in `attributes='
# ./lib/nacre/abstract_resource.rb:24:in `initialize'
# ./lib/nacre/abstract_resource.rb:37:in `from_json'
# ./lib/nacre/abstract_resource.rb:43:in `get'
# ./spec/lib/nacre/order_spec.rb:185:in `(root)'
| YAML | mit | allolex/nacre | yaml | ## Code Before:
language: ruby
env:
- CODECLIMATE_REPO_TOKEN='2d89fff3a359f62355f9e07647fede441b37800782b861b48cbf798f5bcafca0' NACRE_USER_ID='test_user_id' NACRE_EMAIL='testuser@example.com' NACRE_PASSWORD='123456'
script:
- bundle exec rspec
rvm:
- 2.1.0
- jruby-19mode
branches:
except:
- /^experimental.*$/
notifications:
email:
- nacre@allolex.net
## Instruction:
Remove jruby support pending later investigation
Getting this error message. It appears to have something to do with DateTime or Date.
Nacre::Order.get should make a request to the correct endpoint
Failure/Error: resource = described_class.get(range)
NoMethodError:
undefined method `/' for "000":String
# ./lib/nacre/order/invoice.rb:15:in `tax_date='
# ./lib/nacre/abstract_resource.rb:30:in `attributes='
# ./lib/nacre/abstract_resource.rb:28:in `attributes='
# ./lib/nacre/abstract_resource.rb:24:in `initialize'
# ./lib/nacre/order/invoice_collection.rb:11:in `initialize'
# ./lib/nacre/order/invoice_collection.rb:10:in `initialize'
# ./lib/nacre/order.rb:40:in `invoices='
# ./lib/nacre/abstract_resource.rb:30:in `attributes='
# ./lib/nacre/abstract_resource.rb:28:in `attributes='
# ./lib/nacre/abstract_resource.rb:24:in `initialize'
# ./lib/nacre/abstract_resource.rb:37:in `from_json'
# ./lib/nacre/abstract_resource.rb:43:in `get'
# ./spec/lib/nacre/order_spec.rb:185:in `(root)'
## Code After:
language: ruby
env:
- CODECLIMATE_REPO_TOKEN='2d89fff3a359f62355f9e07647fede441b37800782b861b48cbf798f5bcafca0' NACRE_USER_ID='test_user_id' NACRE_EMAIL='testuser@example.com' NACRE_PASSWORD='123456'
script:
- bundle exec rspec
rvm:
- 2.1.0
branches:
except:
- /^experimental.*$/
notifications:
email:
- nacre@allolex.net
| language: ruby
env:
- CODECLIMATE_REPO_TOKEN='2d89fff3a359f62355f9e07647fede441b37800782b861b48cbf798f5bcafca0' NACRE_USER_ID='test_user_id' NACRE_EMAIL='testuser@example.com' NACRE_PASSWORD='123456'
script:
- bundle exec rspec
rvm:
- 2.1.0
- - jruby-19mode
branches:
except:
- /^experimental.*$/
notifications:
email:
- nacre@allolex.net | 1 | 0.071429 | 0 | 1 |
82aa4012be0ebe00e09f044339a2983b70f220e7 | lib/hyper_admin/resource_controller.rb | lib/hyper_admin/resource_controller.rb | module HyperAdmin
class ResourceController < ActionController::Base
before_action :set_resource_class
def index
@resources = resource_class.all
render 'admin/resources/index', layout: layout
end
def show
@resource = resource
render 'admin/resources/show', layout: layout
end
def new
@resource = resource_class.new
render 'admin/resources/new', layout: layout
end
def edit
@resource = resource
render 'admin/resources/edit', layout: layout
end
def create
end
def update
end
def destroy
end
def resource
resource_class.find params[:id]
end
def resource_class
raise "This method must be overridden"
end
protected
def set_resource_class
@resource_class = resource_class
end
def layout
'hyper_admin/application'
end
end
end
| module HyperAdmin
class ResourceController < ActionController::Base
before_action :set_resource_class
before_action :permit_params, only: [ :create, :update ]
def index
@resources = resource_class.all
render 'admin/resources/index', layout: layout
end
def show
@resource = resource
render 'admin/resources/show', layout: layout
end
def new
@resource = resource_class.new
render 'admin/resources/new', layout: layout
end
def edit
@resource = resource
render 'admin/resources/edit', layout: layout
end
def create
@resource = @resource_class.new params[@resource_class.model_name.param_key]
if @resource.save
redirect_to [ :admin, @resource ]
else
render "admin/resources/new", layout: layout
end
end
def update
end
def destroy
end
def resource
resource_class.find params[:id]
end
def resource_class
raise "This method must be overridden"
end
protected
def set_resource_class
@resource_class = resource_class
end
def permit_params
params.permit!
end
def layout
'hyper_admin/application'
end
end
end
| Create resources when submitted through new view | Create resources when submitted through new view
| Ruby | mit | hyperoslo/hyper_admin,hyperoslo/hyper_admin,hyperoslo/hyper_admin | ruby | ## Code Before:
module HyperAdmin
class ResourceController < ActionController::Base
before_action :set_resource_class
def index
@resources = resource_class.all
render 'admin/resources/index', layout: layout
end
def show
@resource = resource
render 'admin/resources/show', layout: layout
end
def new
@resource = resource_class.new
render 'admin/resources/new', layout: layout
end
def edit
@resource = resource
render 'admin/resources/edit', layout: layout
end
def create
end
def update
end
def destroy
end
def resource
resource_class.find params[:id]
end
def resource_class
raise "This method must be overridden"
end
protected
def set_resource_class
@resource_class = resource_class
end
def layout
'hyper_admin/application'
end
end
end
## Instruction:
Create resources when submitted through new view
## Code After:
module HyperAdmin
class ResourceController < ActionController::Base
before_action :set_resource_class
before_action :permit_params, only: [ :create, :update ]
def index
@resources = resource_class.all
render 'admin/resources/index', layout: layout
end
def show
@resource = resource
render 'admin/resources/show', layout: layout
end
def new
@resource = resource_class.new
render 'admin/resources/new', layout: layout
end
def edit
@resource = resource
render 'admin/resources/edit', layout: layout
end
def create
@resource = @resource_class.new params[@resource_class.model_name.param_key]
if @resource.save
redirect_to [ :admin, @resource ]
else
render "admin/resources/new", layout: layout
end
end
def update
end
def destroy
end
def resource
resource_class.find params[:id]
end
def resource_class
raise "This method must be overridden"
end
protected
def set_resource_class
@resource_class = resource_class
end
def permit_params
params.permit!
end
def layout
'hyper_admin/application'
end
end
end
| module HyperAdmin
class ResourceController < ActionController::Base
before_action :set_resource_class
+ before_action :permit_params, only: [ :create, :update ]
def index
@resources = resource_class.all
render 'admin/resources/index', layout: layout
end
def show
@resource = resource
render 'admin/resources/show', layout: layout
end
def new
@resource = resource_class.new
render 'admin/resources/new', layout: layout
end
def edit
@resource = resource
render 'admin/resources/edit', layout: layout
end
def create
+ @resource = @resource_class.new params[@resource_class.model_name.param_key]
+
+ if @resource.save
+ redirect_to [ :admin, @resource ]
+ else
+ render "admin/resources/new", layout: layout
+ end
end
def update
end
def destroy
end
def resource
resource_class.find params[:id]
end
def resource_class
raise "This method must be overridden"
end
protected
def set_resource_class
@resource_class = resource_class
end
+ def permit_params
+ params.permit!
+ end
+
def layout
'hyper_admin/application'
end
end
end | 12 | 0.230769 | 12 | 0 |
7291e4a19dc2eff421d0d557b637df36a4b906c4 | rto/README.md | rto/README.md | | Name | Result (FreeBSD) |
|:-------------------------------------------------:|:------------------:|
[Retransmission Timeout](retransmission_timeout.pkt)| Failed
## Description
* After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
```
script packet: 0.650000 . 1001:2001(1000) ack 1
actual packet: 0.632029 . 2001:3001(1000) ack 1 win 1031
```
| | Name | Result (FreeBSD) |
|:-------------------------------------------------:|:------------------:|
[Retransmission Timeout](retransmission_timeout.pkt)| Failed
## Description
After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
```
script packet: 0.650000 . 1001:2001(1000) ack 1
actual packet: 0.632029 . 2001:3001(1000) ack 1 win 1031
```
## Todo
Add support for following `tcp_info` options in FreeBSD -
| Line | Name |
:------:|:------:|
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L215)| `__tcpi_unacked`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L216)| `__tcpi_sacked`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L217)| `__tcpi_lost`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L218)| `__tcpi_retrans`
| Add ToDo for retransmission timeout | Add ToDo for retransmission timeout
| Markdown | mit | shivrai/TCP-IP-Regression-TestSuite | markdown | ## Code Before:
| Name | Result (FreeBSD) |
|:-------------------------------------------------:|:------------------:|
[Retransmission Timeout](retransmission_timeout.pkt)| Failed
## Description
* After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
```
script packet: 0.650000 . 1001:2001(1000) ack 1
actual packet: 0.632029 . 2001:3001(1000) ack 1 win 1031
```
## Instruction:
Add ToDo for retransmission timeout
## Code After:
| Name | Result (FreeBSD) |
|:-------------------------------------------------:|:------------------:|
[Retransmission Timeout](retransmission_timeout.pkt)| Failed
## Description
After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
```
script packet: 0.650000 . 1001:2001(1000) ack 1
actual packet: 0.632029 . 2001:3001(1000) ack 1 win 1031
```
## Todo
Add support for following `tcp_info` options in FreeBSD -
| Line | Name |
:------:|:------:|
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L215)| `__tcpi_unacked`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L216)| `__tcpi_sacked`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L217)| `__tcpi_lost`
[u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L218)| `__tcpi_retrans`
| | Name | Result (FreeBSD) |
|:-------------------------------------------------:|:------------------:|
[Retransmission Timeout](retransmission_timeout.pkt)| Failed
## Description
- * After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
? --
+ After the receiver **SACK**s one out of five data segments, the sender should retransmit the segment starting from the next acknowledged segment number (in this case 1001:2001) after **RTO**. However, the sender again retransmits the previously retransmitted segment.<br>
```
script packet: 0.650000 . 1001:2001(1000) ack 1
actual packet: 0.632029 . 2001:3001(1000) ack 1 win 1031
```
+
+ ## Todo
+ Add support for following `tcp_info` options in FreeBSD -
+
+ | Line | Name |
+ :------:|:------:|
+ [u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L215)| `__tcpi_unacked`
+ [u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L216)| `__tcpi_sacked`
+ [u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L217)| `__tcpi_lost`
+ [u_int32_t](http://fxr.watson.org/fxr/source/netinet/tcp.h#L218)| `__tcpi_retrans` | 12 | 1.2 | 11 | 1 |
dbd2ef4ad68ffb7ca973433905b4ca31264f6235 | spec/presenters/redetermination_presenter_spec.rb | spec/presenters/redetermination_presenter_spec.rb | require 'rails_helper'
describe RedeterminationPresenter do
let(:rd) { FactoryGirl.create :redetermination, fees: 1452.33, expenses: 2455.77 }
let(:presenter) { RedeterminationPresenter.new(rd, view) }
describe '#created_at' do
it 'should properly format the time' do
allow(rd).to receive(:created_at).and_return(Time.local(2015, 8, 13, 13, 15, 22))
expect(presenter.created_at).to eq('13/08/2015 13:15')
end
end
context 'currency fields' do
it 'should format currency amount' do
expect(presenter.fees_total).to eq '£1,452.33'
expect(presenter.expenses_total).to eq '£2,455.77'
expect(presenter.total).to eq '£3,908.10'
expect(presenter.vat_amount).to eq '£683.92'
expect(presenter.total_inc_vat).to eq '£4,592.02'
end
end
end
| require 'rails_helper'
describe RedeterminationPresenter do
let(:rd) { FactoryGirl.create :redetermination, fees: 1452.33, expenses: 2455.77 }
let(:presenter) { RedeterminationPresenter.new(rd, view) }
context 'currency fields' do
it 'should format currency amount' do
expect(presenter.fees_total).to eq '£1,452.33'
expect(presenter.expenses_total).to eq '£2,455.77'
expect(presenter.total).to eq '£3,908.10'
expect(presenter.vat_amount).to eq '£683.92'
expect(presenter.total_inc_vat).to eq '£4,592.02'
end
end
end
| Remove "created_at" spec because its no longer in the presenter nor is it actually used | Remove "created_at" spec because its no longer in the presenter nor is it actually used
| Ruby | mit | ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments | ruby | ## Code Before:
require 'rails_helper'
describe RedeterminationPresenter do
let(:rd) { FactoryGirl.create :redetermination, fees: 1452.33, expenses: 2455.77 }
let(:presenter) { RedeterminationPresenter.new(rd, view) }
describe '#created_at' do
it 'should properly format the time' do
allow(rd).to receive(:created_at).and_return(Time.local(2015, 8, 13, 13, 15, 22))
expect(presenter.created_at).to eq('13/08/2015 13:15')
end
end
context 'currency fields' do
it 'should format currency amount' do
expect(presenter.fees_total).to eq '£1,452.33'
expect(presenter.expenses_total).to eq '£2,455.77'
expect(presenter.total).to eq '£3,908.10'
expect(presenter.vat_amount).to eq '£683.92'
expect(presenter.total_inc_vat).to eq '£4,592.02'
end
end
end
## Instruction:
Remove "created_at" spec because its no longer in the presenter nor is it actually used
## Code After:
require 'rails_helper'
describe RedeterminationPresenter do
let(:rd) { FactoryGirl.create :redetermination, fees: 1452.33, expenses: 2455.77 }
let(:presenter) { RedeterminationPresenter.new(rd, view) }
context 'currency fields' do
it 'should format currency amount' do
expect(presenter.fees_total).to eq '£1,452.33'
expect(presenter.expenses_total).to eq '£2,455.77'
expect(presenter.total).to eq '£3,908.10'
expect(presenter.vat_amount).to eq '£683.92'
expect(presenter.total_inc_vat).to eq '£4,592.02'
end
end
end
| require 'rails_helper'
describe RedeterminationPresenter do
-
+
let(:rd) { FactoryGirl.create :redetermination, fees: 1452.33, expenses: 2455.77 }
let(:presenter) { RedeterminationPresenter.new(rd, view) }
- describe '#created_at' do
- it 'should properly format the time' do
- allow(rd).to receive(:created_at).and_return(Time.local(2015, 8, 13, 13, 15, 22))
- expect(presenter.created_at).to eq('13/08/2015 13:15')
- end
- end
-
context 'currency fields' do
-
+
it 'should format currency amount' do
expect(presenter.fees_total).to eq '£1,452.33'
expect(presenter.expenses_total).to eq '£2,455.77'
expect(presenter.total).to eq '£3,908.10'
expect(presenter.vat_amount).to eq '£683.92'
expect(presenter.total_inc_vat).to eq '£4,592.02'
end
end
end | 11 | 0.407407 | 2 | 9 |
3ba1ffb9e5b58b4b9697dfeaa3729b31d79d46a4 | plugins/korge-gradle-plugin/src/main/kotlin/com/soywiz/korge/gradle/Repos.kt | plugins/korge-gradle-plugin/src/main/kotlin/com/soywiz/korge/gradle/Repos.kt | package com.soywiz.korge.gradle
import org.gradle.api.Project
import java.net.URI
fun Project.configureRepositories() {
repositories.apply {
mavenLocal().content {
it.excludeGroup("Kotlin/Native")
}
maven {
it.url = URI("https://dl.bintray.com/korlibs/korlibs")
it.content {
it.includeGroup("com.soywiz")
it.excludeGroup("Kotlin/Native")
}
}
if (BuildVersions.KOTLIN.contains("eap")) {
maven {
it.url = URI("https://dl.bintray.com/kotlin/kotlin-eap")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
}
jcenter().content {
it.excludeGroup("Kotlin/Native")
}
mavenCentral().content {
it.excludeGroup("Kotlin/Native")
}
if (BuildVersions.KOTLIN.contains("release")) {
maven { it.url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
}
}
}
| package com.soywiz.korge.gradle
import org.gradle.api.Project
import java.net.URI
fun Project.configureRepositories() {
repositories.apply {
mavenLocal().content {
it.excludeGroup("Kotlin/Native")
}
maven {
it.url = URI("https://dl.bintray.com/korlibs/korlibs")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
if (BuildVersions.KOTLIN.contains("eap")) {
maven {
it.url = URI("https://dl.bintray.com/kotlin/kotlin-eap")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
}
jcenter().content {
it.excludeGroup("Kotlin/Native")
}
mavenCentral().content {
it.excludeGroup("Kotlin/Native")
}
if (BuildVersions.KOTLIN.contains("release")) {
maven { it.url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
}
}
}
| Remove includeGroup since now it is in separated packages com.soywiz.korlibs.* | Remove includeGroup since now it is in separated packages com.soywiz.korlibs.*
| Kotlin | apache-2.0 | soywiz/korge,soywiz/korge,soywiz/korge | kotlin | ## Code Before:
package com.soywiz.korge.gradle
import org.gradle.api.Project
import java.net.URI
fun Project.configureRepositories() {
repositories.apply {
mavenLocal().content {
it.excludeGroup("Kotlin/Native")
}
maven {
it.url = URI("https://dl.bintray.com/korlibs/korlibs")
it.content {
it.includeGroup("com.soywiz")
it.excludeGroup("Kotlin/Native")
}
}
if (BuildVersions.KOTLIN.contains("eap")) {
maven {
it.url = URI("https://dl.bintray.com/kotlin/kotlin-eap")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
}
jcenter().content {
it.excludeGroup("Kotlin/Native")
}
mavenCentral().content {
it.excludeGroup("Kotlin/Native")
}
if (BuildVersions.KOTLIN.contains("release")) {
maven { it.url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
}
}
}
## Instruction:
Remove includeGroup since now it is in separated packages com.soywiz.korlibs.*
## Code After:
package com.soywiz.korge.gradle
import org.gradle.api.Project
import java.net.URI
fun Project.configureRepositories() {
repositories.apply {
mavenLocal().content {
it.excludeGroup("Kotlin/Native")
}
maven {
it.url = URI("https://dl.bintray.com/korlibs/korlibs")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
if (BuildVersions.KOTLIN.contains("eap")) {
maven {
it.url = URI("https://dl.bintray.com/kotlin/kotlin-eap")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
}
jcenter().content {
it.excludeGroup("Kotlin/Native")
}
mavenCentral().content {
it.excludeGroup("Kotlin/Native")
}
if (BuildVersions.KOTLIN.contains("release")) {
maven { it.url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
}
}
}
| package com.soywiz.korge.gradle
import org.gradle.api.Project
import java.net.URI
fun Project.configureRepositories() {
repositories.apply {
mavenLocal().content {
it.excludeGroup("Kotlin/Native")
}
maven {
it.url = URI("https://dl.bintray.com/korlibs/korlibs")
it.content {
- it.includeGroup("com.soywiz")
it.excludeGroup("Kotlin/Native")
}
}
if (BuildVersions.KOTLIN.contains("eap")) {
maven {
it.url = URI("https://dl.bintray.com/kotlin/kotlin-eap")
it.content {
it.excludeGroup("Kotlin/Native")
}
}
}
jcenter().content {
it.excludeGroup("Kotlin/Native")
}
mavenCentral().content {
it.excludeGroup("Kotlin/Native")
}
if (BuildVersions.KOTLIN.contains("release")) {
maven { it.url = uri("https://dl.bintray.com/kotlin/kotlin-dev") }
}
}
}
| 1 | 0.027027 | 0 | 1 |
181c09c6b5288ccc88052cd382c2870be014c41e | README.md | README.md | pmap-tools
==========
Tools manipulating process virtual memory mapping.
Guiroux Hugo (gx.hugo@gmail.com / http://hugoguiroux.blogspot.fr/)
## pmap_parser:
Retrieve the virtual memory mapping given a pid and output in CSV
format. Platform specific (only Linux for now, using `pmap`).
Format: `from_addr,to_addr,rights,name`
Usage: `pmap_parser.py pid`
## pmap_which:
Given a csv file of process mapping on stdin and a memory address, gives at
which memory region the address belongs.
Usage: `pmap_which.py addr`
# Examples:
For chromium, find which memory regions contains 0x7f7b44438001:
```
pmap_parser.py $(pidof -s chromium) | pmap_which.py 0x7f7b44438001
```
Results:
```
0x7f7b44438001 belongs to libfontconfig.so.1.8.0 (r-x-) : 7f7b44438000 -> 7f7b44636fff
```
| pmap-tools
==========
Tools manipulating process virtual memory mapping.
Guiroux Hugo (gx.hugo+githubpmap@gmail.com / http://hugoguiroux.blogspot.fr/)
## pmap_parser:
Retrieve the virtual memory mapping given a pid and output in CSV
format. Platform specific (only Linux for now, using `pmap`).
Format: `from_addr,to_addr,rights,name`
Usage: `pmap_parser.py pid`
## pmap_which:
Given a csv file of process mapping on stdin and a memory address, gives at
which memory region the address belongs.
Usage: `pmap_which.py addr`
# Examples:
For chromium, find which memory regions contains 0x7f7b44438001:
```
pmap_parser.py $(pidof -s chromium) | pmap_which.py 0x7f7b44438001
```
Results:
```
0x7f7b44438001 belongs to libfontconfig.so.1.8.0 (r-x-) : 7f7b44438000 -> 7f7b44636fff
```
| Change email address to detect source of spam leak. | Change email address to detect source of spam leak. | Markdown | mit | HugoGuiroux/pmap-tools,GHugo/pmap-tools | markdown | ## Code Before:
pmap-tools
==========
Tools manipulating process virtual memory mapping.
Guiroux Hugo (gx.hugo@gmail.com / http://hugoguiroux.blogspot.fr/)
## pmap_parser:
Retrieve the virtual memory mapping given a pid and output in CSV
format. Platform specific (only Linux for now, using `pmap`).
Format: `from_addr,to_addr,rights,name`
Usage: `pmap_parser.py pid`
## pmap_which:
Given a csv file of process mapping on stdin and a memory address, gives at
which memory region the address belongs.
Usage: `pmap_which.py addr`
# Examples:
For chromium, find which memory regions contains 0x7f7b44438001:
```
pmap_parser.py $(pidof -s chromium) | pmap_which.py 0x7f7b44438001
```
Results:
```
0x7f7b44438001 belongs to libfontconfig.so.1.8.0 (r-x-) : 7f7b44438000 -> 7f7b44636fff
```
## Instruction:
Change email address to detect source of spam leak.
## Code After:
pmap-tools
==========
Tools manipulating process virtual memory mapping.
Guiroux Hugo (gx.hugo+githubpmap@gmail.com / http://hugoguiroux.blogspot.fr/)
## pmap_parser:
Retrieve the virtual memory mapping given a pid and output in CSV
format. Platform specific (only Linux for now, using `pmap`).
Format: `from_addr,to_addr,rights,name`
Usage: `pmap_parser.py pid`
## pmap_which:
Given a csv file of process mapping on stdin and a memory address, gives at
which memory region the address belongs.
Usage: `pmap_which.py addr`
# Examples:
For chromium, find which memory regions contains 0x7f7b44438001:
```
pmap_parser.py $(pidof -s chromium) | pmap_which.py 0x7f7b44438001
```
Results:
```
0x7f7b44438001 belongs to libfontconfig.so.1.8.0 (r-x-) : 7f7b44438000 -> 7f7b44636fff
```
| pmap-tools
==========
Tools manipulating process virtual memory mapping.
- Guiroux Hugo (gx.hugo@gmail.com / http://hugoguiroux.blogspot.fr/)
+ Guiroux Hugo (gx.hugo+githubpmap@gmail.com / http://hugoguiroux.blogspot.fr/)
? +++++++++++
## pmap_parser:
Retrieve the virtual memory mapping given a pid and output in CSV
format. Platform specific (only Linux for now, using `pmap`).
Format: `from_addr,to_addr,rights,name`
Usage: `pmap_parser.py pid`
## pmap_which:
Given a csv file of process mapping on stdin and a memory address, gives at
which memory region the address belongs.
Usage: `pmap_which.py addr`
# Examples:
For chromium, find which memory regions contains 0x7f7b44438001:
```
pmap_parser.py $(pidof -s chromium) | pmap_which.py 0x7f7b44438001
```
Results:
```
0x7f7b44438001 belongs to libfontconfig.so.1.8.0 (r-x-) : 7f7b44438000 -> 7f7b44636fff
```
| 2 | 0.057143 | 1 | 1 |
13b7a18a86f4210952d403ee633e9b1206a04721 | spec/models/project_spec.rb | spec/models/project_spec.rb | require 'rails_helper'
describe Project do
describe "next" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the next project (sorted by id)" do
expect(@first.next).to eq(@second)
expect(@second.next).to eq(@third)
end
it "sorts by episode" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@first.next(episode)).to eq(@third)
end
end
describe "previous" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the previous project (sorted by id)" do
expect(@second.previous).to eq(@first)
expect(@third.previous).to eq(@second)
end
it "sorts by episodes" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@third.previous(episode)).to eq(@first)
end
end
end
| require 'rails_helper'
describe Project do
describe "next" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the next project (sorted by id)" do
expect(@first.next).to eq(@second)
expect(@second.next).to eq(@third)
end
it "sorts by episode" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@first.next(episode)).to eq(@third)
end
end
describe "previous" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the previous project (sorted by id)" do
expect(@second.previous).to eq(@first)
expect(@third.previous).to eq(@second)
end
it "sorts by episodes" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@third.previous(episode)).to eq(@first)
end
end
describe 'active?' do
it "returns true for ideas" do
expect(FactoryGirl.create(:idea).active?).to eq(true)
end
it "it returns true for projects" do
expect(FactoryGirl.create(:project).active?).to eq(true)
end
it "returns false for anything that is not an idea or project" do
expect(FactoryGirl.create(:invention).active?).to eq(false)
expect(FactoryGirl.create(:record).active?).to eq(false)
end
end
end
| Add test for active? method of project model | Add test for active? method of project model
| Ruby | mit | hennevogel/hackweek,SUSE/hackweek,kirushik/hackweek,srinidhibs/hackweek,kirushik/hackweek,hennevogel/hackweek,srinidhibs/hackweek,SUSE/hackweek,srinidhibs/hackweek,hennevogel/hackweek,SUSE/hackweek,kirushik/hackweek,kirushik/hackweek,srinidhibs/hackweek | ruby | ## Code Before:
require 'rails_helper'
describe Project do
describe "next" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the next project (sorted by id)" do
expect(@first.next).to eq(@second)
expect(@second.next).to eq(@third)
end
it "sorts by episode" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@first.next(episode)).to eq(@third)
end
end
describe "previous" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the previous project (sorted by id)" do
expect(@second.previous).to eq(@first)
expect(@third.previous).to eq(@second)
end
it "sorts by episodes" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@third.previous(episode)).to eq(@first)
end
end
end
## Instruction:
Add test for active? method of project model
## Code After:
require 'rails_helper'
describe Project do
describe "next" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the next project (sorted by id)" do
expect(@first.next).to eq(@second)
expect(@second.next).to eq(@third)
end
it "sorts by episode" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@first.next(episode)).to eq(@third)
end
end
describe "previous" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the previous project (sorted by id)" do
expect(@second.previous).to eq(@first)
expect(@third.previous).to eq(@second)
end
it "sorts by episodes" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@third.previous(episode)).to eq(@first)
end
end
describe 'active?' do
it "returns true for ideas" do
expect(FactoryGirl.create(:idea).active?).to eq(true)
end
it "it returns true for projects" do
expect(FactoryGirl.create(:project).active?).to eq(true)
end
it "returns false for anything that is not an idea or project" do
expect(FactoryGirl.create(:invention).active?).to eq(false)
expect(FactoryGirl.create(:record).active?).to eq(false)
end
end
end
| require 'rails_helper'
describe Project do
describe "next" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the next project (sorted by id)" do
expect(@first.next).to eq(@second)
expect(@second.next).to eq(@third)
end
it "sorts by episode" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@first.next(episode)).to eq(@third)
end
end
describe "previous" do
before do
@first = create(:project)
@second = create(:project)
@third = create(:project)
end
it "returns the previous project (sorted by id)" do
expect(@second.previous).to eq(@first)
expect(@third.previous).to eq(@second)
end
it "sorts by episodes" do
create(:episode).active = true
episode = create(:episode)
@first.episodes << episode
@third.episodes << episode
expect(@third.previous(episode)).to eq(@first)
end
end
+
+ describe 'active?' do
+ it "returns true for ideas" do
+ expect(FactoryGirl.create(:idea).active?).to eq(true)
+ end
+
+ it "it returns true for projects" do
+ expect(FactoryGirl.create(:project).active?).to eq(true)
+ end
+
+ it "returns false for anything that is not an idea or project" do
+ expect(FactoryGirl.create(:invention).active?).to eq(false)
+ expect(FactoryGirl.create(:record).active?).to eq(false)
+ end
+ end
end | 15 | 0.3125 | 15 | 0 |
6174cab2b47ea1ed44628f3ed356ca0f9ca623e8 | features/step_definitions/authentication_steps.rb | features/step_definitions/authentication_steps.rb | Given /^I am registered$/ do
@registered_user = Factory(:user, :email => "john@doe.com")
end
| Given /^I am registered$/ do
@registered_user = Factory(:user, :email => "john@doe.com")
end
Given /^I am admin$/ do
@registered_user.make_admin
end
Given /^I am logged in as admin$/ do
steps %Q{
Given I am registered
And I am admin
And I am on the homepage
When I follow "Sign in"
And I fill in "Email" with "john@doe.com"
And I fill in "Password" with "password"
And I press "Sign in"
}
end
| Add 'I am admin' & 'I am logged in as admin' steps. | Add 'I am admin' & 'I am logged in as admin' steps.
| Ruby | mit | renderedtext/base-app,andjosh/invoiceapp,tycoool/QADemo,codeclimate-test/base-app,renderedtext/base-app,sammarcus/base-app,mfolsom/therafinder,tycoool/QADemo,codeclimate-test/base-app,andjosh/invoiceapp,sammarcus/base-app,geremih/recollab,codeclimate-test/base-app,sammarcus/base-app,geremih/recollab,mfolsom/therafinder | ruby | ## Code Before:
Given /^I am registered$/ do
@registered_user = Factory(:user, :email => "john@doe.com")
end
## Instruction:
Add 'I am admin' & 'I am logged in as admin' steps.
## Code After:
Given /^I am registered$/ do
@registered_user = Factory(:user, :email => "john@doe.com")
end
Given /^I am admin$/ do
@registered_user.make_admin
end
Given /^I am logged in as admin$/ do
steps %Q{
Given I am registered
And I am admin
And I am on the homepage
When I follow "Sign in"
And I fill in "Email" with "john@doe.com"
And I fill in "Password" with "password"
And I press "Sign in"
}
end
| Given /^I am registered$/ do
@registered_user = Factory(:user, :email => "john@doe.com")
end
+
+ Given /^I am admin$/ do
+ @registered_user.make_admin
+ end
+
+ Given /^I am logged in as admin$/ do
+ steps %Q{
+ Given I am registered
+ And I am admin
+ And I am on the homepage
+ When I follow "Sign in"
+ And I fill in "Email" with "john@doe.com"
+ And I fill in "Password" with "password"
+ And I press "Sign in"
+ }
+ end | 16 | 5.333333 | 16 | 0 |
9e1481c50220276cad316a1d573239f196b68340 | custom/plugins/alert/alert.plugin.zsh | custom/plugins/alert/alert.plugin.zsh | function alert {
if (( $? == 0 )) then
say -v trinoids 'successfully done'
else
say -v bad 'failed'
fi
}
| function alert {
if (( $? == 0 )) then
say -v Karen 'successfully done'
else
say -v Fred 'failed'
fi
}
| Change voices used for alert | Change voices used for alert
The old voices are not supported in Sierra anymore.
| Shell | mit | sidonath/oh-my-zsh,sidonath/oh-my-zsh | shell | ## Code Before:
function alert {
if (( $? == 0 )) then
say -v trinoids 'successfully done'
else
say -v bad 'failed'
fi
}
## Instruction:
Change voices used for alert
The old voices are not supported in Sierra anymore.
## Code After:
function alert {
if (( $? == 0 )) then
say -v Karen 'successfully done'
else
say -v Fred 'failed'
fi
}
| function alert {
if (( $? == 0 )) then
- say -v trinoids 'successfully done'
? ^ ^ ----
+ say -v Karen 'successfully done'
? ^^ ^
else
- say -v bad 'failed'
? ^^
+ say -v Fred 'failed'
? ^^^
fi
} | 4 | 0.571429 | 2 | 2 |
4a04fdc57f5aded2722af9ee1d0993e3bd05fbc0 | app/views/admin/expectations/index.html.erb | app/views/admin/expectations/index.html.erb | <div>
<h2>Existing Expectations</h2>
<ul>
<% @expectations.each do |expectation| %>
<li><%= expectation.text %></li>
<% end %>
</ul>
<h2>Add Expectation</h2>
<%= semantic_form_for([:admin, @expectation]) do |f| %>
<%= f.inputs do %>
<%= f.input :text %>
<%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %>
<% end %>
<%= f.buttons %>
<% end %>
</div>
<%= javascript_include_tag '/guide-assets/javascripts/publications.js' %>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#expectation_text').change(function () {
var title_field = $(this);
console.log(title_field);
var slug_field = $('#expectation_css_class');
console.log(slug_field);
if (slug_field.text() == '') {
slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val()));
}
})
})
</script>
<% content_for :page_title, "Expectations dashboard" %>
| <div>
<h2>Existing Expectations</h2>
<ul>
<% @expectations.each do |expectation| %>
<li><%= expectation.text %></li>
<% end %>
</ul>
<h2>Add Expectation</h2>
<%= semantic_form_for([:admin, @expectation]) do |f| %>
<%= f.inputs do %>
<%= f.input :text %>
<%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %>
<% end %>
<%= f.buttons %>
<% end %>
</div>
<%= javascript_include_tag '/guide-assets/javascripts/publications.js' %>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#expectation_text').change(function () {
var title_field = $(this);
var slug_field = $('#expectation_css_class');
if (slug_field.text() == '') {
slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val()));
}
})
})
</script>
<% content_for :page_title, "Expectations dashboard" %>
| Remove stray logging statements from expectations JS | Remove stray logging statements from expectations JS
| HTML+ERB | mit | telekomatrix/publisher,theodi/publisher,leftees/publisher,telekomatrix/publisher,alphagov/publisher,theodi/publisher,theodi/publisher,alphagov/publisher,telekomatrix/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,theodi/publisher,alphagov/publisher,leftees/publisher | html+erb | ## Code Before:
<div>
<h2>Existing Expectations</h2>
<ul>
<% @expectations.each do |expectation| %>
<li><%= expectation.text %></li>
<% end %>
</ul>
<h2>Add Expectation</h2>
<%= semantic_form_for([:admin, @expectation]) do |f| %>
<%= f.inputs do %>
<%= f.input :text %>
<%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %>
<% end %>
<%= f.buttons %>
<% end %>
</div>
<%= javascript_include_tag '/guide-assets/javascripts/publications.js' %>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#expectation_text').change(function () {
var title_field = $(this);
console.log(title_field);
var slug_field = $('#expectation_css_class');
console.log(slug_field);
if (slug_field.text() == '') {
slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val()));
}
})
})
</script>
<% content_for :page_title, "Expectations dashboard" %>
## Instruction:
Remove stray logging statements from expectations JS
## Code After:
<div>
<h2>Existing Expectations</h2>
<ul>
<% @expectations.each do |expectation| %>
<li><%= expectation.text %></li>
<% end %>
</ul>
<h2>Add Expectation</h2>
<%= semantic_form_for([:admin, @expectation]) do |f| %>
<%= f.inputs do %>
<%= f.input :text %>
<%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %>
<% end %>
<%= f.buttons %>
<% end %>
</div>
<%= javascript_include_tag '/guide-assets/javascripts/publications.js' %>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#expectation_text').change(function () {
var title_field = $(this);
var slug_field = $('#expectation_css_class');
if (slug_field.text() == '') {
slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val()));
}
})
})
</script>
<% content_for :page_title, "Expectations dashboard" %>
| <div>
<h2>Existing Expectations</h2>
<ul>
<% @expectations.each do |expectation| %>
<li><%= expectation.text %></li>
<% end %>
</ul>
<h2>Add Expectation</h2>
<%= semantic_form_for([:admin, @expectation]) do |f| %>
<%= f.inputs do %>
<%= f.input :text %>
<%= f.input :css_class, :label => 'CSS Class', :hint => 'If in doubt about what to use here, ask a front end developer' %>
<% end %>
<%= f.buttons %>
<% end %>
</div>
<%= javascript_include_tag '/guide-assets/javascripts/publications.js' %>
<script type="text/javascript" charset="utf-8">
$(function () {
$('#expectation_text').change(function () {
var title_field = $(this);
- console.log(title_field);
var slug_field = $('#expectation_css_class');
- console.log(slug_field);
if (slug_field.text() == '') {
slug_field.val(GovUKGuideUtils.convertToSlug(title_field.val()));
}
})
})
</script>
<% content_for :page_title, "Expectations dashboard" %> | 2 | 0.0625 | 0 | 2 |
d0fbd28a7230f6500a19f5cf6216f18eef07d1d9 | src/scenarios/base.h | src/scenarios/base.h |
namespace scenarios {
class base : public boost::noncopyable {
public:
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED>
class scenario : public base {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED>::s_factory;
template<typename DERIVED>
scenario<DERIVED>::scenario(const boost::property_tree::ptree& config) {
}
template<typename DERIVED>
scenario<DERIVED>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
|
namespace scenarios {
class base : public boost::noncopyable {
public:
base(const boost::property_tree::ptree& config) {}
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED, typename BASE = base>
class scenario : public BASE {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED, typename BASE>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED, BASE>::s_factory;
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::scenario(const boost::property_tree::ptree& config) : BASE(config) {
}
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
| Allow scenarios inheritance for scenarios::scenario template | Allow scenarios inheritance for scenarios::scenario template
| C | mit | martin-pr/group_motion_editing,martin-pr/group_motion_editing | c | ## Code Before:
namespace scenarios {
class base : public boost::noncopyable {
public:
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED>
class scenario : public base {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED>::s_factory;
template<typename DERIVED>
scenario<DERIVED>::scenario(const boost::property_tree::ptree& config) {
}
template<typename DERIVED>
scenario<DERIVED>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
## Instruction:
Allow scenarios inheritance for scenarios::scenario template
## Code After:
namespace scenarios {
class base : public boost::noncopyable {
public:
base(const boost::property_tree::ptree& config) {}
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
template<typename DERIVED, typename BASE = base>
class scenario : public BASE {
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
template<typename DERIVED, typename BASE>
factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED, BASE>::s_factory;
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::scenario(const boost::property_tree::ptree& config) : BASE(config) {
}
template<typename DERIVED, typename BASE>
scenario<DERIVED, BASE>::~scenario() {
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
}
|
namespace scenarios {
class base : public boost::noncopyable {
public:
+ base(const boost::property_tree::ptree& config) {}
virtual ~base() {};
virtual agents apply(const agents& source) const = 0;
};
- template<typename DERIVED>
+ template<typename DERIVED, typename BASE = base>
- class scenario : public base {
? ^^^^
+ class scenario : public BASE {
? ^^^^
public:
scenario(const boost::property_tree::ptree& config);
virtual ~scenario() override;
protected:
private:
static factory<base, boost::property_tree::ptree>::registration<DERIVED> s_factory;
};
//////////////////////////////////
- template<typename DERIVED>
+ template<typename DERIVED, typename BASE>
? +++++++++++++++
- factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED>::s_factory;
+ factory<base, boost::property_tree::ptree>::registration<DERIVED> scenario<DERIVED, BASE>::s_factory;
? ++++++
- template<typename DERIVED>
+ template<typename DERIVED, typename BASE>
? +++++++++++++++
- scenario<DERIVED>::scenario(const boost::property_tree::ptree& config) {
+ scenario<DERIVED, BASE>::scenario(const boost::property_tree::ptree& config) : BASE(config) {
? ++++++ +++++++++++++++
}
- template<typename DERIVED>
+ template<typename DERIVED, typename BASE>
? +++++++++++++++
- scenario<DERIVED>::~scenario() {
+ scenario<DERIVED, BASE>::~scenario() {
? ++++++
// a dummy statement to make sure the factory doesn't get optimized away by GCC
boost::lexical_cast<std::string>(&s_factory);
}
} | 17 | 0.459459 | 9 | 8 |
4649cdc3aae91b7d59f685208aff102180f408b3 | README.md | README.md |
[](https://travis-ci.org/mquander/janus-plugin-rs)
Library for creating Rust plugins to [Janus](https://janus.conf.meetecho.com/). Still highly unstable, so not published.
``` toml
[dependencies]
janus-plugin = { git = "https://github.com/mquander/janus-plugin-rs" }
```
## Building
Requires the [Jansson](http://www.digip.org/jansson/) native library (Ubuntu: `libjansson-dev`) to link against; tested as compatible with 2.10.
```
$ cargo build
```
## Testing
```
$ cargo test
```
|
[](https://travis-ci.org/mquander/janus-plugin-rs)
Library for creating Rust plugins to [Janus](https://janus.conf.meetecho.com/). Still highly unstable, so not published.
``` toml
[dependencies]
janus-plugin = { git = "https://github.com/mquander/janus-plugin-rs" }
```
## Building
Requires the [Jansson](http://www.digip.org/jansson/) native library (Ubuntu: `libjansson-dev`) to link against; tested as compatible with 2.10.
```
$ cargo build --all
```
## Testing
```
$ cargo test --all
```
| Adjust build/test instructions for full workspace | Adjust build/test instructions for full workspace
| Markdown | mpl-2.0 | mquander/janus-plugin-rs | markdown | ## Code Before:
[](https://travis-ci.org/mquander/janus-plugin-rs)
Library for creating Rust plugins to [Janus](https://janus.conf.meetecho.com/). Still highly unstable, so not published.
``` toml
[dependencies]
janus-plugin = { git = "https://github.com/mquander/janus-plugin-rs" }
```
## Building
Requires the [Jansson](http://www.digip.org/jansson/) native library (Ubuntu: `libjansson-dev`) to link against; tested as compatible with 2.10.
```
$ cargo build
```
## Testing
```
$ cargo test
```
## Instruction:
Adjust build/test instructions for full workspace
## Code After:
[](https://travis-ci.org/mquander/janus-plugin-rs)
Library for creating Rust plugins to [Janus](https://janus.conf.meetecho.com/). Still highly unstable, so not published.
``` toml
[dependencies]
janus-plugin = { git = "https://github.com/mquander/janus-plugin-rs" }
```
## Building
Requires the [Jansson](http://www.digip.org/jansson/) native library (Ubuntu: `libjansson-dev`) to link against; tested as compatible with 2.10.
```
$ cargo build --all
```
## Testing
```
$ cargo test --all
```
|
[](https://travis-ci.org/mquander/janus-plugin-rs)
Library for creating Rust plugins to [Janus](https://janus.conf.meetecho.com/). Still highly unstable, so not published.
``` toml
[dependencies]
janus-plugin = { git = "https://github.com/mquander/janus-plugin-rs" }
```
## Building
Requires the [Jansson](http://www.digip.org/jansson/) native library (Ubuntu: `libjansson-dev`) to link against; tested as compatible with 2.10.
```
- $ cargo build
+ $ cargo build --all
? ++++++
```
## Testing
```
- $ cargo test
+ $ cargo test --all
? ++++++
``` | 4 | 0.173913 | 2 | 2 |
3b7b15db24ac738c143e3d2d38c740500ac73fd0 | jinja2_time/jinja2_time.py | jinja2_time/jinja2_time.py |
import arrow
from jinja2 import nodes
from jinja2.ext import Extension
class TimeExtension(Extension):
tags = set(['now'])
def __init__(self, environment):
super(TimeExtension, self).__init__(environment)
# add the defaults to the environment
environment.extend(
date_format='%Y-%m-%d',
)
def _now(self, timezone, date_format):
date_format = date_format or self.environment.date_format
return arrow.now(timezone).strftime(date_format)
def parse(self, parser):
lineno = next(parser.stream).lineno
args = [parser.parse_expression()]
if parser.stream.skip_if('comma'):
args.append(parser.parse_expression())
else:
args.append(nodes.Const(None))
call = self.call_method('_now', args, lineno=lineno)
return nodes.Output([call], lineno=lineno)
|
import arrow
from jinja2 import nodes
from jinja2.ext import Extension
class TimeExtension(Extension):
tags = set(['now'])
def __init__(self, environment):
super(TimeExtension, self).__init__(environment)
# add the defaults to the environment
environment.extend(
datetime_format='%Y-%m-%d',
)
def _now(self, timezone, datetime_format):
datetime_format = datetime_format or self.environment.datetime_format
return arrow.now(timezone).strftime(datetime_format)
def parse(self, parser):
lineno = next(parser.stream).lineno
args = [parser.parse_expression()]
if parser.stream.skip_if('comma'):
args.append(parser.parse_expression())
else:
args.append(nodes.Const(None))
call = self.call_method('_now', args, lineno=lineno)
return nodes.Output([call], lineno=lineno)
| Change environment attribute name to datetime_format | Change environment attribute name to datetime_format
| Python | mit | hackebrot/jinja2-time | python | ## Code Before:
import arrow
from jinja2 import nodes
from jinja2.ext import Extension
class TimeExtension(Extension):
tags = set(['now'])
def __init__(self, environment):
super(TimeExtension, self).__init__(environment)
# add the defaults to the environment
environment.extend(
date_format='%Y-%m-%d',
)
def _now(self, timezone, date_format):
date_format = date_format or self.environment.date_format
return arrow.now(timezone).strftime(date_format)
def parse(self, parser):
lineno = next(parser.stream).lineno
args = [parser.parse_expression()]
if parser.stream.skip_if('comma'):
args.append(parser.parse_expression())
else:
args.append(nodes.Const(None))
call = self.call_method('_now', args, lineno=lineno)
return nodes.Output([call], lineno=lineno)
## Instruction:
Change environment attribute name to datetime_format
## Code After:
import arrow
from jinja2 import nodes
from jinja2.ext import Extension
class TimeExtension(Extension):
tags = set(['now'])
def __init__(self, environment):
super(TimeExtension, self).__init__(environment)
# add the defaults to the environment
environment.extend(
datetime_format='%Y-%m-%d',
)
def _now(self, timezone, datetime_format):
datetime_format = datetime_format or self.environment.datetime_format
return arrow.now(timezone).strftime(datetime_format)
def parse(self, parser):
lineno = next(parser.stream).lineno
args = [parser.parse_expression()]
if parser.stream.skip_if('comma'):
args.append(parser.parse_expression())
else:
args.append(nodes.Const(None))
call = self.call_method('_now', args, lineno=lineno)
return nodes.Output([call], lineno=lineno)
|
import arrow
from jinja2 import nodes
from jinja2.ext import Extension
class TimeExtension(Extension):
tags = set(['now'])
def __init__(self, environment):
super(TimeExtension, self).__init__(environment)
# add the defaults to the environment
environment.extend(
- date_format='%Y-%m-%d',
+ datetime_format='%Y-%m-%d',
? ++++
)
- def _now(self, timezone, date_format):
+ def _now(self, timezone, datetime_format):
? ++++
- date_format = date_format or self.environment.date_format
+ datetime_format = datetime_format or self.environment.datetime_format
? ++++ ++++ ++++
- return arrow.now(timezone).strftime(date_format)
+ return arrow.now(timezone).strftime(datetime_format)
? ++++
def parse(self, parser):
lineno = next(parser.stream).lineno
args = [parser.parse_expression()]
if parser.stream.skip_if('comma'):
args.append(parser.parse_expression())
else:
args.append(nodes.Const(None))
call = self.call_method('_now', args, lineno=lineno)
return nodes.Output([call], lineno=lineno) | 8 | 0.228571 | 4 | 4 |
b59aeae915ec762c8a3684ff3c444ab11dbc0307 | README.md | README.md | wineds-converter
================
A script to convert WinEDS output into a simpler format
| WinEDS Converter
================
This repository contains a script to convert WinEDS 4.0 output into a
simpler format. WinEDS is an election management system owned by
[Dominion Voting Systems][dominion].
WinEDS Reporting Tool
---------------------
This section contains a description of the output format of a TXT export
from the WinEDS Reporting Tool.
Here is a sample line of a sample output file (the strings of several
spaces between columns were replaced by strings of two spaces):
0175098110100082 State Proposition 42 Yes Pct 1101 CALIFORNIA
For description purposes, we rewrite this as follows:
0AAACCCPPPPTTTTT CONTEST CHOICE PRECINCT_NAME CONTEST_AREA
Here is a key:
* AAA = Contest ID? (175 here, representing "State Proposition 42")
* CCC = Choice ID? (098 here, representing "Yes" [on 42, specifically])
* PPPP = Precinct ID (1101 here, representing "Pct 1101")
* TTTTT = Choice total (00082 here)
[dominion]: http://www.dominionvoting.com/
| Add Reporting Tool output description. | Add Reporting Tool output description.
| Markdown | bsd-3-clause | cjerdonek/wineds-converter | markdown | ## Code Before:
wineds-converter
================
A script to convert WinEDS output into a simpler format
## Instruction:
Add Reporting Tool output description.
## Code After:
WinEDS Converter
================
This repository contains a script to convert WinEDS 4.0 output into a
simpler format. WinEDS is an election management system owned by
[Dominion Voting Systems][dominion].
WinEDS Reporting Tool
---------------------
This section contains a description of the output format of a TXT export
from the WinEDS Reporting Tool.
Here is a sample line of a sample output file (the strings of several
spaces between columns were replaced by strings of two spaces):
0175098110100082 State Proposition 42 Yes Pct 1101 CALIFORNIA
For description purposes, we rewrite this as follows:
0AAACCCPPPPTTTTT CONTEST CHOICE PRECINCT_NAME CONTEST_AREA
Here is a key:
* AAA = Contest ID? (175 here, representing "State Proposition 42")
* CCC = Choice ID? (098 here, representing "Yes" [on 42, specifically])
* PPPP = Precinct ID (1101 here, representing "Pct 1101")
* TTTTT = Choice total (00082 here)
[dominion]: http://www.dominionvoting.com/
| - wineds-converter
+ WinEDS Converter
================
- A script to convert WinEDS output into a simpler format
+ This repository contains a script to convert WinEDS 4.0 output into a
+ simpler format. WinEDS is an election management system owned by
+ [Dominion Voting Systems][dominion].
+
+
+ WinEDS Reporting Tool
+ ---------------------
+
+ This section contains a description of the output format of a TXT export
+ from the WinEDS Reporting Tool.
+
+ Here is a sample line of a sample output file (the strings of several
+ spaces between columns were replaced by strings of two spaces):
+
+ 0175098110100082 State Proposition 42 Yes Pct 1101 CALIFORNIA
+
+ For description purposes, we rewrite this as follows:
+
+ 0AAACCCPPPPTTTTT CONTEST CHOICE PRECINCT_NAME CONTEST_AREA
+
+ Here is a key:
+
+ * AAA = Contest ID? (175 here, representing "State Proposition 42")
+ * CCC = Choice ID? (098 here, representing "Yes" [on 42, specifically])
+ * PPPP = Precinct ID (1101 here, representing "Pct 1101")
+ * TTTTT = Choice total (00082 here)
+
+
+ [dominion]: http://www.dominionvoting.com/ | 32 | 8 | 30 | 2 |
c839c25b92fb8ce4f142b3f35c836ee6e3231281 | package.json | package.json | {
"name": "el-stacko",
"description": "A combo of web libraries for building a thing.",
"repository": {
"type": "git",
"url": "https://github.com/fzzzy/el-stacko.git"
},
"dependencies": {
"babel": "5.1.5",
"node-sass": "3.0.0-alpha.0",
"react": "0.13.1",
"react-router": "0.13.2",
"gulp": "3.8.11",
"gulp-run": "1.6.7",
"gulp-babel": "5.1.0",
"gulp-sourcemaps": "1.5.1",
"gulp-concat-util": "0.5.2",
"gulp-react": "3.0.1",
"gulp-sass": "1.3.3",
"vinyl-source-stream": "1.1.0",
"gulp-nodemon": "2.0.2",
"browserify": "9.0.8",
"pg": "4.3.0",
"pg-patcher": "0.3.0",
"mime-types": "2.0.10",
"gulp-jshint": "1.10.0",
"git-rev": "0.2.1",
"source-map-support": "0.2.10"
}
}
| {
"name": "el-stacko",
"description": "A combo of web libraries for building a thing.",
"repository": {
"type": "git",
"url": "https://github.com/fzzzy/el-stacko.git"
},
"dependencies": {
"babel": "5.1.5",
"browserify": "9.0.8",
"cookies": "^0.5.0",
"git-rev": "0.2.1",
"gulp": "3.8.11",
"gulp-babel": "5.1.0",
"gulp-concat-util": "0.5.2",
"gulp-jshint": "1.10.0",
"gulp-nodemon": "2.0.2",
"gulp-react": "3.0.1",
"gulp-run": "1.6.7",
"gulp-sass": "1.3.3",
"gulp-sourcemaps": "1.5.1",
"keygrip": "^1.0.1",
"mime-types": "2.0.10",
"node-sass": "3.0.0-alpha.0",
"pg": "4.3.0",
"pg-patcher": "0.3.0",
"react": "0.13.1",
"react-router": "0.13.2",
"source-map-support": "0.2.10",
"vinyl-source-stream": "1.1.0"
}
}
| Add cookies and keygrip to dependencies (and then dependencies got sorted by npm) | Add cookies and keygrip to dependencies (and then dependencies got sorted by npm)
| JSON | mpl-2.0 | mozilla-services/screenshots,fzzzy/pageshot,mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/pageshot,fzzzy/pageshot,fzzzy/pageshot,mozilla-services/pageshot,fzzzy/pageshot,mozilla-services/pageshot | json | ## Code Before:
{
"name": "el-stacko",
"description": "A combo of web libraries for building a thing.",
"repository": {
"type": "git",
"url": "https://github.com/fzzzy/el-stacko.git"
},
"dependencies": {
"babel": "5.1.5",
"node-sass": "3.0.0-alpha.0",
"react": "0.13.1",
"react-router": "0.13.2",
"gulp": "3.8.11",
"gulp-run": "1.6.7",
"gulp-babel": "5.1.0",
"gulp-sourcemaps": "1.5.1",
"gulp-concat-util": "0.5.2",
"gulp-react": "3.0.1",
"gulp-sass": "1.3.3",
"vinyl-source-stream": "1.1.0",
"gulp-nodemon": "2.0.2",
"browserify": "9.0.8",
"pg": "4.3.0",
"pg-patcher": "0.3.0",
"mime-types": "2.0.10",
"gulp-jshint": "1.10.0",
"git-rev": "0.2.1",
"source-map-support": "0.2.10"
}
}
## Instruction:
Add cookies and keygrip to dependencies (and then dependencies got sorted by npm)
## Code After:
{
"name": "el-stacko",
"description": "A combo of web libraries for building a thing.",
"repository": {
"type": "git",
"url": "https://github.com/fzzzy/el-stacko.git"
},
"dependencies": {
"babel": "5.1.5",
"browserify": "9.0.8",
"cookies": "^0.5.0",
"git-rev": "0.2.1",
"gulp": "3.8.11",
"gulp-babel": "5.1.0",
"gulp-concat-util": "0.5.2",
"gulp-jshint": "1.10.0",
"gulp-nodemon": "2.0.2",
"gulp-react": "3.0.1",
"gulp-run": "1.6.7",
"gulp-sass": "1.3.3",
"gulp-sourcemaps": "1.5.1",
"keygrip": "^1.0.1",
"mime-types": "2.0.10",
"node-sass": "3.0.0-alpha.0",
"pg": "4.3.0",
"pg-patcher": "0.3.0",
"react": "0.13.1",
"react-router": "0.13.2",
"source-map-support": "0.2.10",
"vinyl-source-stream": "1.1.0"
}
}
| {
"name": "el-stacko",
"description": "A combo of web libraries for building a thing.",
"repository": {
"type": "git",
"url": "https://github.com/fzzzy/el-stacko.git"
},
"dependencies": {
"babel": "5.1.5",
+ "browserify": "9.0.8",
+ "cookies": "^0.5.0",
+ "git-rev": "0.2.1",
+ "gulp": "3.8.11",
+ "gulp-babel": "5.1.0",
+ "gulp-concat-util": "0.5.2",
+ "gulp-jshint": "1.10.0",
+ "gulp-nodemon": "2.0.2",
+ "gulp-react": "3.0.1",
+ "gulp-run": "1.6.7",
+ "gulp-sass": "1.3.3",
+ "gulp-sourcemaps": "1.5.1",
+ "keygrip": "^1.0.1",
+ "mime-types": "2.0.10",
"node-sass": "3.0.0-alpha.0",
+ "pg": "4.3.0",
+ "pg-patcher": "0.3.0",
"react": "0.13.1",
"react-router": "0.13.2",
- "gulp": "3.8.11",
- "gulp-run": "1.6.7",
- "gulp-babel": "5.1.0",
- "gulp-sourcemaps": "1.5.1",
- "gulp-concat-util": "0.5.2",
- "gulp-react": "3.0.1",
- "gulp-sass": "1.3.3",
- "vinyl-source-stream": "1.1.0",
- "gulp-nodemon": "2.0.2",
- "browserify": "9.0.8",
- "pg": "4.3.0",
- "pg-patcher": "0.3.0",
- "mime-types": "2.0.10",
- "gulp-jshint": "1.10.0",
- "git-rev": "0.2.1",
- "source-map-support": "0.2.10"
+ "source-map-support": "0.2.10",
? +
+ "vinyl-source-stream": "1.1.0"
}
} | 34 | 1.133333 | 18 | 16 |
29ab94dd6a3ef2a442013c281701cddf871e29ac | src/content.js | src/content.js | var code = null;
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
if (code !== null) {
code = 'console.log("Burlando paywall com Burlesco");' + code;
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
}
| var code = null;
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
if (code !== null) {
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
}
| Remove debug log devido à reclamação da Mozilla | Remove debug log devido à reclamação da Mozilla
| JavaScript | mit | rodorgas/burlesco,rodorgas/burlesco,Burlesco/chromium,rodorgas/burlesco,rodorgas/burlesco,Burlesco/chromium | javascript | ## Code Before:
var code = null;
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
if (code !== null) {
code = 'console.log("Burlando paywall com Burlesco");' + code;
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
}
## Instruction:
Remove debug log devido à reclamação da Mozilla
## Code After:
var code = null;
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
if (code !== null) {
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
}
| var code = null;
if (/([^\/].)?oglobo\.globo\.com/.test(document.location.host))
code = 'paywallAtivo = false;';
else if (/www\.economist\.com/.test(document.location.host))
code = 'document.cookie = "ec_limit=allow";';
else if (/foreignpolicy\.com/.test(document.location.host)) {
code = 'window.FPMarketingSettings.__meta.disable_paywall = true;';
code += 'window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name = ' +
'"article paywall registered"';
}
if (code !== null) {
- code = 'console.log("Burlando paywall com Burlesco");' + code;
var script = document.createElement('script');
script.textContent = code;
(document.head||document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
} | 1 | 0.05 | 0 | 1 |
db2013aef1825da4a3520cdb7a8d0195222c44fd | .travis.yml | .travis.yml | branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libudev-dev
install:
- pip install .
- pip install -r requirements.txt
script: py.test --junitxml=tests.xml --enable-privileged -rfEsxX -v
| branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libudev-dev
install:
- pip install .
- pip install -r requirements.txt
script: py.test --junitxml=tests.xml --enable-privileged -rfEsxX -v
| Add Python 3.5, 3.6 to Travis CI | Add Python 3.5, 3.6 to Travis CI
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
| YAML | lgpl-2.1 | pyudev/pyudev | yaml | ## Code Before:
branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libudev-dev
install:
- pip install .
- pip install -r requirements.txt
script: py.test --junitxml=tests.xml --enable-privileged -rfEsxX -v
## Instruction:
Add Python 3.5, 3.6 to Travis CI
Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
## Code After:
branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libudev-dev
install:
- pip install .
- pip install -r requirements.txt
script: py.test --junitxml=tests.xml --enable-privileged -rfEsxX -v
| branches:
only:
- master
language: python
python:
- "2.7"
- "3.4"
+ - "3.5"
+ - "3.6"
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libudev-dev
install:
- pip install .
- pip install -r requirements.txt
script: py.test --junitxml=tests.xml --enable-privileged -rfEsxX -v | 2 | 0.133333 | 2 | 0 |
1b5eacfed2b6d467349ab490373529f780c48416 | python/requirements.txt | python/requirements.txt | cryptography >= 2.5
#
###### Requirements for testing and CI ######
yapf
pylint
hypothesis
| cryptography >= 2.5
hypothesis # tests
| Remove dependencies already present in the CI environment. | Remove dependencies already present in the CI environment.
| Text | apache-2.0 | google/glome,google/glome,google/glome,google/glome,google/glome | text | ## Code Before:
cryptography >= 2.5
#
###### Requirements for testing and CI ######
yapf
pylint
hypothesis
## Instruction:
Remove dependencies already present in the CI environment.
## Code After:
cryptography >= 2.5
hypothesis # tests
| cryptography >= 2.5
+ hypothesis # tests
- #
- ###### Requirements for testing and CI ######
- yapf
- pylint
- hypothesis | 6 | 1 | 1 | 5 |
c782af029d1322f78244ea8d55f15653ad88c677 | test/uart_test.exs | test/uart_test.exs | defmodule UARTTest do
use ExUnit.Case
alias Nerves.UART
# Define the following environment variables for your environment:
#
# NERVES_UART_PORT1 - e.g., COM1 or ttyS0
# NERVES_UART_PORT2
#
# The unit tests expect those ports to exist, be different ports,
# and be connected to each other through a null modem cable.
#
# On Linux, it's possible to use tty0tty. See
# https://github.com/freemed/tty0tty.
def port1() do
System.get_env("NERVES_UART_PORT1")
end
def port2() do
System.get_env("NERVES_UART_PORT2")
end
def common_setup() do
assert !is_nil(port1) && !is_nil(port2),
"Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
environment (e.g. to ttyS0 or COM1) and connect them via a null
modem cable."
if !String.starts_with?(port1, "tnt") do
# Let things settle between tests for real serial ports
:timer.sleep(500)
end
{:ok, uart1} = UART.start_link
{:ok, uart2} = UART.start_link
{:ok, uart1: uart1, uart2: uart2}
end
end
| defmodule UARTTest do
use ExUnit.Case
alias Nerves.UART
# Define the following environment variables for your environment:
#
# NERVES_UART_PORT1 - e.g., COM1 or ttyS0
# NERVES_UART_PORT2
#
# The unit tests expect those ports to exist, be different ports,
# and be connected to each other through a null modem cable.
#
# On Linux, it's possible to use tty0tty. See
# https://github.com/freemed/tty0tty.
def port1() do
System.get_env("NERVES_UART_PORT1")
end
def port2() do
System.get_env("NERVES_UART_PORT2")
end
def common_setup() do
if is_nil(port1) || is_nil(port2) do
msg = "Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
environment (e.g. to ttyS0 or COM1) and connect them via a null
modem cable.\n\n"
ports = UART.enumerate
if ports == [] do
msg = msg <> "No serial ports were found. Check your OS to see if they exist"
else
msg = msg <> "The following ports were found: #{inspect Map.keys(ports)}"
end
flunk msg
end
if !String.starts_with?(port1, "tnt") do
# Let things settle between tests for real serial ports
:timer.sleep(500)
end
{:ok, uart1} = UART.start_link
{:ok, uart2} = UART.start_link
{:ok, uart1: uart1, uart2: uart2}
end
end
| Improve help message when env not set for tests | Improve help message when env not set for tests
| Elixir | apache-2.0 | nerves-project/nerves_uart | elixir | ## Code Before:
defmodule UARTTest do
use ExUnit.Case
alias Nerves.UART
# Define the following environment variables for your environment:
#
# NERVES_UART_PORT1 - e.g., COM1 or ttyS0
# NERVES_UART_PORT2
#
# The unit tests expect those ports to exist, be different ports,
# and be connected to each other through a null modem cable.
#
# On Linux, it's possible to use tty0tty. See
# https://github.com/freemed/tty0tty.
def port1() do
System.get_env("NERVES_UART_PORT1")
end
def port2() do
System.get_env("NERVES_UART_PORT2")
end
def common_setup() do
assert !is_nil(port1) && !is_nil(port2),
"Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
environment (e.g. to ttyS0 or COM1) and connect them via a null
modem cable."
if !String.starts_with?(port1, "tnt") do
# Let things settle between tests for real serial ports
:timer.sleep(500)
end
{:ok, uart1} = UART.start_link
{:ok, uart2} = UART.start_link
{:ok, uart1: uart1, uart2: uart2}
end
end
## Instruction:
Improve help message when env not set for tests
## Code After:
defmodule UARTTest do
use ExUnit.Case
alias Nerves.UART
# Define the following environment variables for your environment:
#
# NERVES_UART_PORT1 - e.g., COM1 or ttyS0
# NERVES_UART_PORT2
#
# The unit tests expect those ports to exist, be different ports,
# and be connected to each other through a null modem cable.
#
# On Linux, it's possible to use tty0tty. See
# https://github.com/freemed/tty0tty.
def port1() do
System.get_env("NERVES_UART_PORT1")
end
def port2() do
System.get_env("NERVES_UART_PORT2")
end
def common_setup() do
if is_nil(port1) || is_nil(port2) do
msg = "Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
environment (e.g. to ttyS0 or COM1) and connect them via a null
modem cable.\n\n"
ports = UART.enumerate
if ports == [] do
msg = msg <> "No serial ports were found. Check your OS to see if they exist"
else
msg = msg <> "The following ports were found: #{inspect Map.keys(ports)}"
end
flunk msg
end
if !String.starts_with?(port1, "tnt") do
# Let things settle between tests for real serial ports
:timer.sleep(500)
end
{:ok, uart1} = UART.start_link
{:ok, uart2} = UART.start_link
{:ok, uart1: uart1, uart2: uart2}
end
end
| defmodule UARTTest do
use ExUnit.Case
alias Nerves.UART
# Define the following environment variables for your environment:
#
# NERVES_UART_PORT1 - e.g., COM1 or ttyS0
# NERVES_UART_PORT2
#
# The unit tests expect those ports to exist, be different ports,
# and be connected to each other through a null modem cable.
#
# On Linux, it's possible to use tty0tty. See
# https://github.com/freemed/tty0tty.
def port1() do
System.get_env("NERVES_UART_PORT1")
end
def port2() do
System.get_env("NERVES_UART_PORT2")
end
def common_setup() do
- assert !is_nil(port1) && !is_nil(port2),
? ^^^^^^ - ^^ - ^
+ if is_nil(port1) || is_nil(port2) do
? ^^ ^^ ^^^
- "Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
+ msg = "Please define NERVES_UART_PORT1 and NERVES_UART_PORT2 in your
? ++++++
environment (e.g. to ttyS0 or COM1) and connect them via a null
- modem cable."
+ modem cable.\n\n"
? ++++
+
+ ports = UART.enumerate
+ if ports == [] do
+ msg = msg <> "No serial ports were found. Check your OS to see if they exist"
+ else
+ msg = msg <> "The following ports were found: #{inspect Map.keys(ports)}"
+ end
+ flunk msg
+ end
if !String.starts_with?(port1, "tnt") do
# Let things settle between tests for real serial ports
:timer.sleep(500)
end
{:ok, uart1} = UART.start_link
{:ok, uart2} = UART.start_link
{:ok, uart1: uart1, uart2: uart2}
end
end | 15 | 0.405405 | 12 | 3 |
476c97edf8489be59d5e96ce36aa9214ae4ca00c | run_tracker.py | run_tracker.py | import sys, json
from cloudtracker import main as tracker_main
def run_tracker(input):
print( " Running the cloud-tracking algorithm... " )
print( " Input dir: \"" + input + "\" \n" )
# Read .json configuration file
with open('model_config.json', 'r') as json_file:
config = json.load(json_file)
tracker_main.main(input, config)
print( "\n Entrainment analysis completed " )
if __name__ == '__main__':
if len(sys.argv) == 1:
run_tracker("./data/")
elif len(sys.argv) == 2:
run_tracker(sys.argv[1])
else:
print( " Invalid input " )
| import sys, json
from cloudtracker.main import main
from cloudtracker.load_config import config
from cloudtracker.load_config import c
def run_tracker():
print( " Running the cloud-tracking algorithm... " )
# Print out model parameters from config.json
print( " \n Model parameters: " )
print( " \t Case name: {}".format(config.case_name) )
print( " \t Model Domain {}x{}x{}".format(c.nx, c.ny, c.nz) )
print( " \t {} model time steps \n".format(c.nt) )
main()
print( "\n Entrainment analysis completed " )
if __name__ == '__main__':
run_tracker()
| Read model parameters and output at the beginning | Read model parameters and output at the beginning
| Python | bsd-2-clause | lorenghoh/loh_tracker | python | ## Code Before:
import sys, json
from cloudtracker import main as tracker_main
def run_tracker(input):
print( " Running the cloud-tracking algorithm... " )
print( " Input dir: \"" + input + "\" \n" )
# Read .json configuration file
with open('model_config.json', 'r') as json_file:
config = json.load(json_file)
tracker_main.main(input, config)
print( "\n Entrainment analysis completed " )
if __name__ == '__main__':
if len(sys.argv) == 1:
run_tracker("./data/")
elif len(sys.argv) == 2:
run_tracker(sys.argv[1])
else:
print( " Invalid input " )
## Instruction:
Read model parameters and output at the beginning
## Code After:
import sys, json
from cloudtracker.main import main
from cloudtracker.load_config import config
from cloudtracker.load_config import c
def run_tracker():
print( " Running the cloud-tracking algorithm... " )
# Print out model parameters from config.json
print( " \n Model parameters: " )
print( " \t Case name: {}".format(config.case_name) )
print( " \t Model Domain {}x{}x{}".format(c.nx, c.ny, c.nz) )
print( " \t {} model time steps \n".format(c.nt) )
main()
print( "\n Entrainment analysis completed " )
if __name__ == '__main__':
run_tracker()
| import sys, json
- from cloudtracker import main as tracker_main
+ from cloudtracker.main import main
+ from cloudtracker.load_config import config
+ from cloudtracker.load_config import c
- def run_tracker(input):
? -----
+ def run_tracker():
print( " Running the cloud-tracking algorithm... " )
- print( " Input dir: \"" + input + "\" \n" )
- # Read .json configuration file
- with open('model_config.json', 'r') as json_file:
- config = json.load(json_file)
+ # Print out model parameters from config.json
+ print( " \n Model parameters: " )
+ print( " \t Case name: {}".format(config.case_name) )
+ print( " \t Model Domain {}x{}x{}".format(c.nx, c.ny, c.nz) )
+ print( " \t {} model time steps \n".format(c.nt) )
- tracker_main.main(input, config)
+ main()
print( "\n Entrainment analysis completed " )
if __name__ == '__main__':
+ run_tracker()
- if len(sys.argv) == 1:
- run_tracker("./data/")
- elif len(sys.argv) == 2:
- run_tracker(sys.argv[1])
- else:
- print( " Invalid input " )
| 24 | 1 | 11 | 13 |
8b969376ae57ced4567e829322c94c8b56cd7782 | openstack/neutron/templates/etc/_asr1k-global.ini.tpl | openstack/neutron/templates/etc/_asr1k-global.ini.tpl | [asr1k]
ignore_invalid_az_hint_for_router = {{ default ".Values.asr.ignore_invalid_az_hint_for_router" "False"}}
[asr1k-address-scopes]
{{ $cloud_asn := required "A valid .Values.global_cloud_asn entry required!" .Values.global_cloud_asn }}
{{- range $i, $address_scope := concat .Values.global_address_scopes .Values.local_address_scopes -}}
{{required "A valid address-scope required!" $address_scope.name}} = {{required "A valid address-scope required!" (default (print $cloud_asn ":1" ($address_scope.vrf | replace "cc-cloud" "")) $address_scope.rd) }}
{{ end }}
| [asr1k]
ignore_invalid_az_hint_for_router = {{ default "False" .Values.asr.ignore_invalid_az_hint_for_router}}
[asr1k-address-scopes]
{{ $cloud_asn := required "A valid .Values.global_cloud_asn entry required!" .Values.global_cloud_asn }}
{{- range $i, $address_scope := concat .Values.global_address_scopes .Values.local_address_scopes -}}
{{required "A valid address-scope required!" $address_scope.name}} = {{required "A valid address-scope required!" (default (print $cloud_asn ":1" ($address_scope.vrf | replace "cc-cloud" "")) $address_scope.rd) }}
{{ end }}
| Correct order of `default` call. | Correct order of `default` call.
This will fix mistakenly not ignoring the az-hint
| Smarty | apache-2.0 | sapcc/helm-charts,sapcc/helm-charts,sapcc/helm-charts,sapcc/helm-charts | smarty | ## Code Before:
[asr1k]
ignore_invalid_az_hint_for_router = {{ default ".Values.asr.ignore_invalid_az_hint_for_router" "False"}}
[asr1k-address-scopes]
{{ $cloud_asn := required "A valid .Values.global_cloud_asn entry required!" .Values.global_cloud_asn }}
{{- range $i, $address_scope := concat .Values.global_address_scopes .Values.local_address_scopes -}}
{{required "A valid address-scope required!" $address_scope.name}} = {{required "A valid address-scope required!" (default (print $cloud_asn ":1" ($address_scope.vrf | replace "cc-cloud" "")) $address_scope.rd) }}
{{ end }}
## Instruction:
Correct order of `default` call.
This will fix mistakenly not ignoring the az-hint
## Code After:
[asr1k]
ignore_invalid_az_hint_for_router = {{ default "False" .Values.asr.ignore_invalid_az_hint_for_router}}
[asr1k-address-scopes]
{{ $cloud_asn := required "A valid .Values.global_cloud_asn entry required!" .Values.global_cloud_asn }}
{{- range $i, $address_scope := concat .Values.global_address_scopes .Values.local_address_scopes -}}
{{required "A valid address-scope required!" $address_scope.name}} = {{required "A valid address-scope required!" (default (print $cloud_asn ":1" ($address_scope.vrf | replace "cc-cloud" "")) $address_scope.rd) }}
{{ end }}
| [asr1k]
- ignore_invalid_az_hint_for_router = {{ default ".Values.asr.ignore_invalid_az_hint_for_router" "False"}}
? ---------
+ ignore_invalid_az_hint_for_router = {{ default "False" .Values.asr.ignore_invalid_az_hint_for_router}}
? +++++++
[asr1k-address-scopes]
{{ $cloud_asn := required "A valid .Values.global_cloud_asn entry required!" .Values.global_cloud_asn }}
{{- range $i, $address_scope := concat .Values.global_address_scopes .Values.local_address_scopes -}}
{{required "A valid address-scope required!" $address_scope.name}} = {{required "A valid address-scope required!" (default (print $cloud_asn ":1" ($address_scope.vrf | replace "cc-cloud" "")) $address_scope.rd) }}
{{ end }} | 2 | 0.25 | 1 | 1 |
a14038d8967578af2c85212f1395ecbaad84efd6 | src/javascript/app_2/App/Middlewares/is_client_allowed_to_visit.js | src/javascript/app_2/App/Middlewares/is_client_allowed_to_visit.js | import Client from '_common/base/client_base';
export const isClientAllowedToVisit = () => !Client.isLoggedIn() || Client.get('is_virtual') ||
/^CR/.test(Client.get('loginid'));
| import Client from '_common/base/client_base';
export const isClientAllowedToVisit = () => !Client.isLoggedIn() || Client.get('is_virtual') ||
Client.get('landing_company_shortcode') === 'costarica';
| Use shortcode instead of loginid | Use shortcode instead of loginid
| JavaScript | apache-2.0 | 4p00rv/binary-static,kellybinary/binary-static,ashkanx/binary-static,ashkanx/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,4p00rv/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,binary-com/binary-static,kellybinary/binary-static,kellybinary/binary-static | javascript | ## Code Before:
import Client from '_common/base/client_base';
export const isClientAllowedToVisit = () => !Client.isLoggedIn() || Client.get('is_virtual') ||
/^CR/.test(Client.get('loginid'));
## Instruction:
Use shortcode instead of loginid
## Code After:
import Client from '_common/base/client_base';
export const isClientAllowedToVisit = () => !Client.isLoggedIn() || Client.get('is_virtual') ||
Client.get('landing_company_shortcode') === 'costarica';
| import Client from '_common/base/client_base';
export const isClientAllowedToVisit = () => !Client.isLoggedIn() || Client.get('is_virtual') ||
- /^CR/.test(Client.get('loginid'));
+ Client.get('landing_company_shortcode') === 'costarica'; | 2 | 0.5 | 1 | 1 |
435a928a0d612be69ebc1e3a6776dfc178c82927 | Setup/InstallData.php | Setup/InstallData.php | <?php
namespace Botamp\Botamp\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class InstallData implements InstallDataInterface
{
private $eavSetupFactory;
public function __construct(EavSetupFactory $eavSetupFactory)
{
$this->eavSetupFactory = $eavSetupFactory;
}
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'botamp_entity_id',
[
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Botamp Entity ID',
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => true,
'unique' => true,
'apply_to' => ''
]
);
}
}
| <?php
namespace Botamp\Botamp\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class InstallData implements InstallDataInterface {
private $eavSetupFactory;
public function __construct(EavSetupFactory $eavSetupFactory) {
$this->eavSetupFactory = $eavSetupFactory;
}
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'botamp_entity_id',
[
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Botamp Entity ID',
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => false,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => false,
'unique' => true,
'apply_to' => ''
]
);
}
}
| Improve adding ‘botamp_entity_id’ attribute script | Improve adding ‘botamp_entity_id’ attribute script
| PHP | mit | botamp/botamp-magento,botamp/botamp-magento,botamp/botamp-magento,botamp/botamp-magento | php | ## Code Before:
<?php
namespace Botamp\Botamp\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class InstallData implements InstallDataInterface
{
private $eavSetupFactory;
public function __construct(EavSetupFactory $eavSetupFactory)
{
$this->eavSetupFactory = $eavSetupFactory;
}
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'botamp_entity_id',
[
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Botamp Entity ID',
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => true,
'unique' => true,
'apply_to' => ''
]
);
}
}
## Instruction:
Improve adding ‘botamp_entity_id’ attribute script
## Code After:
<?php
namespace Botamp\Botamp\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class InstallData implements InstallDataInterface {
private $eavSetupFactory;
public function __construct(EavSetupFactory $eavSetupFactory) {
$this->eavSetupFactory = $eavSetupFactory;
}
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'botamp_entity_id',
[
'type' => 'int',
'backend' => '',
'frontend' => '',
'label' => 'Botamp Entity ID',
'input' => '',
'class' => '',
'source' => '',
'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
'visible' => false,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => false,
'unique' => true,
'apply_to' => ''
]
);
}
}
| <?php
namespace Botamp\Botamp\Setup;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
- class InstallData implements InstallDataInterface
+ class InstallData implements InstallDataInterface {
? ++
- {
private $eavSetupFactory;
- public function __construct(EavSetupFactory $eavSetupFactory)
+ public function __construct(EavSetupFactory $eavSetupFactory) {
? ++
- {
$this->eavSetupFactory = $eavSetupFactory;
}
- public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
+ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
? ++
- {
$eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
+
$eavSetup->addAttribute(
\Magento\Catalog\Model\Product::ENTITY,
'botamp_entity_id',
[
- 'type' => 'int',
? --
+ 'type' => 'int',
- 'backend' => '',
? --
+ 'backend' => '',
- 'frontend' => '',
? --
+ 'frontend' => '',
- 'label' => 'Botamp Entity ID',
? --
+ 'label' => 'Botamp Entity ID',
- 'input' => '',
? --
+ 'input' => '',
- 'class' => '',
? --
+ 'class' => '',
- 'source' => '',
? --
+ 'source' => '',
- 'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
+ 'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
- 'visible' => true,
? -- ^^^
+ 'visible' => false,
? ^^^^
- 'required' => false,
? --
+ 'required' => false,
- 'user_defined' => false,
? --
+ 'user_defined' => false,
- 'default' => 0,
? --
+ 'default' => 0,
- 'searchable' => false,
? --
+ 'searchable' => false,
- 'filterable' => false,
? --
+ 'filterable' => false,
- 'comparable' => false,
? --
+ 'comparable' => false,
- 'visible_on_front' => false,
? --
+ 'visible_on_front' => false,
- 'used_in_product_listing' => true,
? -- ^^^
+ 'used_in_product_listing' => false,
? ^^^^
- 'unique' => true,
? --
+ 'unique' => true,
- 'apply_to' => ''
? --
+ 'apply_to' => ''
]
);
}
} | 48 | 0.979592 | 23 | 25 |
fe6247d1ade209f1ebb6ba537652569810c4d77a | lib/adapter.js | lib/adapter.js | /**
* Request adapter.
*
* @package cork
* @author Andrew Sliwinski <andrew@diy.org>
*/
/**
* Dependencies
*/
var _ = require('lodash'),
async = require('async'),
request = require('request');
/**
* Executes a task from the adapter queue.
*
* @param {Object} Task
*
* @return {Object}
*/
var execute = function (task, callback) {
request(task, function (err, response, body) {
callback(err, body);
});
}
/**
* Constructor
*/
function Adapter (args) {
var self = this;
// Setup instance
_.extend(self, args);
_.defaults(self, {
base: null,
throttle: 0
});
// Throttled request method
var limiter = _.throttle(execute, self.throttle);
// Create queue
self.queue = async.queue(function (obj, callback) {
// Assemble task
var task = Object.create(null);
_.extend(task, self, obj);
if (self.base !== null) task.uri = self.base + task.uri;
// Clean-up
delete task.base;
delete task.throttle;
// Process task through the limiter method
limiter(task, callback);
}, 1);
};
/**
* Export
*/
module.exports = Adapter;
| /**
* Request adapter.
*
* @package cork
* @author Andrew Sliwinski <andrew@diy.org>
*/
/**
* Dependencies
*/
var _ = require('lodash'),
async = require('async'),
request = require('request');
/**
* Executes a task from the adapter queue.
*
* @param {Object} Task
*
* @return {Object}
*/
var execute = function (task, callback) {
request(task, function (err, response, body) {
callback(err, body);
});
}
/**
* Constructor
*/
function Adapter (args) {
var self = this;
// Setup instance
_.extend(self, args);
_.defaults(self, {
base: null,
throttle: 0
});
// Throttle the request execution method
var limiter = _.throttle(execute, self.throttle);
// Create queue
self.queue = async.queue(function (obj, callback) {
// Assemble task
var task = Object.create(null);
_.extend(task, self, obj);
if (self.base !== null) task.uri = self.base + task.uri;
// Clean-up
delete task.queue;
delete task.base;
delete task.throttle;
// Process task through the limiter method
limiter(task, callback);
}, 1);
};
/**
* Export
*/
module.exports = Adapter;
| Remove queue object from the task | Remove queue object from the task | JavaScript | mit | thisandagain/cork | javascript | ## Code Before:
/**
* Request adapter.
*
* @package cork
* @author Andrew Sliwinski <andrew@diy.org>
*/
/**
* Dependencies
*/
var _ = require('lodash'),
async = require('async'),
request = require('request');
/**
* Executes a task from the adapter queue.
*
* @param {Object} Task
*
* @return {Object}
*/
var execute = function (task, callback) {
request(task, function (err, response, body) {
callback(err, body);
});
}
/**
* Constructor
*/
function Adapter (args) {
var self = this;
// Setup instance
_.extend(self, args);
_.defaults(self, {
base: null,
throttle: 0
});
// Throttled request method
var limiter = _.throttle(execute, self.throttle);
// Create queue
self.queue = async.queue(function (obj, callback) {
// Assemble task
var task = Object.create(null);
_.extend(task, self, obj);
if (self.base !== null) task.uri = self.base + task.uri;
// Clean-up
delete task.base;
delete task.throttle;
// Process task through the limiter method
limiter(task, callback);
}, 1);
};
/**
* Export
*/
module.exports = Adapter;
## Instruction:
Remove queue object from the task
## Code After:
/**
* Request adapter.
*
* @package cork
* @author Andrew Sliwinski <andrew@diy.org>
*/
/**
* Dependencies
*/
var _ = require('lodash'),
async = require('async'),
request = require('request');
/**
* Executes a task from the adapter queue.
*
* @param {Object} Task
*
* @return {Object}
*/
var execute = function (task, callback) {
request(task, function (err, response, body) {
callback(err, body);
});
}
/**
* Constructor
*/
function Adapter (args) {
var self = this;
// Setup instance
_.extend(self, args);
_.defaults(self, {
base: null,
throttle: 0
});
// Throttle the request execution method
var limiter = _.throttle(execute, self.throttle);
// Create queue
self.queue = async.queue(function (obj, callback) {
// Assemble task
var task = Object.create(null);
_.extend(task, self, obj);
if (self.base !== null) task.uri = self.base + task.uri;
// Clean-up
delete task.queue;
delete task.base;
delete task.throttle;
// Process task through the limiter method
limiter(task, callback);
}, 1);
};
/**
* Export
*/
module.exports = Adapter;
| /**
* Request adapter.
*
* @package cork
* @author Andrew Sliwinski <andrew@diy.org>
*/
/**
* Dependencies
*/
var _ = require('lodash'),
async = require('async'),
request = require('request');
/**
* Executes a task from the adapter queue.
*
* @param {Object} Task
*
* @return {Object}
*/
var execute = function (task, callback) {
request(task, function (err, response, body) {
callback(err, body);
});
}
/**
* Constructor
*/
function Adapter (args) {
var self = this;
// Setup instance
_.extend(self, args);
_.defaults(self, {
base: null,
throttle: 0
});
- // Throttled request method
? ^
+ // Throttle the request execution method
? ^^^^ ++++++++++
var limiter = _.throttle(execute, self.throttle);
// Create queue
self.queue = async.queue(function (obj, callback) {
// Assemble task
var task = Object.create(null);
_.extend(task, self, obj);
if (self.base !== null) task.uri = self.base + task.uri;
// Clean-up
+ delete task.queue;
delete task.base;
delete task.throttle;
// Process task through the limiter method
limiter(task, callback);
}, 1);
};
/**
* Export
*/
module.exports = Adapter; | 3 | 0.047619 | 2 | 1 |
7b495c6199e4c228a607181b02f98174dc979367 | Draw/Source/DrawController.swift | Draw/Source/DrawController.swift | //
// DrawController.swift
// Draw
//
// Created by Julian Grosshauser on 18/01/16.
// Copyright © 2016 Julian Grosshauser. All rights reserved.
//
import UIKit
class DrawController: UIViewController {
//MARK: Properties
private var previousTouchLocation: CGPoint?
//MARK: UIViewController
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
previousTouchLocation = touches.first?.locationInView(view)
}
}
| //
// DrawController.swift
// Draw
//
// Created by Julian Grosshauser on 18/01/16.
// Copyright © 2016 Julian Grosshauser. All rights reserved.
//
import UIKit
class DrawController: UIViewController {
//MARK: Properties
private var previousTouchLocation: CGPoint?
private let imageView = UIImageView()
//MARK: UIViewController
override func viewDidLoad() {
super.viewDidLoad()
imageView.frame = view.frame
view.addSubview(imageView)
}
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
previousTouchLocation = touches.first?.locationInView(view)
}
}
| Add fullscreen image view as subview | Add fullscreen image view as subview
| Swift | mit | juliangrosshauser/Draw | swift | ## Code Before:
//
// DrawController.swift
// Draw
//
// Created by Julian Grosshauser on 18/01/16.
// Copyright © 2016 Julian Grosshauser. All rights reserved.
//
import UIKit
class DrawController: UIViewController {
//MARK: Properties
private var previousTouchLocation: CGPoint?
//MARK: UIViewController
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
previousTouchLocation = touches.first?.locationInView(view)
}
}
## Instruction:
Add fullscreen image view as subview
## Code After:
//
// DrawController.swift
// Draw
//
// Created by Julian Grosshauser on 18/01/16.
// Copyright © 2016 Julian Grosshauser. All rights reserved.
//
import UIKit
class DrawController: UIViewController {
//MARK: Properties
private var previousTouchLocation: CGPoint?
private let imageView = UIImageView()
//MARK: UIViewController
override func viewDidLoad() {
super.viewDidLoad()
imageView.frame = view.frame
view.addSubview(imageView)
}
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
previousTouchLocation = touches.first?.locationInView(view)
}
}
| //
// DrawController.swift
// Draw
//
// Created by Julian Grosshauser on 18/01/16.
// Copyright © 2016 Julian Grosshauser. All rights reserved.
//
import UIKit
class DrawController: UIViewController {
//MARK: Properties
private var previousTouchLocation: CGPoint?
+ private let imageView = UIImageView()
//MARK: UIViewController
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ imageView.frame = view.frame
+ view.addSubview(imageView)
+ }
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) {
previousTouchLocation = touches.first?.locationInView(view)
}
} | 7 | 0.318182 | 7 | 0 |
482c48d850831e24422f8e6b038f57bc2506ffeb | app/assets/stylesheets/forest/partials/_blocks.scss | app/assets/stylesheets/forest/partials/_blocks.scss | // Blocks
.block_slots {
overflow: auto;
}
.block-kind__select2-response__icon {
line-height: 1.4;
vertical-align: top;
}
.nested-fields,
[data-collapse-parent] {
&.collapsed {
.panel-body {
display: none;
}
}
}
.nested-fields {
margin-bottom: map-get($spacers, 3);
}
.block-slot-field-template {
display: none;
}
.block-slot-field__buttons {
min-width: 74px;
text-align: right;
}
| // Blocks
.block_slots {
overflow: auto;
}
.block-kind__select2-response__icon {
line-height: 1.4;
vertical-align: top;
.select2-results__option--highlighted & {
filter: invert(1);
}
}
.nested-fields,
[data-collapse-parent] {
&.collapsed {
.panel-body {
display: none;
}
}
}
.nested-fields {
margin-bottom: map-get($spacers, 3);
}
.block-slot-field-template {
display: none;
}
.block-slot-field__buttons {
min-width: 74px;
text-align: right;
}
| Make bootstrap block icon white when hovering over select2 | Make bootstrap block icon white when hovering over select2
| SCSS | mit | dylanfisher/forest,dylanfisher/forest,dylanfisher/forest | scss | ## Code Before:
// Blocks
.block_slots {
overflow: auto;
}
.block-kind__select2-response__icon {
line-height: 1.4;
vertical-align: top;
}
.nested-fields,
[data-collapse-parent] {
&.collapsed {
.panel-body {
display: none;
}
}
}
.nested-fields {
margin-bottom: map-get($spacers, 3);
}
.block-slot-field-template {
display: none;
}
.block-slot-field__buttons {
min-width: 74px;
text-align: right;
}
## Instruction:
Make bootstrap block icon white when hovering over select2
## Code After:
// Blocks
.block_slots {
overflow: auto;
}
.block-kind__select2-response__icon {
line-height: 1.4;
vertical-align: top;
.select2-results__option--highlighted & {
filter: invert(1);
}
}
.nested-fields,
[data-collapse-parent] {
&.collapsed {
.panel-body {
display: none;
}
}
}
.nested-fields {
margin-bottom: map-get($spacers, 3);
}
.block-slot-field-template {
display: none;
}
.block-slot-field__buttons {
min-width: 74px;
text-align: right;
}
| // Blocks
.block_slots {
overflow: auto;
}
.block-kind__select2-response__icon {
line-height: 1.4;
vertical-align: top;
+
+ .select2-results__option--highlighted & {
+ filter: invert(1);
+ }
}
.nested-fields,
[data-collapse-parent] {
&.collapsed {
.panel-body {
display: none;
}
}
}
.nested-fields {
margin-bottom: map-get($spacers, 3);
}
.block-slot-field-template {
display: none;
}
.block-slot-field__buttons {
min-width: 74px;
text-align: right;
} | 4 | 0.125 | 4 | 0 |
f9388e7cb9e5f881e6971d68beb865c5b02f7283 | README.md | README.md | 
### Get Caption
- **[Download the latest release](http://getcaption.co/)** (macOS only) 
- [Getcaption.co](https://getcaption.co/)
### Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Install the dependencies: `npm install`
3. Run the app by building the code and watch for changes: `npm run dev`
To make sure that your code works in the finished app, you can generate the binary:
```
$ npm run package
```
After that, you'll see the binary in the `./release` folder :smile:
### Related Repositories
- [Website](https://github.com/gielcobben/CaptionWebsite)
### Thanks 🙏🏻
- [Rick Wong](https://github.com/RickWong)
- [Lennard van Gunst](https://github.com/lvgunst)
- [Matthijs Dabroek](https://github.com/dabroek)
- [Jeroen Rinzema](https://github.com/jeroenrinzema) | 
### Get Caption
- **[Download the latest release](http://getcaption.co/)** (macOS only) [](https://github.com/gielcobben/Caption)
- [Getcaption.co](https://getcaption.co/)
### Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Install the dependencies: `npm install`
3. Run the app by building the code and watch for changes: `npm run dev`
To make sure that your code works in the finished app, you can generate the binary:
```
$ npm run package
```
After that, you'll see the binary in the `./release` folder :smile:
### Related Repositories
- [Website](https://github.com/gielcobben/CaptionWebsite)
### Thanks 🙏🏻
- [Rick Wong](https://github.com/RickWong)
- [Lennard van Gunst](https://github.com/lvgunst)
- [Matthijs Dabroek](https://github.com/dabroek)
- [Jeroen Rinzema](https://github.com/jeroenrinzema) | Add download count to readme | Add download count to readme
| Markdown | mit | gielcobben/Caption | markdown | ## Code Before:

### Get Caption
- **[Download the latest release](http://getcaption.co/)** (macOS only) 
- [Getcaption.co](https://getcaption.co/)
### Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Install the dependencies: `npm install`
3. Run the app by building the code and watch for changes: `npm run dev`
To make sure that your code works in the finished app, you can generate the binary:
```
$ npm run package
```
After that, you'll see the binary in the `./release` folder :smile:
### Related Repositories
- [Website](https://github.com/gielcobben/CaptionWebsite)
### Thanks 🙏🏻
- [Rick Wong](https://github.com/RickWong)
- [Lennard van Gunst](https://github.com/lvgunst)
- [Matthijs Dabroek](https://github.com/dabroek)
- [Jeroen Rinzema](https://github.com/jeroenrinzema)
## Instruction:
Add download count to readme
## Code After:

### Get Caption
- **[Download the latest release](http://getcaption.co/)** (macOS only) [](https://github.com/gielcobben/Caption)
- [Getcaption.co](https://getcaption.co/)
### Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Install the dependencies: `npm install`
3. Run the app by building the code and watch for changes: `npm run dev`
To make sure that your code works in the finished app, you can generate the binary:
```
$ npm run package
```
After that, you'll see the binary in the `./release` folder :smile:
### Related Repositories
- [Website](https://github.com/gielcobben/CaptionWebsite)
### Thanks 🙏🏻
- [Rick Wong](https://github.com/RickWong)
- [Lennard van Gunst](https://github.com/lvgunst)
- [Matthijs Dabroek](https://github.com/dabroek)
- [Jeroen Rinzema](https://github.com/jeroenrinzema) | 
### Get Caption
- - **[Download the latest release](http://getcaption.co/)** (macOS only) 
? ^^^^ ^ ^^^^^^ ----------
+ - **[Download the latest release](http://getcaption.co/)** (macOS only) [](https://github.com/gielcobben/Caption)
? + ^^^^^^^^ ^^^^^^ ^^^ +++++++++++++++++++++++++++++++++++++++++
- [Getcaption.co](https://getcaption.co/)
### Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Install the dependencies: `npm install`
3. Run the app by building the code and watch for changes: `npm run dev`
To make sure that your code works in the finished app, you can generate the binary:
```
$ npm run package
```
After that, you'll see the binary in the `./release` folder :smile:
### Related Repositories
- [Website](https://github.com/gielcobben/CaptionWebsite)
### Thanks 🙏🏻
- [Rick Wong](https://github.com/RickWong)
- [Lennard van Gunst](https://github.com/lvgunst)
- [Matthijs Dabroek](https://github.com/dabroek)
- [Jeroen Rinzema](https://github.com/jeroenrinzema) | 2 | 0.064516 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.